From 5b9c82e4c02e683c8d6bc7468bc9cd4183baffee Mon Sep 17 00:00:00 2001 From: hermosillajelmy Date: Fri, 2 Aug 2024 11:20:25 -0400 Subject: [PATCH] update ui --- build-explorer/vite.config.js | 2 +- explorer/assets/index-4922982c.js | 122 ++++++++++++++++++ explorer/assets/index-legacy-229ca80c.js | 115 +++++++++++++++++ explorer/assets/vizbuilder-f4715974.js | 1 + explorer/assets/vizbuilder-legacy-6ffafa1e.js | 1 + explorer/index.html | 4 +- schema/ipeds_completions.xml | 52 +------- schema/ipeds_enrollment.xml | 4 +- 8 files changed, 245 insertions(+), 56 deletions(-) create mode 100644 explorer/assets/index-4922982c.js create mode 100644 explorer/assets/index-legacy-229ca80c.js create mode 100644 explorer/assets/vizbuilder-f4715974.js create mode 100644 explorer/assets/vizbuilder-legacy-6ffafa1e.js diff --git a/build-explorer/vite.config.js b/build-explorer/vite.config.js index ace7e04..a93fe7a 100644 --- a/build-explorer/vite.config.js +++ b/build-explorer/vite.config.js @@ -21,7 +21,7 @@ const config = { }, clearScreen: false, define: { - 'process.env.__SERVER_LOCALE__': JSON.stringify(`en,es,fr`), + 'process.env.__SERVER_LOCALE__': JSON.stringify(`en`), 'process.env.__SERVER_URL__': JSON.stringify(serverUrl), 'process.env.__UI_LOCALE__': JSON.stringify(`en`), }, diff --git a/explorer/assets/index-4922982c.js b/explorer/assets/index-4922982c.js new file mode 100644 index 0000000..ff15b5a --- /dev/null +++ b/explorer/assets/index-4922982c.js @@ -0,0 +1,122 @@ +var e;function t(){import.meta.url,import("_").catch((()=>1))}import{r as n,R as r,c as o,a,u as i,b as l,d as s,S as c,B as u,T as d,A as p,e as m,g,f,h,i as b,j as v,k as y,l as w,C as x,U as S,H as C,m as E,P as k,n as _,F as R,L as O,o as I,p as P,q as F,s as j,M,t as A,v as T,w as N,x as L,y as D,z,D as B,E as V,G as U,I as G,J as H,K as q,N as $,O as W,Q as K,V as Y,W as X,X as Q,Y as Z,Z as J,_ as ee,$ as te,a0 as ne,a1 as re,a2 as oe,a3 as ae,a4 as ie,a5 as le,a6 as se,a7 as ce,a8 as ue,a9 as de,aa as pe,ab as me}from"./extras-2ba1cc58.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const ge={},fe=function(e,t,n){if(!t||0===t.length)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map((e=>{if(e=function(e,t){return new URL(e,t).href}(e,n),e in ge)return;ge[e]=!0;const t=e.endsWith(".css"),o=t?'[rel="stylesheet"]':"";if(!!n)for(let n=r.length-1;n>=0;n--){const o=r[n];if(o.href===e&&(!t||"stylesheet"===o.rel))return}else if(document.querySelector('link[href="'.concat(e,'"]').concat(o)))return;const a=document.createElement("link");return a.rel=t?"stylesheet":"modulepreload",t||(a.as="script",a.crossOrigin=""),a.href=e,document.head.appendChild(a),t?new Promise(((t,n)=>{a.addEventListener("load",t),a.addEventListener("error",(()=>n(new Error("Unable to preload CSS for ".concat(e)))))})):void 0}))).then((()=>e())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))}; +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ +var he,be,ve,ye=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);C+=S.value.length,S=S.next){var E=S.value;if(t.length>e.length)return;if(!(E instanceof o)){var k,_=1;if(v){if(!(k=a(x,C,e,b))||k.index>=e.length)break;var R=k.index,O=k.index+k[0].length,I=C;for(I+=S.value.length;R>=I;)I+=(S=S.next).value.length;if(C=I-=S.value.length,S.value instanceof o)continue;for(var P=S;P!==t.tail&&(Id.reach&&(d.reach=A);var T=S.prev;if(j&&(T=s(t,T,j),C+=j.length),c(t,T,_),S=s(t,T,new o(p,h?r.tokenize(F,h):F,y,F)),M&&s(t,S,M),_>1){var N={cause:p+","+g,reach:A};i(e,t,n,S.prev,C,N),d&&N.reach>d.reach&&(d.reach=N.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o"+a.content+""},r}(),we=ye;ye.default=ye,we.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},we.languages.markup.tag.inside["attr-value"].inside.entity=we.languages.markup.entity,we.languages.markup.doctype.inside["internal-subset"].inside=we.languages.markup,we.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(we.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:we.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:we.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},we.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(we.languages.markup.tag,"addAttribute",{value:function(e,t){we.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:we.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),we.languages.html=we.languages.markup,we.languages.mathml=we.languages.markup,we.languages.svg=we.languages.markup,we.languages.xml=we.languages.extend("markup",{}),we.languages.ssml=we.languages.xml,we.languages.atom=we.languages.xml,we.languages.rss=we.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},we.languages.c=we.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),we.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),we.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},we.languages.c.string],char:we.languages.c.char,comment:we.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:we.languages.c}}}}),we.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete we.languages.c.boolean,he=we,be=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,ve=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return be.source})),he.languages.cpp=he.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return be.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:be,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),he.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return ve}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),he.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:he.languages.cpp}}}}),he.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),he.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:he.languages.extend("cpp",{})}}),he.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},he.languages.cpp["base-clause"]),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(we),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(we),we.languages.javascript=we.languages.extend("clike",{"class-name":[we.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),we.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,we.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:we.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:we.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:we.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:we.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:we.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),we.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:we.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),we.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),we.languages.markup&&(we.languages.markup.tag.addInlined("script","javascript"),we.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),we.languages.js=we.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(we),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(we),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(we),we.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:we.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},we.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&m(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function c(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,s(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function u(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,u={},d=s(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(i++,r)););return u[n]=o,n})).join(""),n,r),p=Object.keys(u);return i=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[i],a="string"==typeof r?r:r.content,l=a.indexOf(o);if(-1!==l){++i;var s=a.substring(0,l),d=c(u[o]),m=a.substring(l+o.length),g=[];if(s&&g.push(s),g.push(d),m){var f=[m];e(f),g.push.apply(g,f)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(we),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(o);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&l(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(we),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(we),we.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},we.languages.go=we.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),we.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete we.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,m=t(r,u),g=p.indexOf(m);if(g>-1){++o;var f=p.substring(0,g),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(g+m.length),v=[];f&&v.push.apply(v,i([f])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof c?l.splice.apply(l,[s,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(we),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(we),we.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},we.languages.webmanifest=we.languages.json,we.languages.less=we.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),we.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),we.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},we.languages.objectivec=we.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete we.languages.objectivec["class-name"],we.languages.objc=we.languages.objectivec,we.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},we.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},we.languages.python["string-interpolation"].inside.interpolation.inside.rest=we.languages.python,we.languages.py=we.languages.python,we.languages.reason=we.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),we.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete we.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(we),we.languages.scss=we.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),we.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),we.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),we.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),we.languages.scss.atrule.inside.rest=we.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(we),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(we),we.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};var xe={Prism:we,theme:{plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]}};function Se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(){return Ce=Object.assign||function(e){for(var t=1;t0&&e[n-1]===t?e:e.concat(t)};function Re(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var Oe=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),Se(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=Ce({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=Ce({},n,{backgroundColor:null}),o}(e.theme,e.language):void 0;return t.themeDict=n})),Se(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,a=Ce({},Re(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),i=t.getThemeDict(t.props);return void 0!==i&&(a.style=i.plain),void 0!==o&&(a.style=void 0!==a.style?Ce({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a})),Se(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return a[n[0]];var i=r?{display:"inline-block"}:{},l=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[i].concat(l))}})),Se(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,a=e.token,i=Ce({},Re(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==o&&(i.style=void 0!==i.style?Ce({},i.style,o):o),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),Se(this,"tokenize",(function(e,t,n,r){var o={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",o);var a=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,a=this.getThemeDict(this.props),i=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],a=0,i=0,l=[],s=[l];i>-1;){for(;(a=r[i]++)0?u:["plain"],c=d):(u=_e(u,d.type),d.alias&&(u=_e(u,d.alias)),c=d.content),"string"==typeof c){var p=c.split(Ee),m=p.length;l.push({types:u,content:p[0]});for(var g=1;g({scrollArea:{},root:{position:"relative"},code:{boxSizing:"border-box",position:"relative",fontFamily:e.fontFamilyMonospace,lineHeight:1.7,fontSize:a(13),overflowX:n?"auto":void 0,borderRadius:e.fn.radius(o),padding:"".concat(e.spacing.sm," 0"),"&.mantine-Prism-code":{marginTop:0,marginBottom:0}},copy:{position:"absolute",top:e.spacing.xs,right:"ltr"===e.dir?e.spacing.xs:"unset",left:"rtl"===e.dir?e.spacing.xs:"unset",zIndex:2,"&, &:hover":{backgroundColor:"dark"===t?e.colors.dark[8]:e.colors.gray[0]}},line:{display:"flex",width:"100%",padding:"0 ".concat(e.spacing.md)},lineNumber:{color:"dark"===t?e.colors.dark[4]:e.colors.gray[4],textAlign:"right",width:"calc(8 * ".concat(a(r),")"),marginRight:"ltr"===e.dir?e.spacing.xs:void 0,marginLeft:"rtl"===e.dir?e.spacing.xs:void 0,userSelect:"none"},lineContent:{width:"100%"}})));var je=Object.defineProperty,Me=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,De=(e,t,n)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ze=(e,t)=>{for(var n in t||(t={}))Ne.call(t,n)&&De(e,n,t[n]);if(Te)for(var n of Te(t))Le.call(t,n)&&De(e,n,t[n]);return e},Be=(e,t)=>Me(e,Ae(t));const Ve={noCopy:!1,copyLabel:"Copy code",copiedLabel:"Copied",withLineNumbers:!1,trim:!0,highlightLines:{},scrollAreaComponent:c,getPrismTheme:(e,t)=>"dark"===t?(e=>({plain:{color:e.colors.gray[4],backgroundColor:e.colors.dark[8]},styles:[{types:["comment"],style:{color:e.colors.gray[6]}},{types:["string","inserted","selector","atrule"],style:{color:e.colors.teal[4]}},{types:["number"],style:{color:e.colors.blue[4]}},{types:["builtin","char","constant","function"],style:{color:e.colors.orange[5]}},{types:["punctuation"],style:{color:e.colors.gray[5]}},{types:["variable"],style:{color:e.colors.gray[5]}},{types:["class-name","attr-name"],style:{color:e.colors.yellow[5]}},{types:["tag","deleted"],style:{color:e.colors.red[6]}},{types:["operator"],style:{color:e.colors.gray[5]}},{types:["boolean"],style:{color:e.colors.red[6]}},{types:["keyword"],style:{color:e.colors.indigo[3]}},{types:["doctype"],style:{color:e.colors.gray[5]}},{types:["url"],style:{color:e.colors.gray[5]}}]}))(e):(e=>({plain:{color:e.colors.gray[9],backgroundColor:e.fn.rgba(e.colors.gray[0],.65)},styles:[{types:["comment"],style:{color:e.colors.gray[6]}},{types:["string","inserted"],style:{color:e.colors.indigo[9]}},{types:["number"],style:{color:e.colors.blue[7]}},{types:["builtin","char","constant","function","selector","atrule"],style:{color:e.colors.lime[9]}},{types:["punctuation"],style:{color:e.colors.gray[7]}},{types:["variable"],style:{color:e.colors.violet[9]}},{types:["attr-name"],style:{color:e.colors.green[9]}},{types:["class-name"],style:{color:e.colors.red[9]}},{types:["tag","deleted"],style:{color:e.colors.violet[9]}},{types:["operator"],style:{color:e.colors.red[9]}},{types:["boolean"],style:{color:e.colors.red[9]}},{types:["keyword"],style:{color:e.colors.red[9]}},{types:["doctype"],style:{color:e.colors.gray[7]}},{types:["url"],style:{color:e.colors.gray[7]}}]}))(e)},Ue=n.forwardRef(((e,t)=>{const n=i("Prism",Ve,e),{className:o,children:a,language:m,noCopy:g,classNames:f,styles:h,copyLabel:b,copiedLabel:v,withLineNumbers:y,highlightLines:w,scrollAreaComponent:x,colorScheme:S,trim:C,unstyled:E,radius:k,getPrismTheme:_,variant:R}=n,O=((e,t)=>{var n={};for(var r in e)Ne.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Te)for(var r of Te(e))t.indexOf(r)<0&&Le.call(e,r)&&(n[r]=e[r]);return n})(n,["className","children","language","noCopy","classNames","styles","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","colorScheme","trim","unstyled","radius","getPrismTheme","variant"]),I=C&&"string"==typeof a?a.trim():a,P=I.split("\n").length.toString().length,F=l(),j=s(),M=S||F.colorScheme,{classes:A,cx:T}=Fe({colorScheme:M,native:x!==c,maxLineSize:P,radius:k},{name:"Prism",classNames:f,styles:h,unstyled:E,variant:R});return r.createElement(u,Be(ze({className:T(A.root,o),ref:t},O),{translate:"no"}),!g&&r.createElement(d,{label:j.copied?v:b,position:"left",withArrow:!0,arrowSize:6,offset:6,color:j.copied?"teal":void 0,unstyled:E},r.createElement(p,{className:A.copy,"aria-label":j.copied?v:b,onClick:()=>j.copy(I),unstyled:E},r.createElement(Pe,{copied:j.copied}))),r.createElement(Ie,Be(ze({},xe),{theme:_(F,M),code:I,language:m}),(({className:e,style:t,tokens:n,getLineProps:o,getTokenProps:a})=>r.createElement(x,{className:A.scrollArea,dir:"ltr"},r.createElement("pre",{className:T(A.code,e),style:t,dir:"ltr"},n.map(((e,t)=>{var i,l,s,c;if(t===n.length-1&&1===e.length&&"\n"===e[0].content)return null;const u=t+1,d=o({line:e,key:t}),p=u in w,m="dark"===M?F.fn.rgba(F.fn.themeColor(null==(i=w[u])?void 0:i.color,9),.25):F.fn.themeColor(null==(l=w[u])?void 0:l.color,0);return r.createElement("div",Be(ze({},d),{className:T(A.line,d.className),style:ze({},p?{backgroundColor:m}:null)}),y&&r.createElement("div",{className:A.lineNumber,style:{color:p?F.fn.themeColor(null==(s=w[u])?void 0:s.color,"dark"===M?5:8):void 0}},(null==(c=w[u])?void 0:c.label)||u),r.createElement("div",{className:A.lineContent},e.map(((e,t)=>{var n,o;const i=a({token:e,key:t});return r.createElement("span",Be(ze({},i),{style:Be(ze({},i.style),{color:p?F.fn.themeColor(null==(n=w[u])?void 0:n.color,"dark"===M?5:8):null==(o=null==i?void 0:i.style)?void 0:o.color})}))}))))})).filter(Boolean))))))}));Ue.displayName="@mantine/prism/Prism";const Ge=o(((e,{radius:t})=>({tab:{paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,height:a(34),border:"".concat(a(1)," solid ").concat("dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[3]),borderBottom:0,fontSize:e.fontSizes.sm,color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[7],backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,borderRadius:0,"&:first-of-type":{borderTopLeftRadius:e.radius.sm},"&:not(:first-of-type)":{borderLeft:0},"&:last-of-type":{borderTopRightRadius:e.radius.sm},"&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0]},"&[data-active]":{color:"dark"===e.colorScheme?e.white:e.black,backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.fn.rgba(e.colors.gray[0],.65),"&::before":{backgroundColor:"transparent"}}},prism:{borderRadius:e.fn.radius(t),borderTopRightRadius:0,borderTopLeftRadius:0,border:"".concat(a(1)," solid ").concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]),borderTop:0,overflow:"hidden"},code:{borderTopRightRadius:0,borderTopLeftRadius:0,border:0}})));var He=Object.defineProperty,qe=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Xe=(e,t,n)=>t in e?He(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qe=(e,t)=>{for(var n in t||(t={}))Ke.call(t,n)&&Xe(e,n,t[n]);if(We)for(var n of We(t))Ye.call(t,n)&&Xe(e,n,t[n]);return e};const Ze=Ue;Ze.Tabs=function(e){const{classes:t}=Ge({radius:e.radius});return r.createElement(m,(n=Qe({},e),o={variant:"outline",classNames:{tab:t.tab},translate:"no"},qe(n,$e(o))));var n,o},Ze.Tab=m.Tab,Ze.TabsList=m.List,Ze.Panel=function(e){var t=e,{language:n,children:o,radius:a,noCopy:i,copyLabel:l,copiedLabel:s,withLineNumbers:c,highlightLines:u,scrollAreaComponent:d,trim:p,getPrismTheme:g,colorScheme:f,variant:h}=t,b=((e,t)=>{var n={};for(var r in e)Ke.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&We)for(var r of We(e))t.indexOf(r)<0&&Ye.call(e,r)&&(n[r]=e[r]);return n})(t,["language","children","radius","noCopy","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","trim","getPrismTheme","colorScheme","variant"]);const{classes:v}=Ge({radius:a});return r.createElement(m.Panel,Qe({},b),r.createElement(Ue,{language:n,classNames:{root:v.prism,code:v.code},radius:a,noCopy:i,copyLabel:l,copiedLabel:s,withLineNumbers:c,highlightLines:u,scrollAreaComponent:d,trim:p,getPrismTheme:g,colorScheme:f,variant:h},o))};var Je={exports:{}};function et(){}function tt(){}tt.resetWarningCache=et;Je.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:tt,resetWarningCache:et};return n.PropTypes=n,n}();const nt=g(Je.exports);var rt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ot=Object.defineProperty,at=Object.defineProperties,it=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,ut=(e,t,n)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dt=(e,t)=>{for(var n in t||(t={}))st.call(t,n)&&ut(e,n,t[n]);if(lt)for(var n of lt(t))ct.call(t,n)&&ut(e,n,t[n]);return e},pt=(e,t,r)=>{const o=n.forwardRef(((t,o)=>{var a,i,l=t,{color:s="currentColor",size:c=24,stroke:u=2,children:d}=l,p=((e,t)=>{var n={};for(var r in e)st.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&<)for(var r of lt(e))t.indexOf(r)<0&&ct.call(e,r)&&(n[r]=e[r]);return n})(l,["color","size","stroke","children"]);return n.createElement("svg",dt((a=dt({ref:o},rt),i={width:c,height:c,stroke:s,strokeWidth:u,className:"tabler-icon tabler-icon-".concat(e)},at(a,it(i))),p),[...r.map((([e,t])=>n.createElement(e,t))),...d||[]])}));return o.propTypes={color:nt.string,size:nt.oneOfType([nt.string,nt.number]),stroke:nt.oneOfType([nt.string,nt.number])},o.displayName="".concat(t),o},mt=pt("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),gt=pt("alert-triangle-filled","IconAlertTriangleFilled",[["path",{d:"M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),ft=pt("alert-triangle","IconAlertTriangle",[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),ht=pt("arrow-autofit-content","IconArrowAutofitContent",[["path",{d:"M6 4l-3 3l3 3",key:"svg-0"}],["path",{d:"M18 4l3 3l-3 3",key:"svg-1"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M10 7h-7",key:"svg-3"}],["path",{d:"M21 7h-7",key:"svg-4"}]]),bt=pt("arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]),vt=pt("baseline-density-large","IconBaselineDensityLarge",[["path",{d:"M4 4h16",key:"svg-0"}],["path",{d:"M4 20h16",key:"svg-1"}]]),yt=pt("baseline-density-medium","IconBaselineDensityMedium",[["path",{d:"M4 20h16",key:"svg-0"}],["path",{d:"M4 12h16",key:"svg-1"}],["path",{d:"M4 4h16",key:"svg-2"}]]),wt=pt("baseline-density-small","IconBaselineDensitySmall",[["path",{d:"M4 3h16",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M4 15h16",key:"svg-2"}],["path",{d:"M4 21h16",key:"svg-3"}]]),xt=pt("box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]),St=pt("box","IconBox",[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]]),Ct=pt("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),Et=pt("chevron-left-pipe","IconChevronLeftPipe",[["path",{d:"M7 6v12",key:"svg-0"}],["path",{d:"M18 6l-6 6l6 6",key:"svg-1"}]]),kt=pt("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),_t=pt("chevron-right-pipe","IconChevronRightPipe",[["path",{d:"M6 6l6 6l-6 6",key:"svg-0"}],["path",{d:"M17 5v13",key:"svg-1"}]]),Rt=pt("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),Ot=pt("chevrons-down","IconChevronsDown",[["path",{d:"M7 7l5 5l5 -5",key:"svg-0"}],["path",{d:"M7 13l5 5l5 -5",key:"svg-1"}]]),It=pt("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),Pt=pt("chevrons-right","IconChevronsRight",[["path",{d:"M7 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M13 7l5 5l-5 5",key:"svg-1"}]]),Ft=pt("circle-check","IconCircleCheck",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),jt=pt("circle-plus","IconCirclePlus",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]]),Mt=pt("circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]),At=pt("circle","IconCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}]]),Tt=pt("clear-all","IconClearAll",[["path",{d:"M8 6h12",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M4 18h12",key:"svg-2"}]]),Nt=pt("clipboard","IconClipboard",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}]]),Lt=pt("columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]),Dt=pt("database","IconDatabase",[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]]),zt=pt("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),Bt=pt("dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Vt=pt("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Ut=pt("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),Gt=pt("external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]),Ht=pt("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),qt=pt("filter-cog","IconFilterCog",[["path",{d:"M12 20l-3 1v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19.001 15.5v1.5",key:"svg-2"}],["path",{d:"M19.001 21v1.5",key:"svg-3"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-4"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-5"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-6"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-7"}]]),$t=pt("filter-off","IconFilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),Wt=pt("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]),Kt=pt("forms","IconForms",[["path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",key:"svg-0"}],["path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",key:"svg-1"}],["path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",key:"svg-2"}],["path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",key:"svg-3"}],["path",{d:"M17 12h.01",key:"svg-4"}],["path",{d:"M13 12h.01",key:"svg-5"}]]),Yt=pt("grip-horizontal","IconGripHorizontal",[["path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),Xt=pt("info-circle-filled","IconInfoCircleFilled",[["path",{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),Qt=pt("list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]),Zt=pt("maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),Jt=pt("minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),en=pt("pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]),tn=pt("pinned","IconPinned",[["path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6",key:"svg-0"}],["path",{d:"M12 16l0 5",key:"svg-1"}],["path",{d:"M8 4l8 0",key:"svg-2"}]]),nn=pt("refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]),rn=pt("row-insert-bottom","IconRowInsertBottom",[["path",{d:"M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1z",key:"svg-0"}],["path",{d:"M12 15l0 4",key:"svg-1"}],["path",{d:"M14 17l-4 0",key:"svg-2"}]]),on=pt("search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),an=pt("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),ln=pt("sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),sn=pt("sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),cn=pt("stack-2","IconStack2",[["path",{d:"M12 4l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 12l8 4l8 -4",key:"svg-1"}],["path",{d:"M4 16l8 4l8 -4",key:"svg-2"}]]),un=pt("stack-3","IconStack3",[["path",{d:"M12 2l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 10l8 4l8 -4",key:"svg-1"}],["path",{d:"M4 18l8 4l8 -4",key:"svg-2"}],["path",{d:"M4 14l8 4l8 -4",key:"svg-3"}]]),dn=pt("stack","IconStack",[["path",{d:"M12 6l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 14l8 4l8 -4",key:"svg-1"}]]),pn=pt("trash-x","IconTrashX",[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]]),mn=pt("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),gn=pt("window-maximize","IconWindowMaximize",[["path",{d:"M3 16m0 1a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6",key:"svg-1"}],["path",{d:"M12 8h4v4",key:"svg-2"}],["path",{d:"M16 8l-5 5",key:"svg-3"}]]),fn=pt("window-minimize","IconWindowMinimize",[["path",{d:"M3 16m0 1a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6",key:"svg-1"}],["path",{d:"M15 13h-4v-4",key:"svg-2"}],["path",{d:"M11 13l5 -5",key:"svg-3"}]]),hn=pt("world","IconWorld",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]]),bn=pt("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function vn(e,t){return null!=e&&t in Object(e)}function yn(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map((function(e){if("constructor"===e||"__proto__"===e||"prototype"===e)return{};var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,"$1")}}))}function wn(e,t,n){var r=e,o=null;n=void 0===n?t.length:n;for(var a=0;a1?wn(e,n,n.length-1):e,name:r.p||r.i,value:wn(e,n)};return o.exists=vn(o.parent,o.name),o}var Sn={hasProperty:vn,getPathInfo:xn,getPathValue:function(e,t){return xn(e,t).value},setPathValue:function(e,t,n){return function(e,t,n){for(var r=e,o=n.length,a=null,i=0;i{const{translations:t={}}=e,n=t[a]||r;if(null==n)throw new Error('Translation dictionary for locale "'.concat(a,'" not provided.'));const o=Object.freeze(Object.keys(t)),l=function(e){const t=(e,t)=>{const n=t?t.n:void 0;if(null!=n){const{name:t,parent:r}=e;if(0==n&&Sn.hasProperty(r,"".concat(t,"_zero")))return r["".concat(t,"_zero")];if((n>1||n<1)&&Sn.hasProperty(r,"".concat(t,"_plural")))return r["".concat(t,"_plural")]}return e.value},n=/{{1,2}(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}{1,2}/gi;return(r,o)=>{const a=Sn.getPathInfo(e,r),i=a.exists?t(a,o):r;return o?"".concat(i).replace(n,((e,t)=>{var n;return"".concat(null!=(n=o[t])?n:"")})):i}}(n);return{availableLocale:o,locale:a,setLocale:i,t:l,translate:l}}),[a]);return n.createElement(o.Provider,{value:l},e.children)},TranslationConsumer:e=>n.createElement(o.Consumer,void 0,(t=>{if(void 0===t)throw new Error("TranslationConsumer must be used within a TranslationProvider.");return e.children(t)})),useTranslation:a,withTranslation(e){const t=t=>{const r=a();return n.createElement(e,{...r,...t},t.children)};return t.displayName="".concat(e.displayName||e.name,"WithTranslation"),t}}}function En(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:jn(e)?2:Mn(e)?3:0}function In(e,t){return 2===On(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n){var r=On(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Fn(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function jn(e){return ir&&e instanceof Map}function Mn(e){return lr&&e instanceof Set}function An(e){return e.o||e.t}function Tn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=gr(e);delete t[dr];for(var n=mr(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Ln),Object.freeze(e),t&&Rn(e,(function(e,t){return Nn(t,!0)}),!0)),e}function Ln(){En(2)}function Dn(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function zn(e){var t=fr[e];return t||En(18,e),t}function Bn(){return or}function Vn(e,t){t&&(zn("Patches"),e.u=[],e.s=[],e.v=t)}function Un(e){Gn(e),e.p.forEach(qn),e.p=null}function Gn(e){e===or&&(or=e.l)}function Hn(e){return or={p:[],l:or,h:e,m:!0,_:0}}function qn(e){var t=e[dr];0===t.i||1===t.i?t.j():t.g=!0}function $n(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||zn("ES5").S(t,e,r),r?(n[dr].P&&(Un(t),En(4)),_n(e)&&(e=Wn(t,e),t.l||Yn(t,e)),t.u&&zn("Patches").M(n[dr].t,e,t.u,t.s)):e=Wn(t,n,[]),Un(t),t.u&&t.v(t.u,t.s),e!==cr?e:void 0}function Wn(e,t,n){if(Dn(t))return t;var r=t[dr];if(!r)return Rn(t,(function(o,a){return Kn(e,r,t,o,a,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Yn(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=Tn(r.k):r.o,a=o,i=!1;3===r.i&&(a=new Set(o),o.clear(),i=!0),Rn(a,(function(t,a){return Kn(e,r,o,t,a,n,i)})),Yn(e,o,!1),n&&e.u&&zn("Patches").N(r,n,e.u,e.s)}return r.o}function Kn(e,t,n,r,o,a,i){if(kn(o)){var l=Wn(e,o,a&&t&&3!==t.i&&!In(t.R,r)?a.concat(r):void 0);if(Pn(n,r,l),!kn(l))return;e.m=!1}else i&&n.add(o);if(_n(o)&&!Dn(o)){if(!e.h.D&&e._<1)return;Wn(e,o),t&&t.A.l||Yn(e,o)}}function Yn(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&Nn(t,n)}function Xn(e,t){var n=e[dr];return(n?An(n):e)[t]}function Qn(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Zn(e){e.P||(e.P=!0,e.l&&Zn(e.l))}function Jn(e){e.o||(e.o=Tn(e.t))}function er(e,t,n){var r=jn(t)?zn("MapSet").F(t,n):Mn(t)?zn("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Bn(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,a=hr;n&&(o=[r],a=br);var i=Proxy.revocable(o,a),l=i.revoke,s=i.proxy;return r.k=s,r.j=l,s}(t,n):zn("ES5").J(t,n);return(n?n.A:Bn()).p.push(r),r}function tr(e){return kn(e)||En(22,e),function e(t){if(!_n(t))return t;var n,r=t[dr],o=On(t);if(r){if(!r.P&&(r.i<4||!zn("ES5").K(r)))return r.t;r.I=!0,n=nr(t,o),r.I=!1}else n=nr(t,o);return Rn(n,(function(t,o){r&&function(e,t){return 2===On(e)?e.get(t):e[t]}(r.t,t)===o||Pn(n,t,e(o))})),3===o?new Set(n):n}(e)}function nr(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Tn(e)}var rr,or,ar="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ir="undefined"!=typeof Map,lr="undefined"!=typeof Set,sr="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,cr=ar?Symbol.for("immer-nothing"):((rr={})["immer-nothing"]=!0,rr),ur=ar?Symbol.for("immer-draftable"):"__$immer_draftable",dr=ar?Symbol.for("immer-state"):"__$immer_state",pr=""+Object.prototype.constructor,mr="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,gr=Object.getOwnPropertyDescriptors||function(e){var t={};return mr(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},fr={},hr={get:function(e,t){if(t===dr)return e;var n,r,o,a=An(e);if(!In(a,t))return n=e,(o=Qn(a,t))?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var i=a[t];return e.I||!_n(i)?i:i===Xn(e.t,t)?(Jn(e),e.o[t]=er(e.A.h,i,e)):i},has:function(e,t){return t in An(e)},ownKeys:function(e){return Reflect.ownKeys(An(e))},set:function(e,t,n){var r=Qn(An(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Xn(An(e),t),a=null==o?void 0:o[dr];if(a&&a.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Fn(n,o)&&(void 0!==n||In(e.t,t)))return!0;Jn(e),Zn(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==Xn(e.t,t)||t in e.t?(e.R[t]=!1,Jn(e),Zn(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=An(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){En(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){En(12)}},br={};Rn(hr,(function(e,t){br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),br.deleteProperty=function(e,t){return br.set.call(this,e,t,void 0)},br.set=function(e,t,n){return hr.set.call(this,e[0],t,n,e[0])};var vr=new(function(){function e(e){var t=this;this.O=sr,this.D=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,i=Array(r>1?r-1:0),l=1;l1?r-1:0),a=1;a=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=zn("Patches").$;return kn(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),yr=vr.produce;function wr(e){return(wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xr(e){var t=function(e,t){if("object"!=wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wr(t)?t:t+""}function Sr(e,t,n){return(t=xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Er(e){for(var t=1;t-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return Ar}return{get:r,put:function(t,o){r(t)===Ar&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(s,u);function p(){var t=d.get(arguments);if(t===Ar){if(t=e.apply(null,arguments),c){var n=d.getEntries().find((function(e){return c(e.value,t)}));n&&(t=n.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p}function Lr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0;t--){var o=e[t][dr];if(!o.P)switch(o.i){case 5:r(o)&&Zn(o);break;case 4:n(o)&&Zn(o)}}}function n(e){for(var t=e.t,n=e.k,r=mr(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==dr){var i=t[a];if(void 0===i&&!In(t,a))return!0;var l=n[a],s=l&&l[dr];if(s?s.t!==i:!Fn(l,i))return!0}}var c=!!t[dr];return r.length!==mr(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r({code:e,name:sa.getName(e),nativeName:sa.getNativeName(e)})))}static getName(e){return sa.validate(e)?la[e].name:""}static getAllNames(){return Object.values(la).map((e=>e.name))}static getNativeName(e){return sa.validate(e)?la[e].nativeName:""}static getAllNativeNames(){return Object.values(la).map((e=>e.nativeName))}static getCode(e){return Object.keys(la).find((t=>{const n=la[t];return n.name.toLowerCase()===e.toLowerCase()||n.nativeName.toLowerCase()===e.toLowerCase()}))||""}static getAllCodes(){return Object.keys(la)}static validate(e){return la.hasOwnProperty(e)}}const ca=(e,t={})=>{const{sorted:n,ignorenull:r,ignoreEmptyArray:o,useDot:a,skipIndex:i,skipBracket:l,whitespace:s="+"}=t,c=e=>String(e).replace(/[^ !'()~*]/gu,encodeURIComponent).replace(/ /g,s).replace(/[!'()~*]/g,(e=>"%".concat(e.charCodeAt().toString(16).slice(-2).toUpperCase()))),u=(e,t=Object.keys(e))=>n?t.sort():t,d=e=>e.filter((e=>e)).join("&"),p=(e,t,n=typeof t,s=null)=>(t===s?s=r?s:c(e)+"="+s:/string|number|boolean/.test(n)?s=c(e)+"="+c(t):Array.isArray(t)?s=((e,t,n=(l?"":"[]"))=>t.length?d(t.map(((t,r)=>p(i?e+n:e+"["+r+"]",t)))):o?null:c(e+n))(e,t):t instanceof Set?s=((e,t)=>d(Array.from(t).map((t=>p(e,t)))))(e,t):"object"===n&&(s=((e,t)=>d(u(t).map((n=>p(a?"".concat(e,".").concat(n):"".concat(e,"[").concat(n,"]"),t[n])))))(e,t)),s);return e&&d(u(e).map((t=>p(t,e[t]))))};function ua(e,t){return function(){return e.apply(t,arguments)}}const{toString:da}=Object.prototype,{getPrototypeOf:pa}=Object,ma=(ga=Object.create(null),e=>{const t=da.call(e);return ga[t]||(ga[t]=t.slice(8,-1).toLowerCase())});var ga;const fa=e=>(e=e.toLowerCase(),t=>ma(t)===e),ha=e=>t=>typeof t===e,{isArray:ba}=Array,va=ha("undefined");const ya=fa("ArrayBuffer");const wa=ha("string"),xa=ha("function"),Sa=ha("number"),Ca=e=>null!==e&&"object"==typeof e,Ea=e=>{if("object"!==ma(e))return!1;const t=pa(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ka=fa("Date"),_a=fa("File"),Ra=fa("Blob"),Oa=fa("FileList"),Ia=fa("URLSearchParams"),[Pa,Fa,ja,Ma]=["ReadableStream","Request","Response","Headers"].map(fa);function Aa(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ba(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Na="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,La=e=>!va(e)&&e!==Na;const Da=(za="undefined"!=typeof Uint8Array&&pa(Uint8Array),e=>za&&e instanceof za);var za;const Ba=fa("HTMLFormElement"),Va=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ua=fa("RegExp"),Ga=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Aa(n,((n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},Ha="abcdefghijklmnopqrstuvwxyz",qa="0123456789",$a={DIGIT:qa,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+qa};const Wa=fa("AsyncFunction"),Ka={isArray:ba,isArrayBuffer:ya,isBuffer:function(e){return null!==e&&!va(e)&&null!==e.constructor&&!va(e.constructor)&&xa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||xa(e.append)&&("formdata"===(t=ma(e))||"object"===t&&xa(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ya(e.buffer),t},isString:wa,isNumber:Sa,isBoolean:e=>!0===e||!1===e,isObject:Ca,isPlainObject:Ea,isReadableStream:Pa,isRequest:Fa,isResponse:ja,isHeaders:Ma,isUndefined:va,isDate:ka,isFile:_a,isBlob:Ra,isRegExp:Ua,isFunction:xa,isStream:e=>Ca(e)&&xa(e.pipe),isURLSearchParams:Ia,isTypedArray:Da,isFileList:Oa,forEach:Aa,merge:function e(){const{caseless:t}=La(this)&&this||{},n={},r=(r,o)=>{const a=t&&Ta(n,o)||o;Ea(n[a])&&Ea(r)?n[a]=e(n[a],r):Ea(r)?n[a]=e({},r):ba(r)?n[a]=r.slice():n[a]=r};for(let o=0,a=arguments.length;o(Aa(t,((t,r)=>{n&&xa(t)?e[r]=ua(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&pa(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ma,kindOfTest:fa,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ba(e))return e;let t=e.length;if(!Sa(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Ba,hasOwnProperty:Va,hasOwnProp:Va,reduceDescriptors:Ga,freezeMethods:e=>{Ga(e,((t,n)=>{if(xa(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];xa(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return ba(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ta,global:Na,isContextDefined:La,ALPHABET:$a,generateString:(e=16,t=$a.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&xa(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ca(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ba(e)?[]:{};return Aa(e,((e,t)=>{const a=n(e,r+1);!va(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Wa,isThenable:e=>e&&(Ca(e)||xa(e))&&xa(e.then)&&xa(e.catch)};function Ya(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Ka.inherits(Ya,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ka.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Xa=Ya.prototype,Qa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Qa[e]={value:e}})),Object.defineProperties(Ya,Qa),Object.defineProperty(Xa,"isAxiosError",{value:!0}),Ya.from=(e,t,n,r,o,a)=>{const i=Object.create(Xa);return Ka.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ya.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};function Za(e){return Ka.isPlainObject(e)||Ka.isArray(e)}function Ja(e){return Ka.endsWith(e,"[]")?e.slice(0,-2):e}function ei(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ja(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ti=Ka.toFlatObject(Ka,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ni(e,t,n){if(!Ka.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ka.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ka.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,a=n.dots,i=n.indexes,l=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ka.isSpecCompliantForm(t);if(!Ka.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(Ka.isDate(e))return e.toISOString();if(!l&&Ka.isBlob(e))throw new Ya("Blob is not supported. Use a Buffer instead.");return Ka.isArrayBuffer(e)||Ka.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let l=e;if(e&&!o&&"object"==typeof e)if(Ka.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ka.isArray(e)&&function(e){return Ka.isArray(e)&&!e.some(Za)}(e)||(Ka.isFileList(e)||Ka.endsWith(n,"[]"))&&(l=Ka.toArray(e)))return n=Ja(n),l.forEach((function(e,r){!Ka.isUndefined(e)&&null!==e&&t.append(!0===i?ei([n],r,a):null===i?n:n+"[]",s(e))})),!1;return!!Za(e)||(t.append(ei(o,n,a),s(e)),!1)}const u=[],d=Object.assign(ti,{defaultVisitor:c,convertValue:s,isVisitable:Za});if(!Ka.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ka.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ka.forEach(n,(function(n,a){!0===(!(Ka.isUndefined(n)||null===n)&&o.call(t,n,Ka.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t}function ri(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function oi(e,t){this._pairs=[],e&&ni(e,this,t)}const ai=oi.prototype;function ii(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function li(e,t,n){if(!t)return e;const r=n&&n.encode||ii,o=n&&n.serialize;let a;if(a=o?o(t,n):Ka.isURLSearchParams(t)?t.toString():new oi(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}ai.append=function(e,t){this._pairs.push([e,t])},ai.toString=function(e){const t=e?function(t){return e.call(this,t,ri)}:ri;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const si=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ka.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ci={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ui={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oi,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},di="undefined"!=typeof window&&"undefined"!=typeof document,pi=(mi="undefined"!=typeof navigator&&navigator.product,di&&["ReactNative","NativeScript","NS"].indexOf(mi)<0);var mi;const gi="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fi=di&&window.location.href||"http://localhost",hi={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:di,hasStandardBrowserEnv:pi,hasStandardBrowserWebWorkerEnv:gi,origin:fi},Symbol.toStringTag,{value:"Module"})),...ui};function bi(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),l=o>=e.length;if(a=!a&&Ka.isArray(r)?r.length:a,l)return Ka.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i;r[a]&&Ka.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&Ka.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r{t(function(e){return Ka.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const vi={transitional:ci,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ka.isObject(e);o&&Ka.isHTMLForm(e)&&(e=new FormData(e));if(Ka.isFormData(e))return r?JSON.stringify(bi(e)):e;if(Ka.isArrayBuffer(e)||Ka.isBuffer(e)||Ka.isStream(e)||Ka.isFile(e)||Ka.isBlob(e)||Ka.isReadableStream(e))return e;if(Ka.isArrayBufferView(e))return e.buffer;if(Ka.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ni(e,new hi.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return hi.isNode&&Ka.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=Ka.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ni(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ka.isString(e))try{return(t||JSON.parse)(e),Ka.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||vi.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ka.isResponse(e)||Ka.isReadableStream(e))return e;if(e&&Ka.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw Ya.from(o,Ya.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:hi.classes.FormData,Blob:hi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ka.forEach(["delete","get","head","post","put","patch"],(e=>{vi.headers[e]={}}));const yi=vi,wi=Ka.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xi=Symbol("internals");function Si(e){return e&&String(e).trim().toLowerCase()}function Ci(e){return!1===e||null==e?e:Ka.isArray(e)?e.map(Ci):String(e)}function Ei(e,t,n,r,o){return Ka.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ka.isString(t)?Ka.isString(r)?-1!==t.indexOf(r):Ka.isRegExp(r)?r.test(t):void 0:void 0)}class ki{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Si(t);if(!o)throw new Error("header name must be a non-empty string");const a=Ka.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Ci(e))}const a=(e,t)=>Ka.forEach(e,((e,n)=>o(e,n,t)));if(Ka.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Ka.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&wi[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Ka.isHeaders(e))for(const[i,l]of e.entries())o(l,i,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Si(e)){const n=Ka.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ka.isFunction(t))return t.call(this,e,n);if(Ka.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Si(e)){const n=Ka.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ei(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Si(e)){const o=Ka.findKey(n,e);!o||t&&!Ei(0,n[o],o,t)||(delete n[o],r=!0)}}return Ka.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ei(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ka.forEach(this,((r,o)=>{const a=Ka.findKey(n,o);if(a)return t[a]=Ci(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=Ci(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ka.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ka.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[xi]=this[xi]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Si(e);t[r]||(!function(e,t){const n=Ka.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Ka.isArray(e)?e.forEach(r):r(e),this}}ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ka.reduceDescriptors(ki.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ka.freezeMethods(ki);const _i=ki;function Ri(e,t){const n=this||yi,r=t||n,o=_i.from(r.headers);let a=r.data;return Ka.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function Oi(e){return!(!e||!e.__CANCEL__)}function Ii(e,t,n){Ya.call(this,null==e?"canceled":e,Ya.ERR_CANCELED,t,n),this.name="CanceledError"}function Pi(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ya("Request failed with status code "+n.status,[Ya.ERR_BAD_REQUEST,Ya.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Ka.inherits(Ii,Ya,{__CANCEL__:!0});const Fi=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(l){const s=Date.now(),c=r[i];o||(o=s),n[a]=l,r[a]=s;let u=i,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-or)return o&&(clearTimeout(o),o=null),n=a,e.apply(null,arguments);o||(o=setTimeout((()=>(o=null,n=Date.now(),e.apply(null,arguments))),r-(a-n)))}}((n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,l=a-r,s=o(l);r=a;const c={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:s||void 0,estimated:s&&i&&a<=i?(i-a)/s:void 0,event:n,lengthComputable:null!=i};c[t?"download":"upload"]=!0,e(c)}),n)},ji=hi.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Ka.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Mi=hi.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];Ka.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Ka.isString(r)&&i.push("path="+r),Ka.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ai(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ti=e=>e instanceof _i?{...e}:e;function Ni(e,t){t=t||{};const n={};function r(e,t,n){return Ka.isPlainObject(e)&&Ka.isPlainObject(t)?Ka.merge.call({caseless:n},e,t):Ka.isPlainObject(t)?Ka.merge({},t):Ka.isArray(t)?t.slice():t}function o(e,t,n){return Ka.isUndefined(t)?Ka.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!Ka.isUndefined(t))return r(void 0,t)}function i(e,t){return Ka.isUndefined(t)?Ka.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function l(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const s={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(e,t)=>o(Ti(e),Ti(t),!0)};return Ka.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=s[r]||o,i=a(e[r],t[r],r);Ka.isUndefined(i)&&a!==l||(n[r]=i)})),n}const Li=e=>{const t=Ni({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:s}=t;if(t.headers=l=_i.from(l),t.url=li(Ai(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Ka.isFormData(r))if(hi.hasStandardBrowserEnv||hi.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(hi.hasStandardBrowserEnv&&(o&&Ka.isFunction(o)&&(o=o(t)),o||!1!==o&&ji(t.url))){const e=a&&i&&Mi.read(i);e&&l.set(a,e)}return t},Di="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Li(e);let o=r.data;const a=_i.from(r.headers).normalize();let i,{responseType:l}=r;function s(){r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let c=new XMLHttpRequest;function u(){if(!c)return;const r=_i.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());Pi((function(e){t(e),s()}),(function(e){n(e),s()}),{data:l&&"text"!==l&&"json"!==l?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout,"onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(u)},c.onabort=function(){c&&(n(new Ya("Request aborted",Ya.ECONNABORTED,r,c)),c=null)},c.onerror=function(){n(new Ya("Network Error",Ya.ERR_NETWORK,r,c)),c=null},c.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const t=r.transitional||ci;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new Ya(e,t.clarifyTimeoutError?Ya.ETIMEDOUT:Ya.ECONNABORTED,r,c)),c=null},void 0===o&&a.setContentType(null),"setRequestHeader"in c&&Ka.forEach(a.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),Ka.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),l&&"json"!==l&&(c.responseType=r.responseType),"function"==typeof r.onDownloadProgress&&c.addEventListener("progress",Fi(r.onDownloadProgress,!0)),"function"==typeof r.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Fi(r.onUploadProgress)),(r.cancelToken||r.signal)&&(i=t=>{c&&(n(!t||t.type?new Ii(null,e,c):t),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);d&&-1===hi.protocols.indexOf(d)?n(new Ya("Unsupported protocol "+d+":",Ya.ERR_BAD_REQUEST,e)):c.send(o||null)}))},zi=(e,t)=>{let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ya?t:new Ii(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{o(new Ya("timeout ".concat(t," of ms exceeded"),Ya.ETIMEDOUT))}),t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",o):e.unsubscribe(o))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",o)));const{signal:l}=r;return l.unsubscribe=i,[l,()=>{a&&clearTimeout(a),a=null}]},Bi=function*(e,t){let n=e.byteLength;if(!t||n{const a=async function*(e,t,n){for await(const r of e)yield*Bi(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,o);let i=0;return new ReadableStream({type:"bytes",async pull(e){const{done:t,value:o}=await a.next();if(t)return e.close(),void r();let l=o.byteLength;n&&n(i+=l),e.enqueue(new Uint8Array(o))},cancel:e=>(r(e),a.return())},{highWaterMark:2})},Ui=(e,t)=>{const n=null!=e;return r=>setTimeout((()=>t({lengthComputable:n,total:e,loaded:r})))},Gi="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Hi=Gi&&"function"==typeof ReadableStream,qi=Gi&&("function"==typeof TextEncoder?($i=new TextEncoder,e=>$i.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $i;const Wi=Hi&&(()=>{let e=!1;const t=new Request(hi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Ki=Hi&&!!(()=>{try{return Ka.isReadableStream(new Response("").body)}catch(e){}})(),Yi={stream:Ki&&(e=>e.body)};var Xi;Gi&&(Xi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Yi[e]&&(Yi[e]=Ka.isFunction(Xi[e])?t=>t[e]():(t,n)=>{throw new Ya("Response type '".concat(e,"' is not supported"),Ya.ERR_NOT_SUPPORT,n)})})));const Qi=async(e,t)=>{const n=Ka.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:Ka.isBlob(e)?e.size:Ka.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Ka.isArrayBufferView(e)?e.byteLength:(Ka.isURLSearchParams(e)&&(e+=""),Ka.isString(e)?(await qi(e)).byteLength:void 0))(t):n},Zi={http:null,xhr:Di,fetch:Gi&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:s,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Li(e);c=c?(c+"").toLowerCase():"text";let m,g,[f,h]=o||a||i?zi([o,a],i):[];const b=()=>{!m&&setTimeout((()=>{f&&f.unsubscribe()})),m=!0};let v;try{if(s&&Wi&&"get"!==n&&"head"!==n&&0!==(v=await Qi(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});Ka.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body&&(r=Vi(n.body,65536,Ui(v,Fi(s)),null,qi))}Ka.isString(d)||(d=d?"cors":"omit"),g=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let o=await fetch(g);const a=Ki&&("stream"===c||"response"===c);if(Ki&&(l||a)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Ka.toFiniteNumber(o.headers.get("content-length"));o=new Response(Vi(o.body,65536,l&&Ui(t,Fi(l,!0)),a&&b,qi),e)}c=c||"text";let i=await Yi[Ka.findKey(Yi,c)||"text"](o,e);return!a&&b(),h&&h(),await new Promise(((t,n)=>{Pi(t,n,{data:i,headers:_i.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:g})}))}catch(y){if(b(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new Ya("Network Error",Ya.ERR_NETWORK,e,g),{cause:y.cause||y});throw Ya.from(y,y&&y.code,e,g)}})};Ka.forEach(Zi,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ji=e=>"- ".concat(e),el=e=>Ka.isFunction(e)||null===e||!1===e,tl=e=>{e=Ka.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a"adapter ".concat(e," ")+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Ya("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ji).join("\n"):" "+Ji(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function nl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ii(null,e)}function rl(e){nl(e),e.headers=_i.from(e.headers),e.data=Ri.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return tl(e.adapter||yi.adapter)(e).then((function(t){return nl(e),t.data=Ri.call(e,e.transformResponse,t),t.headers=_i.from(t.headers),t}),(function(t){return Oi(t)||(nl(e),t&&t.response&&(t.response.data=Ri.call(e,e.transformResponse,t.response),t.response.headers=_i.from(t.response.headers))),Promise.reject(t)}))}const ol="1.7.2",al={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{al[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const il={};al.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new Ya(r(o," has been removed"+(t?" in "+t:"")),Ya.ERR_DEPRECATED);return t&&!il[o]&&(il[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};const ll={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ya("options must be an object",Ya.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new Ya("option "+a+" must be "+n,Ya.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ya("Unknown option "+a,Ya.ERR_BAD_OPTION)}},validators:al},sl=ll.validators;let cl=class{constructor(e){this.defaults=e,this.interceptors={request:new si,response:new si}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ni(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ll.assertOptions(n,{silentJSONParsing:sl.transitional(sl.boolean),forcedJSONParsing:sl.transitional(sl.boolean),clarifyTimeoutError:sl.transitional(sl.boolean)},!1),null!=r&&(Ka.isFunction(r)?t.paramsSerializer={serialize:r}:ll.assertOptions(r,{encode:sl.function,serialize:sl.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&Ka.merge(o.common,o[t.method]);o&&Ka.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=_i.concat(a,o);const i=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const s=[];let c;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,d=0;if(!l){const e=[rl.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,s),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ii(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new dl((function(t){e=t})),cancel:e}}}const pl=dl;const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ml).forEach((([e,t])=>{ml[t]=e}));const gl=ml;const fl=function e(t){const n=new ul(t),r=ua(ul.prototype.request,n);return Ka.extend(r,ul.prototype,n,{allOwnKeys:!0}),Ka.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ni(t,n))},r}(yi);fl.Axios=ul,fl.CanceledError=Ii,fl.CancelToken=pl,fl.isCancel=Oi,fl.VERSION=ol,fl.toFormData=ni,fl.AxiosError=Ya,fl.Cancel=fl.CanceledError,fl.all=function(e){return Promise.all(e)},fl.spread=function(e){return function(t){return e.apply(null,t)}},fl.isAxiosError=function(e){return Ka.isObject(e)&&!0===e.isAxiosError},fl.mergeConfig=Ni,fl.AxiosHeaders=_i,fl.formToJSON=e=>bi(Ka.isHTMLForm(e)?new FormData(e):e),fl.getAdapter=tl,fl.HttpStatusCode=gl,fl.default=fl;const hl=fl;var bl,vl,yl,wl={exports:{}};vl=h,yl=function(){return function(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=r0?"?":"")+i.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},(bl=wl).exports?bl.exports=yl():vl.urljoin=yl();const xl=g(wl.exports),Sl=e=>{const t=/^([^"=]*)=([\s\S]*)/,n=/([^[]*)\[([^"\]]*)?\]([\s\S]*)?/,r=/[^=]*\?([\s\S]*)/,o=/^([^"&]*)&([\s\S]*)/,a=/^(true|false)$/,i=/#.*$/,l=/^\d*$/,s=e=>Number.isNaN(+e)?a.test(e)?"true"===e:"null"!==e&&e?e:null:+e,c=(e,[t,r,o],a=t.match(n))=>(a?([,t,o]=a,o=l.test(o)?parseInt(o,10):o,e[t]=e[t]||(/undefined|number/.test(typeof o)?[]:{}),o=/string|number/.test(typeof o)?o:e[t].length,a[3]?e[t]=c(e[t],[o+a[3],r]):r&&(e[t][o]=s(r))):r&&(e[t]=s(r)),e),u=(e,t=[],n=e.match(o))=>(n?t=u(n[2],t.concat(n[1])):e&&(t=t.concat(e)),t);return"string"==typeof e?u((e=>decodeURIComponent(e.replace(/\+/g," ")))((e=>e.replace(i,""))((d=e,d.replace(r,((e,t)=>t)))))).reduce(((e,n)=>c(e,((e,n=e.match(t))=>n?n.slice(1):[e])(n))),{}):{};var d}; +/*! + * @module @datawheel/olap-client + * @version 2.1.6 (rev f191395) + * @copyright Datawheel, LLC + * @license MIT + * @see {@link https://github.com/Datawheel/olap-client} + */ +var Cl=class{constructor(e){this.store=new Map,this.filled=!1,this.keygen=e}declareFilled(){this.filled=!0}getAllItems(e){const t=this.filled?[...this.store.values()]:e();return Promise.resolve(t).then((e=>{const t=this.keygen;return this.filled=!0,this.store=new Map(e.map((e=>[t(e),e]))),e}))}getItem(e,t){const n=this.store.get(e)||t();return Promise.resolve(n).then((e=>(this.store.set(this.keygen(e),e),e)))}getKeygen(){return this.keygen}};function El(e,t){t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((n=>{if("constructor"!==n){const r=Object.getOwnPropertyDescriptor(t.prototype,n);r&&Object.defineProperty(e.prototype,n,r)}}))}))}var kl=class{get annotations(){return this._source.annotations}getAnnotation(e,t){const n=this._source.annotations[e];if(void 0!==n)return n;if(void 0!==t)return t;throw new Error("Annotation ".concat(e," does not exist in ").concat(this.constructor.name," ").concat(this,"."))}getLocaleAnnotation(e,t,n){const r=this._source.annotations["".concat(e,"_").concat(t)];return void 0!==r?r:this.getAnnotation(e,n)}},_l=class{get caption(){return this._source.caption||this._source.name}get fullName(){return this._source.fullName||this._source.name}get name(){return this._source.name}},Rl=class{toJSON(){return this._source}toString(){return this._source.uri}},Ol=(e=>(e.avg="AVG",e.AVG="AVG",e.count="COUNT",e.COUNT="COUNT",e.max="MAX",e.MAX="MAX",e.min="MIN",e.MIN="MIN",e.sum="SUM",e.SUM="SUM",e.unknown="UNKNOWN",e.UNKNOWN="UNKNOWN",e))(Ol||{}),Il=(e=>(e.growth="growth",e.GROWTH="growth",e.rate="rate",e.RATE="rate",e.rca="rca",e.RCA="rca",e.topk="topk",e.TOPK="topk",e))(Il||{}),Pl=(e=>(e["!="]="neq",e["<"]="lt",e["<="]="lte",e["<>"]="neq",e["="]="eq",e[">"]="gt",e[">="]="gte",e.eq="eq",e.EQ="eq",e.gt="gt",e.GT="gt",e.gte="gte",e.GTE="gte",e.lt="lt",e.LT="lt",e.lte="lte",e.LTE="lte",e.NEQ="neq",e.neq="neq",e))(Pl||{}),Fl=(e=>(e.geo="geo",e.Geographic="geo",e.std="std",e.Standard="std",e.time="time",e.Time="time",e))(Fl||{}),jl=(e=>(e.csv="csv",e.json="json",e.jsonarrays="jsonarrays",e.jsonrecords="jsonrecords",e.parquet="parquet",e.tsv="tsv",e.xls="xls",e.xlsx="xlsx",e))(jl||{}),Ml=(e=>(e.asc="asc",e.ASC="asc",e.desc="desc",e.DESC="desc",e))(Ml||{}),Al=(e=>(e.day="day",e.DAY="day",e.month="month",e.MONTH="month",e.quarter="quarter",e.QUARTER="quarter",e.time="time",e.TIME="time",e.week="week",e.WEEK="week",e.year="year",e.YEAR="year",e))(Al||{}),Tl=(e=>(e.latest="latest",e.LATEST="latest",e.oldest="oldest",e.OLDEST="oldest",e))(Tl||{}),Nl=class e{static isCalcOrMeasure(t){return"string"==typeof t&&t in Il||e.isMeasure(t)}static isMeasure(e){return null!=e&&zl(e,"_source")&&null!=e._source&&zl(e._source,"_type")&&"measure"===e._source._type}constructor(e,t){this._parent=t,this._source=e}get aggregatorType(){return this._source.aggregatorType}get cube(){if(this._parent)return this._parent;throw new Error("Measure ".concat(this," doesn't have an associated parent cube."))}get displayName(){return this._source.name}};function Ll(e,t=(e=>"".concat(e)),n=Boolean){const r=e.filter(n);return r.length>0?r.map(t):void 0}function Dl(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function zl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Bl(e){const t="string"==typeof e?Number.parseFloat(e):e;return!Number.isNaN(t)&&Number.isFinite(t)}function Vl(e){return Array.isArray(e)&&Dl(e[0],Pl)&&Bl(e[1])}El(Nl,[kl,_l,Rl]);var Ul=class e{static isProperty(e){return null!=e&&zl(e,"_source")&&null!=e._source&&zl(e._source,"_type")&&"property"===e._source._type}static isPropertyDescriptor(e){return null!=e&&zl(e,"property")&&"string"==typeof e.property&&(!zl(e,"level")||"string"==typeof e.level)}constructor(e,t){this._parent=t,this._source=e}get captionSet(){return this._source.captionSet||""}get cube(){return this.level.cube}get descriptor(){return{...this.level.descriptor,property:this.name}}get fullName(){return"".concat(this.level.fullName,".").concat(this.name)}get level(){if(!this._parent)throw new Error("Property ".concat(this," doesn't have an associated parent hierarchy."));return this._parent}get uniqueName(){return this._source.uniqueName||this._source.name}matches(t){if("string"==typeof t)return this._source.uniqueName===t||this.fullName===t||this._source.name===t;if(e.isPropertyDescriptor(t)){const e=this._parent?this.level:void 0;return this.matches(t.property)&&(!e||(!t.level||e.matches(t.level))&&(!t.hierarchy||t.hierarchy===e.hierarchy.name)&&(!t.dimension||t.dimension===e.dimension.name)&&(!t.cube||t.cube===e.cube.name)&&(!t.server||t.server===e.cube.server))}return!!e.isProperty(t)&&(this===t||this.matches(t.descriptor))}};function Gl(e){return null==e?[]:[].concat(e)}function Hl(e,t=","){return null==e?[]:(Array.isArray(e)?e.join(t):e).split(t)}function ql(e,t){let n=-1;const r=e.length,o=[];for(;++n-1||this._source.properties.some((t=>t.name===e))}matches(t){return"string"==typeof t?this._source.uniqueName===t||this._source.fullName===t||this._source.name===t:e.isLevelDescriptor(t)?this.matches(t.level)&&(!t.hierarchy||t.hierarchy===this._source.hierarchy)&&(!t.dimension||t.dimension===this._source.dimension)&&(!t.cube||t.cube===this._source.cube)&&(!t.server||t.server===this.cube.server):!!e.isLevel(t)&&(this===t||this.matches(t.descriptor))}};El(Xl,[kl,_l,Rl]);var Ql=class{constructor(e,t){this.levels=[],this.levelsByName={},this._parent=t,this._source=e;const n=Kl(Xl,e.levels,this);this.levels=n[0],this.levelsByName=n[1]}static isHierarchy(e){return null!=e&&zl(e,"_source")&&null!=e._source&&zl(e._source,"_type")&&"hierarchy"===e._source._type}get cube(){return this.dimension.cube}get dimension(){if(this._parent)return this._parent;throw new Error("Hierarchy ".concat(this," doesn't have an associated parent dimension."))}get displayName(){return Yl([this._source.dimension,this._source.name])}getLevel(e){const t=Xl.isLevel(e)?e.name:Xl.isLevelDescriptor(e)?e.level:e,n=this.levelsByName[t];if(n)return n;throw new Error("Object ".concat(e," is not a valid level identifier"))}};El(Ql,[kl,_l,Rl]);var Zl=class{constructor(e,t){this.hierarchies=[],this.hierarchiesByName={},this._parent=t,this._source=e;const n=Kl(Ql,e.hierarchies,this);this.hierarchies=n[0],this.hierarchiesByName=n[1]}static isDimension(e){return null!=e&&zl(e,"_source")&&null!=e._source&&zl(e._source,"_type")&&"dimension"===e._source._type}get caption(){return this._source.annotations.caption||this._source.name}get cube(){if(this._parent)return this._parent;throw new Error("Dimension ".concat(this," doesn't have an associated parent cube."))}get defaultHierarchy(){return this.hierarchiesByName[this._source.defaultHierarchy]||this.hierarchies[0]}get dimensionType(){return this._source.dimensionType}get displayName(){return this._source.name}get levelIterator(){return this.levelIteratorFactory()}get propertyIterator(){return this.propertyIteratorFactory()}getHierarchy(e){const t="string"==typeof e?e:e.name,n=this.hierarchiesByName[t];if(n)return n;throw new Error("Object ".concat(e," didn't match any hierarchy in dimension ").concat(this.name))}getLevel(e){const t=Wl(this.levelIteratorFactory(),e);if(null!=t)return t;throw new Error("Object ".concat(e," didn't match any level in dimension ").concat(this.name))}getProperty(e){const t=Wl(this.propertyIteratorFactory(),e);if(null!=t)return t;throw new Error("Object ".concat(e," didn't match any property in dimension ").concat(this.name))}levelIteratorFactory(){const{hierarchies:e}=this;let t=0,n=0;const r={next:function r(){if(t===e.length)return{value:void 0,done:!0};const{levels:o}=e[t];return n===o.length?(t++,n=0,r()):{value:o[n++],done:!1}},[Symbol.iterator]:()=>r};return r}propertyIteratorFactory(){const e=this.levelIteratorFactory();let t=e.next(),n=0;const r={next:function r(){if(t.done)return{value:void 0,done:!0};const{properties:o}=t.value;return n===o.length?(t=e.next(),n=0,r()):{value:o[n++],done:!1}},[Symbol.iterator]:()=>r};return r}};El(Zl,[kl,_l,Rl]);var Jl=class{static isNamedset(e){return null!=e&&zl(e,"_source")&&null!=e._source&&zl(e._source,"_type")&&"namedset"===e._source._type}constructor(e,t){this._parent=t,this._source=e;const[n,r,o]=e.level;this.level=t?t.getLevel({dimension:n,hierarchy:r,level:o}):void 0}get cube(){if(this._parent)return this._parent;throw new Error("NamedSet ".concat(this," doesn't have an associated parent cube."))}};El(Jl,[kl,_l,Rl]);var es={growth:function(e,t){return{kind:"growth",category:e.getLevel(t.category),value:e.getMeasure(t.value)}},rate:function(e,t){throw new Error("Not implemented")},rca:function(e,t){return{kind:"rca",location:e.getLevel(t.location),category:e.getLevel(t.category),value:e.getMeasure(t.value)}},topk:function(e,t){if(!Bl(t.amount))throw new TypeError("Invalid value in argument amount: ".concat(t.amount));return{kind:"topk",amount:t.amount,category:e.getLevel(t.category),value:Il[t.value]||e.getMeasure(t.value),order:Ml[t.order]||"desc"}}};function ts(e){return delete e.cube,delete e.server,e}function ns(e){const t=Object.entries(e).map((([e,t])=>[e,Nl.isMeasure(t)?t.name:Xl.isLevel(t)?ts(t.descriptor):t]));return Object.fromEntries(t)}function rs(e,t){const n=e.cube;if(t.server&&t.server!==n.server)throw new Error('Server "'.concat(t.server,"\" doesn't match with target Query object's server \"").concat(n.server,'"'));if(t.cube&&t.cube!==n.name)throw new Error('Cube "'.concat(t.cube,"\" doesn't match with target Query object's cube \"").concat(n.name,'"'));return"string"==typeof t.format&&e.setFormat(jl[t.format]),"string"==typeof t.locale&&e.setLocale(t.locale),Array.isArray(t.calculations)&&t.calculations.forEach((t=>{"growth"===t.kind&&e.addCalculation(t.kind,t),"rca"===t.kind&&e.addCalculation(t.kind,t),"topk"===t.kind&&e.addCalculation(t.kind,t)})),Array.isArray(t.captions)&&t.captions.forEach((t=>e.addCaption(t))),Array.isArray(t.drilldowns)&&t.drilldowns.forEach((t=>e.addDrilldown(t))),Array.isArray(t.cuts)&&t.cuts.forEach((t=>e.addCut(t,t.members,{exclusive:t.exclusive,forMatch:t.for_match}))),Array.isArray(t.filters)&&t.filters.forEach((t=>e.addFilter(t.measure,t.constraint,t.joint,t.constraint2))),Array.isArray(t.measures)&&t.measures.forEach((t=>e.addMeasure(t))),Array.isArray(t.properties)&&t.properties.forEach((t=>e.addProperty(t))),null!=t.page_limit&&Bl(t.page_limit)&&e.setPagination(t.page_limit,t.page_offset),t.sort_property&&e.setSorting(t.sort_property,Ml[t.sort_direction||"desc"]),t.time&&e.setTime(Al[t.time[0]],Bl(t.time[1])?t.time[1]:Tl[t.time[1]]),t.options&&function(e,t){const n=Object(e),r=Object.keys(e);let o=-1,a=r.length;for(;a--;){const e=r[++o];if(!1===t(n[e],e,n))break}}(t.options,((t,n)=>{null!=t&&e.setOption(n,t)})),e}function os(e){return Xl.isLevel(e)||Ul.isProperty(e)?e.fullName:Nl.isMeasure(e)?e.name:e}var as=class{constructor(e){this.calculations=[],this.captions={},this.cuts={},this.drilldowns=[],this.filters=[],this.format="jsonrecords",this.locale="",this.measures=[],this.options={},this.pageLimit=0,this.pageOffset=0,this.properties={},this.cube=e}addCalculation(e,t){const n=es[e];if(null==n)throw new TypeError("Invalid calculation type: ".concat(e," is not supported"));return this.calculations.push(n(this.cube,t)),this}addCaption(e){const t=this.cube.getProperty(e);return this.captions[t.level.fullName]=t,this}addCut(e,t=[],n={}){const r=this.cube.getDrillable(e),o=this.cuts[r.fullName]||{drillable:r,isExclusive:null!=n.exclusive?!!n.exclusive:void 0,isForMatch:null!=n.forMatch?!!n.forMatch:void 0,members:[]};for(let a=0;a0;return this.pageLimit=n?Math.max(0,e):0,this.pageOffset=n?Math.max(0,t||0):0,this}setSorting(e,t){if(!e)return this.sortDirection=void 0,this.sortProperty=void 0,this;const n=this.cube;return this.sortProperty="string"==typeof e?Il[e]||n.measuresByName[e]||n.getProperty(e):Nl.isMeasure(e)?e:n.getProperty(e),this.sortDirection="string"==typeof t?Ml[t]||"desc":!1===t?"asc":"desc",this}setTime(e,t){const n=null!=e&&null!=t;return this.timePrecision=n?e:void 0,this.timeValue=n?t:void 0,this}toJSON(){return function(e){const{cube:t}=e,n=e.getParam("pagination"),r=e.getParam("sorting"),o=e.getParam("time");return{server:t.server,cube:t.name,format:e.getParam("format"),locale:e.getParam("locale"),calculations:e.getParam("calculations").map(ns),captions:e.getParam("captions").map((e=>ts(e.descriptor))),cuts:ql(e.getParam("cuts"),(e=>Xl.isLevel(e.drillable)?{...ts(e.drillable.descriptor),members:e.members,exclusive:e.isExclusive,for_match:e.isForMatch}:null)),drilldowns:ql(e.getParam("drilldowns"),(e=>Xl.isLevel(e)?ts(e.descriptor):null)),filters:e.getParam("filters").map((e=>({measure:Nl.isMeasure(e.measure)?e.measure.name:e.measure,constraint:e.const1,joint:e.joint,constraint2:e.const2}))),page_limit:n.limit,page_offset:n.offset,measures:e.getParam("measures").map((e=>e.name)),properties:e.getParam("properties").map((e=>ts(e.descriptor))),sort_property:Ul.isProperty(r.property)?ts(r.property.descriptor):Nl.isMeasure(r.property)?r.property.name:r.property,sort_direction:r.direction,time:null!=o.precision&&null!=o.value?[o.precision,o.value]:void 0,options:e.getParam("options")}}(this)}toSource(){return function(e){function t(e){return e in jl?"Format.".concat(e):e in Pl?"Comparison.".concat(e.toUpperCase()):e in Ml?"Direction.".concat(e.toUpperCase()):Array.isArray(e)?"[".concat(e.map(t).join(", "),"]"):JSON.stringify(Xl.isLevel(e.category)&&Nl.isCalcOrMeasure(e.value)?ns(e):os(e))}function n(e,...n){const r=[];let o=n.length;for(;o>0;){const e=n[--o];(0!==r.length||null!=e&&""!==e)&&r.push(t(e))}return r.reverse(),r.length>0?".".concat(e,"(").concat(r.join(", "),")"):""}const r=e.getParam("options"),o=e.getParam("pagination"),a=e.getParam("sorting"),i=e.getParam("time");return["query"].concat(n("setFormat",e.getParam("format")),n("setLocale",e.getParam("locale")),e.getParam("measures").map((e=>n("addMeasure",e))),e.getParam("drilldowns").map((e=>n("addDrilldown",e))),e.getParam("captions").map((e=>n("addCaption",e))),e.getParam("properties").map((e=>n("addProperty",e))),e.getParam("cuts").map((e=>n("addCut",e.drillable,e.members,{exclusive:e.isExclusive,forMatch:e.isForMatch}))),e.getParam("filters").map((e=>n("addFilter",e.measure,e.const1,e.joint&&e.const2?e.joint:"",e.joint&&e.const2?e.const2:""))),e.getParam("calculations").map((({kind:e,...t})=>n("addCalculation",e,t))),o.limit>0?n("setPagination",o.limit,o.offset):"",null!=a.property&&null!=a.direction?n("setSorting",a.property,a.direction):"",null!=i.precision&&null!=i.value?n("setTime",i.precision,i.value):"",Object.keys(r).map((e=>"boolean"==typeof r[e]?n("setOption",e,r[e]):""))).filter(Boolean).join("\n ")}(this)}toString(e){if("string"==typeof e){const{datasource:t}=this.cube;return t.stringifyQueryURL(this,e)}return ca(function(e){const{cube:t}=e,n=e.getParam("pagination"),r=e.getParam("sorting"),o=e.getParam("time");return{server:t.server,cube:t.name,format:e.getParam("format")||void 0,locale:e.getParam("locale")||void 0,calculations:e.getParam("calculations").map((e=>"".concat(e.kind,":").concat(ql(Object.keys(e).sort(),(t=>"kind"===t?null:os(e[t])))))),captions:e.getParam("captions").map((e=>e.fullName)),cuts:e.getParam("cuts").map((e=>"".concat(e.isExclusive?"~":"").concat(e.isForMatch?"*":"").concat(e.drillable.fullName,".").concat(e.members.join(",")))),drilldowns:e.getParam("drilldowns").map((e=>e.fullName)),filters:e.getParam("filters").map((e=>[Nl.isMeasure(e.measure)?e.measure.name:e.measure,e.const1,e.joint&&e.const2?e.joint:"",e.joint&&e.const2?e.const2:""].filter(Boolean).join(" "))),page_limit:n.limit||void 0,page_offset:n.offset||void 0,measures:e.getParam("measures").map((e=>e.name)),properties:e.getParam("properties").map((e=>e.fullName)),sort_property:Ul.isProperty(r.property)?r.property.fullName:Nl.isMeasure(r.property)?r.property.name:r.property,sort_direction:r.direction,time_precision:o.precision,time_value:o.value,options:e.getParam("options")}}(this),{ignorenull:!0,skipIndex:!0,sorted:!0})}},is=class{constructor(e,t){this.dimensions=[],this.dimensionsByName={},this.measures=[],this.measuresByName={},this.namedsets=[],this.namedsetsByName={},this._parent=t,this._source=e;const n=Kl(Zl,e.dimensions,this);this.dimensions=n[0],this.dimensionsByName=n[1];const r=Kl(Nl,e.measures,this);this.measures=r[0],this.measuresByName=r[1];const o=Kl(Jl,e.namedsets,this);this.namedsets=o[0],this.namedsetsByName=o[1]}static isCube(e){return null!=e&&zl(e,"_source")&&null!=e._source&&zl(e._source,"_type")&&"cube"===e._source._type}get caption(){return this._source.annotations.caption||this._source.name}get datasource(){if(this._parent)return this._parent;throw new Error("Cube ".concat(this," doesn't have an associated server url."))}get defaultMeasure(){const e=this._source.annotations.default||"undefined";return this.measuresByName[e]||this.measures[0]}get geoDimension(){return this.dimensions.find((e=>"geo"===e.dimensionType))}get query(){return new as(this)}get server(){return this.datasource.serverUrl}get serverSoftware(){return this.datasource.serverSoftware}get standardDimensions(){return this.findDimensionsByType("std")}get timeDimension(){return this.dimensions.find((e=>"time"===e.dimensionType))}get levelIterator(){return this.levelIteratorFactory()}get propertyIterator(){return this.propertyIteratorFactory()}findDimensionsByType(e){return this.dimensions.filter((t=>t.dimensionType===e))}getDimension(e){const t="string"==typeof e?e:e.name,n=this.dimensionsByName[t];if(n)return n;throw new Error("Object ".concat(e," is not a valid dimension identifier"))}getDrillable(e){return Jl.isNamedset(e)?this.getNamedSet(e):Xl.isLevel(e)?this.getLevel(e):this.namedsetsByName["".concat(e)]||this.getLevel(e)}getLevel(e){const t=Wl(this.levelIteratorFactory(),e);if(null!=t)return t;throw new Error("Object ".concat(e," didn't match any level in cube ").concat(this.name))}getMeasure(e){const t="string"==typeof e?e:e.name,n=this.measuresByName[t];if(n)return n;throw new Error("Object ".concat(e," is not a valid measure identifier"))}getNamedSet(e){const t="string"==typeof e?e:e.name,n=this.namedsetsByName[t];if(n)return n;throw new Error("Object ".concat(e," is not a valid namedset identifier"))}getProperty(e){const t=Wl(this.propertyIteratorFactory(),e);if(null!=t)return t;throw new Error("Object ".concat(e," didn't match any level in cube ").concat(this.name))}levelIteratorFactory(){const{dimensions:e}=this;let t=e[0].levelIterator,n=0;const r={next:function r(){var o;if(n===e.length)return{value:void 0,done:!0};const a=t.next();return a.done?(t=null==(o=e[++n])?void 0:o.levelIterator,r()):a},[Symbol.iterator]:()=>r};return r}propertyIteratorFactory(){const{dimensions:e}=this;let t=0,n=e[t].propertyIterator;const r={next:function r(){var o;if(t===e.length)return{value:void 0,done:!0};const a=n.next();return a.done?(n=null==(o=e[++t])?void 0:o.propertyIterator,r()):a},[Symbol.iterator]:()=>r};return r}};El(is,[kl,_l,Rl]);var ls=class e{constructor(t,n){this._parent=n,this._source=t,this.ancestors=t.ancestors.map((t=>new e(t,n))),this.children=t.children.map((t=>new e(t,n)))}get cube(){return this.level.cube}get key(){return this._source.key}get level(){if(this._parent)return this._parent;throw new Error("Member ".concat(this," doesn't have an associated parent level."))}get parentName(){return this._source.parentName}};El(ls,[_l,Rl]);var ss=class extends Error{constructor(e,t){super(t||(e.data?e.data.error||e.data:e.statusText)),this.status=e.status,this.body=e.data,this.name=this.constructor.name,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},cs=(e=>(e.eq="=",e.gt=">",e.gte=">=",e.lt="<",e.lte="<=",e.neq="<>",e))(cs||{});function us(e){const t=e.lastIndexOf(".");return[e.slice(0,t),e.slice(t+1)]}function ds(e){const{drillable:t,members:n}=e,r=n.map((e=>"".concat(t.fullName,".&[").concat(e,"]"))).join(",");return n.length>1?"{".concat(r,"}"):r}function ps(e){const t=cs[e.const1[0]];return"string"!=typeof e.measure&&t?"".concat(e.measure.name," ").concat(t," ").concat(e.const1[1]):""}function ms(e,t){const n=e.cube,r={};for(const o of n.levelIterator)r[o.fullName]=o;return Gl(t.caption).forEach((t=>{const[n,o]=us(t),a=r[n];if(a){const t=a.propertiesByName[o];t&&e.addCaption(t)}})),Gl(t.cut).forEach((t=>{const n=function(e){if(-1===e.indexOf("].&["))throw TypeError("Couldn't parse cut: ".concat(e));const t="".concat(e).replace(/^\{|\}$/g,""),[n]=t.split(".&",1);return[n,t.split(",").map((e=>{const[,t]=e.split("].&[");return t?t.replace("]",""):void 0})).filter(Boolean)]}(t);e.addCut(...n)})),Gl(t.drilldown).forEach((t=>{const n=r[t];n&&e.addDrilldown(n)})),Gl(t.filter).forEach((t=>{const[,r,o,a]=t.match(/^(.+)\s(>|<|>=|<=|=|<>)\s(.+)$/)||[],i=n.measuresByName[r],l=Pl[o];i&&l&&e.addFilter(i,[l,Number.parseFloat(a)])})),Gl(t.measures).forEach((t=>{const r=n.measuresByName[t];r&&e.addMeasure(r)})),Gl(t.properties).forEach((t=>{const[n,o]=us(t),a=r[n];if(a){const t=a.propertiesByName[o];t&&e.addProperty(t)}})),null!=t.limit&&e.setPagination(t.limit,t.offset),t.order&&e.setSorting(t.order,!!t.order_desc),"boolean"==typeof t.debug&&e.setOption("debug",t.debug),"boolean"==typeof t.distinct&&e.setOption("distinct",t.distinct),"boolean"==typeof t.nonempty&&e.setOption("nonempty",t.nonempty),"boolean"==typeof t.parents&&e.setOption("parents",t.parents),"boolean"==typeof t.sparse&&e.setOption("sparse",t.sparse),e}function gs(e){return t=>{const n=xl(e.server_uri,"cubes",encodeURIComponent(t.name)),r={...e,cube_name:t.name,cube_uri:n};return{_type:"cube",annotations:t.annotations,dimensions:t.dimensions.map(fs(r)),measures:t.measures.map(vs(r)),name:t.name,namedsets:t.named_sets.map(ws(r)),uri:n}}}function fs(e){return t=>{var n;const r=xl(e.cube_uri,"dimensions",encodeURIComponent(t.name)),o={...e,dimension_name:t.name,dimension_uri:r};return{_type:"dimension",annotations:t.annotations,cube:e.cube_name,defaultHierarchy:t.hierarchies[0].name,dimensionType:null!=(n=Fl[t.type])?n:"std",hierarchies:t.hierarchies.map(hs(o)),name:t.name,uri:r}}}function hs(e){return t=>{const n=xl(e.dimension_uri,"hierarchies",encodeURIComponent(t.name)),r={...e,hierarchy_name:t.name,hierarchy_uri:n},o=t.has_all?t.levels.slice(1):t.levels;return{_type:"hierarchy",allMemberName:t.all_member_name,annotations:{},cube:e.cube_name,dimension:e.dimension_name,levels:o.map(bs(r)),name:t.name,uri:n}}}function bs(e){return t=>{const n=xl(e.hierarchy_uri,"levels",encodeURIComponent(t.name)),r={...e,level_name:t.name,level_uri:n};return{_type:"level",annotations:t.annotations,caption:t.caption,cube:e.cube_name,depth:t.depth,dimension:e.dimension_name,fullName:t.full_name,hierarchy:e.hierarchy_name,name:t.name,properties:t.properties.map(xs(r)),uri:n}}}function vs(e){return t=>({_type:"measure",aggregatorType:Ol[t.aggregator]||"UNKNOWN",annotations:t.annotations,caption:t.caption,cube:e.cube_name,fullName:t.full_name,name:t.name,uri:xl(e.cube_uri,"measures",encodeURIComponent(t.name))})}function ys(e){return t=>({_type:"member",ancestors:Gl(t.ancestors).map(ys(e)),caption:t.caption,children:Gl(t.children).map(ys(e)),depth:t.depth,fullName:t.full_name,key:t.key,level:t.level_name,name:t.name,numChildren:t.num_children,parentName:t.parent_name,uri:xl(e.level_uri,"members","".concat(t.key))})}function ws(e){return t=>({_type:"namedset",annotations:t.annotations,cube:e.cube_name,dimension:t.dimension,hierarchy:t.hierarchy,level:t.level,name:t.name,uri:xl(e.cube_uri,"namedsets",encodeURIComponent(t.name))})}function xs(e){return t=>({_type:"property",annotations:{},cube:e.cube_name,dimension:e.dimension_name,hierarchy:e.hierarchy_name,level:e.level_name,name:t,uri:xl(e.level_uri,"properties",encodeURIComponent(t))})}var Ss="mondrian-rest",Cs=class e{constructor(e){if(this.serverOnline=!1,this.serverSoftware=Ss,!e||"string"!=typeof e)throw new Error("Invalid Mondrian REST server URL: ".concat(e));this.serverUrl=xl(e,"/"),this.axiosInstance=hl.create({baseURL:this.serverUrl})}checkStatus(){const e=xl(this.serverUrl,"cubes");return this.axiosInstance.get(e).then((()=>(this.serverOnline=!0,this.serverVersion="1.0.4",{software:Ss,online:this.serverOnline,url:this.serverUrl,version:this.serverVersion})),(e=>{throw this.serverOnline=!1,e}))}execQuery(e){const t=e.getParam("format"),n=this.stringifyQueryURL(e);return this.axiosInstance.get(n).then((r=>({data:"jsonrecords"===t?r.data.data:r.data,headers:{...r.headers},query:e,status:r.status,url:n})))}fetchCube(e){const t=xl(this.serverUrl,"cubes",e),n=gs({server_uri:this.serverUrl});return this.axiosInstance.get(t).then((e=>{const t=e.data;if(t&&"string"==typeof t.name)return n(t);throw new ss(e)}),(t=>{if(t.response){if(404===t.response.status)throw new ss(t.response,'Cube named "'.concat(e,'" is not available in server ').concat(this.serverUrl));throw new ss(t.response,t.message)}throw t}))}fetchCubes(){const e=xl(this.serverUrl,"cubes"),t=gs({server_uri:this.serverUrl});return this.axiosInstance.get(e).then((e=>{const n=e.data;if(n&&Array.isArray(n.cubes))return n.cubes.map(t);throw new ss(e)}))}fetchMember(e,t,n={}){const{dimension:r,name:o}=e,a=ys({level_uri:e.toString()});let i=n.caption;if(n.locale){const t=n.locale.slice(0,2);i=e.annotations["".concat(t,"_caption")]||e.annotations["caption_".concat(t)]||i}const l=xl(r.toString(),"levels",o,"members","".concat(t)),s={caption:i||void 0,children:!!n.children,member_properties:n.member_properties};return this.axiosInstance.get(l,{params:s}).then((e=>a(e.data)),(n=>{if(404===n.status)throw new Error("Can't find member with key '".concat(t,"' for level '").concat(e.name,"'"));throw n}))}fetchMembers(e,t={}){const n=ys({level_uri:e.toString()});let r=t.caption;if(t.locale){const n=t.locale.slice(0,2);r=e.annotations["".concat(n,"_caption")]||e.annotations["caption_".concat(n)]||r}const o=xl(e.toString(),"members"),a={caption:r||void 0,children:!!t.children,member_properties:t.member_properties};return this.axiosInstance.get(o,{params:a}).then((e=>e.data.members.map(n)))}parseQueryURL(e,t,n){const r=t.indexOf("?"),o=t.slice(r+1),a=Sl(o),i=t.match(/^.+\/aggregate(\.[a-z]+)\?.+$/);i&&(a.format=i[1].slice(1));const l=Js(a,n);if(t.indexOf("/aggregate")>-1)return ms(e,l);throw new Error("Provided URL is not a valid Mondrian REST query URL: ".concat(t))}setRequestConfig(e){Object.assign(this.axiosInstance.defaults,e)}stringifyQueryURL(t){return e.urlAggregate(t)}static urlAggregate(e){const t=e.getParam("format"),n=function(e){const t=e.getParam("captions"),n=e.getParam("pagination"),r=e.getParam("sorting"),o=e.getParam("options"),a=e.getParam("locale").slice(0,2);if(a){const n=new RegExp("^".concat(a,"\\s|\\s").concat(a,"$"),"i");e.getParam("drilldowns").forEach((e=>{if(Xl.isLevel(e)){const r=e.properties.find((e=>n.test(e.name)));r&&t.push(r)}}))}return{caption:Ll(t,i),cut:Ll(e.getParam("cuts"),ds),drilldown:Ll(e.getParam("drilldowns"),(e=>e.fullName)),filter:Ll(e.getParam("filters"),ps),measures:Ll(e.getParam("measures"),(e=>e.name)),properties:Ll(e.getParam("properties"),i),limit:n.limit||void 0,offset:n.offset||void 0,order:Nl.isMeasure(r.property)?r.property.fullName:Ul.isProperty(r.property)?i(r.property):void 0,order_desc:"desc"===r.direction||void 0,debug:o.debug,distinct:o.distinct,nonempty:o.nonempty,parents:o.parents,sparse:o.sparse};function i(e){return"".concat(e.level.fullName,".").concat(e.name)}}(e),r=ca(n,{ignorenull:!0,skipIndex:!0,sorted:!0});return xl(e.cube.toString(),"aggregate.".concat(t,"?").concat(r))}};Cs.endpoints=[""],Cs.formats=["csv","json","jsonrecords","xls"],Cs.softwareName=Ss,Cs.queryAggregate=ms;var Es=Cs;function ks(e){return e.some((e=>e.includes(".")))?e.map((e=>"[".concat(e,"]"))).join("."):e.join(".")}function _s(e){const t=e.replace(/^\[|\]$/g,"");return t.indexOf("].[")>-1?t.split(/\]\.\[?/):t.split(".")}function Rs(e){const t=e.indexOf(".and.");if(t>-1){return{const1:Os(e.slice(0,t)),const2:Os(e.slice(t+5)),joint:"and"}}const n=e.indexOf(".or.");if(n>-1){return{const1:Os(e.slice(0,n)),const2:Os(e.slice(n+4)),joint:"or"}}return{const1:Os(e)}}function Os(e){const t=e.indexOf("."),n=e.slice(0,t);if(!Dl(n,Pl))throw new Error("Invalid filter comparison token: ".concat(n));const r=e.slice(t+1),o=Number.parseFloat(r);if(Number.isNaN(o)||!Number.isFinite(o))throw new Error("Invalid filter scalar value: ".concat(r));return[Pl[n],o]}function Is(e){return[Nl.isMeasure(e.measure)?e.measure.name:e.measure].concat(e.const1,e.joint,e.const2).filter(Boolean).join(".")}function Ps(e){const t=xl(this.uri,"cubes",encodeURIComponent(e.name)),n={uri:t,cube:e.name};return{_type:"cube",annotations:e.annotations,caption:e.caption,dimensions:e.dimensions.map(js,n),measures:e.measures.map(Fs,n),name:e.name,namedsets:[],uri:t}}function Fs(e){return{_type:"measure",aggregatorType:e.aggregator,annotations:e.annotations,cube:this.cube,name:e.name,uri:xl(this.uri,"msr",encodeURIComponent(e.name))}}function js(e){const t=xl(this.uri,"dim",encodeURIComponent(e.name)),n={...this,uri:t,dimension:e.name};return{_type:"dimension",annotations:e.annotations,caption:e.caption,cube:this.cube,defaultHierarchy:e.default_hierarchy,dimensionType:"standard"===e.type?"std":Fl[e.type],hierarchies:e.hierarchies.map(Ms,n),name:e.name,uri:t}}function Ms(e){const t=xl(this.uri,encodeURIComponent(e.name)),n={...this,uri:t,hierarchy:e.name};return{_type:"hierarchy",annotations:e.annotations,caption:e.caption,cube:this.cube,dimension:this.dimension,levels:e.levels.map(As,n),name:e.name,uri:t}}function As(e){const t=xl(this.uri,encodeURIComponent(e.name)),n={...this,uri:t,level:e.name};return{_type:"level",annotations:e.annotations,caption:e.caption,cube:this.cube,depth:e.depth,dimension:this.dimension,hierarchy:this.hierarchy,name:e.name,properties:e.properties.map(Ts,n),uniqueName:e.name,uri:t}}function Ts(e){return{_type:"property",annotations:e.annotations,name:e.name,uniqueName:e.name,uri:xl(this.uri,encodeURIComponent(e.name))}}function Ns(e){return{_type:"member",ancestors:[],caption:e.caption,children:[],depth:this.depth,key:e.key,level:this.name,name:"".concat(e.key),uri:xl(this.toString(),"_member?key=".concat(e.key))}}function Ls(e){return null!=e&&/^(?:true|y|yes|on|1)$/i.test(e.trim())}var Ds="tesseract-olap[python]",zs=class{constructor(e){if(this.serverOnline=!1,this.serverSoftware=Ds,!e||"string"!=typeof e)throw new TypeError("Invalid tesseract-olap server URL: ".concat(e));this.serverUrl=xl(e,"/"),this.axiosInstance=hl.create({baseURL:this.serverUrl})}checkStatus(){return this.axiosInstance.get("/").then((e=>{const{version:t}=e.data;return this.serverOnline=!0,this.serverVersion=t,{software:Ds,online:this.serverOnline,url:this.serverUrl,version:t}}),(e=>{throw this.serverOnline=!1,e}))}execQuery(e){const t=e.getParam("format"),n=this.stringifyQueryURL(e);return this.axiosInstance.get(n,{baseURL:""}).then((r=>({data:t.startsWith("json")?r.data.data:r.data,headers:{...r.headers},query:e,status:r.status,url:n})))}fetchCube(e){const t={uri:this.serverUrl};return this.axiosInstance.get("cubes/".concat(encodeURIComponent(e))).then((e=>Ps.call(t,e.data)))}fetchCubes(){const e={uri:this.serverUrl};return this.axiosInstance.get("cubes").then((t=>t.data.cubes.map(Ps,e)))}fetchMember(e,t,n={}){const r={cube:e.cube.name,level:e.name,limit:"1",locale:n.locale,parents:n.parents,search:"".concat(t)};return this.axiosInstance.get("members",{params:r}).then((n=>{const r=n.data.members.find((e=>e.key==t));if(r)return Ns.call(e,r);throw new Error("Can't find member with key '".concat(t,"' for level '").concat(e.name,"'"))}))}fetchMembers(e,t={}){const n={cube:e.cube.name,level:e.name,limit:t.limit,locale:t.locale,parents:t.parents,search:t.search};return this.axiosInstance.get("members",{params:n}).then((t=>t.data.members.map(Ns,e)))}parseQueryURL(e,t,n={}){!function(e,t,n){const r=Hl(t.getAll("include"),";").map((e=>{const[t,n]=Hl(e,":");return{level:t,members:n.split(","),exclusive:!1}})),o=Hl(t.getAll("exclude"),";").map((e=>{const[t,n]=Hl(e,":");return{level:t,members:n.split(","),exclusive:!0}})),[a="0",i="0"]=Hl(t.getAll("limit")),[l,s]=Hl(t.getAll("sort"),"."),[c,u]=Hl(t.getAll("time"),"."),d={cube:t.getAll("cube").filter(Boolean)[0],locale:t.getAll("locale").filter(Boolean)[0],drilldowns:Hl(t.getAll("drilldowns")).map((e=>({level:e}))),measures:Hl(t.getAll("measures")),properties:Hl(t.getAll("properties")).map((e=>({property:e}))),page_limit:Number.parseInt(a),page_offset:Number.parseInt(i),cuts:r.concat(o),filters:Hl(t.getAll("filters")).map((e=>{const[t,...n]=e.split("."),{const1:r,const2:o,joint:a}=Rs(n.join("."));return{measure:t,constraint:r,joint:a,constraint2:o}})),options:{parents:Ls(t.get("parents"))}};if(l&&(d.sort_property=l,d.sort_direction=s||"asc"),c&&u){const e=Dl(c,Al)&&Al[c],t=Dl(u,Tl)?Tl[u]:Bl(u)&&u;d.time=e&&t?[e,t]:void 0}e.fromJSON(Js(d,n))}(e,t.startsWith("?")?new URLSearchParams(t):new URL(t).searchParams,n);const r=t.match(/^.+\/data\.([a-z]+)\?.+$/);return r&&e.setFormat(r[1]),e}setRequestConfig(e){Object.assign(this.axiosInstance.defaults,e)}stringifyQueryURL(e){const t=e.getParam("format")||"jsonrecords",n=function(e){const t=e=>e.name,n=e.getParam("cuts"),r=e.getParam("options"),o=e.getParam("pagination"),a=e.getParam("sorting"),i=e.getParam("time");return{cube:e.cube.name,locale:e.getParam("locale"),drilldowns:e.getParam("drilldowns").map(t).join(","),measures:e.getParam("measures").map(t).join(","),properties:e.getParam("properties").map(t).join(",")||void 0,exclude:ql(n,(e=>e.isExclusive?"".concat(e.drillable.name,":").concat(e.members.join(",")):null)).join(";")||void 0,include:ql(n,(e=>e.isExclusive?null:"".concat(e.drillable.name,":").concat(e.members.join(",")))).join(";")||void 0,filters:e.getParam("filters").map((e=>{const t="string"==typeof e.measure?e.measure:e.measure.name,n="".concat(t,".").concat(e.const1.join("."));return e.const2?"".concat(n,".").concat(e.joint,".").concat(e.const2.join(".")):n})).join(",")||void 0,limit:o.limit||o.offset?"".concat(o.limit,",").concat(o.offset):void 0,sort:a.property?"string"==typeof a.property?"".concat(a.property,".").concat(a.direction):"".concat(a.property.name,".").concat(a.direction):void 0,time:i.precision?"".concat(i.precision,".").concat(i.value):void 0,parents:r.parents||void 0}}(e),r=ca(n,{ignoreEmptyArray:!0,ignorenull:!0,skipBracket:!0,skipIndex:!0,sorted:!0});return xl(this.serverUrl,"data.".concat(t,"?").concat(r))}};function Bs(e){const t=e.getParam("captions"),n=e.getParam("locale").slice(0,2);if(n){const r=new RegExp("^".concat(n,"\\s|\\s").concat(n,"$"),"i");e.getParam("drilldowns").forEach((e=>{if(Xl.isLevel(e)){const n=e.properties.find((e=>r.test(e.name)));n&&t.push(n)}}))}const r=e.getParam("options"),o=e.getParam("pagination"),a=e.getParam("sorting"),i=e.getParam("calculations"),l=i.filter((e=>"growth"===e.kind)).pop(),s=i.filter((e=>"rca"===e.kind)).pop(),c=i.filter((e=>"topk"===e.kind)).pop();return{captions:Ll(t,u),cuts:Ll(e.getParam("cuts"),(function(e){const{drillable:t}=e,n=Xl.isLevel(t)?[t.dimension.name,t.hierarchy.name,t.name]:_s(t.fullName);return(e.isExclusive?"~":"")+(e.isForMatch?"*":"")+ks(n.concat(e.members.join(",")))})),drilldowns:Ll(e.getParam("drilldowns"),(e=>Xl.isLevel(e)?e.fullName:e.name)),filters:Ll(e.getParam("filters"),Is),measures:Ll(e.getParam("measures"),(e=>e.name)),properties:Ll(e.getParam("properties"),u),limit:o.limit?o.offset>0?"".concat(o.offset,",").concat(o.limit):"".concat(o.limit):void 0,sort:Nl.isMeasure(a.property)?"".concat(a.property.name,".").concat(a.direction):"string"==typeof a.property?"".concat(a.property,".").concat(a.direction):void 0,debug:r.debug,exclude_default_members:r.exclude_default_members,parents:r.parents,sparse:r.sparse,growth:l&&"".concat(l.category.fullName,",").concat(l.value.name),rca:s&&"".concat(s.location.fullName,",").concat(s.category.fullName,",").concat(s.value.name),top:c&&(e=>{const t=Nl.isMeasure(e.value)?e.value.name:e.value;return"".concat(e.amount,",").concat(e.category.fullName,",").concat(t,",").concat(e.order)})(c)};function u(e){return ks([e.level.dimension.name,e.level.hierarchy.name,e.level.name,e.name])}}function Vs(e,t){const n=e.cube,r={};for(const a of n.levelIterator)r[a.fullName]=a;const o={};for(const a of n.propertyIterator)o[a.fullName]=a;if(Gl(t.captions).forEach((t=>{const n=o[t];n&&e.addCaption(n)})),Gl(t.cuts).forEach((t=>{const{drillable:n,members:o,exclusive:a,forMatch:i}=function(e){let t=e;const n="~"===t[0];t=n?t.slice(1):t;const r="*"===t[0];t=r?t.slice(1):t;const o=_s(e),a=o.pop()||"";return{drillable:ks(o),members:a.split(","),exclusive:n,forMatch:r}}(t),l=r[n];l&&e.addCut(l,o,{exclusive:a,forMatch:i})})),Gl(t.drilldowns).forEach((t=>{const n=r[t];n&&e.addDrilldown(n)})),Gl(t.filters).forEach((t=>{const r=t.indexOf("."),o=t.slice(0,r),a=Il[o]||n.measuresByName[o];if(a){const{const1:n,const2:r,joint:o}=Rs(t);e.addFilter(a,n,o,r)}})),Gl(t.measures).forEach((t=>{const r=n.measuresByName[t];r&&e.addMeasure(r)})),Gl(t.properties).forEach((t=>{const n=o[t];n&&e.addProperty(n)})),t.growth){const[o,a]=t.growth.split(","),i=r[o],l=n.measuresByName[a];i&&l&&e.addCalculation("growth",{category:i,value:l})}if(t.rca){const[o,a,i]=t.rca.split(","),l=r[o],s=r[a],c=n.measuresByName[i];l&&s&&c&&e.addCalculation("rca",{category:l,location:s,value:c})}if(t.top){const[o,a,i,l]=t.top.split(","),s=Number.parseInt(o),c=r[a],u=Il[i]||n.measuresByName[i];s>0&&c&&u&&e.addCalculation("topk",{amount:s,category:c,value:u,order:Ml[l]||"desc"})}if(null!=t.limit){const n="".concat(t.limit).split(","),r=2===n.length?n[0]:"0",o=2===n.length?n[1]:n[0];e.setPagination(Number.parseInt(o,10),Number.parseInt(r,10))}if(t.sort){const r=t.sort.lastIndexOf("."),o=t.sort.slice(0,r),a=t.sort.slice(r+1),i=Il[o]||n.measuresByName[o];i&&e.setSorting(i,Ml[a]||"desc")}return"boolean"==typeof t.debug&&e.setOption("debug",t.debug),"boolean"==typeof t.distinct&&e.setOption("distinct",t.distinct),"boolean"==typeof t.exclude_default_members&&e.setOption("exclude_default_members",t.exclude_default_members),"boolean"==typeof t.nonempty&&e.setOption("nonempty",t.nonempty),"boolean"==typeof t.parents&&e.setOption("parents",t.parents),"boolean"==typeof t.sparse&&e.setOption("sparse",t.sparse),e}function Us(e){return t=>{const n=xl(e.server_uri,"cubes",encodeURIComponent(t.name)),r={...e,cube_name:t.name,cube_uri:n};return{_type:"cube",annotations:t.annotations,caption:t.annotations.caption,dimensions:t.dimensions.map(Gs(r)),measures:t.measures.map($s(r)),name:t.name,namedsets:[],uri:n}}}function Gs(e){return t=>{var n;const r=t.name,o=[r],a=xl(e.cube_uri,"dimensions",encodeURIComponent(r)),i={...e,dimension_fullname:o,dimension_name:r,dimension_uri:a};return{_type:"dimension",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,defaultHierarchy:null!=(n=t.default_hierarchy)?n:t.hierarchies[0].name,dimensionType:Fl[t.type]||"std",fullName:ks(o),hierarchies:t.hierarchies.map(Hs(i)),name:t.name,uri:a}}}function Hs(e){return t=>{const n=t.name,r=e.dimension_fullname.concat(n),o=xl(e.dimension_uri,"hierarchies",encodeURIComponent(n)),a={...e,hierarchy_fullname:r,hierarchy_name:n,hierarchy_uri:o};return{_type:"hierarchy",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,dimension:e.dimension_name,fullName:ks(r),levels:t.levels.map(qs(a)),name:t.name,uri:o}}}function qs(e){return(t,n)=>{const r=t.name,o=e.hierarchy_fullname.concat(r),a=xl(e.hierarchy_uri,"levels",encodeURIComponent(t.name)),i={...e,level_name:r,level_uri:a};return{_type:"level",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,depth:n+1,dimension:e.dimension_name,fullName:ks(o),hierarchy:e.hierarchy_name,name:t.name,properties:Gl(t.properties).map(Ws(i)),uniqueName:t.unique_name,uri:a}}}function $s(e){return t=>{var n,r;const o=null==(n=t.aggregator.name)?void 0:n.toUpperCase();return{_type:"measure",aggregatorType:null!=(r=Ol[o])?r:"UNKNOWN",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,name:t.name,uri:xl(e.cube_uri,"measures",encodeURIComponent(t.name))}}}function Ws(e){return t=>({_type:"property",annotations:t.annotations,captionSet:t.caption_set,cube:e.cube_name,dimension:e.dimension_name,hierarchy:e.hierarchy_name,level:e.level_name,name:t.name,uniqueName:t.unique_name,uri:xl(e.level_uri,"properties",encodeURIComponent(t.name))})}function Ks(e){const t=e.cube,n=ql(e.getParam("drilldowns"),(e=>Xl.isLevel(e)?e.uniqueName:null)),r=ql(e.getParam("filters"),Is),o=ql(e.getParam("measures"),(e=>e.name)),a=ql(e.getParam("properties"),(e=>e.uniqueName)),i=e.getParam("options"),l=e.getParam("pagination"),s=e.getParam("sorting"),c=e.getParam("time"),u=e.getParam("calculations").reverse(),d=u.find((e=>"growth"===e.kind)),p=u.find((e=>"rca"===e.kind)),m=u.find((e=>"topk"===e.kind)),g={cube:t.name,locale:e.getParam("locale")||void 0,drilldowns:n.join(",")||void 0,properties:a.join(",")||void 0,measures:o.join(",")||void 0,filters:r.join(",")||void 0,limit:l.limit?l.offset>0?"".concat(l.offset,",").concat(l.limit):"".concat(l.limit):void 0,sort:Nl.isMeasure(s.property)?"".concat(s.property.name,".").concat(s.direction):"string"==typeof s.property?"".concat(s.property,".").concat(s.direction):void 0,time:null!=c.precision&&null!=c.value?"".concat(c.precision,".").concat(c.value):void 0,debug:i.debug,exclude_default_members:i.exclude_default_members,parents:i.parents,sparse:i.sparse,growth:d&&"".concat(d.category.uniqueName,",").concat(d.value.name),rca:p&&"".concat(p.location.uniqueName,",").concat(p.category.uniqueName,",").concat(p.value.name),top:m&&(e=>{const t=Nl.isMeasure(e.value)?e.value.name:e.value;return"".concat(e.amount,",").concat(e.category.uniqueName,",").concat(t,",").concat(e.order)})(m)},f=ql(e.getParam("cuts"),(e=>{const{drillable:t}=e,n=Xl.isLevel(t)?t:void 0;return n?e.isExclusive?"".concat(n.uniqueName,":").concat(e.members.join(",")):(g[n.uniqueName]=e.members.join(","),null):null}));return g.exclude=f.join(";")||void 0,g}function Ys(e,t){const n=e.cube,r={};for(const m of n.levelIterator)r[m.uniqueName]=m;const o={};for(const m of n.propertyIterator)o[m.uniqueName]=m;const a=["cube","drilldowns","time","measures","properties","filters","parents","top","sort","limit","growth","rca","rate","top_where","debug","exclude","exclude_default_members","locale","distinct","nonempty","sparse"],i=ql(Object.keys(t),(e=>e in r&&!a.includes(e)?{level:e,members:Hl("".concat(t[e]||""))}:null)),l=ql(Hl(t.exclude,";"),(e=>{const[t,n]=Hl(e,":");return t in r?{level:t,members:n.split(","),exclusive:!0}:null})),[s,c]=Hl(t.limit),[u,d]=Hl(t.sort),p={cube:t.cube,locale:t.locale||"",drilldowns:ql(Hl(t.drilldowns),(e=>e in r?{level:e}:null)),measures:ql(Hl(t.measures),(e=>e in n.measuresByName?e:null)),properties:ql(Hl(t.properties),(e=>e in o?{property:e}:null)),filters:ql(Hl(t.filters),(e=>{const[t,...r]=Hl(e,"."),o=Il[t]||n.measuresByName[t];if(!o)return null;const{const1:a,const2:i,joint:l}=Rs(r.join("."));return{measure:o,constraint:a,joint:l,constraint2:i}})),cuts:i.concat(l),options:{debug:t.debug,exclude_default_members:t.exclude_default_members,parents:t.parents,sparse:t.sparse},page_limit:Number.parseInt(s)||0,page_offset:Number.parseInt(c)||0,sort_property:u,sort_direction:Ml[d]||"asc",time:void 0};if(t.growth){const[o,a]=t.growth.split(","),i=r[o],l=n.measuresByName[a];i&&l&&e.addCalculation("growth",{category:i,value:l})}if(t.rca){const[o,a,i]=t.rca.split(","),l=r[o],s=r[a],c=n.measuresByName[i];l&&s&&c&&e.addCalculation("rca",{category:l,location:s,value:c})}if(t.top){const[o,a,i,l]=t.top.split(","),s=Number.parseInt(o),c=r[a],u=n.measuresByName[i];s&&c&&u&&e.addCalculation("topk",{amount:s,category:c,order:Ml[l]||"desc",value:u})}if(t.time){const n=ql(t.time.split("."),(e=>e||null)),r=Al[n[0]],o=Bl(n[1])?n[1]:Tl[n[1]];r&&null!=o&&e.setTime(r,o)}return rs(e,p)}zs.endpoints=[""],zs.formats=["csv","tsv","jsonarrays","jsonrecords","xlsx"],zs.softwareName=Ds;var Xs="tesseract-olap",Qs=class e{constructor(e){if(this.axiosInstance=hl.create({}),this.serverSoftware=Xs,this.serverVersion="",this.serverUrl="/",!e||"string"!=typeof e)throw new TypeError("Invalid Tesseract OLAP server URL: ".concat(e));const t=xl(e,"/");this.serverUrl=t,this.setRequestConfig({baseURL:t})}checkStatus(){return this.axiosInstance.get("/").then((e=>{const{status:t,tesseract_version:n}=e.data;return this.serverOnline="ok"===t,this.serverVersion=n,{software:this.serverSoftware,online:this.serverOnline,url:this.serverUrl,version:this.serverVersion}}),(e=>{throw this.serverOnline=!1,e}))}execQuery(e,t="aggregate"){return"aggregate"===t?this.execQueryAggregate(e):"logiclayer"===t?this.execQueryLogicLayer(e):Promise.reject(new Error("Invalid endpoint type: ".concat(t)))}execQueryAggregate(e){const t=Bs(e),n=e.getParam("format"),r="cubes/".concat(e.cube.name,"/aggregate.").concat(n),o=ca(t,{ignorenull:!0,skipIndex:!0,sorted:!0});return this.axiosInstance.get(r,{params:t}).then((t=>({data:"jsonrecords"===n?t.data.data:t.data,headers:{...t.headers},query:e,status:t.status,url:"".concat(xl(this.serverUrl,r),"?").concat(o)})))}execQueryLogicLayer(e){const t=Ks(e),n=e.getParam("format"),r="data.".concat(n),o=ca(t,{ignorenull:!0,skipIndex:!0,sorted:!0});return this.axiosInstance.get(r,{params:t}).then((t=>({data:"jsonrecords"===n?t.data.data:t.data,headers:{...t.headers},query:e,status:t.status,url:"".concat(xl(this.serverUrl,r),"?").concat(o)})))}fetchCube(e){const t=Us({server_uri:this.serverUrl});return this.axiosInstance.get("cubes/".concat(e)).then((e=>{const n=e.data;if(n&&"string"==typeof n.name)return t(n);throw new ss(e)}),(t=>{if(t.response){if(404===t.response.status)throw new ss(t.response,'Cube named "'.concat(e,'" is not available in server ').concat(this.serverUrl));throw new ss(t.response,t.message)}throw t}))}fetchCubes(){const e=Us({server_uri:this.serverUrl});return this.axiosInstance.get("cubes").then((t=>{const n=t.data;if(n&&Array.isArray(n.cubes))return n.cubes.map(e);throw new ss(t)}))}fetchMembers(e,t={}){const n={cube:e.cube.name,level:e.name,locale:t.locale||void 0},r=(o={level_name:n.level,locale:(n.locale||"").toUpperCase(),server_uri:this.serverUrl},e=>{const t=e["".concat(o.locale," Label")]||e.Label||"".concat(e.ID);return{_type:"member",ancestors:[],caption:t,children:[],fullName:ks([o.level_name,"".concat(e.ID)]),key:e.ID,level:o.level_name,name:t,uri:xl(o.server_uri,"members?level=".concat(encodeURIComponent(o.level_name)))}});var o;return this.axiosInstance.get("members.jsonrecords",{params:n}).then((e=>{const{data:t}=e.data;return t.map(r)}))}fetchMember(e,t,n={}){return this.fetchMembers(e,n).then((n=>{const r=n.find((e=>e.key==t));if(r)return r;throw new Error("Can't find member with key '".concat(t,"' for level '").concat(e.name,"'"))}))}parseQueryURL(e,t,n){const r=t.indexOf("?"),o=t.slice(r+1),a=Sl(o),i=t.match(/^.+\/(?:aggregate|data)(\.[a-z]+)?\?.+$/);if(i){const t="".concat(i[1]||"").slice(1);e.setFormat(t)}const l=Js(a,n);if(t.indexOf("/aggregate")>-1)return Vs(e,l);if(t.indexOf("/data")>-1){if(a.cube!==e.cube.name)throw new Error("URL and Query object belong to different cubes\n Query cube: ".concat(e.cube.name,"\n URL cube: ").concat(a.cube));return Ys(e,l)}throw new Error("Provided URL is not a valid Tesseract OLAP query URL: ".concat(t))}setRequestConfig(e){Object.assign(this.axiosInstance.defaults,e)}stringifyQueryURL(t,n){return"logiclayer"===n?e.urlLogicLayer(t):e.urlAggregate(t)}static urlAggregate(e){const t=e.getParam("format"),n=Bs(e),r=ca(n,{ignorenull:!0,skipIndex:!0,sorted:!0});return xl(e.cube.toString(),"aggregate.".concat(t,"?").concat(r))}static urlLogicLayer(e){const t=e.getParam("format"),n=Ks(e),r=ca(n,{ignorenull:!0,skipIndex:!0,sorted:!0});return xl(e.cube.server,"data.".concat(t,"?").concat(r))}};Qs.endpoints=["logiclayer","aggregate"],Qs.formats=["csv","jsonarrays","jsonrecords"],Qs.softwareName=Xs,Qs.queryAggregate=Vs,Qs.queryLogicLayer=Ys;var Zs=Qs;function Js(e,t={}){const{exclude:n,include:r,filter:o}=t,a=()=>!0;let i="function"==typeof o?o:a;if(n||r){const e=Array.isArray(r)?e=>r.reduce(((t,n)=>t&&e===n),!0):a,t=Array.isArray(n)?e=>n.reduce(((t,n)=>t&&e!==n),!0):a;i=n=>e(n)&&t(n)}const l={};return Object.keys(e).forEach((t=>{const n=e[t];i(t,n)&&Object.defineProperty(l,t,{enumerable:!0,value:n})})),l}function ec(e,t,n){const r=Xl.isLevel(t)?t.cube.name:Xl.isLevelDescriptor(t)?t.cube:void 0;return r?e.getCube(r,n).then((e=>e.getLevel(t))):e.getCubes().then((e=>{let n=e.length;for(;n--;){const r=Wl(e[n].levelIterator,t);if(null!=r)return r}throw new Error("No level matched the descriptor ".concat(JSON.stringify(t)))}))}function tc(e){const t="string"==typeof e?{url:e}:e,{url:n,...r}=t;if(!n){const t="DataSource can be built with a string URL or an object with the 'url' property.\nReceived ".concat(JSON.stringify(e));return Promise.reject(new Error(t))}const o=xl(n,"cubes");return hl({...r,url:o}).then((e=>{if(200===e.status&&"cubes"in e.data){let t;return t="locales"in e.data?new zs(n):"name"in e.data?new Zs(n):new Es(n),t.setRequestConfig(r),t}throw new ss(e,"URL is not a known OLAP server: ".concat(n))}),(e=>{throw e.message+="\nURL is not a known OLAP server: ".concat(n),e}))}function nc(e){const t=/\/cubes\/([^\/]+)\/|\bcube=([^&]+)&/.exec(e);if(t)return t[1]||t[2];throw new Error("Provided URL is not a valid Query URL: ".concat(e))}var rc=class e{constructor(e){this._cache=new Cl((e=>e.name)),e&&this.setDataSource(e)}static dataSourceFromURL(e){return tc(e)}static fromURL(t){return tc(t).then((t=>new e(t)))}checkStatus(){return this.datasource.checkStatus()}get datasource(){if(this._ds)return this._ds;throw new Error("This Client instance has no DataSource configured.\nVerify the initialization procedure, there might be a race condition.")}execQuery(e,t){return this.datasource.execQuery(e,t)}getCube(e){const t=this.datasource;return this._cache.getItem(e,(()=>t.fetchCube(e).then((e=>new is(e,t)))))}getCubes(){const e=this.datasource;return this._cache.getAllItems((()=>e.fetchCubes().then((t=>t.map((t=>new is(t,e)))))))}getMember(e,t,n){return ec(this,e).then((e=>this.datasource.fetchMember(e,t,n).then((t=>new ls(t,e)))))}getMembers(e,t){return ec(this,e).then((e=>this.datasource.fetchMembers(e,t).then((t=>t.map((t=>new ls(t,e)))))))}parseQueryURL(e,t={}){const{serverUrl:n}=this.datasource;if(!t.anyServer&&-1===e.indexOf(n)){const t="Provided URL doesn't belong to the datasource set on this client instance:\nDataSource server: ".concat(n,"\nProvided server: ").concat(e.slice(0,e.indexOf("/",10)),"\n");return Promise.reject(new Error(t))}return Promise.resolve(e).then(nc).then((e=>this.getCube(e))).then((n=>this.datasource.parseQueryURL(n.query,e,t)))}setDataSource(e){e!==this._ds&&(this._ds=e,this._cache=new Cl((e=>e.name)))}setRequestConfig(e){this.datasource.setRequestConfig(e)}},oc={},ac={exports:{}},ic={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ic);var lc=ic.exports;!function(e){var t=lc.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=t(e)&&"function"!=typeof e)return{default:e};var o=n(r);if(o&&o.has(e))return o.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var s=i?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(a,l,s):a[l]=e[l]}return a.default=e,o&&o.set(e,a),a},e.exports.__esModule=!0,e.exports.default=e.exports}(ac);var sc=ac.exports,cc={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(cc);var uc,dc={exports:{}},pc={exports:{}};var mc,gc={exports:{}};var fc,hc,bc={exports:{}},vc={exports:{}};function yc(){return hc||(hc=1,function(e){var t=(fc||(fc=1,function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:"y",t={minHeight:"y"===e?"minHeight":"minWidth",height:"y"===e?"height":"width",maxHeight:"y"===e?"maxHeight":"maxWidth"};return function(e){var n;return n={},(0,Ac.default)(n,t.minHeight,e),(0,Ac.default)(n,t.height,e),(0,Ac.default)(n,t.maxHeight,e),(0,Ac.default)(n,"overflowAnchor","none"),(0,Ac.default)(n,"pointerEvents","none"),(0,Ac.default)(n,"userSelect","none"),(0,Ac.default)(n,"padding",0),(0,Ac.default)(n,"margin",0),(0,Ac.default)(n,"border","none"),n}},Dc=function(){try{return window.CSS.supports("overflow-anchor: auto")}catch(e){return!1}}(),zc=Tc.default.forwardRef((function(e,t){var n=e.viewportRef,r=void 0===n?null:n,o=e.items,a=void 0===o?[]:o,i=e.itemMinSize,l=e.margin,s=void 0===l?0:l,c=e.overscan,u=void 0===c?1:c,d=e.axis,p=void 0===d?"y":d,m=e.initialIndex,g=void 0===m?0:m,f=e.initialAlignToTop,h=void 0===f||f,b=e.children,v=(0,Tc.useMemo)((function(){return{propName:{top:"y"===p?"top":"left",bottom:"y"===p?"bottom":"right",clientHeight:"y"===p?"clientHeight":"clientWidth",scrollTop:"y"===p?"scrollTop":"scrollLeft",overflowY:"y"===p?"overflowY":"overflowX"},getStyle:Lc(p)}}),[p]),y=v.propName,w=v.getStyle,x=a.length-1,S=i+s,C=u*S,E=(0,Tc.useState)((function(){var e=Nc(0,g,x);return[e,e]})),k=(0,Mc.default)(E,2),_=(0,Mc.default)(k[0],2),R=_[0],O=_[1],I=k[1],P=(0,Tc.useRef)(null),F=(0,Tc.useRef)(null),j=(0,Tc.useRef)({cache:[],step:function(){},scrollToIndex:R?{index:R,alignToTop:h}:null,scrollCompensationEndIndex:null}),M=Nc(0,R,x),A=Nc(M,O,x),T=(0,Tc.useMemo)((function(){return w(j.current.cache.slice(0,M).reduce((function(e,t){return e+t}),M*S))}),[M,S,w]),N=(0,Tc.useMemo)((function(){return w(j.current.cache.slice(A+1,x).reduce((function(e,t){return e+t}),S*(x-A)))}),[A,x,S,w]),L=(0,Tc.useMemo)((function(){return a.slice(M,A+1).map((function(e,t){return b(e,M+t)}))}),[a,M,A,b]);return j.current.step=function(){var e,t,n,o=r&&r.current&&r.current.getBoundingClientRect(),a=(o?Nc(0,o[y.top],document.documentElement[y.clientHeight]):0)-C,l=(o?Nc(0,o[y.bottom],document.documentElement[y.clientHeight]):document.documentElement[y.clientHeight])+C,c=P.current.nextSibling.getBoundingClientRect(),u=F.current.previousSibling.getBoundingClientRect(),d=Math.ceil((l-a)/S),p=R,m=O;if(j.current.scrollToIndex){var g=Nc(0,j.current.scrollToIndex.index,x);if(g>=R&&g<=O){for(t=R,n=P.current.nextSibling;n!==F.current;){if(t===g){n.scrollIntoView(j.current.scrollToIndex.alignToTop),j.current.scrollToIndex=null;break}n=n.nextSibling,++t}return}p=g-d,m=g+d}else if(c[y.top]>=l){for(e=c[y.top]-l,m=R;e>=0&&m>0;)e-=(j.current.cache[--m]||0)+S;j.current.scrollCompensationEndIndex=R,p=m-d}else if(u[y.bottom]+s<=a){for(e=a-u[y.bottom]+s,p=O;e>=0&&p=a){for(e=c[y.top]-a;e>=0&&p>0;)e-=(j.current.cache[--p]||0)+S;j.current.scrollCompensationEndIndex=R}if(u[y.bottom]+s<=l)for(e=l-u[y.bottom]-s;e>=0&&ml&&--m}if(p=Nc(0,p,x),m=Nc(p,m,x),p!==R||m!==O){for(t=R,n=P.current.nextSibling;t<=O&&n!==F.current;)j.current.cache[t++]=n[y.clientHeight]-i,n=n.nextSibling;I([p,m])}},(0,Tc.useImperativeHandle)(t,(function(){return{scrollToIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.current.scrollToIndex={index:e,alignToTop:t}}}}),[]),(0,Tc.useLayoutEffect)((function(){if(null!==j.current.scrollCompensationEndIndex)if(r&&!Dc){for(var e=R,t=P.current.nextSibling,n=0;e{t.setState((t=>({...t,[e]:Xc(n,t[e])})))}}function Zc(e){return e instanceof Function}function Jc(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}function eu(e,t,n){let r,o=[];return()=>{let a;n.key&&n.debug&&(a=Date.now());const i=e();if(!(i.length!==o.length||i.some(((e,t)=>o[t]!==e))))return r;let l;if(o=i,n.key&&n.debug&&(l=Date.now()),r=t(...i),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const nu={createTable:e=>{e.getHeaderGroups=eu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var a,i;const l=null!=(a=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[],s=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[];return ru(t,[...l,...n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),...s],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=eu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>ru(t,n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=eu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;return ru(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightHeaderGroups=eu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;return ru(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFooterGroups=eu((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFooterGroups=eu((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFooterGroups=eu((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFooterGroups=eu((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFlatHeaders=eu((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=eu((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=eu((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFlatHeaders=eu((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=eu((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=eu((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightLeafHeaders=eu((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeafHeaders=eu((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,a,i,l,s;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(a=null==(i=t[0])?void 0:i.headers)?a:[],...null!=(l=null==(s=n[0])?void 0:s.headers)?l:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}};function ru(e,t,n,r){var o,a;let i=0;const l=function(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&l(e.columns,t+1)}),0)};l(e);let s=[];const c=(e,t)=>{const o={depth:t,id:[r,"".concat(t)].filter(Boolean).join("_"),headers:[]},a=[];e.forEach((e=>{const i=[...a].reverse()[0];let l,s=!1;if(e.column.depth===o.depth&&e.column.parent?l=e.column.parent:(l=e.column,s=!0),i&&(null==i?void 0:i.column)===l)i.subHeaders.push(e);else{const o=tu(n,l,{id:[r,t,l.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?"".concat(a.filter((e=>e.column===l)).length):void 0,depth:t,index:a.length});o.subHeaders.push(e),a.push(o)}o.headers.push(e),e.headerGroup=o})),s.push(o),t>0&&c(a,t-1)},u=t.map(((e,t)=>tu(n,e,{depth:i,index:t})));c(u,i-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(a=s[0])?void 0:a.headers)?o:[]),s}const ou={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},au={getDefaultColumnDef:()=>ou,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:Qc("columnSizing",e),onColumnSizingInfoChange:Qc("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:ou.minSize,null!=(r=null!=a?a:e.columnDef.size)?r:ou.size),null!=(o=e.columnDef.maxSize)?o:ou.maxSize)},e.getStart=n=>{const r=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=r.findIndex((t=>t.id===e.id));if(o>0){const e=r[o-1];return e.getStart(n)+e.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),r=null==n?void 0:n.getCanResize();return o=>{if(!n||!r)return;if(null==o.persist||o.persist(),lu(o)&&o.touches&&o.touches.length>1)return;const a=e.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],l=lu(o)?Math.round(o.touches[0].clientX):o.clientX,s={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var t,r;const o=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),a=Math.max(o/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*a,0))/100})),{...e,deltaOffset:o,deltaPercentage:a}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...s}))))},u=e=>c("move",e),d=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p={moveHandler:e=>u(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",p.moveHandler),document.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),u(e.touches[0].clientX),!1),upHandler:e=>{var t;document.removeEventListener("touchmove",m.moveHandler),document.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof iu)return iu;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return iu=e,iu}()&&{passive:!1};lu(o)?(document.addEventListener("touchmove",m.moveHandler,g),document.addEventListener("touchend",m.upHandler,g)):(document.addEventListener("mousemove",p.moveHandler,g),document.addEventListener("mouseup",p.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:n.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;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;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;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;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;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;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let iu=null;function lu(e){return"touchstart"===e.type}const su={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Qc("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;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,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const a=!0===r||!(null==r||!r[e.id]);let i={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{i[e]=!0})):i=r,n=null!=(o=n)?o:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:t,...n}=i;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},cu=(e,t,n)=>{var r;const o=n.toLowerCase();return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())||null==(r=r.toLowerCase())?void 0:r.includes(o))};cu.autoRemove=e=>yu(e);const uu=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};uu.autoRemove=e=>yu(e);const du=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};du.autoRemove=e=>yu(e);const pu=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};pu.autoRemove=e=>yu(e)||!(null!=e&&e.length);const mu=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));mu.autoRemove=e=>yu(e)||!(null!=e&&e.length);const gu=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));gu.autoRemove=e=>yu(e)||!(null!=e&&e.length);const fu=(e,t,n)=>e.getValue(t)===n;fu.autoRemove=e=>yu(e);const hu=(e,t,n)=>e.getValue(t)==n;hu.autoRemove=e=>yu(e);const bu=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};bu.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,a=null===t||Number.isNaN(r)?-1/0:r,i=null===n||Number.isNaN(o)?1/0:o;if(a>i){const e=a;a=i,i=e}return[a,i]},bu.autoRemove=e=>yu(e)||yu(e[0])&&yu(e[1]);const vu={includesString:cu,includesStringSensitive:uu,equalsString:du,arrIncludes:pu,arrIncludesAll:mu,arrIncludesSome:gu,equals:fu,weakEquals:hu,inNumberRange:bu};function yu(e){return null==e||""===e}function wu(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const xu={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(r=n,!Array.isArray(r)||!r.every((e=>"number"==typeof e)))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),a=n.sort(((e,t)=>e-t));return n.length%2!=0?a[o]:(a[o-1]+a[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};const Su={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Qc("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;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{Cu(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=eu((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?Eu(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=eu((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?Eu(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=eu((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?Eu(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((a=>{var i;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return a;const l={...a};return Cu(l,e.id,n,null==(i=null==r?void 0:r.selectChildren)||i,t),l}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return ku(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===_u(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===_u(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},Cu=(e,t,n,r,o)=>{var a;const i=o.getRow(t);n?(i.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(a=i.subRows)&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>Cu(e,t.id,n,r,o)))};function Eu(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(e,t){return e.map((e=>{var t;const i=ku(e,n);if(i&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:a(e.subRows)}),i)return e})).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:o}}function ku(e,t){var n;return null!=(n=t[e.id])&&n}function _u(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,a=!1;return e.subRows.forEach((e=>{if((!a||o)&&(e.getCanSelect()&&(ku(e,t)?a=!0:o=!1),e.subRows&&e.subRows.length)){const n=_u(e,t);"all"===n?a=!0:"some"===n?(a=!0,o=!1):o=!1}})),o?"all":!!a&&"some"}const Ru=/([0-9]+)/gm;function Ou(e,t){return e===t?0:e>t?1:-1}function Iu(e){return"boolean"==typeof e?String(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Pu(e,t){const n=parseFloat(e),r=parseFloat(t);if(!isNaN(n)&&!isNaN(r))return Ou(n,r);const o=e.split(Ru).filter(Boolean),a=t.split(Ru).filter(Boolean);for(;o.length&&a.length;){const e=o.shift(),t=a.shift(),n=parseInt(e,10),r=parseInt(t,10),i=[n,r].sort();if(isNaN(i[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(i[1]))return isNaN(n)?-1:1;if(n>r)return 1;if(r>n)return-1}}return o.length-a.length}const Fu={alphanumeric:(e,t,n)=>Pu(Iu(e.getValue(n)).toLowerCase(),Iu(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Pu(Iu(e.getValue(n)),Iu(t.getValue(n))),text:(e,t,n)=>Ou(Iu(e.getValue(n)).toLowerCase(),Iu(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Ou(Iu(e.getValue(n)),Iu(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rOu(e.getValue(n),t.getValue(n))},ju=[nu,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Qc("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,r;return null==(n=null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=eu((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getVisibleCells=eu((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{const t=(t,n)=>eu((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;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;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Qc("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=eu((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));return"remove"===n?r:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...r]}(o,t,n)}),{key:!1})}},{getInitialState:e=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Qc("columnPinning",e),onRowPinningChange:Qc("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,a,i,l,s;return"right"===n?{left:(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(i=null==e?void 0:e.right)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(l=null==e?void 0:e.left)?l:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,a=n.some((e=>null==r?void 0:r.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return a?"left":!!i&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],i=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],l=new Set([...i,e.id,...a]);t.setRowPinning((e=>{var t,r,o,a,i,s;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:[...(null!=(a=null==e?void 0:e.bottom)?a:[]).filter((e=>!(null!=l&&l.has(e)))),...Array.from(l)]}:"top"===n?{top:[...(null!=(i=null==e?void 0:e.top)?i:[]).filter((e=>!(null!=l&&l.has(e)))),...Array.from(l)],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=l&&l.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=l&&l.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some((e=>null==r?void 0:r.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return a?"top":!!i&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const a=null==(n=t._getPinnedRows(o))?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==a?void 0:a.indexOf(e.id))?r:-1},e.getCenterVisibleCells=eu((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getLeftVisibleCells=eu((()=>[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"})))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getRightVisibleCells=eu((()=>[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"})))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(a=r.right)?void 0:a.length))},e.getLeftLeafColumns=eu((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getRightLeafColumns=eu((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getCenterLeafColumns=eu((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(a=r.bottom)?void 0:a.length))},e._getPinnedRows=t=>eu((()=>[e.getRowModel().rows,e.getState().rowPinning[t]]),((n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=r?r:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=r?r:[]).map((e=>n.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:t})))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=eu((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Qc("columnFilters",e),onGlobalFilterChange:Qc("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?vu.includesString:"number"==typeof r?vu.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?vu.equals:Array.isArray(r)?vu.arrIncludes:vu.weakEquals},e.getFilterFn=()=>{var n,r;return Zc(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:vu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,o,a;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(a=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||a)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),a=Xc(n,o?o.value:void 0);var i;if(wu(r,a,e))return null!=(i=null==t?void 0:t.filter((t=>t.id!==e.id)))?i:[];const l={id:e.id,value:a};var s;return o?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?l:t)))?s:[]:null!=t&&t.length?[...t,l]:[l]}))},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()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>vu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Zc(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:vu[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=Xc(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(wu(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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()),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()}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Qc("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return Fu.datetime;if("string"==typeof n&&(r=!0,n.split(Ru).length>1))return Fu.alphanumeric}return r?Fu.text:Fu.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Zc(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:Fu[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=null!=n;t.setSorting((i=>{const l=null==i?void 0:i.find((t=>t.id===e.id)),s=null==i?void 0:i.findIndex((t=>t.id===e.id));let c,u=[],d=a?n:"desc"===o;var p;(c=null!=i&&i.length&&e.getCanMultiSort()&&r?l?"toggle":"add":null!=i&&i.length&&s!==i.length-1?"replace":l?"toggle":"replace","toggle"===c&&(a||o||(c="remove")),"add"===c)?(u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))):u="toggle"===c?i.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===c?i.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return u}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?!!(i===a||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===i?"asc":"desc"):a},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.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();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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())}},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;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:Qc("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,r,o,a;return null!=(n=null==(r=null!=(o=null==(a=e.columnDef.enableGrouping)||a)?o:t.options.enableGrouping)||r)?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?xu.sum:"[object Date]"===Object.prototype.toString.call(r)?xu.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Zc(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:xu[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}},su,{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Qc("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;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=>Xc(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=Xc(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,Xc(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=Xc(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=eu((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&te.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+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;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},Su,au];function Mu(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:ju};const r=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let o={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;o=null!=(t=null==e.getInitialState?void 0:e.getInitialState(o))?t:o}));const a=[];let i=!1;const l={_features:ju,options:{...r,...e},initialState:o,_queue:e=>{a.push(e),i||(i=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();i=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=Xc(e,n.options);var o;n.options=(o=t,n.options.mergeOptions?n.options.mergeOptions(r,o):{...r,...o})},getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:(e,t,r)=>{var o;return null!=(o=null==n.options.getRowId?void 0:n.options.getRowId(e,t,r))?o:"".concat(r?[r.id,t].join("."):t)},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{const r=(t?n.getCoreRowModel():n.getRowModel()).rowsById[e];if(!r)throw new Error;return r},_getDefaultColumnDef:eu((()=>[n.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:!1}),_getColumnDefs:()=>n.options.columns,getAllColumns:eu((()=>[n._getColumnDefs()]),(e=>{const t=function(e,r,o){return void 0===o&&(o=0),e.map((e=>{const a=function(e,t,n,r){var o,a;const i={...e._getDefaultColumnDef(),...t},l=i.accessorKey;let s,c=null!=(o=null!=(a=i.id)?a:l?l.replace(".","_"):void 0)?o:"string"==typeof i.header?i.header:void 0;if(i.accessorFn?s=i.accessorFn:l&&(s=l.includes(".")?e=>{let t=e;for(const r of l.split(".")){var n;t=null==(n=t)?void 0:n[r]}return t}:e=>e[i.accessorKey]),!c)throw new Error;let u={id:"".concat(String(c)),accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:eu((()=>[!0]),(()=>{var e;return[u,...null==(e=u.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:eu((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=u.columns)&&t.length?e(u.columns.flatMap((e=>e.getLeafColumns()))):[u]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};for(const d of e._features)null==d.createColumn||d.createColumn(u,e);return u}(n,e,o,r),i=e;return a.columns=i.columns?t(i.columns,a,o+1):[],a}))};return t(e)}),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:eu((()=>[n.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:eu((()=>[n.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:eu((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:e=>n._getAllFlatColumnsById()[e]};Object.assign(n,l);for(let s=0;s{let l={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,r),l._valuesCache[t]):void 0},getUniqueValues:t=>{if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=a?a:[],getLeafRows:()=>Jc(l.subRows,(e=>e.subRows)),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let e=[],t=l;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:eu((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:"".concat(t.id,"_").concat(n.id),row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:eu((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,l,t,t.id)))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:eu((()=>[l.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let s=0;seu((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const r=t.filter((t=>e.getColumn(t))),o=[],a={},i=function(t,n,l){if(void 0===n&&(n=0),n>=r.length)return t.map((e=>(e.depth=n,o.push(e),a[e.id]=e,e.subRows&&(e.subRows=i(e.subRows,n+1,e.id)),e)));const s=r[n],c=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const r="".concat(n.getGroupingValue(t)),o=e.get(r);return o?o.push(n):e.set(r,[n]),e}),n)}(t,s);return Array.from(c.entries()).map(((t,c)=>{let[u,d]=t,p="".concat(s,":").concat(u);p=l?"".concat(l,">").concat(p):p;const m=i(d,n+1,p),g=n?Jc(d,(e=>e.subRows)):d,f=Au(e,p,g[0].original,c,n,void 0,l);return Object.assign(f,{groupingColumnId:s,groupingValue:u,subRows:m,leafRows:g,getValue:t=>{if(r.includes(t)){if(f._valuesCache.hasOwnProperty(t))return f._valuesCache[t];var n;if(d[0])f._valuesCache[t]=null!=(n=d[0].getValue(t))?n:void 0;return f._valuesCache[t]}if(f._groupingValuesCache.hasOwnProperty(t))return f._groupingValuesCache[t];const o=e.getColumn(t),a=null==o?void 0:o.getAggregationFn();return a?(f._groupingValuesCache[t]=a(t,g,d),f._groupingValuesCache[t]):void 0}}),m.forEach((e=>{o.push(e),a[e.id]=e})),f}))},l=i(n.rows,0);return l.forEach((e=>{o.push(e),a[e.id]=e})),{rows:l,flatRows:o,rowsById:a}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}function Lu(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}} +/** + * match-sorter-utils + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +const Du={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},zu=Object.keys(Du).join("|"),Bu=new RegExp(zu,"g"); +/** + * @name match-sorter + * @license MIT license. + * @copyright (c) 2099 Kent C. Dodds + * @author Kent C. Dodds (https://kentcdodds.com) + */ +const Vu={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Uu(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:Vu.MATCHES,!n.accessors){const r=Gu(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}const o=function(e,t){const n=[];for(let r=0,o=t.length;r=Vu.MATCHES?r=l:r>s&&(r=s),r=Math.min(r,s),r>=c&&r>a.rank&&(a.rank=r,a.passed=!0,a.accessorIndex=i,a.accessorThreshold=c,a.rankedValue=e.itemValue)}return a}function Gu(e,t,n){return e=Hu(e,n),(t=Hu(t,n)).length>e.length?Vu.NO_MATCH:e===t?Vu.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?Vu.EQUAL:e.startsWith(t)?Vu.STARTS_WITH:e.includes(" ".concat(t))?Vu.WORD_STARTS_WITH:e.includes(t)?Vu.CONTAINS:1===t.length?Vu.NO_MATCH:function(e){let t="";return e.split(" ").forEach((e=>{e.split("-").forEach((e=>{t+=e.substr(0,1)}))})),t}(e).includes(t)?Vu.ACRONYM:function(e,t){let n=0,r=0;function o(e,t,r){for(let o=r,a=t.length;o-1))return Vu.NO_MATCH}return a(r-i)}(e,t)}function Hu(e,t){let{keepDiacritics:n}=t;return e="".concat(e),n||(e=e.replace(Bu,(e=>Du[e]))),e}function qu(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}const $u={maxRanking:1/0,minRanking:-1/0};function Wu(e){return"function"==typeof e?$u:{...$u,...e}} +/** + * react-virtual + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ku(){return Ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;a--){var i=e[a];if(!n.has(i.lane)){var l=o.get(i.lane);if(null==l||i.end>l.end?o.set(i.lane,i):i.end0?Math.min.apply(Math,r.pendingMeasuredCacheIndexes):0;r.pendingMeasuredCacheIndexes=[];for(var s=r.measurementsCache.slice(0,l),c=l;c=r.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));var o=r.options.horizontal?"scrollWidth":"scrollHeight",a=(r.scrollElement?"document"in r.scrollElement?r.scrollElement.document.documentElement[o]:r.scrollElement[o]:0)-r.getSize();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=function(e,t){void 0===t&&(t="auto"),e=Math.max(0,Math.min(e,r.options.count-1));var n=Qu(r.getMeasurements()[e]);if("auto"===t)if(n.end>=r.scrollOffset+r.getSize()-r.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r.scrollOffset+r.options.scrollPaddingStart))return[r.scrollOffset,t];t="start"}var o="end"===t?n.end+r.options.scrollPaddingEnd:n.start-r.options.scrollPaddingStart;return[r.getOffsetForAlignment(o,t),t]},this.isDynamicMode=function(){return r.measureElementCache.size>0},this.cancelScrollToIndex=function(){null!==r.scrollToIndexTimeoutId&&(clearTimeout(r.scrollToIndexTimeoutId),r.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(e,t){var n=void 0===t?{}:t,o=n.align,a=void 0===o?"start":o,i=n.behavior;r.cancelScrollToIndex(),"smooth"===i&&r.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r._scrollToOffset(r.getOffsetForAlignment(e,a),{adjustments:void 0,behavior:i})},this.scrollToIndex=function(e,t){var n=void 0===t?{}:t,o=n.align,a=void 0===o?"auto":o,i=n.behavior;e=Math.max(0,Math.min(e,r.options.count-1)),r.cancelScrollToIndex(),"smooth"===i&&r.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var l=r.getOffsetForIndex(e,a),s=l[0],c=l[1];r._scrollToOffset(s,{adjustments:void 0,behavior:i}),"smooth"!==i&&r.isDynamicMode()&&(r.scrollToIndexTimeoutId=setTimeout((function(){var t,n;if(r.scrollToIndexTimeoutId=null,r.measureElementCache.has(r.options.getItemKey(e))){var o=r.getOffsetForIndex(e,c)[0];t=o,n=r.scrollOffset,Math.abs(t-n)<1||r.scrollToIndex(e,{align:c,behavior:i})}else r.scrollToIndex(e,{align:c,behavior:i})})))},this.scrollBy=function(e,t){var n=(void 0===t?{}:t).behavior;r.cancelScrollToIndex(),"smooth"===n&&r.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r._scrollToOffset(r.scrollOffset+e,{adjustments:void 0,behavior:n})},this.getTotalSize=function(){var e;return((null==(e=r.getMeasurements()[r.options.count-1])?void 0:e.end)||r.options.paddingStart)-r.options.scrollMargin+r.options.paddingEnd},this._scrollToOffset=function(e,t){var n=t.adjustments,o=t.behavior;r.options.scrollToFn(e,{behavior:o,adjustments:n},r)},this.measure=function(){r.itemSizeCache=new Map,r.notify()},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((function(e){r.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()},ad=function(e,t,n,r){for(;e<=t;){var o=(e+t)/2|0,a=n(o);if(ar))return o;t=o-1}}return e>0?e-1:0}; +/** + * virtual-core + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var id="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function ld(e){return function(e){var t=n.useReducer((function(){return{}}),{})[1],r=Ku({},e,{onChange:function(n){t(),null==e.onChange||e.onChange(n)}}),o=n.useState((function(){return new od(r)}))[0];return o.setOptions(r),n.useEffect((function(){return o._didMount()}),[]),id((function(){return o._willUpdate()})),o}(Ku({observeElementRect:ed,observeElementOffset:td,scrollToFn:rd},e))}function sd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const o=Uu(e.getValue(t),n,{threshold:Vu.MATCHES});return r(o),o.passed};ud.autoRemove=e=>!e;const dd=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim().includes(n.toString().toLowerCase().trim());dd.autoRemove=e=>!e;const pd=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim().startsWith(n.toString().toLowerCase().trim());pd.autoRemove=e=>!e;const md=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim().endsWith(n.toString().toLowerCase().trim());md.autoRemove=e=>!e;const gd=(e,t,n)=>null===n||e.getValue(t).toString().toLowerCase().trim()===n.toString().toLowerCase().trim();gd.autoRemove=e=>!e;const fd=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim()!==n.toString().toLowerCase().trim();fd.autoRemove=e=>!e;const hd=(e,t,n)=>null===n||(isNaN(+n)||isNaN(+e.getValue(t))?e.getValue(t).toString().toLowerCase().trim()>n.toString().toLowerCase().trim():+e.getValue(t)>+n);hd.autoRemove=e=>!e;const bd=(e,t,n)=>gd(e,t,n)||hd(e,t,n);bd.autoRemove=e=>!e;const vd=(e,t,n)=>null===n||(isNaN(+n)||isNaN(+e.getValue(t))?e.getValue(t).toString().toLowerCase().trim()!e;const yd=(e,t,n)=>gd(e,t,n)||vd(e,t,n);yd.autoRemove=e=>!e;const wd=(e,t,n)=>(["",void 0].includes(n[0])||hd(e,t,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||vd(e,t,n[1]));wd.autoRemove=e=>!e;const xd=(e,t,n)=>(["",void 0].includes(n[0])||bd(e,t,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||yd(e,t,n[1]));xd.autoRemove=e=>!e;const Sd=(e,t,n)=>!e.getValue(t).toString().trim();Sd.autoRemove=e=>!e;const Cd=(e,t,n)=>!!e.getValue(t).toString().trim();Cd.autoRemove=e=>!e;const Ed=Object.assign(Object.assign({},vu),{between:wd,betweenInclusive:xd,contains:dd,empty:Sd,endsWith:md,equals:gd,fuzzy:ud,greaterThan:hd,greaterThanOrEqualTo:bd,lessThan:vd,lessThanOrEqualTo:yd,notEmpty:Cd,notEquals:fd,startsWith:pd}),kd=Object.assign(Object.assign({},Fu),{fuzzy:(e,t,n)=>{let r=0;var o,a;return e.columnFiltersMeta[n]&&(o=e.columnFiltersMeta[n],a=t.columnFiltersMeta[n],r=o.rank===a.rank?0:o.rank>a.rank?-1:1),0===r?Fu.alphanumeric(e,t,n):r}}),_d=e=>{var t,n,r,o;return null!==(o=null!==(t=e.id)&&void 0!==t?t:null===(r=null===(n=e.accessorKey)||void 0===n?void 0:n.toString)||void 0===r?void 0:r.call(n))&&void 0!==o?o:e.header},Rd=e=>{const t=[],n=e=>{e.forEach((e=>{e.columns?n(e.columns):t.push(e)}))};return n(e),t},Od=({aggregationFns:e,columnDefs:t,columnFilterFns:n,defaultDisplayColumn:r,filterFns:o,sortingFns:a})=>t.map((t=>{var i,l;if(t.id||(t.id=_d(t)),t.columnDefType||(t.columnDefType="data"),null===(i=t.columns)||void 0===i?void 0:i.length)t.columnDefType="group",t.columns=Od({aggregationFns:e,columnDefs:t.columns,columnFilterFns:n,defaultDisplayColumn:r,filterFns:o,sortingFns:a});else if("data"===t.columnDefType){if(Array.isArray(t.aggregationFn)){const n=t.aggregationFn;t.aggregationFn=(t,r,o)=>n.map((n=>{var a;return null===(a=e[n])||void 0===a?void 0:a.call(e,t,r,o)}))}Object.keys(o).includes(n[t.id])&&(t.filterFn=null!==(l=o[n[t.id]])&&void 0!==l?l:o.fuzzy,t._filterFn=n[t.id]),Object.keys(a).includes(t.sortingFn)&&(t.sortingFn=a[t.sortingFn])}else"display"===t.columnDefType&&(t=Object.assign(Object.assign({},r),t));return t})),Id=(e,t,n)=>(e.getCanPin()&&e.pin(t.getIsPinned()),n.splice(n.indexOf(t.id),0,n.splice(n.indexOf(e.id),1)[0]),[...n]),Pd=(e,t)=>!!(e.enableExpanding||e.enableGrouping&&(void 0===t||(null==t?void 0:t.length))||e.renderDetailPanel),Fd=e=>{const t=(e=>{var t;return[(e.enableRowDragging||e.enableRowOrdering)&&"mrt-row-drag","first"===e.positionActionsColumn&&(e.enableRowActions||e.enableEditing&&["row","modal","custom"].includes(null!==(t=e.editDisplayMode)&&void 0!==t?t:""))&&"mrt-row-actions","first"===e.positionExpandColumn&&Pd(e)&&"mrt-row-expand",e.enableRowSelection&&"mrt-row-select",e.enableRowNumbers&&"mrt-row-numbers"].filter(Boolean)})(e),n=(e=>{var t;return["last"===e.positionActionsColumn&&(e.enableRowActions||e.enableEditing&&["row","modal"].includes(null!==(t=e.editDisplayMode)&&void 0!==t?t:""))&&"mrt-row-actions","last"===e.positionExpandColumn&&Pd(e)&&"mrt-row-expand"].filter(Boolean)})(e),r=Rd(e.columns).map((e=>_d(e))).filter((e=>!t.includes(e)&&!n.includes(e)));return[...t,...r,...n]},jd=e=>{const{filterVariant:t}=e;return"multi-select"===t?"arrIncludesSome":["range","date-range","range-slider"].includes(t||"")?"betweenInclusive":["select","checkbox","date"].includes(t||"")?"equals":"fuzzy"},Md=(e,t)=>"left"===t.getIsPinned()&&e.getLeftLeafHeaders().length-1===t.getPinnedIndex(),Ad=e=>"right"===e.getIsPinned()&&0===e.getPinnedIndex(),Td=(e,t)=>e.getRightLeafHeaders().slice(t.getPinnedIndex()+1).reduce(((e,t)=>e+t.getSize()),0),Nd=e=>{const{options:t,getState:n}=e,{manualExpanding:r,manualFiltering:o,manualGrouping:a,manualSorting:i,enableGlobalFilterRankedResults:l}=t,{globalFilterFn:s,expanded:c}=n();return!r&&!o&&!a&&!i&&l&&"fuzzy"===s&&!0!==c&&!Object.values(c).some(Boolean)},Ld=({column:e,header:t,isStriped:n,row:r,table:o,tableCellProps:a,theme:i})=>{var l,s,c,u,d,p,m,g,f,h;const b={minWidth:"max(calc(var(--".concat(t?"header":"col","-").concat(Vd(null!==(l=null==t?void 0:t.id)&&void 0!==l?l:e.id),"-size) * 1px), ").concat(null!==(s=e.columnDef.minSize)&&void 0!==s?s:30,"px)"),width:"calc(var(--".concat(t?"header":"col","-").concat(Vd(null!==(c=null==t?void 0:t.id)&&void 0!==c?c:e.id),"-size) * 1px)")};return Object.assign(Object.assign(Object.assign({backgroundColor:r?(null==r?void 0:r.getIsSelected())?i.fn.rgba(Bd(i),.1):e.getIsPinned()&&"group"!==e.columnDef.columnDefType?i.fn.rgba("dark"===i.colorScheme?i.fn.darken(i.colors.dark[7],.02):i.white,.97):n?"inherit":"dark"===i.colorScheme?i.fn.lighten(i.colors.dark[7],.02):i.white:"inherit",backgroundClip:"padding-box",boxShadow:Md(o,e)?"-4px 0 8px -6px ".concat(i.fn.rgba(i.black,.2)," inset"):Ad(e)?"4px 0 8px -6px ".concat(i.fn.rgba(i.black,.2)," inset"):void 0,display:"grid"===o.options.layoutMode?"flex":"table-cell",flex:"grid"===o.options.layoutMode?"var(--".concat(t?"header":"col","-").concat(Vd(null!==(u=null==t?void 0:t.id)&&void 0!==u?u:e.id),"-size) 0 auto"):void 0,left:"left"===e.getIsPinned()?"".concat(e.getStart("left"),"px"):void 0,ml:o.options.enableColumnVirtualization&&"left"===e.getIsPinned()&&0===e.getPinnedIndex()?"-".concat(e.getSize()*(null!==(p=null===(d=o.getState().columnPinning.left)||void 0===d?void 0:d.length)&&void 0!==p?p:1),"px"):void 0,mr:o.options.enableColumnVirtualization&&"right"===e.getIsPinned()&&e.getPinnedIndex()===o.getVisibleLeafColumns().length-1?"-".concat(e.getSize()*(null!==(g=null===(m=o.getState().columnPinning.right)||void 0===m?void 0:m.length)&&void 0!==g?g:1)*1.2,"px"):void 0,opacity:(null===(f=o.getState().draggingColumn)||void 0===f?void 0:f.id)===e.id||(null===(h=o.getState().hoveredColumn)||void 0===h?void 0:h.id)===e.id?.5:1,position:e.getIsPinned()&&"group"!==e.columnDef.columnDefType?"sticky":void 0,right:"right"===e.getIsPinned()?"".concat(Td(o,e),"px"):void 0,transition:o.options.enableColumnVirtualization?"none":"padding 100ms ease-in-out"},!o.options.enableColumnResizing&&b),(null==a?void 0:a.sx)instanceof Function?a.sx(i):null==a?void 0:a.sx),o.options.enableColumnResizing&&b)},Dd={filterVariant:"text",minSize:40,maxSize:1e3,size:180},zd={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},Bd=(e,t)=>e.colors[e.primaryColor][null!=t?t:(e=>{var t,n,r,o,a;return null!==(a="dark"===e.colorScheme?null!==(n=null===(t=e.primaryShade)||void 0===t?void 0:t.dark)&&void 0!==n?n:e.primaryShade:null!==(o=null===(r=e.primaryShade)||void 0===r?void 0:r.light)&&void 0!==o?o:e.primaryShade)&&void 0!==a?a:7})(e)],Vd=e=>e.replace(/[^a-zA-Z0-9]/g,"_"),Ud={actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSort:"Clear sort",clickToCopy:"Click to copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all"},Gd={IconArrowAutofitContent:ht,IconArrowsSort:bt,IconBaselineDensityLarge:vt,IconBaselineDensityMedium:yt,IconBaselineDensitySmall:wt,IconBoxMultiple:xt,IconChevronDown:Ct,IconChevronLeft:kt,IconChevronLeftPipe:Et,IconChevronRight:Rt,IconChevronRightPipe:_t,IconChevronsDown:Ot,IconCircleX:Mt,IconClearAll:Tt,IconColumns:Lt,IconDeviceFloppy:zt,IconDots:Vt,IconDotsVertical:Bt,IconEdit:Ut,IconEyeOff:Ht,IconFilter:Wt,IconFilterCog:qt,IconFilterOff:$t,IconGripHorizontal:Yt,IconMaximize:Zt,IconMinimize:Jt,IconPinned:tn,IconPinnedOff:en,IconSearch:an,IconSearchOff:on,IconSortAscending:ln,IconSortDescending:sn,IconX:bn},Hd=({cell:e,table:t})=>{var r;const{getState:o,options:{createDisplayMode:a,editDisplayMode:i,mantineEditTextInputProps:l,mantineEditSelectProps:s},refs:{editInputRefs:c},setEditingCell:u,setEditingRow:d,setCreatingRow:p}=t,{column:m,row:g}=e,{columnDef:f}=m,{creatingRow:h,editingRow:b}=o(),v=(null==h?void 0:h.id)===g.id,x=(null==b?void 0:b.id)===g.id,S="select"===f.editVariant,[C,E]=n.useState((()=>e.getValue())),k=l instanceof Function?l({cell:e,column:m,row:g,table:t}):l,_=f.mantineEditTextInputProps instanceof Function?f.mantineEditTextInputProps({cell:e,column:m,row:g,table:t}):f.mantineEditTextInputProps,R=Object.assign(Object.assign({},k),_),O=s instanceof Function?s({cell:e,column:m,row:g,table:t}):s,I=f.mantineEditSelectProps instanceof Function?f.mantineEditSelectProps({cell:e,column:m,row:g,table:t}):f.mantineEditSelectProps,P=Object.assign(Object.assign({},O),I),F=e=>{var t,n;null===(t=R.onBlur)||void 0===t||t.call(R,e),n=C,g._valuesCache[m.id]=n,v?p(g):x&&d(g),u(null)};if(f.Edit)return null===(r=f.Edit)||void 0===r?void 0:r.call(f,{cell:e,column:m,row:g,table:t});const j={disabled:!1===(f.enableEditing instanceof Function?f.enableEditing(g):f.enableEditing),label:["modal","custom"].includes(v?a:i)?m.columnDef.header:void 0,name:e.id,placeholder:["modal","custom"].includes(v?a:i)?void 0:f.header,value:C,variant:"table"===i?"unstyled":"default",onClick:e=>{var t;e.stopPropagation(),null===(t=null==R?void 0:R.onClick)||void 0===t||t.call(R,e)}};return S?Yc.jsx(y,Object.assign({},j,{searchable:!0,value:C,withinPortal:!0},P,{onBlur:F,onChange:e=>{var t;null===(t=P.onChange)||void 0===t||t.call(P,e),E(e)},onClick:e=>{var t;e.stopPropagation(),null===(t=null==P?void 0:P.onClick)||void 0===t||t.call(P,e)},ref:t=>{t&&(c.current[e.id]=t,P.ref&&(P.ref.current=t))}})):Yc.jsx(w,Object.assign({},j,{onKeyDown:t=>{var n,r;null===(n=R.onKeyDown)||void 0===n||n.call(R,t),"Enter"===t.key&&(null===(r=c.current[e.id])||void 0===r||r.blur())},value:null!=C?C:""},R,{onBlur:F,onChange:e=>{var t;null===(t=R.onChange)||void 0===t||t.call(R,e),E(e.target.value)},onClick:e=>{var t;e.stopPropagation(),null===(t=null==R?void 0:R.onClick)||void 0===t||t.call(R,e)},ref:t=>{t&&(c.current[e.id]=t,R.ref&&(R.ref.current=t))}}))},qd=({cell:e,children:t,table:n})=>{const{options:{localization:r,mantineCopyButtonProps:o}}=n,{column:a,row:i}=e,{columnDef:l}=a,s=o instanceof Function?o({cell:e,column:a,row:i,table:n}):o,c=l.mantineCopyButtonProps instanceof Function?l.mantineCopyButtonProps({cell:e,column:a,row:i,table:n}):l.mantineCopyButtonProps,u=Object.assign(Object.assign({},s),c);return Yc.jsx(x,{value:e.getValue(),children:({copied:e,copy:n})=>{var o;return Yc.jsx(d,{color:e?"green":void 0,withinPortal:!0,openDelay:1e3,label:null!==(o=null==u?void 0:u.title)&&void 0!==o?o:e?r.copiedToClipboard:r.clickToCopy,children:Yc.jsx(S,Object.assign({},u,{onClick:e=>{e.stopPropagation(),n()},sx:e=>Object.assign({backgroundColor:"transparent",border:"none",borderRadius:"4px",color:"inherit",cursor:"copy",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",justifyContent:"inherit",letterSpacing:"inherit",margin:"-4px",minWidth:"unset",padding:"4px",textAlign:"inherit",textTransform:"inherit","&:active":{transform:"translateY(1px)"},"&:hover":{backgroundColor:e.fn.rgba(Bd(e),.1)}},(null==u?void 0:u.sx)instanceof Function?u.sx(e):null==u?void 0:u.sx),title:void 0,children:t}))})}})},$d=["string","number"],Wd=["text","autocomplete"],Kd=({cell:e,table:t})=>{var n,r;const{getState:o,options:{enableFilterMatchHighlighting:a,mantineHighlightProps:i}}=t,{column:l,row:s}=e,{columnDef:c}=l,{globalFilter:u,globalFilterFn:d}=o(),p=l.getFilterValue(),m=i instanceof Function?i({cell:e,column:l,row:s,table:t}):i;let g=e.getIsAggregated()&&c.AggregatedCell?c.AggregatedCell({cell:e,column:l,row:s,table:t}):s.getIsGrouped()&&!e.getIsGrouped()?null:e.getIsGrouped()&&c.GroupedCell?c.GroupedCell({cell:e,column:l,row:s,table:t}):void 0;const f=void 0!==g;if(f||(g=e.renderValue()),a&&!1!==c.enableFilterMatchHighlighting&&g&&$d.includes(typeof g)&&(p&&$d.includes(typeof p)&&Wd.includes(c.filterVariant)||u&&$d.includes(typeof u)&&l.getCanGlobalFilter())){let e=(null!==(r=null!==(n=l.getFilterValue())&&void 0!==n?n:u)&&void 0!==r?r:"").toString();"fuzzy"===(p?c._filterFn:d)&&(e=e.split(" ")),g=Yc.jsx(C,Object.assign({highlightColor:"yellow.3",highlight:e},m,{children:null==g?void 0:g.toString()}))}return c.Cell&&!f&&(g=c.Cell({cell:e,renderedCellValue:g,column:l,row:s,table:t})),g},Yd=({cell:e,isStriped:t,measureElement:r,numRows:o,rowIndex:a,rowRef:i,table:s,virtualCell:c})=>{var d,p,m,g;const f=l(),{getState:h,options:{createDisplayMode:v,editDisplayMode:y,enableClickToCopy:w,enableColumnOrdering:x,enableEditing:S,enableGrouping:C,enableRowNumbers:E,layoutMode:k,mantineTableBodyCellProps:_,mantineSkeletonProps:R,rowNumberMode:O},refs:{editInputRefs:I},setEditingCell:P,setHoveredColumn:F}=s,{creatingRow:j,density:M,draggingColumn:A,draggingRow:T,editingCell:N,editingRow:L,hoveredColumn:D,hoveredRow:z,isLoading:B,showSkeletons:V}=h(),{column:U,row:G}=e,{columnDef:H}=U,{columnDefType:q}=H,$=_ instanceof Function?_({cell:e,column:U,row:G,table:s}):_,W=H.mantineTableBodyCellProps instanceof Function?H.mantineTableBodyCellProps({cell:e,column:U,row:G,table:s}):H.mantineTableBodyCellProps,K=Object.assign(Object.assign({},$),W),Y=R instanceof Function?R({cell:e,column:U,row:G,table:s}):R,[X,Q]=n.useState(100);n.useEffect((()=>{if(!B&&!V||100!==X)return;const e=U.getSize();Q("display"===q?e/2:Math.round(Math.random()*(e-e/3)+e/3))}),[B,V]);const Z=n.useMemo((()=>{const e=(null==A?void 0:A.id)===U.id,t=(null==D?void 0:D.id)===U.id,n=(null==T?void 0:T.id)===G.id,r=(null==z?void 0:z.id)===G.id,i=((e,t)=>t.getVisibleLeafColumns()[0].id===e.id)(U,s),l=((e,t)=>{const n=t.getVisibleLeafColumns();return n[n.length-1].id===e.id})(U,s),c=a===o&&o-1,u=e||n?"1px dashed ".concat(f.colors.gray[7]," !important"):t||r?"2px dashed ".concat(Bd(f)," !important"):void 0;return u?{borderLeft:e||t||(n||r)&&i?u:void 0,borderRight:e||t||(n||r)&&l?u:void 0,borderBottom:n||r||c?u:void 0,borderTop:n||r?u:void 0}:void 0}),[A,T,D,z,a]),J=(S instanceof Function?S(G):S)&&!1!==(H.enableEditing instanceof Function?H.enableEditing(G):H.enableEditing),ee=J&&!["modal","custom"].includes(y)&&("table"===y||(null==L?void 0:L.id)===G.id||(null==N?void 0:N.id)===e.id)&&!G.getIsGrouped(),te=J&&"row"===v&&(null==j?void 0:j.id)===G.id;return Yc.jsxs(u,Object.assign({component:"td","data-index":null==c?void 0:c.index,ref:e=>{e&&(null==r||r(e))}},K,{onDragEnter:e=>{var t;null===(t=null==K?void 0:K.onDragEnter)||void 0===t||t.call(K,e),C&&"drop-zone"===(null==D?void 0:D.id)&&F(null),x&&A&&F(!1!==H.enableColumnOrdering?U:null)},onDoubleClick:t=>{var n;null===(n=null==K?void 0:K.onDoubleClick)||void 0===n||n.call(K,t),J&&"cell"===y&&(P(e),setTimeout((()=>{var t;const n=I.current[e.id];n&&(n.focus(),null===(t=n.select)||void 0===t||t.call(n))}),100))},sx:e=>Object.assign(Object.assign({alignItems:"grid"===k?"center":void 0,cursor:J&&"cell"===y?"pointer":"inherit",justifyContent:"grid"===k?K.align:void 0,overflow:"hidden",paddingLeft:"mrt-row-expand"===U.id?"".concat(G.depth+1,"rem !important"):void 0,textOverflow:"display"!==q?"ellipsis":void 0,whiteSpace:"xs"===M?"nowrap":"normal",zIndex:(null==A?void 0:A.id)===U.id?2:U.getIsPinned()?1:0,"&:hover":{outline:ee&&["table","cell"].includes(null!=y?y:"")&&"display"!==q?"1px solid ".concat(e.colors.gray[7]):void 0,outlineOffset:"-1px",textOverflow:"clip"}},Ld({column:U,isStriped:t,row:G,table:s,theme:e,tableCellProps:K})),Z),children:[Yc.jsx(Yc.Fragment,{children:e.getIsPlaceholder()?null!==(p=null===(d=H.PlaceholderCell)||void 0===d?void 0:d.call(H,{cell:e,column:U,row:G,table:s}))&&void 0!==p?p:null:(B||V)&&[void 0,null].includes(e.getValue())?Yc.jsx(b,Object.assign({height:20,width:X},Y)):E&&"static"===O&&"mrt-row-numbers"===U.id?a+1:"display"!==q||!["mrt-row-drag","mrt-row-expand","mrt-row-select"].includes(U.id)&&G.getIsGrouped()?te||ee?Yc.jsx(Hd,{cell:e,table:s}):(w||H.enableClickToCopy)&&!1!==H.enableClickToCopy?Yc.jsx(qd,{cell:e,table:s,children:Yc.jsx(Kd,{cell:e,table:s})}):Yc.jsx(Kd,{cell:e,table:s}):null===(m=H.Cell)||void 0===m?void 0:m.call(H,{cell:e,column:U,row:G,rowRef:i,renderedCellValue:Yc.jsx(Yc.Fragment,{children:e.getValue()}),table:s})}),e.getIsGrouped()&&!H.GroupedCell&&Yc.jsxs(Yc.Fragment,{children:[" (",null===(g=G.subRows)||void 0===g?void 0:g.length,")"]})]}))},Xd=n.memo(Yd,((e,t)=>t.cell===e.cell)),Qd=({parentRowRef:e,row:t,rowIndex:n,table:r,virtualRow:o})=>{const{getVisibleLeafColumns:a,getState:i,options:{layoutMode:l,mantineTableBodyRowProps:s,mantineDetailPanelProps:c,renderDetailPanel:d}}=r,{isLoading:p}=i(),m=s instanceof Function?s({isDetailPanel:!0,row:t,staticRowIndex:n,table:r}):s,g=c instanceof Function?c({row:t,table:r}):c;return Yc.jsx(u,Object.assign({component:"tr",className:"mantine-TableBodyCell-DetailPanel"},m,{sx:t=>{var n,r;return Object.assign({display:"grid"===l?"flex":"table-row",position:o?"absolute":void 0,top:o?"".concat(null===(r=null===(n=e.current)||void 0===n?void 0:n.getBoundingClientRect())||void 0===r?void 0:r.height,"px"):void 0,transform:o?"translateY(".concat(null==o?void 0:o.start,"px)"):void 0,width:"100%",zIndex:o?2:void 0},(null==m?void 0:m.sx)instanceof Function?m.sx(t):null==m?void 0:m.sx)},children:Yc.jsx(u,Object.assign({component:"td",className:"mantine-TableBodyCell-DetailPanel",colSpan:a().length},g,{sx:e=>Object.assign({backgroundColor:o?e.fn.lighten(e.colors.dark[7],.06):void 0,borderBottom:t.getIsExpanded()?void 0:"none",display:"grid"===l?"flex":"table-cell",paddingBottom:t.getIsExpanded()?"16px !important":"0 !important",paddingTop:t.getIsExpanded()?"16px !important":"0 !important",transition:"all 100ms ease-in-out",width:"".concat(r.getTotalSize(),"px")},(null==g?void 0:g.sx)instanceof Function?g.sx(e):null==g?void 0:g.sx),children:d&&Yc.jsx(E,{in:t.getIsExpanded(),children:!p&&d({row:t,table:r})})}))}))},Zd=({columnVirtualizer:e,enableHover:t,isStriped:r,measureElement:o,numRows:a,row:i,rowIndex:l,table:s,virtualColumns:c,virtualPaddingLeft:d,virtualPaddingRight:p,virtualRow:m})=>{const{getState:g,options:{enableRowOrdering:f,layoutMode:h,memoMode:b,mantineTableBodyRowProps:v,renderDetailPanel:y},setHoveredRow:w}=s,{draggingColumn:x,draggingRow:S,editingCell:C,editingRow:E,hoveredRow:k}=g(),_=v instanceof Function?v({row:i,staticRowIndex:l,table:s}):v,R=n.useRef(null);return Yc.jsxs(Yc.Fragment,{children:[Yc.jsxs(u,Object.assign({component:"tr","data-index":null==m?void 0:m.index,onDragEnter:e=>{f&&S&&w(i)},ref:e=>{e&&(R.current=e,null==o||o(e))}},_,{sx:e=>Object.assign({boxSizing:"border-box",display:"grid"===h?"flex":"table-row",opacity:(null==S?void 0:S.id)===i.id||(null==k?void 0:k.id)===i.id?.5:1,position:m?"absolute":void 0,top:m?0:void 0,transition:m?"none":"all 100ms ease-in-out",width:"100%","&:hover td":{backgroundColor:!1!==t?i.getIsSelected()?e.fn.rgba(Bd(e),.2):"dark"===e.colorScheme?"".concat(e.fn.lighten(e.colors.dark[7],.12)):"".concat(e.fn.darken(e.white,.05)):void 0}},(null==_?void 0:_.sx)instanceof Function?_.sx(e):null==_?void 0:_.sx),style:Object.assign({transform:m?"translateY(".concat(null==m?void 0:m.start,"px)"):void 0},null==_?void 0:_.style),children:[d?Yc.jsx("td",{style:{display:"flex",width:d}}):null,(null!=c?c:i.getVisibleCells()).map((t=>{var n,o;const c=e?i.getVisibleCells()[t.index]:t,u={cell:c,isStriped:r,measureElement:null==e?void 0:e.measureElement,numRows:a,rowIndex:l,rowRef:R,table:s,virtualCell:e?t:void 0};return"cells"!==b||"data"!==c.column.columnDef.columnDefType||x||S||(null==C?void 0:C.id)===c.id||(null==E?void 0:E.id)===i.id?Yc.jsx(Yd,Object.assign({},u),c.id+(null===(o=c.getValue)||void 0===o?void 0:o.toString())):Yc.jsx(Xd,Object.assign({},u),c.id+(null===(n=c.getValue())||void 0===n?void 0:n.toString()))})),p?Yc.jsx("td",{style:{display:"flex",width:p}}):null]})),y&&!i.getIsGrouped()&&Yc.jsx(Qd,{parentRowRef:R,row:i,rowIndex:l,table:s,virtualRow:m})]})},Jd=n.memo(Zd,((e,t)=>e.row===t.row&&e.rowIndex===t.rowIndex)),ep=({columnVirtualizer:e,enableHover:t,isStriped:r,table:o,virtualColumns:a,virtualPaddingLeft:i,virtualPaddingRight:l})=>{var s,c,d;const{getRowModel:p,getPrePaginationRowModel:m,getState:g,options:{createDisplayMode:f,enableGlobalFilterRankedResults:h,enablePagination:b,enableRowVirtualization:y,layoutMode:w,localization:x,mantineTableBodyProps:S,manualExpanding:C,manualFiltering:E,manualGrouping:k,manualPagination:_,manualSorting:R,memoMode:O,renderEmptyRowsFallback:I,rowVirtualizerInstanceRef:P,rowVirtualizerProps:F},refs:{tableContainerRef:j,tablePaperRef:M}}=o,{creatingRow:A,columnFilters:T,density:N,expanded:L,globalFilter:D,pagination:z,sorting:B}=g(),V=S instanceof Function?S({table:o}):S,U=F instanceof Function?F({table:o}):F,G=n.useMemo((()=>Nd(o)&&!Object.values(B).some(Boolean)&&D),[h,L,D,C,E,k,R,B]),H=n.useMemo((()=>{if(!G)return p().rows;const e=m().rows.sort(((e,t)=>{return n=e,r=t,Math.max(...Object.values(r.columnFiltersMeta).map((e=>e.rank)))-Math.max(...Object.values(n.columnFiltersMeta).map((e=>e.rank)));var n,r}));if(b&&!_){const t=z.pageIndex*z.pageSize;return e.slice(t,t+z.pageSize)}return e}),[G,G?m().rows:p().rows,z.pageIndex,z.pageSize]),q=y?ld(Object.assign({count:H.length,estimateSize:()=>"xs"===N?42.7:"md"===N?54.7:70.7,getScrollElement:()=>j.current,measureElement:"undefined"!=typeof window&&-1===navigator.userAgent.indexOf("Firefox")?e=>null==e?void 0:e.getBoundingClientRect().height:void 0,overscan:4},U)):void 0;P&&q&&(P.current=q);const $=q?q.getVirtualItems():void 0;return Yc.jsxs(u,Object.assign({component:"tbody"},V,{sx:e=>Object.assign({display:"grid"===w?"grid":"table-row-group",height:q?"".concat(q.getTotalSize(),"px"):"inherit",minHeight:H.length?void 0:"100px",position:"relative"},(null==V?void 0:V.sx)instanceof Function?null==V?void 0:V.sx(e):null==V?void 0:V.sx),children:[A&&"row"===f&&Yc.jsx(Zd,{table:o,row:A,rowIndex:-1}),H.length?Yc.jsx(Yc.Fragment,{children:(null!=$?$:H).map(((n,s)=>{const c=q?H[n.index]:n,u={columnVirtualizer:e,enableHover:t,isStriped:r,measureElement:null==q?void 0:q.measureElement,numRows:H.length,row:c,rowIndex:q?n.index:s,table:o,virtualColumns:a,virtualPaddingLeft:i,virtualPaddingRight:l,virtualRow:q?n:void 0};return"rows"===O?Yc.jsx(Jd,Object.assign({},u),c.id||"mrt-".concat(c.index)):Yc.jsx(Zd,Object.assign({},u),c.id||"mrt-".concat(c.index))}))}):Yc.jsx("tr",{style:{display:"grid"===w?"grid":"table-row"},children:Yc.jsx("td",{colSpan:o.getVisibleLeafColumns().length,style:{display:"grid"===w?"grid":"table-cell"},children:null!==(s=null==I?void 0:I({table:o}))&&void 0!==s?s:Yc.jsx(v,{sx:{color:"gray",fontStyle:"italic",maxWidth:"min(100vw, ".concat(null!==(d=null===(c=M.current)||void 0===c?void 0:c.clientWidth)&&void 0!==d?d:360,"px)"),paddingTop:"2rem",paddingBottom:"2rem",textAlign:"center",width:"100%"},children:D||T.length?x.noResultsFound:x.noRecordsToDisplay})})})]}))},tp=n.memo(ep,((e,t)=>e.table.options.data===t.table.options.data)),np=({actionIconProps:e,onDragEnd:t,onDragStart:n,table:r})=>{var o,a;const{options:{icons:{IconGripHorizontal:i},localization:l}}=r;return Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(o=null==e?void 0:e.title)&&void 0!==o?o:l.move,children:Yc.jsx(p,Object.assign({draggable:"true",size:"sm","aria-label":null!==(a=null==e?void 0:e.title)&&void 0!==a?a:l.move},e,{onClick:t=>{var n;t.stopPropagation(),null===(n=null==e?void 0:e.onClick)||void 0===n||n.call(e,t)},onDragStart:n,onDragEnd:t,sx:t=>Object.assign({cursor:"grab",margin:"0 -0.16px",opacity:.5,padding:"2px",transition:"opacity 100ms ease-in-out","&:hover":{backgroundColor:"transparent",opacity:1},"&:active":{cursor:"grabbing"}},(null==e?void 0:e.sx)instanceof Function?null==e?void 0:e.sx(t):null==e?void 0:e.sx),title:void 0,children:Yc.jsx(i,{})}))})},rp=({row:e,rowRef:t,table:n})=>{const{options:{mantineRowDragHandleProps:r}}=n,o=r instanceof Function?r({row:e,table:n}):r;return Yc.jsx(np,{actionIconProps:o,onDragStart:r=>{var a;null===(a=null==o?void 0:o.onDragStart)||void 0===a||a.call(o,r),r.dataTransfer.setDragImage(t.current,0,0),n.setDraggingRow(e)},onDragEnd:e=>{var t;null===(t=null==o?void 0:o.onDragEnd)||void 0===t||t.call(o,e),n.setDraggingRow(null),n.setHoveredRow(null)},table:n})},op=({table:e})=>{var t,n;const{getIsAllRowsExpanded:r,getIsSomeRowsExpanded:o,getCanSomeRowsExpand:a,getState:i,options:{icons:{IconChevronsDown:l},localization:s,mantineExpandAllButtonProps:c,renderDetailPanel:u},toggleAllRowsExpanded:m}=e,{density:g,isLoading:f}=i(),h=c instanceof Function?c({table:e}):c,b=r();return Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:(null!==(t=null==h?void 0:h.title)&&void 0!==t?t:b)?s.collapseAll:s.expandAll,children:Yc.jsx(p,Object.assign({"aria-label":s.expandAll,disabled:f||!u&&!a(),onClick:()=>m(!b)},h,{sx:e=>Object.assign({marginLeft:"xl"===g?"-6px":"md"===g?"0":"6px",opacity:.8,"&:disabled":{backgroundColor:"transparent",border:"none"},"&:hover":{opacity:1}},(null==h?void 0:h.sx)instanceof Function?null==h?void 0:h.sx(e):null==h?void 0:h.sx),title:void 0,children:null!==(n=null==h?void 0:h.children)&&void 0!==n?n:Yc.jsx(l,{style:{transform:"rotate(".concat(b?-180:o()?-90:0,"deg)"),transition:"transform 100ms"}})}))})},ap=({row:e,table:t})=>{var n,r;const{options:{icons:{IconChevronDown:o},localization:a,mantineExpandButtonProps:i,renderDetailPanel:l}}=t,s=i instanceof Function?i({table:t,row:e}):i,c=e.getCanExpand(),u=e.getIsExpanded();return Yc.jsx(d,{withinPortal:!0,disabled:!c&&!l,openDelay:1e3,label:(null!==(n=null==s?void 0:s.title)&&void 0!==n?n:u)?a.collapse:a.expand,children:Yc.jsx(p,Object.assign({"aria-label":a.expand,disabled:!c&&!l},s,{onClick:t=>{var n;t.stopPropagation(),e.toggleExpanded(),null===(n=null==s?void 0:s.onClick)||void 0===n||n.call(s,t)},sx:e=>Object.assign({opacity:.8,"&:disabled":{backgroundColor:"transparent",border:"none"},"&:hover":{opacity:1}},(null==s?void 0:s.sx)instanceof Function?s.sx(e):null==s?void 0:s.sx),title:void 0,children:null!==(r=null==s?void 0:s.children)&&void 0!==r?r:Yc.jsx(o,{style:{transform:"rotate(".concat(c||l?u?-180:0:-90,"deg)"),transition:"transform 100ms"}})}))})},ip=({handleEdit:e,row:t,table:n})=>{const{options:{editDisplayMode:r,enableEditing:o,icons:{IconEdit:a,IconDots:i},localization:l,positionActionsColumn:s,renderRowActionMenuItems:c}}=n;return Yc.jsxs(M,{position:"first"===s?"bottom-start":"last"===s?"bottom-end":void 0,closeOnItemClick:!0,withinPortal:!0,children:[Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:l.rowActions,children:Yc.jsx(M.Target,{children:Yc.jsx(p,{"aria-label":l.rowActions,onClick:e=>e.stopPropagation(),size:"sm",children:Yc.jsx(i,{})})})}),Yc.jsxs(M.Dropdown,{onClick:e=>e.stopPropagation(),children:[o&&"table"!==r&&Yc.jsx(M.Item,{icon:Yc.jsx(a,{}),onClick:e,children:l.edit}),null==c?void 0:c({row:t,table:n})]})]})},lp=({row:e,table:t,variant:n="icon"})=>{const{getState:r,options:{icons:{IconCircleX:o,IconDeviceFloppy:a},localization:i,onCreatingRowCancel:l,onCreatingRowSave:s,onEditingRowSave:c,onEditingRowCancel:m},refs:{editInputRefs:g},setCreatingRow:f,setEditingRow:h}=t,{creatingRow:b,editingRow:v,isSaving:y}=r(),w=(null==b?void 0:b.id)===e.id,x=(null==v?void 0:v.id)===e.id,S=()=>{w?(null==l||l({row:e,table:t}),f(null)):x&&(null==m||m({row:e,table:t}),h(null)),e._valuesCache={}},C=()=>{var n;null===(n=Object.values(null==g?void 0:g.current).filter((t=>{var n,r;return e.id===(null===(r=null===(n=null==t?void 0:t.name)||void 0===n?void 0:n.split("_"))||void 0===r?void 0:r[0])})))||void 0===n||n.forEach((t=>{void 0!==t.value&&Object.hasOwn(null==e?void 0:e._valuesCache,t.name)&&(e._valuesCache[t.name]=t.value)})),w?null==s||s({exitCreatingMode:()=>f(null),row:e,table:t,values:e._valuesCache}):x&&(null==c||c({exitEditingMode:()=>h(null),row:e,table:t,values:null==e?void 0:e._valuesCache}))};return Yc.jsx(u,{onClick:e=>e.stopPropagation(),sx:{display:"flex",gap:"12px"},children:"icon"===n?Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(d,{withinPortal:!0,label:i.cancel,children:Yc.jsx(p,{"aria-label":i.cancel,onClick:S,children:Yc.jsx(o,{})})}),Yc.jsx(d,{withinPortal:!0,label:i.save,children:Yc.jsx(p,{"aria-label":i.save,color:"blue",onClick:C,loading:y,children:Yc.jsx(a,{})})})]}):Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(U,{onClick:S,variant:"subtle",children:i.cancel}),Yc.jsx(U,{onClick:C,variant:"filled",loading:y,children:i.save})]})})},sp=({cell:e,row:t,table:n})=>{const{getState:r,options:{createDisplayMode:o,editDisplayMode:a,enableEditing:i,icons:{IconEdit:l},localization:s,renderRowActionMenuItems:c,renderRowActions:u},setEditingRow:m}=n,{creatingRow:g,editingRow:f}=r(),h=(null==g?void 0:g.id)===t.id,b=(null==f?void 0:f.id)===t.id,v=e=>{e.stopPropagation(),m(Object.assign({},t))},y=h&&"row"===o||b&&"row"===a;return Yc.jsx(Yc.Fragment,{children:u&&!y?u({cell:e,row:t,table:n}):y?Yc.jsx(lp,{row:t,table:n}):!c&&(i instanceof Function?i(t):i)?Yc.jsx(d,{withinPortal:!0,position:"right",label:s.edit,children:Yc.jsx(p,{"aria-label":s.edit,disabled:!!f&&f.id!==t.id,onClick:v,sx:{opacity:.8,"&:hover":{opacity:1},"&:disabled":{backgroundColor:"transparent",border:"none"}},children:Yc.jsx(l,{})})}):c?Yc.jsx(ip,{handleEdit:v,row:t,table:n}):null})},cp=({row:e,selectAll:t,table:n})=>{var r;const{getState:o,options:{enableMultiRowSelection:a,localization:i,mantineSelectAllCheckboxProps:l,mantineSelectCheckboxProps:s,selectAllMode:c,selectDisplayMode:u}}=n,{density:p,isLoading:m}=o(),g=e?s instanceof Function?s({row:e,table:n}):s:l instanceof Function?l({table:n}):l,f=t?"page"===c?n.getIsAllPageRowsSelected():n.getIsAllRowsSelected():void 0,h=Object.assign(Object.assign({"aria-label":t?i.toggleSelectAll:i.toggleSelectRow,checked:t?f:null==e?void 0:e.getIsSelected(),disabled:m||e&&!e.getCanSelect(),onChange:e?e.getToggleSelectedHandler():"all"===c?n.getToggleAllRowsSelectedHandler():n.getToggleAllPageRowsSelectedHandler(),size:"xs"===p?"sm":"md"},g),{onClick:e=>{var t;e.stopPropagation(),null===(t=null==g?void 0:g.onClick)||void 0===t||t.call(g,e)},title:void 0});return Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(r=null==g?void 0:g.title)&&void 0!==r?r:t?i.toggleSelectAll:i.toggleSelectRow,children:Yc.jsx("span",{children:"switch"===u?Yc.jsx(I,Object.assign({},h)):"radio"===u||!1===a?Yc.jsx(P,Object.assign({},h)):Yc.jsx(F,Object.assign({indeterminate:t?n.getIsSomeRowsSelected()&&!f:null==e?void 0:e.getIsSomeSelected()},h))})})},up=e=>{var t,r,o,a,i,l,s,c,u,d,p,m,g,f,h,b,v,y,w,x,S,C,E,k,_,R,O,I,P,F,j,M,A,T,N;const L=n.useRef(null),D=n.useRef({}),z=n.useRef({}),B=n.useRef(null),V=n.useRef(null),U=n.useRef({}),G=n.useRef(null),H=n.useRef(null),q=n.useMemo((()=>{var t,n,r;const o=null!==(t=e.initialState)&&void 0!==t?t:{};return o.columnOrder=null!==(n=o.columnOrder)&&void 0!==n?n:Fd(e),o.globalFilterFn=null!==(r=e.globalFilterFn)&&void 0!==r?r:"fuzzy",o}),[]),[$,W]=n.useState(null!==(t=q.creatingRow)&&void 0!==t?t:null),[K,Y]=n.useState((()=>Object.assign({},...Rd(e.columns).map((e=>{var t,n,r,o;return{[_d(e)]:e.filterFn instanceof Function?null!==(t=e.filterFn.name)&&void 0!==t?t:"custom":null!==(o=null!==(n=e.filterFn)&&void 0!==n?n:null===(r=null==q?void 0:q.columnFilterFns)||void 0===r?void 0:r[_d(e)])&&void 0!==o?o:jd(e)}}))))),[X,Q]=n.useState(null!==(r=q.columnOrder)&&void 0!==r?r:[]),[Z,J]=n.useState(null!==(o=null==q?void 0:q.density)&&void 0!==o?o:"md"),[ee,te]=n.useState(null!==(a=q.draggingColumn)&&void 0!==a?a:null),[ne,re]=n.useState(null!==(i=q.draggingRow)&&void 0!==i?i:null),[oe,ae]=n.useState(null!==(l=q.editingCell)&&void 0!==l?l:null),[ie,le]=n.useState(null!==(s=q.editingRow)&&void 0!==s?s:null),[se,ce]=n.useState(null!==(c=q.globalFilterFn)&&void 0!==c?c:"fuzzy"),[ue,de]=n.useState(null!==(u=q.grouping)&&void 0!==u?u:[]),[pe,me]=n.useState(null!==(d=q.hoveredColumn)&&void 0!==d?d:null),[ge,fe]=n.useState(null!==(p=q.hoveredRow)&&void 0!==p?p:null),[he,be]=n.useState(null!==(m=null==q?void 0:q.isFullScreen)&&void 0!==m&&m),[ve,ye]=n.useState(null!==(f=null===(g=e.initialState)||void 0===g?void 0:g.showAlertBanner)&&void 0!==f&&f),[we,xe]=n.useState(null!==(h=null==q?void 0:q.showColumnFilters)&&void 0!==h&&h),[Se,Ce]=n.useState(null!==(b=null==q?void 0:q.showGlobalFilter)&&void 0!==b&&b),[Ee,ke]=n.useState(null!==(v=null==q?void 0:q.showToolbarDropZone)&&void 0!==v&&v),_e=(({creatingRow:e,columnOrder:t,grouping:r,tableOptions:o})=>{var a,i;return n.useMemo((()=>{var n,a,i,l,s,c,u,d,p,m,g,f,h,b,v,y,w;return[(null!==(a=null===(n=o.state)||void 0===n?void 0:n.columnOrder)&&void 0!==a?a:t).includes("mrt-row-drag")&&Object.assign(Object.assign(Object.assign({Cell:({row:e,rowRef:t,table:n})=>Yc.jsx(rp,{row:e,rowRef:t,table:n}),header:o.localization.move,size:60},o.defaultDisplayColumn),null===(i=o.displayColumnDefOptions)||void 0===i?void 0:i["mrt-row-drag"]),{id:"mrt-row-drag"}),((null!==(s=null===(l=o.state)||void 0===l?void 0:l.columnOrder)&&void 0!==s?s:t).includes("mrt-row-actions")||e&&"row"===o.createDisplayMode)&&Object.assign(Object.assign(Object.assign({Cell:({cell:e,row:t,table:n})=>Yc.jsx(sp,{cell:e,row:t,table:n}),header:o.localization.actions,size:70},o.defaultDisplayColumn),null===(c=o.displayColumnDefOptions)||void 0===c?void 0:c["mrt-row-actions"]),{id:"mrt-row-actions"}),(null!==(d=null===(u=o.state)||void 0===u?void 0:u.columnOrder)&&void 0!==d?d:t).includes("mrt-row-expand")&&Pd(o,null!==(m=null===(p=o.state)||void 0===p?void 0:p.grouping)&&void 0!==m?m:r)&&Object.assign(Object.assign(Object.assign({Cell:({row:e,table:t})=>Yc.jsx(ap,{row:e,table:t}),Header:o.enableExpandAll?({table:e})=>Yc.jsx(op,{table:e}):null,header:o.localization.expand,size:60},o.defaultDisplayColumn),null===(g=o.displayColumnDefOptions)||void 0===g?void 0:g["mrt-row-expand"]),{id:"mrt-row-expand"}),(null!==(h=null===(f=o.state)||void 0===f?void 0:f.columnOrder)&&void 0!==h?h:t).includes("mrt-row-select")&&Object.assign(Object.assign(Object.assign({Cell:({row:e,table:t})=>Yc.jsx(cp,{row:e,table:t}),Header:o.enableSelectAll&&o.enableMultiRowSelection?({table:e})=>Yc.jsx(cp,{selectAll:!0,table:e}):null,header:o.localization.select,size:60},o.defaultDisplayColumn),null===(b=o.displayColumnDefOptions)||void 0===b?void 0:b["mrt-row-select"]),{id:"mrt-row-select"}),(null!==(y=null===(v=o.state)||void 0===v?void 0:v.columnOrder)&&void 0!==y?y:t).includes("mrt-row-numbers")&&Object.assign(Object.assign(Object.assign({Cell:({row:e})=>e.index+1,Header:()=>o.localization.rowNumber,header:o.localization.rowNumbers,size:60},o.defaultDisplayColumn),null===(w=o.displayColumnDefOptions)||void 0===w?void 0:w["mrt-row-numbers"]),{id:"mrt-row-numbers"})].filter(Boolean)}),[t,r,o.displayColumnDefOptions,o.editDisplayMode,o.enableColumnDragging,o.enableColumnFilterModes,o.enableColumnOrdering,o.enableEditing,o.enableExpandAll,o.enableExpanding,o.enableGrouping,o.enableRowActions,o.enableRowDragging,o.enableRowNumbers,o.enableRowOrdering,o.enableRowSelection,o.enableSelectAll,o.localization,o.positionActionsColumn,o.renderDetailPanel,o.renderRowActionMenuItems,o.renderRowActions,null===(a=o.state)||void 0===a?void 0:a.columnOrder,null===(i=o.state)||void 0===i?void 0:i.grouping])})({columnOrder:X,creatingRow:$,grouping:ue,tableOptions:e}),Re=n.useMemo((()=>{var t,n,r;return Od({aggregationFns:e.aggregationFns,columnDefs:[..._e,...e.columns],columnFilterFns:null!==(n=null===(t=e.state)||void 0===t?void 0:t.columnFilterFns)&&void 0!==n?n:K,defaultDisplayColumn:null!==(r=e.defaultDisplayColumn)&&void 0!==r?r:{},filterFns:e.filterFns,sortingFns:e.sortingFns})}),[K,_e,e.columns,null===(y=e.state)||void 0===y?void 0:y.columnFilterFns]),Oe=n.useMemo((()=>{var t,n,r,o,a;return!(null===(t=e.state)||void 0===t?void 0:t.isLoading)&&!(null===(n=e.state)||void 0===n?void 0:n.showSkeletons)||e.data.length?e.data:[...Array((null===(o=null===(r=e.state)||void 0===r?void 0:r.pagination)||void 0===o?void 0:o.pageSize)||(null===(a=null==q?void 0:q.pagination)||void 0===a?void 0:a.pageSize)||10).fill(null)].map((()=>Object.assign({},...Rd(e.columns).map((e=>({[_d(e)]:null}))))))}),[e.data,null===(w=e.state)||void 0===w?void 0:w.isLoading,null===(x=e.state)||void 0===x?void 0:x.showSkeletons]),Ie= +/** + * react-table + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=n.useState((()=>({current:Mu(t)}))),[o,a]=n.useState((()=>r.current.initialState));return r.current.setOptions((t=>({...t,...e,state:{...o,...e.state},onStateChange:t=>{a(t),null==e.onStateChange||e.onStateChange(t)}}))),r.current}(Object.assign(Object.assign({getCoreRowModel:e=>eu((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[];for(let s=0;s{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e.enableExpanding||e.enableGrouping?e=>eu((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:n?Lu(t):t),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}):void 0,getFacetedMinMaxValues:e.enableFacetedValues?(e,t)=>eu((()=>{var n;return[null==(n=e.getColumn(t))?void 0:n.getFacetedRowModel()]}),(e=>{var n;if(!e)return;const r=null==(n=e.flatRows[0])?void 0:n.getUniqueValues(t);if(void 0===r)return;let o=[r,r];for(let a=0;ao[1]&&(o[1]=t)}}return o}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}}):void 0,getFacetedRowModel:e.enableFacetedValues?(e,t)=>eu((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,r,o)=>{if(!n.rows.length||(null==r||!r.length)&&!o)return n;const a=[...r.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return Tu(n.rows,(e=>{for(let t=0;t{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}}):void 0,getFacetedUniqueValues:e.enableFacetedValues?(e,t)=>eu((()=>{var n;return[null==(n=e.getColumn(t))?void 0:n.getFacetedRowModel()]}),(e=>{if(!e)return new Map;let n=new Map;for(let o=0;o{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}}):void 0,getFilteredRowModel:e.enableColumnFilters||e.enableGlobalFilter||e.enableFilters?e=>eu((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e{var n;const r=e.getColumn(t.id);if(!r)return;const a=r.getFilterFn();a&&o.push({id:t.id,filterFn:a,resolvedValue:null!=(n=null==a.resolveFilterValue?void 0:a.resolveFilterValue(t.value))?n:t.value})}));const i=n.map((e=>e.id)),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,u;r&&l&&s.length&&(i.push("__global__"),s.forEach((e=>{var t;a.push({id:e.id,filterFn:l,resolvedValue:null!=(t=null==l.resolveFilterValue?void 0:l.resolveFilterValue(r))?t:r})})));for(let e=0;e{n.columnFiltersMeta[t]=e}))}if(a.length){for(let e=0;e{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Tu(t.rows,(e=>{for(let t=0;t{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}):void 0,getGroupedRowModel:e.enableGrouping?Nu():void 0,getPaginationRowModel:e.enablePagination?e=>eu((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:a,flatRows:i,rowsById:l}=n;const s=r*o,c=s+r;let u;a=a.slice(s,c),u=e.options.paginateExpandedRows?{rows:a,flatRows:i,rowsById:l}:Lu({rows:a,flatRows:i,rowsById:l}),u.flatRows=[];const d=e=>{u.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return u.rows.forEach(d),u}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}):void 0,getSortedRowModel:e.enableSorting?e=>eu((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],a=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),i={};a.forEach((t=>{const n=e.getColumn(t.id);n&&(i[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const l=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=l(e.subRows))})),t};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}):void 0,onColumnOrderChange:Q,onGroupingChange:de,getSubRows:e=>null==e?void 0:e.subRows},e),{columns:Re,data:Oe,globalFilterFn:null===(S=e.filterFns)||void 0===S?void 0:S[null!=se?se:"fuzzy"],initialState:q,state:Object.assign({creatingRow:$,columnFilterFns:K,columnOrder:X,density:Z,draggingColumn:ee,draggingRow:ne,editingCell:oe,editingRow:ie,globalFilterFn:se,grouping:ue,hoveredColumn:pe,hoveredRow:ge,isFullScreen:he,showAlertBanner:ve,showColumnFilters:we,showGlobalFilter:Se,showToolbarDropZone:Ee},e.state)}));Ie.refs={bottomToolbarRef:L,editInputRefs:D,filterInputRefs:z,searchInputRef:B,tableContainerRef:V,tableHeadCellRefs:U,tablePaperRef:G,topToolbarRef:H};return Ie.setCreatingRow=t=>{var n,r;let o=t;!0===t&&(o=((e,t)=>Au(e,"mrt-row-create",null!=t?t:Object.assign({},...Rd(e.options.columns).filter((e=>"data"===e.columnDefType)).map((e=>({[_d(e)]:""})))),-1,0))(Ie)),null!==(r=null===(n=null==e?void 0:e.onCreatingRowChange)||void 0===n?void 0:n.call(e,o))&&void 0!==r||W(o)},Ie.setColumnFilterFns=null!==(C=e.onColumnFilterFnsChange)&&void 0!==C?C:Y,Ie.setDensity=null!==(E=e.onDensityChange)&&void 0!==E?E:J,Ie.setDraggingColumn=null!==(k=e.onDraggingColumnChange)&&void 0!==k?k:te,Ie.setDraggingRow=null!==(_=e.onDraggingRowChange)&&void 0!==_?_:re,Ie.setEditingCell=null!==(R=e.onEditingCellChange)&&void 0!==R?R:ae,Ie.setEditingRow=null!==(O=e.onEditingRowChange)&&void 0!==O?O:le,Ie.setGlobalFilterFn=null!==(I=e.onGlobalFilterFnChange)&&void 0!==I?I:ce,Ie.setHoveredColumn=null!==(P=e.onHoveredColumnChange)&&void 0!==P?P:me,Ie.setHoveredRow=null!==(F=e.onHoveredRowChange)&&void 0!==F?F:fe,Ie.setIsFullScreen=null!==(j=e.onIsFullScreenChange)&&void 0!==j?j:be,Ie.setShowAlertBanner=null!==(M=e.onShowAlertBannerChange)&&void 0!==M?M:ye,Ie.setShowColumnFilters=null!==(A=e.onShowColumnFiltersChange)&&void 0!==A?A:xe,Ie.setShowGlobalFilter=null!==(T=e.onShowGlobalFilterChange)&&void 0!==T?T:Ce,Ie.setShowToolbarDropZone=null!==(N=e.onShowToolbarDropZoneChange)&&void 0!==N?N:ke,(e=>{const{getState:t,options:{enablePagination:r,rowCount:o}}=e,{globalFilter:a,isFullScreen:i,pagination:l,sorting:s,isLoading:c,showSkeletons:u}=t(),d=n.useRef(!1),p=n.useRef(),m=n.useRef();n.useEffect((()=>{"undefined"!=typeof window&&(p.current=document.body.style.height)}),[]),n.useEffect((()=>{if(d&&"undefined"!=typeof window)if(i)m.current=document.body.getBoundingClientRect().top,document.body.style.height="100vh";else{if(document.body.style.height=p.current,!m.current)return;window.scrollTo({top:-1*m.current,behavior:"instant"})}d.current=!0}),[i]),n.useEffect((()=>{if(!r||c||u)return;const{pageIndex:t,pageSize:n}=l,a=null!=o?o:e.getPrePaginationRowModel().rows.length;t*n>a&&e.setPageIndex(Math.floor(a/n))}),[o,e.getPrePaginationRowModel().rows.length]);const g=n.useRef(s);n.useEffect((()=>{s.length&&(g.current=s)}),[s]),n.useEffect((()=>{Nd(e)&&(a?e.setSorting([]):e.setSorting((()=>g.current||[])))}),[a])})(Ie),Ie},dp=e=>{const t=(e=>{var t,{aggregationFns:r,autoResetExpanded:o=!1,columnFilterDisplayMode:a="subheader",columnResizeMode:i="onChange",createDisplayMode:l="modal",defaultColumn:s,defaultDisplayColumn:c,editDisplayMode:u="modal",enableBottomToolbar:d=!0,enableColumnActions:p=!0,enableColumnFilters:m=!0,enableColumnOrdering:g=!1,enableColumnResizing:f=!1,enableDensityToggle:h=!0,enableExpandAll:b=!0,enableExpanding:v,enableFilterMatchHighlighting:y=!0,enableFilters:w=!0,enableFullScreenToggle:x=!0,enableGlobalFilter:S=!0,enableGlobalFilterRankedResults:C=!0,enableGrouping:E=!1,enableHiding:k=!0,enableMultiRowSelection:_=!0,enableMultiSort:R=!0,enablePagination:O=!0,enablePinning:I=!1,enableRowSelection:P=!1,enableSelectAll:F=!0,enableSorting:j=!0,enableStickyHeader:M=!1,enableTableFooter:A=!0,enableTableHead:T=!0,enableToolbarInternalActions:N=!0,enableTopToolbar:L=!0,filterFns:D,icons:z,layoutMode:B="semantic",localization:V,manualFiltering:U,manualGrouping:G,manualPagination:H,manualSorting:q,paginationDisplayMode:$="default",positionActionsColumn:W="first",positionExpandColumn:K="first",positionGlobalFilter:Y="right",positionPagination:X="bottom",positionToolbarAlertBanner:Q="top",positionToolbarDropZone:Z="top",rowNumberMode:J="static",selectAllMode:ee="page",sortingFns:te}=e,ne=sd(e,["aggregationFns","autoResetExpanded","columnFilterDisplayMode","columnResizeMode","createDisplayMode","defaultColumn","defaultDisplayColumn","editDisplayMode","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnResizing","enableDensityToggle","enableExpandAll","enableExpanding","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHiding","enableMultiRowSelection","enableMultiSort","enablePagination","enablePinning","enableRowSelection","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","paginationDisplayMode","positionActionsColumn","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberMode","selectAllMode","sortingFns"]);const re=n.useMemo((()=>Object.assign(Object.assign({},Gd),z)),[z]),oe=n.useMemo((()=>Object.assign(Object.assign({},Ud),V)),[V]),ae=n.useMemo((()=>Object.assign(Object.assign({},cd),r)),[]),ie=n.useMemo((()=>Object.assign(Object.assign({},Ed),D)),[]),le=n.useMemo((()=>Object.assign(Object.assign({},kd),te)),[]),se=n.useMemo((()=>Object.assign(Object.assign({},Dd),s)),[s]),ce=n.useMemo((()=>Object.assign(Object.assign({},zd),c)),[c]);return(ne.enableRowVirtualization||ne.enableColumnVirtualization)&&(B="grid"),ne.enableRowVirtualization&&(M=!0),!1===O&&void 0===H&&(H=!0),(null===(t=ne.data)||void 0===t?void 0:t.length)||(U=!0,G=!0,H=!0,q=!0),Object.assign({aggregationFns:ae,autoResetExpanded:o,columnFilterDisplayMode:a,columnResizeMode:i,createDisplayMode:l,defaultColumn:se,defaultDisplayColumn:ce,editDisplayMode:u,enableBottomToolbar:d,enableColumnActions:p,enableColumnFilters:m,enableColumnOrdering:g,enableColumnResizing:f,enableDensityToggle:h,enableExpandAll:b,enableExpanding:v,enableFilterMatchHighlighting:y,enableFilters:w,enableFullScreenToggle:x,enableGlobalFilter:S,enableGlobalFilterRankedResults:C,enableGrouping:E,enableHiding:k,enableMultiRowSelection:_,enableMultiSort:R,enablePagination:O,enablePinning:I,enableRowSelection:P,enableSelectAll:F,enableSorting:j,enableStickyHeader:M,enableTableFooter:A,enableTableHead:T,enableToolbarInternalActions:N,enableTopToolbar:L,filterFns:ie,icons:re,layoutMode:B,localization:oe,manualFiltering:U,manualGrouping:G,manualPagination:H,manualSorting:q,paginationDisplayMode:$,positionActionsColumn:W,positionExpandColumn:K,positionGlobalFilter:Y,positionPagination:X,positionToolbarAlertBanner:Q,positionToolbarDropZone:Z,rowNumberMode:J,selectAllMode:ee,sortingFns:le},ne)})(e);return up(t)},pp=["between","betweenInclusive","inNumberRange"],mp=["empty","notEmpty"],gp=["arrIncludesSome","arrIncludesAll","arrIncludes"],fp=["range-slider","date-range","range"],hp=({header:e,onSelect:t,table:r})=>{var o,a,i,l;const{getState:s,options:{columnFilterModeOptions:c,globalFilterModeOptions:u,localization:d,renderColumnFilterModeMenuItems:p,renderGlobalFilterModeMenuItems:m},setColumnFilterFns:g,setGlobalFilterFn:f}=r,{globalFilterFn:h}=s(),{column:b}=null!=e?e:{},{columnDef:v}=null!=b?b:{},y=null==b?void 0:b.getFilterValue();let w=null!==(o=null==v?void 0:v.columnFilterModeOptions)&&void 0!==o?o:c;fp.includes(null==v?void 0:v.filterVariant)&&(w=[...pp,...null!=w?w:[]].filter((e=>pp.includes(e))));const x=n.useMemo((()=>(e=>[{option:"fuzzy",symbol:"≈",label:e.filterFuzzy,divider:!1},{option:"contains",symbol:"*",label:e.filterContains,divider:!1},{option:"startsWith",symbol:"a",label:e.filterStartsWith,divider:!1},{option:"endsWith",symbol:"z",label:e.filterEndsWith,divider:!0},{option:"equals",symbol:"=",label:e.filterEquals,divider:!1},{option:"notEquals",symbol:"≠",label:e.filterNotEquals,divider:!0},{option:"between",symbol:"⇿",label:e.filterBetween,divider:!1},{option:"betweenInclusive",symbol:"⬌",label:e.filterBetweenInclusive,divider:!0},{option:"greaterThan",symbol:">",label:e.filterGreaterThan,divider:!1},{option:"greaterThanOrEqualTo",symbol:"≥",label:e.filterGreaterThanOrEqualTo,divider:!1},{option:"lessThan",symbol:"<",label:e.filterLessThan,divider:!1},{option:"lessThanOrEqualTo",symbol:"≤",label:e.filterLessThanOrEqualTo,divider:!0},{option:"empty",symbol:"∅",label:e.filterEmpty,divider:!1},{option:"notEmpty",symbol:"!∅",label:e.filterNotEmpty,divider:!1}])(d).filter((e=>v?void 0===w||(null==w?void 0:w.includes(e.option)):(!u||u.includes(e.option))&&["fuzzy","contains","startsWith"].includes(e.option)))),[]),S=n=>{var r;const o=null!==(r=null==v?void 0:v._filterFn)&&void 0!==r?r:"";e&&b?n!==o&&(g((t=>Object.assign(Object.assign({},t),{[e.id]:n}))),mp.includes(n)?" "===y||mp.includes(o)?y&&b.setFilterValue(y):b.setFilterValue(" "):"multi-select"===(null==v?void 0:v.filterVariant)||gp.includes(n)?y instanceof String||(null==y?void 0:y.length)?b.setFilterValue([]):y&&b.setFilterValue(y):fp.includes(null==v?void 0:v.filterVariant)||pp.includes(n)?Array.isArray(y)&&((null==y?void 0:y.every((e=>""===e)))||pp.includes(o))?b.setFilterValue(y):b.setFilterValue(["",""]):Array.isArray(y)?b.setFilterValue(""):b.setFilterValue(y)):f(n),null==t||t()},C=e&&v?v._filterFn:h;return Yc.jsx(M.Dropdown,{children:null!==(l=e&&b&&v?null!==(i=null===(a=v.renderColumnFilterModeMenuItems)||void 0===a?void 0:a.call(v,{column:b,internalFilterOptions:x,onSelectFilterMode:S,table:r}))&&void 0!==i?i:null==p?void 0:p({column:b,internalFilterOptions:x,onSelectFilterMode:S,table:r}):null==m?void 0:m({internalFilterOptions:x,onSelectFilterMode:S,table:r}))&&void 0!==l?l:x.map((({option:e,label:t,divider:r,symbol:o},a)=>Yc.jsxs(n.Fragment,{children:[Yc.jsxs(M.Item,{onClick:()=>S(e),color:e===C?"blue":void 0,sx:{"& > .mantine-Menu-itemLabel":{display:"flex",flexWrap:"nowrap",gap:"1ch"}},value:e,children:[Yc.jsx(R,{sx:{fontSize:"20px",transform:"translateY(-2px)",width:"2ch"},children:o}),Yc.jsx(R,{align:"center",children:t})]}),r&&Yc.jsx(M.Divider,{})]},a)))})},bp=({table:e})=>{const{getState:t,setGlobalFilter:r,options:{enableGlobalFilterModes:o,icons:{IconSearch:a,IconX:i},localization:l,manualFiltering:s,mantineSearchTextInputProps:c},refs:{searchInputRef:u}}=e,{globalFilter:m,showGlobalFilter:g}=t(),f=c instanceof Function?c({table:e}):c,h=n.useRef(!1),[b,v]=n.useState(null!=m?m:""),[y]=j(b,s?500:250);n.useEffect((()=>{r(y||void 0)}),[y]);const x=()=>{v(""),r(void 0)};return n.useEffect((()=>{h.current&&(void 0===m?x():v(m)),h.current=!0}),[m]),Yc.jsxs(E,{in:g,sx:{"& > div":{display:"flex",alignItems:"center",gap:"16px",flexWrap:"nowrap"}},children:[o&&Yc.jsxs(M,{withinPortal:!0,children:[Yc.jsx(M.Target,{children:Yc.jsx(p,{"aria-label":l.changeSearchMode,size:"sm",children:Yc.jsx(a,{})})}),Yc.jsx(hp,{table:e,onSelect:x})]}),Yc.jsx(w,Object.assign({placeholder:l.search,onChange:e=>v(e.target.value),value:null!=b?b:"",variant:"filled",icon:!o&&Yc.jsx(a,{}),rightSection:b?Yc.jsx(p,{"aria-label":l.clearSearch,disabled:!(null==b?void 0:b.length),onClick:x,size:"sm",children:Yc.jsx(d,{withinPortal:!0,label:l.clearSearch,children:Yc.jsx(i,{})})}):null},f,{ref:e=>{e&&(u.current=e,(null==f?void 0:f.ref)&&(f.ref=e))},sx:e=>Object.assign({minWidth:"250px"},(null==f?void 0:f.sx)instanceof Function?f.sx(e):null==f?void 0:f.sx)}))]})},vp=({isTopToolbar:e,table:t})=>{const{options:{mantineProgressProps:n},getState:r}=t,{isSaving:o,showProgressBars:a}=r(),i=n instanceof Function?n({isTopToolbar:e,table:t}):n;return Yc.jsx(E,{in:o||a,sx:{bottom:e?0:void 0,position:"absolute",top:e?void 0:0,width:"100%"},children:Yc.jsx(A,Object.assign({animate:!0,"aria-busy":"true","aria-label":"Loading",radius:0,value:100},i))})},yp={userSelect:"none","&:disabled":{backgroundColor:"transparent",border:"none"}},wp=({table:e,position:t="bottom"})=>{var n;const{getPrePaginationRowModel:r,getState:o,setPageIndex:a,setPageSize:i,options:{enableToolbarInternalActions:l,icons:{IconChevronLeftPipe:s,IconChevronRightPipe:c,IconChevronLeft:u,IconChevronRight:d},localization:m,mantinePaginationProps:g,paginationDisplayMode:f,rowCount:h}}=e,{pagination:{pageSize:b=10,pageIndex:w=0},showGlobalFilter:x}=o(),S=g instanceof Function?g({table:e}):g,C=null!=h?h:r().rows.length,E=Math.ceil(C/b),k=E>2&&!1!==(null==S?void 0:S.withEdges),_=w*b,O=Math.min(w*b+b,C);return Yc.jsxs(R,{align:"center",justify:"space-between",gap:"lg",py:"xs",px:"sm",mt:"top"===t&&l&&!x?"3rem":void 0,p:"relative",sx:{zIndex:2},children:[!1!==(null==S?void 0:S.showRowsPerPage)&&Yc.jsx(y,{data:null!==(n=null==S?void 0:S.rowsPerPageOptions)&&void 0!==n?n:["5","10","15","20","25","30","50","100"],label:m.rowsPerPage,onChange:e=>i(+e),value:b.toString(),sx:{"@media (min-width: 720px)":{display:"flex",alignItems:"center",gap:"8px"},"& .mantine-Select-input":{width:"80px"}},withinPortal:!0}),"pages"===f?Yc.jsx(T,Object.assign({onChange:e=>a(e-1),total:E,value:w+1,withEdges:k,nextIcon:d,previousIcon:u,firstIcon:s,lastIcon:c},S)):"default"===f?Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(v,{children:"".concat(0===O?0:(_+1).toLocaleString(),"-").concat(O.toLocaleString()," ").concat(m.of," ").concat(C.toLocaleString())}),Yc.jsxs(R,{gap:"xs",children:[k&&Yc.jsx(p,{"aria-label":m.goToFirstPage,disabled:w<=0,onClick:()=>a(0),sx:yp,children:Yc.jsx(s,{})}),Yc.jsx(p,{"aria-label":m.goToPreviousPage,disabled:w<=0,onClick:()=>a(w-1),sx:yp,children:Yc.jsx(u,{})}),Yc.jsx(p,{"aria-label":m.goToNextPage,disabled:O>=C,onClick:()=>a(w+1),sx:yp,children:Yc.jsx(d,{})}),k&&Yc.jsx(p,{"aria-label":m.goToLastPage,disabled:O>=C,onClick:()=>a(E-1),sx:yp,children:Yc.jsx(c,{})})]})]}):null]})},xp=({column:e,table:t})=>{var n,r,o;const{getState:a,options:{localization:i,mantineFilterCheckboxProps:l}}=t,{density:s}=a(),{columnDef:c}=e,u=l instanceof Function?l({column:e,table:t}):l,p=c.mantineFilterCheckboxProps instanceof Function?c.mantineFilterCheckboxProps({column:e,table:t}):c.mantineFilterCheckboxProps,m=Object.assign(Object.assign({},u),p),g=null===(n=i.filterByColumn)||void 0===n?void 0:n.replace("{column}",c.header);return Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(r=null==m?void 0:m.title)&&void 0!==r?r:g,children:Yc.jsx(F,Object.assign({checked:"true"===e.getFilterValue(),indeterminate:void 0===e.getFilterValue(),color:void 0===e.getFilterValue()?"default":"primary",size:"xs"===s?"sm":"md",label:null!==(o=m.title)&&void 0!==o?o:g},m,{onClick:e=>{var t;e.stopPropagation(),null===(t=null==m?void 0:m.onClick)||void 0===t||t.call(m,e)},onChange:t=>{var n;e.setFilterValue(void 0===e.getFilterValue()?"true":"true"===e.getFilterValue()?"false":void 0),null===(n=null==m?void 0:m.onChange)||void 0===n||n.call(m,t)},sx:e=>Object.assign({fontWeight:"normal",marginTop:"8px"},(null==m?void 0:m.sx)instanceof Function?m.sx(e):null==m?void 0:m.sx),title:void 0}))})},Sp=({header:e,rangeFilterIndex:t,table:r})=>{var o,a,i,l,s,c,d,m,g;const{options:{columnFilterDisplayMode:f,columnFilterModeOptions:h,icons:{IconX:b},localization:v,mantineFilterAutocompleteProps:x,mantineFilterDateInputProps:S,mantineFilterMultiSelectProps:C,mantineFilterSelectProps:E,mantineFilterTextInputProps:k,manualFiltering:_},refs:{filterInputRefs:R},setColumnFilterFns:O}=r,{column:I}=e,{columnDef:P}=I,F=k instanceof Function?k({column:I,table:r,rangeFilterIndex:t}):k,M=P.mantineFilterTextInputProps instanceof Function?P.mantineFilterTextInputProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterTextInputProps,A=Object.assign(Object.assign({},F),M),T=E instanceof Function?E({column:I,table:r,rangeFilterIndex:t}):E,L=P.mantineFilterSelectProps instanceof Function?P.mantineFilterSelectProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterSelectProps,D=Object.assign(Object.assign({},T),L),z=C instanceof Function?C({column:I,table:r,rangeFilterIndex:t}):C,B=P.mantineFilterMultiSelectProps instanceof Function?P.mantineFilterMultiSelectProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterMultiSelectProps,V=Object.assign(Object.assign({},z),B),U=S instanceof Function?S({column:I,table:r,rangeFilterIndex:t}):S,G=P.mantineFilterDateInputProps instanceof Function?P.mantineFilterDateInputProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterDateInputProps,H=Object.assign(Object.assign({},U),G),q=x instanceof Function?x({column:I,table:r,rangeFilterIndex:t}):x,Y=P.mantineFilterAutocompleteProps instanceof Function?P.mantineFilterAutocompleteProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterAutocompleteProps,Q=Object.assign(Object.assign({},q),Y),Z="range"===P.filterVariant||"date-range"===P.filterVariant||void 0!==t,J="select"===P.filterVariant,ee="multi-select"===P.filterVariant,te="date"===P.filterVariant||"date-range"===P.filterVariant,ne="autocomplete"===P.filterVariant,re=null!==(o=null==P?void 0:P.columnFilterModeOptions)&&void 0!==o?o:h,oe=P._filterFn,ae=["empty","notEmpty"].includes(oe)?v["filter".concat((null===(i=null===(a=null==oe?void 0:oe.charAt)||void 0===a?void 0:a.call(oe,0))||void 0===i?void 0:i.toUpperCase())+(null==oe?void 0:oe.slice(1)))]:"",ie=Z?0===t?v.min:1===t?v.max:"":null!==(l=null==A?void 0:A.placeholder)&&void 0!==l?l:null===(s=v.filterByColumn)||void 0===s?void 0:s.replace("{column}",String(P.header)),le=I.getFacetedUniqueValues(),se=n.useMemo((()=>{var e,t,n;return(null!==(n=null!==(t=null!==(e=null==Q?void 0:Q.data)&&void 0!==e?e:null==D?void 0:D.data)&&void 0!==t?t:null==V?void 0:V.data)&&void 0!==n?n:(ne||J||ee)&&le?Array.from(le.keys()).sort(((e,t)=>e.localeCompare(t))):[]).filter((e=>null!=e))}),[null==Q?void 0:Q.data,le,ne,ee,J,null==V?void 0:V.data,null==D?void 0:D.data]),ce=n.useRef(!1),[ue,de]=n.useState((()=>{var e,n;return ee?I.getFilterValue()||[]:Z?(null===(e=I.getFilterValue())||void 0===e?void 0:e[t])||"":null!==(n=I.getFilterValue())&&void 0!==n?n:""})),[pe]=j(ue,_?400:200);n.useEffect((()=>{ce.current&&(Z?I.setFilterValue((e=>{const n=Array.isArray(e)?e:["",""];return n[t]=pe,n})):I.setFilterValue(null!=pe?pe:void 0))}),[pe]),n.useEffect((()=>{if(!ce.current)return void(ce.current=!0);const e=I.getFilterValue();void 0===e?me():de(Z&&void 0!==t?(null!=e?e:["",""])[t]:null!=e?e:"")}),[I.getFilterValue()]);const me=()=>{ee?(de([]),I.setFilterValue([])):Z?(de(""),I.setFilterValue((e=>{const n=Array.isArray(e)?e:["",""];return n[t]=void 0,n}))):(de(""),I.setFilterValue(void 0))};if(P.Filter)return Yc.jsx(Yc.Fragment,{children:null===(c=P.Filter)||void 0===c?void 0:c.call(P,{column:I,header:e,rangeFilterIndex:t,table:r})});const ge={disabled:!!ae,placeholder:ie,"aria-label":ie,title:ie,onClick:e=>e.stopPropagation(),onChange:de,value:ue,variant:"unstyled",sx:e=>Object.assign({borderBottom:"2px solid ".concat(e.colors.gray["dark"===e.colorScheme?7:3]),minWidth:te?"125px":Z?"80px":ae?"auto":"100px",width:"100%","& .mantine-TextInput-input":{overflow:"hidden",textOverflow:"ellipsis"},"& .mantine-DateInput-input":{height:"2.1rem"}},X(ee?V.sx:J?D.sx:te?H.sx:null==A?void 0:A.sx))},fe=ue?Yc.jsx(p,{"aria-label":v.clearFilter,onClick:me,size:"sm",title:null!==(d=v.clearFilter)&&void 0!==d?d:"",children:Yc.jsx(b,{})}):null;return ae?Yc.jsx(u,{sx:ge.sx,children:Yc.jsx(N,{size:"lg",onClick:()=>{de(""),I.setFilterValue(void 0),O((t=>{var n;return Object.assign(Object.assign({},t),{[e.id]:null!==(n=null==re?void 0:re[0])&&void 0!==n?n:"fuzzy"})}))},sx:{margin:"5px"},rightSection:fe,children:ae})}):ee?Yc.jsx($,Object.assign({},ge,{clearable:!0,searchable:!0,withinPortal:!0},V,{data:se,ref:e=>{e&&(R.current["".concat(I.id,"-").concat(null!=t?t:0)]=e,V.ref&&(V.ref.current=e))},sx:ge.sx})):J?Yc.jsx(y,Object.assign({},ge,{clearable:!0,searchable:!0,withinPortal:!0},D,{data:se,ref:e=>{e&&(R.current["".concat(I.id,"-").concat(null!=t?t:0)]=e,D.ref&&(D.ref.current=e))},sx:ge.sx})):te?Yc.jsx(W,Object.assign({},ge,{allowDeselect:!0,clearable:!0,popoverProps:{withinPortal:"popover"!==f}},H,{ref:e=>{e&&(R.current["".concat(I.id,"-").concat(null!=t?t:0)]=e,H.ref&&(H.ref.current=e))},sx:ge.sx})):ne?Yc.jsx(K,Object.assign({},ge,{rightSection:(null===(m=null==ue?void 0:ue.toString())||void 0===m?void 0:m.length)?fe:void 0,onChange:e=>de(e),withinPortal:!0},Q,{data:se,ref:e=>{e&&(R.current["".concat(I.id,"-").concat(null!=t?t:0)]=e,Q.ref&&(Q.ref.current=e))},sx:ge.sx})):Yc.jsx(w,Object.assign({},ge,{rightSection:(null===(g=null==ue?void 0:ue.toString())||void 0===g?void 0:g.length)?fe:void 0,onChange:e=>de(e.target.value)},A,{ref:e=>{e&&(R.current["".concat(I.id,"-").concat(null!=t?t:0)]=e,A.ref&&(A.ref.current=e))},sx:ge.sx}))},Cp=({header:e,table:t})=>Yc.jsxs(u,{sx:{display:"grid",gridTemplateColumns:"6fr 6fr",gap:"16px"},children:[Yc.jsx(Sp,{header:e,rangeFilterIndex:0,table:t}),Yc.jsx(Sp,{header:e,rangeFilterIndex:1,table:t})]}),Ep=({stackAlertBanner:e,table:t})=>{var r,o,a;const{getPrePaginationRowModel:i,getSelectedRowModel:l,getState:s,options:{enableRowSelection:c,enableSelectAll:u,icons:{IconX:d},localization:m,mantineToolbarAlertBannerBadgeProps:g,mantineToolbarAlertBannerProps:f,positionToolbarAlertBanner:h,renderToolbarAlertBannerContent:b,rowCount:v}}=t,{grouping:y,showAlertBanner:w,density:x}=s(),S=f instanceof Function?f({table:t}):f,C=g instanceof Function?g({table:t}):g,k=l().rows.length>0?null===(o=null===(r=m.selectedCountOfRowCountRowsSelected)||void 0===r?void 0:r.replace("{selectedCount}",l().rows.length.toString()))||void 0===o?void 0:o.replace("{rowCount}",(null!=v?v:i().rows.length).toString()):null,_=y.length>0?Yc.jsxs(R,{children:[m.groupedBy," ",y.map(((e,r)=>Yc.jsxs(n.Fragment,{children:[r>0?m.thenBy:"",Yc.jsxs(N,Object.assign({rightSection:Yc.jsx(p,{onClick:()=>t.getColumn(e).toggleGrouping(),size:"xs",children:Yc.jsx(d,{})}),sx:{marginLeft:"1ch"},variant:"filled"},C,{children:[t.getColumn(e).columnDef.header," "]}))]},"".concat(r,"-").concat(e))))]}):null;return Yc.jsx(E,{in:w||!!k||!!_,transitionDuration:e?200:0,children:Yc.jsx(L,Object.assign({color:"blue",icon:!1},S,{sx:t=>Object.assign({borderRadius:0,fontSize:"16px",left:0,position:"relative",marginBottom:e?0:"bottom"===h?"-16px":void 0,padding:"8px",right:0,top:0,width:"100%",zIndex:2},(null==S?void 0:S.sx)instanceof Function?S.sx(t):null==S?void 0:S.sx),children:null!==(a=null==b?void 0:b({groupedAlert:_,selectedAlert:k,table:t}))&&void 0!==a?a:Yc.jsxs(R,{sx:{gap:"12px",padding:"head-overlay"===h?"xl"===x?"16px":"md"===x?"8px":"2px":"8px 16px"},children:[c&&u&&"head-overlay"===h&&Yc.jsx(cp,{selectAll:!0,table:t}),Yc.jsxs(D,{children:[null==S?void 0:S.children,(null==S?void 0:S.children)&&(k||_)&&Yc.jsx("br",{}),k,k&&_&&Yc.jsx("br",{}),_]})]})}))})},kp=e=>{var t,{table:r}=e,o=sd(e,["table"]);const{getState:a,options:{icons:{IconMinimize:i,IconMaximize:l},localization:s},setIsFullScreen:c}=r,{isFullScreen:u}=a(),[m,g]=n.useState(!1);return Yc.jsx(d,{opened:m,withinPortal:!0,label:null!==(t=null==o?void 0:o.title)&&void 0!==t?t:s.toggleFullScreen,children:Yc.jsx(p,Object.assign({"aria-label":s.toggleFullScreen,onClick:()=>{g(!1),c(!u)},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),size:"lg"},o,{title:void 0,children:u?Yc.jsx(i,{}):Yc.jsx(l,{})}))})},_p=({column:e,table:t})=>{const{options:{icons:{IconPinned:n,IconPinnedOff:r},localization:o}}=t,a=t=>{e.pin(t)};return Yc.jsx(R,{sx:{minWidth:"70px",alignContent:"center",justifyContent:"center"},children:e.getIsPinned()?Yc.jsx(d,{withinPortal:!0,label:o.unpin,children:Yc.jsx(p,{onClick:()=>a(!1),size:"md",children:Yc.jsx(r,{})})}):Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(d,{withinPortal:!0,label:o.pinToLeft,children:Yc.jsx(p,{onClick:()=>a("left"),size:"md",children:Yc.jsx(n,{style:{transform:"rotate(90deg)"}})})}),Yc.jsx(d,{withinPortal:!0,label:o.pinToRight,children:Yc.jsx(p,{onClick:()=>a("right"),size:"md",children:Yc.jsx(n,{style:{transform:"rotate(-90deg)"}})})})]})})},Rp=({allColumns:e,hoveredColumn:t,setHoveredColumn:r,column:o,isSubMenu:a,table:i})=>{var l;const{getState:s,options:{enableColumnOrdering:c,enableHiding:p,enablePinning:m,localization:g},setColumnOrder:f}=i,{columnOrder:h}=s(),{columnDef:b}=o,{columnDefType:y}=b,w="group"!==y&&o.getIsVisible()||"group"===y&&o.getLeafColumns().some((e=>e.getIsVisible())),x=n.useRef(null),[S,C]=n.useState(!1);return Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(M.Item,{component:"span",ref:x,onDragEnter:e=>{S||!1===b.enableColumnOrdering||r(o)},sx:e=>({alignItems:"center",cursor:"default",justifyContent:"flex-start",opacity:S?.5:1,outline:S?"1px dashed ".concat(e.colors.gray[7]):(null==t?void 0:t.id)===o.id?"2px dashed ".concat(Bd(e)):"none",paddingLeft:"".concat(2*(o.depth+.5),"rem"),paddingTop:"6px",paddingBottom:"6px"}),children:Yc.jsxs(u,{sx:{display:"flex",flexWrap:"nowrap",gap:"8px"},children:[!a&&"group"!==y&&c&&!e.some((e=>"group"===e.columnDef.columnDefType))&&(!1!==b.enableColumnOrdering?Yc.jsx(np,{onDragEnd:e=>{C(!1),r(null),t&&f(Id(o,t,h))},onDragStart:e=>{C(!0),e.dataTransfer.setDragImage(x.current,0,0)},table:i}):Yc.jsx(u,{sx:{width:"22px"}})),!a&&m&&(o.getCanPin()?Yc.jsx(_p,{column:o,table:i}):Yc.jsx(u,{sx:{width:"70px"}})),p?Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:g.toggleVisibility,children:Yc.jsx(I,{checked:w,disabled:a&&w||!o.getCanHide(),label:b.header,onChange:()=>{return e=o,void("group"===y?null===(n=null===(t=null==e?void 0:e.columns)||void 0===t?void 0:t.forEach)||void 0===n||n.call(t,(e=>{e.toggleVisibility(!w)})):e.toggleVisibility());var e,t,n},sx:{cursor:"pointer !important"}})}):Yc.jsx(v,{sx:{alignSelf:"center"},children:b.header})]})}),null===(l=o.columns)||void 0===l?void 0:l.map(((n,o)=>Yc.jsx(Rp,{allColumns:e,column:n,hoveredColumn:t,isSubMenu:a,setHoveredColumn:r,table:i},"".concat(o,"-").concat(n.id))))]})},Op=({isSubMenu:e,table:t})=>{const{getAllColumns:r,getAllLeafColumns:o,getCenterLeafColumns:a,getIsAllColumnsVisible:i,getIsSomeColumnsPinned:l,getIsSomeColumnsVisible:s,getLeftLeafColumns:c,getRightLeafColumns:u,getState:d,toggleAllColumnsVisible:p,options:{enableColumnOrdering:m,enableHiding:g,enablePinning:f,localization:h}}=t,{columnOrder:b,columnPinning:v}=d(),y=n.useMemo((()=>{const e=r();return b.length>0&&!e.some((e=>"group"===e.columnDef.columnDefType))?[...c(),...Array.from(new Set(b)).map((e=>a().find((t=>(null==t?void 0:t.id)===e)))),...u()].filter(Boolean):e}),[b,v,r(),a(),c(),u()]),[w,x]=n.useState(null);return Yc.jsxs(M.Dropdown,{sx:{maxHeight:"calc(80vh - 100px)",overflowY:"auto"},children:[Yc.jsxs(R,{sx:{justifyContent:e?"center":"space-between",padding:"8px",gap:"8px"},children:[!e&&g&&Yc.jsx(U,{disabled:!s(),onClick:()=>{o().filter((e=>!1!==e.columnDef.enableHiding)).forEach((e=>e.toggleVisibility(!1)))},variant:"subtle",children:h.hideAll}),!e&&m&&Yc.jsx(U,{onClick:()=>t.setColumnOrder(Fd(t.options)),variant:"subtle",children:h.resetOrder}),!e&&f&&Yc.jsx(U,{disabled:!l(),onClick:()=>t.resetColumnPinning(!0),variant:"subtle",children:h.unpinAll}),g&&Yc.jsx(U,{disabled:i(),onClick:()=>p(!0),variant:"subtle",children:h.showAll})]}),Yc.jsx(G,{}),y.map(((n,r)=>Yc.jsx(Rp,{allColumns:y,column:n,hoveredColumn:w,isSubMenu:e,setHoveredColumn:x,table:t},"".concat(r,"-").concat(n.id))))]})},Ip=e=>{var t,{table:n}=e,r=sd(e,["table"]);const{options:{icons:{IconColumns:o},localization:a}}=n;return Yc.jsxs(M,{closeOnItemClick:!1,withinPortal:!0,children:[Yc.jsx(d,{withinPortal:!0,label:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:a.showHideColumns,children:Yc.jsx(M.Target,{children:Yc.jsx(p,Object.assign({"aria-label":a.showHideColumns,size:"lg"},r,{title:void 0,children:Yc.jsx(o,{})}))})}),Yc.jsx(Op,{table:n})]})},Pp=["xs","md","xl"],Fp=e=>{var t,{table:n}=e,r=sd(e,["table"]);const{getState:o,options:{icons:{IconBaselineDensityLarge:a,IconBaselineDensityMedium:i,IconBaselineDensitySmall:l},localization:s},setDensity:c}=n,{density:u}=o();return Yc.jsx(d,{withinPortal:!0,label:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:s.toggleDensity,children:Yc.jsx(p,Object.assign({"aria-label":s.toggleDensity,onClick:()=>{var e;c(null!==(e=Pp[(Pp.indexOf(u)-1)%Pp.length])&&void 0!==e?e:"xl")},size:"lg"},r,{title:void 0,children:"xs"===u?Yc.jsx(l,{}):"md"===u?Yc.jsx(i,{}):Yc.jsx(a,{})}))})},jp=e=>{var t,{table:n}=e,r=sd(e,["table"]);const{getState:o,options:{icons:{IconFilter:a,IconFilterOff:i},localization:l},setShowColumnFilters:s}=n,{showColumnFilters:c}=o();return Yc.jsx(d,{withinPortal:!0,label:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:l.showHideFilters,children:Yc.jsx(p,Object.assign({"aria-label":l.showHideFilters,onClick:()=>{s(!c)},size:"lg"},r,{title:void 0,children:c?Yc.jsx(i,{}):Yc.jsx(a,{})}))})},Mp=e=>{var t,n,{table:r}=e,o=sd(e,["table"]);const{getState:a,options:{icons:{IconSearch:i,IconSearchOff:l},localization:s},refs:{searchInputRef:c},setShowGlobalFilter:u}=r,{globalFilter:m,showGlobalFilter:g}=a();return Yc.jsx(d,{withinPortal:!0,label:null!==(t=null==o?void 0:o.title)&&void 0!==t?t:s.showHideSearch,children:Yc.jsx(p,Object.assign({"aria-label":null!==(n=null==o?void 0:o.title)&&void 0!==n?n:s.showHideSearch,disabled:!!m,onClick:()=>{u(!g),setTimeout((()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()}),100)},size:"lg"},o,{title:void 0,children:g?Yc.jsx(l,{}):Yc.jsx(i,{})}))})},Ap=({table:e})=>{var t;const{options:{columnFilterDisplayMode:n,enableColumnFilters:r,enableColumnOrdering:o,enableDensityToggle:a,enableFilters:i,enableFullScreenToggle:l,enableGlobalFilter:s,enableHiding:c,enablePinning:u,initialState:d,renderToolbarInternalActions:p}}=e;return Yc.jsx(R,{sx:{alignItems:"center",gap:"2px",zIndex:3},children:null!==(t=null==p?void 0:p({table:e}))&&void 0!==t?t:Yc.jsxs(Yc.Fragment,{children:[i&&s&&!(null==d?void 0:d.showGlobalFilter)&&Yc.jsx(Mp,{table:e}),i&&r&&"popover"!==n&&Yc.jsx(jp,{table:e}),(c||o||u)&&Yc.jsx(Ip,{table:e}),a&&Yc.jsx(Fp,{table:e}),l&&Yc.jsx(kp,{table:e})]})})},Tp=({table:e})=>{const{getState:t,options:{enableGrouping:r,localization:o},setHoveredColumn:a,setShowToolbarDropZone:i}=e,{draggingColumn:l,hoveredColumn:s,grouping:c,showToolbarDropZone:u}=t(),d=e=>{a({id:"drop-zone"})};return n.useEffect((()=>{var t;void 0!==(null===(t=e.options.state)||void 0===t?void 0:t.showToolbarDropZone)&&i(!!r&&!!l&&!1!==l.columnDef.enableGrouping&&!c.includes(l.id))}),[r,l,c]),Yc.jsx(z,{mounted:u,transition:"fade",children:e=>{var t,n;return Yc.jsx(R,{className:"mantine-ToolbarDropZone",sx:e=>({alignItems:"center",backgroundColor:e.fn.rgba(Bd(e),"drop-zone"===(null==s?void 0:s.id)?.2:.1),border:"dashed ".concat(Bd(e)," 2px"),justifyContent:"center",height:"calc(100%)",position:"absolute",width:"calc(100%)",zIndex:2}),onDragEnter:d,style:e,children:Yc.jsx(v,{children:o.dropToGroupBy.replace("{column}",null!==(n=null===(t=null==l?void 0:l.columnDef)||void 0===t?void 0:t.header)&&void 0!==n?n:"")})})}})},Np=({theme:e})=>({alignItems:"flex-start",backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,backgroundImage:"none",display:"grid",flexWrap:"wrap-reverse",minHeight:"3.5rem",overflow:"visible",padding:"0",transition:"all 100ms ease-in-out",zIndex:3}),Lp=({table:e})=>{var t;const{getState:n,options:{enableGlobalFilter:r,enablePagination:o,enableToolbarInternalActions:a,mantineTopToolbarProps:i,positionGlobalFilter:l,positionPagination:s,positionToolbarAlertBanner:c,positionToolbarDropZone:d,renderTopToolbarCustomActions:p},refs:{topToolbarRef:m}}=e,{isFullScreen:g,showGlobalFilter:f}=n(),h=_("(max-width: 720px)"),b=i instanceof Function?i({table:e}):i,v=h||!!p||f;return Yc.jsxs(u,Object.assign({},b,{ref:e=>{e&&(m.current=e,(null==b?void 0:b.ref)&&(b.ref.current=e))},sx:e=>Object.assign(Object.assign({position:g?"sticky":"relative",top:g?"0":void 0},Np({theme:e})),(null==b?void 0:b.sx)instanceof Function?b.sx(e):null==b?void 0:b.sx),children:["top"===c&&Yc.jsx(Ep,{stackAlertBanner:v,table:e}),["both","top"].includes(null!=d?d:"")&&Yc.jsx(Tp,{table:e}),Yc.jsxs(R,{sx:{alignItems:"flex-start",boxSizing:"border-box",justifyContent:"space-between",padding:"8px",position:v?"relative":"absolute",right:0,top:0,width:"100%"},children:[r&&"left"===l&&Yc.jsx(bp,{table:e}),null!==(t=null==p?void 0:p({table:e}))&&void 0!==t?t:Yc.jsx("span",{}),a?Yc.jsxs(R,{sx:{flexWrap:"wrap-reverse",justifyContent:"flex-end"},children:[r&&"right"===l&&Yc.jsx(bp,{table:e}),Yc.jsx(Ap,{table:e})]}):r&&"right"===l&&Yc.jsx(bp,{table:e})]}),o&&["top","both"].includes(null!=s?s:"")&&Yc.jsx(R,{justify:"end",children:Yc.jsx(wp,{table:e,position:"top"})}),Yc.jsx(vp,{isTopToolbar:!0,table:e})]}))},Dp=({table:e})=>{const{getState:t,options:{enablePagination:n,mantineBottomToolbarProps:r,positionPagination:o,positionToolbarAlertBanner:a,positionToolbarDropZone:i,renderBottomToolbarCustomActions:l},refs:{bottomToolbarRef:s}}=e,{isFullScreen:c}=t(),d=_("(max-width: 720px)"),p=r instanceof Function?r({table:e}):r,m=d||!!l;return Yc.jsxs(u,Object.assign({},p,{ref:e=>{e&&(s.current=e,(null==p?void 0:p.ref)&&(p.ref.current=e))},sx:e=>Object.assign(Object.assign(Object.assign({},Np({theme:e})),{bottom:c?"0":void 0,boxShadow:"0 1px 2px -1px ".concat(e.fn.rgba(e.black,.1)," inset"),left:0,position:c?"fixed":"relative",right:0}),(null==p?void 0:p.sx)instanceof Function?p.sx(e):null==p?void 0:p.sx),children:[Yc.jsx(vp,{isTopToolbar:!1,table:e}),"bottom"===a&&Yc.jsx(Ep,{stackAlertBanner:m,table:e}),["both","bottom"].includes(null!=i?i:"")&&Yc.jsx(Tp,{table:e}),Yc.jsxs(u,{sx:{alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",padding:"8px",width:"100%"},children:[l?l({table:e}):Yc.jsx("span",{}),Yc.jsx(u,{sx:{display:"flex",justifyContent:"flex-end",position:m?"relative":"absolute",right:0,top:0},children:n&&["bottom","both"].includes(null!=o?o:"")&&Yc.jsx(wp,{table:e,position:"bottom"})})]})]}))},zp=({header:e,table:t})=>{var n,r,o,a,i,l,s,c,u,m;const{getState:g,toggleAllColumnsVisible:f,setColumnOrder:h,options:{columnFilterDisplayMode:b,enableColumnFilters:v,enableColumnResizing:y,enableGrouping:w,enableHiding:x,enablePinning:S,enableSorting:C,enableSortingRemoval:E,icons:{IconArrowAutofitContent:k,IconBoxMultiple:_,IconClearAll:R,IconColumns:O,IconDotsVertical:I,IconEyeOff:P,IconFilter:F,IconFilterOff:j,IconPinned:A,IconPinnedOff:T,IconSortAscending:N,IconSortDescending:L},localization:D,mantineColumnActionsButtonProps:z,renderColumnActionsMenuItems:B},refs:{filterInputRefs:V},setColumnSizingInfo:U,setShowColumnFilters:G}=t,{column:H}=e,{columnDef:q}=H,{columnSizing:$,columnVisibility:W}=g(),K=z instanceof Function?z({column:H,table:t}):z,Y=q.mantineColumnActionsButtonProps instanceof Function?q.mantineColumnActionsButtonProps({column:H,table:t}):q.mantineColumnActionsButtonProps,X=Object.assign(Object.assign({},K),Y),Q=e=>{H.pin(e)},Z=Yc.jsxs(Yc.Fragment,{children:[C&&H.getCanSort()&&Yc.jsxs(Yc.Fragment,{children:[!1!==E&&Yc.jsx(M.Item,{disabled:!H.getIsSorted(),icon:Yc.jsx(R,{}),onClick:()=>{H.clearSorting()},children:D.clearSort}),Yc.jsx(M.Item,{disabled:"asc"===H.getIsSorted(),icon:Yc.jsx(N,{}),onClick:()=>{H.toggleSorting(!1)},children:null===(n=D.sortByColumnAsc)||void 0===n?void 0:n.replace("{column}",String(q.header))}),Yc.jsx(M.Item,{icon:Yc.jsx(L,{}),disabled:"desc"===H.getIsSorted(),onClick:()=>{H.toggleSorting(!0)},children:null===(r=D.sortByColumnDesc)||void 0===r?void 0:r.replace("{column}",String(q.header))}),(v||w||x)&&Yc.jsx(M.Divider,{},3)]}),v&&"popover"!==b&&H.getCanFilter()&&Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(M.Item,{disabled:!H.getFilterValue(),icon:Yc.jsx(j,{}),onClick:()=>{H.setFilterValue("")},children:D.clearFilter}),Yc.jsx(M.Item,{icon:Yc.jsx(F,{}),onClick:()=>{G(!0),setTimeout((()=>{var e;return null===(e=V.current["".concat(H.id,"-0")])||void 0===e?void 0:e.focus()}),100)},children:null===(o=D.filterByColumn)||void 0===o?void 0:o.replace("{column}",String(q.header))}),(w||x)&&Yc.jsx(M.Divider,{},2)]}),w&&H.getCanGroup()&&Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(M.Item,{icon:Yc.jsx(_,{}),onClick:()=>{H.toggleGrouping(),h((e=>["mrt-row-expand",...e]))},children:null===(a=D[H.getIsGrouped()?"ungroupByColumn":"groupByColumn"])||void 0===a?void 0:a.replace("{column}",String(q.header))}),S&&Yc.jsx(M.Divider,{})]}),S&&H.getCanPin()&&Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(M.Item,{disabled:"left"===H.getIsPinned()||!H.getCanPin(),icon:Yc.jsx(A,{style:{transform:"rotate(90deg)"}}),onClick:()=>Q("left"),children:D.pinToLeft}),Yc.jsx(M.Item,{disabled:"right"===H.getIsPinned()||!H.getCanPin(),icon:Yc.jsx(A,{style:{transform:"rotate(-90deg)"}}),onClick:()=>Q("right"),children:D.pinToRight}),Yc.jsx(M.Item,{disabled:!H.getIsPinned(),icon:Yc.jsx(T,{}),onClick:()=>Q(!1),children:D.unpin}),x&&Yc.jsx(M.Divider,{})]}),y&&H.getCanResize()&&Yc.jsx(M.Item,{disabled:!$[H.id],icon:Yc.jsx(k,{}),onClick:()=>{U((e=>Object.assign(Object.assign({},e),{isResizingColumn:!1}))),H.resetSize()},children:D.resetColumnSize},0),x&&Yc.jsxs(Yc.Fragment,{children:[Yc.jsx(M.Item,{disabled:!H.getCanHide(),icon:Yc.jsx(P,{}),onClick:()=>{H.toggleVisibility(!1)},children:null===(i=D.hideColumn)||void 0===i?void 0:i.replace("{column}",String(q.header))},0),Yc.jsx(M.Item,{disabled:!Object.values(W).filter((e=>!e)).length,icon:Yc.jsx(O,{}),onClick:()=>{f(!0)},children:null===(l=D.showAllColumns)||void 0===l?void 0:l.replace("{column}",String(q.header))},1)]})]});return Yc.jsxs(M,{closeOnItemClick:!0,withinPortal:!0,position:"bottom-start",children:[Yc.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(s=null==X?void 0:X.title)&&void 0!==s?s:D.columnActions,children:Yc.jsx(M.Target,{children:Yc.jsx(p,Object.assign({"aria-label":D.columnActions,size:"sm"},X,{sx:e=>Object.assign({opacity:.5,transition:"opacity 100ms","&:hover":{opacity:1}},(null==X?void 0:X.sx)instanceof Function?X.sx(e):null==X?void 0:X.sx),children:Yc.jsx(I,{})}))})}),Yc.jsx(M.Dropdown,{children:null!==(m=null!==(u=null===(c=q.renderColumnActionsMenuItems)||void 0===c?void 0:c.call(q,{column:H,table:t,internalColumnMenuItems:Z}))&&void 0!==u?u:null==B?void 0:B({column:H,table:t,internalColumnMenuItems:Z}))&&void 0!==m?m:Z})]})},Bp=({header:e,table:t})=>{var r;const{options:{mantineFilterRangeSliderProps:o},refs:{filterInputRefs:a}}=t,{column:i}=e,{columnDef:l}=i,s=o instanceof Function?o({column:i,table:t}):o,c=l.mantineFilterRangeSliderProps instanceof Function?l.mantineFilterRangeSliderProps({column:i,table:t}):l.mantineFilterRangeSliderProps,u=Object.assign(Object.assign({},s),c);let[d,p]=void 0!==u.min&&void 0!==u.max?[u.min,u.max]:null!==(r=i.getFacetedMinMaxValues())&&void 0!==r?r:[0,1];Array.isArray(d)&&(d=d[0]),Array.isArray(p)&&(p=p[0]),null===d&&(d=0),null===p&&(p=1);const[m,g]=n.useState([d,p]),f=i.getFilterValue(),h=n.useRef(!1);return n.useEffect((()=>{h.current&&(void 0===f?g([d,p]):Array.isArray(f)&&g(f)),h.current=!0}),[f,d,p]),Yc.jsx(Y,Object.assign({min:d,max:p,onChange:e=>{g(e)},onChangeEnd:e=>{Array.isArray(e)&&(e[0]<=d&&e[1]>=p?i.setFilterValue(void 0):i.setFilterValue(e))},value:m},u,{ref:e=>{e&&(a.current["".concat(i.id,"-0")]=e,(null==u?void 0:u.ref)&&(u.ref=e))},sx:e=>Object.assign({margin:"auto",marginTop:"16px",marginBottom:"6px",width:"calc(100% - 8px)"},(null==u?void 0:u.sx)instanceof Function?u.sx(e):null==u?void 0:u.sx)}))},Vp=({header:e,table:t})=>{var n,r,o;const{getState:a,options:{columnFilterDisplayMode:i,enableColumnFilterModes:l,columnFilterModeOptions:s,icons:{IconFilterCog:c},localization:u},refs:{filterInputRefs:m}}=t,{showColumnFilters:g}=a(),{column:f}=e,{columnDef:h}=f,b=h._filterFn,y=null!==(n=null==h?void 0:h.columnFilterModeOptions)&&void 0!==n?n:s,w=l&&!1!==h.enableColumnFilterModes&&(void 0===y||!!(null==y?void 0:y.length));return Yc.jsx(E,{in:g||"popover"===i,children:Yc.jsxs(R,{direction:"column",children:[Yc.jsxs(R,{align:"flex-end",children:["checkbox"===h.filterVariant?Yc.jsx(xp,{column:f,table:t}):"range-slider"===h.filterVariant?Yc.jsx(Bp,{header:e,table:t}):["range","date-range"].includes(null!==(r=h.filterVariant)&&void 0!==r?r:"")||["between","betweenInclusive","inNumberRange"].includes(h._filterFn)?Yc.jsx(Cp,{header:e,table:t}):Yc.jsx(Sp,{header:e,table:t}),w&&Yc.jsxs(M,{withinPortal:"popover"!==i,children:[Yc.jsx(d,{label:u.changeFilterMode,position:"bottom-start",withinPortal:!0,children:Yc.jsx(M.Target,{children:Yc.jsx(p,{"aria-label":u.changeFilterMode,size:"md",sx:{transform:"translateY(-2px)"},children:Yc.jsx(c,{})})})}),Yc.jsx(hp,{header:e,table:t,onSelect:()=>setTimeout((()=>{var e;return null===(e=m.current["".concat(f.id,"-0")])||void 0===e?void 0:e.focus()}),100)})]})]}),w?Yc.jsx(v,{component:"label",color:"dimmed",sx:{whiteSpace:"nowrap",marginTop:"4px",fontSize:"10px"},children:u.filterMode.replace("{filterType}",u["filter".concat((null===(o=null==b?void 0:b.charAt(0))||void 0===o?void 0:o.toUpperCase())+(null==b?void 0:b.slice(1)))])}):null]})})},Up=({header:e,table:t})=>{var r,o,a,i;const{options:{columnFilterDisplayMode:s,icons:{IconFilter:c},localization:m},refs:{filterInputRefs:g},setShowColumnFilters:f}=t,{column:h}=e,{columnDef:b}=h,v=l(),y=h.getFilterValue(),[w,x]=n.useState(!1),S=Array.isArray(y)&&y.some(Boolean)||!!y&&!Array.isArray(y),C="range"===b.filterVariant||["between","betweenInclusive","inNumberRange"].includes(b._filterFn),E=b._filterFn,k="popover"!==s||S?m.filteringByColumn.replace("{column}",String(b.header)).replace("{filterType}",m["filter".concat((null===(o=null==E?void 0:E.charAt(0))||void 0===o?void 0:o.toUpperCase())+(null==E?void 0:E.slice(1)))]).replace("{filterValue}",'"'.concat(Array.isArray(h.getFilterValue())?h.getFilterValue().join('" '.concat(C?m.and:m.or,' "')):h.getFilterValue(),'"')).replace('" "',""):null===(r=m.filterByColumn)||void 0===r?void 0:r.replace("{column}",String(b.header));return Yc.jsxs(H,{onClose:()=>x(!1),opened:w,position:"top",keepMounted:"range-slider"===b.filterVariant,shadow:"xl",width:360,withinPortal:!0,children:[Yc.jsx(z,{transition:"scale",mounted:"popover"===s||!!h.getFilterValue()&&!C||C&&(!!(null===(a=h.getFilterValue())||void 0===a?void 0:a[0])||!!(null===(i=h.getFilterValue())||void 0===i?void 0:i[1])),children:e=>Yc.jsx(u,{component:"span",sx:{flex:"0 0"},style:e,children:Yc.jsx(H.Target,{children:Yc.jsx(d,{disabled:w,label:k,multiline:!0,width:k.length>40?300:void 0,withinPortal:!0,children:Yc.jsx(p,{color:S?Bd(v):void 0,onClick:e=>{e.stopPropagation(),"popover"===s?x((e=>!e)):f(!0),setTimeout((()=>{var e,t;null===(e=g.current["".concat(h.id,"-0")])||void 0===e||e.focus(),null===(t=g.current["".concat(h.id,"-0")])||void 0===t||t.select()}),100)},size:"sm",sx:{opacity:S?1:.5,padding:"2px","&:hover":{opacity:1}},children:Yc.jsx(c,{})})})})})}),"popover"===s&&Yc.jsx(H.Dropdown,{onClick:e=>e.stopPropagation(),onKeyDown:e=>"Enter"===e.key&&x(!1),children:Yc.jsx(Vp,{header:e,table:t})})]})},Gp=({column:e,table:t,tableHeadCellRef:n})=>{const{getState:r,options:{enableColumnOrdering:o,mantineColumnDragHandleProps:a},setColumnOrder:i,setDraggingColumn:l,setHoveredColumn:s}=t,{columnDef:c}=e,{hoveredColumn:u,draggingColumn:d,columnOrder:p}=r(),m=a instanceof Function?a({column:e,table:t}):a,g=c.mantineColumnDragHandleProps instanceof Function?c.mantineColumnDragHandleProps({column:e,table:t}):c.mantineColumnDragHandleProps,f=Object.assign(Object.assign({},m),g);return Yc.jsx(np,{actionIconProps:f,onDragStart:t=>{var r;null===(r=null==f?void 0:f.onDragStart)||void 0===r||r.call(f,t),l(e),t.dataTransfer.setDragImage(n.current,0,0)},onDragEnd:t=>{var n;null===(n=null==f?void 0:f.onDragEnd)||void 0===n||n.call(f,t),"drop-zone"===(null==u?void 0:u.id)?e.toggleGrouping():o&&u&&(null==u?void 0:u.id)!==(null==d?void 0:d.id)&&i(Id(e,u,p)),l(null),s(null)},table:t})},Hp=({header:e,table:t})=>{var n;const{getState:r,options:{columnResizeMode:o},setColumnSizingInfo:a}=t,{density:i}=r(),{column:l}=e;return Yc.jsx(u,{onDoubleClick:()=>{a((e=>Object.assign(Object.assign({},e),{isResizingColumn:!1}))),l.resetSize()},onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),sx:e=>({cursor:"col-resize",marginRight:"xl"===i?"-24px":"md"===i?"-20px":"-14px",position:"absolute",right:"4px",paddingLeft:"1px",paddingRight:"1px","&:active > .mantine-Divider-vertical":{borderLeftColor:Bd(e)}}),style:{transform:l.getIsResizing()&&"onEnd"===o?"translateX(".concat(null!==(n=r().columnSizingInfo.deltaOffset)&&void 0!==n?n:0,"px)"):void 0},children:Yc.jsx(G,{orientation:"vertical",size:"lg",sx:{borderRadius:"2px",borderWidth:"4px",height:"24px",touchAction:"none",transition:l.getIsResizing()?void 0:"all 100ms ease-in-out",userSelect:"none",zIndex:4}})})},qp=({header:e,table:t})=>{const{getState:n,options:{icons:{IconSortDescending:r,IconSortAscending:o,IconArrowsSort:a},localization:i}}=t,{column:s}=e,{columnDef:c}=s,{sorting:u}=n(),m=l(),g=s.getIsSorted()?"desc"===s.getIsSorted()?i.sortedByColumnDesc.replace("{column}",c.header):i.sortedByColumnAsc.replace("{column}",c.header):"desc"===s.getNextSortingOrder()?i.sortByColumnDesc.replace("{column}",c.header):i.sortByColumnAsc.replace("{column}",c.header),f=u.length>=2&&-1!==s.getSortIndex();return Yc.jsx(d,{withinPortal:!0,label:g,children:Yc.jsx(q,{color:"transparent",disabled:!f,inline:!0,label:s.getSortIndex()+1,offset:3,children:Yc.jsx(p,{"aria-label":g,color:s.getIsSorted()?Bd(m):void 0,size:"xs",sx:{opacity:s.getIsSorted()?1:.5,transform:f?"translate(-2px, 2px) scale(0.9)":void 0,transition:"opacity 100ms ease-in-out","&:hover":{opacity:1}},children:"desc"===s.getIsSorted()?Yc.jsx(r,{}):"asc"===s.getIsSorted()?Yc.jsx(o,{}):Yc.jsx(a,{})})})})},$p=({header:e,table:t})=>{var r,o,a,i;const s=l(),{getState:c,options:{columnFilterDisplayMode:d,enableColumnActions:p,enableColumnDragging:m,enableColumnOrdering:g,enableGrouping:f,enableMultiSort:h,layoutMode:b,mantineTableHeadCellProps:v},refs:{tableHeadCellRefs:y},setHoveredColumn:w}=t,{density:x,draggingColumn:S,grouping:C,hoveredColumn:E}=c(),{column:k}=e,{columnDef:_}=k,{columnDefType:O}=_,I=v instanceof Function?v({column:k,table:t}):v,P=_.mantineTableHeadCellProps instanceof Function?_.mantineTableHeadCellProps({column:k,table:t}):_.mantineTableHeadCellProps,F=Object.assign(Object.assign({},I),P),j=(p||_.enableColumnActions)&&!1!==_.enableColumnActions,M=!1!==m&&!1!==_.enableColumnDragging&&(m||g&&!1!==_.enableColumnOrdering||f&&!1!==_.enableGrouping&&!C.includes(k.id)),A=n.useMemo((()=>{let e=0;return k.getCanSort()&&e++,j&&(e+=1.75),M&&(e+=1.25),e}),[j,M]),T=n.useMemo((()=>(null==S?void 0:S.id)===k.id?"1px dashed ".concat(s.colors.gray[7]," !important"):(null==E?void 0:E.id)===k.id?"2px dashed ".concat(Bd(s)," !important"):void 0),[S,E]),N=T?{borderLeft:T,borderRight:T,borderTop:T}:void 0,L=(null==_?void 0:_.Header)instanceof Function?null===(r=null==_?void 0:_.Header)||void 0===r?void 0:r.call(_,{column:k,header:e,table:t}):null!==(o=null==_?void 0:_.Header)&&void 0!==o?o:_.header;return Yc.jsxs(u,Object.assign({component:"th",align:"group"===O?"center":"left",colSpan:e.colSpan,onDragEnter:e=>{f&&"drop-zone"===(null==E?void 0:E.id)&&w(null),g&&S&&"group"!==O&&w(!1!==_.enableColumnOrdering?k:null)},ref:e=>{e&&(y.current[k.id]=e)}},F,{sx:n=>Object.assign(Object.assign({flexDirection:"grid"===b?"column":void 0,fontWeight:"bold",overflow:"visible",padding:"xl"===x?"23px":"md"===x?"16px":"10px",userSelect:h&&k.getCanSort()?"none":void 0,verticalAlign:"top",zIndex:k.getIsResizing()||(null==S?void 0:S.id)===k.id?3:k.getIsPinned()&&"group"!==O?2:1,"&:hover .mantine-ActionIcon-root":{opacity:1}},Ld({column:k,header:e,table:t,tableCellProps:F,theme:n})),N),children:[e.isPlaceholder?null:Yc.jsxs(R,{className:"mantine-TableHeadCell-Content",sx:{alignItems:"flex-start",flexDirection:"right"===(null==F?void 0:F.align)?"row-reverse":"row",justifyContent:"group"===O||"center"===(null==F?void 0:F.align)?"center":k.getCanResize()?"space-between":"flex-start",position:"relative",width:"100%"},children:[Yc.jsxs(R,{className:"mantine-TableHeadCell-Content-Labels",onClick:k.getToggleSortingHandler(),sx:{alignItems:"center",cursor:k.getCanSort()&&"group"!==O?"pointer":void 0,flexDirection:"right"===(null==F?void 0:F.align)?"row-reverse":"row",overflow:"data"===O?"hidden":void 0,paddingLeft:"center"===(null==F?void 0:F.align)?"".concat(A,"rem"):void 0},children:[Yc.jsx(R,{className:"mantine-TableHeadCell-Content-Wrapper",sx:{overflow:"data"===O?"hidden":void 0,textOverflow:"ellipsis",whiteSpace:(null!==(i=null===(a=_.header)||void 0===a?void 0:a.length)&&void 0!==i?i:0)<20?"nowrap":"normal"},title:"data"===O?_.header:void 0,children:L}),k.getCanSort()&&Yc.jsx(qp,{header:e,table:t}),k.getCanFilter()&&Yc.jsx(Up,{header:e,table:t})]}),"group"!==O&&Yc.jsxs(R,{className:"mantine-TableHeadCell-Content-Actions",sx:{alignItems:"center",alignSelf:"center",whiteSpace:"nowrap"},children:[M&&Yc.jsx(Gp,{column:k,table:t,tableHeadCellRef:{current:y.current[k.id]}}),j&&Yc.jsx(zp,{header:e,table:t})]}),k.getCanResize()&&Yc.jsx(Hp,{header:e,table:t})]}),"subheader"===d&&k.getCanFilter()&&Yc.jsx(Vp,{header:e,table:t})]}))},Wp=({headerGroup:e,table:t,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:o})=>{const{getState:a,options:{enableStickyHeader:i,layoutMode:l,mantineTableHeadRowProps:s}}=t,{isFullScreen:c}=a(),d=s instanceof Function?s({headerGroup:e,table:t}):s,p=i||c;return Yc.jsxs(u,Object.assign({component:"tr"},d,{sx:e=>Object.assign(Object.assign({backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,boxShadow:"0 4px 8px ".concat(e.fn.rgba(e.black,.1)),display:"grid"===l?"flex":"table-row",top:p?0:void 0},(null==d?void 0:d.sx)instanceof Function?null==d?void 0:d.sx(e):null==d?void 0:d.sx),{position:p?"sticky":void 0}),children:[r?Yc.jsx("th",{style:{display:"flex",width:r}}):null,(null!=n?n:e.headers).map((r=>{const o=n?e.headers[r.index]:r;return Yc.jsx($p,{header:o,table:t},o.id)})),o?Yc.jsx("th",{style:{display:"flex",width:o}}):null]}))},Kp=({table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getHeaderGroups:o,getSelectedRowModel:a,getState:i,options:{enableStickyHeader:l,layoutMode:s,mantineTableHeadProps:c,positionToolbarAlertBanner:d}}=e,{isFullScreen:p,showAlertBanner:m}=i(),g=c instanceof Function?c({table:e}):c,f=l||p;return Yc.jsx(u,Object.assign({component:"thead"},g,{sx:e=>Object.assign({display:"grid"===s?"grid":"table-row-group",position:f&&"grid"===s?"sticky":"relative",opacity:.97,top:f?0:void 0,zIndex:f?2:void 0},(null==g?void 0:g.sx)instanceof Function?null==g?void 0:g.sx(e):null==g?void 0:g.sx),children:"head-overlay"===d&&(m||a().rows.length>0)?Yc.jsx("tr",{style:{display:"grid"===s?"grid":"table-row"},children:Yc.jsx("th",{colSpan:e.getVisibleLeafColumns().length,style:{display:"grid"===s?"grid":"table-cell",padding:0},children:Yc.jsx(Ep,{table:e})})}):o().map((o=>Yc.jsx(Wp,{headerGroup:o,table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r},o.id)))}))},Yp=({footer:e,table:t})=>{var n,r,o;const{options:{layoutMode:a,mantineTableFooterCellProps:i}}=t,{column:l}=e,{columnDef:s}=l,{columnDefType:c}=s,d=i instanceof Function?i({column:l,table:t}):i,p=s.mantineTableFooterCellProps instanceof Function?s.mantineTableFooterCellProps({column:l,table:t}):s.mantineTableFooterCellProps,m=Object.assign(Object.assign({},d),p);return Yc.jsx(u,Object.assign({component:"th",align:"group"===c?"center":"left",colSpan:e.colSpan},m,{sx:e=>Object.assign({display:"grid"===a?"grid":"table-cell",fontWeight:"bold",justifyContent:"group"===c?"center":void 0,padding:"8px",verticalAlign:"top",zIndex:l.getIsPinned()&&"group"!==c?2:1},Ld({column:l,table:t,theme:e,tableCellProps:m})),children:Yc.jsx(Yc.Fragment,{children:e.isPlaceholder?null:null!==(o=null!==(r=s.Footer instanceof Function?null===(n=s.Footer)||void 0===n?void 0:n.call(s,{column:l,footer:e,table:t}):s.Footer)&&void 0!==r?r:s.footer)&&void 0!==o?o:null})}))},Xp=({footerGroup:e,table:t,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:o})=>{var a;const{options:{layoutMode:i,mantineTableFooterRowProps:l}}=t;if(!(null===(a=e.headers)||void 0===a?void 0:a.some((e=>"string"==typeof e.column.columnDef.footer&&!!e.column.columnDef.footer||e.column.columnDef.Footer))))return null;const s=l instanceof Function?l({footerGroup:e,table:t}):l;return Yc.jsxs(u,Object.assign({component:"tr"},s,{sx:e=>Object.assign({backgroundColor:e.fn.lighten("dark"===e.colorScheme?e.colors.dark[7]:e.white,.06),display:"grid"===i?"flex":"table-row",width:"100%"},(null==s?void 0:s.sx)instanceof Function?null==s?void 0:s.sx(e):null==s?void 0:s.sx),children:[r?Yc.jsx("th",{style:{display:"flex",width:r}}):null,(null!=n?n:e.headers).map((r=>{const o=n?e.headers[r.index]:r;return Yc.jsx(Yp,{footer:o,table:t},o.id)})),o?Yc.jsx("th",{style:{display:"flex",width:o}}):null]}))},Qp=({table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getFooterGroups:o,getState:a,options:{enableStickyFooter:i,layoutMode:l,mantineTableFooterProps:s}}=e,{isFullScreen:c}=a(),d=s instanceof Function?s({table:e}):s,p=(c||i)&&!1!==i;return Yc.jsx(u,Object.assign({component:"tfoot"},d,{sx:e=>Object.assign({bottom:p?0:void 0,display:"grid"===l?"grid":"table-row-group",opacity:p?.97:void 0,outline:p?"light"===e.colorScheme?"1px solid ".concat(e.colors.gray[3]):"1px solid ".concat(e.colors.gray[7]):void 0,position:p?"sticky":void 0,zIndex:p?1:void 0},(null==d?void 0:d.sx)instanceof Function?null==d?void 0:d.sx(e):null==d?void 0:d.sx),children:o().map((o=>Yc.jsx(Xp,{footerGroup:o,table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r},o.id)))}))},Zp=({table:e})=>{var t,r,o,a;const{getFlatHeaders:i,getState:l,options:{columnVirtualizerInstanceRef:s,columnVirtualizerProps:c,columns:u,enableColumnResizing:d,enableColumnVirtualization:p,enablePinning:m,enableTableFooter:g,enableTableHead:f,layoutMode:h,mantineTableProps:b,memoMode:v},refs:{tableContainerRef:y}}=e,{columnPinning:w,columnSizing:x,columnSizingInfo:S,columnVisibility:C,density:E}=l(),k=b instanceof Function?b({table:e}):b,_=c instanceof Function?c({table:e}):c,R=n.useMemo((()=>{const e=i(),t={};for(let n=0;n{var t,n,r,o;if(!p)return 0;const a=null!==(o=null===(r=null===(n=null===(t=e.getRowModel().rows[0])||void 0===t?void 0:t.getCenterVisibleCells())||void 0===n?void 0:n.slice(0,16))||void 0===r?void 0:r.map((e=>1.2*e.column.getSize())))&&void 0!==o?o:[];return a.reduce(((e,t)=>e+t),0)/a.length}),[e.getRowModel().rows,w,C]),[I,P]=n.useMemo((()=>p&&m?[e.getLeftLeafColumns().map((e=>e.getPinnedIndex())),e.getRightLeafColumns().map((t=>e.getVisibleLeafColumns().length-t.getPinnedIndex()-1))]:[[],[]]),[w,p,m]),F=p?ld(Object.assign({count:e.getVisibleLeafColumns().length,estimateSize:()=>O,getScrollElement:()=>y.current,horizontal:!0,overscan:3,rangeExtractor:n.useCallback((e=>[...new Set([...I,...Ju(e),...P])]),[I,P])},_)):void 0;s&&F&&(s.current=F);const j=F?F.getVirtualItems():void 0;let M,A;F&&(null==j?void 0:j.length)&&(M=null!==(r=null===(t=j[I.length])||void 0===t?void 0:t.start)&&void 0!==r?r:0,A=F.getTotalSize()-(null!==(a=null===(o=j[j.length-1-P.length])||void 0===o?void 0:o.end)&&void 0!==a?a:0));const T={columnVirtualizer:F,enableHover:null==k?void 0:k.highlightOnHover,isStriped:null==k?void 0:k.striped,table:e,virtualColumns:j,virtualPaddingLeft:M,virtualPaddingRight:A};return Yc.jsxs(B,Object.assign({highlightOnHover:!0,horizontalSpacing:E,verticalSpacing:E},k,{sx:e=>Object.assign({display:"grid"===h?"grid":"table",tableLayout:"grid"!==h&&d?"fixed":void 0,"& tr:first-of-type td":{borderTop:"1px solid ".concat(e.colors.gray["dark"===e.colorScheme?8:3])},"& tr:last-of-type td":{borderBottom:"1px solid ".concat(e.colors.gray["dark"===e.colorScheme?8:3])}},(null==k?void 0:k.sx)instanceof Function?k.sx(e):null==k?void 0:k.sx),style:Object.assign(Object.assign({},R),null==k?void 0:k.style),children:[f&&Yc.jsx(Kp,Object.assign({},T)),"table-body"===v||S.isResizingColumn?Yc.jsx(tp,Object.assign({},T)):Yc.jsx(ep,Object.assign({},T)),g&&Yc.jsx(Qp,Object.assign({},T))]}))},Jp=({open:e,table:t})=>{var r;const{getState:o,options:{onEditingRowCancel:a,onCreatingRowCancel:i,renderEditRowModalContent:l,renderCreateRowModalContent:s,mantineCreateRowModalProps:c,mantineEditRowModalProps:u},setEditingRow:d,setCreatingRow:p}=t,{creatingRow:m,editingRow:g}=o(),f=null!=m?m:g,h=c instanceof Function?c({row:f,table:t}):c,b=u instanceof Function?u({row:f,table:t}):u,v=Object.assign(Object.assign({},b),m&&h),y=f.getAllCells().filter((e=>"data"===e.column.columnDef.columnDefType)).map((e=>Yc.jsx(Hd,{cell:e,table:t},e.id)));return n.createElement(V,Object.assign({opened:e,withCloseButton:!1},v,{onClose:()=>{var e;m?(null==i||i({row:f,table:t}),p(null)):(null==a||a({row:f,table:t}),d(null)),f._valuesCache={},null===(e=v.onClose)||void 0===e||e.call(v)},key:f.id}),null!==(r=m&&(null==s?void 0:s({row:f,table:t,internalEditComponents:y}))||(null==l?void 0:l({row:f,table:t,internalEditComponents:y})))&&void 0!==r?r:Yc.jsxs(Yc.Fragment,{children:[Yc.jsx("form",{onSubmit:e=>e.preventDefault(),children:Yc.jsx(D,{sx:{gap:"24px",paddingTop:"16px",width:"100%"},children:y})}),Yc.jsx(R,{sx:{paddingTop:"24px",justifyContent:"flex-end"},children:Yc.jsx(lp,{row:f,table:t,variant:"text"})})]}))},em="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,tm=({table:e})=>{const{getState:t,options:{createDisplayMode:r,editDisplayMode:o,enableStickyHeader:a,mantineLoadingOverlayProps:i,mantineTableContainerProps:l},refs:{tableContainerRef:s,bottomToolbarRef:c,topToolbarRef:d}}=e,{isFullScreen:p,isLoading:m,showLoadingOverlay:g,creatingRow:f,editingRow:h}=t(),[b,v]=n.useState(0),y=l instanceof Function?l({table:e}):l,w=i instanceof Function?i({table:e}):i;em((()=>{var e,t,n,r;const o="undefined"!=typeof document&&null!==(t=null===(e=d.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==t?t:0,a="undefined"!=typeof document&&null!==(r=null===(n=null==c?void 0:c.current)||void 0===n?void 0:n.offsetHeight)&&void 0!==r?r:0;v(o+a)}));const x="modal"===r&&f,S="modal"===o&&h;return Yc.jsxs(u,Object.assign({},y,{ref:e=>{e&&(s.current=e,(null==y?void 0:y.ref)&&(y.ref.current=e))},sx:e=>Object.assign({maxWidth:"100%",maxHeight:a?"clamp(350px, calc(100vh - ".concat(b,"px), 9999px)"):void 0,overflow:"auto",position:"relative"},(null==y?void 0:y.sx)instanceof Function?y.sx(e):null==y?void 0:y.sx),style:Object.assign({maxHeight:p?"calc(100vh - ".concat(b,"px)"):void 0},null==y?void 0:y.style),children:[Yc.jsx(O,Object.assign({visible:m||g},w)),Yc.jsx(Zp,{table:e}),(x||S)&&Yc.jsx(Jp,{open:!0,table:e})]}))},nm=({table:e})=>{const{getState:t,options:{enableBottomToolbar:n,enableTopToolbar:r,mantinePaperProps:o,renderBottomToolbar:a,renderTopToolbar:i},refs:{tablePaperRef:l}}=e,{isFullScreen:s}=t(),c=o instanceof Function?o({table:e}):o;return Yc.jsxs(k,Object.assign({shadow:"xs",withBorder:!0},c,{ref:e=>{l.current=e,(null==c?void 0:c.ref)&&(c.ref.current=e)},sx:e=>Object.assign({overflow:"hidden",transition:"all 100ms ease-in-out"},(null==c?void 0:c.sx)instanceof Function?null==c?void 0:c.sx(e):null==c?void 0:c.sx),style:Object.assign(Object.assign({},s?{bottom:0,height:"100vh",left:0,margin:0,maxHeight:"100vh",maxWidth:"100vw",padding:0,position:"fixed",right:0,top:0,width:"100vw",zIndex:100}:{}),null==c?void 0:c.style),children:[r&&(i instanceof Function?i({table:e}):null!=i?i:Yc.jsx(Lp,{table:e})),Yc.jsx(tm,{table:e}),n&&(a instanceof Function?a({table:e}):null!=a?a:Yc.jsx(Dp,{table:e}))]}))},rm=e=>{let t;return t=(e=>void 0!==e.table)(e)?e.table:dp(e),Yc.jsx(nm,{table:t})};function om(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function am(e){return(e=om(Math.abs(e)))?e[1]:NaN}var im,lm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sm(e){if(!(t=lm.exec(e)))throw new Error("invalid format: "+e);var t;return new cm({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 cm(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 um(e,t){var n=om(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}sm.prototype=cm.prototype,cm.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};const dm={"%":(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)=>um(100*e,t),r:um,s:function(e,t){var n=om(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(im=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+om(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function pm(e){return e}var mm,gm,fm,hm=Array.prototype.map,bm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vm(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?pm:(t=hm.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,l=t[0],s=0;o>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(e.substring(o-=l,o+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?pm:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(hm.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=sm(e)).fill,n=e.align,d=e.sign,p=e.symbol,m=e.zero,g=e.width,f=e.comma,h=e.precision,b=e.trim,v=e.type;"n"===v?(f=!0,v="g"):dm[v]||(void 0===h&&(h=12),b=!0,v="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var y="$"===p?o:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",w="$"===p?a:/[%p]/.test(v)?s:"",x=dm[v],S=/[defgprs%]/.test(v);function C(e){var o,a,s,p=y,C=w;if("c"===v)C=x(e)+C,e="";else{var E=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),h),b&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&"+"!==d&&(E=!1),p=(E?"("===d?d:c:"-"===d||"("===d?"":d)+p,C=("s"===v?bm[8+im/3]:"")+C+(E&&"("===d?")":""),S)for(o=-1,a=e.length;++o(s=e.charCodeAt(o))||s>57){C=(46===s?i+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}f&&!m&&(e=r(e,1/0));var k=p.length+e.length+C.length,_=k>1)+p+e+C+_.slice(k);break;default:e=_+p+e+C}return l(e)}return h=void 0===h?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=sm(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(am(t)/3))),o=Math.pow(10,-r),a=bm[8+r/3];return function(e){return n(o*e)+a}}}}!function(e){mm=vm(e),gm=mm.format,fm=mm.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const ym={"ar-SA":{separator:"",suffixes:["y","z","a","f","p","n","µ","m",""," ألف"," مليون"," بليون"," تريليون"," كوادريليون"," كوينتيليون"," سكستليون","سبتيليون"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["SAR ",""]},"en-GB":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","B","T","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["£",""]},"en-US":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","B","T","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["$",""]},"en-SA":{separator:"",suffixes:["y","z","a","f","p","n","µ","m",""," thousand"," million"," billion"," trillion"," quadrillion"," quintillion"," sextillion","septillion"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["$",""]},"es-CL":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","MM","B","T","Q","Z","Y"],grouping:[3],delimiters:{thousands:".",decimal:","},currency:["$",""]},"es-MX":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","MM","B","T","Q","Z","Y"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["$",""]},"es-ES":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","mm","b","t","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:".",decimal:","},currency:["€",""]},"et-EE":{separator:" ",suffixes:["y","z","a","f","p","n","µ","m","","tuhat","miljonit","miljardit","triljonit","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:" ",decimal:","},currency:["","eurot"]},"fr-FR":{suffixes:["y","z","a","f","p","n","µ","m","","k","m","b","t","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:" ",decimal:","},currency:["€",""]}};function wm(e){return(wm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var xm=function(e,t){return parseFloat(Math.round(e*Math.pow(10,t))/Math.pow(10,t)).toFixed(t)};function Sm(e,t){var n=Math.pow(10,3*Math.abs(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Cm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!isFinite(e))return"N/A";var r,o=(e*=1)<0,a=e.toString().split(".")[0].replace("-","").length,i="object"===wm(t)?t:ym[t]||ym["en-US"],l=i.suffixes.map(Sm),s=i.delimiters.decimal||".",c=i.separator||"",u=i.delimiters.thousands||",",d=vm({currency:i.currency||["$",""],decimal:s,grouping:i.grouping||[3],thousands:u});if(n)r=d.format(n)(e);else if(0===e)r="0";else if(a>=3){var p=function(e,t,n){var r=0,o=parseFloat(e.replace("−","-"),10);o&&(o<0&&(o*=-1),r=1+Math.floor(1e-12+Math.log(o)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3))));var a=n[8+r/3];return{number:xm(a.scale(o),t),symbol:a.symbol}}(d.format(".3r")(e),2,l),m=parseFloat(p.number).toString().replace(".",s),g=p.symbol;r="".concat(m).concat(c).concat(g)}else r=3===a?d.format(",f")(e):e<1&&e>-1?d.format(".2g")(e):d.format(".3g")(e);return"".concat(o&&"−"!==r.charAt(0)?"−":"").concat(r).replace(/−/g,"-").replace(/(\.[0]*[1-9]*)[0]*$/g,"$1").replace(/\.[0]*$/g,"")}const Em=function(e){return".3~a"===e?Cm:gm(e)};var km=Object.defineProperty,{useTranslation:_m,TranslationConsumer:Rm,TranslationProvider:Om}=Cn({defaultLocale:"en",defaultTranslation:{action_copy:"Copy",action_copy_done:"Copied",action_download:"Download",action_open:"Open",action_reload:"Reload",comparison:{EQ:"Equal to",GT:"Greater than",GTE:"Equal or greater than",LT:"Lower than",LTE:"Equal or lower than",NEQ:"Not equal to"},debug_view:{tab_label:"Debugger",httpheaders:"Response headers",jssource_prefix:"Javascript source for ",jssource_suffix:"",url_aggregate:"Aggregate API URL",url_logiclayer:"LogicLayer API URL"},direction:{ASC:"Ascending",DESC:"Descending"},formats:{csv:"CSV",json:"JSON",jsonarrays:"JSON Arrays",jsonrecords:"JSON Records",xls:"XLS"},loading:{title:"Loading...",message_heavyquery:"The current query might contain a maximum of {{rows}} rows.\nPlease wait...",message_default:"Please wait..."},params:{action_clear:"Clear query",action_clear_description:"Clear all parameters from your current query",action_execute:"Execute query",column_title:"Parameters",current_endpoint:"Current endpoint: {{label}}",dimmenu_abbrjoint:": ",dimmenu_dimension:"{{dimension}}",dimmenu_hierarchy:"{{abbr}}",dimmenu_level:"{{abbr}}",error_no_cut_selected_detail:"You can add data filters based on selected drilldowns.",error_no_cut_selected_title:"No cuts added",error_no_dimension_selected_detail:"You must add at least one drilldown.",error_no_dimension_selected_title:"No drilldowns selected",error_fetchmembers_detail:"An error ocurred while loading the member list.",error_fetchmembers_title:"Error loading member list",label_amount:"Amount",label_boolean_debug:"Debug response",label_boolean_distinct:"Apply DISTINCT to drilldowns",label_boolean_exclude_default_members:"Exclude default members",label_boolean_full_results:"Show all rows",label_boolean_nonempty:"Only return non-empty data",label_boolean_parents:"Include parent levels",label_boolean_sparse:"Optimize sparse results",label_cube:"Cube",label_cuts_filterby_id:"IDs",label_cuts_filterby_name:"Names",label_cuts_filterby_any:"Any",label_locale:"Data language",label_localeoption:"{{nativeName}}",label_measure:"Measure",label_pagination_limit:"Results limit",label_pagination_limit_description:"Max limit: {{limit}}",label_pagination_offset:"Results offset",label_sorting_key:"Sort by",label_sorting_order:"Order",label_source:"Source",label_subtopic:"Subtopic",label_table:"Table",label_timelevel:"Time level",label_topic:"Topic",search_placeholder:"Filter (regex enabled)",tag_cuts_plural:"{{abbr}} ({{n}} selected)",tag_cuts:"{{abbr}} ({{first_member}})",tag_drilldowns_abbrjoint:"/",tag_drilldowns:"{{abbr}}",title_area_cuts:"Cuts ({{n}})",title_area_drilldowns:"Drilldowns ({{n}})",title_area_filters:"Filters ({{n}})",title_area_measures:"Measures ({{n}})",title_area_options:"Query options",title_area_pagination:"Pagination",title_area_sorting:"Sorting",title_caption:"Caption",title_downloaddata:"Download dataset",title_members:"Members",title_properties:"Properties",tooltip_area_cuts:"",tooltip_area_drilldowns:"",tooltip_area_filters:"",tooltip_area_measures:"",tooltip_area_options:""},pivot_view:{tab_label:"Pivot Data",error_missingparams:"The current query doesn't have enough parameters. Two different drilldowns and a measure are needed.",error_onedimension:"The rows and columns in a pivotted table need 2 different drilldowns.",error_internal:"An internal error ocurred in the pivotting tool. We will fix it as soon as possible.",error_internal_detail:"If you need to contact us about this error, please include this message:\n{error}",label_ddcolumn:"Column drilldown",label_ddcolumnprop:"Column property",label_ddrow:"Row drilldown",label_ddrowprop:"Row property",label_formatter:"Numeral format",label_valmeasure:"Value measure",loading_details:"This might take a while, please wait...",loading_title:"Reestructuring data",title_download:"Download matrix",title_params:"Matrix params",warning:"Warning",warning_notsummeasure:'The current query contains more than 2 drilldowns, and the aggregation type of the measure is not "SUM". The values you\'re getting might not be meaningful.',warning_propertypivot:"Unlike Drilldown Members, Drilldown Properties are not guaranteed to be unique. In this view, data points are aggregated based on the property labels, so please ensure you're not missing information.",warning_sumdimensions:"There's more than 2 drilldowns in this query. Remaining values will be summed."},placeholders:{incomplete:"[Incomplete parameters]",unselected:"[Unselected]",none:"[None]"},preview_mode:{btn_get_all:"Show all rows",btn_get_preview:"Show preview",description_full:"You are currently viewing all available rows. Turn off for faster performance.",description_preview:"You are currently viewing a preview response of the first {{limit}} rows.",title_full:"All records",title_preview:"Preview records"},queries:{action_create:"New query",action_parse:"Query from URL",error_not_query:"Please construct a valid query",error_no_drilldowns:"You must add at least one drilldown.",error_no_measures:"You must add at least one measure.",error_one_hierarchy_per_dimension:"You must only select drilldowns of a single hierarchy.",error_one_cut_per_dimension:"You must only apply cuts over levels of a single hierarchy.",column_title:"Queries",unset_parameters:"No parameters set"},results:{error_execquery_title:"There was a problem with the last query",error_execquery_code401:"You don't have authorization to execute this query.\n{{response}}",error_execquery_default:"The backend server had an unexpected issue.\nPlease contact us if you require the data urgently.\n{{response}}\nCode {{status}}: {{statusText}}",error_disconnected_title:"You are not connected to the internet.",error_serveroffline_title:"There's a problem contacting with the server",error_serveroffline_detail:"Check the availability of the URL ",error_emptyresult_title:"Empty dataset",error_emptyresult_detail:"The query didn't return elements. Try again with different parameters.",count_rows:"{{n}} row",count_rows_plural:"{{n}} rows"},row_limit:{title:"Max row limit hit",description:"Your last query hits the defined row limit. You are currently viewing a truncated response of the first {{limit}} rows."},selectlevel_placeholder:"Level...",selectmeasure_placeholder:"Measure...",selecttimelevel_placeholder:"Time level...",table_view:{tab_label:"Data Table",numeral_format:"Numeral format",sort_asc:"Sort Asc",sort_desc:"Sort Desc",slicedresult:"Due to performance limitations on Firefox, we are limiting the results in this view to the first 10000 rows.\nThis limitation only affects this table; you can download the full dataset as normal."},transfer_input:{count_hidden:"{{n}} item hidden",count_hidden_plural:"{{n}} items hidden",search_placeholder:"Filter (regex enabled)",select_all:"Select all",unselect_all:"Unselect all",select_filtered:"Select filtered",unselect_filtered:"Unselect filtered",selected_items:"Selected items",unselected_items:"Unselected items"}}});function Im(e){const{sourceCall:t,url:o}=e.result,{translate:a}=_m(),{copy:i,copied:l}=s({timeout:1e3}),c=n.useCallback((()=>i(o)),[o]),d=n.useCallback((()=>window.open(o,"_blank")),[o]),p=r.createElement(u,{component:"span"},a("debug_view.jssource_prefix"),r.createElement(Z,{href:"https://www.npmjs.com/package/@datawheel/olap-client"},"olap-client"),a("debug_view.jssource_suffix")),m=n.useMemo((()=>{const t=Object.entries(e.result.headers||{});return 0===t.length?null:r.createElement(J.Wrapper,{label:a("debug_view.httpheaders")},r.createElement(u,{component:"dl",sx:{fontFamily:"monospace",overflowWrap:"break-word"}},t.map((e=>r.createElement(r.Fragment,{key:e[0]},r.createElement(v,{component:"dt",fw:"bold",fz:"sm"},e[0]),r.createElement(v,{component:"dd",c:"#5c940d",fz:"sm"},e[1]))))))}),[e.result.headers]);return r.createElement(u,{id:"query-results-debug-view"},r.createElement(D,{spacing:"md",px:"md",py:"sm"},o&&r.createElement(J.Wrapper,{label:a("debug_view.url_logiclayer")},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(J,{icon:r.createElement(hn,null),readOnly:!0,rightSectionWidth:"auto",value:o,w:"100%"}),r.createElement(U.Group,null,r.createElement(U,{leftIcon:r.createElement(Gt,null),onClick:d,variant:"default"},a("action_open")),r.createElement(U,{leftIcon:r.createElement(Nt,null),onClick:c,variant:"default"},a(l?"action_copy_done":"action_copy"))))),r.createElement(te,{cols:2},t&&r.createElement(J.Wrapper,{label:p},r.createElement(Ze,{language:"javascript",styles:{line:{boxSizing:"border-box"}}},t)),m)))}function Pm(){return Math.random().toString(16).slice(2)}function Fm(e,t="en"){return jm(e,"caption",t)||e.caption||e.uniqueName||e.name}function jm(e,t,n="xx"){const r=e.annotations;return r["".concat(t,"_").concat(n)]||r["".concat(t,"_").concat(n.slice(0,2))]||r[t]}function Mm(e,t){return e&&Number.isFinite(e)&&!Number.isNaN(e)?Number.parseFloat(e):t}function Am(e){return[].concat(e).filter((e=>null!=e))}function Tm(e,t){const n=[];for(let r=0;r[e.name,e]))),a=new Map(e.dimensions.map((e=>[e.name,new Map(e.hierarchies.map((e=>[e.name,new Map(e.levels.map((e=>[e.name,e])))])))]))),i=Tm(Object.values(t.drilldowns),(e=>{const t=a.get(e.dimension),n=null==t?void 0:t.get(e.hierarchy),r=null==n?void 0:n.get(e.level);if(!r)return null;const o=Tm(e.properties,(e=>e.active&&r.properties.find((t=>t.name===e.name))||null));return[r,...o]})).flat(1),l=Object.keys(n[0]);return Object.fromEntries(Tm(l,(e=>{const t=o.get(e)||(e=>{const t=e.replace(/^ID\s|\sID$/,"");return i.find((t=>t.uniqueName===e))||i.find((t=>t.name===e))||i.find((e=>e.uniqueName===t))||i.find((e=>e.name===t))})(e);if(!t)return null;const a=new Set(n.map((t=>typeof t[e]))),s=1===a.size?a.has("number")?"number":a.has("boolean")?"boolean":"string":a.has("number")?"number":"string",c=t._type,u="level"===c&&t.uniqueName||t.name,d="level"===c&&(e.endsWith(" ID")||!l.includes("".concat(u," ID")));return[e,{label:e,localeLabel:e.replace(u,Fm(t,r)),entity:t,entityType:c,isId:d,range:"number"===s?Vm(n,e):void 0,valueType:s}]})))}function Vm(e,t){const n=Math.ceil(e.length/3e4);let r=-1/0,o=1/0;for(let a=0;ae[t]));o=Math.min(o,...n),r=Math.max(r,...n)}return[o,r]}function Um(e){return"".concat(e)}function Gm(e){return"function"==typeof e?e:t=>t[e]}function Hm(e){return e.some((e=>e.indexOf(".")>-1))?e.map((e=>"[".concat(e,"]"))).join("."):e.join(".")}function qm(e,t,n={}){const r="function"==typeof t?t:e=>e[t];for(let o=0;o-1?e.replace(/^\[|\]$/g,"").split("].["):e.split(".");return 1===t.length&&t.unshift(t[0]),2===t.length&&t.unshift(t[0]),t}function Ym(e){const t=function(e){return[e.dimension,e.hierarchy,"level"in e?e.level:e.name]}(e);return t[0]===t[1]&&t.splice(0,1),t[0]===t[1]&&t.splice(0,1),Hm(t)}function Xm(e){return{created:e.created||(new Date).toISOString(),key:e.key||Pm(),label:e.label||"",isDirty:!0,panel:e.panel||null,params:Zm(e.params||{}),result:Qm(e.result||{})}}function Qm(e){return{data:e.data||[],types:e.types||{},headers:e.headers||{},sourceCall:e.sourceCall||"",status:e.status||0,url:e.url||""}}function Zm(e){return{booleans:e.booleans||{},cube:e.cube||"",cuts:e.cuts||{},drilldowns:e.drilldowns||{},filters:e.filters||{},isPreview:e.isPreview||!1,locale:e.locale||"",measures:e.measures||{},pagiLimit:e.pagiLimit||e.limitAmount||e.limit||0,pagiOffset:e.pagiOffset||e.limitOffset||e.offset||0,sortDir:e.sortDir||e.sortDirection||e.sortOrder||e.order||"desc",sortKey:e.sortKey||e.sortProperty||""}}function Jm(e){"function"==typeof e.toJSON&&(e=e.toJSON());const t="".concat(e.dimension),n="".concat(e.hierarchy),r="".concat(e.level||e.name);return{active:"boolean"==typeof e.active&&e.active,dimension:t,fullName:e.fullName||Hm([t,n,r]),hierarchy:n,key:e.key||Pm(),level:r,members:Array.isArray(e.members)?e.members:[],uniqueName:e.uniqueName||r}}function eg(e){const t="object"==typeof e.dimension?e.dimension.dimensionType:e.dimType;"function"==typeof e.toJSON&&(e=e.toJSON());const n="".concat(e.dimension),r="".concat(e.hierarchy),o="".concat(e.level||e.name);return{active:"boolean"!=typeof e.active||e.active,captionProperty:e.captionProperty||"",dimension:n,dimType:t,fullName:e.fullName||Hm([n,r,o]),hierarchy:r,key:e.key||Pm(),level:o,memberCount:0,properties:Am(e.properties).map(og),uniqueName:e.uniqueName||e.name||e.level}}function tg(e){return{key:e.key||Pm(),active:"boolean"!=typeof e.active||e.active,measure:Nl.isMeasure(e.measure)?e.measure.name:e.measure||"".concat(e.name),conditionOne:e.conditionOne||[e.const1?"".concat(e.const1[0]):"".concat(Pl.GT),e.const1?e.const1[1].toString():e.inputtedValue||"0",e.const1?e.const1[1]:Mm(e.interpretedValue,0)],conditionTwo:e.conditionTwo||[e.const2?"".concat(e.const2[0]):"".concat(Pl.GT),e.const2?e.const2[1].toString():e.inputtedValue||"0",e.const2?e.const2[1]:Mm(e.interpretedValue,0)],joint:"or"===e.joint?"or":"and"}}function ng(e){return{active:"boolean"==typeof e.active&&e.active,key:e.key||e.name||e.fullName||e.uri||"".concat(e),name:e.name||e.key||"".concat(e)}}function rg(e){return{active:"boolean"==typeof e.active&&e.active,key:e.uri||e.fullName||e.key,name:e.name||e.key||"".concat(e)}}function og(e){return{active:"boolean"==typeof e.active&&e.active,key:e.uri||e.fullName||e.key||Pm(),level:e.level,name:e.name||e.property,uniqueName:e.uniqueName||e.name}}function ag(e,t,n=Object.keys({...e,...t})){return n.every((n=>"function"==typeof e[n]||e[n]==t[n]))}var ig=[{error:"queries.error_not_query",condition:function(e){return"object"==typeof e&&null!==e&&"string"==typeof e.cube&&e.cube.length>0&&"object"==typeof e.drilldowns&&null!==e.drilldowns&&"object"==typeof e.measures&&null!==e.measures}},{error:"queries.error_no_measures",condition:e=>Object.values(e.measures).reduce(ug,0)>0},{error:"queries.error_no_drilldowns",condition:e=>Object.values(e.drilldowns).reduce(ug,0)>0},{error:"queries.error_one_hierarchy_per_dimension",condition:e=>{const t=new Map;return Object.values(e.drilldowns).every((e=>{if(cg(e)){const n=t.get(e.dimension);return t.set(e.dimension,e.hierarchy),!n||n===e.hierarchy}return!0}))}},{error:"queries.error_one_cut_per_dimension",condition:e=>{const t=Tm(Object.values(e.cuts),(e=>cg(e)?Ym(e):null)),n=new Set(t);return t.length===n.size}}];function lg(e){return ig.every((t=>t.condition(e)))}function sg(e){return cg(e)&&e.members.length>0}function cg(e){return e.active}function ug(e,t){return e+(cg(t)?1:0)}var dg="explorerServer",pg=co({name:dg,initialState:{cubeMap:{},endpoint:"aggregate",localeOptions:["en"],online:void 0,software:"",url:"",version:""},reducers:{updateServer:(e,t)=>({...e,...t.payload}),updateEndpoint(e,t){e.endpoint=t.payload||("aggregate"===e.endpoint?"logiclayer":"aggregate")},updateLocaleList(e,t){e.localeOptions=t.payload}}}),mg={...pg.actions};function gg(e){return e[dg]}var fg=Dr(gg,(e=>e.software)),hg=Dr(gg,(e=>e.endpoint)),bg=Dr(fg,(e=>e===Es.softwareName?[jl.csv,jl.json,jl.jsonrecords,jl.xls]:(zs.softwareName,[jl.csv,jl.jsonarrays,jl.jsonrecords]))),vg=Dr(fg,(e=>e===Es.softwareName?["debug","distinct","nonempty","parents","sparse"]:e===Zs.softwareName?["debug","exclude_default_members","parents","sparse"]:["debug","parents"])),yg=Dr(gg,(e=>e.cubeMap));Dr(yg,Nm);var wg=Dr(yg,Lm),xg="explorerQueries",Sg={current:"default",itemMap:{default:Xm({key:"default"})}},Cg=co({name:xg,initialState:Sg,reducers:{resetQueries(e,{payload:t={}}){Dm(t,e.current)||(e.current=Object.keys(t)[0]),e.itemMap=t},removeQuery(e,t){Object.keys(e.itemMap).length<2||(delete e.itemMap[t.payload],Dm(e.itemMap,e.current)||(e.current=Object.keys(e.itemMap)[0]))},selectQuery(e,t){e.current=t.payload},updateQuery(e,{payload:t}){e.itemMap[t.key]=t},switchPanel(e,t){e.itemMap[e.current].panel=t.payload},removeCut(e,t){delete kg(e).params.cuts[t.payload]},removeDrilldown(e,t){delete kg(e).params.drilldowns[t.payload]},removeFilter(e,t){delete kg(e).params.filters[t.payload]},resetAllParams(e,t){kg(e).params=Zm(t.payload)},resetCuts(e,t){kg(e).params.cuts=t.payload},resetDrilldowns(e,t){kg(e).params.drilldowns=t.payload},resetFilters(e,t){kg(e).params.filters=t.payload},resetMeasures(e,t){kg(e).params.measures=t.payload},updateIsPreview(e,{payload:t}){kg(e).params.isPreview=t||!1},updateBoolean(e,{payload:t}){const n=kg(e);n.params.booleans[t.key]="boolean"==typeof t.value?t.value:!n.params.booleans[t.key]},updateCube(e,{payload:t}){const n=kg(e);if(t.cube!==n.params.cube){const{params:e,result:r}=Xm({params:{cube:t.cube,measures:t.measures,locale:n.params.locale}});n.params=e,n.result=r}t.measures.length!==n.params.measures.length&&(n.params.cube=t.cube,n.params.measures=t.measures)},updateCut(e,{payload:t}){kg(e).params.cuts[t.key]=t},updateDrilldown(e,{payload:t}){kg(e).params.drilldowns[t.key]=t},updateFilter(e,{payload:t}){kg(e).params.filters[t.key]=t},updateLocale(e,{payload:t}){const n=e.itemMap[e.current];t!==n.params.locale&&(n.isDirty=!0,n.params.locale=t)},updateMeasure(e,{payload:t}){kg(e).params.measures[t.key]=t},updatePagination(e,{payload:t}){const n=kg(e);n.params.pagiLimit=t.limit,n.params.pagiOffset=t.offset},updateSorting(e,{payload:t}){const n=kg(e);n.params.sortDir=t.dir,n.params.sortKey=t.key},updateResult(e,{payload:t}){const n=e.itemMap[e.current];n.isDirty=t.status<200||t.status>299,n.result=t}}}),Eg={...Cg.actions};function kg(e){const t=e.itemMap[e.current];return t.isDirty=!0,t}function _g(e){return e[xg]}var Rg=Dr(_g,(e=>function(e,t,n=!0){if(!Array.isArray(e)||e.length<2)return e;const r=n?(e,n)=>Date.parse(n[t])-Date.parse(e[t]):(e,n)=>Date.parse(e[t])-Date.parse(n[t]);return e.slice().sort(r)}(Object.values(e.itemMap),"created",!1))),Og=Dr(_g,(e=>e.itemMap[e.current])),Ig=Dr(Og,(e=>e.params)),Pg=Dr(Ig,(e=>e.cube)),Fg=Dr([Ig,gg],((e,t)=>{const n=e.locale||t.localeOptions[0]||"";return{code:n,name:sa.getName(n),nativeName:sa.getNativeName(n)}})),jg=Dr(Ig,(e=>e.cuts));Dr(jg,Nm);var Mg=Dr(jg,Lm),Ag=Dr(Ig,(e=>e.drilldowns));Dr(Ag,Nm);var Tg=Dr(Ag,Lm),Ng=Dr(Ig,(e=>e.filters));Dr(Ng,Nm),Dr(Ng,Lm);var Lg=Dr(Ig,(e=>e.measures));Dr(Lg,Nm);var Dg=Dr(Lg,Lm),zg=Dr(Ig,(e=>e.booleans)),Bg=Dr(Ig,(e=>e.isPreview)),Vg=Dr(Ig,(e=>({limit:e.pagiLimit||0,offset:e.pagiOffset||0}))),Ug=Dr(Ig,(e=>({sortKey:e.sortKey||"",sortDir:e.sortDir}))),Gg=Dr(Ig,(e=>function(e){let t;return{isValid:ig.every((n=>{const r=n.condition(e);return r||(t=n.error),r})),error:t}}(e))),Hg="FETCHING",qg="SUCCESS",$g="FAILURE",Wg="explorerLoading",Kg=co({name:Wg,initialState:{error:null,loading:!0,status:Hg,trigger:null},reducers:{setLoadingMessage(e,t){e.message=t.payload}},extraReducers(e){e.addMatcher(Qg,((e,t)=>{e.error=null,e.loading=!0,e.status=Hg,e.trigger=t.type})).addMatcher(Jg,((e,t)=>{e.error=null,e.loading=!1,e.status=qg,e.trigger=t.type})).addMatcher(Zg,((e,t)=>{e.error=t.payload,e.loading=!1,e.status=$g,e.trigger=t.type}))}}),Yg={...Kg.actions,setLoadingState:(e,t)=>({type:"".concat(Wg,"/setLoadingState:").concat(e),payload:t})};function Xg(e){return e[Wg]}function Qg(e){return e.type.endsWith(":".concat(Hg))}function Zg(e){return e.type.endsWith(":".concat($g))}function Jg(e){return e.type.endsWith(":".concat(qg))}var ef={[Kg.name]:Kg.reducer,[Cg.name]:Cg.reducer,[pg.name]:pg.reducer};Pr(ef);var tf=()=>lo({reducer:ef,middleware:e=>e({thunk:{extraArgument:{olapClient:new rc,previewLimit:50,rowLimit:0}}})}),nf=ia,rf={DEBUG:1,DISTINCT:2,NONEMPTY:4,PARENTS:8,SPARSE:16,EXCLUDE_DEFAULT_MEMBERS:32};function of(e,t){const n=function(e){const t=Tm(Object.values(e.cuts),(e=>sg(e)?i(e):null)),n=Tm(Object.values(e.drilldowns),(e=>cg(e)?l(e):null)),r=Tm(Object.values(e.filters),(e=>cg(e)?s(e):null)),o=Tm(Object.values(e.measures),(e=>cg(e)?c(e):null)),a=Object.keys(e.booleans).reduce(((t,n)=>t+(e.booleans[n]&&rf[n.toUpperCase()]||0)),0);return{cube:e.cube,drilldowns:n,measures:o,booleans:a>0?a:void 0,cuts:t.length>0?t:void 0,filters:r.length>0?r:void 0,locale:e.locale?e.locale:void 0,panel:void 0,preview:e.isPreview?1:void 0};function i(e){return[Ym(e)].concat(e.members).join(",")}function l(e){return[Ym(e)].concat(Tm(e.properties,(e=>cg(e)?e.name:null))).join(",")}function s(e){const t=Tm([e.conditionOne,e.conditionTwo],(e=>e?"".concat(e[0],",").concat(e[2]):null));return"".concat(e.measure,",").concat(t.join(",".concat(e.joint,",")))}function c(e){return"".concat(e.key)}}(e);return n.panel=t||void 0,ca(n,{ignorenull:!0,skipIndex:!1,sorted:!0})}var af=n.createContext(void 0),{Consumer:lf,Provider:sf}=af;function cf(e){!function(e,t){const r=nf(yg),{isDirty:o,panel:a,params:i}=nf(Og),l=n.useCallback((e=>{e.state&&t.onChange(e.state)}),[t.onChange]);n.useEffect((()=>{if(e)return window.addEventListener("popstate",l),()=>window.removeEventListener("popstate",l)}),[e]),n.useEffect((()=>{if(!e||o||null==r[i.cube])return;const t=window.location.search.slice(1),n=of(i,a);if(t!==n){const e="".concat(window.location.pathname,"?").concat(n),t=new URLSearchParams(window.location.search).get("panel");t&&t[1]!==a?window.history.replaceState(i,"",e):window.history.pushState(i,"",e)}}),[r,o,a])}(e.withPermalink,{onChange:e.actions.resetAllParams});const t=n.useMemo((()=>({actions:e.actions,defaultMembersFilter:e.defaultMembersFilter||"id",formatters:e.formatters||{},previewLimit:e.previewLimit||50,rowLimit:e.rowLimit||0})),[e.formatters,e.previewLimit]);return r.createElement(sf,{value:t},e.children)}function uf(){const e=n.useContext(af);if(void 0===e)throw new Error("useSettings must be used within a SettingsProvider.");return e}function df(){return uf().actions}var pf={};function mf(e,t,n){return Object.entries(t.booleans).forEach((t=>{null!=t[1]&&e.setOption(t[0],t[1])})),Object.values(t.cuts).forEach((t=>{sg(t)&&e.addCut(t,t.members)})),Object.values(t.drilldowns).forEach((t=>{cg(t)&&(e.addDrilldown(t),t.captionProperty&&e.addCaption({...t,property:t.captionProperty}),t.properties.forEach((n=>{cg(n)&&e.addProperty({...t,property:n.name})})))})),Object.values(t.measures).forEach((t=>{cg(t)&&e.addMeasure(t.name)})),t.locale&&e.setLocale(t.locale),t.sortKey&&t.sortDir&&e.setSorting(t.sortKey,"desc"===t.sortDir),t.isPreview?e.setPagination(n.previewLimit,0):e.setPagination(t.pagiLimit||n.rowLimit||0,t.pagiOffset),e}function gf(e){const t=e.cube,n=e.getParam("options"),r=e.getParam("drilldowns").map(eg),o=e.getParam("filters").map(tg),a=e.getParam("measures").map(ng),i=e.getParam("cuts"),l=Object.keys(i).map((e=>Jm({...t.getLevel(e).toJSON(),active:!0,members:i[e],membersLoaded:!1}))),s=e.getParam("pagination"),c=e.getParam("sorting"),u=e=>e.key;return{booleans:{debug:Boolean(n.debug),distinct:Boolean(n.distinct),exclude_default_members:Boolean(n.exclude_default_members),nonempty:Boolean(n.nonempty),parents:Boolean(n.parents),sparse:Boolean(n.sparse)},cube:t.name,cuts:qm(l,u),drilldowns:qm(r,u),filters:qm(o,u),locale:e.getParam("locale"),measures:qm(a,u),pagiLimit:s.limit,pagiOffset:s.offset,isPreview:!0,sortDir:"asc"===c.direction?"asc":"desc",sortKey:Nl.isMeasure(c.property)?c.property.name:"".concat(c.property||"")}}function ff(e,t){const n=e.cube.datasource;n.axiosInstance.defaults.responseType=void 0;const r={undefined:1};Object.values(t.drilldowns).forEach((e=>{r[e.uniqueName]=e.memberCount}));const o=e.getParam("drilldowns").map((e=>Xl.isLevel(e)?r[e.uniqueName]||n.fetchMembers(e).then((e=>e.length)):Promise.resolve(1)));return Promise.all(o).then((e=>e.reduce(((e,t)=>e*t))))}function hf(e){return(t,n,{olapClient:r,previewLimit:o,rowLimit:a})=>{const i=n(),l=Ig(i),s=hg(i);if(!lg(l))return Promise.reject(new Error("The current query is not valid."));const c=r.datasource.axiosInstance;return r.getCube(l.cube).then((n=>{const i="".concat(n.name,"_").concat((new Date).toISOString()),u=mf(n.query,l,{previewLimit:o,rowLimit:a}).setFormat(e),d=u.toString(s).replace(r.datasource.serverUrl,"");return Promise.all([c({url:d,responseType:"blob"}).then((e=>e.data)),ff(u,l).then((e=>{e>5e4&&t(Yg.setLoadingMessage({type:"HEAVY_QUERY",rows:e}))}))]).then((t=>({content:t[0],extension:e.replace(/json\w+/,"json"),name:i})))}))}}function bf(){return(e,t,{olapClient:n,previewLimit:r,rowLimit:o})=>{const a=t(),i=Ig(a),l=hg(a);return lg(i)?n.getCube(i.cube).then((t=>{const a=mf(t.query,i,{previewLimit:r,rowLimit:o});return Promise.all([n.execQuery(a,l),ff(a,i).then((t=>{t>5e4&&e(Yg.setLoadingMessage({type:"HEAVY_QUERY",rows:t}))}))]).then((n=>{const[r]=n;e(Eg.updateResult({data:r.data,types:Bm(t.toJSON(),i,r.data),headers:{...r.headers},sourceCall:a.toSource(),status:r.status||500,url:a.toString(l)}))}),(t=>{var n,r,o,i;throw e(Eg.updateResult({data:[],types:{},error:{status:(null==(n=t.response)?void 0:n.status)||500,statusText:(null==(r=t.response)?void 0:r.statusText)||"Unknown error",response:((e={})=>"".concat(e.message||e.detail||e))(null==(o=t.response)?void 0:o.data)},status:(null==(i=t.response)?void 0:i.status)||500,url:a.toString(l)})),t}))})):Promise.resolve()}}function vf(e){return(t,n,{olapClient:r})=>{const o=n(),a=Pg(o),i=Fg(o);return r.getCube(a).then((t=>{const n=t.getLevel(e);return t.datasource.fetchMembers(n,{locale:i.code})})).catch((()=>{const t=JSON.stringify(e);return console.error("Couldn't find level from reference: ".concat(t)),[]}))}}function yf(e){return(t,n,{olapClient:r})=>{const o=n(),a=yg(o),i=Rg(o).map((t=>{const{params:n}=t,{cube:i,measures:l}=n,s=i&&a[i]?i:e&&a[e]?e:Object.keys(a)[0];return r.getCube(s).then((e=>{const r=e.measures.map((e=>ng(l[e.name]||{active:!1,key:e.name,name:e.name}))),a=Tm(Object.values(n.drilldowns),(t=>function(e,t){const n=Tm(t.properties,(e=>cg(e)?e.name:null));for(const r of e.levelIterator)if(r.matches(t))return eg({...t,fullName:r.fullName,uniqueName:r.uniqueName,dimType:r.dimension.dimensionType,properties:r.properties.map((e=>og({active:n.includes(e.name),level:r.uniqueName,name:e.name,uniqueName:e.uniqueName})))});return t}(e,t)||null));return{...t,params:{...n,locale:n.locale||o.explorerServer.localeOptions[0],cube:s,drilldowns:qm(a,(e=>e.key)),measures:qm(r,(e=>e.key))}}}))}));return Promise.all(i).then((e=>{const n=qm(e,(e=>e.key));t(Eg.resetQueries(n))}))}}function wf(e){return(t,n,{olapClient:r})=>r.parseQueryURL(e.toString(),{anyServer:!0}).then((e=>Xm({params:gf(e)})))}function xf(){return(e,t,{olapClient:n})=>n.getCubes().then((t=>{const n=qm(Tm(t,(e=>"true"===e.annotations.hide_in_ui?null:e.toJSON())),(e=>e.name));return e(mg.updateServer({cubeMap:n})),n}))}function Sf(){return(e,t)=>{const n=t();return lg(Ig(n))?(e(Yg.setLoadingState("FETCHING")),e(bf()).then((()=>{e(Yg.setLoadingState("SUCCESS"))}),(t=>{e(Yg.setLoadingState("FAILURE",t.message))}))):Promise.resolve()}}function Cf(e){return(t,n,{olapClient:r})=>{const o=n(),a=Tm(Dg(o),(e=>e.active?e.name:null));return r.getCube(e).then((e=>{const n=Tm(e.measures,(e=>ng({active:a.includes(e.name),key:e.name,name:e.name})));t(Eg.updateCube({cube:e.name,measures:qm(n,(e=>e.key))}))}))}}function Ef(e){return(t,n,{olapClient:r})=>rc.dataSourceFromURL(e).then((e=>(r.setDataSource(e),r.checkStatus()))).then((e=>{let n="aggregate";e.software===Zs.softwareName?n="logiclayer":e.software===zs.softwareName&&(n=""),t(mg.updateServer({online:e.online,software:e.software,url:e.url,version:e.version,endpoint:n}))}),(e=>{throw t(mg.updateServer({online:!1,software:"",url:e.config.url,version:""})),e}))}((e,t)=>{for(var n in t)km(e,n,{get:t[n],enumerable:!0})})(pf,{willDownloadQuery:()=>hf,willExecuteQuery:()=>bf,willFetchMembers:()=>vf,willHydrateParams:()=>yf,willParseQueryUrl:()=>wf,willReloadCubes:()=>xf,willRequestQuery:()=>Sf,willSetCube:()=>Cf,willSetupClient:()=>Ef});var kf={...mg,...Yg,...Eg,...pf};function _f(e){if("object"==typeof window){const t=window.location.search;if(t){const n=Sl(t);if("query"in n){const t=function(e){const t=(e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/");return window.atob(t)}(n.query),r=new URL(t);return e.willParseQueryUrl(r)}const r=function(e){const t=e=>e.key,n=Object.create(null),r=Object.create(null);return{booleans:function(e){const t=Object.create(null);return Object.keys(rf).forEach((n=>{(e&rf[n])>0&&(t[n.toLowerCase()]=!0)})),t}(e.booleans||0),cube:e.cube,cuts:Am(e.cuts).reduce((function(e,t){const[n,...r]=t.split(","),o=Jm({...$m(n),active:!0,members:r}),a=Object.values(e).find((e=>e.dimension===o.dimension&&e.hierarchy===o.hierarchy&&e.level===o.level));if(a){const e=new Set([...a.members,...o.members]);o.members=[...e].sort()}return e[o.key]=o,e}),n),drilldowns:Am(e.drilldowns).reduce((function(e,t){const[n,...r]=t.split(","),o=$m(n),a=r.map((e=>({active:!0,level:o.level,name:e}))),i=eg({...o,active:!0,properties:a,key:n});return e[i.key]=i,e}),r),filters:qm(Am(e.filters).map((function(e){const[t,...n]=e.split(","),r=n.slice(1,3),o=n.length>2?n.slice(4,6):void 0,a=n.length>2?n[3]:void 0;return tg({active:!0,measure:t,conditionOne:i(r),conditionTwo:o?i(o):void 0,joint:a});function i(e){return[e[0],e[1],Number.parseFloat(e[1])]}})),t),isPreview:1===e.preview,locale:e.locale,measures:qm(Am(e.measures).map((function(e){return ng({active:!0,key:e,name:e})})),t),pagiLimit:0,pagiOffset:0,sortDir:"desc",sortKey:void 0}}(n);if(lg(r))return Xm({panel:n.panel,params:Zm({...r})})}const n=window.history.state;if(lg(n))return Xm({params:{...n}})}}var Rf=Q({"from, to":{fill:"var(--anicube-color1, #5c7080)"},"33%":{fill:"var(--anicube-color2, #738694)"},"66%":{fill:"var(--anicube-color3, #8a9ba8)"}}),Of=o(((e,{color:t,shade:n})=>({root:{...t?{"--anicube-color1":e.colors[t][n-1],"--anicube-color2":e.colors[t][n],"--anicube-color3":e.colors[t][n+1]}:void 0,display:"block"},side:{animation:"".concat(Rf," var(--anicube-duration, 2.4s) infinite"),animationPlayState:"var(--anicube-play-state, running)","@media (prefers-reduced-motion)":{"--anicube-play-state":"paused"},"&.a":{fill:"var(--anicube-color1, #5c7080)"},"&.b":{fill:"var(--anicube-color2, #738694)",animationDelay:"0.8s"},"&.c":{fill:"var(--anicube-color3, #8a9ba8)",animationDelay:"1.6s"}}}))),If={shade:5};function Pf(e){const{color:t,shade:n}=i(Pf.displayName,If,e),{classes:o,cx:a}=Of({color:t,shade:n});return r.createElement("svg",{className:a("dataex-Anicube-root",o.root),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",height:e.size||256},r.createElement("path",{className:a("dataex-Anicube-side",o.side,"a"),d:"M128 128v128l111 -64v-128l-111 64z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"b"),d:"M128 128l111 -64l-111 -64l-111 64l111 64z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"c"),d:"M128 128l-111 -64v128l111 64v-128z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"a"),d:"M128 128v-64l-55 32v64l55 -32z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"b"),d:"M128 128l-55 32l55 32l55 -32l-55 -32z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"c"),d:"M128 128l55 32v-64l-55 -32v64z"}))}Pf.displayName="DataExplorer/Anicube";var Ff=Dr([yg,Pg],((e,t)=>t in e?e[t]:void 0)),jf=Dr(Ff,(e=>e?e.measures:[])),Mf=Dr(jf,(e=>Object.fromEntries(e.map((e=>[e.name,e]))))),Af=Dr(Ff,(e=>e?e.dimensions.map((e=>({item:{...e,hierarchies:e.hierarchies.slice().map((e=>(e.levels.slice().sort(((e,t)=>zm(e)-zm(t))),e))).sort(((e,t)=>zm(e)-zm(t)))},count:e.hierarchies.reduce(((e,t)=>e+t.levels.length),0),alpha:e.hierarchies.reduce(((e,t)=>e.concat(t.name,"-")),"")}))).sort(((e,t)=>zm(e.item)-zm(t.item)||t.count-e.count||e.alpha.localeCompare(t.alpha))).map((e=>e.item)):[])),Tf=Dr(Af,(e=>Object.fromEntries(e.map((e=>[e.name,e]))))),Nf=Dr(Ff,(e=>e?Object.fromEntries(e.dimensions.flatMap((e=>e.hierarchies.flatMap((t=>t.levels.map((n=>function(e,t){return[e,t]}([e.name,t.name,n.name].join("."),[e,t,n])))))))):{}));Dr(Af,(e=>e.find((e=>"time"===e.dimensionType||"Year"===e.name||"Date"===e.name))));var Lf=Dr(Ig,of);function Df(e,t="/"){if(!e)return"";"string"==typeof e&&(e=Km(e));const n=[];let r=e.length;for(;r--;){const t=e[r];-1===n.indexOf(t)&&n.unshift(t)}return n.join(t)}var zf=e=>{const t=ia(Af)||[],o=ia(Fg),a=n.useMemo((()=>t.map((t=>r.createElement(Bf,{dimension:t,locale:o.code,isMediumScreen:e.isMediumScreen,key:t.uri,onItemSelect:e.onItemSelect,selectedItems:e.selectedItems})))),[t,e.selectedItems,e.onItemSelect]);return r.createElement(M,null,a)},Bf=e=>{const{dimension:t,locale:o}=e,{translate:a}=_m(),i=n.useMemo((()=>a("params.dimmenu_dimension",{dimension:Fm(t,o)})),[o,t]),l=1!==t.hierarchies.length,s=t.hierarchies.map((n=>r.createElement(Vf,{dimension:t,hierarchy:n,isMediumScreen:e.isMediumScreen,isSubMenu:l,key:n.uri,locale:o,onItemSelect:e.onItemSelect,selectedItems:e.selectedItems})));return l?r.createElement(M,{key:t.uri,position:e.isMediumScreen?"bottom":"right",shadow:"md",withArrow:!0},r.createElement(M.Target,null,r.createElement(S,{component:"div"},r.createElement(M.Item,{icon:r.createElement(un,null),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:200}})},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(v,null,i),r.createElement(Rt,{stroke:1.5,size:16}))))),r.createElement(M.Dropdown,null,r.createElement(M,null,s))):s[0]},Vf=e=>{const{dimension:t,hierarchy:o,locale:a,onItemSelect:i,selectedItems:l}=e,{translate:s}=_m(),c=n.useMemo((()=>{const n=[Fm(t,a),Fm(o,a)];return e.isSubMenu?n[1]:s("params.dimmenu_hierarchy",{abbr:Df(n,s("params.dimmenu_abbrjoint")),dimension:n[0],hierarchy:n[1]})}),[a,t,o,e.isSubMenu]),u=1!==o.levels.length,d=o.levels.map((e=>r.createElement(Uf,{dimension:t,hierarchy:o,isSubMenu:u,key:e.uri,level:e,locale:a,onItemSelect:i,selectedItems:l})));return u?r.createElement(M,{key:o.uri,position:e.isMediumScreen?"bottom":"right",shadow:"md",withArrow:!0},r.createElement(M.Target,null,r.createElement(S,{component:"div"},r.createElement(M.Item,{icon:r.createElement(cn,null),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:200}})},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(v,null,c),r.createElement(Rt,{stroke:1.5,size:16}))))),r.createElement(M.Dropdown,null,r.createElement(M,null,d))):d[0]},Uf=e=>{const{dimension:t,hierarchy:o,level:a,locale:i}=e,{translate:l}=_m(),s=n.useMemo((()=>{const n=[Fm(t,i),Fm(o,i),Fm(a,i)];return e.isSubMenu?n[2]:l("params.dimmenu_level",{abbr:Df(n,l("params.dimmenu_abbrjoint")),dimension:n[0],hierarchy:n[1],level:n[2]})}),[i,t,o,a,e.isSubMenu]);return r.createElement(M.Item,{disabled:e.selectedItems.includes(Ym(a)),icon:r.createElement(dn,null),key:a.uri,miw:200,onClick:()=>e.onItemSelect(a,o,t),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:200}})},s)},Gf=e=>{const{selectedItems:t,onItemSelect:n,children:o,...a}=e,i=l(),s=_("(max-width: ".concat(i.breakpoints.md,"px)"));return r.createElement(M,{closeOnClickOutside:!0,closeOnEscape:!0,position:s?"left":"right",shadow:"md",withArrow:!0,withinPortal:!0},r.createElement(M.Target,null,r.createElement(p,{...a},o)),r.createElement(M.Dropdown,null,r.createElement(zf,{isMediumScreen:s,selectedItems:t.map(Ym),onItemSelect:n})))},Hf=e=>{const t=e.tooltip?r.createElement(d,{events:{hover:!0,focus:!1,touch:!0},label:e.tooltip,multiline:!0,withinPortal:!0},r.createElement(p,{color:"blue"},r.createElement(Xt,null))):null,n=e.warning?r.createElement(p,{color:"orange"},r.createElement(gt,null)):e.toolbar;return r.createElement(de.Item,{id:"layout-param-area-".concat(e.id),value:e.value},r.createElement(ee,{noWrap:!0,spacing:"xs",pr:n?"xs":void 0},r.createElement(de.Control,{px:"xs"},r.createElement(v,null,e.title),t),n),r.createElement(de.Panel,null,r.createElement(c,{styles:{viewport:{maxHeight:390}}},e.children)))};function qf(e){const{activeItems:t,getLabel:o,items:a,itemPredicate:i,onChange:l}=e,s=e.getSecondLabel||(()=>{}),d=n.useRef(null),p=n.useRef(null),{translate:m}=_m(),[g,f]=n.useState(""),[h,b]=n.useState(e.initialItemPredicateIndex||0),y=n.useMemo((()=>qm(t,(e=>e))),[t]),w=n.useMemo((()=>{const e=[],t=[],n=/^[\s0-9A-Za-z,]+$/.test(g)?Wm(g.replace(/,/g,"|"),"i"):Wm(g,"i"),r=(Array.isArray(i)?i[h].method:i)||((e,t)=>e.test(t.key));let o=0;const l=Object.keys(a);for(;o{const n=t.indexOf(e.key),r=t.slice();n>-1?r.splice(n,1):(r.push(e.key),r.sort()),l(r)}),[t,l]),C=n.useCallback((()=>{l([...Object.keys(y),...((null==w?void 0:w.unselected)||[]).map((e=>e.key))])}),[w,y]),E=n.useCallback((()=>{if(!(null==w?void 0:w.selectedCount))return void l([]);const e=new Set(((null==w?void 0:w.selected)||[]).map((e=>String(e.key)))),t=Object.keys(y).filter((t=>!e.has(t)));l(t)}),[w,y]),k=t.length-w.selectedCount,_=w.totalCount-t.length-w.unselectedCount,R=n.useMemo((()=>{const e=g.length>0?r.createElement(re,{mr:"xs",onClick:()=>f("")}):void 0;if(Array.isArray(i)){const t=i[h],n=()=>{const e=h+1;b(e>=i.length?0:e)};return r.createElement(ee,{mr:"xs",noWrap:!0,spacing:"xs"},r.createElement(N,{leftSection:r.createElement(ue,{color:"blue",radius:"xl",size:"xs"},r.createElement(an,{size:15})),onClick:n},t.label),e)}return e}),[g.length>0,h]),O=e=>r.createElement(S,{key:e.key,onClick:x.bind(null,e),w:"100%"},r.createElement(ee,{noWrap:!0,position:"apart",spacing:"xs"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(F,{defaultChecked:Dm(y,e.key)}),r.createElement(v,{fz:"sm",lineClamp:1,sx:{wordBreak:"break-all"}},o(e))),r.createElement(v,{c:"gray",fz:"xs"},s(e))));return r.createElement(u,{w:500,sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:"100%",width:"100%"}})},r.createElement(D,{spacing:"xs"},r.createElement(J,{icon:r.createElement(an,null),onChange:e=>f(e.target.value),placeholder:m("transfer_input.search_placeholder"),rightSection:R,rightSectionWidth:"auto",value:g}),r.createElement(ee,{grow:!0,noWrap:!0,spacing:"xs",sx:e=>({[e.fn.smallerThan("md")]:{flexDirection:"column"}})},r.createElement(J.Wrapper,{label:m("transfer_input.unselected_items"),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:"100%",width:"100%"}})},r.createElement(D,null,r.createElement(ne,{padding:"xs",ref:d,withBorder:!0},r.createElement(c,{h:150,offsetScrollbars:!0,type:"auto",viewportRef:d},_>0&&r.createElement(v,{c:"gray",fz:"sm",pb:"sm"},m("transfer_input.count_hidden",{n:_})),r.createElement(jc,{items:w.unselected,itemMinSize:20,overscan:100,viewportRef:d},O))),r.createElement(U,{disabled:0===w.unselected.length,fullWidth:!0,rightIcon:r.createElement(Pt,{stroke:1.5,size:16}),onClick:C,variant:"outline"},m(g?"transfer_input.select_filtered":"transfer_input.select_all")))),r.createElement(J.Wrapper,{label:m("transfer_input.selected_items"),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:"100%",width:"100%"}})},r.createElement(D,null,r.createElement(ne,{padding:"xs",ref:p,withBorder:!0},r.createElement(c,{h:150,offsetScrollbars:!0,type:"auto",viewportRef:p},k>0&&r.createElement(v,{c:"gray",fz:"sm",pb:"sm"},m("transfer_input.count_hidden",{n:k})),r.createElement(jc,{items:w.selected,itemMinSize:20,overscan:100,viewportRef:p},O))),r.createElement(U,{color:"red",fullWidth:!0,disabled:0===w.selected.length,leftIcon:r.createElement(It,{stroke:1.5,size:16}),onClick:E,variant:"outline"},m(g?"transfer_input.unselect_filtered":"transfer_input.unselect_all")))))))}qf.defaultProps={getLabel:e=>"".concat(e)};var $f=qf;var Wf=n.memo((function(e){const{item:t}=e,o=l(),{actions:a,defaultMembersFilter:i}=uf(),{translate:s}=_m(),c=_("(max-width: ".concat(o.breakpoints.md,"px)")),d=ia(Nf),m=ia(Fg),[g,f]=n.useState(!1),[h,b]=n.useState(""),[y,w]=n.useState(Object.create(null)),[x,S]=n.useState(!0),C=d["".concat(t.dimension,".").concat(t.hierarchy,".").concat(t.level)],E=n.useCallback((()=>{a.updateCut({...t,active:!t.active})}),[t]),k=n.useCallback((e=>{e.stopPropagation(),a.removeCut(t.key)}),[t.key]),R=n.useCallback((e=>{a.updateCut({...t,members:e})}),[t]),O=n.useCallback((()=>{const e=t.members;a.willFetchMembers(t).then((n=>{const r={};let o=n.length;for(;o--;){const t=n[o],a=e.includes("".concat(t.key));r[t.key]=rg({name:t.caption,key:t.key,active:a})}!t.active&&a.updateCut({...t,active:!0}),b(""),w(r),S(!1)})).catch((e=>{b("".concat(e.message)),w({}),S(!1)}))}),[]);n.useEffect(O,[t.key,m.code]);const P=n.useMemo((()=>{const e=C.map((e=>Fm(e,m.code)));return s("params.tag_drilldowns",{abbr:Df(e,s("params.tag_drilldowns_abbrjoint")),dimension:e[0],hierarchy:e[1],level:e[2],memberCount:t.members.length})}),[t.members.join("-"),t,m.code]),F=n.useMemo((()=>[{label:s("params.label_cuts_filterby_id"),method:(e,t)=>e.test(t.key)},{label:s("params.label_cuts_filterby_name"),method:(e,t)=>e.test(t.name)},{label:s("params.label_cuts_filterby_any"),method:(e,t)=>e.test(t.key)||e.test(t.name)}]),[m.code]),j={id:0,name:1,any:2}[i];if(x)return r.createElement(Kf,{onRemove:k},P);if(h)return r.createElement(Yf,{error:h,item:e.item,onReload:O,onRemove:k},P);const M=t.members.length,A=1===M&&y[t.members[0]],T="false"!=C[2].annotations.memberid_in_ui;return r.createElement(H,{opened:g,onChange:f,position:c?"bottom":"right",shadow:"md",withArrow:!0,withinPortal:!0},r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(I,{checked:t.active,onChange:E,size:"xs"}),r.createElement(v,{fz:"sm",lineClamp:1},s("params.tag_cuts",{abbr:P,first_member:A?A.name:"",n:M}))),r.createElement(H.Target,null,r.createElement(ee,{noWrap:!0,position:"right",spacing:"xs"},r.createElement(p,{variant:g?"filled":void 0,onClick:()=>f((e=>!e))},g?r.createElement(fn,null):r.createElement(gn,null)),r.createElement(re,{onClick:k}))))),r.createElement(H.Dropdown,null,r.createElement(u,{miw:400,sx:e=>({[e.fn.smallerThan("md")]:{minWidth:"unset",maxWidth:250}})},r.createElement(J.Wrapper,{label:s("params.title_members")},r.createElement($f,{activeItems:t.members,getLabel:e=>e.name,getSecondLabel:T?e=>e.key!=e.name?e.key:void 0:void 0,initialItemPredicateIndex:j,itemPredicate:F,items:y,onChange:R})))))}));function Kf(e){return r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(oe,{size:"sm"}),r.createElement(v,{fz:"sm",lineClamp:1},e.children)),r.createElement(re,{onClick:e.onRemove})))}function Yf(e){const{translate:t}=_m();return r.createElement(ae,{position:"right",shadow:"md",withArrow:!0,withinPortal:!0},r.createElement(ae.Target,null,r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(ie,{color:"yellow",variant:"subtle"},r.createElement(ft,null)),r.createElement(v,{fz:"sm",lineClamp:1},e.children)),r.createElement(ee,{spacing:"xs"},r.createElement(p,{color:"yellow",onClick:e.onReload,variant:"subtle"},r.createElement(nn,null)),r.createElement(re,{onClick:e.onRemove}))))),r.createElement(ae.Dropdown,null,r.createElement(L,{color:"yellow",icon:r.createElement(ft,{size:"2rem"}),title:t("params.error_fetchmembers_title")},r.createElement(D,{spacing:"xs"},r.createElement(v,null,t("params.error_fetchmembers_detail")),r.createElement(v,null,e.error),r.createElement(U,{color:"yellow",onClick:e.onReload},t("action_reload"))))))}var Xf=()=>{const e=df(),t=nf(Mg),{translate:o}=_m(),a=n.useCallback((()=>{e.resetCuts({})}),[]),i=n.useCallback((t=>{const n=Jm(t);n.active=!1,e.updateCut(n)}),[]),l=n.useMemo((()=>t.map((e=>r.createElement(Wf,{key:e.key,item:e})))),[t]),s=r.createElement(r.Fragment,null,t.length>0&&r.createElement(p,{color:"red",onClick:a,variant:"subtle"},r.createElement(pn,null)),r.createElement(Gf,{onItemSelect:i,selectedItems:t,variant:"subtle"},r.createElement(jt,null)));return r.createElement(Hf,{id:"cuts",title:o("params.title_area_cuts",{n:"".concat(t.reduce(ug,0))}),toolbar:s,tooltip:o("params.tooltip_area_cuts"),value:"cuts"},r.createElement(D,{spacing:"xs"},0===t.length&&r.createElement(L,{color:"yellow",icon:r.createElement(mt,{size:"2rem"}),title:o("params.error_no_cut_selected_title")},o("params.error_no_cut_selected_detail")),l))},Qf={csv:"text/csv",json:"application/json",tsv:"text/tab-separated-values",txt:"text/plain",xls:"application/vnd.ms-excel"},Zf=e=>{const{provider:t,...o}=e,a=n.useCallback((e=>{e.stopPropagation(),e.preventDefault();const n=document.createElement("a"),r="function"==typeof t?t():t;Promise.resolve(r).then((e=>{const t="string"!=typeof e.content?e.content:new window.Blob([e.content],{type:Qf[e.extension]||"application/octet-stream"}),r=window.URL.createObjectURL(t);n.href=r,n.download="".concat(e.name,".").concat(e.extension),n.addEventListener("click",(()=>{setTimeout((()=>{window.URL.revokeObjectURL(r)}),5e3)}),!1),n.click()}),(e=>{console.error("Error downloading content:",e.message)}))}),[t]);return r.createElement(U,{...o,fullWidth:!0,onClick:a,variant:"default"},r.createElement(v,{fz:"xs"},e.children))},Jf=()=>{const e=df(),{translate:t}=_m(),{isDirty:o,result:a}=ia(Og),i=ia(bg),l=n.useMemo((()=>i.map((n=>r.createElement(Zf,{key:n,provider:()=>(e.setLoadingState("FETCHING"),e.willDownloadQuery(n).then((t=>(e.setLoadingState("SUCCESS"),t)),(t=>{throw e.setLoadingState("FAILURE",t.message),t})))},t("formats.".concat(n)))))),[i]);return 0===l.length||o||0===a.data.length?null:r.createElement(u,{id:"button-group-download-results"},r.createElement(J.Wrapper,{label:t("params.title_downloaddata")},r.createElement(U.Group,null,l)))};function eh(e){var t;const{getLabel:o,getValue:a=Um,items:i,onItemSelect:l,selectedItem:s}=e,[c,u]=n.useMemo((()=>{const e=Gm(a),t=o?Gm(o):e,n=i.map((n=>({label:t(n),value:e(n),item:n})));return[n,qm(n,(e=>e.value))]}),[i,o,a]),d=n.useMemo((()=>{if(null==s)return null;if("string"==typeof s)return s;return Gm(a)(s)}),[s,a]),p=n.useCallback((e=>{l&&l(u[e].item)}),[u]);return 0!==i.length&&d?r.createElement(y,{data:c,disabled:e.loading||e.disabled,hidden:e.hidden,label:e.label,onChange:p,onClick:nh,onFocus:nh,searchable:null!=(t=e.searchable)?t:e.items.length>6,value:d}):null}function th(e){const{items:t,onItemSelect:o,selectedItem:a}=e;return n.useMemo((()=>{if(t.length>3)return null;const n=Gm(e.getValue||Um),i=e.getLabel?Gm(e.getLabel):n,l="string"==typeof a?a:a&&n(a);return r.createElement(J.Wrapper,{hidden:e.hidden,label:e.label},r.createElement(ee,{spacing:"xs",grow:!0},t.map((e=>{const t=n(e);return r.createElement(U,{variant:l===t?"filled":"outline",key:t,onClick:o?()=>o(e):void 0},i(e))}))))}),[t,o,a])||r.createElement(eh,{getLabel:e.getLabel,getValue:e.getValue,hidden:e.hidden,items:t,label:e.label,onItemSelect:e.onItemSelect,searchable:e.searchable,selectedItem:a})}function nh(e){e.target instanceof HTMLInputElement&&e.target.select()}var rh=qf;function oh(e){const{item:t}=e,o=df(),a=l(),{translate:i}=_m(),s=_("(max-width: ".concat(a.breakpoints.md,"px)")),c=ia(Nf),d=ia(Fg),[m,g]=n.useState(!1),f=n.useCallback((()=>{o.updateDrilldown({...t,active:!t.active})}),[t]),h=n.useCallback((e=>{e.stopPropagation(),o.removeDrilldown(t.key)}),[t.key]),b=n.useCallback((e=>{const n=e.level?e.name:"";o.updateDrilldown({...t,captionProperty:n})}),[t]),v=n.useCallback((e=>{const n=t.properties.map((t=>og({...t,active:e.includes(t.key)})));o.updateDrilldown({...t,properties:n})}),[t]),y=n.useMemo((()=>qm(t.properties,(e=>e.key))),[t.properties]),w=n.useMemo((()=>[{name:i("placeholders.unselected")},...t.properties]),[d.code,t.properties]),x=Tm(t.properties,(e=>cg(e)?e.key:null)),S=n.useMemo((()=>{const e=c["".concat(t.dimension,".").concat(t.hierarchy,".").concat(t.level)].map((e=>Fm(e,d.code)));return i("params.tag_drilldowns",{abbr:Df(e,i("params.tag_drilldowns_abbrjoint")),dimension:e[0],hierarchy:e[1],level:e[2],propCount:x.length})}),[x.join("-"),t,d.code]),C=t.properties.length>0&&r.createElement(H.Target,null,r.createElement(p,{variant:m?"filled":void 0,onClick:n.useCallback((()=>g((e=>!e))),[])},m?r.createElement(fn,null):r.createElement(gn,null))),E=r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(I,{checked:t.active,label:S,onChange:f,size:"xs",styles:{label:{fontSize:"0.875rem"}}}),r.createElement(ee,{noWrap:!0,spacing:"xs"},C,r.createElement(re,{onClick:h}))));if(0===t.properties.length)return E;const k=r.createElement(u,{miw:400,sx:e=>({[e.fn.smallerThan("md")]:{minWidth:"unset",maxWidth:250}})},r.createElement(eh,{getValue:"name",items:w,label:i("params.title_caption"),onItemSelect:b,selectedItem:t.captionProperty||i("placeholders.unselected")}),r.createElement(J.Wrapper,{label:i("params.title_properties")},r.createElement(rh,{activeItems:x,getLabel:e=>e.name,items:y,itemPredicate:(e,t)=>e.test(t.name),onChange:v})));return r.createElement(H,{onChange:g,opened:m,position:s?"bottom":"right",shadow:"md",withArrow:!0,withinPortal:!0},E,r.createElement(H.Dropdown,null,k))}var ah=()=>{const e=df(),{translate:t}=_m(),o=ia(Tg),a=ia(Af),i=n.useCallback((()=>{e.resetDrilldowns({})}),[]),l=n.useCallback((t=>{const n=eg(t);e.updateDrilldown(n),e.willFetchMembers({...t,level:t.name}).then((r=>{const o=a.find((e=>e.name===t.dimension));o&&e.updateDrilldown({...n,dimType:o.dimensionType,memberCount:r.length})}))}),[a]),s=n.useMemo((()=>o.map((e=>r.createElement(oh,{key:e.key,item:e})))),[o]),c=r.createElement(r.Fragment,null,o.length>0&&r.createElement(p,{onClick:i,variant:"subtle"},r.createElement(pn,null)),r.createElement(Gf,{onItemSelect:l,selectedItems:o,variant:"subtle"},r.createElement(jt,null)));return r.createElement(Hf,{id:"drilldowns",title:t("params.title_area_drilldowns",{n:"".concat(o.reduce(ug,0))}),toolbar:c,tooltip:t("params.tooltip_area_drilldowns"),value:"drilldowns"},r.createElement(D,{spacing:"xs"},0===o.length&&r.createElement(L,{color:"yellow",icon:r.createElement(mt,{size:"2rem"}),title:t("params.error_no_dimension_selected_title")},t("params.error_no_dimension_selected_detail")),s))};function ih(){const e=df(),{code:t}=ia(Fg),o=ia(Lg),a=ia(Mf),i=ia(jf),[l,s]=n.useState(""),{translate:c}=_m(),u=n.useMemo((()=>{const e=l?Wm(l,"i"):null;return Tm(i,(n=>e&&!e.test(Fm(n,t))?null:o[n.name]||ng({active:!1,...n})))}),[o,i,l,t]),d=u.filter(cg),m=n.useMemo((()=>u.map((n=>{const o=a[n.name];return r.createElement(F,{key:n.key,checked:n.active,label:Fm(o,t),onChange:()=>{e.updateMeasure({...n,active:!n.active})}})}))),[u,a]),g=n.useCallback((()=>{const t=i.map((e=>({...o[e.name],active:!1})));e.resetMeasures(qm(t,"key"))}),[o,i]),f=n.useCallback((()=>s("")),[]),h=r.createElement(r.Fragment,null,d.length>0&&r.createElement(p,{onClick:g,variant:"subtle"},r.createElement(pn,null)),r.createElement(H,{closeOnClickOutside:!0,closeOnEscape:!0,position:"bottom",shadow:"md",trapFocus:!0,withArrow:!0,withinPortal:!0},r.createElement(H.Target,null,r.createElement(p,{variant:"subtle"},l?r.createElement($t,{onClick:f}):r.createElement(Wt,null))),r.createElement(H.Dropdown,null,r.createElement(J,{icon:r.createElement(an,null),onChange:e=>s(e.target.value),placeholder:c("params.search_placeholder"),rightSection:l.length>0?r.createElement(re,{onClick:f}):void 0,type:"search",value:l}))));return r.createElement(Hf,{id:"measures",title:c("params.title_area_measures",{n:d.length}),toolbar:h,tooltip:c("params.tooltip_area_measures"),value:"measures"},r.createElement(D,{spacing:"xs"},m))}var lh=()=>{const e=df(),{translate:t}=_m(),{limit:o,offset:a}=ia(Vg),i=ia(Bg),{rowLimit:l}=uf(),s=n.useCallback((t=>{e.updatePagination({limit:t||0,offset:a})}),[a]),c=n.useCallback((t=>{e.updatePagination({limit:o,offset:t||0})}),[o]);return r.createElement(ee,{noWrap:!0,spacing:"xs",align:"start",grow:!0},r.createElement(J.Wrapper,{label:t("params.label_pagination_limit"),description:l&&!i?t("params.label_pagination_limit_description",{limit:l}):"",inputWrapperOrder:["label","input","description"]},r.createElement(me,{disabled:i,min:0,max:l||void 0,onChange:s,value:o})),r.createElement(J.Wrapper,{label:t("params.label_pagination_offset")},r.createElement(me,{disabled:i,min:0,onChange:c,value:a})))},sh=n.memo((e=>{const{activeOnly:t,onItemSelect:o}=e,{translate:a}=_m(),i=ia(jf),l=ia(Lg),[s,c]=n.useMemo((()=>{const e=Tm(i,(e=>{const{name:n}=e;return t&&!cg(l[n])?null:{item:e,label:n,value:n}})),n=qm(e,(e=>e.value));return[e,e=>{e&&o&&o(n[e].item)}]}),[l,o]);return r.createElement(y,{data:s,onChange:c,placeholder:a("selectmeasure_placeholder"),searchable:s.length>6})}),ag);function ch(){const e=df(),{locale:t,translate:o}=_m(),{sortDir:a,sortKey:i}=ia(Ug),l=n.useMemo((()=>{const e={asc:o("direction.ASC"),desc:o("direction.DESC")};return{directions:e,options:[{value:"asc",label:e.asc},{value:"desc",label:e.desc}]}}),[t]),s=n.useCallback((t=>{e.updateSorting({key:t.name,dir:a})}),[]),c=n.useCallback((t=>{e.updateSorting({key:i,dir:t.value})}),[]);return r.createElement(J.Wrapper,{label:o("params.label_sorting_key")},r.createElement(ee,{noWrap:!0,spacing:"xs",align:"end"},r.createElement(sh,{activeOnly:!0,selectedItem:i,onItemSelect:s}),r.createElement(eh,{getValue:"value",getLabel:"label",items:l.options,onItemSelect:c,selectedItem:a,searchable:!1})))}var uh=()=>{const e=df(),{translate:t}=_m(),n=nf(zg),o=nf(vg);return r.createElement(Hf,{id:"options",title:t("params.title_area_options"),tooltip:t("params.tooltip_area_options"),value:"options"},r.createElement(D,{spacing:"xs"},r.createElement(D,{spacing:"xs"},o.map((o=>r.createElement(F,{key:o,label:t("params.label_boolean_".concat(o)),checked:n[o]||!1,onChange:()=>{e.updateBoolean({key:o})}})))),r.createElement(ch,null),r.createElement(lh,null)))},dh=()=>{const e=df(),{translate:t}=_m(),{isValid:o,error:a}=ia(Gg),{cube:i,locale:l,measures:s}=ia(Ig),c=a?t(a):"";return r.createElement(ee,{id:"button-group-execute-query",noWrap:!0,spacing:"xs"},r.createElement(d,{color:"red",disabled:o,events:{hover:!0,focus:!1,touch:!0},label:c,multiline:!0,withArrow:!0,withinPortal:!0},r.createElement(U,{disabled:!o,fullWidth:!0,id:"button-execute-query",leftIcon:r.createElement(Dt,null),onClick:n.useCallback((()=>{e.willRequestQuery()}),[]),sx:{"&[data-disabled]":{pointerEvents:"all"}}},t("params.action_execute"))),r.createElement(d,{events:{hover:!0,focus:!1,touch:!0},label:t("params.action_clear_description"),multiline:!0,withArrow:!0,withinPortal:!0},r.createElement(p,{color:"red",id:"button-clear-params",onClick:n.useCallback((()=>{const t=Object.values(s).map((e=>ng({...e,active:!1})));e.resetAllParams({cube:i,locale:l,measures:qm(t,"key")})}),[]),size:"lg"},r.createElement(mn,null))))},ph=o(((e,t)=>({paper:{borderRadius:0,padding:"".concat(e.spacing.xs," ").concat(e.spacing.md),[e.fn.largerThan("md")]:{height:"100%",padding:"".concat(e.spacing.sm," ").concat(e.spacing.xs),writingMode:"vertical-rl"},"&[data-active]":{[e.fn.largerThan("md")]:{display:"flex",flexFlow:"column nowrap",width:t.width,padding:"".concat(e.spacing.xs," ").concat(e.spacing.md),writingMode:"horizontal-tb"}}},toggle:{marginBottom:e.spacing.sm},title:{textTransform:"uppercase",lineHeight:1}}))),mh={width:380,withBorder:!1};function gh(e){const{defaultOpen:t=!0,classNames:o,styles:a,unstyled:l}=e,s={name:gh.displayName,classNames:o,styles:a,unstyled:l},{width:u,withBorder:d}=i(s.name,mh,e),{classes:p,cx:m}=ph({width:u,withBorder:d},s),[g,f]=n.useState(t),h=n.useCallback((()=>{f((e=>!e))}),[]);return r.createElement(k,{className:m(e.className,p.paper),"data-active":g?"true":void 0,id:e.id,withBorder:d},r.createElement(S,{className:p.toggle,onClick:h},r.createElement(se,{order:4,className:p.title},e.title)),g&&r.createElement(c,{mx:"-sm",px:"sm"},r.createElement(D,null,e.children)))}gh.displayName="DEX-CollapsiblePanel";var fh=e=>{const t=!!e.withTooltip,o=df(),{translate:a}=_m(),i=ia(Bg),l=ia(Lf),{previewLimit:s}=uf();n.useEffect((()=>{i&&o.willRequestQuery()}),[i,l]);const c=n.useCallback((()=>{o.updateIsPreview(!i)}),[i]),u=r.createElement(I,{checked:!i,styles:{label:{display:"flex",alignContent:"center",gap:"0.25rem"}},label:r.createElement(r.Fragment,null,a("params.label_boolean_full_results"),t&&r.createElement(ie,{variant:"subtle",size:"sm"},r.createElement(Xt,null))),onChange:c});return t?r.createElement(d,{events:{hover:!0,focus:!1,touch:!0},label:i?a("preview_mode.description_preview",{limit:s}):a("preview_mode.description_full"),multiline:!0,withArrow:!0,withinPortal:!0},r.createElement("div",null,u)):u},hh=th,bh=th;function vh(){const e=ia(wg),t=ia(Ff);return 1===e.length?null:r.createElement(yh,{items:e,selectedItem:t})}function yh(e){const{items:t,selectedItem:o}=e,a=df(),i=n.useCallback((e=>{a.willSetCube(e.name)}),[]),{translate:l}=_m(),{code:s}=ia(Fg),{level:c,setLevel:u,keys:d,values:p}=Sh(t,o,(e=>jm(e,"topic",s)),[s]),{level:m,setLevel:g,keys:f,values:h}=Sh(p,o,(e=>jm(e,"subtopic",s)),[s]),{level:b,setLevel:y,keys:w,values:x}=Sh(h,o,(e=>jm(e,"table",s)),[s]),S=x.length>0?x:h.length>0?h:p.length>0?p:t;return n.useEffect((()=>{o&&S.length>0&&!S.includes(o)&&i(S[0])}),[S,o]),r.createElement(D,{id:"select-cube",spacing:0},r.createElement(hh,{hidden:"Hidden"===c,items:d,label:l("params.label_topic"),onItemSelect:u,selectedItem:c}),r.createElement(hh,{hidden:"Hidden"===m,items:f,label:l("params.label_subtopic"),onItemSelect:g,selectedItem:m}),r.createElement(hh,{hidden:"Hidden"===b,items:w,label:l("params.label_table"),onItemSelect:y,selectedItem:b}),r.createElement(bh,{hidden:S.length<2,getLabel:e=>Fm(e,s),getValue:"name",items:S,label:l("params.label_cube"),onItemSelect:i,selectedItem:o}),o&&r.createElement(v,{mt:"sm",sx:{"& p":{margin:0}}},r.createElement(wh,{annotation:"description",className:"dex-cube-description",item:o,locale:s}),r.createElement(xh,{item:o,locale:s,fz:"xs"}),r.createElement(wh,{annotation:"source_description",className:"dex-cube-srcdescription",fz:"xs",item:o,locale:s})))}function wh(e){const{annotation:t,item:n,locale:o,...a}=e,i=jm(n,t,o);return i?r.createElement(v,{component:"p",...a},i):null}function xh(e){const{item:t,locale:n,...o}=e,{translate:a}=_m(),i=jm(t,"source_name",n),l=jm(t,"source_link",n);return i?r.createElement(v,{component:"p",...o},"".concat(a("params.label_source"),": "),l?r.createElement(Z,{href:l},i):r.createElement(v,{span:!0},i)):null}function Sh(e,t,r,o=[]){const[a,i]=n.useState((()=>t&&r(t)||""));n.useEffect((()=>{t&&i(r(t)||"")}),[t,...o]);const[l,s]=n.useMemo((()=>{const t=function(e,t){const n="function"==typeof t?t:e=>e[t],r=new Map;for(let o=0;osa.getLanguages(i).map((e=>({label:t("params.label_localeoption",{code:e.code,engName:e.name,nativeName:e.nativeName,customName:t("params.label_localecustom_".concat(e.code))})||e.nativeName,value:e.code})))),[o,i]),s=n.useCallback((t=>{e.updateLocale(t.value)}),[]);return i.length<2?null:r.createElement(u,{id:"select-locale"},r.createElement(J.Wrapper,{label:t("params.label_locale")},r.createElement(eh,{getLabel:"label",getValue:"value",items:l,onItemSelect:s,selectedItem:a})))}var Eh=e=>{const{translate:t}=_m();return r.createElement(gh,{id:"layout-column-explorer-params",title:t("params.column_title")},r.createElement(Ch,null),r.createElement(vh,null),r.createElement(de,{multiple:!0,chevronPosition:"left",defaultValue:[e.defaultOpen],styles:e=>({chevron:{marginRight:"calc(".concat(e.spacing.xs," / 2)")}}),variant:"contained"},r.createElement(ih,null),r.createElement(ah,null),r.createElement(Xf,null),r.createElement(uh,null)),r.createElement("div",{id:"switch-params-load-all-results"},r.createElement(fh,{withTooltip:!0})),r.createElement(dh,null),r.createElement(Jf,null))},kh=e=>r.createElement(ee,{noWrap:!0,spacing:"xs"},e.icon&&e.icon,r.createElement(v,{lineClamp:1,sx:{wordBreak:"break-all"}},e.text)),_h=n.memo((e=>{const{onSelect:t,onDelete:o}=e,{params:a}=e.item,{translate:i}=_m(),l=Object.values(a.drilldowns).filter(cg).map((e=>e.level)),s=Object.values(a.measures).filter(cg).map((e=>e.name)),c=n.useMemo((()=>({size:15})),[]);return r.createElement(U.Group,null,r.createElement(U,{fullWidth:!0,h:"auto",mih:35,styles:{inner:{justifyContent:"flex-start"}},onClick:()=>t&&t(e.item.key),tabIndex:0,variant:e.active?"filled":"default"},r.createElement(R,{direction:"column"},a.cube&&r.createElement(kh,{icon:r.createElement(St,{...c}),text:a.cube}),s.length>0&&r.createElement(kh,{icon:r.createElement(Qt,{...c}),text:s.join(", ")}),l.length>0&&r.createElement(kh,{icon:r.createElement(dn,{...c}),text:l.join(", ")}),!a.cube&&r.createElement("span",null,i("queries.unset_parameters")))),r.createElement(U,{color:"red",disabled:e.hideDelete,h:"auto",onClick:()=>o&&o(e.item.key),variant:"filled"},r.createElement(mn,null)))}),ag),Rh=()=>{const e=df(),t=ia(Og),o=ia(Rg),{translate:a}=_m(),i=n.useCallback((()=>{const n=Xm({params:null==t?void 0:t.params});e.updateQuery(n),e.selectQuery(n.key)}),[t]),l=n.useCallback((t=>{e.removeQuery(t)}),[]),s=n.useCallback((t=>{e.selectQuery(t)}),[]),c=n.useCallback((()=>{const t=window.prompt("Enter the URL of the query you want to parse:");if(t){e.setLoadingState("FETCHING");const n=new URL(t);e.willParseQueryUrl(n).then((t=>{e.updateQuery(t),e.selectQuery(t.key)})).then((()=>e.willHydrateParams())).then((()=>e.willExecuteQuery())).then((()=>e.setLoadingState("SUCCESS")),(t=>e.setLoadingState("FAILURE",t.message)))}}),[]);return r.createElement(gh,{id:"layout-column-explorer-queries",title:a("queries.column_title"),defaultOpen:o.length>1},r.createElement(pe,{h:"xs"}),r.createElement(ee,{id:"button-group-queries-actions",noWrap:!0,spacing:"xs"},r.createElement(U,{fullWidth:!0,leftIcon:r.createElement(rn,null),onClick:i},a("queries.action_create")),r.createElement(U,{fullWidth:!0,leftIcon:r.createElement(Kt,null),onClick:c},a("queries.action_parse"))),r.createElement(G,{my:"xs"}),r.createElement(D,{id:"button-group-stored-queries",spacing:"xs"},o.map(((e,n,o)=>r.createElement(_h,{active:e===t,key:e.key,item:e,hideDelete:1===o.length,onSelect:s,onDelete:l})))))},Oh=o((()=>({container:{minHeight:"40vh",display:"flex",flexFlow:"column nowrap"}})));function Ih(e){const t=ia(Ff),n=ia(gg),{isDirty:o,params:a,result:i}=ia(Og),{online:l,url:s}=n,{data:c,error:u}=i,{translate:d}=_m(),{classes:p,cx:m}=Oh();if("object"==typeof window&&!1===window.navigator.onLine)return r.createElement(Ph,{className:m(p.container,e.className),icon:r.createElement(hn,{color:"orange",size:"5rem"}),title:d("results.error_disconnected_title")});if(!1===l)return r.createElement(Ph,{className:m(p.container,e.className),icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:d("results.error_serveroffline_title"),description:r.createElement(v,{span:!0},d("results.error_serveroffline_detail"),r.createElement(Z,{href:s,target:"_blank",rel:"noopener noreferrer"},s),".")});if(u){const t=d("results.error_execquery_code".concat(u.status),u);return r.createElement(Ph,{className:m(p.container,e.className),icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:d("results.error_execquery_title",u),description:t.startsWith("results.error_")?d("results.error_execquery_default",u):t})}return null==l||!t||o?r.createElement(k,{className:m(p.container,e.className),id:"query-results-transient",radius:0},e.splash||null):0===c.length?r.createElement(Ph,{className:m(p.container,e.className),icon:r.createElement(St,{color:"orange",size:"5rem"}),title:d("results.error_emptyresult_title"),description:d("results.error_emptyresult_detail")}):r.createElement(Fh,{className:m(p.container,e.className),cube:t,panels:e.panels,params:a,result:i},e.splash)}function Ph(e){return r.createElement(k,{id:"query-results-failure",className:e.className,radius:0,withBorder:!0,sx:{justifyContent:"center"}},r.createElement(D,{align:"center",spacing:"xs"},e.icon&&e.icon,e.title&&r.createElement(se,{order:5},e.title),e.description&&r.createElement(v,{ta:"center",sx:{whiteSpace:"pre"}},e.description),e.children&&e.children,e.action&&e.action))}function Fh(e){const{cube:t,panels:o,params:a,result:i}=e,{translate:l}=_m(),{previewLimit:s,rowLimit:c,actions:d}=uf(),p=ia(Og),g=ia(Bg),[f,h,b]=n.useMemo((()=>{const e=p.panel||"".concat(o[0].key,"-"),[t,...n]=e.split("-"),r=o.find((e=>e.key===t))||o[0];return[r.component,r.key,n.join("-")]}),[o,p.panel]),y=n.useCallback((e=>{d.switchPanel(e)}),[]);return r.createElement(k,{id:"query-results-success",className:e.className,radius:0,withBorder:!0},r.createElement(m,{id:"query-results-tabs",onTabChange:y,value:h},r.createElement(m.List,null,o.map((e=>r.createElement(m.Tab,{key:e.key,id:e.key,value:e.key},l(e.label)))),r.createElement(m.Tab,{disabled:!0,ml:"auto",value:"_results"},r.createElement(se,{order:5},l("results.count_rows",{n:i.data.length}))))),g&&r.createElement(L,{id:"alert-load-all-results",color:"yellow",radius:0,sx:{flex:"0 0 auto"}},r.createElement(ee,{position:"apart"},r.createElement(v,null,r.createElement(v,{fw:700,span:!0},l("preview_mode.title_preview"),": "),r.createElement(v,{span:!0},l("preview_mode.description_preview",{limit:s}))),r.createElement(fh,null))),!g&&c>0&&c===i.data.length&&r.createElement(L,{id:"alert-limit-hit-results",color:"orange",radius:0,sx:{flex:"0 0 auto"}},r.createElement(v,null,r.createElement(v,{fw:700,span:!0},l("row_limit.title"),": "),r.createElement(v,{span:!0},l("row_limit.description",{limit:c})))),r.createElement(u,{id:"query-results-content",sx:{flex:"1 1"},h:{base:"auto",md:0}},r.createElement(n.Suspense,{fallback:e.children},r.createElement(f,{cube:t,panelKey:"".concat(h,"-").concat(b),params:a,result:i}))))}var jh=()=>{const{translate:e}=_m(),{loading:t,message:n}=ia(Xg),o=n?"HEAVY_QUERY"===n.type?e("loading.message_heavyquery",n):e("loading.message_default",n):void 0,a=r.createElement(R,{justify:"center",align:"center",direction:"column"},r.createElement(oe,{size:"xl"}),r.createElement(pe,{h:"md"}),r.createElement(se,{order:4},e("loading.title")),r.createElement(v,null,o));return r.createElement(O,{loader:a,visible:t,sx:{position:"fixed",top:0}})},Mh=o(((e,t)=>({root:{display:"flex",flexFlow:"column nowrap",height:"100%",[e.fn.largerThan("md")]:{flexDirection:"row",height:t.height,width:"100%"}},flexCol:{flex:"1 1 auto",[e.fn.largerThan("md")]:{width:0}}})));function Ah(e){const t=_m(),o=function(e,t){const r=df(),[o,a]=n.useState(!1),i=n.useMemo((()=>{const e=Am(t?"".concat(t).split(","):[]).map((e=>e.trim()));return r.updateLocaleList(e),e}),["".concat(t)]);return n.useMemo((()=>{"object"==typeof window&&(r.setLoadingState("FETCHING"),Promise.all([_f(r),r.willSetupClient(e).then((()=>r.willReloadCubes()))]).then((e=>{const[t,n]=e;if(!t||!Dm(n,t.params.cube)){const e=Object.keys(n)[0];return r.willHydrateParams(e)}return t.params.locale=t.params.locale||i[0],r.resetQueries({[t.key]:t}),r.willHydrateParams().then((()=>r.willExecuteQuery()))})).then((()=>{r.setLoadingState("SUCCESS"),a(!0)}),(e=>{console.dir("There was an error during setup:",e),r.setLoadingState("FAILURE",e.message),a(!0)})))}),[]),o}(e.source,e.dataLocale),a=ia(gg),{classes:i}=Mh({height:e.height});n.useEffect((()=>{e.uiLocale&&t.setLocale(e.uiLocale)}),[e.uiLocale]);const l=n.useMemo((()=>{const n=e.splash;return n?r.createElement(n,{translation:t}):r.createElement(le,{h:"100%",sx:{flex:1}},r.createElement(Pf,null))}),[e.splash]);return r.createElement("div",{className:i.root},r.createElement(jh,null),o&&a.online&&e.withMultiQuery?r.createElement(Rh,null):null,o&&a.online?r.createElement(Eh,{defaultOpen:e.defaultOpenParams}):null,r.createElement(Ih,{className:i.flexCol,panels:e.panels,splash:l}))}var Th="application/javascript",Nh="object"==typeof window?window.Worker:null;if(Nh){let e;const t=Lh("self.onmessage = function () {}"),n=new Uint8Array(1);try{if(/(?:Trident|Edge)\/(?:[567]|12)/i.test(navigator.userAgent))throw new Error("Not available");e=new Nh(t),e.postMessage(n,[n.buffer])}catch(eb){Nh=null}finally{URL.revokeObjectURL(t),e&&e.terminate()}}function Lh(e){try{return URL.createObjectURL(new Blob([e],{type:Th}))}catch(eb){const n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);return n.append(e),URL.createObjectURL(n.getBlob(Th))}}var Dh=function(e){function t(t){const n=this;if(Nh&&!t){const t=e.toString().trim(),n=Lh("(".concat(t,")(this);"));return this._worker=new Nh(n),void URL.revokeObjectURL(n)}const r={onmessage(e){},onmessageerror(e){},postMessage(e){console.debug("Message from shim worker to main:",e),setTimeout((()=>{n.onmessage({data:e,target:r})}))},terminate(){console.debug("Worker terminated by shim worker.")}};e.call(r,r),this.threadShim=r,this.isThisThread=!0,this.onerror=void 0,this.onmessage=void 0,this.onmessageerror=void 0}return Object.defineProperties(t.prototype,{onerror:{get(){return this._worker.onerror},set(e){this._worker.onerror=e}},onmessage:{get(){return this._worker.onmessage},set(e){this._worker.onmessage=e}},onmessageerror:{get(){return this._worker.onmessageerror},set(e){this._worker.onmessageerror=e}}}),t.prototype.postMessage=function(e){const t=this._worker;return t?t.postMessage(e):(setTimeout((()=>{var t;null==(t=null==this?void 0:this.threadShim)||t.onmessage({data:e,target:this})})),console.debug("Message from main thread to ShimWorker:",e))},t.prototype.terminate=function(){const e=this._worker;return e?e.terminate():console.debug("ShimWorker terminated by main.")},t}((e=>{e.onmessage=function(n){const{data:r,sides:o}=n.data,a=t(r,o);e.postMessage(a)};const t=new Function("data","sides",'\n const {valProp} = sides;\n const colProp = getIdProperty(sides.colProp);\n const rowProp = getIdProperty(sides.rowProp);\n\n /** @type {Set} */ const colMembers = new Set();\n /** @type {Set} */ const rowMembers = new Set();\n\n /** @type {Map} */ const colDict = new Map();\n /** @type {Map} */ const rowDict = new Map();\n\n /** @type {Map[]>} */\n const valReference = new Map();\n\n const n = data.length;\n let i = 0;\n while (i < n) {\n const datum = data[i++];\n\n const colId = datum[colProp];\n const rowId = datum[rowProp];\n colMembers.add(colId);\n rowMembers.add(rowId);\n getValueReference(colId, rowId).push(datum);\n\n const colLabel = datum[sides.colProp];\n const rowLabel = datum[sides.rowProp];\n colDict.set(colId, colLabel);\n rowDict.set(rowId, rowLabel);\n }\n\n const sortedCols = Array.from(colMembers).sort();\n\n return {\n headers: [\n sides.rowProp,\n ...sortedCols.map(colId => colDict.get(colId) || colId)\n ],\n data: Array.from(rowMembers, rowId => [\n rowDict.get(rowId) || rowId,\n ...sortedCols.map(colId => {\n const items = getValueReference(colId, rowId);\n if (items.length === 0) return undefined;\n const value = items.reduce((sum, datum) => sum + datum[valProp], 0);\n return isNaN(value) ? undefined : value;\n })\n ])\n };\n\n /**\n * Gets the property name for the ID of the required property.\n * @type {(prop: string) => string}\n */\n function getIdProperty(prop) {\n const propid = "".concat(prop, " ID");\n return {}.hasOwnProperty.call(data[0], propid) ? propid : prop;\n }\n\n /**\n * Retrieves the container array for the elements in the data that match a\n * specified (col, row) tuple. If this array was not previously defined, is\n * created.\n * @type {(colId: string, rowId: string) => Record[]}\n */\n function getValueReference(colId, rowId) {\n const key = "".concat("<", colId, ">x<", rowId, ">");\n const value = valReference.get(key);\n if (value !== undefined) return value;\n const defaultValue = [];\n valReference.set(key, defaultValue);\n return defaultValue;\n }\n ')})),zh={undefined:e=>e,identity:e=>"".concat(e),Decimal:new Intl.NumberFormat(void 0,{useGrouping:!1}).format,Dollars:new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"}).format,Human:e=>Cm(e,"en-US"),Milliards:new Intl.NumberFormat(void 0,{useGrouping:!0}).format},Bh=["Decimal","Milliards","Human"];function Vh(e){const{formatters:t}=uf(),[r,o]=n.useState({}),a=n.useRef({});return n.useEffect((()=>{const t=e.map((e=>{const{annotations:t}=e;return[e.name,t.format_template||t.units_of_measurement]})),n=Object.fromEntries(t);a.current=n,o(n)}),[e]),n.useMemo((()=>({currentFormats:r,getAvailableKeys(e){const t=a.current[e];return t&&!Bh.includes(t)?[t].concat(Bh):Bh},getFormatterKey:e=>r[e]||a.current[e],getFormatter(e){if(/^[A-Z]{3}$/.test(e))return t[e]||(e=>{const n={style:"currency",currency:e},r=new Intl.NumberFormat(void 0,n).format;return t[e]=r,r})(e);try{return t[e]||zh[e]||Em(e)}catch(eb){return console.error('Formatter not configured: "'.concat(e,'"')),zh.identity}},setFormat(e,t){o({...r,[e]:t})}})),[r,a.current])}function Uh(e,t,r,o,a=null){const[i,l]=n.useState(a),[s,c]=n.useState(null);return n.useEffect((()=>(l(a),c(null),function(e,t){return new Promise(((n,r)=>{const o=new Dh;o.onmessage=e=>{n(e.data),o.terminate()},o.onerror=e=>{r(e),o.terminate()};try{o.postMessage({data:e,sides:t})}catch(a){r(a)}}))}(e,{colProp:t,rowProp:r,valProp:o}).then(l,c),()=>{l(null),c(null)})),[e,t,r,o]),[i,s]}var Gh,Hh=e=>r.createElement(le,{h:"100%",w:"100%",sx:e=>({[e.fn.smallerThan("md")]:{minHeight:"100vh"}})},r.createElement(D,{align:"center",spacing:"xs"},e.icon&&e.icon,e.title&&r.createElement(se,{order:5},e.title),e.description&&r.createElement(v,null,e.description),e.children&&e.children,e.action&&e.action)),qh=eh,$h=o((e=>({container:{[e.fn.largerThan("md")]:{height:"100%",display:"flex",flexFlow:"row nowrap"}},colParams:{[e.fn.largerThan("md")]:{flex:"0 0 280px"}},colContent:{[e.fn.largerThan("md")]:{width:0,flex:"1 1 auto"}}})));function Wh(e){const{cube:t,params:o,result:a,...i}=e,{translate:l}=_m(),s=ia(Tf),{classes:c,cx:d}=$h(),p=n.useMemo((()=>Tm(Object.values(a.types),(e=>"measure"===e.entityType?null:{value:e.label,label:e.localeLabel,type:"level"===e.entityType?s[e.entity.dimension].dimensionType:"prop"}))),[a]),m=n.useMemo((()=>Tm(Object.values(a.types),(e=>"measure"!==e.entityType?null:{value:e.label,label:e.localeLabel,type:e.entity.aggregatorType}))),[a]),[g,f]=n.useState((()=>p.find((e=>"time"===e.type))||p[0])),[h,b]=n.useState((()=>p.find((e=>e!==g))||p[0])),[v,y]=n.useState((()=>m[0])),w=[o.cube,g.label,h.label,v.value].join("_"),[x,S]=Uh(a.data,g.value,h.value,v.value),{formatter:C,formatterKey:E,formatterKeyOptions:k,setFormat:_}=function(e,t){const{translate:r}=_m(),o=Vh(e);return n.useMemo((()=>{const e=o.getFormatterKey(t)||"undefined",n=o.getFormatter(e);return{formatExample:n(12345.6789),formatter:n,formatterKey:e,formatterKeyOptions:[{label:r("placeholders.none"),value:"undefined"}].concat(o.getAvailableKeys(t).map((e=>({label:o.getFormatter(e)(12345.6789),value:e})))),setFormat:o.setFormat}}),[t,o])}(t.measures,v.value),R=n.useMemo((()=>{const e=[];"prop"!==h.type&&"prop"!==g.type||e.push(r.createElement(L,{color:"yellow",m:"sm",icon:r.createElement(mt,{size:"2rem"}),key:"propertypivot"},l("pivot_view.warning_propertypivot")));return Object.values(o.drilldowns).filter(cg).length>2&&e.push("SUM"!==v.type?r.createElement(L,{color:"yellow",m:"sm",icon:r.createElement(mt,{size:"2rem"}),key:"notsummeasure"},l("pivot_view.warning_notsummeasure")):r.createElement(L,{color:"yellow",m:"sm",icon:r.createElement(mt,{size:"2rem"}),key:"sumdimensions"},l("pivot_view.warning_sumdimensions"))),e}),[o.drilldowns,h,g,v]),O=n.useMemo((()=>x?r.createElement(J.Wrapper,{label:l("pivot_view.title_download")},r.createElement(U.Group,null,r.createElement(Zf,{provider:()=>({name:w,extension:"csv",content:Yh(x,C,"csv")})},"CSV"),r.createElement(Zf,{provider:()=>({name:w,extension:"tsv",content:Yh(x,C,"tsv")})},"TSV"))):null),[x,C]);if(p.length<2)return r.createElement(Hh,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_missingparams")});let I;return I=g&&h&&v?g===h?r.createElement(Hh,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_onedimension")}):null!=S?r.createElement(Hh,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_internal"),description:l("pivot_view.error_internal_detail",{error:S.message})}):x?r.createElement(Kh,{key:"".concat(w," ").concat(E),data:x.data,headers:x.headers,formatter:C,tableProps:i}):r.createElement(Hh,{icon:r.createElement(oe,{size:"xl"}),title:l("pivot_view.loading_title"),description:l("pivot_view.loading_details")}):r.createElement(Hh,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_missingparams")}),r.createElement(u,{id:"query-results-pivot-view",className:d(e.className,c.container)},r.createElement(u,{className:c.colParams},r.createElement(te,{id:"query-results-pivot-view-params",px:"md",py:"sm",cols:1,breakpoints:[{minWidth:"xs",cols:2},{minWidth:"sm",cols:3},{minWidth:"md",cols:1}]},r.createElement(qh,{getLabel:"label",getValue:"value",items:p,onItemSelect:f,selectedItem:g.value,label:"prop"===g.type?l("pivot_view.label_ddcolumnprop"):l("pivot_view.label_ddcolumn")}),r.createElement(qh,{getLabel:"label",getValue:"value",items:p,onItemSelect:b,selectedItem:h.value,label:"prop"===h.type?l("pivot_view.label_ddrowprop"):l("pivot_view.label_ddrow")}),r.createElement(qh,{getLabel:"label",getValue:"value",items:m,label:l("pivot_view.label_valmeasure"),onItemSelect:y,selectedItem:v.value}),r.createElement(eh,{getLabel:"label",getValue:"value",items:k,label:l("pivot_view.label_formatter"),onItemSelect:e=>_(v.value,e.value),selectedItem:E}),O),R.length>0?R:null),r.createElement(u,{className:c.colContent},I))}function Kh(e){const{data:t,formatter:o,headers:a,...i}=e,l=n.useMemo((()=>a.map(((e,t)=>({accesorKey:e,Cell:({row:e})=>t>0&&"number"==typeof e.original[t]?o(e.original[t]):e.original[t],header:e,id:"".concat(e,"_").concat(t),mantineTableBodyCellProps:{align:t>0?"right":"left"}})))),[a]),s=n.useMemo((()=>({enableBottomToolbar:!1,enableColumnFilterModes:!0,enableColumnResizing:!0,enableColumnVirtualization:!0,enableTopToolbar:!1,enablePagination:!1,enableRowNumbers:!0,enableRowVirtualization:!0,initialState:{density:"xs"},mantineTableProps:{sx:{"& td":{padding:"7px 10px!important"}},withColumnBorders:!0},mantinePaperProps:{id:"query-results-pivot-view-preview",withBorder:!1,sx:e=>({height:"100%",padding:"0 ".concat(e.spacing.sm),[e.fn.largerThan("lg")]:{padding:0}})},mantineTableContainerProps:{id:"query-results-pivot-view-table",sx:{height:"100%"}},rowVirtualizerProps:{measureElement:()=>37}})),[]),c=dp({...s,...i,columns:l,data:t});return r.createElement(rm,{table:c})}function Yh(e,t,n){const r={csv:",",tsv:"\t"}[n],o=e=>{const t="".concat(e).trim();return t.includes(r)?JSON.stringify(t):t},a=e=>void 0===e?"":o(t(e));return[e.headers.map(o).join(r),...e.data.map((e=>[o(e[0]),...e.slice(1).map(a)].join(r)))].join("\n")}function Xh(e){const{cube:t,result:o,columnFilter:a=(()=>!0),columnSorting:i=(()=>0),...l}=e,{types:s}=o,c=n.useMemo((()=>window.navigator.userAgent.includes("Firefox")?o.data.slice(0,1e4):o.data),[o.data]),u=o.data.length!==c.length,{translate:d}=_m(),{currentFormats:p,getAvailableKeys:m,getFormatter:g,getFormatterKey:f,setFormat:h}=Vh(t.measures),b=n.useMemo((()=>Object.values(s).filter(a).sort(i).map((e=>{const{entity:t,label:n,localeLabel:r,valueType:o}=e,a="number"===o,i=f(n)||(a?"Decimal":"identity"),l=g(i);return{entity:t,header:r,formatter:l,formatterKey:i,isNumeric:a,id:n,dataType:o,accessorFn:e=>e[n],Cell:a?({cell:e})=>l(e.getValue()):({renderedCellValue:e})=>e,mantineTableBodyCellProps:{align:a?"right":"left"}}}))),[p,c,s]),v=n.useMemo((()=>({enableBottomToolbar:u,enableColumnFilterModes:!0,enableColumnResizing:!0,enableDensityToggle:!1,enableFilterMatchHighlighting:!0,enableGlobalFilter:!0,enablePagination:!1,enableRowNumbers:!0,enableRowVirtualization:!0,globalFilterFn:"contains",initialState:{density:"xs"},mantineBottomToolbarProps:{id:"query-results-table-view-footer"},mantineTableProps:{sx:{"& td":{padding:"7px 10px!important"}},withColumnBorders:!0},mantinePaperProps:{id:"query-results-table-view",withBorder:!1,sx:e=>({height:"100%",display:"flex",flexFlow:"column nowrap",padding:"0 ".concat(e.spacing.sm),[e.fn.largerThan("md")]:{padding:0}})},mantineTableContainerProps:{id:"query-results-table-view-table",h:{base:"auto",md:0},sx:{flex:"1 1 auto"}},mantineTopToolbarProps:{id:"query-results-table-view-toolbar",sx:{flex:"0 0 auto"}},renderBottomToolbar(){const[e,t]=n.useState(u);return e?r.createElement(L,{icon:r.createElement(mt,{size:"1rem"}),color:"yellow",withCloseButton:!0,onClose:()=>t(!1)},d("table_view.slicedresult")):null},renderColumnActionsMenuItems({column:e}){const t=e.columnDef||{};return t.isNumeric?r.createElement(r.Fragment,null,r.createElement(M.Label,null,d("table_view.numeral_format")),m(t.id).map((e=>r.createElement(M.Item,{key:e,icon:t.formatterKey===e?r.createElement(Ft,null):r.createElement(At,null),onClick:()=>h(t.id,e)},g(e)(12345.678))))):null},rowVirtualizerProps:{measureElement:()=>37}})),[u]),y=dp({...v,...l,columns:b,data:c});return r.createElement(rm,{table:y})}function Qh(e){const{dataLocale:t="en",defaultOpenParams:o="measures",height:a="100vh",previewLimit:i=50,rowLimit:l=0,withinMantineProvider:s=!0,withinReduxProvider:c=!1,withMultiQuery:u=!1}=e,d=n.useMemo((()=>t.toString().split(",")),[t]),p=n.useMemo((()=>e.panels||[{key:"table",label:"table_view.tab_label",component:Xh},{key:"pivot",label:"pivot_view.tab_label",component:Wh},{key:"debug",label:"debug_view.tab_label",component:Im}]),[e.panels]),m=c?n.useMemo(tf,[]):na(),g=n.useMemo((()=>function(e,t){if("function"==typeof e)return Fr(e,t);if("object"!=typeof e||null===e)throw new Error(kr(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=Fr(o,t))}return n}(kf,m.dispatch)),[]);n.useMemo((()=>{m.dispatch(((e,t,n)=>{n.previewLimit=i,n.rowLimit=l}))}),[i,l]);let f=r.createElement(cf,{actions:g,defaultMembersFilter:e.defaultMembersFilter,formatters:e.formatters,previewLimit:i,rowLimit:l,withPermalink:e.withPermalink},r.createElement(Om,{defaultLocale:e.uiLocale,translations:e.translations},r.createElement(Ah,{dataLocale:d,defaultOpenParams:o,height:a,panels:p,source:e.source,splash:e.splash,uiLocale:e.uiLocale,withMultiQuery:u})));return s&&(f=r.createElement(ce,{withNormalizeCSS:!0},f)),c&&(f=r.createElement(Co,{store:m},f)),f}Xh.displayName="TesseractExplorer:TableView",Qh.defaultProps={version:"2.0.0-alpha.17"},Qh.displayName="TesseractExplorer";var Zh=f;Gh=Zh.createRoot,Zh.hydrateRoot;null==(e=document.querySelector("p#warning"))||e.remove();const Jh=document.getElementById("app");Jh&&function(e){const t=n.lazy((()=>fe((()=>import("./vizbuilder-f4715974.js")),["./vizbuilder-f4715974.js","./extras-2ba1cc58.js"],import.meta.url)));Gh(e).render(r.createElement(Qh,{uiLocale:"en",dataLocale:"en",previewLimit:100,panels:[{key:"table",label:"Data Table",component:Xh},{key:"matrix",label:"Pivot Table",component:Wh},{key:"debug",label:"Raw response",component:Im},{key:"vizbuilder",label:"Vizbuilder",component:t}],source:{url:"/tesseract/"},withinMantineProvider:!0,withinReduxProvider:!0,withPermalink:!0}))}(Jh);export{Ol as A,is as C,Fl as D,nt as P,Rm as T,t as __vite_legacy_guard,fm as a,gm as b,pt as c,ym as d,am as e,sm as f,Cm as g,_m as h,Cn as t,uf as u}; diff --git a/explorer/assets/index-legacy-229ca80c.js b/explorer/assets/index-legacy-229ca80c.js new file mode 100644 index 0000000..9d7eb9c --- /dev/null +++ b/explorer/assets/index-legacy-229ca80c.js @@ -0,0 +1,115 @@ +System.register(["./extras-legacy-436a21b2.js"],(function(e,t){"use strict";var n,r,o,a,i,l,s,u,c,d,p,m,g,f,h,b,v,y,w,x,S,C,E,k,_,R,O,I,P,F,j,M,A,T,N,L,D,z,$,B,V,U,G,H,q,W,K,Y,X,Q,Z,J,ee,te,ne,re,oe,ae,ie,le,se,ue,ce,de,pe,me;return{setters:[e=>{n=e.r,r=e.R,o=e.c,a=e.a,i=e.u,l=e.b,s=e.d,u=e.S,c=e.B,d=e.T,p=e.A,m=e.e,g=e.g,f=e.f,h=e.h,b=e.i,v=e.j,y=e.k,w=e.l,x=e.C,S=e.U,C=e.H,E=e.m,k=e.P,_=e.n,R=e.F,O=e.L,I=e.o,P=e.p,F=e.q,j=e.s,M=e.M,A=e.t,T=e.v,N=e.w,L=e.x,D=e.y,z=e.z,$=e.D,B=e.E,V=e.G,U=e.I,G=e.J,H=e.K,q=e.N,W=e.O,K=e.Q,Y=e.V,X=e.W,Q=e.X,Z=e.Y,J=e.Z,ee=e._,te=e.$,ne=e.a0,re=e.a1,oe=e.a2,ae=e.a3,ie=e.a4,le=e.a5,se=e.a6,ue=e.a7,ce=e.a8,de=e.a9,pe=e.aa,me=e.ab}],execute:function(){var ge=document.createElement("style");ge.textContent="/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}\n",document.head.appendChild(ge),e({e:hm,f:ym,g:Am,t:Cn,u:Sf});const fe=function(e,t,n){return e()}; +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ +var he=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);C+=S.value.length,S=S.next){var E=S.value;if(t.length>e.length)return;if(!(E instanceof o)){var k,_=1;if(v){if(!(k=a(x,C,e,b))||k.index>=e.length)break;var R=k.index,O=k.index+k[0].length,I=C;for(I+=S.value.length;R>=I;)I+=(S=S.next).value.length;if(C=I-=S.value.length,S.value instanceof o)continue;for(var P=S;P!==t.tail&&(Id.reach&&(d.reach=A);var T=S.prev;if(j&&(T=s(t,T,j),C+=j.length),u(t,T,_),S=s(t,T,new o(p,h?r.tokenize(F,h):F,y,F)),M&&s(t,S,M),_>1){var N={cause:p+","+g,reach:A};i(e,t,n,S.prev,C,N),d&&N.reach>d.reach&&(d.reach=N.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o"+a.content+""},r}(),be=he;he.default=he,be.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},be.languages.markup.tag.inside["attr-value"].inside.entity=be.languages.markup.entity,be.languages.markup.doctype.inside["internal-subset"].inside=be.languages.markup,be.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(be.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:be.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:be.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},be.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(be.languages.markup.tag,"addAttribute",{value:function(e,t){be.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:be.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),be.languages.html=be.languages.markup,be.languages.mathml=be.languages.markup,be.languages.svg=be.languages.markup,be.languages.xml=be.languages.extend("markup",{}),be.languages.ssml=be.languages.xml,be.languages.atom=be.languages.xml,be.languages.rss=be.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},be.languages.c=be.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),be.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),be.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},be.languages.c.string],char:be.languages.c.char,comment:be.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:be.languages.c}}}}),be.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete be.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(be),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(be),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(be),be.languages.javascript=be.languages.extend("clike",{"class-name":[be.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),be.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,be.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:be.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:be.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:be.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:be.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:be.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),be.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:be.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),be.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),be.languages.markup&&(be.languages.markup.tag.addInlined("script","javascript"),be.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),be.languages.js=be.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(be),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(be),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(be),be.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:be.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},be.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&m(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function u(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,s(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function c(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,c={},d=s(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=o,n})).join(""),n,r),p=Object.keys(c);return i=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[i],a="string"==typeof r?r:r.content,l=a.indexOf(o);if(-1!==l){++i;var s=a.substring(0,l),d=u(c[o]),m=a.substring(l+o.length),g=[];if(s&&g.push(s),g.push(d),m){var f=[m];e(f),g.push.apply(g,f)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(be),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(o);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&l(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(be),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(be),be.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},be.languages.go=be.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),be.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete be.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=a[o],d=n.tokenStack[c],p="string"==typeof u?u:u.content,m=t(r,c),g=p.indexOf(m);if(g>-1){++o;var f=p.substring(0,g),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(g+m.length),v=[];f&&v.push.apply(v,i([f])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof u?l.splice.apply(l,[s,1].concat(v)):u.content=v}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(be),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(be),be.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},be.languages.webmanifest=be.languages.json,be.languages.less=be.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),be.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),be.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},be.languages.objectivec=be.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete be.languages.objectivec["class-name"],be.languages.objc=be.languages.objectivec,be.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},be.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},be.languages.python["string-interpolation"].inside.interpolation.inside.rest=be.languages.python,be.languages.py=be.languages.python,be.languages.reason=be.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),be.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete be.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(be),be.languages.scss=be.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),be.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),be.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),be.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),be.languages.scss.atrule.inside.rest=be.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(be),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(be),be.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};var ve={Prism:be,theme:{plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]}};function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(){return we=Object.assign||function(e){for(var t=1;t0&&e[n-1]===t?e:e.concat(t)};function Ee(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var ke=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),ye(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=we({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=we({},n,{backgroundColor:null}),o}(e.theme,e.language):void 0;return t.themeDict=n})),ye(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,a=we({},Ee(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),i=t.getThemeDict(t.props);return void 0!==i&&(a.style=i.plain),void 0!==o&&(a.style=void 0!==a.style?we({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a})),ye(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return a[n[0]];var i=r?{display:"inline-block"}:{},l=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[i].concat(l))}})),ye(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,a=e.token,i=we({},Ee(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==o&&(i.style=void 0!==i.style?we({},i.style,o):o),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),ye(this,"tokenize",(function(e,t,n,r){var o={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",o);var a=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,a=this.getThemeDict(this.props),i=t.languages[n],l=function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],a=0,i=0,l=[],s=[l];i>-1;){for(;(a=r[i]++)0?c:["plain"],u=d):(c=Ce(c,d.type),d.alias&&(c=Ce(c,d.alias)),u=d.content),"string"==typeof u){var p=u.split(xe),m=p.length;l.push({types:c,content:p[0]});for(var g=1;g({scrollArea:{},root:{position:"relative"},code:{boxSizing:"border-box",position:"relative",fontFamily:e.fontFamilyMonospace,lineHeight:1.7,fontSize:a(13),overflowX:n?"auto":void 0,borderRadius:e.fn.radius(o),padding:`${e.spacing.sm} 0`,"&.mantine-Prism-code":{marginTop:0,marginBottom:0}},copy:{position:"absolute",top:e.spacing.xs,right:"ltr"===e.dir?e.spacing.xs:"unset",left:"rtl"===e.dir?e.spacing.xs:"unset",zIndex:2,"&, &:hover":{backgroundColor:"dark"===t?e.colors.dark[8]:e.colors.gray[0]}},line:{display:"flex",width:"100%",padding:`0 ${e.spacing.md}`},lineNumber:{color:"dark"===t?e.colors.dark[4]:e.colors.gray[4],textAlign:"right",width:`calc(8 * ${a(r)})`,marginRight:"ltr"===e.dir?e.spacing.xs:void 0,marginLeft:"rtl"===e.dir?e.spacing.xs:void 0,userSelect:"none"},lineContent:{width:"100%"}})));const Ie=Oe;var Pe=Object.defineProperty,Fe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ne=(e,t,n)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Le=(e,t)=>{for(var n in t||(t={}))Ae.call(t,n)&&Ne(e,n,t[n]);if(Me)for(var n of Me(t))Te.call(t,n)&&Ne(e,n,t[n]);return e},De=(e,t)=>Fe(e,je(t));const ze={noCopy:!1,copyLabel:"Copy code",copiedLabel:"Copied",withLineNumbers:!1,trim:!0,highlightLines:{},scrollAreaComponent:u,getPrismTheme:(e,t)=>"dark"===t?(e=>({plain:{color:e.colors.gray[4],backgroundColor:e.colors.dark[8]},styles:[{types:["comment"],style:{color:e.colors.gray[6]}},{types:["string","inserted","selector","atrule"],style:{color:e.colors.teal[4]}},{types:["number"],style:{color:e.colors.blue[4]}},{types:["builtin","char","constant","function"],style:{color:e.colors.orange[5]}},{types:["punctuation"],style:{color:e.colors.gray[5]}},{types:["variable"],style:{color:e.colors.gray[5]}},{types:["class-name","attr-name"],style:{color:e.colors.yellow[5]}},{types:["tag","deleted"],style:{color:e.colors.red[6]}},{types:["operator"],style:{color:e.colors.gray[5]}},{types:["boolean"],style:{color:e.colors.red[6]}},{types:["keyword"],style:{color:e.colors.indigo[3]}},{types:["doctype"],style:{color:e.colors.gray[5]}},{types:["url"],style:{color:e.colors.gray[5]}}]}))(e):(e=>({plain:{color:e.colors.gray[9],backgroundColor:e.fn.rgba(e.colors.gray[0],.65)},styles:[{types:["comment"],style:{color:e.colors.gray[6]}},{types:["string","inserted"],style:{color:e.colors.indigo[9]}},{types:["number"],style:{color:e.colors.blue[7]}},{types:["builtin","char","constant","function","selector","atrule"],style:{color:e.colors.lime[9]}},{types:["punctuation"],style:{color:e.colors.gray[7]}},{types:["variable"],style:{color:e.colors.violet[9]}},{types:["attr-name"],style:{color:e.colors.green[9]}},{types:["class-name"],style:{color:e.colors.red[9]}},{types:["tag","deleted"],style:{color:e.colors.violet[9]}},{types:["operator"],style:{color:e.colors.red[9]}},{types:["boolean"],style:{color:e.colors.red[9]}},{types:["keyword"],style:{color:e.colors.red[9]}},{types:["doctype"],style:{color:e.colors.gray[7]}},{types:["url"],style:{color:e.colors.gray[7]}}]}))(e)},$e=n.forwardRef(((e,t)=>{const n=i("Prism",ze,e),{className:o,children:a,language:m,noCopy:g,classNames:f,styles:h,copyLabel:b,copiedLabel:v,withLineNumbers:y,highlightLines:w,scrollAreaComponent:x,colorScheme:S,trim:C,unstyled:E,radius:k,getPrismTheme:_,variant:R}=n,O=((e,t)=>{var n={};for(var r in e)Ae.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Me)for(var r of Me(e))t.indexOf(r)<0&&Te.call(e,r)&&(n[r]=e[r]);return n})(n,["className","children","language","noCopy","classNames","styles","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","colorScheme","trim","unstyled","radius","getPrismTheme","variant"]),I=C&&"string"==typeof a?a.trim():a,P=I.split("\n").length.toString().length,F=l(),j=s(),M=S||F.colorScheme,{classes:A,cx:T}=Ie({colorScheme:M,native:x!==u,maxLineSize:P,radius:k},{name:"Prism",classNames:f,styles:h,unstyled:E,variant:R});return r.createElement(c,De(Le({className:T(A.root,o),ref:t},O),{translate:"no"}),!g&&r.createElement(d,{label:j.copied?v:b,position:"left",withArrow:!0,arrowSize:6,offset:6,color:j.copied?"teal":void 0,unstyled:E},r.createElement(p,{className:A.copy,"aria-label":j.copied?v:b,onClick:()=>j.copy(I),unstyled:E},r.createElement(Re,{copied:j.copied}))),r.createElement(_e,De(Le({},ve),{theme:_(F,M),code:I,language:m}),(({className:e,style:t,tokens:n,getLineProps:o,getTokenProps:a})=>r.createElement(x,{className:A.scrollArea,dir:"ltr"},r.createElement("pre",{className:T(A.code,e),style:t,dir:"ltr"},n.map(((e,t)=>{var i,l,s,u;if(t===n.length-1&&1===e.length&&"\n"===e[0].content)return null;const c=t+1,d=o({line:e,key:t}),p=c in w,m="dark"===M?F.fn.rgba(F.fn.themeColor(null==(i=w[c])?void 0:i.color,9),.25):F.fn.themeColor(null==(l=w[c])?void 0:l.color,0);return r.createElement("div",De(Le({},d),{className:T(A.line,d.className),style:Le({},p?{backgroundColor:m}:null)}),y&&r.createElement("div",{className:A.lineNumber,style:{color:p?F.fn.themeColor(null==(s=w[c])?void 0:s.color,"dark"===M?5:8):void 0}},(null==(u=w[c])?void 0:u.label)||c),r.createElement("div",{className:A.lineContent},e.map(((e,t)=>{var n,o;const i=a({token:e,key:t});return r.createElement("span",De(Le({},i),{style:De(Le({},i.style),{color:p?F.fn.themeColor(null==(n=w[c])?void 0:n.color,"dark"===M?5:8):null==(o=null==i?void 0:i.style)?void 0:o.color})}))}))))})).filter(Boolean))))))}));$e.displayName="@mantine/prism/Prism";var Be=o(((e,{radius:t})=>({tab:{paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,height:a(34),border:`${a(1)} solid ${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[3]}`,borderBottom:0,fontSize:e.fontSizes.sm,color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[7],backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,borderRadius:0,"&:first-of-type":{borderTopLeftRadius:e.radius.sm},"&:not(:first-of-type)":{borderLeft:0},"&:last-of-type":{borderTopRightRadius:e.radius.sm},"&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0]},"&[data-active]":{color:"dark"===e.colorScheme?e.white:e.black,backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.fn.rgba(e.colors.gray[0],.65),"&::before":{backgroundColor:"transparent"}}},prism:{borderRadius:e.fn.radius(t),borderTopRightRadius:0,borderTopLeftRadius:0,border:`${a(1)} solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`,borderTop:0,overflow:"hidden"},code:{borderTopRightRadius:0,borderTopLeftRadius:0,border:0}})));const Ve=Be;var Ue=Object.defineProperty,Ge=Object.defineProperties,He=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,Ye=(e,t,n)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t)=>{for(var n in t||(t={}))We.call(t,n)&&Ye(e,n,t[n]);if(qe)for(var n of qe(t))Ke.call(t,n)&&Ye(e,n,t[n]);return e};const Qe=$e;Qe.Tabs=function(e){const{classes:t}=Ve({radius:e.radius});return r.createElement(m,((e,t)=>Ge(e,He(t)))(Xe({},e),{variant:"outline",classNames:{tab:t.tab},translate:"no"}))},Qe.Tab=m.Tab,Qe.TabsList=m.List,Qe.Panel=function(e){var t=e,{language:n,children:o,radius:a,noCopy:i,copyLabel:l,copiedLabel:s,withLineNumbers:u,highlightLines:c,scrollAreaComponent:d,trim:p,getPrismTheme:g,colorScheme:f,variant:h}=t,b=((e,t)=>{var n={};for(var r in e)We.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&qe)for(var r of qe(e))t.indexOf(r)<0&&Ke.call(e,r)&&(n[r]=e[r]);return n})(t,["language","children","radius","noCopy","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","trim","getPrismTheme","colorScheme","variant"]);const{classes:v}=Ve({radius:a});return r.createElement(m.Panel,Xe({},b),r.createElement($e,{language:n,classNames:{root:v.prism,code:v.code},radius:a,noCopy:i,copyLabel:l,copiedLabel:s,withLineNumbers:u,highlightLines:c,scrollAreaComponent:d,trim:p,getPrismTheme:g,colorScheme:f,variant:h},o))};var Ze={exports:{}};function Je(){}function et(){}et.resetWarningCache=Je,Ze.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:et,resetWarningCache:Je};return n.PropTypes=n,n}();var tt=Ze.exports;const nt=e("P",g(tt));var rt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ot=Object.defineProperty,at=Object.defineProperties,it=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ct=(e,t,n)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dt=(e,t)=>{for(var n in t||(t={}))st.call(t,n)&&ct(e,n,t[n]);if(lt)for(var n of lt(t))ut.call(t,n)&&ct(e,n,t[n]);return e},pt=e("c",((e,t,r)=>{const o=n.forwardRef(((t,o)=>{var a=t,{color:i="currentColor",size:l=24,stroke:s=2,children:u}=a,c=((e,t)=>{var n={};for(var r in e)st.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&<)for(var r of lt(e))t.indexOf(r)<0&&ut.call(e,r)&&(n[r]=e[r]);return n})(a,["color","size","stroke","children"]);return n.createElement("svg",dt(((e,t)=>at(e,it(t)))(dt({ref:o},rt),{width:l,height:l,stroke:i,strokeWidth:s,className:`tabler-icon tabler-icon-${e}`}),c),[...r.map((([e,t])=>n.createElement(e,t))),...u||[]])}));return o.propTypes={color:nt.string,size:nt.oneOfType([nt.string,nt.number]),stroke:nt.oneOfType([nt.string,nt.number])},o.displayName=`${t}`,o})),mt=pt("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),gt=pt("alert-triangle-filled","IconAlertTriangleFilled",[["path",{d:"M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),ft=pt("alert-triangle","IconAlertTriangle",[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),ht=pt("arrow-autofit-content","IconArrowAutofitContent",[["path",{d:"M6 4l-3 3l3 3",key:"svg-0"}],["path",{d:"M18 4l3 3l-3 3",key:"svg-1"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M10 7h-7",key:"svg-3"}],["path",{d:"M21 7h-7",key:"svg-4"}]]),bt=pt("arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]),vt=pt("baseline-density-large","IconBaselineDensityLarge",[["path",{d:"M4 4h16",key:"svg-0"}],["path",{d:"M4 20h16",key:"svg-1"}]]),yt=pt("baseline-density-medium","IconBaselineDensityMedium",[["path",{d:"M4 20h16",key:"svg-0"}],["path",{d:"M4 12h16",key:"svg-1"}],["path",{d:"M4 4h16",key:"svg-2"}]]),wt=pt("baseline-density-small","IconBaselineDensitySmall",[["path",{d:"M4 3h16",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M4 15h16",key:"svg-2"}],["path",{d:"M4 21h16",key:"svg-3"}]]),xt=pt("box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]),St=pt("box","IconBox",[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]]),Ct=pt("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),Et=pt("chevron-left-pipe","IconChevronLeftPipe",[["path",{d:"M7 6v12",key:"svg-0"}],["path",{d:"M18 6l-6 6l6 6",key:"svg-1"}]]),kt=pt("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),_t=pt("chevron-right-pipe","IconChevronRightPipe",[["path",{d:"M6 6l6 6l-6 6",key:"svg-0"}],["path",{d:"M17 5v13",key:"svg-1"}]]),Rt=pt("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),Ot=pt("chevrons-down","IconChevronsDown",[["path",{d:"M7 7l5 5l5 -5",key:"svg-0"}],["path",{d:"M7 13l5 5l5 -5",key:"svg-1"}]]),It=pt("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),Pt=pt("chevrons-right","IconChevronsRight",[["path",{d:"M7 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M13 7l5 5l-5 5",key:"svg-1"}]]),Ft=pt("circle-check","IconCircleCheck",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),jt=pt("circle-plus","IconCirclePlus",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]]),Mt=pt("circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]),At=pt("circle","IconCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}]]),Tt=pt("clear-all","IconClearAll",[["path",{d:"M8 6h12",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M4 18h12",key:"svg-2"}]]),Nt=pt("clipboard","IconClipboard",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}]]),Lt=pt("columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]),Dt=pt("database","IconDatabase",[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]]),zt=pt("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),$t=pt("dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Bt=pt("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Vt=pt("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),Ut=pt("external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]),Gt=pt("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),Ht=pt("filter-cog","IconFilterCog",[["path",{d:"M12 20l-3 1v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19.001 15.5v1.5",key:"svg-2"}],["path",{d:"M19.001 21v1.5",key:"svg-3"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-4"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-5"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-6"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-7"}]]),qt=pt("filter-off","IconFilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),Wt=pt("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]),Kt=pt("forms","IconForms",[["path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",key:"svg-0"}],["path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",key:"svg-1"}],["path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",key:"svg-2"}],["path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",key:"svg-3"}],["path",{d:"M17 12h.01",key:"svg-4"}],["path",{d:"M13 12h.01",key:"svg-5"}]]),Yt=pt("grip-horizontal","IconGripHorizontal",[["path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),Xt=pt("info-circle-filled","IconInfoCircleFilled",[["path",{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),Qt=pt("list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]),Zt=pt("maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),Jt=pt("minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),en=pt("pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]),tn=pt("pinned","IconPinned",[["path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6",key:"svg-0"}],["path",{d:"M12 16l0 5",key:"svg-1"}],["path",{d:"M8 4l8 0",key:"svg-2"}]]),nn=pt("refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]),rn=pt("row-insert-bottom","IconRowInsertBottom",[["path",{d:"M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1z",key:"svg-0"}],["path",{d:"M12 15l0 4",key:"svg-1"}],["path",{d:"M14 17l-4 0",key:"svg-2"}]]),on=pt("search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),an=pt("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),ln=pt("sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),sn=pt("sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),un=pt("stack-2","IconStack2",[["path",{d:"M12 4l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 12l8 4l8 -4",key:"svg-1"}],["path",{d:"M4 16l8 4l8 -4",key:"svg-2"}]]),cn=pt("stack-3","IconStack3",[["path",{d:"M12 2l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 10l8 4l8 -4",key:"svg-1"}],["path",{d:"M4 18l8 4l8 -4",key:"svg-2"}],["path",{d:"M4 14l8 4l8 -4",key:"svg-3"}]]),dn=pt("stack","IconStack",[["path",{d:"M12 6l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 14l8 4l8 -4",key:"svg-1"}]]),pn=pt("trash-x","IconTrashX",[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]]),mn=pt("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),gn=pt("window-maximize","IconWindowMaximize",[["path",{d:"M3 16m0 1a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6",key:"svg-1"}],["path",{d:"M12 8h4v4",key:"svg-2"}],["path",{d:"M16 8l-5 5",key:"svg-3"}]]),fn=pt("window-minimize","IconWindowMinimize",[["path",{d:"M3 16m0 1a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6",key:"svg-1"}],["path",{d:"M15 13h-4v-4",key:"svg-2"}],["path",{d:"M11 13l5 -5",key:"svg-3"}]]),hn=pt("world","IconWorld",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]]),bn=pt("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function vn(e,t){return null!=e&&t in Object(e)}function yn(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map((function(e){if("constructor"===e||"__proto__"===e||"prototype"===e)return{};var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,"$1")}}))}function wn(e,t,n){var r=e,o=null;n=void 0===n?t.length:n;for(var a=0;a1?wn(e,n,n.length-1):e,name:r.p||r.i,value:wn(e,n)};return o.exists=vn(o.parent,o.name),o}var Sn={hasProperty:vn,getPathInfo:xn,getPathValue:function(e,t){return xn(e,t).value},setPathValue:function(e,t,n){return function(e,t,n){for(var r=e,o=n.length,a=null,i=0;i{const{translations:t={}}=e,n=t[a]||r;if(null==n)throw new Error(`Translation dictionary for locale "${a}" not provided.`);const o=Object.freeze(Object.keys(t)),l=function(e){const t=(e,t)=>{const n=t?t.n:void 0;if(null!=n){const{name:t,parent:r}=e;if(0==n&&Sn.hasProperty(r,`${t}_zero`))return r[`${t}_zero`];if((n>1||n<1)&&Sn.hasProperty(r,`${t}_plural`))return r[`${t}_plural`]}return e.value},n=/{{1,2}(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}{1,2}/gi;return(r,o)=>{const a=Sn.getPathInfo(e,r),i=a.exists?t(a,o):r;return o?`${i}`.replace(n,((e,t)=>`${o[t]??""}`)):i}}(n);return{availableLocale:o,locale:a,setLocale:i,t:l,translate:l}}),[a]);return n.createElement(o.Provider,{value:l},e.children)},TranslationConsumer:e=>n.createElement(o.Consumer,void 0,(t=>{if(void 0===t)throw new Error("TranslationConsumer must be used within a TranslationProvider.");return e.children(t)})),useTranslation:a,withTranslation(e){const t=t=>{const r=a();return n.createElement(e,{...r,...t},t.children)};return t.displayName=`${e.displayName||e.name}WithTranslation`,t}}}function En(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:jn(e)?2:Mn(e)?3:0}function In(e,t){return 2===On(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n){var r=On(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Fn(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function jn(e){return ir&&e instanceof Map}function Mn(e){return lr&&e instanceof Set}function An(e){return e.o||e.t}function Tn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=gr(e);delete t[dr];for(var n=mr(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Ln),Object.freeze(e),t&&Rn(e,(function(e,t){return Nn(t,!0)}),!0)),e}function Ln(){En(2)}function Dn(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function zn(e){var t=fr[e];return t||En(18,e),t}function $n(){return or}function Bn(e,t){t&&(zn("Patches"),e.u=[],e.s=[],e.v=t)}function Vn(e){Un(e),e.p.forEach(Hn),e.p=null}function Un(e){e===or&&(or=e.l)}function Gn(e){return or={p:[],l:or,h:e,m:!0,_:0}}function Hn(e){var t=e[dr];0===t.i||1===t.i?t.j():t.g=!0}function qn(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||zn("ES5").S(t,e,r),r?(n[dr].P&&(Vn(t),En(4)),_n(e)&&(e=Wn(t,e),t.l||Yn(t,e)),t.u&&zn("Patches").M(n[dr].t,e,t.u,t.s)):e=Wn(t,n,[]),Vn(t),t.u&&t.v(t.u,t.s),e!==ur?e:void 0}function Wn(e,t,n){if(Dn(t))return t;var r=t[dr];if(!r)return Rn(t,(function(o,a){return Kn(e,r,t,o,a,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Yn(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=Tn(r.k):r.o,a=o,i=!1;3===r.i&&(a=new Set(o),o.clear(),i=!0),Rn(a,(function(t,a){return Kn(e,r,o,t,a,n,i)})),Yn(e,o,!1),n&&e.u&&zn("Patches").N(r,n,e.u,e.s)}return r.o}function Kn(e,t,n,r,o,a,i){if(kn(o)){var l=Wn(e,o,a&&t&&3!==t.i&&!In(t.R,r)?a.concat(r):void 0);if(Pn(n,r,l),!kn(l))return;e.m=!1}else i&&n.add(o);if(_n(o)&&!Dn(o)){if(!e.h.D&&e._<1)return;Wn(e,o),t&&t.A.l||Yn(e,o)}}function Yn(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&Nn(t,n)}function Xn(e,t){var n=e[dr];return(n?An(n):e)[t]}function Qn(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Zn(e){e.P||(e.P=!0,e.l&&Zn(e.l))}function Jn(e){e.o||(e.o=Tn(e.t))}function er(e,t,n){var r=jn(t)?zn("MapSet").F(t,n):Mn(t)?zn("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:$n(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,a=hr;n&&(o=[r],a=br);var i=Proxy.revocable(o,a),l=i.revoke,s=i.proxy;return r.k=s,r.j=l,s}(t,n):zn("ES5").J(t,n);return(n?n.A:$n()).p.push(r),r}function tr(e){return kn(e)||En(22,e),function e(t){if(!_n(t))return t;var n,r=t[dr],o=On(t);if(r){if(!r.P&&(r.i<4||!zn("ES5").K(r)))return r.t;r.I=!0,n=nr(t,o),r.I=!1}else n=nr(t,o);return Rn(n,(function(t,o){r&&function(e,t){return 2===On(e)?e.get(t):e[t]}(r.t,t)===o||Pn(n,t,e(o))})),3===o?new Set(n):n}(e)}function nr(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Tn(e)}var rr,or,ar="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ir="undefined"!=typeof Map,lr="undefined"!=typeof Set,sr="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ur=ar?Symbol.for("immer-nothing"):((rr={})["immer-nothing"]=!0,rr),cr=ar?Symbol.for("immer-draftable"):"__$immer_draftable",dr=ar?Symbol.for("immer-state"):"__$immer_state",pr=""+Object.prototype.constructor,mr="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,gr=Object.getOwnPropertyDescriptors||function(e){var t={};return mr(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},fr={},hr={get:function(e,t){if(t===dr)return e;var n=An(e);if(!In(n,t))return function(e,t,n){var r,o=Qn(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!_n(r)?r:r===Xn(e.t,t)?(Jn(e),e.o[t]=er(e.A.h,r,e)):r},has:function(e,t){return t in An(e)},ownKeys:function(e){return Reflect.ownKeys(An(e))},set:function(e,t,n){var r=Qn(An(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Xn(An(e),t),a=null==o?void 0:o[dr];if(a&&a.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Fn(n,o)&&(void 0!==n||In(e.t,t)))return!0;Jn(e),Zn(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==Xn(e.t,t)||t in e.t?(e.R[t]=!1,Jn(e),Zn(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=An(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){En(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){En(12)}},br={};Rn(hr,(function(e,t){br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),br.deleteProperty=function(e,t){return br.set.call(this,e,t,void 0)},br.set=function(e,t,n){return hr.set.call(this,e[0],t,n,e[0])};var vr=function(){function e(e){var t=this;this.O=sr,this.D=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,i=Array(r>1?r-1:0),l=1;l1?r-1:0),a=1;a=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=zn("Patches").$;return kn(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),yr=new vr,wr=yr.produce;function xr(e){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(e)}function Sr(e){var t=function(e,t){if("object"!=xr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xr(t)?t:t+""}function Cr(e,t,n){return(t=Sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kr(e){for(var t=1;t-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return Tr}return{get:r,put:function(t,o){r(t)===Tr&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(i,s);function c(){var t=u.get(arguments);if(t===Tr){if(t=e.apply(null,arguments),l){var n=u.getEntries().find((function(e){return l(e.value,t)}));n&&(t=n.value)}u.put(arguments,t)}return t}return c.clearCache=function(){return u.clear()},c}function Dr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0;t--){var o=e[t][dr];if(!o.P)switch(o.i){case 5:r(o)&&Zn(o);break;case 4:n(o)&&Zn(o)}}}function n(e){for(var t=e.t,n=e.k,r=mr(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==dr){var i=t[a];if(void 0===i&&!In(t,a))return!0;var l=n[a],s=l&&l[dr];if(s?s.t!==i:!Fn(l,i))return!0}}var u=!!t[dr];return r.length!==mr(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r({code:e,name:ua.getName(e),nativeName:ua.getNativeName(e)})))}static getName(e){return ua.validate(e)?sa[e].name:""}static getAllNames(){return Object.values(sa).map((e=>e.name))}static getNativeName(e){return ua.validate(e)?sa[e].nativeName:""}static getAllNativeNames(){return Object.values(sa).map((e=>e.nativeName))}static getCode(e){return Object.keys(sa).find((t=>{const n=sa[t];return n.name.toLowerCase()===e.toLowerCase()||n.nativeName.toLowerCase()===e.toLowerCase()}))||""}static getAllCodes(){return Object.keys(sa)}static validate(e){return sa.hasOwnProperty(e)}}const ca=(e,t={})=>{const{sorted:n,ignorenull:r,ignoreEmptyArray:o,useDot:a,skipIndex:i,skipBracket:l,whitespace:s="+"}=t,u=e=>String(e).replace(/[^ !'()~*]/gu,encodeURIComponent).replace(/ /g,s).replace(/[!'()~*]/g,(e=>`%${e.charCodeAt().toString(16).slice(-2).toUpperCase()}`)),c=(e,t=Object.keys(e))=>n?t.sort():t,d=e=>e.filter((e=>e)).join("&"),p=(e,t,n=typeof t,s=null)=>(t===s?s=r?s:u(e)+"="+s:/string|number|boolean/.test(n)?s=u(e)+"="+u(t):Array.isArray(t)?s=((e,t,n=(l?"":"[]"))=>t.length?d(t.map(((t,r)=>p(i?e+n:e+"["+r+"]",t)))):o?null:u(e+n))(e,t):t instanceof Set?s=((e,t)=>d(Array.from(t).map((t=>p(e,t)))))(e,t):"object"===n&&(s=((e,t)=>d(c(t).map((n=>p(a?`${e}.${n}`:`${e}[${n}]`,t[n])))))(e,t)),s);return e&&d(c(e).map((t=>p(t,e[t]))))};function da(e,t){return function(){return e.apply(t,arguments)}}const{toString:pa}=Object.prototype,{getPrototypeOf:ma}=Object,ga=(fa=Object.create(null),e=>{const t=pa.call(e);return fa[t]||(fa[t]=t.slice(8,-1).toLowerCase())});var fa;const ha=e=>(e=e.toLowerCase(),t=>ga(t)===e),ba=e=>t=>typeof t===e,{isArray:va}=Array,ya=ba("undefined"),wa=ha("ArrayBuffer"),xa=ba("string"),Sa=ba("function"),Ca=ba("number"),Ea=e=>null!==e&&"object"==typeof e,ka=e=>{if("object"!==ga(e))return!1;const t=ma(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},_a=ha("Date"),Ra=ha("File"),Oa=ha("Blob"),Ia=ha("FileList"),Pa=ha("URLSearchParams"),[Fa,ja,Ma,Aa]=["ReadableStream","Request","Response","Headers"].map(ha);function Ta(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),va(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const La="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Da=e=>!ya(e)&&e!==La,za=($a="undefined"!=typeof Uint8Array&&ma(Uint8Array),e=>$a&&e instanceof $a);var $a;const Ba=ha("HTMLFormElement"),Va=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ua=ha("RegExp"),Ga=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ta(n,((n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},Ha="abcdefghijklmnopqrstuvwxyz",qa="0123456789",Wa={DIGIT:qa,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+qa},Ka=ha("AsyncFunction"),Ya={isArray:va,isArrayBuffer:wa,isBuffer:function(e){return null!==e&&!ya(e)&&null!==e.constructor&&!ya(e.constructor)&&Sa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Sa(e.append)&&("formdata"===(t=ga(e))||"object"===t&&Sa(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&wa(e.buffer),t},isString:xa,isNumber:Ca,isBoolean:e=>!0===e||!1===e,isObject:Ea,isPlainObject:ka,isReadableStream:Fa,isRequest:ja,isResponse:Ma,isHeaders:Aa,isUndefined:ya,isDate:_a,isFile:Ra,isBlob:Oa,isRegExp:Ua,isFunction:Sa,isStream:e=>Ea(e)&&Sa(e.pipe),isURLSearchParams:Pa,isTypedArray:za,isFileList:Ia,forEach:Ta,merge:function e(){const{caseless:t}=Da(this)&&this||{},n={},r=(r,o)=>{const a=t&&Na(n,o)||o;ka(n[a])&&ka(r)?n[a]=e(n[a],r):ka(r)?n[a]=e({},r):va(r)?n[a]=r.slice():n[a]=r};for(let o=0,a=arguments.length;o(Ta(t,((t,r)=>{n&&Sa(t)?e[r]=da(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&ma(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ga,kindOfTest:ha,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(va(e))return e;let t=e.length;if(!Ca(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Ba,hasOwnProperty:Va,hasOwnProp:Va,reduceDescriptors:Ga,freezeMethods:e=>{Ga(e,((t,n)=>{if(Sa(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Sa(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return va(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Na,global:La,isContextDefined:Da,ALPHABET:Wa,generateString:(e=16,t=Wa.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Sa(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ea(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=va(e)?[]:{};return Ta(e,((e,t)=>{const a=n(e,r+1);!ya(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Ka,isThenable:e=>e&&(Ea(e)||Sa(e))&&Sa(e.then)&&Sa(e.catch)};function Xa(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Ya.inherits(Xa,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ya.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Qa=Xa.prototype,Za={};function Ja(e){return Ya.isPlainObject(e)||Ya.isArray(e)}function ei(e){return Ya.endsWith(e,"[]")?e.slice(0,-2):e}function ti(e,t,n){return e?e.concat(t).map((function(e,t){return e=ei(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Za[e]={value:e}})),Object.defineProperties(Xa,Za),Object.defineProperty(Qa,"isAxiosError",{value:!0}),Xa.from=(e,t,n,r,o,a)=>{const i=Object.create(Qa);return Ya.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Xa.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const ni=Ya.toFlatObject(Ya,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ri(e,t,n){if(!Ya.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ya.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ya.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,l=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ya.isSpecCompliantForm(t);if(!Ya.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(Ya.isDate(e))return e.toISOString();if(!l&&Ya.isBlob(e))throw new Xa("Blob is not supported. Use a Buffer instead.");return Ya.isArrayBuffer(e)||Ya.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let l=e;if(e&&!o&&"object"==typeof e)if(Ya.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ya.isArray(e)&&function(e){return Ya.isArray(e)&&!e.some(Ja)}(e)||(Ya.isFileList(e)||Ya.endsWith(n,"[]"))&&(l=Ya.toArray(e)))return n=ei(n),l.forEach((function(e,r){!Ya.isUndefined(e)&&null!==e&&t.append(!0===i?ti([n],r,a):null===i?n:n+"[]",s(e))})),!1;return!!Ja(e)||(t.append(ti(o,n,a),s(e)),!1)}const c=[],d=Object.assign(ni,{defaultVisitor:u,convertValue:s,isVisitable:Ja});if(!Ya.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ya.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),Ya.forEach(n,(function(n,a){!0===(!(Ya.isUndefined(n)||null===n)&&o.call(t,n,Ya.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),c.pop()}}(e),t}function oi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ai(e,t){this._pairs=[],e&&ri(e,this,t)}const ii=ai.prototype;function li(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function si(e,t,n){if(!t)return e;const r=n&&n.encode||li,o=n&&n.serialize;let a;if(a=o?o(t,n):Ya.isURLSearchParams(t)?t.toString():new ai(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}ii.append=function(e,t){this._pairs.push([e,t])},ii.toString=function(e){const t=e?function(t){return e.call(this,t,oi)}:oi;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ui=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ya.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ci={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},di={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ai,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pi="undefined"!=typeof window&&"undefined"!=typeof document,mi=(gi="undefined"!=typeof navigator&&navigator.product,pi&&["ReactNative","NativeScript","NS"].indexOf(gi)<0);var gi;const fi="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,hi=pi&&window.location.href||"http://localhost",bi={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pi,hasStandardBrowserEnv:mi,hasStandardBrowserWebWorkerEnv:fi,origin:hi},Symbol.toStringTag,{value:"Module"})),...di};function vi(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),l=o>=e.length;return a=!a&&Ya.isArray(r)?r.length:a,l?(Ya.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i):(r[a]&&Ya.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&Ya.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r{t(function(e){return Ya.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const yi={transitional:ci,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ya.isObject(e);if(o&&Ya.isHTMLForm(e)&&(e=new FormData(e)),Ya.isFormData(e))return r?JSON.stringify(vi(e)):e;if(Ya.isArrayBuffer(e)||Ya.isBuffer(e)||Ya.isStream(e)||Ya.isFile(e)||Ya.isBlob(e)||Ya.isReadableStream(e))return e;if(Ya.isArrayBufferView(e))return e.buffer;if(Ya.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ri(e,new bi.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return bi.isNode&&Ya.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=Ya.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ri(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ya.isString(e))try{return(t||JSON.parse)(e),Ya.trim(e)}catch(Io){if("SyntaxError"!==Io.name)throw Io}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||yi.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ya.isResponse(e)||Ya.isReadableStream(e))return e;if(e&&Ya.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(Io){if(n){if("SyntaxError"===Io.name)throw Xa.from(Io,Xa.ERR_BAD_RESPONSE,this,null,this.response);throw Io}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bi.classes.FormData,Blob:bi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ya.forEach(["delete","get","head","post","put","patch"],(e=>{yi.headers[e]={}}));const wi=yi,xi=Ya.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Si=Symbol("internals");function Ci(e){return e&&String(e).trim().toLowerCase()}function Ei(e){return!1===e||null==e?e:Ya.isArray(e)?e.map(Ei):String(e)}function ki(e,t,n,r,o){return Ya.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ya.isString(t)?Ya.isString(r)?-1!==t.indexOf(r):Ya.isRegExp(r)?r.test(t):void 0:void 0)}class _i{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Ci(t);if(!o)throw new Error("header name must be a non-empty string");const a=Ya.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Ei(e))}const a=(e,t)=>Ya.forEach(e,((e,n)=>o(e,n,t)));if(Ya.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Ya.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&xi[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Ya.isHeaders(e))for(const[i,l]of e.entries())o(l,i,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Ci(e)){const n=Ya.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ya.isFunction(t))return t.call(this,e,n);if(Ya.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ci(e)){const n=Ya.findKey(this,e);return!(!n||void 0===this[n]||t&&!ki(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Ci(e)){const o=Ya.findKey(n,e);!o||t&&!ki(0,n[o],o,t)||(delete n[o],r=!0)}}return Ya.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ki(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ya.forEach(this,((r,o)=>{const a=Ya.findKey(n,o);if(a)return t[a]=Ei(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=Ei(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ya.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ya.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Si]=this[Si]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ci(e);t[r]||(function(e,t){const n=Ya.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Ya.isArray(e)?e.forEach(r):r(e),this}}_i.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ya.reduceDescriptors(_i.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ya.freezeMethods(_i);const Ri=_i;function Oi(e,t){const n=this||wi,r=t||n,o=Ri.from(r.headers);let a=r.data;return Ya.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function Ii(e){return!(!e||!e.__CANCEL__)}function Pi(e,t,n){Xa.call(this,null==e?"canceled":e,Xa.ERR_CANCELED,t,n),this.name="CanceledError"}function Fi(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Xa("Request failed with status code "+n.status,[Xa.ERR_BAD_REQUEST,Xa.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Ya.inherits(Pi,Xa,{__CANCEL__:!0});const ji=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(l){const s=Date.now(),u=r[i];o||(o=s),n[a]=l,r[a]=s;let c=i,d=0;for(;c!==a;)d+=n[c++],c%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-or)return o&&(clearTimeout(o),o=null),n=a,e.apply(null,arguments);o||(o=setTimeout((()=>(o=null,n=Date.now(),e.apply(null,arguments))),r-(a-n)))}}((n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,l=a-r,s=o(l);r=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:s||void 0,estimated:s&&i&&a<=i?(i-a)/s:void 0,event:n,lengthComputable:null!=i};u[t?"download":"upload"]=!0,e(u)}),n)},Mi=bi.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Ya.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Ai=bi.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];Ya.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Ya.isString(r)&&i.push("path="+r),Ya.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ti(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ni=e=>e instanceof Ri?{...e}:e;function Li(e,t){t=t||{};const n={};function r(e,t,n){return Ya.isPlainObject(e)&&Ya.isPlainObject(t)?Ya.merge.call({caseless:n},e,t):Ya.isPlainObject(t)?Ya.merge({},t):Ya.isArray(t)?t.slice():t}function o(e,t,n){return Ya.isUndefined(t)?Ya.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!Ya.isUndefined(t))return r(void 0,t)}function i(e,t){return Ya.isUndefined(t)?Ya.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function l(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const s={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(e,t)=>o(Ni(e),Ni(t),!0)};return Ya.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=s[r]||o,i=a(e[r],t[r],r);Ya.isUndefined(i)&&a!==l||(n[r]=i)})),n}const Di=e=>{const t=Li({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:s}=t;if(t.headers=l=Ri.from(l),t.url=si(Ti(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Ya.isFormData(r))if(bi.hasStandardBrowserEnv||bi.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(bi.hasStandardBrowserEnv&&(o&&Ya.isFunction(o)&&(o=o(t)),o||!1!==o&&Mi(t.url))){const e=a&&i&&Ai.read(i);e&&l.set(a,e)}return t},zi="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Di(e);let o=r.data;const a=Ri.from(r.headers).normalize();let i,{responseType:l}=r;function s(){r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let u=new XMLHttpRequest;function c(){if(!u)return;const r=Ri.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());Fi((function(e){t(e),s()}),(function(e){n(e),s()}),{data:l&&"text"!==l&&"json"!==l?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:e,request:u}),u=null}u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout,"onloadend"in u?u.onloadend=c:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(c)},u.onabort=function(){u&&(n(new Xa("Request aborted",Xa.ECONNABORTED,r,u)),u=null)},u.onerror=function(){n(new Xa("Network Error",Xa.ERR_NETWORK,r,u)),u=null},u.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const t=r.transitional||ci;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new Xa(e,t.clarifyTimeoutError?Xa.ETIMEDOUT:Xa.ECONNABORTED,r,u)),u=null},void 0===o&&a.setContentType(null),"setRequestHeader"in u&&Ya.forEach(a.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),Ya.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),l&&"json"!==l&&(u.responseType=r.responseType),"function"==typeof r.onDownloadProgress&&u.addEventListener("progress",ji(r.onDownloadProgress,!0)),"function"==typeof r.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",ji(r.onUploadProgress)),(r.cancelToken||r.signal)&&(i=t=>{u&&(n(!t||t.type?new Pi(null,e,u):t),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);d&&-1===bi.protocols.indexOf(d)?n(new Xa("Unsupported protocol "+d+":",Xa.ERR_BAD_REQUEST,e)):u.send(o||null)}))},$i=(e,t)=>{let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Xa?t:new Pi(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{o(new Xa(`timeout ${t} of ms exceeded`,Xa.ETIMEDOUT))}),t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",o):e.unsubscribe(o))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",o)));const{signal:l}=r;return l.unsubscribe=i,[l,()=>{a&&clearTimeout(a),a=null}]},Bi=function*(e,t){let n=e.byteLength;if(!t||n{const a=async function*(e,t,n){for await(const r of e)yield*Bi(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,o);let i=0;return new ReadableStream({type:"bytes",async pull(e){const{done:t,value:o}=await a.next();if(t)return e.close(),void r();let l=o.byteLength;n&&n(i+=l),e.enqueue(new Uint8Array(o))},cancel:e=>(r(e),a.return())},{highWaterMark:2})},Ui=(e,t)=>{const n=null!=e;return r=>setTimeout((()=>t({lengthComputable:n,total:e,loaded:r})))},Gi="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Hi=Gi&&"function"==typeof ReadableStream,qi=Gi&&("function"==typeof TextEncoder?(Wi=new TextEncoder,e=>Wi.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Wi;const Ki=Hi&&(()=>{let e=!1;const t=new Request(bi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Yi=Hi&&!!(()=>{try{return Ya.isReadableStream(new Response("").body)}catch(e){}})(),Xi={stream:Yi&&(e=>e.body)};var Qi;Gi&&(Qi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Xi[e]&&(Xi[e]=Ya.isFunction(Qi[e])?t=>t[e]():(t,n)=>{throw new Xa(`Response type '${e}' is not supported`,Xa.ERR_NOT_SUPPORT,n)})})));const Zi=async(e,t)=>{const n=Ya.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:Ya.isBlob(e)?e.size:Ya.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Ya.isArrayBufferView(e)?e.byteLength:(Ya.isURLSearchParams(e)&&(e+=""),Ya.isString(e)?(await qi(e)).byteLength:void 0))(t):n},Ji={http:null,xhr:zi,fetch:Gi&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:s,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=Di(e);u=u?(u+"").toLowerCase():"text";let m,g,[f,h]=o||a||i?$i([o,a],i):[];const b=()=>{!m&&setTimeout((()=>{f&&f.unsubscribe()})),m=!0};let v;try{if(s&&Ki&&"get"!==n&&"head"!==n&&0!==(v=await Zi(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});Ya.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body&&(r=Vi(n.body,65536,Ui(v,ji(s)),null,qi))}Ya.isString(d)||(d=d?"cors":"omit"),g=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let o=await fetch(g);const a=Yi&&("stream"===u||"response"===u);if(Yi&&(l||a)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Ya.toFiniteNumber(o.headers.get("content-length"));o=new Response(Vi(o.body,65536,l&&Ui(t,ji(l,!0)),a&&b,qi),e)}u=u||"text";let i=await Xi[Ya.findKey(Xi,u)||"text"](o,e);return!a&&b(),h&&h(),await new Promise(((t,n)=>{Fi(t,n,{data:i,headers:Ri.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:g})}))}catch(y){if(b(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new Xa("Network Error",Xa.ERR_NETWORK,e,g),{cause:y.cause||y});throw Xa.from(y,y&&y.code,e,g)}})};Ya.forEach(Ji,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Io){}Object.defineProperty(e,"adapterName",{value:t})}}));const el=e=>`- ${e}`,tl=e=>Ya.isFunction(e)||null===e||!1===e,nl=e=>{e=Ya.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Xa("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(el).join("\n"):" "+el(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function rl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pi(null,e)}function ol(e){return rl(e),e.headers=Ri.from(e.headers),e.data=Oi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),nl(e.adapter||wi.adapter)(e).then((function(t){return rl(e),t.data=Oi.call(e,e.transformResponse,t),t.headers=Ri.from(t.headers),t}),(function(t){return Ii(t)||(rl(e),t&&t.response&&(t.response.data=Oi.call(e,e.transformResponse,t.response),t.response.headers=Ri.from(t.response.headers))),Promise.reject(t)}))}const al="1.7.2",il={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{il[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const ll={};il.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new Xa(r(o," has been removed"+(t?" in "+t:"")),Xa.ERR_DEPRECATED);return t&&!ll[o]&&(ll[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};const sl={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Xa("options must be an object",Xa.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new Xa("option "+a+" must be "+n,Xa.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Xa("Unknown option "+a,Xa.ERR_BAD_OPTION)}},validators:il},ul=sl.validators;let cl=class{constructor(e){this.defaults=e,this.interceptors={request:new ui,response:new ui}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(Io){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Li(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&sl.assertOptions(n,{silentJSONParsing:ul.transitional(ul.boolean),forcedJSONParsing:ul.transitional(ul.boolean),clarifyTimeoutError:ul.transitional(ul.boolean)},!1),null!=r&&(Ya.isFunction(r)?t.paramsSerializer={serialize:r}:sl.assertOptions(r,{encode:ul.function,serialize:ul.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&Ya.merge(o.common,o[t.method]);o&&Ya.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ri.concat(a,o);const i=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let c,d=0;if(!l){const e=[ol.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,s),c=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Pi(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new pl((function(t){e=t}));return{token:t,cancel:e}}}const ml=pl,gl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gl).forEach((([e,t])=>{gl[t]=e}));const fl=gl,hl=function e(t){const n=new dl(t),r=da(dl.prototype.request,n);return Ya.extend(r,dl.prototype,n,{allOwnKeys:!0}),Ya.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Li(t,n))},r}(wi);hl.Axios=dl,hl.CanceledError=Pi,hl.CancelToken=ml,hl.isCancel=Ii,hl.VERSION=al,hl.toFormData=ri,hl.AxiosError=Xa,hl.Cancel=hl.CanceledError,hl.all=function(e){return Promise.all(e)},hl.spread=function(e){return function(t){return e.apply(null,t)}},hl.isAxiosError=function(e){return Ya.isObject(e)&&!0===e.isAxiosError},hl.mergeConfig=Li,hl.AxiosHeaders=Ri,hl.formToJSON=e=>vi(Ya.isHTMLForm(e)?new FormData(e):e),hl.getAdapter=nl,hl.HttpStatusCode=fl,hl.default=hl;const bl=hl;var vl={exports:{}};!function(e){var t,n;t=h,n=function(){return function(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=r0?"?":"")+i.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()}(vl);const yl=g(vl.exports),wl=e=>{const t=/^([^"=]*)=([\s\S]*)/,n=/([^[]*)\[([^"\]]*)?\]([\s\S]*)?/,r=/[^=]*\?([\s\S]*)/,o=/^([^"&]*)&([\s\S]*)/,a=/^(true|false)$/,i=/#.*$/,l=/^\d*$/,s=e=>Number.isNaN(+e)?a.test(e)?"true"===e:"null"!==e&&e?e:null:+e,u=(e,[t,r,o],a=t.match(n))=>(a?([,t,o]=a,o=l.test(o)?parseInt(o,10):o,e[t]=e[t]||(/undefined|number/.test(typeof o)?[]:{}),o=/string|number/.test(typeof o)?o:e[t].length,a[3]?e[t]=u(e[t],[o+a[3],r]):r&&(e[t][o]=s(r))):r&&(e[t]=s(r)),e),c=(e,t=[],n=e.match(o))=>(n?t=c(n[2],t.concat(n[1])):e&&(t=t.concat(e)),t);return"string"==typeof e?c((e=>decodeURIComponent(e.replace(/\+/g," ")))((e=>e.replace(i,""))((d=e,d.replace(r,((e,t)=>t)))))).reduce(((e,n)=>u(e,((e,n=e.match(t))=>n?n.slice(1):[e])(n))),{}):{};var d}; +/*! + * @module @datawheel/olap-client + * @version 2.1.6 (rev f191395) + * @copyright Datawheel, LLC + * @license MIT + * @see {@link https://github.com/Datawheel/olap-client} + */ +var xl=class{constructor(e){this.store=new Map,this.filled=!1,this.keygen=e}declareFilled(){this.filled=!0}getAllItems(e){const t=this.filled?[...this.store.values()]:e();return Promise.resolve(t).then((e=>{const t=this.keygen;return this.filled=!0,this.store=new Map(e.map((e=>[t(e),e]))),e}))}getItem(e,t){const n=this.store.get(e)||t();return Promise.resolve(n).then((e=>(this.store.set(this.keygen(e),e),e)))}getKeygen(){return this.keygen}};function Sl(e,t){t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((n=>{if("constructor"!==n){const r=Object.getOwnPropertyDescriptor(t.prototype,n);r&&Object.defineProperty(e.prototype,n,r)}}))}))}var Cl=class{get annotations(){return this._source.annotations}getAnnotation(e,t){const n=this._source.annotations[e];if(void 0!==n)return n;if(void 0!==t)return t;throw new Error(`Annotation ${e} does not exist in ${this.constructor.name} ${this}.`)}getLocaleAnnotation(e,t,n){const r=this._source.annotations[`${e}_${t}`];return void 0!==r?r:this.getAnnotation(e,n)}},El=class{get caption(){return this._source.caption||this._source.name}get fullName(){return this._source.fullName||this._source.name}get name(){return this._source.name}},kl=class{toJSON(){return this._source}toString(){return this._source.uri}},_l=e("A",(e=>(e.avg="AVG",e.AVG="AVG",e.count="COUNT",e.COUNT="COUNT",e.max="MAX",e.MAX="MAX",e.min="MIN",e.MIN="MIN",e.sum="SUM",e.SUM="SUM",e.unknown="UNKNOWN",e.UNKNOWN="UNKNOWN",e))(_l||{})),Rl=(e=>(e.growth="growth",e.GROWTH="growth",e.rate="rate",e.RATE="rate",e.rca="rca",e.RCA="rca",e.topk="topk",e.TOPK="topk",e))(Rl||{}),Ol=(e=>(e["!="]="neq",e["<"]="lt",e["<="]="lte",e["<>"]="neq",e["="]="eq",e[">"]="gt",e[">="]="gte",e.eq="eq",e.EQ="eq",e.gt="gt",e.GT="gt",e.gte="gte",e.GTE="gte",e.lt="lt",e.LT="lt",e.lte="lte",e.LTE="lte",e.NEQ="neq",e.neq="neq",e))(Ol||{}),Il=e("D",(e=>(e.geo="geo",e.Geographic="geo",e.std="std",e.Standard="std",e.time="time",e.Time="time",e))(Il||{})),Pl=(e=>(e.csv="csv",e.json="json",e.jsonarrays="jsonarrays",e.jsonrecords="jsonrecords",e.parquet="parquet",e.tsv="tsv",e.xls="xls",e.xlsx="xlsx",e))(Pl||{}),Fl=(e=>(e.asc="asc",e.ASC="asc",e.desc="desc",e.DESC="desc",e))(Fl||{}),jl=(e=>(e.day="day",e.DAY="day",e.month="month",e.MONTH="month",e.quarter="quarter",e.QUARTER="quarter",e.time="time",e.TIME="time",e.week="week",e.WEEK="week",e.year="year",e.YEAR="year",e))(jl||{}),Ml=(e=>(e.latest="latest",e.LATEST="latest",e.oldest="oldest",e.OLDEST="oldest",e))(Ml||{}),Al=class e{static isCalcOrMeasure(t){return"string"==typeof t&&t in Rl||e.isMeasure(t)}static isMeasure(e){return null!=e&&Ll(e,"_source")&&null!=e._source&&Ll(e._source,"_type")&&"measure"===e._source._type}constructor(e,t){this._parent=t,this._source=e}get aggregatorType(){return this._source.aggregatorType}get cube(){if(this._parent)return this._parent;throw new Error(`Measure ${this} doesn't have an associated parent cube.`)}get displayName(){return this._source.name}};function Tl(e,t=(e=>`${e}`),n=Boolean){const r=e.filter(n);return r.length>0?r.map(t):void 0}function Nl(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function Ll(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Dl(e){const t="string"==typeof e?Number.parseFloat(e):e;return!Number.isNaN(t)&&Number.isFinite(t)}function zl(e){return Array.isArray(e)&&Nl(e[0],Ol)&&Dl(e[1])}Sl(Al,[Cl,El,kl]);var $l=class e{static isProperty(e){return null!=e&&Ll(e,"_source")&&null!=e._source&&Ll(e._source,"_type")&&"property"===e._source._type}static isPropertyDescriptor(e){return null!=e&&Ll(e,"property")&&"string"==typeof e.property&&(!Ll(e,"level")||"string"==typeof e.level)}constructor(e,t){this._parent=t,this._source=e}get captionSet(){return this._source.captionSet||""}get cube(){return this.level.cube}get descriptor(){return{...this.level.descriptor,property:this.name}}get fullName(){return`${this.level.fullName}.${this.name}`}get level(){if(!this._parent)throw new Error(`Property ${this} doesn't have an associated parent hierarchy.`);return this._parent}get uniqueName(){return this._source.uniqueName||this._source.name}matches(t){if("string"==typeof t)return this._source.uniqueName===t||this.fullName===t||this._source.name===t;if(e.isPropertyDescriptor(t)){const e=this._parent?this.level:void 0;return this.matches(t.property)&&(!e||(!t.level||e.matches(t.level))&&(!t.hierarchy||t.hierarchy===e.hierarchy.name)&&(!t.dimension||t.dimension===e.dimension.name)&&(!t.cube||t.cube===e.cube.name)&&(!t.server||t.server===e.cube.server))}return!!e.isProperty(t)&&(this===t||this.matches(t.descriptor))}};function Bl(e){return null==e?[]:[].concat(e)}function Vl(e,t=","){return null==e?[]:(Array.isArray(e)?e.join(t):e).split(t)}function Ul(e,t){let n=-1;const r=e.length,o=[];for(;++n-1||this._source.properties.some((t=>t.name===e))}matches(t){return"string"==typeof t?this._source.uniqueName===t||this._source.fullName===t||this._source.name===t:e.isLevelDescriptor(t)?this.matches(t.level)&&(!t.hierarchy||t.hierarchy===this._source.hierarchy)&&(!t.dimension||t.dimension===this._source.dimension)&&(!t.cube||t.cube===this._source.cube)&&(!t.server||t.server===this.cube.server):!!e.isLevel(t)&&(this===t||this.matches(t.descriptor))}};Sl(Kl,[Cl,El,kl]);var Yl=class{constructor(e,t){this.levels=[],this.levelsByName={},this._parent=t,this._source=e;const n=ql(Kl,e.levels,this);this.levels=n[0],this.levelsByName=n[1]}static isHierarchy(e){return null!=e&&Ll(e,"_source")&&null!=e._source&&Ll(e._source,"_type")&&"hierarchy"===e._source._type}get cube(){return this.dimension.cube}get dimension(){if(this._parent)return this._parent;throw new Error(`Hierarchy ${this} doesn't have an associated parent dimension.`)}get displayName(){return Wl([this._source.dimension,this._source.name])}getLevel(e){const t=Kl.isLevel(e)?e.name:Kl.isLevelDescriptor(e)?e.level:e,n=this.levelsByName[t];if(n)return n;throw new Error(`Object ${e} is not a valid level identifier`)}};Sl(Yl,[Cl,El,kl]);var Xl=class{constructor(e,t){this.hierarchies=[],this.hierarchiesByName={},this._parent=t,this._source=e;const n=ql(Yl,e.hierarchies,this);this.hierarchies=n[0],this.hierarchiesByName=n[1]}static isDimension(e){return null!=e&&Ll(e,"_source")&&null!=e._source&&Ll(e._source,"_type")&&"dimension"===e._source._type}get caption(){return this._source.annotations.caption||this._source.name}get cube(){if(this._parent)return this._parent;throw new Error(`Dimension ${this} doesn't have an associated parent cube.`)}get defaultHierarchy(){return this.hierarchiesByName[this._source.defaultHierarchy]||this.hierarchies[0]}get dimensionType(){return this._source.dimensionType}get displayName(){return this._source.name}get levelIterator(){return this.levelIteratorFactory()}get propertyIterator(){return this.propertyIteratorFactory()}getHierarchy(e){const t="string"==typeof e?e:e.name,n=this.hierarchiesByName[t];if(n)return n;throw new Error(`Object ${e} didn't match any hierarchy in dimension ${this.name}`)}getLevel(e){const t=Hl(this.levelIteratorFactory(),e);if(null!=t)return t;throw new Error(`Object ${e} didn't match any level in dimension ${this.name}`)}getProperty(e){const t=Hl(this.propertyIteratorFactory(),e);if(null!=t)return t;throw new Error(`Object ${e} didn't match any property in dimension ${this.name}`)}levelIteratorFactory(){const{hierarchies:e}=this;let t=0,n=0;const r={next:function r(){if(t===e.length)return{value:void 0,done:!0};const{levels:o}=e[t];return n===o.length?(t++,n=0,r()):{value:o[n++],done:!1}},[Symbol.iterator]:()=>r};return r}propertyIteratorFactory(){const e=this.levelIteratorFactory();let t=e.next(),n=0;const r={next:function r(){if(t.done)return{value:void 0,done:!0};const{properties:o}=t.value;return n===o.length?(t=e.next(),n=0,r()):{value:o[n++],done:!1}},[Symbol.iterator]:()=>r};return r}};Sl(Xl,[Cl,El,kl]);var Ql=class{static isNamedset(e){return null!=e&&Ll(e,"_source")&&null!=e._source&&Ll(e._source,"_type")&&"namedset"===e._source._type}constructor(e,t){this._parent=t,this._source=e;const[n,r,o]=e.level;this.level=t?t.getLevel({dimension:n,hierarchy:r,level:o}):void 0}get cube(){if(this._parent)return this._parent;throw new Error(`NamedSet ${this} doesn't have an associated parent cube.`)}};Sl(Ql,[Cl,El,kl]);var Zl={growth:function(e,t){return{kind:"growth",category:e.getLevel(t.category),value:e.getMeasure(t.value)}},rate:function(e,t){throw new Error("Not implemented")},rca:function(e,t){return{kind:"rca",location:e.getLevel(t.location),category:e.getLevel(t.category),value:e.getMeasure(t.value)}},topk:function(e,t){if(!Dl(t.amount))throw new TypeError(`Invalid value in argument amount: ${t.amount}`);return{kind:"topk",amount:t.amount,category:e.getLevel(t.category),value:Rl[t.value]||e.getMeasure(t.value),order:Fl[t.order]||"desc"}}};function Jl(e){return delete e.cube,delete e.server,e}function es(e){const t=Object.entries(e).map((([e,t])=>[e,Al.isMeasure(t)?t.name:Kl.isLevel(t)?Jl(t.descriptor):t]));return Object.fromEntries(t)}function ts(e,t){const n=e.cube;if(t.server&&t.server!==n.server)throw new Error(`Server "${t.server}" doesn't match with target Query object's server "${n.server}"`);if(t.cube&&t.cube!==n.name)throw new Error(`Cube "${t.cube}" doesn't match with target Query object's cube "${n.name}"`);return"string"==typeof t.format&&e.setFormat(Pl[t.format]),"string"==typeof t.locale&&e.setLocale(t.locale),Array.isArray(t.calculations)&&t.calculations.forEach((t=>{"growth"===t.kind&&e.addCalculation(t.kind,t),"rca"===t.kind&&e.addCalculation(t.kind,t),"topk"===t.kind&&e.addCalculation(t.kind,t)})),Array.isArray(t.captions)&&t.captions.forEach((t=>e.addCaption(t))),Array.isArray(t.drilldowns)&&t.drilldowns.forEach((t=>e.addDrilldown(t))),Array.isArray(t.cuts)&&t.cuts.forEach((t=>e.addCut(t,t.members,{exclusive:t.exclusive,forMatch:t.for_match}))),Array.isArray(t.filters)&&t.filters.forEach((t=>e.addFilter(t.measure,t.constraint,t.joint,t.constraint2))),Array.isArray(t.measures)&&t.measures.forEach((t=>e.addMeasure(t))),Array.isArray(t.properties)&&t.properties.forEach((t=>e.addProperty(t))),null!=t.page_limit&&Dl(t.page_limit)&&e.setPagination(t.page_limit,t.page_offset),t.sort_property&&e.setSorting(t.sort_property,Fl[t.sort_direction||"desc"]),t.time&&e.setTime(jl[t.time[0]],Dl(t.time[1])?t.time[1]:Ml[t.time[1]]),t.options&&function(e,t){const n=Object(e),r=Object.keys(e);let o=-1,a=r.length;for(;a--;){const e=r[++o];if(!1===t(n[e],e,n))break}}(t.options,((t,n)=>{null!=t&&e.setOption(n,t)})),e}function ns(e){return Kl.isLevel(e)||$l.isProperty(e)?e.fullName:Al.isMeasure(e)?e.name:e}var rs=class{constructor(e){this.calculations=[],this.captions={},this.cuts={},this.drilldowns=[],this.filters=[],this.format="jsonrecords",this.locale="",this.measures=[],this.options={},this.pageLimit=0,this.pageOffset=0,this.properties={},this.cube=e}addCalculation(e,t){const n=Zl[e];if(null==n)throw new TypeError(`Invalid calculation type: ${e} is not supported`);return this.calculations.push(n(this.cube,t)),this}addCaption(e){const t=this.cube.getProperty(e);return this.captions[t.level.fullName]=t,this}addCut(e,t=[],n={}){const r=this.cube.getDrillable(e),o=this.cuts[r.fullName]||{drillable:r,isExclusive:null!=n.exclusive?!!n.exclusive:void 0,isForMatch:null!=n.forMatch?!!n.forMatch:void 0,members:[]};for(let a=0;a0;return this.pageLimit=n?Math.max(0,e):0,this.pageOffset=n?Math.max(0,t||0):0,this}setSorting(e,t){if(!e)return this.sortDirection=void 0,this.sortProperty=void 0,this;const n=this.cube;return this.sortProperty="string"==typeof e?Rl[e]||n.measuresByName[e]||n.getProperty(e):Al.isMeasure(e)?e:n.getProperty(e),this.sortDirection="string"==typeof t?Fl[t]||"desc":!1===t?"asc":"desc",this}setTime(e,t){const n=null!=e&&null!=t;return this.timePrecision=n?e:void 0,this.timeValue=n?t:void 0,this}toJSON(){return function(e){const{cube:t}=e,n=e.getParam("pagination"),r=e.getParam("sorting"),o=e.getParam("time");return{server:t.server,cube:t.name,format:e.getParam("format"),locale:e.getParam("locale"),calculations:e.getParam("calculations").map(es),captions:e.getParam("captions").map((e=>Jl(e.descriptor))),cuts:Ul(e.getParam("cuts"),(e=>Kl.isLevel(e.drillable)?{...Jl(e.drillable.descriptor),members:e.members,exclusive:e.isExclusive,for_match:e.isForMatch}:null)),drilldowns:Ul(e.getParam("drilldowns"),(e=>Kl.isLevel(e)?Jl(e.descriptor):null)),filters:e.getParam("filters").map((e=>({measure:Al.isMeasure(e.measure)?e.measure.name:e.measure,constraint:e.const1,joint:e.joint,constraint2:e.const2}))),page_limit:n.limit,page_offset:n.offset,measures:e.getParam("measures").map((e=>e.name)),properties:e.getParam("properties").map((e=>Jl(e.descriptor))),sort_property:$l.isProperty(r.property)?Jl(r.property.descriptor):Al.isMeasure(r.property)?r.property.name:r.property,sort_direction:r.direction,time:null!=o.precision&&null!=o.value?[o.precision,o.value]:void 0,options:e.getParam("options")}}(this)}toSource(){return function(e){function t(e){return e in Pl?`Format.${e}`:e in Ol?`Comparison.${e.toUpperCase()}`:e in Fl?`Direction.${e.toUpperCase()}`:Array.isArray(e)?`[${e.map(t).join(", ")}]`:JSON.stringify(Kl.isLevel(e.category)&&Al.isCalcOrMeasure(e.value)?es(e):ns(e))}function n(e,...n){const r=[];let o=n.length;for(;o>0;){const e=n[--o];(0!==r.length||null!=e&&""!==e)&&r.push(t(e))}return r.reverse(),r.length>0?`.${e}(${r.join(", ")})`:""}const r=e.getParam("options"),o=e.getParam("pagination"),a=e.getParam("sorting"),i=e.getParam("time");return["query"].concat(n("setFormat",e.getParam("format")),n("setLocale",e.getParam("locale")),e.getParam("measures").map((e=>n("addMeasure",e))),e.getParam("drilldowns").map((e=>n("addDrilldown",e))),e.getParam("captions").map((e=>n("addCaption",e))),e.getParam("properties").map((e=>n("addProperty",e))),e.getParam("cuts").map((e=>n("addCut",e.drillable,e.members,{exclusive:e.isExclusive,forMatch:e.isForMatch}))),e.getParam("filters").map((e=>n("addFilter",e.measure,e.const1,e.joint&&e.const2?e.joint:"",e.joint&&e.const2?e.const2:""))),e.getParam("calculations").map((({kind:e,...t})=>n("addCalculation",e,t))),o.limit>0?n("setPagination",o.limit,o.offset):"",null!=a.property&&null!=a.direction?n("setSorting",a.property,a.direction):"",null!=i.precision&&null!=i.value?n("setTime",i.precision,i.value):"",Object.keys(r).map((e=>"boolean"==typeof r[e]?n("setOption",e,r[e]):""))).filter(Boolean).join("\n ")}(this)}toString(e){if("string"==typeof e){const{datasource:t}=this.cube;return t.stringifyQueryURL(this,e)}return ca(function(e){const{cube:t}=e,n=e.getParam("pagination"),r=e.getParam("sorting"),o=e.getParam("time");return{server:t.server,cube:t.name,format:e.getParam("format")||void 0,locale:e.getParam("locale")||void 0,calculations:e.getParam("calculations").map((e=>`${e.kind}:${Ul(Object.keys(e).sort(),(t=>"kind"===t?null:ns(e[t])))}`)),captions:e.getParam("captions").map((e=>e.fullName)),cuts:e.getParam("cuts").map((e=>`${e.isExclusive?"~":""}${e.isForMatch?"*":""}${e.drillable.fullName}.${e.members.join(",")}`)),drilldowns:e.getParam("drilldowns").map((e=>e.fullName)),filters:e.getParam("filters").map((e=>[Al.isMeasure(e.measure)?e.measure.name:e.measure,e.const1,e.joint&&e.const2?e.joint:"",e.joint&&e.const2?e.const2:""].filter(Boolean).join(" "))),page_limit:n.limit||void 0,page_offset:n.offset||void 0,measures:e.getParam("measures").map((e=>e.name)),properties:e.getParam("properties").map((e=>e.fullName)),sort_property:$l.isProperty(r.property)?r.property.fullName:Al.isMeasure(r.property)?r.property.name:r.property,sort_direction:r.direction,time_precision:o.precision,time_value:o.value,options:e.getParam("options")}}(this),{ignorenull:!0,skipIndex:!0,sorted:!0})}},os=e("C",class{constructor(e,t){this.dimensions=[],this.dimensionsByName={},this.measures=[],this.measuresByName={},this.namedsets=[],this.namedsetsByName={},this._parent=t,this._source=e;const n=ql(Xl,e.dimensions,this);this.dimensions=n[0],this.dimensionsByName=n[1];const r=ql(Al,e.measures,this);this.measures=r[0],this.measuresByName=r[1];const o=ql(Ql,e.namedsets,this);this.namedsets=o[0],this.namedsetsByName=o[1]}static isCube(e){return null!=e&&Ll(e,"_source")&&null!=e._source&&Ll(e._source,"_type")&&"cube"===e._source._type}get caption(){return this._source.annotations.caption||this._source.name}get datasource(){if(this._parent)return this._parent;throw new Error(`Cube ${this} doesn't have an associated server url.`)}get defaultMeasure(){const e=this._source.annotations.default||"undefined";return this.measuresByName[e]||this.measures[0]}get geoDimension(){return this.dimensions.find((e=>"geo"===e.dimensionType))}get query(){return new rs(this)}get server(){return this.datasource.serverUrl}get serverSoftware(){return this.datasource.serverSoftware}get standardDimensions(){return this.findDimensionsByType("std")}get timeDimension(){return this.dimensions.find((e=>"time"===e.dimensionType))}get levelIterator(){return this.levelIteratorFactory()}get propertyIterator(){return this.propertyIteratorFactory()}findDimensionsByType(e){return this.dimensions.filter((t=>t.dimensionType===e))}getDimension(e){const t="string"==typeof e?e:e.name,n=this.dimensionsByName[t];if(n)return n;throw new Error(`Object ${e} is not a valid dimension identifier`)}getDrillable(e){return Ql.isNamedset(e)?this.getNamedSet(e):Kl.isLevel(e)?this.getLevel(e):this.namedsetsByName[`${e}`]||this.getLevel(e)}getLevel(e){const t=Hl(this.levelIteratorFactory(),e);if(null!=t)return t;throw new Error(`Object ${e} didn't match any level in cube ${this.name}`)}getMeasure(e){const t="string"==typeof e?e:e.name,n=this.measuresByName[t];if(n)return n;throw new Error(`Object ${e} is not a valid measure identifier`)}getNamedSet(e){const t="string"==typeof e?e:e.name,n=this.namedsetsByName[t];if(n)return n;throw new Error(`Object ${e} is not a valid namedset identifier`)}getProperty(e){const t=Hl(this.propertyIteratorFactory(),e);if(null!=t)return t;throw new Error(`Object ${e} didn't match any level in cube ${this.name}`)}levelIteratorFactory(){const{dimensions:e}=this;let t=e[0].levelIterator,n=0;const r={next:function r(){var o;if(n===e.length)return{value:void 0,done:!0};const a=t.next();return a.done?(t=null==(o=e[++n])?void 0:o.levelIterator,r()):a},[Symbol.iterator]:()=>r};return r}propertyIteratorFactory(){const{dimensions:e}=this;let t=0,n=e[t].propertyIterator;const r={next:function r(){var o;if(t===e.length)return{value:void 0,done:!0};const a=n.next();return a.done?(n=null==(o=e[++t])?void 0:o.propertyIterator,r()):a},[Symbol.iterator]:()=>r};return r}});Sl(os,[Cl,El,kl]);var as=class e{constructor(t,n){this._parent=n,this._source=t,this.ancestors=t.ancestors.map((t=>new e(t,n))),this.children=t.children.map((t=>new e(t,n)))}get cube(){return this.level.cube}get key(){return this._source.key}get level(){if(this._parent)return this._parent;throw new Error(`Member ${this} doesn't have an associated parent level.`)}get parentName(){return this._source.parentName}};Sl(as,[El,kl]);var is=class extends Error{constructor(e,t){super(t||(e.data?e.data.error||e.data:e.statusText)),this.status=e.status,this.body=e.data,this.name=this.constructor.name,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},ls=(e=>(e.eq="=",e.gt=">",e.gte=">=",e.lt="<",e.lte="<=",e.neq="<>",e))(ls||{});function ss(e){const t=e.lastIndexOf(".");return[e.slice(0,t),e.slice(t+1)]}function us(e){const{drillable:t,members:n}=e,r=n.map((e=>`${t.fullName}.&[${e}]`)).join(",");return n.length>1?`{${r}}`:r}function cs(e){const t=ls[e.const1[0]];return"string"!=typeof e.measure&&t?`${e.measure.name} ${t} ${e.const1[1]}`:""}function ds(e,t){const n=e.cube,r={};for(const o of n.levelIterator)r[o.fullName]=o;return Bl(t.caption).forEach((t=>{const[n,o]=ss(t),a=r[n];if(a){const t=a.propertiesByName[o];t&&e.addCaption(t)}})),Bl(t.cut).forEach((t=>{const n=function(e){if(-1===e.indexOf("].&["))throw TypeError(`Couldn't parse cut: ${e}`);const t=`${e}`.replace(/^\{|\}$/g,""),[n]=t.split(".&",1);return[n,t.split(",").map((e=>{const[,t]=e.split("].&[");return t?t.replace("]",""):void 0})).filter(Boolean)]}(t);e.addCut(...n)})),Bl(t.drilldown).forEach((t=>{const n=r[t];n&&e.addDrilldown(n)})),Bl(t.filter).forEach((t=>{const[,r,o,a]=t.match(/^(.+)\s(>|<|>=|<=|=|<>)\s(.+)$/)||[],i=n.measuresByName[r],l=Ol[o];i&&l&&e.addFilter(i,[l,Number.parseFloat(a)])})),Bl(t.measures).forEach((t=>{const r=n.measuresByName[t];r&&e.addMeasure(r)})),Bl(t.properties).forEach((t=>{const[n,o]=ss(t),a=r[n];if(a){const t=a.propertiesByName[o];t&&e.addProperty(t)}})),null!=t.limit&&e.setPagination(t.limit,t.offset),t.order&&e.setSorting(t.order,!!t.order_desc),"boolean"==typeof t.debug&&e.setOption("debug",t.debug),"boolean"==typeof t.distinct&&e.setOption("distinct",t.distinct),"boolean"==typeof t.nonempty&&e.setOption("nonempty",t.nonempty),"boolean"==typeof t.parents&&e.setOption("parents",t.parents),"boolean"==typeof t.sparse&&e.setOption("sparse",t.sparse),e}function ps(e){return t=>{const n=yl(e.server_uri,"cubes",encodeURIComponent(t.name)),r={...e,cube_name:t.name,cube_uri:n};return{_type:"cube",annotations:t.annotations,dimensions:t.dimensions.map(ms(r)),measures:t.measures.map(hs(r)),name:t.name,namedsets:t.named_sets.map(vs(r)),uri:n}}}function ms(e){return t=>{var n;const r=yl(e.cube_uri,"dimensions",encodeURIComponent(t.name)),o={...e,dimension_name:t.name,dimension_uri:r};return{_type:"dimension",annotations:t.annotations,cube:e.cube_name,defaultHierarchy:t.hierarchies[0].name,dimensionType:null!=(n=Il[t.type])?n:"std",hierarchies:t.hierarchies.map(gs(o)),name:t.name,uri:r}}}function gs(e){return t=>{const n=yl(e.dimension_uri,"hierarchies",encodeURIComponent(t.name)),r={...e,hierarchy_name:t.name,hierarchy_uri:n},o=t.has_all?t.levels.slice(1):t.levels;return{_type:"hierarchy",allMemberName:t.all_member_name,annotations:{},cube:e.cube_name,dimension:e.dimension_name,levels:o.map(fs(r)),name:t.name,uri:n}}}function fs(e){return t=>{const n=yl(e.hierarchy_uri,"levels",encodeURIComponent(t.name)),r={...e,level_name:t.name,level_uri:n};return{_type:"level",annotations:t.annotations,caption:t.caption,cube:e.cube_name,depth:t.depth,dimension:e.dimension_name,fullName:t.full_name,hierarchy:e.hierarchy_name,name:t.name,properties:t.properties.map(ys(r)),uri:n}}}function hs(e){return t=>({_type:"measure",aggregatorType:_l[t.aggregator]||"UNKNOWN",annotations:t.annotations,caption:t.caption,cube:e.cube_name,fullName:t.full_name,name:t.name,uri:yl(e.cube_uri,"measures",encodeURIComponent(t.name))})}function bs(e){return t=>({_type:"member",ancestors:Bl(t.ancestors).map(bs(e)),caption:t.caption,children:Bl(t.children).map(bs(e)),depth:t.depth,fullName:t.full_name,key:t.key,level:t.level_name,name:t.name,numChildren:t.num_children,parentName:t.parent_name,uri:yl(e.level_uri,"members",`${t.key}`)})}function vs(e){return t=>({_type:"namedset",annotations:t.annotations,cube:e.cube_name,dimension:t.dimension,hierarchy:t.hierarchy,level:t.level,name:t.name,uri:yl(e.cube_uri,"namedsets",encodeURIComponent(t.name))})}function ys(e){return t=>({_type:"property",annotations:{},cube:e.cube_name,dimension:e.dimension_name,hierarchy:e.hierarchy_name,level:e.level_name,name:t,uri:yl(e.level_uri,"properties",encodeURIComponent(t))})}var ws="mondrian-rest",xs=class e{constructor(e){if(this.serverOnline=!1,this.serverSoftware=ws,!e||"string"!=typeof e)throw new Error(`Invalid Mondrian REST server URL: ${e}`);this.serverUrl=yl(e,"/"),this.axiosInstance=bl.create({baseURL:this.serverUrl})}checkStatus(){const e=yl(this.serverUrl,"cubes");return this.axiosInstance.get(e).then((()=>(this.serverOnline=!0,this.serverVersion="1.0.4",{software:ws,online:this.serverOnline,url:this.serverUrl,version:this.serverVersion})),(e=>{throw this.serverOnline=!1,e}))}execQuery(e){const t=e.getParam("format"),n=this.stringifyQueryURL(e);return this.axiosInstance.get(n).then((r=>({data:"jsonrecords"===t?r.data.data:r.data,headers:{...r.headers},query:e,status:r.status,url:n})))}fetchCube(e){const t=yl(this.serverUrl,"cubes",e),n=ps({server_uri:this.serverUrl});return this.axiosInstance.get(t).then((e=>{const t=e.data;if(t&&"string"==typeof t.name)return n(t);throw new is(e)}),(t=>{if(t.response){if(404===t.response.status)throw new is(t.response,`Cube named "${e}" is not available in server ${this.serverUrl}`);throw new is(t.response,t.message)}throw t}))}fetchCubes(){const e=yl(this.serverUrl,"cubes"),t=ps({server_uri:this.serverUrl});return this.axiosInstance.get(e).then((e=>{const n=e.data;if(n&&Array.isArray(n.cubes))return n.cubes.map(t);throw new is(e)}))}fetchMember(e,t,n={}){const{dimension:r,name:o}=e,a=bs({level_uri:e.toString()});let i=n.caption;if(n.locale){const t=n.locale.slice(0,2);i=e.annotations[`${t}_caption`]||e.annotations[`caption_${t}`]||i}const l=yl(r.toString(),"levels",o,"members",`${t}`),s={caption:i||void 0,children:!!n.children,member_properties:n.member_properties};return this.axiosInstance.get(l,{params:s}).then((e=>a(e.data)),(n=>{if(404===n.status)throw new Error(`Can't find member with key '${t}' for level '${e.name}'`);throw n}))}fetchMembers(e,t={}){const n=bs({level_uri:e.toString()});let r=t.caption;if(t.locale){const n=t.locale.slice(0,2);r=e.annotations[`${n}_caption`]||e.annotations[`caption_${n}`]||r}const o=yl(e.toString(),"members"),a={caption:r||void 0,children:!!t.children,member_properties:t.member_properties};return this.axiosInstance.get(o,{params:a}).then((e=>e.data.members.map(n)))}parseQueryURL(e,t,n){const r=t.indexOf("?"),o=t.slice(r+1),a=wl(o),i=t.match(/^.+\/aggregate(\.[a-z]+)\?.+$/);i&&(a.format=i[1].slice(1));const l=Qs(a,n);if(t.indexOf("/aggregate")>-1)return ds(e,l);throw new Error(`Provided URL is not a valid Mondrian REST query URL: ${t}`)}setRequestConfig(e){Object.assign(this.axiosInstance.defaults,e)}stringifyQueryURL(t){return e.urlAggregate(t)}static urlAggregate(e){const t=e.getParam("format"),n=function(e){const t=e.getParam("captions"),n=e.getParam("pagination"),r=e.getParam("sorting"),o=e.getParam("options"),a=e.getParam("locale").slice(0,2);if(a){const n=new RegExp(`^${a}\\s|\\s${a}$`,"i");e.getParam("drilldowns").forEach((e=>{if(Kl.isLevel(e)){const r=e.properties.find((e=>n.test(e.name)));r&&t.push(r)}}))}return{caption:Tl(t,i),cut:Tl(e.getParam("cuts"),us),drilldown:Tl(e.getParam("drilldowns"),(e=>e.fullName)),filter:Tl(e.getParam("filters"),cs),measures:Tl(e.getParam("measures"),(e=>e.name)),properties:Tl(e.getParam("properties"),i),limit:n.limit||void 0,offset:n.offset||void 0,order:Al.isMeasure(r.property)?r.property.fullName:$l.isProperty(r.property)?i(r.property):void 0,order_desc:"desc"===r.direction||void 0,debug:o.debug,distinct:o.distinct,nonempty:o.nonempty,parents:o.parents,sparse:o.sparse};function i(e){return`${e.level.fullName}.${e.name}`}}(e),r=ca(n,{ignorenull:!0,skipIndex:!0,sorted:!0});return yl(e.cube.toString(),`aggregate.${t}?${r}`)}};xs.endpoints=[""],xs.formats=["csv","json","jsonrecords","xls"],xs.softwareName=ws,xs.queryAggregate=ds;var Ss=xs;function Cs(e){return e.some((e=>e.includes(".")))?e.map((e=>`[${e}]`)).join("."):e.join(".")}function Es(e){const t=e.replace(/^\[|\]$/g,"");return t.indexOf("].[")>-1?t.split(/\]\.\[?/):t.split(".")}function ks(e){const t=e.indexOf(".and.");if(t>-1)return{const1:_s(e.slice(0,t)),const2:_s(e.slice(t+5)),joint:"and"};const n=e.indexOf(".or.");return n>-1?{const1:_s(e.slice(0,n)),const2:_s(e.slice(n+4)),joint:"or"}:{const1:_s(e)}}function _s(e){const t=e.indexOf("."),n=e.slice(0,t);if(!Nl(n,Ol))throw new Error(`Invalid filter comparison token: ${n}`);const r=e.slice(t+1),o=Number.parseFloat(r);if(Number.isNaN(o)||!Number.isFinite(o))throw new Error(`Invalid filter scalar value: ${r}`);return[Ol[n],o]}function Rs(e){return[Al.isMeasure(e.measure)?e.measure.name:e.measure].concat(e.const1,e.joint,e.const2).filter(Boolean).join(".")}function Os(e){const t=yl(this.uri,"cubes",encodeURIComponent(e.name)),n={uri:t,cube:e.name};return{_type:"cube",annotations:e.annotations,caption:e.caption,dimensions:e.dimensions.map(Ps,n),measures:e.measures.map(Is,n),name:e.name,namedsets:[],uri:t}}function Is(e){return{_type:"measure",aggregatorType:e.aggregator,annotations:e.annotations,cube:this.cube,name:e.name,uri:yl(this.uri,"msr",encodeURIComponent(e.name))}}function Ps(e){const t=yl(this.uri,"dim",encodeURIComponent(e.name)),n={...this,uri:t,dimension:e.name};return{_type:"dimension",annotations:e.annotations,caption:e.caption,cube:this.cube,defaultHierarchy:e.default_hierarchy,dimensionType:"standard"===e.type?"std":Il[e.type],hierarchies:e.hierarchies.map(Fs,n),name:e.name,uri:t}}function Fs(e){const t=yl(this.uri,encodeURIComponent(e.name)),n={...this,uri:t,hierarchy:e.name};return{_type:"hierarchy",annotations:e.annotations,caption:e.caption,cube:this.cube,dimension:this.dimension,levels:e.levels.map(js,n),name:e.name,uri:t}}function js(e){const t=yl(this.uri,encodeURIComponent(e.name)),n={...this,uri:t,level:e.name};return{_type:"level",annotations:e.annotations,caption:e.caption,cube:this.cube,depth:e.depth,dimension:this.dimension,hierarchy:this.hierarchy,name:e.name,properties:e.properties.map(Ms,n),uniqueName:e.name,uri:t}}function Ms(e){return{_type:"property",annotations:e.annotations,name:e.name,uniqueName:e.name,uri:yl(this.uri,encodeURIComponent(e.name))}}function As(e){return{_type:"member",ancestors:[],caption:e.caption,children:[],depth:this.depth,key:e.key,level:this.name,name:`${e.key}`,uri:yl(this.toString(),`_member?key=${e.key}`)}}function Ts(e){return null!=e&&/^(?:true|y|yes|on|1)$/i.test(e.trim())}var Ns="tesseract-olap[python]",Ls=class{constructor(e){if(this.serverOnline=!1,this.serverSoftware=Ns,!e||"string"!=typeof e)throw new TypeError(`Invalid tesseract-olap server URL: ${e}`);this.serverUrl=yl(e,"/"),this.axiosInstance=bl.create({baseURL:this.serverUrl})}checkStatus(){return this.axiosInstance.get("/").then((e=>{const{version:t}=e.data;return this.serverOnline=!0,this.serverVersion=t,{software:Ns,online:this.serverOnline,url:this.serverUrl,version:t}}),(e=>{throw this.serverOnline=!1,e}))}execQuery(e){const t=e.getParam("format"),n=this.stringifyQueryURL(e);return this.axiosInstance.get(n,{baseURL:""}).then((r=>({data:t.startsWith("json")?r.data.data:r.data,headers:{...r.headers},query:e,status:r.status,url:n})))}fetchCube(e){const t={uri:this.serverUrl};return this.axiosInstance.get(`cubes/${encodeURIComponent(e)}`).then((e=>Os.call(t,e.data)))}fetchCubes(){const e={uri:this.serverUrl};return this.axiosInstance.get("cubes").then((t=>t.data.cubes.map(Os,e)))}fetchMember(e,t,n={}){const r={cube:e.cube.name,level:e.name,limit:"1",locale:n.locale,parents:n.parents,search:`${t}`};return this.axiosInstance.get("members",{params:r}).then((n=>{const r=n.data.members.find((e=>e.key==t));if(r)return As.call(e,r);throw new Error(`Can't find member with key '${t}' for level '${e.name}'`)}))}fetchMembers(e,t={}){const n={cube:e.cube.name,level:e.name,limit:t.limit,locale:t.locale,parents:t.parents,search:t.search};return this.axiosInstance.get("members",{params:n}).then((t=>t.data.members.map(As,e)))}parseQueryURL(e,t,n={}){!function(e,t,n){const r=Vl(t.getAll("include"),";").map((e=>{const[t,n]=Vl(e,":");return{level:t,members:n.split(","),exclusive:!1}})),o=Vl(t.getAll("exclude"),";").map((e=>{const[t,n]=Vl(e,":");return{level:t,members:n.split(","),exclusive:!0}})),[a="0",i="0"]=Vl(t.getAll("limit")),[l,s]=Vl(t.getAll("sort"),"."),[u,c]=Vl(t.getAll("time"),"."),d={cube:t.getAll("cube").filter(Boolean)[0],locale:t.getAll("locale").filter(Boolean)[0],drilldowns:Vl(t.getAll("drilldowns")).map((e=>({level:e}))),measures:Vl(t.getAll("measures")),properties:Vl(t.getAll("properties")).map((e=>({property:e}))),page_limit:Number.parseInt(a),page_offset:Number.parseInt(i),cuts:r.concat(o),filters:Vl(t.getAll("filters")).map((e=>{const[t,...n]=e.split("."),{const1:r,const2:o,joint:a}=ks(n.join("."));return{measure:t,constraint:r,joint:a,constraint2:o}})),options:{parents:Ts(t.get("parents"))}};if(l&&(d.sort_property=l,d.sort_direction=s||"asc"),u&&c){const e=Nl(u,jl)&&jl[u],t=Nl(c,Ml)?Ml[c]:Dl(c)&&c;d.time=e&&t?[e,t]:void 0}e.fromJSON(Qs(d,n))}(e,t.startsWith("?")?new URLSearchParams(t):new URL(t).searchParams,n);const r=t.match(/^.+\/data\.([a-z]+)\?.+$/);return r&&e.setFormat(r[1]),e}setRequestConfig(e){Object.assign(this.axiosInstance.defaults,e)}stringifyQueryURL(e){const t=e.getParam("format")||"jsonrecords",n=function(e){const t=e=>e.name,n=e.getParam("cuts"),r=e.getParam("options"),o=e.getParam("pagination"),a=e.getParam("sorting"),i=e.getParam("time");return{cube:e.cube.name,locale:e.getParam("locale"),drilldowns:e.getParam("drilldowns").map(t).join(","),measures:e.getParam("measures").map(t).join(","),properties:e.getParam("properties").map(t).join(",")||void 0,exclude:Ul(n,(e=>e.isExclusive?`${e.drillable.name}:${e.members.join(",")}`:null)).join(";")||void 0,include:Ul(n,(e=>e.isExclusive?null:`${e.drillable.name}:${e.members.join(",")}`)).join(";")||void 0,filters:e.getParam("filters").map((e=>{const t=`${"string"==typeof e.measure?e.measure:e.measure.name}.${e.const1.join(".")}`;return e.const2?`${t}.${e.joint}.${e.const2.join(".")}`:t})).join(",")||void 0,limit:o.limit||o.offset?`${o.limit},${o.offset}`:void 0,sort:a.property?"string"==typeof a.property?`${a.property}.${a.direction}`:`${a.property.name}.${a.direction}`:void 0,time:i.precision?`${i.precision}.${i.value}`:void 0,parents:r.parents||void 0}}(e),r=ca(n,{ignoreEmptyArray:!0,ignorenull:!0,skipBracket:!0,skipIndex:!0,sorted:!0});return yl(this.serverUrl,`data.${t}?${r}`)}};function Ds(e){const t=e.getParam("captions"),n=e.getParam("locale").slice(0,2);if(n){const r=new RegExp(`^${n}\\s|\\s${n}$`,"i");e.getParam("drilldowns").forEach((e=>{if(Kl.isLevel(e)){const n=e.properties.find((e=>r.test(e.name)));n&&t.push(n)}}))}const r=e.getParam("options"),o=e.getParam("pagination"),a=e.getParam("sorting"),i=e.getParam("calculations"),l=i.filter((e=>"growth"===e.kind)).pop(),s=i.filter((e=>"rca"===e.kind)).pop(),u=i.filter((e=>"topk"===e.kind)).pop();return{captions:Tl(t,c),cuts:Tl(e.getParam("cuts"),(function(e){const{drillable:t}=e,n=Kl.isLevel(t)?[t.dimension.name,t.hierarchy.name,t.name]:Es(t.fullName);return(e.isExclusive?"~":"")+(e.isForMatch?"*":"")+Cs(n.concat(e.members.join(",")))})),drilldowns:Tl(e.getParam("drilldowns"),(e=>Kl.isLevel(e)?e.fullName:e.name)),filters:Tl(e.getParam("filters"),Rs),measures:Tl(e.getParam("measures"),(e=>e.name)),properties:Tl(e.getParam("properties"),c),limit:o.limit?o.offset>0?`${o.offset},${o.limit}`:`${o.limit}`:void 0,sort:Al.isMeasure(a.property)?`${a.property.name}.${a.direction}`:"string"==typeof a.property?`${a.property}.${a.direction}`:void 0,debug:r.debug,exclude_default_members:r.exclude_default_members,parents:r.parents,sparse:r.sparse,growth:l&&`${l.category.fullName},${l.value.name}`,rca:s&&`${s.location.fullName},${s.category.fullName},${s.value.name}`,top:u&&(e=>{const t=Al.isMeasure(e.value)?e.value.name:e.value;return`${e.amount},${e.category.fullName},${t},${e.order}`})(u)};function c(e){return Cs([e.level.dimension.name,e.level.hierarchy.name,e.level.name,e.name])}}function zs(e,t){const n=e.cube,r={};for(const a of n.levelIterator)r[a.fullName]=a;const o={};for(const a of n.propertyIterator)o[a.fullName]=a;if(Bl(t.captions).forEach((t=>{const n=o[t];n&&e.addCaption(n)})),Bl(t.cuts).forEach((t=>{const{drillable:n,members:o,exclusive:a,forMatch:i}=function(e){let t=e;const n="~"===t[0];t=n?t.slice(1):t;const r="*"===t[0];t=r?t.slice(1):t;const o=Es(e),a=o.pop()||"";return{drillable:Cs(o),members:a.split(","),exclusive:n,forMatch:r}}(t),l=r[n];l&&e.addCut(l,o,{exclusive:a,forMatch:i})})),Bl(t.drilldowns).forEach((t=>{const n=r[t];n&&e.addDrilldown(n)})),Bl(t.filters).forEach((t=>{const r=t.indexOf("."),o=t.slice(0,r),a=Rl[o]||n.measuresByName[o];if(a){const{const1:n,const2:r,joint:o}=ks(t);e.addFilter(a,n,o,r)}})),Bl(t.measures).forEach((t=>{const r=n.measuresByName[t];r&&e.addMeasure(r)})),Bl(t.properties).forEach((t=>{const n=o[t];n&&e.addProperty(n)})),t.growth){const[o,a]=t.growth.split(","),i=r[o],l=n.measuresByName[a];i&&l&&e.addCalculation("growth",{category:i,value:l})}if(t.rca){const[o,a,i]=t.rca.split(","),l=r[o],s=r[a],u=n.measuresByName[i];l&&s&&u&&e.addCalculation("rca",{category:l,location:s,value:u})}if(t.top){const[o,a,i,l]=t.top.split(","),s=Number.parseInt(o),u=r[a],c=Rl[i]||n.measuresByName[i];s>0&&u&&c&&e.addCalculation("topk",{amount:s,category:u,value:c,order:Fl[l]||"desc"})}if(null!=t.limit){const n=`${t.limit}`.split(","),r=2===n.length?n[0]:"0",o=2===n.length?n[1]:n[0];e.setPagination(Number.parseInt(o,10),Number.parseInt(r,10))}if(t.sort){const r=t.sort.lastIndexOf("."),o=t.sort.slice(0,r),a=t.sort.slice(r+1),i=Rl[o]||n.measuresByName[o];i&&e.setSorting(i,Fl[a]||"desc")}return"boolean"==typeof t.debug&&e.setOption("debug",t.debug),"boolean"==typeof t.distinct&&e.setOption("distinct",t.distinct),"boolean"==typeof t.exclude_default_members&&e.setOption("exclude_default_members",t.exclude_default_members),"boolean"==typeof t.nonempty&&e.setOption("nonempty",t.nonempty),"boolean"==typeof t.parents&&e.setOption("parents",t.parents),"boolean"==typeof t.sparse&&e.setOption("sparse",t.sparse),e}function $s(e){return t=>{const n=yl(e.server_uri,"cubes",encodeURIComponent(t.name)),r={...e,cube_name:t.name,cube_uri:n};return{_type:"cube",annotations:t.annotations,caption:t.annotations.caption,dimensions:t.dimensions.map(Bs(r)),measures:t.measures.map(Gs(r)),name:t.name,namedsets:[],uri:n}}}function Bs(e){return t=>{var n;const r=t.name,o=[r],a=yl(e.cube_uri,"dimensions",encodeURIComponent(r)),i={...e,dimension_fullname:o,dimension_name:r,dimension_uri:a};return{_type:"dimension",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,defaultHierarchy:null!=(n=t.default_hierarchy)?n:t.hierarchies[0].name,dimensionType:Il[t.type]||"std",fullName:Cs(o),hierarchies:t.hierarchies.map(Vs(i)),name:t.name,uri:a}}}function Vs(e){return t=>{const n=t.name,r=e.dimension_fullname.concat(n),o=yl(e.dimension_uri,"hierarchies",encodeURIComponent(n)),a={...e,hierarchy_fullname:r,hierarchy_name:n,hierarchy_uri:o};return{_type:"hierarchy",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,dimension:e.dimension_name,fullName:Cs(r),levels:t.levels.map(Us(a)),name:t.name,uri:o}}}function Us(e){return(t,n)=>{const r=t.name,o=e.hierarchy_fullname.concat(r),a=yl(e.hierarchy_uri,"levels",encodeURIComponent(t.name)),i={...e,level_name:r,level_uri:a};return{_type:"level",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,depth:n+1,dimension:e.dimension_name,fullName:Cs(o),hierarchy:e.hierarchy_name,name:t.name,properties:Bl(t.properties).map(Hs(i)),uniqueName:t.unique_name,uri:a}}}function Gs(e){return t=>{var n,r;const o=null==(n=t.aggregator.name)?void 0:n.toUpperCase();return{_type:"measure",aggregatorType:null!=(r=_l[o])?r:"UNKNOWN",annotations:t.annotations,caption:t.annotations.caption,cube:e.cube_name,name:t.name,uri:yl(e.cube_uri,"measures",encodeURIComponent(t.name))}}}function Hs(e){return t=>({_type:"property",annotations:t.annotations,captionSet:t.caption_set,cube:e.cube_name,dimension:e.dimension_name,hierarchy:e.hierarchy_name,level:e.level_name,name:t.name,uniqueName:t.unique_name,uri:yl(e.level_uri,"properties",encodeURIComponent(t.name))})}function qs(e){const t=e.cube,n=Ul(e.getParam("drilldowns"),(e=>Kl.isLevel(e)?e.uniqueName:null)),r=Ul(e.getParam("filters"),Rs),o=Ul(e.getParam("measures"),(e=>e.name)),a=Ul(e.getParam("properties"),(e=>e.uniqueName)),i=e.getParam("options"),l=e.getParam("pagination"),s=e.getParam("sorting"),u=e.getParam("time"),c=e.getParam("calculations").reverse(),d=c.find((e=>"growth"===e.kind)),p=c.find((e=>"rca"===e.kind)),m=c.find((e=>"topk"===e.kind)),g={cube:t.name,locale:e.getParam("locale")||void 0,drilldowns:n.join(",")||void 0,properties:a.join(",")||void 0,measures:o.join(",")||void 0,filters:r.join(",")||void 0,limit:l.limit?l.offset>0?`${l.offset},${l.limit}`:`${l.limit}`:void 0,sort:Al.isMeasure(s.property)?`${s.property.name}.${s.direction}`:"string"==typeof s.property?`${s.property}.${s.direction}`:void 0,time:null!=u.precision&&null!=u.value?`${u.precision}.${u.value}`:void 0,debug:i.debug,exclude_default_members:i.exclude_default_members,parents:i.parents,sparse:i.sparse,growth:d&&`${d.category.uniqueName},${d.value.name}`,rca:p&&`${p.location.uniqueName},${p.category.uniqueName},${p.value.name}`,top:m&&(e=>{const t=Al.isMeasure(e.value)?e.value.name:e.value;return`${e.amount},${e.category.uniqueName},${t},${e.order}`})(m)},f=Ul(e.getParam("cuts"),(e=>{const{drillable:t}=e,n=Kl.isLevel(t)?t:void 0;return n?e.isExclusive?`${n.uniqueName}:${e.members.join(",")}`:(g[n.uniqueName]=e.members.join(","),null):null}));return g.exclude=f.join(";")||void 0,g}function Ws(e,t){const n=e.cube,r={};for(const m of n.levelIterator)r[m.uniqueName]=m;const o={};for(const m of n.propertyIterator)o[m.uniqueName]=m;const a=["cube","drilldowns","time","measures","properties","filters","parents","top","sort","limit","growth","rca","rate","top_where","debug","exclude","exclude_default_members","locale","distinct","nonempty","sparse"],i=Ul(Object.keys(t),(e=>e in r&&!a.includes(e)?{level:e,members:Vl(`${t[e]||""}`)}:null)),l=Ul(Vl(t.exclude,";"),(e=>{const[t,n]=Vl(e,":");return t in r?{level:t,members:n.split(","),exclusive:!0}:null})),[s,u]=Vl(t.limit),[c,d]=Vl(t.sort),p={cube:t.cube,locale:t.locale||"",drilldowns:Ul(Vl(t.drilldowns),(e=>e in r?{level:e}:null)),measures:Ul(Vl(t.measures),(e=>e in n.measuresByName?e:null)),properties:Ul(Vl(t.properties),(e=>e in o?{property:e}:null)),filters:Ul(Vl(t.filters),(e=>{const[t,...r]=Vl(e,"."),o=Rl[t]||n.measuresByName[t];if(!o)return null;const{const1:a,const2:i,joint:l}=ks(r.join("."));return{measure:o,constraint:a,joint:l,constraint2:i}})),cuts:i.concat(l),options:{debug:t.debug,exclude_default_members:t.exclude_default_members,parents:t.parents,sparse:t.sparse},page_limit:Number.parseInt(s)||0,page_offset:Number.parseInt(u)||0,sort_property:c,sort_direction:Fl[d]||"asc",time:void 0};if(t.growth){const[o,a]=t.growth.split(","),i=r[o],l=n.measuresByName[a];i&&l&&e.addCalculation("growth",{category:i,value:l})}if(t.rca){const[o,a,i]=t.rca.split(","),l=r[o],s=r[a],u=n.measuresByName[i];l&&s&&u&&e.addCalculation("rca",{category:l,location:s,value:u})}if(t.top){const[o,a,i,l]=t.top.split(","),s=Number.parseInt(o),u=r[a],c=n.measuresByName[i];s&&u&&c&&e.addCalculation("topk",{amount:s,category:u,order:Fl[l]||"desc",value:c})}if(t.time){const n=Ul(t.time.split("."),(e=>e||null)),r=jl[n[0]],o=Dl(n[1])?n[1]:Ml[n[1]];r&&null!=o&&e.setTime(r,o)}return ts(e,p)}Ls.endpoints=[""],Ls.formats=["csv","tsv","jsonarrays","jsonrecords","xlsx"],Ls.softwareName=Ns;var Ks="tesseract-olap",Ys=class e{constructor(e){if(this.axiosInstance=bl.create({}),this.serverSoftware=Ks,this.serverVersion="",this.serverUrl="/",!e||"string"!=typeof e)throw new TypeError(`Invalid Tesseract OLAP server URL: ${e}`);const t=yl(e,"/");this.serverUrl=t,this.setRequestConfig({baseURL:t})}checkStatus(){return this.axiosInstance.get("/").then((e=>{const{status:t,tesseract_version:n}=e.data;return this.serverOnline="ok"===t,this.serverVersion=n,{software:this.serverSoftware,online:this.serverOnline,url:this.serverUrl,version:this.serverVersion}}),(e=>{throw this.serverOnline=!1,e}))}execQuery(e,t="aggregate"){return"aggregate"===t?this.execQueryAggregate(e):"logiclayer"===t?this.execQueryLogicLayer(e):Promise.reject(new Error(`Invalid endpoint type: ${t}`))}execQueryAggregate(e){const t=Ds(e),n=e.getParam("format"),r=`cubes/${e.cube.name}/aggregate.${n}`,o=ca(t,{ignorenull:!0,skipIndex:!0,sorted:!0});return this.axiosInstance.get(r,{params:t}).then((t=>({data:"jsonrecords"===n?t.data.data:t.data,headers:{...t.headers},query:e,status:t.status,url:`${yl(this.serverUrl,r)}?${o}`})))}execQueryLogicLayer(e){const t=qs(e),n=e.getParam("format"),r=`data.${n}`,o=ca(t,{ignorenull:!0,skipIndex:!0,sorted:!0});return this.axiosInstance.get(r,{params:t}).then((t=>({data:"jsonrecords"===n?t.data.data:t.data,headers:{...t.headers},query:e,status:t.status,url:`${yl(this.serverUrl,r)}?${o}`})))}fetchCube(e){const t=$s({server_uri:this.serverUrl});return this.axiosInstance.get(`cubes/${e}`).then((e=>{const n=e.data;if(n&&"string"==typeof n.name)return t(n);throw new is(e)}),(t=>{if(t.response){if(404===t.response.status)throw new is(t.response,`Cube named "${e}" is not available in server ${this.serverUrl}`);throw new is(t.response,t.message)}throw t}))}fetchCubes(){const e=$s({server_uri:this.serverUrl});return this.axiosInstance.get("cubes").then((t=>{const n=t.data;if(n&&Array.isArray(n.cubes))return n.cubes.map(e);throw new is(t)}))}fetchMembers(e,t={}){const n={cube:e.cube.name,level:e.name,locale:t.locale||void 0},r=(o={level_name:n.level,locale:(n.locale||"").toUpperCase(),server_uri:this.serverUrl},e=>{const t=e[`${o.locale} Label`]||e.Label||`${e.ID}`;return{_type:"member",ancestors:[],caption:t,children:[],fullName:Cs([o.level_name,`${e.ID}`]),key:e.ID,level:o.level_name,name:t,uri:yl(o.server_uri,`members?level=${encodeURIComponent(o.level_name)}`)}});var o;return this.axiosInstance.get("members.jsonrecords",{params:n}).then((e=>{const{data:t}=e.data;return t.map(r)}))}fetchMember(e,t,n={}){return this.fetchMembers(e,n).then((n=>{const r=n.find((e=>e.key==t));if(r)return r;throw new Error(`Can't find member with key '${t}' for level '${e.name}'`)}))}parseQueryURL(e,t,n){const r=t.indexOf("?"),o=t.slice(r+1),a=wl(o),i=t.match(/^.+\/(?:aggregate|data)(\.[a-z]+)?\?.+$/);if(i){const t=`${i[1]||""}`.slice(1);e.setFormat(t)}const l=Qs(a,n);if(t.indexOf("/aggregate")>-1)return zs(e,l);if(t.indexOf("/data")>-1){if(a.cube!==e.cube.name)throw new Error(`URL and Query object belong to different cubes\n Query cube: ${e.cube.name}\n URL cube: ${a.cube}`);return Ws(e,l)}throw new Error(`Provided URL is not a valid Tesseract OLAP query URL: ${t}`)}setRequestConfig(e){Object.assign(this.axiosInstance.defaults,e)}stringifyQueryURL(t,n){return"logiclayer"===n?e.urlLogicLayer(t):e.urlAggregate(t)}static urlAggregate(e){const t=e.getParam("format"),n=Ds(e),r=ca(n,{ignorenull:!0,skipIndex:!0,sorted:!0});return yl(e.cube.toString(),`aggregate.${t}?${r}`)}static urlLogicLayer(e){const t=e.getParam("format"),n=qs(e),r=ca(n,{ignorenull:!0,skipIndex:!0,sorted:!0});return yl(e.cube.server,`data.${t}?${r}`)}};Ys.endpoints=["logiclayer","aggregate"],Ys.formats=["csv","jsonarrays","jsonrecords"],Ys.softwareName=Ks,Ys.queryAggregate=zs,Ys.queryLogicLayer=Ws;var Xs=Ys;function Qs(e,t={}){const{exclude:n,include:r,filter:o}=t,a=()=>!0;let i="function"==typeof o?o:a;if(n||r){const e=Array.isArray(r)?e=>r.reduce(((t,n)=>t&&e===n),!0):a,t=Array.isArray(n)?e=>n.reduce(((t,n)=>t&&e!==n),!0):a;i=n=>e(n)&&t(n)}const l={};return Object.keys(e).forEach((t=>{const n=e[t];i(t,n)&&Object.defineProperty(l,t,{enumerable:!0,value:n})})),l}function Zs(e,t,n){const r=Kl.isLevel(t)?t.cube.name:Kl.isLevelDescriptor(t)?t.cube:void 0;return r?e.getCube(r,n).then((e=>e.getLevel(t))):e.getCubes().then((e=>{let n=e.length;for(;n--;){const r=Hl(e[n].levelIterator,t);if(null!=r)return r}throw new Error(`No level matched the descriptor ${JSON.stringify(t)}`)}))}function Js(e){const t="string"==typeof e?{url:e}:e,{url:n,...r}=t;if(!n){const t=`DataSource can be built with a string URL or an object with the 'url' property.\nReceived ${JSON.stringify(e)}`;return Promise.reject(new Error(t))}const o=yl(n,"cubes");return bl({...r,url:o}).then((e=>{if(200===e.status&&"cubes"in e.data){let t;return t="locales"in e.data?new Ls(n):"name"in e.data?new Xs(n):new Ss(n),t.setRequestConfig(r),t}throw new is(e,`URL is not a known OLAP server: ${n}`)}),(e=>{throw e.message+=`\nURL is not a known OLAP server: ${n}`,e}))}function eu(e){const t=/\/cubes\/([^\/]+)\/|\bcube=([^&]+)&/.exec(e);if(t)return t[1]||t[2];throw new Error(`Provided URL is not a valid Query URL: ${e}`)}var tu=class e{constructor(e){this._cache=new xl((e=>e.name)),e&&this.setDataSource(e)}static dataSourceFromURL(e){return Js(e)}static fromURL(t){return Js(t).then((t=>new e(t)))}checkStatus(){return this.datasource.checkStatus()}get datasource(){if(this._ds)return this._ds;throw new Error("This Client instance has no DataSource configured.\nVerify the initialization procedure, there might be a race condition.")}execQuery(e,t){return this.datasource.execQuery(e,t)}getCube(e){const t=this.datasource;return this._cache.getItem(e,(()=>t.fetchCube(e).then((e=>new os(e,t)))))}getCubes(){const e=this.datasource;return this._cache.getAllItems((()=>e.fetchCubes().then((t=>t.map((t=>new os(t,e)))))))}getMember(e,t,n){return Zs(this,e).then((e=>this.datasource.fetchMember(e,t,n).then((t=>new as(t,e)))))}getMembers(e,t){return Zs(this,e).then((e=>this.datasource.fetchMembers(e,t).then((t=>t.map((t=>new as(t,e)))))))}parseQueryURL(e,t={}){const{serverUrl:n}=this.datasource;if(!t.anyServer&&-1===e.indexOf(n)){const t=`Provided URL doesn't belong to the datasource set on this client instance:\nDataSource server: ${n}\nProvided server: ${e.slice(0,e.indexOf("/",10))}\n`;return Promise.reject(new Error(t))}return Promise.resolve(e).then(eu).then((e=>this.getCube(e))).then((n=>this.datasource.parseQueryURL(n.query,e,t)))}setDataSource(e){e!==this._ds&&(this._ds=e,this._cache=new xl((e=>e.name)))}setRequestConfig(e){this.datasource.setRequestConfig(e)}},nu={},ru={exports:{}},ou={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ou);var au=ou.exports;!function(e){var t=au.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=t(e)&&"function"!=typeof e)return{default:e};var o=n(r);if(o&&o.has(e))return o.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var s=i?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(a,l,s):a[l]=e[l]}return a.default=e,o&&o.set(e,a),a},e.exports.__esModule=!0,e.exports.default=e.exports}(ru);var iu=ru.exports,lu={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(lu);var su,uu={exports:{}},cu={exports:{}};function du(){return su||(su=1,function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}(cu)),cu.exports}var pu,mu={exports:{}};function gu(){return pu||(pu=1,function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports}(mu)),mu.exports}var fu,hu,bu={exports:{}},vu={exports:{}};function yu(){return fu||(fu=1,function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:"y",t={minHeight:"y"===e?"minHeight":"minWidth",height:"y"===e?"height":"width",maxHeight:"y"===e?"maxHeight":"maxWidth"};return function(e){var n;return n={},(0,Lu.default)(n,t.minHeight,e),(0,Lu.default)(n,t.height,e),(0,Lu.default)(n,t.maxHeight,e),(0,Lu.default)(n,"overflowAnchor","none"),(0,Lu.default)(n,"pointerEvents","none"),(0,Lu.default)(n,"userSelect","none"),(0,Lu.default)(n,"padding",0),(0,Lu.default)(n,"margin",0),(0,Lu.default)(n,"border","none"),n}},Bu=function(){try{return window.CSS.supports("overflow-anchor: auto")}catch(e){return!1}}(),Vu=Du.default.forwardRef((function(e,t){var n=e.viewportRef,r=void 0===n?null:n,o=e.items,a=void 0===o?[]:o,i=e.itemMinSize,l=e.margin,s=void 0===l?0:l,u=e.overscan,c=void 0===u?1:u,d=e.axis,p=void 0===d?"y":d,m=e.initialIndex,g=void 0===m?0:m,f=e.initialAlignToTop,h=void 0===f||f,b=e.children,v=(0,Du.useMemo)((function(){return{propName:{top:"y"===p?"top":"left",bottom:"y"===p?"bottom":"right",clientHeight:"y"===p?"clientHeight":"clientWidth",scrollTop:"y"===p?"scrollTop":"scrollLeft",overflowY:"y"===p?"overflowY":"overflowX"},getStyle:$u(p)}}),[p]),y=v.propName,w=v.getStyle,x=a.length-1,S=i+s,C=c*S,E=(0,Du.useState)((function(){var e=zu(0,g,x);return[e,e]})),k=(0,Nu.default)(E,2),_=(0,Nu.default)(k[0],2),R=_[0],O=_[1],I=k[1],P=(0,Du.useRef)(null),F=(0,Du.useRef)(null),j=(0,Du.useRef)({cache:[],step:function(){},scrollToIndex:R?{index:R,alignToTop:h}:null,scrollCompensationEndIndex:null}),M=zu(0,R,x),A=zu(M,O,x),T=(0,Du.useMemo)((function(){return w(j.current.cache.slice(0,M).reduce((function(e,t){return e+t}),M*S))}),[M,S,w]),N=(0,Du.useMemo)((function(){return w(j.current.cache.slice(A+1,x).reduce((function(e,t){return e+t}),S*(x-A)))}),[A,x,S,w]),L=(0,Du.useMemo)((function(){return a.slice(M,A+1).map((function(e,t){return b(e,M+t)}))}),[a,M,A,b]);return j.current.step=function(){var e,t,n,o=r&&r.current&&r.current.getBoundingClientRect(),a=(o?zu(0,o[y.top],document.documentElement[y.clientHeight]):0)-C,l=(o?zu(0,o[y.bottom],document.documentElement[y.clientHeight]):document.documentElement[y.clientHeight])+C,u=P.current.nextSibling.getBoundingClientRect(),c=F.current.previousSibling.getBoundingClientRect(),d=Math.ceil((l-a)/S),p=R,m=O;if(j.current.scrollToIndex){var g=zu(0,j.current.scrollToIndex.index,x);if(g>=R&&g<=O){for(t=R,n=P.current.nextSibling;n!==F.current;){if(t===g){n.scrollIntoView(j.current.scrollToIndex.alignToTop),j.current.scrollToIndex=null;break}n=n.nextSibling,++t}return}p=g-d,m=g+d}else if(u[y.top]>=l){for(e=u[y.top]-l,m=R;e>=0&&m>0;)e-=(j.current.cache[--m]||0)+S;j.current.scrollCompensationEndIndex=R,p=m-d}else if(c[y.bottom]+s<=a){for(e=a-c[y.bottom]+s,p=O;e>=0&&p=a){for(e=u[y.top]-a;e>=0&&p>0;)e-=(j.current.cache[--p]||0)+S;j.current.scrollCompensationEndIndex=R}if(c[y.bottom]+s<=l)for(e=l-c[y.bottom]-s;e>=0&&ml&&--m}if(p=zu(0,p,x),m=zu(p,m,x),p!==R||m!==O){for(t=R,n=P.current.nextSibling;t<=O&&n!==F.current;)j.current.cache[t++]=n[y.clientHeight]-i,n=n.nextSibling;I([p,m])}},(0,Du.useImperativeHandle)(t,(function(){return{scrollToIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.current.scrollToIndex={index:e,alignToTop:t}}}}),[]),(0,Du.useLayoutEffect)((function(){if(null!==j.current.scrollCompensationEndIndex)if(r&&!Bu){for(var e=R,t=P.current.nextSibling,n=0;e{t.setState((t=>({...t,[e]:ec(n,t[e])})))}}function nc(e){return e instanceof Function}function rc(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}function oc(e,t,n){let r,o=[];return()=>{let a;n.key&&n.debug&&(a=Date.now());const i=e();if(i.length===o.length&&!i.some(((e,t)=>o[t]!==e)))return r;let l;if(o=i,n.key&&n.debug&&(l=Date.now()),r=t(...i),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const ic={createTable:e=>{e.getHeaderGroups=oc((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var a,i;const l=null!=(a=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[],s=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[];return lc(t,[...l,...n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),...s],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=oc((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>lc(t,n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=oc((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;const a=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return lc(t,a,e,"left")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightHeaderGroups=oc((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;const a=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return lc(t,a,e,"right")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFooterGroups=oc((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFooterGroups=oc((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFooterGroups=oc((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFooterGroups=oc((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFlatHeaders=oc((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=oc((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=oc((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFlatHeaders=oc((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=oc((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=oc((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightLeafHeaders=oc((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeafHeaders=oc((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,a,i,l,s;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(a=null==(i=t[0])?void 0:i.headers)?a:[],...null!=(l=null==(s=n[0])?void 0:s.headers)?l:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}};function lc(e,t,n,r){var o,a;let i=0;const l=function(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&l(e.columns,t+1)}),0)};l(e);let s=[];const u=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},a=[];e.forEach((e=>{const i=[...a].reverse()[0];let l,s=!1;if(e.column.depth===o.depth&&e.column.parent?l=e.column.parent:(l=e.column,s=!0),i&&(null==i?void 0:i.column)===l)i.subHeaders.push(e);else{const o=ac(n,l,{id:[r,t,l.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${a.filter((e=>e.column===l)).length}`:void 0,depth:t,index:a.length});o.subHeaders.push(e),a.push(o)}o.headers.push(e),e.headerGroup=o})),s.push(o),t>0&&u(a,t-1)},c=t.map(((e,t)=>ac(n,e,{depth:i,index:t})));u(c,i-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(a=s[0])?void 0:a.headers)?o:[]),s}const sc={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},uc={getDefaultColumnDef:()=>sc,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:tc("columnSizing",e),onColumnSizingInfoChange:tc("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:sc.minSize,null!=(r=null!=a?a:e.columnDef.size)?r:sc.size),null!=(o=e.columnDef.maxSize)?o:sc.maxSize)},e.getStart=n=>{const r=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=r.findIndex((t=>t.id===e.id));if(o>0){const e=r[o-1];return e.getStart(n)+e.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),r=null==n?void 0:n.getCanResize();return o=>{if(!n||!r)return;if(null==o.persist||o.persist(),dc(o)&&o.touches&&o.touches.length>1)return;const a=e.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],l=dc(o)?Math.round(o.touches[0].clientX):o.clientX,s={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var t,r;const o=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),a=Math.max(o/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*a,0))/100})),{...e,deltaOffset:o,deltaPercentage:a}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...s}))))},c=e=>u("move",e),d=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p={moveHandler:e=>c(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",p.moveHandler),document.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1),upHandler:e=>{var t;document.removeEventListener("touchmove",m.moveHandler),document.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof cc)return cc;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return cc=e,cc}()&&{passive:!1};dc(o)?(document.addEventListener("touchmove",m.moveHandler,g),document.addEventListener("touchend",m.upHandler,g)):(document.addEventListener("mousemove",p.moveHandler,g),document.addEventListener("mouseup",p.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:n.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;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;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;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;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;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;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let cc=null;function dc(e){return"touchstart"===e.type}const pc={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:tc("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;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,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const a=!0===r||!(null==r||!r[e.id]);let i={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{i[e]=!0})):i=r,n=null!=(o=n)?o:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:t,...n}=i;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},mc=(e,t,n)=>{var r;const o=n.toLowerCase();return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())||null==(r=r.toLowerCase())?void 0:r.includes(o))};mc.autoRemove=e=>Cc(e);const gc=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};gc.autoRemove=e=>Cc(e);const fc=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};fc.autoRemove=e=>Cc(e);const hc=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};hc.autoRemove=e=>Cc(e)||!(null!=e&&e.length);const bc=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));bc.autoRemove=e=>Cc(e)||!(null!=e&&e.length);const vc=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));vc.autoRemove=e=>Cc(e)||!(null!=e&&e.length);const yc=(e,t,n)=>e.getValue(t)===n;yc.autoRemove=e=>Cc(e);const wc=(e,t,n)=>e.getValue(t)==n;wc.autoRemove=e=>Cc(e);const xc=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};xc.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,a=null===t||Number.isNaN(r)?-1/0:r,i=null===n||Number.isNaN(o)?1/0:o;if(a>i){const e=a;a=i,i=e}return[a,i]},xc.autoRemove=e=>Cc(e)||Cc(e[0])&&Cc(e[1]);const Sc={includesString:mc,includesStringSensitive:gc,equalsString:fc,arrIncludes:hc,arrIncludesAll:bc,arrIncludesSome:vc,equals:yc,weakEquals:wc,inNumberRange:xc};function Cc(e){return null==e||""===e}const Ec={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:tc("columnFilters",e),onGlobalFilterChange:tc("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?Sc.includesString:"number"==typeof r?Sc.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?Sc.equals:Array.isArray(r)?Sc.arrIncludes:Sc.weakEquals},e.getFilterFn=()=>{var n,r;return nc(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:Sc[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,o,a;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(a=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||a)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),a=ec(n,o?o.value:void 0);var i;if(kc(r,a,e))return null!=(i=null==t?void 0:t.filter((t=>t.id!==e.id)))?i:[];const l={id:e.id,value:a};var s;return o?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?l:t)))?s:[]:null!=t&&t.length?[...t,l]:[l]}))},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()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Sc.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return nc(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:Sc[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=ec(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));return!t||!kc(t.getFilterFn(),e.value,t)}))}))},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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()),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()}}};function kc(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const _c={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const r=Math.floor(n.length/2),o=n.sort(((e,t)=>e-t));return n.length%2!=0?o[r]:(o[r-1]+o[r])/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},Rc={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;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:tc("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,r,o,a;return null!=(n=null==(r=null!=(o=null==(a=e.columnDef.enableGrouping)||a)?o:t.options.enableGrouping)||r)?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?_c.sum:"[object Date]"===Object.prototype.toString.call(r)?_c.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return nc(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:_c[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}},Oc={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:tc("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=oc((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));if("remove"===n)return r;const o=t.map((t=>e.find((e=>e.id===t)))).filter(Boolean);return[...o,...r]}(o,t,n)}),{key:!1})}},Ic={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:tc("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;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=>ec(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=ec(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,ec(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=ec(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=oc((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&te.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+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;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},Pc={getInitialState:e=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:tc("columnPinning",e),onRowPinningChange:tc("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,a,i,l,s;return"right"===n?{left:(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(i=null==e?void 0:e.right)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(l=null==e?void 0:e.left)?l:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,a=n.some((e=>null==r?void 0:r.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return a?"left":!!i&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],i=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],l=new Set([...i,e.id,...a]);t.setRowPinning((e=>{var t,r,o,a,i,s;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:[...(null!=(a=null==e?void 0:e.bottom)?a:[]).filter((e=>!(null!=l&&l.has(e)))),...Array.from(l)]}:"top"===n?{top:[...(null!=(i=null==e?void 0:e.top)?i:[]).filter((e=>!(null!=l&&l.has(e)))),...Array.from(l)],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=l&&l.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=l&&l.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some((e=>null==r?void 0:r.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return a?"top":!!i&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const a=null==(n=t._getPinnedRows(o))?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==a?void 0:a.indexOf(e.id))?r:-1},e.getCenterVisibleCells=oc((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getLeftVisibleCells=oc((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>{const n=(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})));return n}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getRightVisibleCells=oc((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>{const n=(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})));return n}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(a=r.right)?void 0:a.length))},e.getLeftLeafColumns=oc((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getRightLeafColumns=oc((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getCenterLeafColumns=oc((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(a=r.bottom)?void 0:a.length))},e._getPinnedRows=t=>oc((()=>[e.getRowModel().rows,e.getState().rowPinning[t]]),((n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=r?r:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=r?r:[]).map((e=>n.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:t})))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=oc((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}},Fc={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:tc("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;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{jc(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=oc((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?Mc(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=oc((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?Mc(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=oc((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?Mc(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((a=>{var i;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return a;const l={...a};return jc(l,e.id,n,null==(i=null==r?void 0:r.selectChildren)||i,t),l}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ac(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===Tc(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===Tc(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},jc=(e,t,n,r,o)=>{var a;const i=o.getRow(t);n?(i.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(a=i.subRows)&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>jc(e,t.id,n,r,o)))};function Mc(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(e,t){return e.map((e=>{var t;const i=Ac(e,n);if(i&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:a(e.subRows)}),i)return e})).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:o}}function Ac(e,t){var n;return null!=(n=t[e.id])&&n}function Tc(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,a=!1;return e.subRows.forEach((e=>{if((!a||o)&&(e.getCanSelect()&&(Ac(e,t)?a=!0:o=!1),e.subRows&&e.subRows.length)){const n=Tc(e,t);"all"===n?a=!0:"some"===n?(a=!0,o=!1):o=!1}})),o?"all":!!a&&"some"}const Nc=/([0-9]+)/gm;function Lc(e,t){return e===t?0:e>t?1:-1}function Dc(e){return"boolean"==typeof e?String(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function zc(e,t){const n=parseFloat(e),r=parseFloat(t);if(!isNaN(n)&&!isNaN(r))return Lc(n,r);const o=e.split(Nc).filter(Boolean),a=t.split(Nc).filter(Boolean);for(;o.length&&a.length;){const e=o.shift(),t=a.shift(),n=parseInt(e,10),r=parseInt(t,10),i=[n,r].sort();if(isNaN(i[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(i[1]))return isNaN(n)?-1:1;if(n>r)return 1;if(r>n)return-1}}return o.length-a.length}const $c={alphanumeric:(e,t,n)=>zc(Dc(e.getValue(n)).toLowerCase(),Dc(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>zc(Dc(e.getValue(n)),Dc(t.getValue(n))),text:(e,t,n)=>Lc(Dc(e.getValue(n)).toLowerCase(),Dc(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Lc(Dc(e.getValue(n)),Dc(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rLc(e.getValue(n),t.getValue(n))},Bc={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:tc("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return $c.datetime;if("string"==typeof n&&(r=!0,n.split(Nc).length>1))return $c.alphanumeric}return r?$c.text:$c.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return nc(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:$c[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=null!=n;t.setSorting((i=>{const l=null==i?void 0:i.find((t=>t.id===e.id)),s=null==i?void 0:i.findIndex((t=>t.id===e.id));let u,c=[],d=a?n:"desc"===o;var p;return u=null!=i&&i.length&&e.getCanMultiSort()&&r?l?"toggle":"add":null!=i&&i.length&&s!==i.length-1?"replace":l?"toggle":"replace","toggle"===u&&(a||o||(u="remove")),"add"===u?(c=[...i,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))):c="toggle"===u?i.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?i.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}],c}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?!!(i===a||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===i?"asc":"desc"):a},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.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();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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())}},Vc={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:tc("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,r;return null==(n=null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=oc((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getVisibleCells=oc((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{const t=(t,n)=>oc((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;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;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},Uc=[ic,Vc,Oc,Pc,Ec,Bc,Rc,pc,Ic,Fc,uc];function Gc(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:Uc};const r=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let o={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;o=null!=(t=null==e.getInitialState?void 0:e.getInitialState(o))?t:o}));const a=[];let i=!1;const l={_features:Uc,options:{...r,...e},initialState:o,_queue:e=>{a.push(e),i||(i=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();i=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=ec(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(r,e):{...r,...e})(t)},getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:(e,t,r)=>{var o;return null!=(o=null==n.options.getRowId?void 0:n.options.getRowId(e,t,r))?o:`${r?[r.id,t].join("."):t}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{const r=(t?n.getCoreRowModel():n.getRowModel()).rowsById[e];if(!r)throw new Error;return r},_getDefaultColumnDef:oc((()=>[n.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:!1}),_getColumnDefs:()=>n.options.columns,getAllColumns:oc((()=>[n._getColumnDefs()]),(e=>{const t=function(e,r,o){return void 0===o&&(o=0),e.map((e=>{const a=function(e,t,n,r){var o,a;const i={...e._getDefaultColumnDef(),...t},l=i.accessorKey;let s,u=null!=(o=null!=(a=i.id)?a:l?l.replace(".","_"):void 0)?o:"string"==typeof i.header?i.header:void 0;if(i.accessorFn?s=i.accessorFn:l&&(s=l.includes(".")?e=>{let t=e;for(const r of l.split(".")){var n;t=null==(n=t)?void 0:n[r]}return t}:e=>e[i.accessorKey]),!u)throw new Error;let c={id:`${String(u)}`,accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:oc((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:oc((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=c.columns)&&t.length){let t=c.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[c]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};for(const d of e._features)null==d.createColumn||d.createColumn(c,e);return c}(n,e,o,r),i=e;return a.columns=i.columns?t(i.columns,a,o+1):[],a}))};return t(e)}),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:oc((()=>[n.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:oc((()=>[n.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:oc((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:e=>n._getAllFlatColumnsById()[e]};Object.assign(n,l);for(let s=0;s{let l={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,r),l._valuesCache[t]):void 0},getUniqueValues:t=>{if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=a?a:[],getLeafRows:()=>rc(l.subRows,(e=>e.subRows)),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let e=[],t=l;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:oc((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:oc((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,l,t,t.id)))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:oc((()=>[l.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let s=0;soc((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const r=t.filter((t=>e.getColumn(t))),o=[],a={},i=function(t,n,l){if(void 0===n&&(n=0),n>=r.length)return t.map((e=>(e.depth=n,o.push(e),a[e.id]=e,e.subRows&&(e.subRows=i(e.subRows,n+1,e.id)),e)));const s=r[n],u=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const r=`${n.getGroupingValue(t)}`,o=e.get(r);return o?o.push(n):e.set(r,[n]),e}),n)}(t,s),c=Array.from(u.entries()).map(((t,u)=>{let[c,d]=t,p=`${s}:${c}`;p=l?`${l}>${p}`:p;const m=i(d,n+1,p),g=n?rc(d,(e=>e.subRows)):d,f=Hc(e,p,g[0].original,u,n,void 0,l);return Object.assign(f,{groupingColumnId:s,groupingValue:c,subRows:m,leafRows:g,getValue:t=>{var n;if(r.includes(t))return f._valuesCache.hasOwnProperty(t)||d[0]&&(f._valuesCache[t]=null!=(n=d[0].getValue(t))?n:void 0),f._valuesCache[t];if(f._groupingValuesCache.hasOwnProperty(t))return f._groupingValuesCache[t];const o=e.getColumn(t),a=null==o?void 0:o.getAggregationFn();return a?(f._groupingValuesCache[t]=a(t,g,d),f._groupingValuesCache[t]):void 0}}),m.forEach((e=>{o.push(e),a[e.id]=e})),f}));return c},l=i(n.rows,0);return l.forEach((e=>{o.push(e),a[e.id]=e})),{rows:l,flatRows:o,rowsById:a}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}function Kc(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}} +/** + * match-sorter-utils + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +const Yc={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},Xc=Object.keys(Yc).join("|"),Qc=new RegExp(Xc,"g"),Zc={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Jc(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:Zc.MATCHES,!n.accessors){const r=ed(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}const o=function(e,t){const n=[];for(let r=0,o=t.length;r=Zc.MATCHES?r=l:r>s&&(r=s),r=Math.min(r,s),r>=u&&r>a.rank&&(a.rank=r,a.passed=!0,a.accessorIndex=i,a.accessorThreshold=u,a.rankedValue=e.itemValue)}return a}function ed(e,t,n){return e=td(e,n),(t=td(t,n)).length>e.length?Zc.NO_MATCH:e===t?Zc.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?Zc.EQUAL:e.startsWith(t)?Zc.STARTS_WITH:e.includes(` ${t}`)?Zc.WORD_STARTS_WITH:e.includes(t)?Zc.CONTAINS:1===t.length?Zc.NO_MATCH:function(e){let t="";return e.split(" ").forEach((e=>{e.split("-").forEach((e=>{t+=e.substr(0,1)}))})),t}(e).includes(t)?Zc.ACRONYM:function(e,t){let n=0,r=0;function o(e,t,r){for(let o=r,a=t.length;o-1))return Zc.NO_MATCH;const l=r-i;return a(l)}(e,t)}function td(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(Qc,(e=>Yc[e]))),e}function nd(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}const rd={maxRanking:1/0,minRanking:-1/0};function od(e){return"function"==typeof e?rd:{...rd,...e}} +/** + * react-virtual + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ad(){return ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;a--){var i=e[a];if(!n.has(i.lane)){var l=o.get(i.lane);if(null==l||i.end>l.end?o.set(i.lane,i):i.end0?Math.min.apply(Math,r.pendingMeasuredCacheIndexes):0;r.pendingMeasuredCacheIndexes=[];for(var s=r.measurementsCache.slice(0,l),u=l;u=r.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));var o=r.options.horizontal?"scrollWidth":"scrollHeight",a=(r.scrollElement?"document"in r.scrollElement?r.scrollElement.document.documentElement[o]:r.scrollElement[o]:0)-r.getSize();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=function(e,t){void 0===t&&(t="auto"),e=Math.max(0,Math.min(e,r.options.count-1));var n=sd(r.getMeasurements()[e]);if("auto"===t)if(n.end>=r.scrollOffset+r.getSize()-r.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r.scrollOffset+r.options.scrollPaddingStart))return[r.scrollOffset,t];t="start"}var o="end"===t?n.end+r.options.scrollPaddingEnd:n.start-r.options.scrollPaddingStart;return[r.getOffsetForAlignment(o,t),t]},this.isDynamicMode=function(){return r.measureElementCache.size>0},this.cancelScrollToIndex=function(){null!==r.scrollToIndexTimeoutId&&(clearTimeout(r.scrollToIndexTimeoutId),r.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(e,t){var n=void 0===t?{}:t,o=n.align,a=void 0===o?"start":o,i=n.behavior;r.cancelScrollToIndex(),"smooth"===i&&r.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r._scrollToOffset(r.getOffsetForAlignment(e,a),{adjustments:void 0,behavior:i})},this.scrollToIndex=function(e,t){var n=void 0===t?{}:t,o=n.align,a=void 0===o?"auto":o,i=n.behavior;e=Math.max(0,Math.min(e,r.options.count-1)),r.cancelScrollToIndex(),"smooth"===i&&r.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var l=r.getOffsetForIndex(e,a),s=l[0],u=l[1];r._scrollToOffset(s,{adjustments:void 0,behavior:i}),"smooth"!==i&&r.isDynamicMode()&&(r.scrollToIndexTimeoutId=setTimeout((function(){r.scrollToIndexTimeoutId=null,r.measureElementCache.has(r.options.getItemKey(e))&&function(e,t){return Math.abs(e-t)<1}(r.getOffsetForIndex(e,u)[0],r.scrollOffset)||r.scrollToIndex(e,{align:u,behavior:i})})))},this.scrollBy=function(e,t){var n=(void 0===t?{}:t).behavior;r.cancelScrollToIndex(),"smooth"===n&&r.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r._scrollToOffset(r.scrollOffset+e,{adjustments:void 0,behavior:n})},this.getTotalSize=function(){var e;return((null==(e=r.getMeasurements()[r.options.count-1])?void 0:e.end)||r.options.paddingStart)-r.options.scrollMargin+r.options.paddingEnd},this._scrollToOffset=function(e,t){var n=t.adjustments,o=t.behavior;r.options.scrollToFn(e,{behavior:o,adjustments:n},r)},this.measure=function(){r.itemSizeCache=new Map,r.notify()},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((function(e){r.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()},hd=function(e,t,n,r){for(;e<=t;){var o=(e+t)/2|0,a=n(o);if(ar))return o;t=o-1}}return e>0?e-1:0},bd="undefined"!=typeof document?n.useLayoutEffect:n.useEffect; +/** + * virtual-core + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function vd(e){return function(e){var t=n.useReducer((function(){return{}}),{})[1],r=ad({},e,{onChange:function(n){t(),null==e.onChange||e.onChange(n)}}),o=n.useState((function(){return new fd(r)}))[0];return o.setOptions(r),n.useEffect((function(){return o._didMount()}),[]),bd((function(){return o._willUpdate()})),o}(ad({observeElementRect:dd,observeElementOffset:pd,scrollToFn:gd},e))}function yd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const o=Jc(e.getValue(t),n,{threshold:Zc.MATCHES});return r(o),o.passed};xd.autoRemove=e=>!e;const Sd=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim().includes(n.toString().toLowerCase().trim());Sd.autoRemove=e=>!e;const Cd=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim().startsWith(n.toString().toLowerCase().trim());Cd.autoRemove=e=>!e;const Ed=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim().endsWith(n.toString().toLowerCase().trim());Ed.autoRemove=e=>!e;const kd=(e,t,n)=>null===n||e.getValue(t).toString().toLowerCase().trim()===n.toString().toLowerCase().trim();kd.autoRemove=e=>!e;const _d=(e,t,n)=>e.getValue(t).toString().toLowerCase().trim()!==n.toString().toLowerCase().trim();_d.autoRemove=e=>!e;const Rd=(e,t,n)=>null===n||(isNaN(+n)||isNaN(+e.getValue(t))?e.getValue(t).toString().toLowerCase().trim()>n.toString().toLowerCase().trim():+e.getValue(t)>+n);Rd.autoRemove=e=>!e;const Od=(e,t,n)=>kd(e,t,n)||Rd(e,t,n);Od.autoRemove=e=>!e;const Id=(e,t,n)=>null===n||(isNaN(+n)||isNaN(+e.getValue(t))?e.getValue(t).toString().toLowerCase().trim()!e;const Pd=(e,t,n)=>kd(e,t,n)||Id(e,t,n);Pd.autoRemove=e=>!e;const Fd=(e,t,n)=>(["",void 0].includes(n[0])||Rd(e,t,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||Id(e,t,n[1]));Fd.autoRemove=e=>!e;const jd=(e,t,n)=>(["",void 0].includes(n[0])||Od(e,t,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||Pd(e,t,n[1]));jd.autoRemove=e=>!e;const Md=(e,t,n)=>!e.getValue(t).toString().trim();Md.autoRemove=e=>!e;const Ad=(e,t,n)=>!!e.getValue(t).toString().trim();Ad.autoRemove=e=>!e;const Td=Object.assign(Object.assign({},Sc),{between:Fd,betweenInclusive:jd,contains:Sd,empty:Md,endsWith:Ed,equals:kd,fuzzy:xd,greaterThan:Rd,greaterThanOrEqualTo:Od,lessThan:Id,lessThanOrEqualTo:Pd,notEmpty:Ad,notEquals:_d,startsWith:Cd}),Nd=Object.assign(Object.assign({},$c),{fuzzy:(e,t,n)=>{let r=0;return e.columnFiltersMeta[n]&&(r=function(e,t){return e.rank===t.rank?0:e.rank>t.rank?-1:1}(e.columnFiltersMeta[n],t.columnFiltersMeta[n])),0===r?$c.alphanumeric(e,t,n):r}}),Ld=e=>{var t,n,r,o;return null!==(o=null!==(t=e.id)&&void 0!==t?t:null===(r=null===(n=e.accessorKey)||void 0===n?void 0:n.toString)||void 0===r?void 0:r.call(n))&&void 0!==o?o:e.header},Dd=e=>{const t=[],n=e=>{e.forEach((e=>{e.columns?n(e.columns):t.push(e)}))};return n(e),t},zd=({aggregationFns:e,columnDefs:t,columnFilterFns:n,defaultDisplayColumn:r,filterFns:o,sortingFns:a})=>t.map((t=>{var i,l;if(t.id||(t.id=Ld(t)),t.columnDefType||(t.columnDefType="data"),null===(i=t.columns)||void 0===i?void 0:i.length)t.columnDefType="group",t.columns=zd({aggregationFns:e,columnDefs:t.columns,columnFilterFns:n,defaultDisplayColumn:r,filterFns:o,sortingFns:a});else if("data"===t.columnDefType){if(Array.isArray(t.aggregationFn)){const n=t.aggregationFn;t.aggregationFn=(t,r,o)=>n.map((n=>{var a;return null===(a=e[n])||void 0===a?void 0:a.call(e,t,r,o)}))}Object.keys(o).includes(n[t.id])&&(t.filterFn=null!==(l=o[n[t.id]])&&void 0!==l?l:o.fuzzy,t._filterFn=n[t.id]),Object.keys(a).includes(t.sortingFn)&&(t.sortingFn=a[t.sortingFn])}else"display"===t.columnDefType&&(t=Object.assign(Object.assign({},r),t));return t})),$d=(e,t,n)=>(e.getCanPin()&&e.pin(t.getIsPinned()),n.splice(n.indexOf(t.id),0,n.splice(n.indexOf(e.id),1)[0]),[...n]),Bd=(e,t)=>!!(e.enableExpanding||e.enableGrouping&&(void 0===t||(null==t?void 0:t.length))||e.renderDetailPanel),Vd=e=>{const t=(e=>{var t;return[(e.enableRowDragging||e.enableRowOrdering)&&"mrt-row-drag","first"===e.positionActionsColumn&&(e.enableRowActions||e.enableEditing&&["row","modal","custom"].includes(null!==(t=e.editDisplayMode)&&void 0!==t?t:""))&&"mrt-row-actions","first"===e.positionExpandColumn&&Bd(e)&&"mrt-row-expand",e.enableRowSelection&&"mrt-row-select",e.enableRowNumbers&&"mrt-row-numbers"].filter(Boolean)})(e),n=(e=>{var t;return["last"===e.positionActionsColumn&&(e.enableRowActions||e.enableEditing&&["row","modal"].includes(null!==(t=e.editDisplayMode)&&void 0!==t?t:""))&&"mrt-row-actions","last"===e.positionExpandColumn&&Bd(e)&&"mrt-row-expand"].filter(Boolean)})(e),r=Dd(e.columns).map((e=>Ld(e))).filter((e=>!t.includes(e)&&!n.includes(e)));return[...t,...r,...n]},Ud=e=>{const{filterVariant:t}=e;return"multi-select"===t?"arrIncludesSome":["range","date-range","range-slider"].includes(t||"")?"betweenInclusive":["select","checkbox","date"].includes(t||"")?"equals":"fuzzy"},Gd=(e,t)=>"left"===t.getIsPinned()&&e.getLeftLeafHeaders().length-1===t.getPinnedIndex(),Hd=e=>"right"===e.getIsPinned()&&0===e.getPinnedIndex(),qd=(e,t)=>e.getRightLeafHeaders().slice(t.getPinnedIndex()+1).reduce(((e,t)=>e+t.getSize()),0),Wd=e=>{const{options:t,getState:n}=e,{manualExpanding:r,manualFiltering:o,manualGrouping:a,manualSorting:i,enableGlobalFilterRankedResults:l}=t,{globalFilterFn:s,expanded:u}=n();return!r&&!o&&!a&&!i&&l&&"fuzzy"===s&&!0!==u&&!Object.values(u).some(Boolean)},Kd=({column:e,header:t,isStriped:n,row:r,table:o,tableCellProps:a,theme:i})=>{var l,s,u,c,d,p,m,g,f,h;const b={minWidth:`max(calc(var(--${t?"header":"col"}-${Zd(null!==(l=null==t?void 0:t.id)&&void 0!==l?l:e.id)}-size) * 1px), ${null!==(s=e.columnDef.minSize)&&void 0!==s?s:30}px)`,width:`calc(var(--${t?"header":"col"}-${Zd(null!==(u=null==t?void 0:t.id)&&void 0!==u?u:e.id)}-size) * 1px)`};return Object.assign(Object.assign(Object.assign({backgroundColor:r?(null==r?void 0:r.getIsSelected())?i.fn.rgba(Qd(i),.1):e.getIsPinned()&&"group"!==e.columnDef.columnDefType?i.fn.rgba("dark"===i.colorScheme?i.fn.darken(i.colors.dark[7],.02):i.white,.97):n?"inherit":"dark"===i.colorScheme?i.fn.lighten(i.colors.dark[7],.02):i.white:"inherit",backgroundClip:"padding-box",boxShadow:Gd(o,e)?`-4px 0 8px -6px ${i.fn.rgba(i.black,.2)} inset`:Hd(e)?`4px 0 8px -6px ${i.fn.rgba(i.black,.2)} inset`:void 0,display:"grid"===o.options.layoutMode?"flex":"table-cell",flex:"grid"===o.options.layoutMode?`var(--${t?"header":"col"}-${Zd(null!==(c=null==t?void 0:t.id)&&void 0!==c?c:e.id)}-size) 0 auto`:void 0,left:"left"===e.getIsPinned()?`${e.getStart("left")}px`:void 0,ml:o.options.enableColumnVirtualization&&"left"===e.getIsPinned()&&0===e.getPinnedIndex()?`-${e.getSize()*(null!==(p=null===(d=o.getState().columnPinning.left)||void 0===d?void 0:d.length)&&void 0!==p?p:1)}px`:void 0,mr:o.options.enableColumnVirtualization&&"right"===e.getIsPinned()&&e.getPinnedIndex()===o.getVisibleLeafColumns().length-1?`-${e.getSize()*(null!==(g=null===(m=o.getState().columnPinning.right)||void 0===m?void 0:m.length)&&void 0!==g?g:1)*1.2}px`:void 0,opacity:(null===(f=o.getState().draggingColumn)||void 0===f?void 0:f.id)===e.id||(null===(h=o.getState().hoveredColumn)||void 0===h?void 0:h.id)===e.id?.5:1,position:e.getIsPinned()&&"group"!==e.columnDef.columnDefType?"sticky":void 0,right:"right"===e.getIsPinned()?`${qd(o,e)}px`:void 0,transition:o.options.enableColumnVirtualization?"none":"padding 100ms ease-in-out"},!o.options.enableColumnResizing&&b),(null==a?void 0:a.sx)instanceof Function?a.sx(i):null==a?void 0:a.sx),o.options.enableColumnResizing&&b)},Yd={filterVariant:"text",minSize:40,maxSize:1e3,size:180},Xd={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},Qd=(e,t)=>e.colors[e.primaryColor][null!=t?t:(e=>{var t,n,r,o,a;return null!==(a="dark"===e.colorScheme?null!==(n=null===(t=e.primaryShade)||void 0===t?void 0:t.dark)&&void 0!==n?n:e.primaryShade:null!==(o=null===(r=e.primaryShade)||void 0===r?void 0:r.light)&&void 0!==o?o:e.primaryShade)&&void 0!==a?a:7})(e)],Zd=e=>e.replace(/[^a-zA-Z0-9]/g,"_"),Jd={actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSort:"Clear sort",clickToCopy:"Click to copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all"},ep={IconArrowAutofitContent:ht,IconArrowsSort:bt,IconBaselineDensityLarge:vt,IconBaselineDensityMedium:yt,IconBaselineDensitySmall:wt,IconBoxMultiple:xt,IconChevronDown:Ct,IconChevronLeft:kt,IconChevronLeftPipe:Et,IconChevronRight:Rt,IconChevronRightPipe:_t,IconChevronsDown:Ot,IconCircleX:Mt,IconClearAll:Tt,IconColumns:Lt,IconDeviceFloppy:zt,IconDots:Bt,IconDotsVertical:$t,IconEdit:Vt,IconEyeOff:Gt,IconFilter:Wt,IconFilterCog:Ht,IconFilterOff:qt,IconGripHorizontal:Yt,IconMaximize:Zt,IconMinimize:Jt,IconPinned:tn,IconPinnedOff:en,IconSearch:an,IconSearchOff:on,IconSortAscending:ln,IconSortDescending:sn,IconX:bn},tp=({cell:e,table:t})=>{var r;const{getState:o,options:{createDisplayMode:a,editDisplayMode:i,mantineEditTextInputProps:l,mantineEditSelectProps:s},refs:{editInputRefs:u},setEditingCell:c,setEditingRow:d,setCreatingRow:p}=t,{column:m,row:g}=e,{columnDef:f}=m,{creatingRow:h,editingRow:b}=o(),v=(null==h?void 0:h.id)===g.id,x=(null==b?void 0:b.id)===g.id,S="select"===f.editVariant,[C,E]=n.useState((()=>e.getValue())),k=l instanceof Function?l({cell:e,column:m,row:g,table:t}):l,_=f.mantineEditTextInputProps instanceof Function?f.mantineEditTextInputProps({cell:e,column:m,row:g,table:t}):f.mantineEditTextInputProps,R=Object.assign(Object.assign({},k),_),O=s instanceof Function?s({cell:e,column:m,row:g,table:t}):s,I=f.mantineEditSelectProps instanceof Function?f.mantineEditSelectProps({cell:e,column:m,row:g,table:t}):f.mantineEditSelectProps,P=Object.assign(Object.assign({},O),I),F=e=>{var t,n;null===(t=R.onBlur)||void 0===t||t.call(R,e),n=C,g._valuesCache[m.id]=n,v?p(g):x&&d(g),c(null)};if(f.Edit)return null===(r=f.Edit)||void 0===r?void 0:r.call(f,{cell:e,column:m,row:g,table:t});const j={disabled:!1===(f.enableEditing instanceof Function?f.enableEditing(g):f.enableEditing),label:["modal","custom"].includes(v?a:i)?m.columnDef.header:void 0,name:e.id,placeholder:["modal","custom"].includes(v?a:i)?void 0:f.header,value:C,variant:"table"===i?"unstyled":"default",onClick:e=>{var t;e.stopPropagation(),null===(t=null==R?void 0:R.onClick)||void 0===t||t.call(R,e)}};return S?Ju.jsx(y,Object.assign({},j,{searchable:!0,value:C,withinPortal:!0},P,{onBlur:F,onChange:e=>{var t;null===(t=P.onChange)||void 0===t||t.call(P,e),E(e)},onClick:e=>{var t;e.stopPropagation(),null===(t=null==P?void 0:P.onClick)||void 0===t||t.call(P,e)},ref:t=>{t&&(u.current[e.id]=t,P.ref&&(P.ref.current=t))}})):Ju.jsx(w,Object.assign({},j,{onKeyDown:t=>{var n,r;null===(n=R.onKeyDown)||void 0===n||n.call(R,t),"Enter"===t.key&&(null===(r=u.current[e.id])||void 0===r||r.blur())},value:null!=C?C:""},R,{onBlur:F,onChange:e=>{var t;null===(t=R.onChange)||void 0===t||t.call(R,e),E(e.target.value)},onClick:e=>{var t;e.stopPropagation(),null===(t=null==R?void 0:R.onClick)||void 0===t||t.call(R,e)},ref:t=>{t&&(u.current[e.id]=t,R.ref&&(R.ref.current=t))}}))},np=({cell:e,children:t,table:n})=>{const{options:{localization:r,mantineCopyButtonProps:o}}=n,{column:a,row:i}=e,{columnDef:l}=a,s=o instanceof Function?o({cell:e,column:a,row:i,table:n}):o,u=l.mantineCopyButtonProps instanceof Function?l.mantineCopyButtonProps({cell:e,column:a,row:i,table:n}):l.mantineCopyButtonProps,c=Object.assign(Object.assign({},s),u);return Ju.jsx(x,{value:e.getValue(),children:({copied:e,copy:n})=>{var o;return Ju.jsx(d,{color:e?"green":void 0,withinPortal:!0,openDelay:1e3,label:null!==(o=null==c?void 0:c.title)&&void 0!==o?o:e?r.copiedToClipboard:r.clickToCopy,children:Ju.jsx(S,Object.assign({},c,{onClick:e=>{e.stopPropagation(),n()},sx:e=>Object.assign({backgroundColor:"transparent",border:"none",borderRadius:"4px",color:"inherit",cursor:"copy",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",justifyContent:"inherit",letterSpacing:"inherit",margin:"-4px",minWidth:"unset",padding:"4px",textAlign:"inherit",textTransform:"inherit","&:active":{transform:"translateY(1px)"},"&:hover":{backgroundColor:e.fn.rgba(Qd(e),.1)}},(null==c?void 0:c.sx)instanceof Function?c.sx(e):null==c?void 0:c.sx),title:void 0,children:t}))})}})},rp=["string","number"],op=["text","autocomplete"],ap=({cell:e,table:t})=>{var n,r;const{getState:o,options:{enableFilterMatchHighlighting:a,mantineHighlightProps:i}}=t,{column:l,row:s}=e,{columnDef:u}=l,{globalFilter:c,globalFilterFn:d}=o(),p=l.getFilterValue(),m=i instanceof Function?i({cell:e,column:l,row:s,table:t}):i;let g=e.getIsAggregated()&&u.AggregatedCell?u.AggregatedCell({cell:e,column:l,row:s,table:t}):s.getIsGrouped()&&!e.getIsGrouped()?null:e.getIsGrouped()&&u.GroupedCell?u.GroupedCell({cell:e,column:l,row:s,table:t}):void 0;const f=void 0!==g;if(f||(g=e.renderValue()),a&&!1!==u.enableFilterMatchHighlighting&&g&&rp.includes(typeof g)&&(p&&rp.includes(typeof p)&&op.includes(u.filterVariant)||c&&rp.includes(typeof c)&&l.getCanGlobalFilter())){let e=(null!==(r=null!==(n=l.getFilterValue())&&void 0!==n?n:c)&&void 0!==r?r:"").toString();"fuzzy"===(p?u._filterFn:d)&&(e=e.split(" ")),g=Ju.jsx(C,Object.assign({highlightColor:"yellow.3",highlight:e},m,{children:null==g?void 0:g.toString()}))}return u.Cell&&!f&&(g=u.Cell({cell:e,renderedCellValue:g,column:l,row:s,table:t})),g},ip=({cell:e,isStriped:t,measureElement:r,numRows:o,rowIndex:a,rowRef:i,table:s,virtualCell:u})=>{var d,p,m,g;const f=l(),{getState:h,options:{createDisplayMode:v,editDisplayMode:y,enableClickToCopy:w,enableColumnOrdering:x,enableEditing:S,enableGrouping:C,enableRowNumbers:E,layoutMode:k,mantineTableBodyCellProps:_,mantineSkeletonProps:R,rowNumberMode:O},refs:{editInputRefs:I},setEditingCell:P,setHoveredColumn:F}=s,{creatingRow:j,density:M,draggingColumn:A,draggingRow:T,editingCell:N,editingRow:L,hoveredColumn:D,hoveredRow:z,isLoading:$,showSkeletons:B}=h(),{column:V,row:U}=e,{columnDef:G}=V,{columnDefType:H}=G,q=_ instanceof Function?_({cell:e,column:V,row:U,table:s}):_,W=G.mantineTableBodyCellProps instanceof Function?G.mantineTableBodyCellProps({cell:e,column:V,row:U,table:s}):G.mantineTableBodyCellProps,K=Object.assign(Object.assign({},q),W),Y=R instanceof Function?R({cell:e,column:V,row:U,table:s}):R,[X,Q]=n.useState(100);n.useEffect((()=>{if(!$&&!B||100!==X)return;const e=V.getSize();Q("display"===H?e/2:Math.round(Math.random()*(e-e/3)+e/3))}),[$,B]);const Z=n.useMemo((()=>{const e=(null==A?void 0:A.id)===V.id,t=(null==D?void 0:D.id)===V.id,n=(null==T?void 0:T.id)===U.id,r=(null==z?void 0:z.id)===U.id,i=((e,t)=>t.getVisibleLeafColumns()[0].id===e.id)(V,s),l=((e,t)=>{const n=t.getVisibleLeafColumns();return n[n.length-1].id===e.id})(V,s),u=a===o&&o-1,c=e||n?`1px dashed ${f.colors.gray[7]} !important`:t||r?`2px dashed ${Qd(f)} !important`:void 0;return c?{borderLeft:e||t||(n||r)&&i?c:void 0,borderRight:e||t||(n||r)&&l?c:void 0,borderBottom:n||r||u?c:void 0,borderTop:n||r?c:void 0}:void 0}),[A,T,D,z,a]),J=(S instanceof Function?S(U):S)&&!1!==(G.enableEditing instanceof Function?G.enableEditing(U):G.enableEditing),ee=J&&!["modal","custom"].includes(y)&&("table"===y||(null==L?void 0:L.id)===U.id||(null==N?void 0:N.id)===e.id)&&!U.getIsGrouped(),te=J&&"row"===v&&(null==j?void 0:j.id)===U.id;return Ju.jsxs(c,Object.assign({component:"td","data-index":null==u?void 0:u.index,ref:e=>{e&&(null==r||r(e))}},K,{onDragEnter:e=>{var t;null===(t=null==K?void 0:K.onDragEnter)||void 0===t||t.call(K,e),C&&"drop-zone"===(null==D?void 0:D.id)&&F(null),x&&A&&F(!1!==G.enableColumnOrdering?V:null)},onDoubleClick:t=>{var n;null===(n=null==K?void 0:K.onDoubleClick)||void 0===n||n.call(K,t),J&&"cell"===y&&(P(e),setTimeout((()=>{var t;const n=I.current[e.id];n&&(n.focus(),null===(t=n.select)||void 0===t||t.call(n))}),100))},sx:e=>Object.assign(Object.assign({alignItems:"grid"===k?"center":void 0,cursor:J&&"cell"===y?"pointer":"inherit",justifyContent:"grid"===k?K.align:void 0,overflow:"hidden",paddingLeft:"mrt-row-expand"===V.id?`${U.depth+1}rem !important`:void 0,textOverflow:"display"!==H?"ellipsis":void 0,whiteSpace:"xs"===M?"nowrap":"normal",zIndex:(null==A?void 0:A.id)===V.id?2:V.getIsPinned()?1:0,"&:hover":{outline:ee&&["table","cell"].includes(null!=y?y:"")&&"display"!==H?`1px solid ${e.colors.gray[7]}`:void 0,outlineOffset:"-1px",textOverflow:"clip"}},Kd({column:V,isStriped:t,row:U,table:s,theme:e,tableCellProps:K})),Z),children:[Ju.jsx(Ju.Fragment,{children:e.getIsPlaceholder()?null!==(p=null===(d=G.PlaceholderCell)||void 0===d?void 0:d.call(G,{cell:e,column:V,row:U,table:s}))&&void 0!==p?p:null:($||B)&&[void 0,null].includes(e.getValue())?Ju.jsx(b,Object.assign({height:20,width:X},Y)):E&&"static"===O&&"mrt-row-numbers"===V.id?a+1:"display"!==H||!["mrt-row-drag","mrt-row-expand","mrt-row-select"].includes(V.id)&&U.getIsGrouped()?te||ee?Ju.jsx(tp,{cell:e,table:s}):(w||G.enableClickToCopy)&&!1!==G.enableClickToCopy?Ju.jsx(np,{cell:e,table:s,children:Ju.jsx(ap,{cell:e,table:s})}):Ju.jsx(ap,{cell:e,table:s}):null===(m=G.Cell)||void 0===m?void 0:m.call(G,{cell:e,column:V,row:U,rowRef:i,renderedCellValue:Ju.jsx(Ju.Fragment,{children:e.getValue()}),table:s})}),e.getIsGrouped()&&!G.GroupedCell&&Ju.jsxs(Ju.Fragment,{children:[" (",null===(g=U.subRows)||void 0===g?void 0:g.length,")"]})]}))},lp=n.memo(ip,((e,t)=>t.cell===e.cell)),sp=({parentRowRef:e,row:t,rowIndex:n,table:r,virtualRow:o})=>{const{getVisibleLeafColumns:a,getState:i,options:{layoutMode:l,mantineTableBodyRowProps:s,mantineDetailPanelProps:u,renderDetailPanel:d}}=r,{isLoading:p}=i(),m=s instanceof Function?s({isDetailPanel:!0,row:t,staticRowIndex:n,table:r}):s,g=u instanceof Function?u({row:t,table:r}):u;return Ju.jsx(c,Object.assign({component:"tr",className:"mantine-TableBodyCell-DetailPanel"},m,{sx:t=>{var n,r;return Object.assign({display:"grid"===l?"flex":"table-row",position:o?"absolute":void 0,top:o?`${null===(r=null===(n=e.current)||void 0===n?void 0:n.getBoundingClientRect())||void 0===r?void 0:r.height}px`:void 0,transform:o?`translateY(${null==o?void 0:o.start}px)`:void 0,width:"100%",zIndex:o?2:void 0},(null==m?void 0:m.sx)instanceof Function?m.sx(t):null==m?void 0:m.sx)},children:Ju.jsx(c,Object.assign({component:"td",className:"mantine-TableBodyCell-DetailPanel",colSpan:a().length},g,{sx:e=>Object.assign({backgroundColor:o?e.fn.lighten(e.colors.dark[7],.06):void 0,borderBottom:t.getIsExpanded()?void 0:"none",display:"grid"===l?"flex":"table-cell",paddingBottom:t.getIsExpanded()?"16px !important":"0 !important",paddingTop:t.getIsExpanded()?"16px !important":"0 !important",transition:"all 100ms ease-in-out",width:`${r.getTotalSize()}px`},(null==g?void 0:g.sx)instanceof Function?g.sx(e):null==g?void 0:g.sx),children:d&&Ju.jsx(E,{in:t.getIsExpanded(),children:!p&&d({row:t,table:r})})}))}))},up=({columnVirtualizer:e,enableHover:t,isStriped:r,measureElement:o,numRows:a,row:i,rowIndex:l,table:s,virtualColumns:u,virtualPaddingLeft:d,virtualPaddingRight:p,virtualRow:m})=>{const{getState:g,options:{enableRowOrdering:f,layoutMode:h,memoMode:b,mantineTableBodyRowProps:v,renderDetailPanel:y},setHoveredRow:w}=s,{draggingColumn:x,draggingRow:S,editingCell:C,editingRow:E,hoveredRow:k}=g(),_=v instanceof Function?v({row:i,staticRowIndex:l,table:s}):v,R=n.useRef(null);return Ju.jsxs(Ju.Fragment,{children:[Ju.jsxs(c,Object.assign({component:"tr","data-index":null==m?void 0:m.index,onDragEnter:e=>{f&&S&&w(i)},ref:e=>{e&&(R.current=e,null==o||o(e))}},_,{sx:e=>Object.assign({boxSizing:"border-box",display:"grid"===h?"flex":"table-row",opacity:(null==S?void 0:S.id)===i.id||(null==k?void 0:k.id)===i.id?.5:1,position:m?"absolute":void 0,top:m?0:void 0,transition:m?"none":"all 100ms ease-in-out",width:"100%","&:hover td":{backgroundColor:!1!==t?i.getIsSelected()?e.fn.rgba(Qd(e),.2):"dark"===e.colorScheme?`${e.fn.lighten(e.colors.dark[7],.12)}`:`${e.fn.darken(e.white,.05)}`:void 0}},(null==_?void 0:_.sx)instanceof Function?_.sx(e):null==_?void 0:_.sx),style:Object.assign({transform:m?`translateY(${null==m?void 0:m.start}px)`:void 0},null==_?void 0:_.style),children:[d?Ju.jsx("td",{style:{display:"flex",width:d}}):null,(null!=u?u:i.getVisibleCells()).map((t=>{var n,o;const u=e?i.getVisibleCells()[t.index]:t,c={cell:u,isStriped:r,measureElement:null==e?void 0:e.measureElement,numRows:a,rowIndex:l,rowRef:R,table:s,virtualCell:e?t:void 0};return"cells"!==b||"data"!==u.column.columnDef.columnDefType||x||S||(null==C?void 0:C.id)===u.id||(null==E?void 0:E.id)===i.id?Ju.jsx(ip,Object.assign({},c),u.id+(null===(o=u.getValue)||void 0===o?void 0:o.toString())):Ju.jsx(lp,Object.assign({},c),u.id+(null===(n=u.getValue())||void 0===n?void 0:n.toString()))})),p?Ju.jsx("td",{style:{display:"flex",width:p}}):null]})),y&&!i.getIsGrouped()&&Ju.jsx(sp,{parentRowRef:R,row:i,rowIndex:l,table:s,virtualRow:m})]})},cp=n.memo(up,((e,t)=>e.row===t.row&&e.rowIndex===t.rowIndex)),dp=({columnVirtualizer:e,enableHover:t,isStriped:r,table:o,virtualColumns:a,virtualPaddingLeft:i,virtualPaddingRight:l})=>{var s,u,d;const{getRowModel:p,getPrePaginationRowModel:m,getState:g,options:{createDisplayMode:f,enableGlobalFilterRankedResults:h,enablePagination:b,enableRowVirtualization:y,layoutMode:w,localization:x,mantineTableBodyProps:S,manualExpanding:C,manualFiltering:E,manualGrouping:k,manualPagination:_,manualSorting:R,memoMode:O,renderEmptyRowsFallback:I,rowVirtualizerInstanceRef:P,rowVirtualizerProps:F},refs:{tableContainerRef:j,tablePaperRef:M}}=o,{creatingRow:A,columnFilters:T,density:N,expanded:L,globalFilter:D,pagination:z,sorting:$}=g(),B=S instanceof Function?S({table:o}):S,V=F instanceof Function?F({table:o}):F,U=n.useMemo((()=>Wd(o)&&!Object.values($).some(Boolean)&&D),[h,L,D,C,E,k,R,$]),G=n.useMemo((()=>{if(!U)return p().rows;const e=m().rows.sort(((e,t)=>{return n=e,r=t,Math.max(...Object.values(r.columnFiltersMeta).map((e=>e.rank)))-Math.max(...Object.values(n.columnFiltersMeta).map((e=>e.rank)));var n,r}));if(b&&!_){const t=z.pageIndex*z.pageSize;return e.slice(t,t+z.pageSize)}return e}),[U,U?m().rows:p().rows,z.pageIndex,z.pageSize]),H=y?vd(Object.assign({count:G.length,estimateSize:()=>"xs"===N?42.7:"md"===N?54.7:70.7,getScrollElement:()=>j.current,measureElement:"undefined"!=typeof window&&-1===navigator.userAgent.indexOf("Firefox")?e=>null==e?void 0:e.getBoundingClientRect().height:void 0,overscan:4},V)):void 0;P&&H&&(P.current=H);const q=H?H.getVirtualItems():void 0;return Ju.jsxs(c,Object.assign({component:"tbody"},B,{sx:e=>Object.assign({display:"grid"===w?"grid":"table-row-group",height:H?`${H.getTotalSize()}px`:"inherit",minHeight:G.length?void 0:"100px",position:"relative"},(null==B?void 0:B.sx)instanceof Function?null==B?void 0:B.sx(e):null==B?void 0:B.sx),children:[A&&"row"===f&&Ju.jsx(up,{table:o,row:A,rowIndex:-1}),G.length?Ju.jsx(Ju.Fragment,{children:(null!=q?q:G).map(((n,s)=>{const u=H?G[n.index]:n,c={columnVirtualizer:e,enableHover:t,isStriped:r,measureElement:null==H?void 0:H.measureElement,numRows:G.length,row:u,rowIndex:H?n.index:s,table:o,virtualColumns:a,virtualPaddingLeft:i,virtualPaddingRight:l,virtualRow:H?n:void 0};return"rows"===O?Ju.jsx(cp,Object.assign({},c),u.id||`mrt-${u.index}`):Ju.jsx(up,Object.assign({},c),u.id||`mrt-${u.index}`)}))}):Ju.jsx("tr",{style:{display:"grid"===w?"grid":"table-row"},children:Ju.jsx("td",{colSpan:o.getVisibleLeafColumns().length,style:{display:"grid"===w?"grid":"table-cell"},children:null!==(s=null==I?void 0:I({table:o}))&&void 0!==s?s:Ju.jsx(v,{sx:{color:"gray",fontStyle:"italic",maxWidth:`min(100vw, ${null!==(d=null===(u=M.current)||void 0===u?void 0:u.clientWidth)&&void 0!==d?d:360}px)`,paddingTop:"2rem",paddingBottom:"2rem",textAlign:"center",width:"100%"},children:D||T.length?x.noResultsFound:x.noRecordsToDisplay})})})]}))},pp=n.memo(dp,((e,t)=>e.table.options.data===t.table.options.data)),mp=({actionIconProps:e,onDragEnd:t,onDragStart:n,table:r})=>{var o,a;const{options:{icons:{IconGripHorizontal:i},localization:l}}=r;return Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(o=null==e?void 0:e.title)&&void 0!==o?o:l.move,children:Ju.jsx(p,Object.assign({draggable:"true",size:"sm","aria-label":null!==(a=null==e?void 0:e.title)&&void 0!==a?a:l.move},e,{onClick:t=>{var n;t.stopPropagation(),null===(n=null==e?void 0:e.onClick)||void 0===n||n.call(e,t)},onDragStart:n,onDragEnd:t,sx:t=>Object.assign({cursor:"grab",margin:"0 -0.16px",opacity:.5,padding:"2px",transition:"opacity 100ms ease-in-out","&:hover":{backgroundColor:"transparent",opacity:1},"&:active":{cursor:"grabbing"}},(null==e?void 0:e.sx)instanceof Function?null==e?void 0:e.sx(t):null==e?void 0:e.sx),title:void 0,children:Ju.jsx(i,{})}))})},gp=({row:e,rowRef:t,table:n})=>{const{options:{mantineRowDragHandleProps:r}}=n,o=r instanceof Function?r({row:e,table:n}):r;return Ju.jsx(mp,{actionIconProps:o,onDragStart:r=>{var a;null===(a=null==o?void 0:o.onDragStart)||void 0===a||a.call(o,r),r.dataTransfer.setDragImage(t.current,0,0),n.setDraggingRow(e)},onDragEnd:e=>{var t;null===(t=null==o?void 0:o.onDragEnd)||void 0===t||t.call(o,e),n.setDraggingRow(null),n.setHoveredRow(null)},table:n})},fp=({table:e})=>{var t,n;const{getIsAllRowsExpanded:r,getIsSomeRowsExpanded:o,getCanSomeRowsExpand:a,getState:i,options:{icons:{IconChevronsDown:l},localization:s,mantineExpandAllButtonProps:u,renderDetailPanel:c},toggleAllRowsExpanded:m}=e,{density:g,isLoading:f}=i(),h=u instanceof Function?u({table:e}):u,b=r();return Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:(null!==(t=null==h?void 0:h.title)&&void 0!==t?t:b)?s.collapseAll:s.expandAll,children:Ju.jsx(p,Object.assign({"aria-label":s.expandAll,disabled:f||!c&&!a(),onClick:()=>m(!b)},h,{sx:e=>Object.assign({marginLeft:"xl"===g?"-6px":"md"===g?"0":"6px",opacity:.8,"&:disabled":{backgroundColor:"transparent",border:"none"},"&:hover":{opacity:1}},(null==h?void 0:h.sx)instanceof Function?null==h?void 0:h.sx(e):null==h?void 0:h.sx),title:void 0,children:null!==(n=null==h?void 0:h.children)&&void 0!==n?n:Ju.jsx(l,{style:{transform:`rotate(${b?-180:o()?-90:0}deg)`,transition:"transform 100ms"}})}))})},hp=({row:e,table:t})=>{var n,r;const{options:{icons:{IconChevronDown:o},localization:a,mantineExpandButtonProps:i,renderDetailPanel:l}}=t,s=i instanceof Function?i({table:t,row:e}):i,u=e.getCanExpand(),c=e.getIsExpanded();return Ju.jsx(d,{withinPortal:!0,disabled:!u&&!l,openDelay:1e3,label:(null!==(n=null==s?void 0:s.title)&&void 0!==n?n:c)?a.collapse:a.expand,children:Ju.jsx(p,Object.assign({"aria-label":a.expand,disabled:!u&&!l},s,{onClick:t=>{var n;t.stopPropagation(),e.toggleExpanded(),null===(n=null==s?void 0:s.onClick)||void 0===n||n.call(s,t)},sx:e=>Object.assign({opacity:.8,"&:disabled":{backgroundColor:"transparent",border:"none"},"&:hover":{opacity:1}},(null==s?void 0:s.sx)instanceof Function?s.sx(e):null==s?void 0:s.sx),title:void 0,children:null!==(r=null==s?void 0:s.children)&&void 0!==r?r:Ju.jsx(o,{style:{transform:`rotate(${u||l?c?-180:0:-90}deg)`,transition:"transform 100ms"}})}))})},bp=({handleEdit:e,row:t,table:n})=>{const{options:{editDisplayMode:r,enableEditing:o,icons:{IconEdit:a,IconDots:i},localization:l,positionActionsColumn:s,renderRowActionMenuItems:u}}=n;return Ju.jsxs(M,{position:"first"===s?"bottom-start":"last"===s?"bottom-end":void 0,closeOnItemClick:!0,withinPortal:!0,children:[Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:l.rowActions,children:Ju.jsx(M.Target,{children:Ju.jsx(p,{"aria-label":l.rowActions,onClick:e=>e.stopPropagation(),size:"sm",children:Ju.jsx(i,{})})})}),Ju.jsxs(M.Dropdown,{onClick:e=>e.stopPropagation(),children:[o&&"table"!==r&&Ju.jsx(M.Item,{icon:Ju.jsx(a,{}),onClick:e,children:l.edit}),null==u?void 0:u({row:t,table:n})]})]})},vp=({row:e,table:t,variant:n="icon"})=>{const{getState:r,options:{icons:{IconCircleX:o,IconDeviceFloppy:a},localization:i,onCreatingRowCancel:l,onCreatingRowSave:s,onEditingRowSave:u,onEditingRowCancel:m},refs:{editInputRefs:g},setCreatingRow:f,setEditingRow:h}=t,{creatingRow:b,editingRow:v,isSaving:y}=r(),w=(null==b?void 0:b.id)===e.id,x=(null==v?void 0:v.id)===e.id,S=()=>{w?(null==l||l({row:e,table:t}),f(null)):x&&(null==m||m({row:e,table:t}),h(null)),e._valuesCache={}},C=()=>{var n;null===(n=Object.values(null==g?void 0:g.current).filter((t=>{var n,r;return e.id===(null===(r=null===(n=null==t?void 0:t.name)||void 0===n?void 0:n.split("_"))||void 0===r?void 0:r[0])})))||void 0===n||n.forEach((t=>{void 0!==t.value&&Object.hasOwn(null==e?void 0:e._valuesCache,t.name)&&(e._valuesCache[t.name]=t.value)})),w?null==s||s({exitCreatingMode:()=>f(null),row:e,table:t,values:e._valuesCache}):x&&(null==u||u({exitEditingMode:()=>h(null),row:e,table:t,values:null==e?void 0:e._valuesCache}))};return Ju.jsx(c,{onClick:e=>e.stopPropagation(),sx:{display:"flex",gap:"12px"},children:"icon"===n?Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(d,{withinPortal:!0,label:i.cancel,children:Ju.jsx(p,{"aria-label":i.cancel,onClick:S,children:Ju.jsx(o,{})})}),Ju.jsx(d,{withinPortal:!0,label:i.save,children:Ju.jsx(p,{"aria-label":i.save,color:"blue",onClick:C,loading:y,children:Ju.jsx(a,{})})})]}):Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(V,{onClick:S,variant:"subtle",children:i.cancel}),Ju.jsx(V,{onClick:C,variant:"filled",loading:y,children:i.save})]})})},yp=({cell:e,row:t,table:n})=>{const{getState:r,options:{createDisplayMode:o,editDisplayMode:a,enableEditing:i,icons:{IconEdit:l},localization:s,renderRowActionMenuItems:u,renderRowActions:c},setEditingRow:m}=n,{creatingRow:g,editingRow:f}=r(),h=(null==g?void 0:g.id)===t.id,b=(null==f?void 0:f.id)===t.id,v=e=>{e.stopPropagation(),m(Object.assign({},t))},y=h&&"row"===o||b&&"row"===a;return Ju.jsx(Ju.Fragment,{children:c&&!y?c({cell:e,row:t,table:n}):y?Ju.jsx(vp,{row:t,table:n}):!u&&(i instanceof Function?i(t):i)?Ju.jsx(d,{withinPortal:!0,position:"right",label:s.edit,children:Ju.jsx(p,{"aria-label":s.edit,disabled:!!f&&f.id!==t.id,onClick:v,sx:{opacity:.8,"&:hover":{opacity:1},"&:disabled":{backgroundColor:"transparent",border:"none"}},children:Ju.jsx(l,{})})}):u?Ju.jsx(bp,{handleEdit:v,row:t,table:n}):null})},wp=({row:e,selectAll:t,table:n})=>{var r;const{getState:o,options:{enableMultiRowSelection:a,localization:i,mantineSelectAllCheckboxProps:l,mantineSelectCheckboxProps:s,selectAllMode:u,selectDisplayMode:c}}=n,{density:p,isLoading:m}=o(),g=e?s instanceof Function?s({row:e,table:n}):s:l instanceof Function?l({table:n}):l,f=t?"page"===u?n.getIsAllPageRowsSelected():n.getIsAllRowsSelected():void 0,h=Object.assign(Object.assign({"aria-label":t?i.toggleSelectAll:i.toggleSelectRow,checked:t?f:null==e?void 0:e.getIsSelected(),disabled:m||e&&!e.getCanSelect(),onChange:e?e.getToggleSelectedHandler():"all"===u?n.getToggleAllRowsSelectedHandler():n.getToggleAllPageRowsSelectedHandler(),size:"xs"===p?"sm":"md"},g),{onClick:e=>{var t;e.stopPropagation(),null===(t=null==g?void 0:g.onClick)||void 0===t||t.call(g,e)},title:void 0});return Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(r=null==g?void 0:g.title)&&void 0!==r?r:t?i.toggleSelectAll:i.toggleSelectRow,children:Ju.jsx("span",{children:"switch"===c?Ju.jsx(I,Object.assign({},h)):"radio"===c||!1===a?Ju.jsx(P,Object.assign({},h)):Ju.jsx(F,Object.assign({indeterminate:t?n.getIsSomeRowsSelected()&&!f:null==e?void 0:e.getIsSomeSelected()},h))})})},xp=e=>{var t,r,o,a,i,l,s,u,c,d,p,m,g,f,h,b,v,y,w,x,S,C,E,k,_,R,O,I,P,F,j,M,A,T,N;const L=n.useRef(null),D=n.useRef({}),z=n.useRef({}),$=n.useRef(null),B=n.useRef(null),V=n.useRef({}),U=n.useRef(null),G=n.useRef(null),H=n.useMemo((()=>{var t,n,r;const o=null!==(t=e.initialState)&&void 0!==t?t:{};return o.columnOrder=null!==(n=o.columnOrder)&&void 0!==n?n:Vd(e),o.globalFilterFn=null!==(r=e.globalFilterFn)&&void 0!==r?r:"fuzzy",o}),[]),[q,W]=n.useState(null!==(t=H.creatingRow)&&void 0!==t?t:null),[K,Y]=n.useState((()=>Object.assign({},...Dd(e.columns).map((e=>{var t,n,r,o;return{[Ld(e)]:e.filterFn instanceof Function?null!==(t=e.filterFn.name)&&void 0!==t?t:"custom":null!==(o=null!==(n=e.filterFn)&&void 0!==n?n:null===(r=null==H?void 0:H.columnFilterFns)||void 0===r?void 0:r[Ld(e)])&&void 0!==o?o:Ud(e)}}))))),[X,Q]=n.useState(null!==(r=H.columnOrder)&&void 0!==r?r:[]),[Z,J]=n.useState(null!==(o=null==H?void 0:H.density)&&void 0!==o?o:"md"),[ee,te]=n.useState(null!==(a=H.draggingColumn)&&void 0!==a?a:null),[ne,re]=n.useState(null!==(i=H.draggingRow)&&void 0!==i?i:null),[oe,ae]=n.useState(null!==(l=H.editingCell)&&void 0!==l?l:null),[ie,le]=n.useState(null!==(s=H.editingRow)&&void 0!==s?s:null),[se,ue]=n.useState(null!==(u=H.globalFilterFn)&&void 0!==u?u:"fuzzy"),[ce,de]=n.useState(null!==(c=H.grouping)&&void 0!==c?c:[]),[pe,me]=n.useState(null!==(d=H.hoveredColumn)&&void 0!==d?d:null),[ge,fe]=n.useState(null!==(p=H.hoveredRow)&&void 0!==p?p:null),[he,be]=n.useState(null!==(m=null==H?void 0:H.isFullScreen)&&void 0!==m&&m),[ve,ye]=n.useState(null!==(f=null===(g=e.initialState)||void 0===g?void 0:g.showAlertBanner)&&void 0!==f&&f),[we,xe]=n.useState(null!==(h=null==H?void 0:H.showColumnFilters)&&void 0!==h&&h),[Se,Ce]=n.useState(null!==(b=null==H?void 0:H.showGlobalFilter)&&void 0!==b&&b),[Ee,ke]=n.useState(null!==(v=null==H?void 0:H.showToolbarDropZone)&&void 0!==v&&v),_e=(({creatingRow:e,columnOrder:t,grouping:r,tableOptions:o})=>{var a,i;return n.useMemo((()=>{var n,a,i,l,s,u,c,d,p,m,g,f,h,b,v,y,w;return[(null!==(a=null===(n=o.state)||void 0===n?void 0:n.columnOrder)&&void 0!==a?a:t).includes("mrt-row-drag")&&Object.assign(Object.assign(Object.assign({Cell:({row:e,rowRef:t,table:n})=>Ju.jsx(gp,{row:e,rowRef:t,table:n}),header:o.localization.move,size:60},o.defaultDisplayColumn),null===(i=o.displayColumnDefOptions)||void 0===i?void 0:i["mrt-row-drag"]),{id:"mrt-row-drag"}),((null!==(s=null===(l=o.state)||void 0===l?void 0:l.columnOrder)&&void 0!==s?s:t).includes("mrt-row-actions")||e&&"row"===o.createDisplayMode)&&Object.assign(Object.assign(Object.assign({Cell:({cell:e,row:t,table:n})=>Ju.jsx(yp,{cell:e,row:t,table:n}),header:o.localization.actions,size:70},o.defaultDisplayColumn),null===(u=o.displayColumnDefOptions)||void 0===u?void 0:u["mrt-row-actions"]),{id:"mrt-row-actions"}),(null!==(d=null===(c=o.state)||void 0===c?void 0:c.columnOrder)&&void 0!==d?d:t).includes("mrt-row-expand")&&Bd(o,null!==(m=null===(p=o.state)||void 0===p?void 0:p.grouping)&&void 0!==m?m:r)&&Object.assign(Object.assign(Object.assign({Cell:({row:e,table:t})=>Ju.jsx(hp,{row:e,table:t}),Header:o.enableExpandAll?({table:e})=>Ju.jsx(fp,{table:e}):null,header:o.localization.expand,size:60},o.defaultDisplayColumn),null===(g=o.displayColumnDefOptions)||void 0===g?void 0:g["mrt-row-expand"]),{id:"mrt-row-expand"}),(null!==(h=null===(f=o.state)||void 0===f?void 0:f.columnOrder)&&void 0!==h?h:t).includes("mrt-row-select")&&Object.assign(Object.assign(Object.assign({Cell:({row:e,table:t})=>Ju.jsx(wp,{row:e,table:t}),Header:o.enableSelectAll&&o.enableMultiRowSelection?({table:e})=>Ju.jsx(wp,{selectAll:!0,table:e}):null,header:o.localization.select,size:60},o.defaultDisplayColumn),null===(b=o.displayColumnDefOptions)||void 0===b?void 0:b["mrt-row-select"]),{id:"mrt-row-select"}),(null!==(y=null===(v=o.state)||void 0===v?void 0:v.columnOrder)&&void 0!==y?y:t).includes("mrt-row-numbers")&&Object.assign(Object.assign(Object.assign({Cell:({row:e})=>e.index+1,Header:()=>o.localization.rowNumber,header:o.localization.rowNumbers,size:60},o.defaultDisplayColumn),null===(w=o.displayColumnDefOptions)||void 0===w?void 0:w["mrt-row-numbers"]),{id:"mrt-row-numbers"})].filter(Boolean)}),[t,r,o.displayColumnDefOptions,o.editDisplayMode,o.enableColumnDragging,o.enableColumnFilterModes,o.enableColumnOrdering,o.enableEditing,o.enableExpandAll,o.enableExpanding,o.enableGrouping,o.enableRowActions,o.enableRowDragging,o.enableRowNumbers,o.enableRowOrdering,o.enableRowSelection,o.enableSelectAll,o.localization,o.positionActionsColumn,o.renderDetailPanel,o.renderRowActionMenuItems,o.renderRowActions,null===(a=o.state)||void 0===a?void 0:a.columnOrder,null===(i=o.state)||void 0===i?void 0:i.grouping])})({columnOrder:X,creatingRow:q,grouping:ce,tableOptions:e}),Re=n.useMemo((()=>{var t,n,r;return zd({aggregationFns:e.aggregationFns,columnDefs:[..._e,...e.columns],columnFilterFns:null!==(n=null===(t=e.state)||void 0===t?void 0:t.columnFilterFns)&&void 0!==n?n:K,defaultDisplayColumn:null!==(r=e.defaultDisplayColumn)&&void 0!==r?r:{},filterFns:e.filterFns,sortingFns:e.sortingFns})}),[K,_e,e.columns,null===(y=e.state)||void 0===y?void 0:y.columnFilterFns]),Oe=n.useMemo((()=>{var t,n,r,o,a;return!(null===(t=e.state)||void 0===t?void 0:t.isLoading)&&!(null===(n=e.state)||void 0===n?void 0:n.showSkeletons)||e.data.length?e.data:[...Array((null===(o=null===(r=e.state)||void 0===r?void 0:r.pagination)||void 0===o?void 0:o.pageSize)||(null===(a=null==H?void 0:H.pagination)||void 0===a?void 0:a.pageSize)||10).fill(null)].map((()=>Object.assign({},...Dd(e.columns).map((e=>({[Ld(e)]:null}))))))}),[e.data,null===(w=e.state)||void 0===w?void 0:w.isLoading,null===(x=e.state)||void 0===x?void 0:x.showSkeletons]),Ie= +/** + * react-table + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=n.useState((()=>({current:Gc(t)}))),[o,a]=n.useState((()=>r.current.initialState));return r.current.setOptions((t=>({...t,...e,state:{...o,...e.state},onStateChange:t=>{a(t),null==e.onStateChange||e.onStateChange(t)}}))),r.current}(Object.assign(Object.assign({getCoreRowModel:e=>oc((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[];for(let s=0;s{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e.enableExpanding||e.enableGrouping?e=>oc((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:n?Kc(t):t),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}):void 0,getFacetedMinMaxValues:e.enableFacetedValues?(e,t)=>oc((()=>{var n;return[null==(n=e.getColumn(t))?void 0:n.getFacetedRowModel()]}),(e=>{var n;if(!e)return;const r=null==(n=e.flatRows[0])?void 0:n.getUniqueValues(t);if(void 0===r)return;let o=[r,r];for(let a=0;ao[1]&&(o[1]=t)}}return o}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}}):void 0,getFacetedRowModel:e.enableFacetedValues?(e,t)=>oc((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,r,o)=>{if(!n.rows.length||(null==r||!r.length)&&!o)return n;const a=[...r.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return qc(n.rows,(e=>{for(let t=0;t{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}}):void 0,getFacetedUniqueValues:e.enableFacetedValues?(e,t)=>oc((()=>{var n;return[null==(n=e.getColumn(t))?void 0:n.getFacetedRowModel()]}),(e=>{if(!e)return new Map;let n=new Map;for(let o=0;o{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}}):void 0,getFilteredRowModel:e.enableColumnFilters||e.enableGlobalFilter||e.enableFilters?e=>oc((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e{var n;const r=e.getColumn(t.id);if(!r)return;const a=r.getFilterFn();a&&o.push({id:t.id,filterFn:a,resolvedValue:null!=(n=null==a.resolveFilterValue?void 0:a.resolveFilterValue(t.value))?n:t.value})}));const i=n.map((e=>e.id)),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;r&&l&&s.length&&(i.push("__global__"),s.forEach((e=>{var t;a.push({id:e.id,filterFn:l,resolvedValue:null!=(t=null==l.resolveFilterValue?void 0:l.resolveFilterValue(r))?t:r})})));for(let e=0;e{n.columnFiltersMeta[t]=e}))}if(a.length){for(let e=0;e{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return qc(t.rows,(e=>{for(let t=0;t{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}):void 0,getGroupedRowModel:e.enableGrouping?Wc():void 0,getPaginationRowModel:e.enablePagination?e=>oc((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:a,flatRows:i,rowsById:l}=n;const s=r*o,u=s+r;let c;a=a.slice(s,u),c=e.options.paginateExpandedRows?{rows:a,flatRows:i,rowsById:l}:Kc({rows:a,flatRows:i,rowsById:l}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}):void 0,getSortedRowModel:e.enableSorting?e=>oc((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],a=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),i={};a.forEach((t=>{const n=e.getColumn(t.id);n&&(i[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const l=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=l(e.subRows))})),t};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}):void 0,onColumnOrderChange:Q,onGroupingChange:de,getSubRows:e=>null==e?void 0:e.subRows},e),{columns:Re,data:Oe,globalFilterFn:null===(S=e.filterFns)||void 0===S?void 0:S[null!=se?se:"fuzzy"],initialState:H,state:Object.assign({creatingRow:q,columnFilterFns:K,columnOrder:X,density:Z,draggingColumn:ee,draggingRow:ne,editingCell:oe,editingRow:ie,globalFilterFn:se,grouping:ce,hoveredColumn:pe,hoveredRow:ge,isFullScreen:he,showAlertBanner:ve,showColumnFilters:we,showGlobalFilter:Se,showToolbarDropZone:Ee},e.state)}));return Ie.refs={bottomToolbarRef:L,editInputRefs:D,filterInputRefs:z,searchInputRef:$,tableContainerRef:B,tableHeadCellRefs:V,tablePaperRef:U,topToolbarRef:G},Ie.setCreatingRow=t=>{var n,r;let o=t;!0===t&&(o=((e,t)=>Hc(e,"mrt-row-create",null!=t?t:Object.assign({},...Dd(e.options.columns).filter((e=>"data"===e.columnDefType)).map((e=>({[Ld(e)]:""})))),-1,0))(Ie)),null!==(r=null===(n=null==e?void 0:e.onCreatingRowChange)||void 0===n?void 0:n.call(e,o))&&void 0!==r||W(o)},Ie.setColumnFilterFns=null!==(C=e.onColumnFilterFnsChange)&&void 0!==C?C:Y,Ie.setDensity=null!==(E=e.onDensityChange)&&void 0!==E?E:J,Ie.setDraggingColumn=null!==(k=e.onDraggingColumnChange)&&void 0!==k?k:te,Ie.setDraggingRow=null!==(_=e.onDraggingRowChange)&&void 0!==_?_:re,Ie.setEditingCell=null!==(R=e.onEditingCellChange)&&void 0!==R?R:ae,Ie.setEditingRow=null!==(O=e.onEditingRowChange)&&void 0!==O?O:le,Ie.setGlobalFilterFn=null!==(I=e.onGlobalFilterFnChange)&&void 0!==I?I:ue,Ie.setHoveredColumn=null!==(P=e.onHoveredColumnChange)&&void 0!==P?P:me,Ie.setHoveredRow=null!==(F=e.onHoveredRowChange)&&void 0!==F?F:fe,Ie.setIsFullScreen=null!==(j=e.onIsFullScreenChange)&&void 0!==j?j:be,Ie.setShowAlertBanner=null!==(M=e.onShowAlertBannerChange)&&void 0!==M?M:ye,Ie.setShowColumnFilters=null!==(A=e.onShowColumnFiltersChange)&&void 0!==A?A:xe,Ie.setShowGlobalFilter=null!==(T=e.onShowGlobalFilterChange)&&void 0!==T?T:Ce,Ie.setShowToolbarDropZone=null!==(N=e.onShowToolbarDropZoneChange)&&void 0!==N?N:ke,(e=>{const{getState:t,options:{enablePagination:r,rowCount:o}}=e,{globalFilter:a,isFullScreen:i,pagination:l,sorting:s,isLoading:u,showSkeletons:c}=t(),d=n.useRef(!1),p=n.useRef(),m=n.useRef();n.useEffect((()=>{"undefined"!=typeof window&&(p.current=document.body.style.height)}),[]),n.useEffect((()=>{if(d&&"undefined"!=typeof window)if(i)m.current=document.body.getBoundingClientRect().top,document.body.style.height="100vh";else{if(document.body.style.height=p.current,!m.current)return;window.scrollTo({top:-1*m.current,behavior:"instant"})}d.current=!0}),[i]),n.useEffect((()=>{if(!r||u||c)return;const{pageIndex:t,pageSize:n}=l,a=null!=o?o:e.getPrePaginationRowModel().rows.length;t*n>a&&e.setPageIndex(Math.floor(a/n))}),[o,e.getPrePaginationRowModel().rows.length]);const g=n.useRef(s);n.useEffect((()=>{s.length&&(g.current=s)}),[s]),n.useEffect((()=>{Wd(e)&&(a?e.setSorting([]):e.setSorting((()=>g.current||[])))}),[a])})(Ie),Ie},Sp=e=>{const t=(e=>{var t,{aggregationFns:r,autoResetExpanded:o=!1,columnFilterDisplayMode:a="subheader",columnResizeMode:i="onChange",createDisplayMode:l="modal",defaultColumn:s,defaultDisplayColumn:u,editDisplayMode:c="modal",enableBottomToolbar:d=!0,enableColumnActions:p=!0,enableColumnFilters:m=!0,enableColumnOrdering:g=!1,enableColumnResizing:f=!1,enableDensityToggle:h=!0,enableExpandAll:b=!0,enableExpanding:v,enableFilterMatchHighlighting:y=!0,enableFilters:w=!0,enableFullScreenToggle:x=!0,enableGlobalFilter:S=!0,enableGlobalFilterRankedResults:C=!0,enableGrouping:E=!1,enableHiding:k=!0,enableMultiRowSelection:_=!0,enableMultiSort:R=!0,enablePagination:O=!0,enablePinning:I=!1,enableRowSelection:P=!1,enableSelectAll:F=!0,enableSorting:j=!0,enableStickyHeader:M=!1,enableTableFooter:A=!0,enableTableHead:T=!0,enableToolbarInternalActions:N=!0,enableTopToolbar:L=!0,filterFns:D,icons:z,layoutMode:$="semantic",localization:B,manualFiltering:V,manualGrouping:U,manualPagination:G,manualSorting:H,paginationDisplayMode:q="default",positionActionsColumn:W="first",positionExpandColumn:K="first",positionGlobalFilter:Y="right",positionPagination:X="bottom",positionToolbarAlertBanner:Q="top",positionToolbarDropZone:Z="top",rowNumberMode:J="static",selectAllMode:ee="page",sortingFns:te}=e,ne=yd(e,["aggregationFns","autoResetExpanded","columnFilterDisplayMode","columnResizeMode","createDisplayMode","defaultColumn","defaultDisplayColumn","editDisplayMode","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnResizing","enableDensityToggle","enableExpandAll","enableExpanding","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHiding","enableMultiRowSelection","enableMultiSort","enablePagination","enablePinning","enableRowSelection","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","paginationDisplayMode","positionActionsColumn","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberMode","selectAllMode","sortingFns"]);const re=n.useMemo((()=>Object.assign(Object.assign({},ep),z)),[z]),oe=n.useMemo((()=>Object.assign(Object.assign({},Jd),B)),[B]),ae=n.useMemo((()=>Object.assign(Object.assign({},wd),r)),[]),ie=n.useMemo((()=>Object.assign(Object.assign({},Td),D)),[]),le=n.useMemo((()=>Object.assign(Object.assign({},Nd),te)),[]),se=n.useMemo((()=>Object.assign(Object.assign({},Yd),s)),[s]),ue=n.useMemo((()=>Object.assign(Object.assign({},Xd),u)),[u]);return(ne.enableRowVirtualization||ne.enableColumnVirtualization)&&($="grid"),ne.enableRowVirtualization&&(M=!0),!1===O&&void 0===G&&(G=!0),(null===(t=ne.data)||void 0===t?void 0:t.length)||(V=!0,U=!0,G=!0,H=!0),Object.assign({aggregationFns:ae,autoResetExpanded:o,columnFilterDisplayMode:a,columnResizeMode:i,createDisplayMode:l,defaultColumn:se,defaultDisplayColumn:ue,editDisplayMode:c,enableBottomToolbar:d,enableColumnActions:p,enableColumnFilters:m,enableColumnOrdering:g,enableColumnResizing:f,enableDensityToggle:h,enableExpandAll:b,enableExpanding:v,enableFilterMatchHighlighting:y,enableFilters:w,enableFullScreenToggle:x,enableGlobalFilter:S,enableGlobalFilterRankedResults:C,enableGrouping:E,enableHiding:k,enableMultiRowSelection:_,enableMultiSort:R,enablePagination:O,enablePinning:I,enableRowSelection:P,enableSelectAll:F,enableSorting:j,enableStickyHeader:M,enableTableFooter:A,enableTableHead:T,enableToolbarInternalActions:N,enableTopToolbar:L,filterFns:ie,icons:re,layoutMode:$,localization:oe,manualFiltering:V,manualGrouping:U,manualPagination:G,manualSorting:H,paginationDisplayMode:q,positionActionsColumn:W,positionExpandColumn:K,positionGlobalFilter:Y,positionPagination:X,positionToolbarAlertBanner:Q,positionToolbarDropZone:Z,rowNumberMode:J,selectAllMode:ee,sortingFns:le},ne)})(e);return xp(t)},Cp=["between","betweenInclusive","inNumberRange"],Ep=["empty","notEmpty"],kp=["arrIncludesSome","arrIncludesAll","arrIncludes"],_p=["range-slider","date-range","range"],Rp=({header:e,onSelect:t,table:r})=>{var o,a,i,l;const{getState:s,options:{columnFilterModeOptions:u,globalFilterModeOptions:c,localization:d,renderColumnFilterModeMenuItems:p,renderGlobalFilterModeMenuItems:m},setColumnFilterFns:g,setGlobalFilterFn:f}=r,{globalFilterFn:h}=s(),{column:b}=null!=e?e:{},{columnDef:v}=null!=b?b:{},y=null==b?void 0:b.getFilterValue();let w=null!==(o=null==v?void 0:v.columnFilterModeOptions)&&void 0!==o?o:u;_p.includes(null==v?void 0:v.filterVariant)&&(w=[...Cp,...null!=w?w:[]].filter((e=>Cp.includes(e))));const x=n.useMemo((()=>(e=>[{option:"fuzzy",symbol:"≈",label:e.filterFuzzy,divider:!1},{option:"contains",symbol:"*",label:e.filterContains,divider:!1},{option:"startsWith",symbol:"a",label:e.filterStartsWith,divider:!1},{option:"endsWith",symbol:"z",label:e.filterEndsWith,divider:!0},{option:"equals",symbol:"=",label:e.filterEquals,divider:!1},{option:"notEquals",symbol:"≠",label:e.filterNotEquals,divider:!0},{option:"between",symbol:"⇿",label:e.filterBetween,divider:!1},{option:"betweenInclusive",symbol:"⬌",label:e.filterBetweenInclusive,divider:!0},{option:"greaterThan",symbol:">",label:e.filterGreaterThan,divider:!1},{option:"greaterThanOrEqualTo",symbol:"≥",label:e.filterGreaterThanOrEqualTo,divider:!1},{option:"lessThan",symbol:"<",label:e.filterLessThan,divider:!1},{option:"lessThanOrEqualTo",symbol:"≤",label:e.filterLessThanOrEqualTo,divider:!0},{option:"empty",symbol:"∅",label:e.filterEmpty,divider:!1},{option:"notEmpty",symbol:"!∅",label:e.filterNotEmpty,divider:!1}])(d).filter((e=>v?void 0===w||(null==w?void 0:w.includes(e.option)):(!c||c.includes(e.option))&&["fuzzy","contains","startsWith"].includes(e.option)))),[]),S=n=>{var r;const o=null!==(r=null==v?void 0:v._filterFn)&&void 0!==r?r:"";e&&b?n!==o&&(g((t=>Object.assign(Object.assign({},t),{[e.id]:n}))),Ep.includes(n)?" "===y||Ep.includes(o)?y&&b.setFilterValue(y):b.setFilterValue(" "):"multi-select"===(null==v?void 0:v.filterVariant)||kp.includes(n)?y instanceof String||(null==y?void 0:y.length)?b.setFilterValue([]):y&&b.setFilterValue(y):_p.includes(null==v?void 0:v.filterVariant)||Cp.includes(n)?Array.isArray(y)&&((null==y?void 0:y.every((e=>""===e)))||Cp.includes(o))?b.setFilterValue(y):b.setFilterValue(["",""]):Array.isArray(y)?b.setFilterValue(""):b.setFilterValue(y)):f(n),null==t||t()},C=e&&v?v._filterFn:h;return Ju.jsx(M.Dropdown,{children:null!==(l=e&&b&&v?null!==(i=null===(a=v.renderColumnFilterModeMenuItems)||void 0===a?void 0:a.call(v,{column:b,internalFilterOptions:x,onSelectFilterMode:S,table:r}))&&void 0!==i?i:null==p?void 0:p({column:b,internalFilterOptions:x,onSelectFilterMode:S,table:r}):null==m?void 0:m({internalFilterOptions:x,onSelectFilterMode:S,table:r}))&&void 0!==l?l:x.map((({option:e,label:t,divider:r,symbol:o},a)=>Ju.jsxs(n.Fragment,{children:[Ju.jsxs(M.Item,{onClick:()=>S(e),color:e===C?"blue":void 0,sx:{"& > .mantine-Menu-itemLabel":{display:"flex",flexWrap:"nowrap",gap:"1ch"}},value:e,children:[Ju.jsx(R,{sx:{fontSize:"20px",transform:"translateY(-2px)",width:"2ch"},children:o}),Ju.jsx(R,{align:"center",children:t})]}),r&&Ju.jsx(M.Divider,{})]},a)))})},Op=({table:e})=>{const{getState:t,setGlobalFilter:r,options:{enableGlobalFilterModes:o,icons:{IconSearch:a,IconX:i},localization:l,manualFiltering:s,mantineSearchTextInputProps:u},refs:{searchInputRef:c}}=e,{globalFilter:m,showGlobalFilter:g}=t(),f=u instanceof Function?u({table:e}):u,h=n.useRef(!1),[b,v]=n.useState(null!=m?m:""),[y]=j(b,s?500:250);n.useEffect((()=>{r(y||void 0)}),[y]);const x=()=>{v(""),r(void 0)};return n.useEffect((()=>{h.current&&(void 0===m?x():v(m)),h.current=!0}),[m]),Ju.jsxs(E,{in:g,sx:{"& > div":{display:"flex",alignItems:"center",gap:"16px",flexWrap:"nowrap"}},children:[o&&Ju.jsxs(M,{withinPortal:!0,children:[Ju.jsx(M.Target,{children:Ju.jsx(p,{"aria-label":l.changeSearchMode,size:"sm",children:Ju.jsx(a,{})})}),Ju.jsx(Rp,{table:e,onSelect:x})]}),Ju.jsx(w,Object.assign({placeholder:l.search,onChange:e=>v(e.target.value),value:null!=b?b:"",variant:"filled",icon:!o&&Ju.jsx(a,{}),rightSection:b?Ju.jsx(p,{"aria-label":l.clearSearch,disabled:!(null==b?void 0:b.length),onClick:x,size:"sm",children:Ju.jsx(d,{withinPortal:!0,label:l.clearSearch,children:Ju.jsx(i,{})})}):null},f,{ref:e=>{e&&(c.current=e,(null==f?void 0:f.ref)&&(f.ref=e))},sx:e=>Object.assign({minWidth:"250px"},(null==f?void 0:f.sx)instanceof Function?f.sx(e):null==f?void 0:f.sx)}))]})},Ip=({isTopToolbar:e,table:t})=>{const{options:{mantineProgressProps:n},getState:r}=t,{isSaving:o,showProgressBars:a}=r(),i=n instanceof Function?n({isTopToolbar:e,table:t}):n;return Ju.jsx(E,{in:o||a,sx:{bottom:e?0:void 0,position:"absolute",top:e?void 0:0,width:"100%"},children:Ju.jsx(A,Object.assign({animate:!0,"aria-busy":"true","aria-label":"Loading",radius:0,value:100},i))})},Pp={userSelect:"none","&:disabled":{backgroundColor:"transparent",border:"none"}},Fp=({table:e,position:t="bottom"})=>{var n;const{getPrePaginationRowModel:r,getState:o,setPageIndex:a,setPageSize:i,options:{enableToolbarInternalActions:l,icons:{IconChevronLeftPipe:s,IconChevronRightPipe:u,IconChevronLeft:c,IconChevronRight:d},localization:m,mantinePaginationProps:g,paginationDisplayMode:f,rowCount:h}}=e,{pagination:{pageSize:b=10,pageIndex:w=0},showGlobalFilter:x}=o(),S=g instanceof Function?g({table:e}):g,C=null!=h?h:r().rows.length,E=Math.ceil(C/b),k=E>2&&!1!==(null==S?void 0:S.withEdges),_=w*b,O=Math.min(w*b+b,C);return Ju.jsxs(R,{align:"center",justify:"space-between",gap:"lg",py:"xs",px:"sm",mt:"top"===t&&l&&!x?"3rem":void 0,p:"relative",sx:{zIndex:2},children:[!1!==(null==S?void 0:S.showRowsPerPage)&&Ju.jsx(y,{data:null!==(n=null==S?void 0:S.rowsPerPageOptions)&&void 0!==n?n:["5","10","15","20","25","30","50","100"],label:m.rowsPerPage,onChange:e=>i(+e),value:b.toString(),sx:{"@media (min-width: 720px)":{display:"flex",alignItems:"center",gap:"8px"},"& .mantine-Select-input":{width:"80px"}},withinPortal:!0}),"pages"===f?Ju.jsx(T,Object.assign({onChange:e=>a(e-1),total:E,value:w+1,withEdges:k,nextIcon:d,previousIcon:c,firstIcon:s,lastIcon:u},S)):"default"===f?Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(v,{children:`${0===O?0:(_+1).toLocaleString()}-${O.toLocaleString()} ${m.of} ${C.toLocaleString()}`}),Ju.jsxs(R,{gap:"xs",children:[k&&Ju.jsx(p,{"aria-label":m.goToFirstPage,disabled:w<=0,onClick:()=>a(0),sx:Pp,children:Ju.jsx(s,{})}),Ju.jsx(p,{"aria-label":m.goToPreviousPage,disabled:w<=0,onClick:()=>a(w-1),sx:Pp,children:Ju.jsx(c,{})}),Ju.jsx(p,{"aria-label":m.goToNextPage,disabled:O>=C,onClick:()=>a(w+1),sx:Pp,children:Ju.jsx(d,{})}),k&&Ju.jsx(p,{"aria-label":m.goToLastPage,disabled:O>=C,onClick:()=>a(E-1),sx:Pp,children:Ju.jsx(u,{})})]})]}):null]})},jp=({column:e,table:t})=>{var n,r,o;const{getState:a,options:{localization:i,mantineFilterCheckboxProps:l}}=t,{density:s}=a(),{columnDef:u}=e,c=l instanceof Function?l({column:e,table:t}):l,p=u.mantineFilterCheckboxProps instanceof Function?u.mantineFilterCheckboxProps({column:e,table:t}):u.mantineFilterCheckboxProps,m=Object.assign(Object.assign({},c),p),g=null===(n=i.filterByColumn)||void 0===n?void 0:n.replace("{column}",u.header);return Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(r=null==m?void 0:m.title)&&void 0!==r?r:g,children:Ju.jsx(F,Object.assign({checked:"true"===e.getFilterValue(),indeterminate:void 0===e.getFilterValue(),color:void 0===e.getFilterValue()?"default":"primary",size:"xs"===s?"sm":"md",label:null!==(o=m.title)&&void 0!==o?o:g},m,{onClick:e=>{var t;e.stopPropagation(),null===(t=null==m?void 0:m.onClick)||void 0===t||t.call(m,e)},onChange:t=>{var n;e.setFilterValue(void 0===e.getFilterValue()?"true":"true"===e.getFilterValue()?"false":void 0),null===(n=null==m?void 0:m.onChange)||void 0===n||n.call(m,t)},sx:e=>Object.assign({fontWeight:"normal",marginTop:"8px"},(null==m?void 0:m.sx)instanceof Function?m.sx(e):null==m?void 0:m.sx),title:void 0}))})},Mp=({header:e,rangeFilterIndex:t,table:r})=>{var o,a,i,l,s,u,d,m,g;const{options:{columnFilterDisplayMode:f,columnFilterModeOptions:h,icons:{IconX:b},localization:v,mantineFilterAutocompleteProps:x,mantineFilterDateInputProps:S,mantineFilterMultiSelectProps:C,mantineFilterSelectProps:E,mantineFilterTextInputProps:k,manualFiltering:_},refs:{filterInputRefs:R},setColumnFilterFns:O}=r,{column:I}=e,{columnDef:P}=I,F=k instanceof Function?k({column:I,table:r,rangeFilterIndex:t}):k,M=P.mantineFilterTextInputProps instanceof Function?P.mantineFilterTextInputProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterTextInputProps,A=Object.assign(Object.assign({},F),M),T=E instanceof Function?E({column:I,table:r,rangeFilterIndex:t}):E,L=P.mantineFilterSelectProps instanceof Function?P.mantineFilterSelectProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterSelectProps,D=Object.assign(Object.assign({},T),L),z=C instanceof Function?C({column:I,table:r,rangeFilterIndex:t}):C,$=P.mantineFilterMultiSelectProps instanceof Function?P.mantineFilterMultiSelectProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterMultiSelectProps,B=Object.assign(Object.assign({},z),$),V=S instanceof Function?S({column:I,table:r,rangeFilterIndex:t}):S,U=P.mantineFilterDateInputProps instanceof Function?P.mantineFilterDateInputProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterDateInputProps,G=Object.assign(Object.assign({},V),U),H=x instanceof Function?x({column:I,table:r,rangeFilterIndex:t}):x,Y=P.mantineFilterAutocompleteProps instanceof Function?P.mantineFilterAutocompleteProps({column:I,table:r,rangeFilterIndex:t}):P.mantineFilterAutocompleteProps,Q=Object.assign(Object.assign({},H),Y),Z="range"===P.filterVariant||"date-range"===P.filterVariant||void 0!==t,J="select"===P.filterVariant,ee="multi-select"===P.filterVariant,te="date"===P.filterVariant||"date-range"===P.filterVariant,ne="autocomplete"===P.filterVariant,re=null!==(o=null==P?void 0:P.columnFilterModeOptions)&&void 0!==o?o:h,oe=P._filterFn,ae=["empty","notEmpty"].includes(oe)?v[`filter${(null===(i=null===(a=null==oe?void 0:oe.charAt)||void 0===a?void 0:a.call(oe,0))||void 0===i?void 0:i.toUpperCase())+(null==oe?void 0:oe.slice(1))}`]:"",ie=Z?0===t?v.min:1===t?v.max:"":null!==(l=null==A?void 0:A.placeholder)&&void 0!==l?l:null===(s=v.filterByColumn)||void 0===s?void 0:s.replace("{column}",String(P.header)),le=I.getFacetedUniqueValues(),se=n.useMemo((()=>{var e,t,n;return(null!==(n=null!==(t=null!==(e=null==Q?void 0:Q.data)&&void 0!==e?e:null==D?void 0:D.data)&&void 0!==t?t:null==B?void 0:B.data)&&void 0!==n?n:(ne||J||ee)&&le?Array.from(le.keys()).sort(((e,t)=>e.localeCompare(t))):[]).filter((e=>null!=e))}),[null==Q?void 0:Q.data,le,ne,ee,J,null==B?void 0:B.data,null==D?void 0:D.data]),ue=n.useRef(!1),[ce,de]=n.useState((()=>{var e,n;return ee?I.getFilterValue()||[]:Z?(null===(e=I.getFilterValue())||void 0===e?void 0:e[t])||"":null!==(n=I.getFilterValue())&&void 0!==n?n:""})),[pe]=j(ce,_?400:200);n.useEffect((()=>{ue.current&&(Z?I.setFilterValue((e=>{const n=Array.isArray(e)?e:["",""];return n[t]=pe,n})):I.setFilterValue(null!=pe?pe:void 0))}),[pe]),n.useEffect((()=>{if(!ue.current)return void(ue.current=!0);const e=I.getFilterValue();void 0===e?me():de(Z&&void 0!==t?(null!=e?e:["",""])[t]:null!=e?e:"")}),[I.getFilterValue()]);const me=()=>{ee?(de([]),I.setFilterValue([])):Z?(de(""),I.setFilterValue((e=>{const n=Array.isArray(e)?e:["",""];return n[t]=void 0,n}))):(de(""),I.setFilterValue(void 0))};if(P.Filter)return Ju.jsx(Ju.Fragment,{children:null===(u=P.Filter)||void 0===u?void 0:u.call(P,{column:I,header:e,rangeFilterIndex:t,table:r})});const ge={disabled:!!ae,placeholder:ie,"aria-label":ie,title:ie,onClick:e=>e.stopPropagation(),onChange:de,value:ce,variant:"unstyled",sx:e=>Object.assign({borderBottom:`2px solid ${e.colors.gray["dark"===e.colorScheme?7:3]}`,minWidth:te?"125px":Z?"80px":ae?"auto":"100px",width:"100%","& .mantine-TextInput-input":{overflow:"hidden",textOverflow:"ellipsis"},"& .mantine-DateInput-input":{height:"2.1rem"}},X(ee?B.sx:J?D.sx:te?G.sx:null==A?void 0:A.sx))},fe=ce?Ju.jsx(p,{"aria-label":v.clearFilter,onClick:me,size:"sm",title:null!==(d=v.clearFilter)&&void 0!==d?d:"",children:Ju.jsx(b,{})}):null;return ae?Ju.jsx(c,{sx:ge.sx,children:Ju.jsx(N,{size:"lg",onClick:()=>{de(""),I.setFilterValue(void 0),O((t=>{var n;return Object.assign(Object.assign({},t),{[e.id]:null!==(n=null==re?void 0:re[0])&&void 0!==n?n:"fuzzy"})}))},sx:{margin:"5px"},rightSection:fe,children:ae})}):ee?Ju.jsx(q,Object.assign({},ge,{clearable:!0,searchable:!0,withinPortal:!0},B,{data:se,ref:e=>{e&&(R.current[`${I.id}-${null!=t?t:0}`]=e,B.ref&&(B.ref.current=e))},sx:ge.sx})):J?Ju.jsx(y,Object.assign({},ge,{clearable:!0,searchable:!0,withinPortal:!0},D,{data:se,ref:e=>{e&&(R.current[`${I.id}-${null!=t?t:0}`]=e,D.ref&&(D.ref.current=e))},sx:ge.sx})):te?Ju.jsx(W,Object.assign({},ge,{allowDeselect:!0,clearable:!0,popoverProps:{withinPortal:"popover"!==f}},G,{ref:e=>{e&&(R.current[`${I.id}-${null!=t?t:0}`]=e,G.ref&&(G.ref.current=e))},sx:ge.sx})):ne?Ju.jsx(K,Object.assign({},ge,{rightSection:(null===(m=null==ce?void 0:ce.toString())||void 0===m?void 0:m.length)?fe:void 0,onChange:e=>de(e),withinPortal:!0},Q,{data:se,ref:e=>{e&&(R.current[`${I.id}-${null!=t?t:0}`]=e,Q.ref&&(Q.ref.current=e))},sx:ge.sx})):Ju.jsx(w,Object.assign({},ge,{rightSection:(null===(g=null==ce?void 0:ce.toString())||void 0===g?void 0:g.length)?fe:void 0,onChange:e=>de(e.target.value)},A,{ref:e=>{e&&(R.current[`${I.id}-${null!=t?t:0}`]=e,A.ref&&(A.ref.current=e))},sx:ge.sx}))},Ap=({header:e,table:t})=>Ju.jsxs(c,{sx:{display:"grid",gridTemplateColumns:"6fr 6fr",gap:"16px"},children:[Ju.jsx(Mp,{header:e,rangeFilterIndex:0,table:t}),Ju.jsx(Mp,{header:e,rangeFilterIndex:1,table:t})]}),Tp=({stackAlertBanner:e,table:t})=>{var r,o,a;const{getPrePaginationRowModel:i,getSelectedRowModel:l,getState:s,options:{enableRowSelection:u,enableSelectAll:c,icons:{IconX:d},localization:m,mantineToolbarAlertBannerBadgeProps:g,mantineToolbarAlertBannerProps:f,positionToolbarAlertBanner:h,renderToolbarAlertBannerContent:b,rowCount:v}}=t,{grouping:y,showAlertBanner:w,density:x}=s(),S=f instanceof Function?f({table:t}):f,C=g instanceof Function?g({table:t}):g,k=l().rows.length>0?null===(o=null===(r=m.selectedCountOfRowCountRowsSelected)||void 0===r?void 0:r.replace("{selectedCount}",l().rows.length.toString()))||void 0===o?void 0:o.replace("{rowCount}",(null!=v?v:i().rows.length).toString()):null,_=y.length>0?Ju.jsxs(R,{children:[m.groupedBy," ",y.map(((e,r)=>Ju.jsxs(n.Fragment,{children:[r>0?m.thenBy:"",Ju.jsxs(N,Object.assign({rightSection:Ju.jsx(p,{onClick:()=>t.getColumn(e).toggleGrouping(),size:"xs",children:Ju.jsx(d,{})}),sx:{marginLeft:"1ch"},variant:"filled"},C,{children:[t.getColumn(e).columnDef.header," "]}))]},`${r}-${e}`)))]}):null;return Ju.jsx(E,{in:w||!!k||!!_,transitionDuration:e?200:0,children:Ju.jsx(L,Object.assign({color:"blue",icon:!1},S,{sx:t=>Object.assign({borderRadius:0,fontSize:"16px",left:0,position:"relative",marginBottom:e?0:"bottom"===h?"-16px":void 0,padding:"8px",right:0,top:0,width:"100%",zIndex:2},(null==S?void 0:S.sx)instanceof Function?S.sx(t):null==S?void 0:S.sx),children:null!==(a=null==b?void 0:b({groupedAlert:_,selectedAlert:k,table:t}))&&void 0!==a?a:Ju.jsxs(R,{sx:{gap:"12px",padding:"head-overlay"===h?"xl"===x?"16px":"md"===x?"8px":"2px":"8px 16px"},children:[u&&c&&"head-overlay"===h&&Ju.jsx(wp,{selectAll:!0,table:t}),Ju.jsxs(D,{children:[null==S?void 0:S.children,(null==S?void 0:S.children)&&(k||_)&&Ju.jsx("br",{}),k,k&&_&&Ju.jsx("br",{}),_]})]})}))})},Np=e=>{var t,{table:r}=e,o=yd(e,["table"]);const{getState:a,options:{icons:{IconMinimize:i,IconMaximize:l},localization:s},setIsFullScreen:u}=r,{isFullScreen:c}=a(),[m,g]=n.useState(!1);return Ju.jsx(d,{opened:m,withinPortal:!0,label:null!==(t=null==o?void 0:o.title)&&void 0!==t?t:s.toggleFullScreen,children:Ju.jsx(p,Object.assign({"aria-label":s.toggleFullScreen,onClick:()=>{g(!1),u(!c)},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),size:"lg"},o,{title:void 0,children:c?Ju.jsx(i,{}):Ju.jsx(l,{})}))})},Lp=({column:e,table:t})=>{const{options:{icons:{IconPinned:n,IconPinnedOff:r},localization:o}}=t,a=t=>{e.pin(t)};return Ju.jsx(R,{sx:{minWidth:"70px",alignContent:"center",justifyContent:"center"},children:e.getIsPinned()?Ju.jsx(d,{withinPortal:!0,label:o.unpin,children:Ju.jsx(p,{onClick:()=>a(!1),size:"md",children:Ju.jsx(r,{})})}):Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(d,{withinPortal:!0,label:o.pinToLeft,children:Ju.jsx(p,{onClick:()=>a("left"),size:"md",children:Ju.jsx(n,{style:{transform:"rotate(90deg)"}})})}),Ju.jsx(d,{withinPortal:!0,label:o.pinToRight,children:Ju.jsx(p,{onClick:()=>a("right"),size:"md",children:Ju.jsx(n,{style:{transform:"rotate(-90deg)"}})})})]})})},Dp=({allColumns:e,hoveredColumn:t,setHoveredColumn:r,column:o,isSubMenu:a,table:i})=>{var l;const{getState:s,options:{enableColumnOrdering:u,enableHiding:p,enablePinning:m,localization:g},setColumnOrder:f}=i,{columnOrder:h}=s(),{columnDef:b}=o,{columnDefType:y}=b,w="group"!==y&&o.getIsVisible()||"group"===y&&o.getLeafColumns().some((e=>e.getIsVisible())),x=n.useRef(null),[S,C]=n.useState(!1);return Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(M.Item,{component:"span",ref:x,onDragEnter:e=>{S||!1===b.enableColumnOrdering||r(o)},sx:e=>({alignItems:"center",cursor:"default",justifyContent:"flex-start",opacity:S?.5:1,outline:S?`1px dashed ${e.colors.gray[7]}`:(null==t?void 0:t.id)===o.id?`2px dashed ${Qd(e)}`:"none",paddingLeft:2*(o.depth+.5)+"rem",paddingTop:"6px",paddingBottom:"6px"}),children:Ju.jsxs(c,{sx:{display:"flex",flexWrap:"nowrap",gap:"8px"},children:[!a&&"group"!==y&&u&&!e.some((e=>"group"===e.columnDef.columnDefType))&&(!1!==b.enableColumnOrdering?Ju.jsx(mp,{onDragEnd:e=>{C(!1),r(null),t&&f($d(o,t,h))},onDragStart:e=>{C(!0),e.dataTransfer.setDragImage(x.current,0,0)},table:i}):Ju.jsx(c,{sx:{width:"22px"}})),!a&&m&&(o.getCanPin()?Ju.jsx(Lp,{column:o,table:i}):Ju.jsx(c,{sx:{width:"70px"}})),p?Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:g.toggleVisibility,children:Ju.jsx(I,{checked:w,disabled:a&&w||!o.getCanHide(),label:b.header,onChange:()=>(e=>{var t,n;"group"===y?null===(n=null===(t=null==e?void 0:e.columns)||void 0===t?void 0:t.forEach)||void 0===n||n.call(t,(e=>{e.toggleVisibility(!w)})):e.toggleVisibility()})(o),sx:{cursor:"pointer !important"}})}):Ju.jsx(v,{sx:{alignSelf:"center"},children:b.header})]})}),null===(l=o.columns)||void 0===l?void 0:l.map(((n,o)=>Ju.jsx(Dp,{allColumns:e,column:n,hoveredColumn:t,isSubMenu:a,setHoveredColumn:r,table:i},`${o}-${n.id}`)))]})},zp=({isSubMenu:e,table:t})=>{const{getAllColumns:r,getAllLeafColumns:o,getCenterLeafColumns:a,getIsAllColumnsVisible:i,getIsSomeColumnsPinned:l,getIsSomeColumnsVisible:s,getLeftLeafColumns:u,getRightLeafColumns:c,getState:d,toggleAllColumnsVisible:p,options:{enableColumnOrdering:m,enableHiding:g,enablePinning:f,localization:h}}=t,{columnOrder:b,columnPinning:v}=d(),y=n.useMemo((()=>{const e=r();return b.length>0&&!e.some((e=>"group"===e.columnDef.columnDefType))?[...u(),...Array.from(new Set(b)).map((e=>a().find((t=>(null==t?void 0:t.id)===e)))),...c()].filter(Boolean):e}),[b,v,r(),a(),u(),c()]),[w,x]=n.useState(null);return Ju.jsxs(M.Dropdown,{sx:{maxHeight:"calc(80vh - 100px)",overflowY:"auto"},children:[Ju.jsxs(R,{sx:{justifyContent:e?"center":"space-between",padding:"8px",gap:"8px"},children:[!e&&g&&Ju.jsx(V,{disabled:!s(),onClick:()=>{o().filter((e=>!1!==e.columnDef.enableHiding)).forEach((e=>e.toggleVisibility(!1)))},variant:"subtle",children:h.hideAll}),!e&&m&&Ju.jsx(V,{onClick:()=>t.setColumnOrder(Vd(t.options)),variant:"subtle",children:h.resetOrder}),!e&&f&&Ju.jsx(V,{disabled:!l(),onClick:()=>t.resetColumnPinning(!0),variant:"subtle",children:h.unpinAll}),g&&Ju.jsx(V,{disabled:i(),onClick:()=>p(!0),variant:"subtle",children:h.showAll})]}),Ju.jsx(U,{}),y.map(((n,r)=>Ju.jsx(Dp,{allColumns:y,column:n,hoveredColumn:w,isSubMenu:e,setHoveredColumn:x,table:t},`${r}-${n.id}`)))]})},$p=e=>{var t,{table:n}=e,r=yd(e,["table"]);const{options:{icons:{IconColumns:o},localization:a}}=n;return Ju.jsxs(M,{closeOnItemClick:!1,withinPortal:!0,children:[Ju.jsx(d,{withinPortal:!0,label:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:a.showHideColumns,children:Ju.jsx(M.Target,{children:Ju.jsx(p,Object.assign({"aria-label":a.showHideColumns,size:"lg"},r,{title:void 0,children:Ju.jsx(o,{})}))})}),Ju.jsx(zp,{table:n})]})},Bp=["xs","md","xl"],Vp=e=>{var t,{table:n}=e,r=yd(e,["table"]);const{getState:o,options:{icons:{IconBaselineDensityLarge:a,IconBaselineDensityMedium:i,IconBaselineDensitySmall:l},localization:s},setDensity:u}=n,{density:c}=o();return Ju.jsx(d,{withinPortal:!0,label:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:s.toggleDensity,children:Ju.jsx(p,Object.assign({"aria-label":s.toggleDensity,onClick:()=>{var e;u(null!==(e=Bp[(Bp.indexOf(c)-1)%Bp.length])&&void 0!==e?e:"xl")},size:"lg"},r,{title:void 0,children:"xs"===c?Ju.jsx(l,{}):"md"===c?Ju.jsx(i,{}):Ju.jsx(a,{})}))})},Up=e=>{var t,{table:n}=e,r=yd(e,["table"]);const{getState:o,options:{icons:{IconFilter:a,IconFilterOff:i},localization:l},setShowColumnFilters:s}=n,{showColumnFilters:u}=o();return Ju.jsx(d,{withinPortal:!0,label:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:l.showHideFilters,children:Ju.jsx(p,Object.assign({"aria-label":l.showHideFilters,onClick:()=>{s(!u)},size:"lg"},r,{title:void 0,children:u?Ju.jsx(i,{}):Ju.jsx(a,{})}))})},Gp=e=>{var t,n,{table:r}=e,o=yd(e,["table"]);const{getState:a,options:{icons:{IconSearch:i,IconSearchOff:l},localization:s},refs:{searchInputRef:u},setShowGlobalFilter:c}=r,{globalFilter:m,showGlobalFilter:g}=a();return Ju.jsx(d,{withinPortal:!0,label:null!==(t=null==o?void 0:o.title)&&void 0!==t?t:s.showHideSearch,children:Ju.jsx(p,Object.assign({"aria-label":null!==(n=null==o?void 0:o.title)&&void 0!==n?n:s.showHideSearch,disabled:!!m,onClick:()=>{c(!g),setTimeout((()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus()}),100)},size:"lg"},o,{title:void 0,children:g?Ju.jsx(l,{}):Ju.jsx(i,{})}))})},Hp=({table:e})=>{var t;const{options:{columnFilterDisplayMode:n,enableColumnFilters:r,enableColumnOrdering:o,enableDensityToggle:a,enableFilters:i,enableFullScreenToggle:l,enableGlobalFilter:s,enableHiding:u,enablePinning:c,initialState:d,renderToolbarInternalActions:p}}=e;return Ju.jsx(R,{sx:{alignItems:"center",gap:"2px",zIndex:3},children:null!==(t=null==p?void 0:p({table:e}))&&void 0!==t?t:Ju.jsxs(Ju.Fragment,{children:[i&&s&&!(null==d?void 0:d.showGlobalFilter)&&Ju.jsx(Gp,{table:e}),i&&r&&"popover"!==n&&Ju.jsx(Up,{table:e}),(u||o||c)&&Ju.jsx($p,{table:e}),a&&Ju.jsx(Vp,{table:e}),l&&Ju.jsx(Np,{table:e})]})})},qp=({table:e})=>{const{getState:t,options:{enableGrouping:r,localization:o},setHoveredColumn:a,setShowToolbarDropZone:i}=e,{draggingColumn:l,hoveredColumn:s,grouping:u,showToolbarDropZone:c}=t(),d=e=>{a({id:"drop-zone"})};return n.useEffect((()=>{var t;void 0!==(null===(t=e.options.state)||void 0===t?void 0:t.showToolbarDropZone)&&i(!!r&&!!l&&!1!==l.columnDef.enableGrouping&&!u.includes(l.id))}),[r,l,u]),Ju.jsx(z,{mounted:c,transition:"fade",children:e=>{var t,n;return Ju.jsx(R,{className:"mantine-ToolbarDropZone",sx:e=>({alignItems:"center",backgroundColor:e.fn.rgba(Qd(e),"drop-zone"===(null==s?void 0:s.id)?.2:.1),border:`dashed ${Qd(e)} 2px`,justifyContent:"center",height:"calc(100%)",position:"absolute",width:"calc(100%)",zIndex:2}),onDragEnter:d,style:e,children:Ju.jsx(v,{children:o.dropToGroupBy.replace("{column}",null!==(n=null===(t=null==l?void 0:l.columnDef)||void 0===t?void 0:t.header)&&void 0!==n?n:"")})})}})},Wp=({theme:e})=>({alignItems:"flex-start",backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,backgroundImage:"none",display:"grid",flexWrap:"wrap-reverse",minHeight:"3.5rem",overflow:"visible",padding:"0",transition:"all 100ms ease-in-out",zIndex:3}),Kp=({table:e})=>{var t;const{getState:n,options:{enableGlobalFilter:r,enablePagination:o,enableToolbarInternalActions:a,mantineTopToolbarProps:i,positionGlobalFilter:l,positionPagination:s,positionToolbarAlertBanner:u,positionToolbarDropZone:d,renderTopToolbarCustomActions:p},refs:{topToolbarRef:m}}=e,{isFullScreen:g,showGlobalFilter:f}=n(),h=_("(max-width: 720px)"),b=i instanceof Function?i({table:e}):i,v=h||!!p||f;return Ju.jsxs(c,Object.assign({},b,{ref:e=>{e&&(m.current=e,(null==b?void 0:b.ref)&&(b.ref.current=e))},sx:e=>Object.assign(Object.assign({position:g?"sticky":"relative",top:g?"0":void 0},Wp({theme:e})),(null==b?void 0:b.sx)instanceof Function?b.sx(e):null==b?void 0:b.sx),children:["top"===u&&Ju.jsx(Tp,{stackAlertBanner:v,table:e}),["both","top"].includes(null!=d?d:"")&&Ju.jsx(qp,{table:e}),Ju.jsxs(R,{sx:{alignItems:"flex-start",boxSizing:"border-box",justifyContent:"space-between",padding:"8px",position:v?"relative":"absolute",right:0,top:0,width:"100%"},children:[r&&"left"===l&&Ju.jsx(Op,{table:e}),null!==(t=null==p?void 0:p({table:e}))&&void 0!==t?t:Ju.jsx("span",{}),a?Ju.jsxs(R,{sx:{flexWrap:"wrap-reverse",justifyContent:"flex-end"},children:[r&&"right"===l&&Ju.jsx(Op,{table:e}),Ju.jsx(Hp,{table:e})]}):r&&"right"===l&&Ju.jsx(Op,{table:e})]}),o&&["top","both"].includes(null!=s?s:"")&&Ju.jsx(R,{justify:"end",children:Ju.jsx(Fp,{table:e,position:"top"})}),Ju.jsx(Ip,{isTopToolbar:!0,table:e})]}))},Yp=({table:e})=>{const{getState:t,options:{enablePagination:n,mantineBottomToolbarProps:r,positionPagination:o,positionToolbarAlertBanner:a,positionToolbarDropZone:i,renderBottomToolbarCustomActions:l},refs:{bottomToolbarRef:s}}=e,{isFullScreen:u}=t(),d=_("(max-width: 720px)"),p=r instanceof Function?r({table:e}):r,m=d||!!l;return Ju.jsxs(c,Object.assign({},p,{ref:e=>{e&&(s.current=e,(null==p?void 0:p.ref)&&(p.ref.current=e))},sx:e=>Object.assign(Object.assign(Object.assign({},Wp({theme:e})),{bottom:u?"0":void 0,boxShadow:`0 1px 2px -1px ${e.fn.rgba(e.black,.1)} inset`,left:0,position:u?"fixed":"relative",right:0}),(null==p?void 0:p.sx)instanceof Function?p.sx(e):null==p?void 0:p.sx),children:[Ju.jsx(Ip,{isTopToolbar:!1,table:e}),"bottom"===a&&Ju.jsx(Tp,{stackAlertBanner:m,table:e}),["both","bottom"].includes(null!=i?i:"")&&Ju.jsx(qp,{table:e}),Ju.jsxs(c,{sx:{alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",padding:"8px",width:"100%"},children:[l?l({table:e}):Ju.jsx("span",{}),Ju.jsx(c,{sx:{display:"flex",justifyContent:"flex-end",position:m?"relative":"absolute",right:0,top:0},children:n&&["bottom","both"].includes(null!=o?o:"")&&Ju.jsx(Fp,{table:e,position:"bottom"})})]})]}))},Xp=({header:e,table:t})=>{var n,r,o,a,i,l,s,u,c,m;const{getState:g,toggleAllColumnsVisible:f,setColumnOrder:h,options:{columnFilterDisplayMode:b,enableColumnFilters:v,enableColumnResizing:y,enableGrouping:w,enableHiding:x,enablePinning:S,enableSorting:C,enableSortingRemoval:E,icons:{IconArrowAutofitContent:k,IconBoxMultiple:_,IconClearAll:R,IconColumns:O,IconDotsVertical:I,IconEyeOff:P,IconFilter:F,IconFilterOff:j,IconPinned:A,IconPinnedOff:T,IconSortAscending:N,IconSortDescending:L},localization:D,mantineColumnActionsButtonProps:z,renderColumnActionsMenuItems:$},refs:{filterInputRefs:B},setColumnSizingInfo:V,setShowColumnFilters:U}=t,{column:G}=e,{columnDef:H}=G,{columnSizing:q,columnVisibility:W}=g(),K=z instanceof Function?z({column:G,table:t}):z,Y=H.mantineColumnActionsButtonProps instanceof Function?H.mantineColumnActionsButtonProps({column:G,table:t}):H.mantineColumnActionsButtonProps,X=Object.assign(Object.assign({},K),Y),Q=e=>{G.pin(e)},Z=Ju.jsxs(Ju.Fragment,{children:[C&&G.getCanSort()&&Ju.jsxs(Ju.Fragment,{children:[!1!==E&&Ju.jsx(M.Item,{disabled:!G.getIsSorted(),icon:Ju.jsx(R,{}),onClick:()=>{G.clearSorting()},children:D.clearSort}),Ju.jsx(M.Item,{disabled:"asc"===G.getIsSorted(),icon:Ju.jsx(N,{}),onClick:()=>{G.toggleSorting(!1)},children:null===(n=D.sortByColumnAsc)||void 0===n?void 0:n.replace("{column}",String(H.header))}),Ju.jsx(M.Item,{icon:Ju.jsx(L,{}),disabled:"desc"===G.getIsSorted(),onClick:()=>{G.toggleSorting(!0)},children:null===(r=D.sortByColumnDesc)||void 0===r?void 0:r.replace("{column}",String(H.header))}),(v||w||x)&&Ju.jsx(M.Divider,{},3)]}),v&&"popover"!==b&&G.getCanFilter()&&Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(M.Item,{disabled:!G.getFilterValue(),icon:Ju.jsx(j,{}),onClick:()=>{G.setFilterValue("")},children:D.clearFilter}),Ju.jsx(M.Item,{icon:Ju.jsx(F,{}),onClick:()=>{U(!0),setTimeout((()=>{var e;return null===(e=B.current[`${G.id}-0`])||void 0===e?void 0:e.focus()}),100)},children:null===(o=D.filterByColumn)||void 0===o?void 0:o.replace("{column}",String(H.header))}),(w||x)&&Ju.jsx(M.Divider,{},2)]}),w&&G.getCanGroup()&&Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(M.Item,{icon:Ju.jsx(_,{}),onClick:()=>{G.toggleGrouping(),h((e=>["mrt-row-expand",...e]))},children:null===(a=D[G.getIsGrouped()?"ungroupByColumn":"groupByColumn"])||void 0===a?void 0:a.replace("{column}",String(H.header))}),S&&Ju.jsx(M.Divider,{})]}),S&&G.getCanPin()&&Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(M.Item,{disabled:"left"===G.getIsPinned()||!G.getCanPin(),icon:Ju.jsx(A,{style:{transform:"rotate(90deg)"}}),onClick:()=>Q("left"),children:D.pinToLeft}),Ju.jsx(M.Item,{disabled:"right"===G.getIsPinned()||!G.getCanPin(),icon:Ju.jsx(A,{style:{transform:"rotate(-90deg)"}}),onClick:()=>Q("right"),children:D.pinToRight}),Ju.jsx(M.Item,{disabled:!G.getIsPinned(),icon:Ju.jsx(T,{}),onClick:()=>Q(!1),children:D.unpin}),x&&Ju.jsx(M.Divider,{})]}),y&&G.getCanResize()&&Ju.jsx(M.Item,{disabled:!q[G.id],icon:Ju.jsx(k,{}),onClick:()=>{V((e=>Object.assign(Object.assign({},e),{isResizingColumn:!1}))),G.resetSize()},children:D.resetColumnSize},0),x&&Ju.jsxs(Ju.Fragment,{children:[Ju.jsx(M.Item,{disabled:!G.getCanHide(),icon:Ju.jsx(P,{}),onClick:()=>{G.toggleVisibility(!1)},children:null===(i=D.hideColumn)||void 0===i?void 0:i.replace("{column}",String(H.header))},0),Ju.jsx(M.Item,{disabled:!Object.values(W).filter((e=>!e)).length,icon:Ju.jsx(O,{}),onClick:()=>{f(!0)},children:null===(l=D.showAllColumns)||void 0===l?void 0:l.replace("{column}",String(H.header))},1)]})]});return Ju.jsxs(M,{closeOnItemClick:!0,withinPortal:!0,position:"bottom-start",children:[Ju.jsx(d,{withinPortal:!0,openDelay:1e3,label:null!==(s=null==X?void 0:X.title)&&void 0!==s?s:D.columnActions,children:Ju.jsx(M.Target,{children:Ju.jsx(p,Object.assign({"aria-label":D.columnActions,size:"sm"},X,{sx:e=>Object.assign({opacity:.5,transition:"opacity 100ms","&:hover":{opacity:1}},(null==X?void 0:X.sx)instanceof Function?X.sx(e):null==X?void 0:X.sx),children:Ju.jsx(I,{})}))})}),Ju.jsx(M.Dropdown,{children:null!==(m=null!==(c=null===(u=H.renderColumnActionsMenuItems)||void 0===u?void 0:u.call(H,{column:G,table:t,internalColumnMenuItems:Z}))&&void 0!==c?c:null==$?void 0:$({column:G,table:t,internalColumnMenuItems:Z}))&&void 0!==m?m:Z})]})},Qp=({header:e,table:t})=>{var r;const{options:{mantineFilterRangeSliderProps:o},refs:{filterInputRefs:a}}=t,{column:i}=e,{columnDef:l}=i,s=o instanceof Function?o({column:i,table:t}):o,u=l.mantineFilterRangeSliderProps instanceof Function?l.mantineFilterRangeSliderProps({column:i,table:t}):l.mantineFilterRangeSliderProps,c=Object.assign(Object.assign({},s),u);let[d,p]=void 0!==c.min&&void 0!==c.max?[c.min,c.max]:null!==(r=i.getFacetedMinMaxValues())&&void 0!==r?r:[0,1];Array.isArray(d)&&(d=d[0]),Array.isArray(p)&&(p=p[0]),null===d&&(d=0),null===p&&(p=1);const[m,g]=n.useState([d,p]),f=i.getFilterValue(),h=n.useRef(!1);return n.useEffect((()=>{h.current&&(void 0===f?g([d,p]):Array.isArray(f)&&g(f)),h.current=!0}),[f,d,p]),Ju.jsx(Y,Object.assign({min:d,max:p,onChange:e=>{g(e)},onChangeEnd:e=>{Array.isArray(e)&&(e[0]<=d&&e[1]>=p?i.setFilterValue(void 0):i.setFilterValue(e))},value:m},c,{ref:e=>{e&&(a.current[`${i.id}-0`]=e,(null==c?void 0:c.ref)&&(c.ref=e))},sx:e=>Object.assign({margin:"auto",marginTop:"16px",marginBottom:"6px",width:"calc(100% - 8px)"},(null==c?void 0:c.sx)instanceof Function?c.sx(e):null==c?void 0:c.sx)}))},Zp=({header:e,table:t})=>{var n,r,o;const{getState:a,options:{columnFilterDisplayMode:i,enableColumnFilterModes:l,columnFilterModeOptions:s,icons:{IconFilterCog:u},localization:c},refs:{filterInputRefs:m}}=t,{showColumnFilters:g}=a(),{column:f}=e,{columnDef:h}=f,b=h._filterFn,y=null!==(n=null==h?void 0:h.columnFilterModeOptions)&&void 0!==n?n:s,w=l&&!1!==h.enableColumnFilterModes&&(void 0===y||!!(null==y?void 0:y.length));return Ju.jsx(E,{in:g||"popover"===i,children:Ju.jsxs(R,{direction:"column",children:[Ju.jsxs(R,{align:"flex-end",children:["checkbox"===h.filterVariant?Ju.jsx(jp,{column:f,table:t}):"range-slider"===h.filterVariant?Ju.jsx(Qp,{header:e,table:t}):["range","date-range"].includes(null!==(r=h.filterVariant)&&void 0!==r?r:"")||["between","betweenInclusive","inNumberRange"].includes(h._filterFn)?Ju.jsx(Ap,{header:e,table:t}):Ju.jsx(Mp,{header:e,table:t}),w&&Ju.jsxs(M,{withinPortal:"popover"!==i,children:[Ju.jsx(d,{label:c.changeFilterMode,position:"bottom-start",withinPortal:!0,children:Ju.jsx(M.Target,{children:Ju.jsx(p,{"aria-label":c.changeFilterMode,size:"md",sx:{transform:"translateY(-2px)"},children:Ju.jsx(u,{})})})}),Ju.jsx(Rp,{header:e,table:t,onSelect:()=>setTimeout((()=>{var e;return null===(e=m.current[`${f.id}-0`])||void 0===e?void 0:e.focus()}),100)})]})]}),w?Ju.jsx(v,{component:"label",color:"dimmed",sx:{whiteSpace:"nowrap",marginTop:"4px",fontSize:"10px"},children:c.filterMode.replace("{filterType}",c[`filter${(null===(o=null==b?void 0:b.charAt(0))||void 0===o?void 0:o.toUpperCase())+(null==b?void 0:b.slice(1))}`])}):null]})})},Jp=({header:e,table:t})=>{var r,o,a,i;const{options:{columnFilterDisplayMode:s,icons:{IconFilter:u},localization:m},refs:{filterInputRefs:g},setShowColumnFilters:f}=t,{column:h}=e,{columnDef:b}=h,v=l(),y=h.getFilterValue(),[w,x]=n.useState(!1),S=Array.isArray(y)&&y.some(Boolean)||!!y&&!Array.isArray(y),C="range"===b.filterVariant||["between","betweenInclusive","inNumberRange"].includes(b._filterFn),E=b._filterFn,k="popover"!==s||S?m.filteringByColumn.replace("{column}",String(b.header)).replace("{filterType}",m[`filter${(null===(o=null==E?void 0:E.charAt(0))||void 0===o?void 0:o.toUpperCase())+(null==E?void 0:E.slice(1))}`]).replace("{filterValue}",`"${Array.isArray(h.getFilterValue())?h.getFilterValue().join(`" ${C?m.and:m.or} "`):h.getFilterValue()}"`).replace('" "',""):null===(r=m.filterByColumn)||void 0===r?void 0:r.replace("{column}",String(b.header));return Ju.jsxs(G,{onClose:()=>x(!1),opened:w,position:"top",keepMounted:"range-slider"===b.filterVariant,shadow:"xl",width:360,withinPortal:!0,children:[Ju.jsx(z,{transition:"scale",mounted:"popover"===s||!!h.getFilterValue()&&!C||C&&(!!(null===(a=h.getFilterValue())||void 0===a?void 0:a[0])||!!(null===(i=h.getFilterValue())||void 0===i?void 0:i[1])),children:e=>Ju.jsx(c,{component:"span",sx:{flex:"0 0"},style:e,children:Ju.jsx(G.Target,{children:Ju.jsx(d,{disabled:w,label:k,multiline:!0,width:k.length>40?300:void 0,withinPortal:!0,children:Ju.jsx(p,{color:S?Qd(v):void 0,onClick:e=>{e.stopPropagation(),"popover"===s?x((e=>!e)):f(!0),setTimeout((()=>{var e,t;null===(e=g.current[`${h.id}-0`])||void 0===e||e.focus(),null===(t=g.current[`${h.id}-0`])||void 0===t||t.select()}),100)},size:"sm",sx:{opacity:S?1:.5,padding:"2px","&:hover":{opacity:1}},children:Ju.jsx(u,{})})})})})}),"popover"===s&&Ju.jsx(G.Dropdown,{onClick:e=>e.stopPropagation(),onKeyDown:e=>"Enter"===e.key&&x(!1),children:Ju.jsx(Zp,{header:e,table:t})})]})},em=({column:e,table:t,tableHeadCellRef:n})=>{const{getState:r,options:{enableColumnOrdering:o,mantineColumnDragHandleProps:a},setColumnOrder:i,setDraggingColumn:l,setHoveredColumn:s}=t,{columnDef:u}=e,{hoveredColumn:c,draggingColumn:d,columnOrder:p}=r(),m=a instanceof Function?a({column:e,table:t}):a,g=u.mantineColumnDragHandleProps instanceof Function?u.mantineColumnDragHandleProps({column:e,table:t}):u.mantineColumnDragHandleProps,f=Object.assign(Object.assign({},m),g);return Ju.jsx(mp,{actionIconProps:f,onDragStart:t=>{var r;null===(r=null==f?void 0:f.onDragStart)||void 0===r||r.call(f,t),l(e),t.dataTransfer.setDragImage(n.current,0,0)},onDragEnd:t=>{var n;null===(n=null==f?void 0:f.onDragEnd)||void 0===n||n.call(f,t),"drop-zone"===(null==c?void 0:c.id)?e.toggleGrouping():o&&c&&(null==c?void 0:c.id)!==(null==d?void 0:d.id)&&i($d(e,c,p)),l(null),s(null)},table:t})},tm=({header:e,table:t})=>{var n;const{getState:r,options:{columnResizeMode:o},setColumnSizingInfo:a}=t,{density:i}=r(),{column:l}=e;return Ju.jsx(c,{onDoubleClick:()=>{a((e=>Object.assign(Object.assign({},e),{isResizingColumn:!1}))),l.resetSize()},onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),sx:e=>({cursor:"col-resize",marginRight:"xl"===i?"-24px":"md"===i?"-20px":"-14px",position:"absolute",right:"4px",paddingLeft:"1px",paddingRight:"1px","&:active > .mantine-Divider-vertical":{borderLeftColor:Qd(e)}}),style:{transform:l.getIsResizing()&&"onEnd"===o?`translateX(${null!==(n=r().columnSizingInfo.deltaOffset)&&void 0!==n?n:0}px)`:void 0},children:Ju.jsx(U,{orientation:"vertical",size:"lg",sx:{borderRadius:"2px",borderWidth:"4px",height:"24px",touchAction:"none",transition:l.getIsResizing()?void 0:"all 100ms ease-in-out",userSelect:"none",zIndex:4}})})},nm=({header:e,table:t})=>{const{getState:n,options:{icons:{IconSortDescending:r,IconSortAscending:o,IconArrowsSort:a},localization:i}}=t,{column:s}=e,{columnDef:u}=s,{sorting:c}=n(),m=l(),g=s.getIsSorted()?"desc"===s.getIsSorted()?i.sortedByColumnDesc.replace("{column}",u.header):i.sortedByColumnAsc.replace("{column}",u.header):"desc"===s.getNextSortingOrder()?i.sortByColumnDesc.replace("{column}",u.header):i.sortByColumnAsc.replace("{column}",u.header),f=c.length>=2&&-1!==s.getSortIndex();return Ju.jsx(d,{withinPortal:!0,label:g,children:Ju.jsx(H,{color:"transparent",disabled:!f,inline:!0,label:s.getSortIndex()+1,offset:3,children:Ju.jsx(p,{"aria-label":g,color:s.getIsSorted()?Qd(m):void 0,size:"xs",sx:{opacity:s.getIsSorted()?1:.5,transform:f?"translate(-2px, 2px) scale(0.9)":void 0,transition:"opacity 100ms ease-in-out","&:hover":{opacity:1}},children:"desc"===s.getIsSorted()?Ju.jsx(r,{}):"asc"===s.getIsSorted()?Ju.jsx(o,{}):Ju.jsx(a,{})})})})},rm=({header:e,table:t})=>{var r,o,a,i;const s=l(),{getState:u,options:{columnFilterDisplayMode:d,enableColumnActions:p,enableColumnDragging:m,enableColumnOrdering:g,enableGrouping:f,enableMultiSort:h,layoutMode:b,mantineTableHeadCellProps:v},refs:{tableHeadCellRefs:y},setHoveredColumn:w}=t,{density:x,draggingColumn:S,grouping:C,hoveredColumn:E}=u(),{column:k}=e,{columnDef:_}=k,{columnDefType:O}=_,I=v instanceof Function?v({column:k,table:t}):v,P=_.mantineTableHeadCellProps instanceof Function?_.mantineTableHeadCellProps({column:k,table:t}):_.mantineTableHeadCellProps,F=Object.assign(Object.assign({},I),P),j=(p||_.enableColumnActions)&&!1!==_.enableColumnActions,M=!1!==m&&!1!==_.enableColumnDragging&&(m||g&&!1!==_.enableColumnOrdering||f&&!1!==_.enableGrouping&&!C.includes(k.id)),A=n.useMemo((()=>{let e=0;return k.getCanSort()&&e++,j&&(e+=1.75),M&&(e+=1.25),e}),[j,M]),T=n.useMemo((()=>(null==S?void 0:S.id)===k.id?`1px dashed ${s.colors.gray[7]} !important`:(null==E?void 0:E.id)===k.id?`2px dashed ${Qd(s)} !important`:void 0),[S,E]),N=T?{borderLeft:T,borderRight:T,borderTop:T}:void 0,L=(null==_?void 0:_.Header)instanceof Function?null===(r=null==_?void 0:_.Header)||void 0===r?void 0:r.call(_,{column:k,header:e,table:t}):null!==(o=null==_?void 0:_.Header)&&void 0!==o?o:_.header;return Ju.jsxs(c,Object.assign({component:"th",align:"group"===O?"center":"left",colSpan:e.colSpan,onDragEnter:e=>{f&&"drop-zone"===(null==E?void 0:E.id)&&w(null),g&&S&&"group"!==O&&w(!1!==_.enableColumnOrdering?k:null)},ref:e=>{e&&(y.current[k.id]=e)}},F,{sx:n=>Object.assign(Object.assign({flexDirection:"grid"===b?"column":void 0,fontWeight:"bold",overflow:"visible",padding:"xl"===x?"23px":"md"===x?"16px":"10px",userSelect:h&&k.getCanSort()?"none":void 0,verticalAlign:"top",zIndex:k.getIsResizing()||(null==S?void 0:S.id)===k.id?3:k.getIsPinned()&&"group"!==O?2:1,"&:hover .mantine-ActionIcon-root":{opacity:1}},Kd({column:k,header:e,table:t,tableCellProps:F,theme:n})),N),children:[e.isPlaceholder?null:Ju.jsxs(R,{className:"mantine-TableHeadCell-Content",sx:{alignItems:"flex-start",flexDirection:"right"===(null==F?void 0:F.align)?"row-reverse":"row",justifyContent:"group"===O||"center"===(null==F?void 0:F.align)?"center":k.getCanResize()?"space-between":"flex-start",position:"relative",width:"100%"},children:[Ju.jsxs(R,{className:"mantine-TableHeadCell-Content-Labels",onClick:k.getToggleSortingHandler(),sx:{alignItems:"center",cursor:k.getCanSort()&&"group"!==O?"pointer":void 0,flexDirection:"right"===(null==F?void 0:F.align)?"row-reverse":"row",overflow:"data"===O?"hidden":void 0,paddingLeft:"center"===(null==F?void 0:F.align)?`${A}rem`:void 0},children:[Ju.jsx(R,{className:"mantine-TableHeadCell-Content-Wrapper",sx:{overflow:"data"===O?"hidden":void 0,textOverflow:"ellipsis",whiteSpace:(null!==(i=null===(a=_.header)||void 0===a?void 0:a.length)&&void 0!==i?i:0)<20?"nowrap":"normal"},title:"data"===O?_.header:void 0,children:L}),k.getCanSort()&&Ju.jsx(nm,{header:e,table:t}),k.getCanFilter()&&Ju.jsx(Jp,{header:e,table:t})]}),"group"!==O&&Ju.jsxs(R,{className:"mantine-TableHeadCell-Content-Actions",sx:{alignItems:"center",alignSelf:"center",whiteSpace:"nowrap"},children:[M&&Ju.jsx(em,{column:k,table:t,tableHeadCellRef:{current:y.current[k.id]}}),j&&Ju.jsx(Xp,{header:e,table:t})]}),k.getCanResize()&&Ju.jsx(tm,{header:e,table:t})]}),"subheader"===d&&k.getCanFilter()&&Ju.jsx(Zp,{header:e,table:t})]}))},om=({headerGroup:e,table:t,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:o})=>{const{getState:a,options:{enableStickyHeader:i,layoutMode:l,mantineTableHeadRowProps:s}}=t,{isFullScreen:u}=a(),d=s instanceof Function?s({headerGroup:e,table:t}):s,p=i||u;return Ju.jsxs(c,Object.assign({component:"tr"},d,{sx:e=>Object.assign(Object.assign({backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,boxShadow:`0 4px 8px ${e.fn.rgba(e.black,.1)}`,display:"grid"===l?"flex":"table-row",top:p?0:void 0},(null==d?void 0:d.sx)instanceof Function?null==d?void 0:d.sx(e):null==d?void 0:d.sx),{position:p?"sticky":void 0}),children:[r?Ju.jsx("th",{style:{display:"flex",width:r}}):null,(null!=n?n:e.headers).map((r=>{const o=n?e.headers[r.index]:r;return Ju.jsx(rm,{header:o,table:t},o.id)})),o?Ju.jsx("th",{style:{display:"flex",width:o}}):null]}))},am=({table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getHeaderGroups:o,getSelectedRowModel:a,getState:i,options:{enableStickyHeader:l,layoutMode:s,mantineTableHeadProps:u,positionToolbarAlertBanner:d}}=e,{isFullScreen:p,showAlertBanner:m}=i(),g=u instanceof Function?u({table:e}):u,f=l||p;return Ju.jsx(c,Object.assign({component:"thead"},g,{sx:e=>Object.assign({display:"grid"===s?"grid":"table-row-group",position:f&&"grid"===s?"sticky":"relative",opacity:.97,top:f?0:void 0,zIndex:f?2:void 0},(null==g?void 0:g.sx)instanceof Function?null==g?void 0:g.sx(e):null==g?void 0:g.sx),children:"head-overlay"===d&&(m||a().rows.length>0)?Ju.jsx("tr",{style:{display:"grid"===s?"grid":"table-row"},children:Ju.jsx("th",{colSpan:e.getVisibleLeafColumns().length,style:{display:"grid"===s?"grid":"table-cell",padding:0},children:Ju.jsx(Tp,{table:e})})}):o().map((o=>Ju.jsx(om,{headerGroup:o,table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r},o.id)))}))},im=({footer:e,table:t})=>{var n,r,o;const{options:{layoutMode:a,mantineTableFooterCellProps:i}}=t,{column:l}=e,{columnDef:s}=l,{columnDefType:u}=s,d=i instanceof Function?i({column:l,table:t}):i,p=s.mantineTableFooterCellProps instanceof Function?s.mantineTableFooterCellProps({column:l,table:t}):s.mantineTableFooterCellProps,m=Object.assign(Object.assign({},d),p);return Ju.jsx(c,Object.assign({component:"th",align:"group"===u?"center":"left",colSpan:e.colSpan},m,{sx:e=>Object.assign({display:"grid"===a?"grid":"table-cell",fontWeight:"bold",justifyContent:"group"===u?"center":void 0,padding:"8px",verticalAlign:"top",zIndex:l.getIsPinned()&&"group"!==u?2:1},Kd({column:l,table:t,theme:e,tableCellProps:m})),children:Ju.jsx(Ju.Fragment,{children:e.isPlaceholder?null:null!==(o=null!==(r=s.Footer instanceof Function?null===(n=s.Footer)||void 0===n?void 0:n.call(s,{column:l,footer:e,table:t}):s.Footer)&&void 0!==r?r:s.footer)&&void 0!==o?o:null})}))},lm=({footerGroup:e,table:t,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:o})=>{var a;const{options:{layoutMode:i,mantineTableFooterRowProps:l}}=t;if(!(null===(a=e.headers)||void 0===a?void 0:a.some((e=>"string"==typeof e.column.columnDef.footer&&!!e.column.columnDef.footer||e.column.columnDef.Footer))))return null;const s=l instanceof Function?l({footerGroup:e,table:t}):l;return Ju.jsxs(c,Object.assign({component:"tr"},s,{sx:e=>Object.assign({backgroundColor:e.fn.lighten("dark"===e.colorScheme?e.colors.dark[7]:e.white,.06),display:"grid"===i?"flex":"table-row",width:"100%"},(null==s?void 0:s.sx)instanceof Function?null==s?void 0:s.sx(e):null==s?void 0:s.sx),children:[r?Ju.jsx("th",{style:{display:"flex",width:r}}):null,(null!=n?n:e.headers).map((r=>{const o=n?e.headers[r.index]:r;return Ju.jsx(im,{footer:o,table:t},o.id)})),o?Ju.jsx("th",{style:{display:"flex",width:o}}):null]}))},sm=({table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getFooterGroups:o,getState:a,options:{enableStickyFooter:i,layoutMode:l,mantineTableFooterProps:s}}=e,{isFullScreen:u}=a(),d=s instanceof Function?s({table:e}):s,p=(u||i)&&!1!==i;return Ju.jsx(c,Object.assign({component:"tfoot"},d,{sx:e=>Object.assign({bottom:p?0:void 0,display:"grid"===l?"grid":"table-row-group",opacity:p?.97:void 0,outline:p?"light"===e.colorScheme?`1px solid ${e.colors.gray[3]}`:`1px solid ${e.colors.gray[7]}`:void 0,position:p?"sticky":void 0,zIndex:p?1:void 0},(null==d?void 0:d.sx)instanceof Function?null==d?void 0:d.sx(e):null==d?void 0:d.sx),children:o().map((o=>Ju.jsx(lm,{footerGroup:o,table:e,virtualColumns:t,virtualPaddingLeft:n,virtualPaddingRight:r},o.id)))}))},um=({table:e})=>{var t,r,o,a;const{getFlatHeaders:i,getState:l,options:{columnVirtualizerInstanceRef:s,columnVirtualizerProps:u,columns:c,enableColumnResizing:d,enableColumnVirtualization:p,enablePinning:m,enableTableFooter:g,enableTableHead:f,layoutMode:h,mantineTableProps:b,memoMode:v},refs:{tableContainerRef:y}}=e,{columnPinning:w,columnSizing:x,columnSizingInfo:S,columnVisibility:C,density:E}=l(),k=b instanceof Function?b({table:e}):b,_=u instanceof Function?u({table:e}):u,R=n.useMemo((()=>{const e=i(),t={};for(let n=0;n{var t,n,r,o;if(!p)return 0;const a=null!==(o=null===(r=null===(n=null===(t=e.getRowModel().rows[0])||void 0===t?void 0:t.getCenterVisibleCells())||void 0===n?void 0:n.slice(0,16))||void 0===r?void 0:r.map((e=>1.2*e.column.getSize())))&&void 0!==o?o:[];return a.reduce(((e,t)=>e+t),0)/a.length}),[e.getRowModel().rows,w,C]),[I,P]=n.useMemo((()=>p&&m?[e.getLeftLeafColumns().map((e=>e.getPinnedIndex())),e.getRightLeafColumns().map((t=>e.getVisibleLeafColumns().length-t.getPinnedIndex()-1))]:[[],[]]),[w,p,m]),F=p?vd(Object.assign({count:e.getVisibleLeafColumns().length,estimateSize:()=>O,getScrollElement:()=>y.current,horizontal:!0,overscan:3,rangeExtractor:n.useCallback((e=>[...new Set([...I,...cd(e),...P])]),[I,P])},_)):void 0;s&&F&&(s.current=F);const j=F?F.getVirtualItems():void 0;let M,A;F&&(null==j?void 0:j.length)&&(M=null!==(r=null===(t=j[I.length])||void 0===t?void 0:t.start)&&void 0!==r?r:0,A=F.getTotalSize()-(null!==(a=null===(o=j[j.length-1-P.length])||void 0===o?void 0:o.end)&&void 0!==a?a:0));const T={columnVirtualizer:F,enableHover:null==k?void 0:k.highlightOnHover,isStriped:null==k?void 0:k.striped,table:e,virtualColumns:j,virtualPaddingLeft:M,virtualPaddingRight:A};return Ju.jsxs($,Object.assign({highlightOnHover:!0,horizontalSpacing:E,verticalSpacing:E},k,{sx:e=>Object.assign({display:"grid"===h?"grid":"table",tableLayout:"grid"!==h&&d?"fixed":void 0,"& tr:first-of-type td":{borderTop:`1px solid ${e.colors.gray["dark"===e.colorScheme?8:3]}`},"& tr:last-of-type td":{borderBottom:`1px solid ${e.colors.gray["dark"===e.colorScheme?8:3]}`}},(null==k?void 0:k.sx)instanceof Function?k.sx(e):null==k?void 0:k.sx),style:Object.assign(Object.assign({},R),null==k?void 0:k.style),children:[f&&Ju.jsx(am,Object.assign({},T)),"table-body"===v||S.isResizingColumn?Ju.jsx(pp,Object.assign({},T)):Ju.jsx(dp,Object.assign({},T)),g&&Ju.jsx(sm,Object.assign({},T))]}))},cm=({open:e,table:t})=>{var r;const{getState:o,options:{onEditingRowCancel:a,onCreatingRowCancel:i,renderEditRowModalContent:l,renderCreateRowModalContent:s,mantineCreateRowModalProps:u,mantineEditRowModalProps:c},setEditingRow:d,setCreatingRow:p}=t,{creatingRow:m,editingRow:g}=o(),f=null!=m?m:g,h=u instanceof Function?u({row:f,table:t}):u,b=c instanceof Function?c({row:f,table:t}):c,v=Object.assign(Object.assign({},b),m&&h),y=f.getAllCells().filter((e=>"data"===e.column.columnDef.columnDefType)).map((e=>Ju.jsx(tp,{cell:e,table:t},e.id)));return n.createElement(B,Object.assign({opened:e,withCloseButton:!1},v,{onClose:()=>{var e;m?(null==i||i({row:f,table:t}),p(null)):(null==a||a({row:f,table:t}),d(null)),f._valuesCache={},null===(e=v.onClose)||void 0===e||e.call(v)},key:f.id}),null!==(r=m&&(null==s?void 0:s({row:f,table:t,internalEditComponents:y}))||(null==l?void 0:l({row:f,table:t,internalEditComponents:y})))&&void 0!==r?r:Ju.jsxs(Ju.Fragment,{children:[Ju.jsx("form",{onSubmit:e=>e.preventDefault(),children:Ju.jsx(D,{sx:{gap:"24px",paddingTop:"16px",width:"100%"},children:y})}),Ju.jsx(R,{sx:{paddingTop:"24px",justifyContent:"flex-end"},children:Ju.jsx(vp,{row:f,table:t,variant:"text"})})]}))},dm="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,pm=({table:e})=>{const{getState:t,options:{createDisplayMode:r,editDisplayMode:o,enableStickyHeader:a,mantineLoadingOverlayProps:i,mantineTableContainerProps:l},refs:{tableContainerRef:s,bottomToolbarRef:u,topToolbarRef:d}}=e,{isFullScreen:p,isLoading:m,showLoadingOverlay:g,creatingRow:f,editingRow:h}=t(),[b,v]=n.useState(0),y=l instanceof Function?l({table:e}):l,w=i instanceof Function?i({table:e}):i;dm((()=>{var e,t,n,r;const o="undefined"!=typeof document&&null!==(t=null===(e=d.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==t?t:0,a="undefined"!=typeof document&&null!==(r=null===(n=null==u?void 0:u.current)||void 0===n?void 0:n.offsetHeight)&&void 0!==r?r:0;v(o+a)}));const x="modal"===r&&f,S="modal"===o&&h;return Ju.jsxs(c,Object.assign({},y,{ref:e=>{e&&(s.current=e,(null==y?void 0:y.ref)&&(y.ref.current=e))},sx:e=>Object.assign({maxWidth:"100%",maxHeight:a?`clamp(350px, calc(100vh - ${b}px), 9999px)`:void 0,overflow:"auto",position:"relative"},(null==y?void 0:y.sx)instanceof Function?y.sx(e):null==y?void 0:y.sx),style:Object.assign({maxHeight:p?`calc(100vh - ${b}px)`:void 0},null==y?void 0:y.style),children:[Ju.jsx(O,Object.assign({visible:m||g},w)),Ju.jsx(um,{table:e}),(x||S)&&Ju.jsx(cm,{open:!0,table:e})]}))},mm=({table:e})=>{const{getState:t,options:{enableBottomToolbar:n,enableTopToolbar:r,mantinePaperProps:o,renderBottomToolbar:a,renderTopToolbar:i},refs:{tablePaperRef:l}}=e,{isFullScreen:s}=t(),u=o instanceof Function?o({table:e}):o;return Ju.jsxs(k,Object.assign({shadow:"xs",withBorder:!0},u,{ref:e=>{l.current=e,(null==u?void 0:u.ref)&&(u.ref.current=e)},sx:e=>Object.assign({overflow:"hidden",transition:"all 100ms ease-in-out"},(null==u?void 0:u.sx)instanceof Function?null==u?void 0:u.sx(e):null==u?void 0:u.sx),style:Object.assign(Object.assign({},s?{bottom:0,height:"100vh",left:0,margin:0,maxHeight:"100vh",maxWidth:"100vw",padding:0,position:"fixed",right:0,top:0,width:"100vw",zIndex:100}:{}),null==u?void 0:u.style),children:[r&&(i instanceof Function?i({table:e}):null!=i?i:Ju.jsx(Kp,{table:e})),Ju.jsx(pm,{table:e}),n&&(a instanceof Function?a({table:e}):null!=a?a:Ju.jsx(Yp,{table:e}))]}))},gm=e=>{let t;return t=(e=>void 0!==e.table)(e)?e.table:Sp(e),Ju.jsx(mm,{table:t})};function fm(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hm(e){return(e=fm(Math.abs(e)))?e[1]:NaN}var bm,vm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ym(e){if(!(t=vm.exec(e)))throw new Error("invalid format: "+e);var t;return new wm({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 wm(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 xm(e,t){var n=fm(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}ym.prototype=wm.prototype,wm.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};const Sm={"%":(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)=>xm(100*e,t),r:xm,s:function(e,t){var n=fm(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(bm=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+fm(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Cm(e){return e}var Em,km,_m,Rm=Array.prototype.map,Om=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Im(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Cm:(t=Rm.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,l=t[0],s=0;o>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(e.substring(o-=l,o+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?Cm:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Rm.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=ym(e)).fill,n=e.align,d=e.sign,p=e.symbol,m=e.zero,g=e.width,f=e.comma,h=e.precision,b=e.trim,v=e.type;"n"===v?(f=!0,v="g"):Sm[v]||(void 0===h&&(h=12),b=!0,v="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var y="$"===p?o:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",w="$"===p?a:/[%p]/.test(v)?s:"",x=Sm[v],S=/[defgprs%]/.test(v);function C(e){var o,a,s,p=y,C=w;if("c"===v)C=x(e)+C,e="";else{var E=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),h),b&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&"+"!==d&&(E=!1),p=(E?"("===d?d:u:"-"===d||"("===d?"":d)+p,C=("s"===v?Om[8+bm/3]:"")+C+(E&&"("===d?")":""),S)for(o=-1,a=e.length;++o(s=e.charCodeAt(o))||s>57){C=(46===s?i+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}f&&!m&&(e=r(e,1/0));var k=p.length+e.length+C.length,_=k>1)+p+e+C+_.slice(k);break;default:e=_+p+e+C}return l(e)}return h=void 0===h?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=ym(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hm(t)/3))),o=Math.pow(10,-r),a=Om[8+r/3];return function(e){return n(o*e)+a}}}}e("b",km),e("a",_m),Em=Im({thousands:",",grouping:[3],currency:["$",""]}),e("b",km=Em.format),e("a",_m=Em.formatPrefix);const Pm=e("d",{"ar-SA":{separator:"",suffixes:["y","z","a","f","p","n","µ","m",""," ألف"," مليون"," بليون"," تريليون"," كوادريليون"," كوينتيليون"," سكستليون","سبتيليون"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["SAR ",""]},"en-GB":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","B","T","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["£",""]},"en-US":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","B","T","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["$",""]},"en-SA":{separator:"",suffixes:["y","z","a","f","p","n","µ","m",""," thousand"," million"," billion"," trillion"," quadrillion"," quintillion"," sextillion","septillion"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["$",""]},"es-CL":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","MM","B","T","Q","Z","Y"],grouping:[3],delimiters:{thousands:".",decimal:","},currency:["$",""]},"es-MX":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","M","MM","B","T","Q","Z","Y"],grouping:[3],delimiters:{thousands:",",decimal:"."},currency:["$",""]},"es-ES":{separator:"",suffixes:["y","z","a","f","p","n","µ","m","","k","mm","b","t","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:".",decimal:","},currency:["€",""]},"et-EE":{separator:" ",suffixes:["y","z","a","f","p","n","µ","m","","tuhat","miljonit","miljardit","triljonit","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:" ",decimal:","},currency:["","eurot"]},"fr-FR":{suffixes:["y","z","a","f","p","n","µ","m","","k","m","b","t","q","Q","Z","Y"],grouping:[3],delimiters:{thousands:" ",decimal:","},currency:["€",""]}});function Fm(e){return Fm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fm(e)}var jm=function(e,t){return parseFloat(Math.round(e*Math.pow(10,t))/Math.pow(10,t)).toFixed(t)};function Mm(e,t){var n=Math.pow(10,3*Math.abs(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Am(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!isFinite(e))return"N/A";var r,o=(e*=1)<0,a=e.toString().split(".")[0].replace("-","").length,i="object"===Fm(t)?t:Pm[t]||Pm["en-US"],l=i.suffixes.map(Mm),s=i.delimiters.decimal||".",u=i.separator||"",c=i.delimiters.thousands||",",d=Im({currency:i.currency||["$",""],decimal:s,grouping:i.grouping||[3],thousands:c});if(n)r=d.format(n)(e);else if(0===e)r="0";else if(a>=3){var p=function(e,t,n){var r=0,o=parseFloat(e.replace("−","-"),10);o&&(o<0&&(o*=-1),r=1+Math.floor(1e-12+Math.log(o)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3))));var a=n[8+r/3];return{number:jm(a.scale(o),t),symbol:a.symbol}}(d.format(".3r")(e),2,l),m=parseFloat(p.number).toString().replace(".",s),g=p.symbol;r="".concat(m).concat(u).concat(g)}else r=3===a?d.format(",f")(e):e<1&&e>-1?d.format(".2g")(e):d.format(".3g")(e);return"".concat(o&&"−"!==r.charAt(0)?"−":"").concat(r).replace(/−/g,"-").replace(/(\.[0]*[1-9]*)[0]*$/g,"$1").replace(/\.[0]*$/g,"")}const Tm=function(e){return".3~a"===e?Am:km(e)};var Nm=Object.defineProperty,Lm={action_copy:"Copy",action_copy_done:"Copied",action_download:"Download",action_open:"Open",action_reload:"Reload",comparison:{EQ:"Equal to",GT:"Greater than",GTE:"Equal or greater than",LT:"Lower than",LTE:"Equal or lower than",NEQ:"Not equal to"},debug_view:{tab_label:"Debugger",httpheaders:"Response headers",jssource_prefix:"Javascript source for ",jssource_suffix:"",url_aggregate:"Aggregate API URL",url_logiclayer:"LogicLayer API URL"},direction:{ASC:"Ascending",DESC:"Descending"},formats:{csv:"CSV",json:"JSON",jsonarrays:"JSON Arrays",jsonrecords:"JSON Records",xls:"XLS"},loading:{title:"Loading...",message_heavyquery:"The current query might contain a maximum of {{rows}} rows.\nPlease wait...",message_default:"Please wait..."},params:{action_clear:"Clear query",action_clear_description:"Clear all parameters from your current query",action_execute:"Execute query",column_title:"Parameters",current_endpoint:"Current endpoint: {{label}}",dimmenu_abbrjoint:": ",dimmenu_dimension:"{{dimension}}",dimmenu_hierarchy:"{{abbr}}",dimmenu_level:"{{abbr}}",error_no_cut_selected_detail:"You can add data filters based on selected drilldowns.",error_no_cut_selected_title:"No cuts added",error_no_dimension_selected_detail:"You must add at least one drilldown.",error_no_dimension_selected_title:"No drilldowns selected",error_fetchmembers_detail:"An error ocurred while loading the member list.",error_fetchmembers_title:"Error loading member list",label_amount:"Amount",label_boolean_debug:"Debug response",label_boolean_distinct:"Apply DISTINCT to drilldowns",label_boolean_exclude_default_members:"Exclude default members",label_boolean_full_results:"Show all rows",label_boolean_nonempty:"Only return non-empty data",label_boolean_parents:"Include parent levels",label_boolean_sparse:"Optimize sparse results",label_cube:"Cube",label_cuts_filterby_id:"IDs",label_cuts_filterby_name:"Names",label_cuts_filterby_any:"Any",label_locale:"Data language",label_localeoption:"{{nativeName}}",label_measure:"Measure",label_pagination_limit:"Results limit",label_pagination_limit_description:"Max limit: {{limit}}",label_pagination_offset:"Results offset",label_sorting_key:"Sort by",label_sorting_order:"Order",label_source:"Source",label_subtopic:"Subtopic",label_table:"Table",label_timelevel:"Time level",label_topic:"Topic",search_placeholder:"Filter (regex enabled)",tag_cuts_plural:"{{abbr}} ({{n}} selected)",tag_cuts:"{{abbr}} ({{first_member}})",tag_drilldowns_abbrjoint:"/",tag_drilldowns:"{{abbr}}",title_area_cuts:"Cuts ({{n}})",title_area_drilldowns:"Drilldowns ({{n}})",title_area_filters:"Filters ({{n}})",title_area_measures:"Measures ({{n}})",title_area_options:"Query options",title_area_pagination:"Pagination",title_area_sorting:"Sorting",title_caption:"Caption",title_downloaddata:"Download dataset",title_members:"Members",title_properties:"Properties",tooltip_area_cuts:"",tooltip_area_drilldowns:"",tooltip_area_filters:"",tooltip_area_measures:"",tooltip_area_options:""},pivot_view:{tab_label:"Pivot Data",error_missingparams:"The current query doesn't have enough parameters. Two different drilldowns and a measure are needed.",error_onedimension:"The rows and columns in a pivotted table need 2 different drilldowns.",error_internal:"An internal error ocurred in the pivotting tool. We will fix it as soon as possible.",error_internal_detail:"If you need to contact us about this error, please include this message:\n{error}",label_ddcolumn:"Column drilldown",label_ddcolumnprop:"Column property",label_ddrow:"Row drilldown",label_ddrowprop:"Row property",label_formatter:"Numeral format",label_valmeasure:"Value measure",loading_details:"This might take a while, please wait...",loading_title:"Reestructuring data",title_download:"Download matrix",title_params:"Matrix params",warning:"Warning",warning_notsummeasure:'The current query contains more than 2 drilldowns, and the aggregation type of the measure is not "SUM". The values you\'re getting might not be meaningful.',warning_propertypivot:"Unlike Drilldown Members, Drilldown Properties are not guaranteed to be unique. In this view, data points are aggregated based on the property labels, so please ensure you're not missing information.",warning_sumdimensions:"There's more than 2 drilldowns in this query. Remaining values will be summed."},placeholders:{incomplete:"[Incomplete parameters]",unselected:"[Unselected]",none:"[None]"},preview_mode:{btn_get_all:"Show all rows",btn_get_preview:"Show preview",description_full:"You are currently viewing all available rows. Turn off for faster performance.",description_preview:"You are currently viewing a preview response of the first {{limit}} rows.",title_full:"All records",title_preview:"Preview records"},queries:{action_create:"New query",action_parse:"Query from URL",error_not_query:"Please construct a valid query",error_no_drilldowns:"You must add at least one drilldown.",error_no_measures:"You must add at least one measure.",error_one_hierarchy_per_dimension:"You must only select drilldowns of a single hierarchy.",error_one_cut_per_dimension:"You must only apply cuts over levels of a single hierarchy.",column_title:"Queries",unset_parameters:"No parameters set"},results:{error_execquery_title:"There was a problem with the last query",error_execquery_code401:"You don't have authorization to execute this query.\n{{response}}",error_execquery_default:"The backend server had an unexpected issue.\nPlease contact us if you require the data urgently.\n{{response}}\nCode {{status}}: {{statusText}}",error_disconnected_title:"You are not connected to the internet.",error_serveroffline_title:"There's a problem contacting with the server",error_serveroffline_detail:"Check the availability of the URL ",error_emptyresult_title:"Empty dataset",error_emptyresult_detail:"The query didn't return elements. Try again with different parameters.",count_rows:"{{n}} row",count_rows_plural:"{{n}} rows"},row_limit:{title:"Max row limit hit",description:"Your last query hits the defined row limit. You are currently viewing a truncated response of the first {{limit}} rows."},selectlevel_placeholder:"Level...",selectmeasure_placeholder:"Measure...",selecttimelevel_placeholder:"Time level...",table_view:{tab_label:"Data Table",numeral_format:"Numeral format",sort_asc:"Sort Asc",sort_desc:"Sort Desc",slicedresult:"Due to performance limitations on Firefox, we are limiting the results in this view to the first 10000 rows.\nThis limitation only affects this table; you can download the full dataset as normal."},transfer_input:{count_hidden:"{{n}} item hidden",count_hidden_plural:"{{n}} items hidden",search_placeholder:"Filter (regex enabled)",select_all:"Select all",unselect_all:"Unselect all",select_filtered:"Select filtered",unselect_filtered:"Unselect filtered",selected_items:"Selected items",unselected_items:"Unselected items"}},{useTranslation:Dm,TranslationConsumer:zm,TranslationProvider:$m}=Cn({defaultLocale:"en",defaultTranslation:Lm});function Bm(e){const{sourceCall:t,url:o}=e.result,{translate:a}=Dm(),{copy:i,copied:l}=s({timeout:1e3}),u=n.useCallback((()=>i(o)),[o]),d=n.useCallback((()=>window.open(o,"_blank")),[o]),p=r.createElement(c,{component:"span"},a("debug_view.jssource_prefix"),r.createElement(Z,{href:"https://www.npmjs.com/package/@datawheel/olap-client"},"olap-client"),a("debug_view.jssource_suffix")),m=n.useMemo((()=>{const t=Object.entries(e.result.headers||{});return 0===t.length?null:r.createElement(J.Wrapper,{label:a("debug_view.httpheaders")},r.createElement(c,{component:"dl",sx:{fontFamily:"monospace",overflowWrap:"break-word"}},t.map((e=>r.createElement(r.Fragment,{key:e[0]},r.createElement(v,{component:"dt",fw:"bold",fz:"sm"},e[0]),r.createElement(v,{component:"dd",c:"#5c940d",fz:"sm"},e[1]))))))}),[e.result.headers]);return r.createElement(c,{id:"query-results-debug-view"},r.createElement(D,{spacing:"md",px:"md",py:"sm"},o&&r.createElement(J.Wrapper,{label:a("debug_view.url_logiclayer")},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(J,{icon:r.createElement(hn,null),readOnly:!0,rightSectionWidth:"auto",value:o,w:"100%"}),r.createElement(V.Group,null,r.createElement(V,{leftIcon:r.createElement(Ut,null),onClick:d,variant:"default"},a("action_open")),r.createElement(V,{leftIcon:r.createElement(Nt,null),onClick:u,variant:"default"},a(l?"action_copy_done":"action_copy"))))),r.createElement(te,{cols:2},t&&r.createElement(J.Wrapper,{label:p},r.createElement(Qe,{language:"javascript",styles:{line:{boxSizing:"border-box"}}},t)),m)))}function Vm(){return Math.random().toString(16).slice(2)}function Um(e,t="en"){return Gm(e,"caption",t)||e.caption||e.uniqueName||e.name}function Gm(e,t,n="xx"){const r=e.annotations;return r[`${t}_${n}`]||r[`${t}_${n.slice(0,2)}`]||r[t]}function Hm(e,t){return e&&Number.isFinite(e)&&!Number.isNaN(e)?Number.parseFloat(e):t}function qm(e){return[].concat(e).filter((e=>null!=e))}function Wm(e,t){const n=[];for(let r=0;r[e.name,e]))),a=new Map(e.dimensions.map((e=>[e.name,new Map(e.hierarchies.map((e=>[e.name,new Map(e.levels.map((e=>[e.name,e])))])))]))),i=Wm(Object.values(t.drilldowns),(e=>{const t=a.get(e.dimension),n=null==t?void 0:t.get(e.hierarchy),r=null==n?void 0:n.get(e.level);if(!r)return null;const o=Wm(e.properties,(e=>e.active&&r.properties.find((t=>t.name===e.name))||null));return[r,...o]})).flat(1),l=Object.keys(n[0]);return Object.fromEntries(Wm(l,(e=>{const t=o.get(e)||(e=>{const t=e.replace(/^ID\s|\sID$/,"");return i.find((t=>t.uniqueName===e))||i.find((t=>t.name===e))||i.find((e=>e.uniqueName===t))||i.find((e=>e.name===t))})(e);if(!t)return null;const a=new Set(n.map((t=>typeof t[e]))),s=1===a.size?a.has("number")?"number":a.has("boolean")?"boolean":"string":a.has("number")?"number":"string",u=t._type,c="level"===u&&t.uniqueName||t.name,d="level"===u&&(e.endsWith(" ID")||!l.includes(`${c} ID`));return[e,{label:e,localeLabel:e.replace(c,Um(t,r)),entity:t,entityType:u,isId:d,range:"number"===s?Jm(n,e):void 0,valueType:s}]})))}function Jm(e,t){const n=Math.ceil(e.length/3e4);let r=-1/0,o=1/0;for(let a=0;ae[t]));o=Math.min(o,...n),r=Math.max(r,...n)}return[o,r]}function eg(e){return`${e}`}function tg(e){return"function"==typeof e?e:t=>t[e]}function ng(e){return e.some((e=>e.indexOf(".")>-1))?e.map((e=>`[${e}]`)).join("."):e.join(".")}function rg(e,t,n={}){const r="function"==typeof t?t:e=>e[t];for(let o=0;o-1?e.replace(/^\[|\]$/g,"").split("].["):e.split(".");return 1===t.length&&t.unshift(t[0]),2===t.length&&t.unshift(t[0]),t}function lg(e){const t=function(e){return[e.dimension,e.hierarchy,"level"in e?e.level:e.name]}(e);return t[0]===t[1]&&t.splice(0,1),t[0]===t[1]&&t.splice(0,1),ng(t)}function sg(e){return{created:e.created||(new Date).toISOString(),key:e.key||Vm(),label:e.label||"",isDirty:!0,panel:e.panel||null,params:cg(e.params||{}),result:ug(e.result||{})}}function ug(e){return{data:e.data||[],types:e.types||{},headers:e.headers||{},sourceCall:e.sourceCall||"",status:e.status||0,url:e.url||""}}function cg(e){return{booleans:e.booleans||{},cube:e.cube||"",cuts:e.cuts||{},drilldowns:e.drilldowns||{},filters:e.filters||{},isPreview:e.isPreview||!1,locale:e.locale||"",measures:e.measures||{},pagiLimit:e.pagiLimit||e.limitAmount||e.limit||0,pagiOffset:e.pagiOffset||e.limitOffset||e.offset||0,sortDir:e.sortDir||e.sortDirection||e.sortOrder||e.order||"desc",sortKey:e.sortKey||e.sortProperty||""}}function dg(e){"function"==typeof e.toJSON&&(e=e.toJSON());const t=`${e.dimension}`,n=`${e.hierarchy}`,r=`${e.level||e.name}`;return{active:"boolean"==typeof e.active&&e.active,dimension:t,fullName:e.fullName||ng([t,n,r]),hierarchy:n,key:e.key||Vm(),level:r,members:Array.isArray(e.members)?e.members:[],uniqueName:e.uniqueName||r}}function pg(e){const t="object"==typeof e.dimension?e.dimension.dimensionType:e.dimType;"function"==typeof e.toJSON&&(e=e.toJSON());const n=`${e.dimension}`,r=`${e.hierarchy}`,o=`${e.level||e.name}`;return{active:"boolean"!=typeof e.active||e.active,captionProperty:e.captionProperty||"",dimension:n,dimType:t,fullName:e.fullName||ng([n,r,o]),hierarchy:r,key:e.key||Vm(),level:o,memberCount:0,properties:qm(e.properties).map(hg),uniqueName:e.uniqueName||e.name||e.level}}function mg(e){return{key:e.key||Vm(),active:"boolean"!=typeof e.active||e.active,measure:Al.isMeasure(e.measure)?e.measure.name:e.measure||`${e.name}`,conditionOne:e.conditionOne||[e.const1?`${e.const1[0]}`:`${Ol.GT}`,e.const1?e.const1[1].toString():e.inputtedValue||"0",e.const1?e.const1[1]:Hm(e.interpretedValue,0)],conditionTwo:e.conditionTwo||[e.const2?`${e.const2[0]}`:`${Ol.GT}`,e.const2?e.const2[1].toString():e.inputtedValue||"0",e.const2?e.const2[1]:Hm(e.interpretedValue,0)],joint:"or"===e.joint?"or":"and"}}function gg(e){return{active:"boolean"==typeof e.active&&e.active,key:e.key||e.name||e.fullName||e.uri||`${e}`,name:e.name||e.key||`${e}`}}function fg(e){return{active:"boolean"==typeof e.active&&e.active,key:e.uri||e.fullName||e.key,name:e.name||e.key||`${e}`}}function hg(e){return{active:"boolean"==typeof e.active&&e.active,key:e.uri||e.fullName||e.key||Vm(),level:e.level,name:e.name||e.property,uniqueName:e.uniqueName||e.name}}function bg(e,t,n=Object.keys({...e,...t})){return n.every((n=>"function"==typeof e[n]||e[n]==t[n]))}e({h:Dm,T:zm});var vg=[{error:"queries.error_not_query",condition:function(e){return"object"==typeof e&&null!==e&&"string"==typeof e.cube&&e.cube.length>0&&"object"==typeof e.drilldowns&&null!==e.drilldowns&&"object"==typeof e.measures&&null!==e.measures}},{error:"queries.error_no_measures",condition:e=>Object.values(e.measures).reduce(Sg,0)>0},{error:"queries.error_no_drilldowns",condition:e=>Object.values(e.drilldowns).reduce(Sg,0)>0},{error:"queries.error_one_hierarchy_per_dimension",condition:e=>{const t=new Map;return Object.values(e.drilldowns).every((e=>{if(xg(e)){const n=t.get(e.dimension);return t.set(e.dimension,e.hierarchy),!n||n===e.hierarchy}return!0}))}},{error:"queries.error_one_cut_per_dimension",condition:e=>{const t=Wm(Object.values(e.cuts),(e=>xg(e)?lg(e):null)),n=new Set(t);return t.length===n.size}}];function yg(e){return vg.every((t=>t.condition(e)))}function wg(e){return xg(e)&&e.members.length>0}function xg(e){return e.active}function Sg(e,t){return e+(xg(t)?1:0)}var Cg="explorerServer",Eg=co({name:Cg,initialState:{cubeMap:{},endpoint:"aggregate",localeOptions:["en"],online:void 0,software:"",url:"",version:""},reducers:{updateServer:(e,t)=>({...e,...t.payload}),updateEndpoint(e,t){e.endpoint=t.payload||("aggregate"===e.endpoint?"logiclayer":"aggregate")},updateLocaleList(e,t){e.localeOptions=t.payload}}}),kg={...Eg.actions};function _g(e){return e[Cg]}var Rg=zr(_g,(e=>e.software)),Og=zr(_g,(e=>e.endpoint)),Ig=zr(Rg,(e=>e===Ss.softwareName?[Pl.csv,Pl.json,Pl.jsonrecords,Pl.xls]:(Ls.softwareName,[Pl.csv,Pl.jsonarrays,Pl.jsonrecords]))),Pg=zr(Rg,(e=>e===Ss.softwareName?["debug","distinct","nonempty","parents","sparse"]:e===Xs.softwareName?["debug","exclude_default_members","parents","sparse"]:["debug","parents"])),Fg=zr(_g,(e=>e.cubeMap));zr(Fg,Km);var jg=zr(Fg,Ym),Mg="explorerQueries",Ag={current:"default",itemMap:{default:sg({key:"default"})}},Tg=co({name:Mg,initialState:Ag,reducers:{resetQueries(e,{payload:t={}}){Xm(t,e.current)||(e.current=Object.keys(t)[0]),e.itemMap=t},removeQuery(e,t){Object.keys(e.itemMap).length<2||(delete e.itemMap[t.payload],Xm(e.itemMap,e.current)||(e.current=Object.keys(e.itemMap)[0]))},selectQuery(e,t){e.current=t.payload},updateQuery(e,{payload:t}){e.itemMap[t.key]=t},switchPanel(e,t){e.itemMap[e.current].panel=t.payload},removeCut(e,t){delete Lg(e).params.cuts[t.payload]},removeDrilldown(e,t){delete Lg(e).params.drilldowns[t.payload]},removeFilter(e,t){delete Lg(e).params.filters[t.payload]},resetAllParams(e,t){Lg(e).params=cg(t.payload)},resetCuts(e,t){Lg(e).params.cuts=t.payload},resetDrilldowns(e,t){Lg(e).params.drilldowns=t.payload},resetFilters(e,t){Lg(e).params.filters=t.payload},resetMeasures(e,t){Lg(e).params.measures=t.payload},updateIsPreview(e,{payload:t}){Lg(e).params.isPreview=t||!1},updateBoolean(e,{payload:t}){const n=Lg(e);n.params.booleans[t.key]="boolean"==typeof t.value?t.value:!n.params.booleans[t.key]},updateCube(e,{payload:t}){const n=Lg(e);if(t.cube!==n.params.cube){const{params:e,result:r}=sg({params:{cube:t.cube,measures:t.measures,locale:n.params.locale}});n.params=e,n.result=r}t.measures.length!==n.params.measures.length&&(n.params.cube=t.cube,n.params.measures=t.measures)},updateCut(e,{payload:t}){Lg(e).params.cuts[t.key]=t},updateDrilldown(e,{payload:t}){Lg(e).params.drilldowns[t.key]=t},updateFilter(e,{payload:t}){Lg(e).params.filters[t.key]=t},updateLocale(e,{payload:t}){const n=e.itemMap[e.current];t!==n.params.locale&&(n.isDirty=!0,n.params.locale=t)},updateMeasure(e,{payload:t}){Lg(e).params.measures[t.key]=t},updatePagination(e,{payload:t}){const n=Lg(e);n.params.pagiLimit=t.limit,n.params.pagiOffset=t.offset},updateSorting(e,{payload:t}){const n=Lg(e);n.params.sortDir=t.dir,n.params.sortKey=t.key},updateResult(e,{payload:t}){const n=e.itemMap[e.current];n.isDirty=t.status<200||t.status>299,n.result=t}}}),Ng={...Tg.actions};function Lg(e){const t=e.itemMap[e.current];return t.isDirty=!0,t}function Dg(e){return e[Mg]}var zg=zr(Dg,(e=>function(e,t,n=!0){if(!Array.isArray(e)||e.length<2)return e;const r=n?(e,n)=>Date.parse(n[t])-Date.parse(e[t]):(e,n)=>Date.parse(e[t])-Date.parse(n[t]);return e.slice().sort(r)}(Object.values(e.itemMap),"created",!1))),$g=zr(Dg,(e=>e.itemMap[e.current])),Bg=zr($g,(e=>e.params)),Vg=zr(Bg,(e=>e.cube)),Ug=zr([Bg,_g],((e,t)=>{const n=e.locale||t.localeOptions[0]||"";return{code:n,name:ua.getName(n),nativeName:ua.getNativeName(n)}})),Gg=zr(Bg,(e=>e.cuts));zr(Gg,Km);var Hg=zr(Gg,Ym),qg=zr(Bg,(e=>e.drilldowns));zr(qg,Km);var Wg=zr(qg,Ym),Kg=zr(Bg,(e=>e.filters));zr(Kg,Km),zr(Kg,Ym);var Yg=zr(Bg,(e=>e.measures));zr(Yg,Km);var Xg=zr(Yg,Ym),Qg=zr(Bg,(e=>e.booleans)),Zg=zr(Bg,(e=>e.isPreview)),Jg=zr(Bg,(e=>({limit:e.pagiLimit||0,offset:e.pagiOffset||0}))),ef=zr(Bg,(e=>({sortKey:e.sortKey||"",sortDir:e.sortDir}))),tf=zr(Bg,(e=>function(e){let t;return{isValid:vg.every((n=>{const r=n.condition(e);return r||(t=n.error),r})),error:t}}(e))),nf="FETCHING",rf="SUCCESS",of="FAILURE",af="explorerLoading",lf=co({name:af,initialState:{error:null,loading:!0,status:nf,trigger:null},reducers:{setLoadingMessage(e,t){e.message=t.payload}},extraReducers(e){e.addMatcher(cf,((e,t)=>{e.error=null,e.loading=!0,e.status=nf,e.trigger=t.type})).addMatcher(pf,((e,t)=>{e.error=null,e.loading=!1,e.status=rf,e.trigger=t.type})).addMatcher(df,((e,t)=>{e.error=t.payload,e.loading=!1,e.status=of,e.trigger=t.type}))}}),sf={...lf.actions,setLoadingState:(e,t)=>({type:`${af}/setLoadingState:${e}`,payload:t})};function uf(e){return e[af]}function cf(e){return e.type.endsWith(`:${nf}`)}function df(e){return e.type.endsWith(`:${of}`)}function pf(e){return e.type.endsWith(`:${rf}`)}var mf={[lf.name]:lf.reducer,[Tg.name]:Tg.reducer,[Eg.name]:Eg.reducer};Fr(mf);var gf=()=>so({reducer:mf,middleware:e=>e({thunk:{extraArgument:{olapClient:new tu,previewLimit:50,rowLimit:0}}})}),ff=la,hf={DEBUG:1,DISTINCT:2,NONEMPTY:4,PARENTS:8,SPARSE:16,EXCLUDE_DEFAULT_MEMBERS:32};function bf(e,t){const n=function(e){const t=Wm(Object.values(e.cuts),(e=>wg(e)?i(e):null)),n=Wm(Object.values(e.drilldowns),(e=>xg(e)?l(e):null)),r=Wm(Object.values(e.filters),(e=>xg(e)?s(e):null)),o=Wm(Object.values(e.measures),(e=>xg(e)?u(e):null)),a=Object.keys(e.booleans).reduce(((t,n)=>t+(e.booleans[n]&&hf[n.toUpperCase()]||0)),0);return{cube:e.cube,drilldowns:n,measures:o,booleans:a>0?a:void 0,cuts:t.length>0?t:void 0,filters:r.length>0?r:void 0,locale:e.locale?e.locale:void 0,panel:void 0,preview:e.isPreview?1:void 0};function i(e){return[lg(e)].concat(e.members).join(",")}function l(e){return[lg(e)].concat(Wm(e.properties,(e=>xg(e)?e.name:null))).join(",")}function s(e){const t=Wm([e.conditionOne,e.conditionTwo],(e=>e?`${e[0]},${e[2]}`:null));return`${e.measure},${t.join(`,${e.joint},`)}`}function u(e){return`${e.key}`}}(e);return n.panel=t||void 0,ca(n,{ignorenull:!0,skipIndex:!1,sorted:!0})}var vf=n.createContext(void 0),{Consumer:yf,Provider:wf}=vf;function xf(e){!function(e,t){const r=ff(Fg),{isDirty:o,panel:a,params:i}=ff($g),l=n.useCallback((e=>{e.state&&t.onChange(e.state)}),[t.onChange]);n.useEffect((()=>{if(e)return window.addEventListener("popstate",l),()=>window.removeEventListener("popstate",l)}),[e]),n.useEffect((()=>{if(!e||o||null==r[i.cube])return;const t=window.location.search.slice(1),n=bf(i,a);if(t!==n){const e=`${window.location.pathname}?${n}`,t=new URLSearchParams(window.location.search).get("panel");t&&t[1]!==a?window.history.replaceState(i,"",e):window.history.pushState(i,"",e)}}),[r,o,a])}(e.withPermalink,{onChange:e.actions.resetAllParams});const t=n.useMemo((()=>({actions:e.actions,defaultMembersFilter:e.defaultMembersFilter||"id",formatters:e.formatters||{},previewLimit:e.previewLimit||50,rowLimit:e.rowLimit||0})),[e.formatters,e.previewLimit]);return r.createElement(wf,{value:t},e.children)}function Sf(){const e=n.useContext(vf);if(void 0===e)throw new Error("useSettings must be used within a SettingsProvider.");return e}function Cf(){return Sf().actions}var Ef={};function kf(e,t,n){return Object.entries(t.booleans).forEach((t=>{null!=t[1]&&e.setOption(t[0],t[1])})),Object.values(t.cuts).forEach((t=>{wg(t)&&e.addCut(t,t.members)})),Object.values(t.drilldowns).forEach((t=>{xg(t)&&(e.addDrilldown(t),t.captionProperty&&e.addCaption({...t,property:t.captionProperty}),t.properties.forEach((n=>{xg(n)&&e.addProperty({...t,property:n.name})})))})),Object.values(t.measures).forEach((t=>{xg(t)&&e.addMeasure(t.name)})),t.locale&&e.setLocale(t.locale),t.sortKey&&t.sortDir&&e.setSorting(t.sortKey,"desc"===t.sortDir),t.isPreview?e.setPagination(n.previewLimit,0):e.setPagination(t.pagiLimit||n.rowLimit||0,t.pagiOffset),e}function _f(e){const t=e.cube,n=e.getParam("options"),r=e.getParam("drilldowns").map(pg),o=e.getParam("filters").map(mg),a=e.getParam("measures").map(gg),i=e.getParam("cuts"),l=Object.keys(i).map((e=>dg({...t.getLevel(e).toJSON(),active:!0,members:i[e],membersLoaded:!1}))),s=e.getParam("pagination"),u=e.getParam("sorting"),c=e=>e.key;return{booleans:{debug:Boolean(n.debug),distinct:Boolean(n.distinct),exclude_default_members:Boolean(n.exclude_default_members),nonempty:Boolean(n.nonempty),parents:Boolean(n.parents),sparse:Boolean(n.sparse)},cube:t.name,cuts:rg(l,c),drilldowns:rg(r,c),filters:rg(o,c),locale:e.getParam("locale"),measures:rg(a,c),pagiLimit:s.limit,pagiOffset:s.offset,isPreview:!0,sortDir:"asc"===u.direction?"asc":"desc",sortKey:Al.isMeasure(u.property)?u.property.name:`${u.property||""}`}}function Rf(e,t){const n=e.cube.datasource;n.axiosInstance.defaults.responseType=void 0;const r={undefined:1};Object.values(t.drilldowns).forEach((e=>{r[e.uniqueName]=e.memberCount}));const o=e.getParam("drilldowns").map((e=>Kl.isLevel(e)?r[e.uniqueName]||n.fetchMembers(e).then((e=>e.length)):Promise.resolve(1)));return Promise.all(o).then((e=>e.reduce(((e,t)=>e*t))))}function Of(e){return(t,n,{olapClient:r,previewLimit:o,rowLimit:a})=>{const i=n(),l=Bg(i),s=Og(i);if(!yg(l))return Promise.reject(new Error("The current query is not valid."));const u=r.datasource.axiosInstance;return r.getCube(l.cube).then((n=>{const i=`${n.name}_${(new Date).toISOString()}`,c=kf(n.query,l,{previewLimit:o,rowLimit:a}).setFormat(e),d=c.toString(s).replace(r.datasource.serverUrl,"");return Promise.all([u({url:d,responseType:"blob"}).then((e=>e.data)),Rf(c,l).then((e=>{e>5e4&&t(sf.setLoadingMessage({type:"HEAVY_QUERY",rows:e}))}))]).then((t=>({content:t[0],extension:e.replace(/json\w+/,"json"),name:i})))}))}}function If(){return(e,t,{olapClient:n,previewLimit:r,rowLimit:o})=>{const a=t(),i=Bg(a),l=Og(a);return yg(i)?n.getCube(i.cube).then((t=>{const a=kf(t.query,i,{previewLimit:r,rowLimit:o});return Promise.all([n.execQuery(a,l),Rf(a,i).then((t=>{t>5e4&&e(sf.setLoadingMessage({type:"HEAVY_QUERY",rows:t}))}))]).then((n=>{const[r]=n;e(Ng.updateResult({data:r.data,types:Zm(t.toJSON(),i,r.data),headers:{...r.headers},sourceCall:a.toSource(),status:r.status||500,url:a.toString(l)}))}),(t=>{var n,r,o,i;throw e(Ng.updateResult({data:[],types:{},error:{status:(null==(n=t.response)?void 0:n.status)||500,statusText:(null==(r=t.response)?void 0:r.statusText)||"Unknown error",response:((e={})=>`${e.message||e.detail||e}`)(null==(o=t.response)?void 0:o.data)},status:(null==(i=t.response)?void 0:i.status)||500,url:a.toString(l)})),t}))})):Promise.resolve()}}function Pf(e){return(t,n,{olapClient:r})=>{const o=n(),a=Vg(o),i=Ug(o);return r.getCube(a).then((t=>{const n=t.getLevel(e);return t.datasource.fetchMembers(n,{locale:i.code})})).catch((()=>{const t=JSON.stringify(e);return console.error(`Couldn't find level from reference: ${t}`),[]}))}}function Ff(e){return(t,n,{olapClient:r})=>{const o=n(),a=Fg(o),i=zg(o).map((t=>{const{params:n}=t,{cube:i,measures:l}=n,s=i&&a[i]?i:e&&a[e]?e:Object.keys(a)[0];return r.getCube(s).then((e=>{const r=e.measures.map((e=>gg(l[e.name]||{active:!1,key:e.name,name:e.name}))),a=Wm(Object.values(n.drilldowns),(t=>function(e,t){const n=Wm(t.properties,(e=>xg(e)?e.name:null));for(const r of e.levelIterator)if(r.matches(t))return pg({...t,fullName:r.fullName,uniqueName:r.uniqueName,dimType:r.dimension.dimensionType,properties:r.properties.map((e=>hg({active:n.includes(e.name),level:r.uniqueName,name:e.name,uniqueName:e.uniqueName})))});return t}(e,t)||null));return{...t,params:{...n,locale:n.locale||o.explorerServer.localeOptions[0],cube:s,drilldowns:rg(a,(e=>e.key)),measures:rg(r,(e=>e.key))}}}))}));return Promise.all(i).then((e=>{const n=rg(e,(e=>e.key));t(Ng.resetQueries(n))}))}}function jf(e){return(t,n,{olapClient:r})=>r.parseQueryURL(e.toString(),{anyServer:!0}).then((e=>sg({params:_f(e)})))}function Mf(){return(e,t,{olapClient:n})=>n.getCubes().then((t=>{const n=rg(Wm(t,(e=>"true"===e.annotations.hide_in_ui?null:e.toJSON())),(e=>e.name));return e(kg.updateServer({cubeMap:n})),n}))}function Af(){return(e,t)=>{const n=t();return yg(Bg(n))?(e(sf.setLoadingState("FETCHING")),e(If()).then((()=>{e(sf.setLoadingState("SUCCESS"))}),(t=>{e(sf.setLoadingState("FAILURE",t.message))}))):Promise.resolve()}}function Tf(e){return(t,n,{olapClient:r})=>{const o=n(),a=Wm(Xg(o),(e=>e.active?e.name:null));return r.getCube(e).then((e=>{const n=Wm(e.measures,(e=>gg({active:a.includes(e.name),key:e.name,name:e.name})));t(Ng.updateCube({cube:e.name,measures:rg(n,(e=>e.key))}))}))}}function Nf(e){return(t,n,{olapClient:r})=>tu.dataSourceFromURL(e).then((e=>(r.setDataSource(e),r.checkStatus()))).then((e=>{let n="aggregate";e.software===Xs.softwareName?n="logiclayer":e.software===Ls.softwareName&&(n=""),t(kg.updateServer({online:e.online,software:e.software,url:e.url,version:e.version,endpoint:n}))}),(e=>{throw t(kg.updateServer({online:!1,software:"",url:e.config.url,version:""})),e}))}((e,t)=>{for(var n in t)Nm(e,n,{get:t[n],enumerable:!0})})(Ef,{willDownloadQuery:()=>Of,willExecuteQuery:()=>If,willFetchMembers:()=>Pf,willHydrateParams:()=>Ff,willParseQueryUrl:()=>jf,willReloadCubes:()=>Mf,willRequestQuery:()=>Af,willSetCube:()=>Tf,willSetupClient:()=>Nf});var Lf={...kg,...sf,...Ng,...Ef};function Df(e){if("object"==typeof window){const t=window.location.search;if(t){const n=wl(t);if("query"in n){const t=function(e){const t=(e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/");return window.atob(t)}(n.query),r=new URL(t);return e.willParseQueryUrl(r)}const r=function(e){const t=e=>e.key,n=Object.create(null),r=Object.create(null);return{booleans:function(e){const t=Object.create(null);return Object.keys(hf).forEach((n=>{(e&hf[n])>0&&(t[n.toLowerCase()]=!0)})),t}(e.booleans||0),cube:e.cube,cuts:qm(e.cuts).reduce((function(e,t){const[n,...r]=t.split(","),o=dg({...og(n),active:!0,members:r}),a=Object.values(e).find((e=>e.dimension===o.dimension&&e.hierarchy===o.hierarchy&&e.level===o.level));if(a){const e=new Set([...a.members,...o.members]);o.members=[...e].sort()}return e[o.key]=o,e}),n),drilldowns:qm(e.drilldowns).reduce((function(e,t){const[n,...r]=t.split(","),o=og(n),a=r.map((e=>({active:!0,level:o.level,name:e}))),i=pg({...o,active:!0,properties:a,key:n});return e[i.key]=i,e}),r),filters:rg(qm(e.filters).map((function(e){const[t,...n]=e.split(","),r=n.slice(1,3),o=n.length>2?n.slice(4,6):void 0,a=n.length>2?n[3]:void 0;return mg({active:!0,measure:t,conditionOne:i(r),conditionTwo:o?i(o):void 0,joint:a});function i(e){return[e[0],e[1],Number.parseFloat(e[1])]}})),t),isPreview:1===e.preview,locale:e.locale,measures:rg(qm(e.measures).map((function(e){return gg({active:!0,key:e,name:e})})),t),pagiLimit:0,pagiOffset:0,sortDir:"desc",sortKey:void 0}}(n);if(yg(r))return sg({panel:n.panel,params:cg({...r})})}const n=window.history.state;if(yg(n))return sg({params:{...n}})}}var zf=Q({"from, to":{fill:"var(--anicube-color1, #5c7080)"},"33%":{fill:"var(--anicube-color2, #738694)"},"66%":{fill:"var(--anicube-color3, #8a9ba8)"}}),$f=o(((e,{color:t,shade:n})=>({root:{...t?{"--anicube-color1":e.colors[t][n-1],"--anicube-color2":e.colors[t][n],"--anicube-color3":e.colors[t][n+1]}:void 0,display:"block"},side:{animation:`${zf} var(--anicube-duration, 2.4s) infinite`,animationPlayState:"var(--anicube-play-state, running)","@media (prefers-reduced-motion)":{"--anicube-play-state":"paused"},"&.a":{fill:"var(--anicube-color1, #5c7080)"},"&.b":{fill:"var(--anicube-color2, #738694)",animationDelay:"0.8s"},"&.c":{fill:"var(--anicube-color3, #8a9ba8)",animationDelay:"1.6s"}}}))),Bf={shade:5};function Vf(e){const{color:t,shade:n}=i(Vf.displayName,Bf,e),{classes:o,cx:a}=$f({color:t,shade:n});return r.createElement("svg",{className:a("dataex-Anicube-root",o.root),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",height:e.size||256},r.createElement("path",{className:a("dataex-Anicube-side",o.side,"a"),d:"M128 128v128l111 -64v-128l-111 64z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"b"),d:"M128 128l111 -64l-111 -64l-111 64l111 64z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"c"),d:"M128 128l-111 -64v128l111 64v-128z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"a"),d:"M128 128v-64l-55 32v64l55 -32z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"b"),d:"M128 128l-55 32l55 32l55 -32l-55 -32z"}),r.createElement("path",{className:a("dataex-Anicube-side",o.side,"c"),d:"M128 128l55 32v-64l-55 -32v64z"}))}Vf.displayName="DataExplorer/Anicube";var Uf=zr([Fg,Vg],((e,t)=>t in e?e[t]:void 0)),Gf=zr(Uf,(e=>e?e.measures:[])),Hf=zr(Gf,(e=>Object.fromEntries(e.map((e=>[e.name,e]))))),qf=zr(Uf,(e=>e?e.dimensions.map((e=>({item:{...e,hierarchies:e.hierarchies.slice().map((e=>(e.levels.slice().sort(((e,t)=>Qm(e)-Qm(t))),e))).sort(((e,t)=>Qm(e)-Qm(t)))},count:e.hierarchies.reduce(((e,t)=>e+t.levels.length),0),alpha:e.hierarchies.reduce(((e,t)=>e.concat(t.name,"-")),"")}))).sort(((e,t)=>Qm(e.item)-Qm(t.item)||t.count-e.count||e.alpha.localeCompare(t.alpha))).map((e=>e.item)):[])),Wf=zr(qf,(e=>Object.fromEntries(e.map((e=>[e.name,e]))))),Kf=zr(Uf,(e=>e?Object.fromEntries(e.dimensions.flatMap((e=>e.hierarchies.flatMap((t=>t.levels.map((n=>function(e,t){return[e,t]}([e.name,t.name,n.name].join("."),[e,t,n])))))))):{}));zr(qf,(e=>e.find((e=>"time"===e.dimensionType||"Year"===e.name||"Date"===e.name))));var Yf=zr(Bg,bf);function Xf(e,t="/"){if(!e)return"";"string"==typeof e&&(e=ig(e));const n=[];let r=e.length;for(;r--;){const t=e[r];-1===n.indexOf(t)&&n.unshift(t)}return n.join(t)}var Qf=e=>{const t=la(qf)||[],o=la(Ug),a=n.useMemo((()=>t.map((t=>r.createElement(Zf,{dimension:t,locale:o.code,isMediumScreen:e.isMediumScreen,key:t.uri,onItemSelect:e.onItemSelect,selectedItems:e.selectedItems})))),[t,e.selectedItems,e.onItemSelect]);return r.createElement(M,null,a)},Zf=e=>{const{dimension:t,locale:o}=e,{translate:a}=Dm(),i=n.useMemo((()=>a("params.dimmenu_dimension",{dimension:Um(t,o)})),[o,t]),l=1!==t.hierarchies.length,s=t.hierarchies.map((n=>r.createElement(Jf,{dimension:t,hierarchy:n,isMediumScreen:e.isMediumScreen,isSubMenu:l,key:n.uri,locale:o,onItemSelect:e.onItemSelect,selectedItems:e.selectedItems})));return l?r.createElement(M,{key:t.uri,position:e.isMediumScreen?"bottom":"right",shadow:"md",withArrow:!0},r.createElement(M.Target,null,r.createElement(S,{component:"div"},r.createElement(M.Item,{icon:r.createElement(cn,null),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:200}})},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(v,null,i),r.createElement(Rt,{stroke:1.5,size:16}))))),r.createElement(M.Dropdown,null,r.createElement(M,null,s))):s[0]},Jf=e=>{const{dimension:t,hierarchy:o,locale:a,onItemSelect:i,selectedItems:l}=e,{translate:s}=Dm(),u=n.useMemo((()=>{const n=[Um(t,a),Um(o,a)];return e.isSubMenu?n[1]:s("params.dimmenu_hierarchy",{abbr:Xf(n,s("params.dimmenu_abbrjoint")),dimension:n[0],hierarchy:n[1]})}),[a,t,o,e.isSubMenu]),c=1!==o.levels.length,d=o.levels.map((e=>r.createElement(eh,{dimension:t,hierarchy:o,isSubMenu:c,key:e.uri,level:e,locale:a,onItemSelect:i,selectedItems:l})));return c?r.createElement(M,{key:o.uri,position:e.isMediumScreen?"bottom":"right",shadow:"md",withArrow:!0},r.createElement(M.Target,null,r.createElement(S,{component:"div"},r.createElement(M.Item,{icon:r.createElement(un,null),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:200}})},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(v,null,u),r.createElement(Rt,{stroke:1.5,size:16}))))),r.createElement(M.Dropdown,null,r.createElement(M,null,d))):d[0]},eh=e=>{const{dimension:t,hierarchy:o,level:a,locale:i}=e,{translate:l}=Dm(),s=n.useMemo((()=>{const n=[Um(t,i),Um(o,i),Um(a,i)];return e.isSubMenu?n[2]:l("params.dimmenu_level",{abbr:Xf(n,l("params.dimmenu_abbrjoint")),dimension:n[0],hierarchy:n[1],level:n[2]})}),[i,t,o,a,e.isSubMenu]);return r.createElement(M.Item,{disabled:e.selectedItems.includes(lg(a)),icon:r.createElement(dn,null),key:a.uri,miw:200,onClick:()=>e.onItemSelect(a,o,t),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:200}})},s)},th=e=>{const{selectedItems:t,onItemSelect:n,children:o,...a}=e,i=l(),s=_(`(max-width: ${i.breakpoints.md}px)`);return r.createElement(M,{closeOnClickOutside:!0,closeOnEscape:!0,position:s?"left":"right",shadow:"md",withArrow:!0,withinPortal:!0},r.createElement(M.Target,null,r.createElement(p,{...a},o)),r.createElement(M.Dropdown,null,r.createElement(Qf,{isMediumScreen:s,selectedItems:t.map(lg),onItemSelect:n})))},nh=e=>{const t=e.tooltip?r.createElement(d,{events:{hover:!0,focus:!1,touch:!0},label:e.tooltip,multiline:!0,withinPortal:!0},r.createElement(p,{color:"blue"},r.createElement(Xt,null))):null,n=e.warning?r.createElement(p,{color:"orange"},r.createElement(gt,null)):e.toolbar;return r.createElement(de.Item,{id:`layout-param-area-${e.id}`,value:e.value},r.createElement(ee,{noWrap:!0,spacing:"xs",pr:n?"xs":void 0},r.createElement(de.Control,{px:"xs"},r.createElement(v,null,e.title),t),n),r.createElement(de.Panel,null,r.createElement(u,{styles:{viewport:{maxHeight:390}}},e.children)))};function rh(e){const{activeItems:t,getLabel:o,items:a,itemPredicate:i,onChange:l}=e,s=e.getSecondLabel||(()=>{}),d=n.useRef(null),p=n.useRef(null),{translate:m}=Dm(),[g,f]=n.useState(""),[h,b]=n.useState(e.initialItemPredicateIndex||0),y=n.useMemo((()=>rg(t,(e=>e))),[t]),w=n.useMemo((()=>{const e=[],t=[],n=/^[\s0-9A-Za-z,]+$/.test(g)?ag(g.replace(/,/g,"|"),"i"):ag(g,"i"),r=(Array.isArray(i)?i[h].method:i)||((e,t)=>e.test(t.key));let o=0;const l=Object.keys(a);for(;o{const n=t.indexOf(e.key),r=t.slice();n>-1?r.splice(n,1):(r.push(e.key),r.sort()),l(r)}),[t,l]),C=n.useCallback((()=>{l([...Object.keys(y),...((null==w?void 0:w.unselected)||[]).map((e=>e.key))])}),[w,y]),E=n.useCallback((()=>{if(!(null==w?void 0:w.selectedCount))return void l([]);const e=new Set(((null==w?void 0:w.selected)||[]).map((e=>String(e.key)))),t=Object.keys(y).filter((t=>!e.has(t)));l(t)}),[w,y]),k=t.length-w.selectedCount,_=w.totalCount-t.length-w.unselectedCount,R=n.useMemo((()=>{const e=g.length>0?r.createElement(re,{mr:"xs",onClick:()=>f("")}):void 0;if(Array.isArray(i)){const t=i[h],n=()=>{const e=h+1;b(e>=i.length?0:e)};return r.createElement(ee,{mr:"xs",noWrap:!0,spacing:"xs"},r.createElement(N,{leftSection:r.createElement(ce,{color:"blue",radius:"xl",size:"xs"},r.createElement(an,{size:15})),onClick:n},t.label),e)}return e}),[g.length>0,h]),O=e=>r.createElement(S,{key:e.key,onClick:x.bind(null,e),w:"100%"},r.createElement(ee,{noWrap:!0,position:"apart",spacing:"xs"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(F,{defaultChecked:Xm(y,e.key)}),r.createElement(v,{fz:"sm",lineClamp:1,sx:{wordBreak:"break-all"}},o(e))),r.createElement(v,{c:"gray",fz:"xs"},s(e))));return r.createElement(c,{w:500,sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:"100%",width:"100%"}})},r.createElement(D,{spacing:"xs"},r.createElement(J,{icon:r.createElement(an,null),onChange:e=>f(e.target.value),placeholder:m("transfer_input.search_placeholder"),rightSection:R,rightSectionWidth:"auto",value:g}),r.createElement(ee,{grow:!0,noWrap:!0,spacing:"xs",sx:e=>({[e.fn.smallerThan("md")]:{flexDirection:"column"}})},r.createElement(J.Wrapper,{label:m("transfer_input.unselected_items"),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:"100%",width:"100%"}})},r.createElement(D,null,r.createElement(ne,{padding:"xs",ref:d,withBorder:!0},r.createElement(u,{h:150,offsetScrollbars:!0,type:"auto",viewportRef:d},_>0&&r.createElement(v,{c:"gray",fz:"sm",pb:"sm"},m("transfer_input.count_hidden",{n:_})),r.createElement(Tu,{items:w.unselected,itemMinSize:20,overscan:100,viewportRef:d},O))),r.createElement(V,{disabled:0===w.unselected.length,fullWidth:!0,rightIcon:r.createElement(Pt,{stroke:1.5,size:16}),onClick:C,variant:"outline"},m(g?"transfer_input.select_filtered":"transfer_input.select_all")))),r.createElement(J.Wrapper,{label:m("transfer_input.selected_items"),sx:e=>({[e.fn.smallerThan("md")]:{maxWidth:"100%",width:"100%"}})},r.createElement(D,null,r.createElement(ne,{padding:"xs",ref:p,withBorder:!0},r.createElement(u,{h:150,offsetScrollbars:!0,type:"auto",viewportRef:p},k>0&&r.createElement(v,{c:"gray",fz:"sm",pb:"sm"},m("transfer_input.count_hidden",{n:k})),r.createElement(Tu,{items:w.selected,itemMinSize:20,overscan:100,viewportRef:p},O))),r.createElement(V,{color:"red",fullWidth:!0,disabled:0===w.selected.length,leftIcon:r.createElement(It,{stroke:1.5,size:16}),onClick:E,variant:"outline"},m(g?"transfer_input.unselect_filtered":"transfer_input.unselect_all")))))))}rh.defaultProps={getLabel:e=>`${e}`};var oh=rh,ah=n.memo((function(e){const{item:t}=e,o=l(),{actions:a,defaultMembersFilter:i}=Sf(),{translate:s}=Dm(),u=_(`(max-width: ${o.breakpoints.md}px)`),d=la(Kf),m=la(Ug),[g,f]=n.useState(!1),[h,b]=n.useState(""),[y,w]=n.useState(Object.create(null)),[x,S]=n.useState(!0),C=d[`${t.dimension}.${t.hierarchy}.${t.level}`],E=n.useCallback((()=>{a.updateCut({...t,active:!t.active})}),[t]),k=n.useCallback((e=>{e.stopPropagation(),a.removeCut(t.key)}),[t.key]),R=n.useCallback((e=>{a.updateCut({...t,members:e})}),[t]),O=n.useCallback((()=>{const e=t.members;a.willFetchMembers(t).then((n=>{const r={};let o=n.length;for(;o--;){const t=n[o],a=e.includes(`${t.key}`);r[t.key]=fg({name:t.caption,key:t.key,active:a})}!t.active&&a.updateCut({...t,active:!0}),b(""),w(r),S(!1)})).catch((e=>{b(`${e.message}`),w({}),S(!1)}))}),[]);n.useEffect(O,[t.key,m.code]);const P=n.useMemo((()=>{const e=C.map((e=>Um(e,m.code)));return s("params.tag_drilldowns",{abbr:Xf(e,s("params.tag_drilldowns_abbrjoint")),dimension:e[0],hierarchy:e[1],level:e[2],memberCount:t.members.length})}),[t.members.join("-"),t,m.code]),F=n.useMemo((()=>[{label:s("params.label_cuts_filterby_id"),method:(e,t)=>e.test(t.key)},{label:s("params.label_cuts_filterby_name"),method:(e,t)=>e.test(t.name)},{label:s("params.label_cuts_filterby_any"),method:(e,t)=>e.test(t.key)||e.test(t.name)}]),[m.code]),j={id:0,name:1,any:2}[i];if(x)return r.createElement(ih,{onRemove:k},P);if(h)return r.createElement(lh,{error:h,item:e.item,onReload:O,onRemove:k},P);const M=t.members.length,A=1===M&&y[t.members[0]],T="false"!=C[2].annotations.memberid_in_ui;return r.createElement(G,{opened:g,onChange:f,position:u?"bottom":"right",shadow:"md",withArrow:!0,withinPortal:!0},r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(I,{checked:t.active,onChange:E,size:"xs"}),r.createElement(v,{fz:"sm",lineClamp:1},s("params.tag_cuts",{abbr:P,first_member:A?A.name:"",n:M}))),r.createElement(G.Target,null,r.createElement(ee,{noWrap:!0,position:"right",spacing:"xs"},r.createElement(p,{variant:g?"filled":void 0,onClick:()=>f((e=>!e))},g?r.createElement(fn,null):r.createElement(gn,null)),r.createElement(re,{onClick:k}))))),r.createElement(G.Dropdown,null,r.createElement(c,{miw:400,sx:e=>({[e.fn.smallerThan("md")]:{minWidth:"unset",maxWidth:250}})},r.createElement(J.Wrapper,{label:s("params.title_members")},r.createElement(oh,{activeItems:t.members,getLabel:e=>e.name,getSecondLabel:T?e=>e.key!=e.name?e.key:void 0:void 0,initialItemPredicateIndex:j,itemPredicate:F,items:y,onChange:R})))))}));function ih(e){return r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(oe,{size:"sm"}),r.createElement(v,{fz:"sm",lineClamp:1},e.children)),r.createElement(re,{onClick:e.onRemove})))}function lh(e){const{translate:t}=Dm();return r.createElement(ae,{position:"right",shadow:"md",withArrow:!0,withinPortal:!0},r.createElement(ae.Target,null,r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(ee,{noWrap:!0,spacing:"xs"},r.createElement(ie,{color:"yellow",variant:"subtle"},r.createElement(ft,null)),r.createElement(v,{fz:"sm",lineClamp:1},e.children)),r.createElement(ee,{spacing:"xs"},r.createElement(p,{color:"yellow",onClick:e.onReload,variant:"subtle"},r.createElement(nn,null)),r.createElement(re,{onClick:e.onRemove}))))),r.createElement(ae.Dropdown,null,r.createElement(L,{color:"yellow",icon:r.createElement(ft,{size:"2rem"}),title:t("params.error_fetchmembers_title")},r.createElement(D,{spacing:"xs"},r.createElement(v,null,t("params.error_fetchmembers_detail")),r.createElement(v,null,e.error),r.createElement(V,{color:"yellow",onClick:e.onReload},t("action_reload"))))))}var sh=()=>{const e=Cf(),t=ff(Hg),{translate:o}=Dm(),a=n.useCallback((()=>{e.resetCuts({})}),[]),i=n.useCallback((t=>{const n=dg(t);n.active=!1,e.updateCut(n)}),[]),l=n.useMemo((()=>t.map((e=>r.createElement(ah,{key:e.key,item:e})))),[t]),s=r.createElement(r.Fragment,null,t.length>0&&r.createElement(p,{color:"red",onClick:a,variant:"subtle"},r.createElement(pn,null)),r.createElement(th,{onItemSelect:i,selectedItems:t,variant:"subtle"},r.createElement(jt,null)));return r.createElement(nh,{id:"cuts",title:o("params.title_area_cuts",{n:`${t.reduce(Sg,0)}`}),toolbar:s,tooltip:o("params.tooltip_area_cuts"),value:"cuts"},r.createElement(D,{spacing:"xs"},0===t.length&&r.createElement(L,{color:"yellow",icon:r.createElement(mt,{size:"2rem"}),title:o("params.error_no_cut_selected_title")},o("params.error_no_cut_selected_detail")),l))},uh={csv:"text/csv",json:"application/json",tsv:"text/tab-separated-values",txt:"text/plain",xls:"application/vnd.ms-excel"},ch=e=>{const{provider:t,...o}=e,a=n.useCallback((e=>{e.stopPropagation(),e.preventDefault();const n=document.createElement("a"),r="function"==typeof t?t():t;Promise.resolve(r).then((e=>{const t="string"!=typeof e.content?e.content:new window.Blob([e.content],{type:uh[e.extension]||"application/octet-stream"}),r=window.URL.createObjectURL(t);n.href=r,n.download=`${e.name}.${e.extension}`,n.addEventListener("click",(()=>{setTimeout((()=>{window.URL.revokeObjectURL(r)}),5e3)}),!1),n.click()}),(e=>{console.error("Error downloading content:",e.message)}))}),[t]);return r.createElement(V,{...o,fullWidth:!0,onClick:a,variant:"default"},r.createElement(v,{fz:"xs"},e.children))},dh=()=>{const e=Cf(),{translate:t}=Dm(),{isDirty:o,result:a}=la($g),i=la(Ig),l=n.useMemo((()=>i.map((n=>r.createElement(ch,{key:n,provider:()=>(e.setLoadingState("FETCHING"),e.willDownloadQuery(n).then((t=>(e.setLoadingState("SUCCESS"),t)),(t=>{throw e.setLoadingState("FAILURE",t.message),t})))},t(`formats.${n}`))))),[i]);return 0===l.length||o||0===a.data.length?null:r.createElement(c,{id:"button-group-download-results"},r.createElement(J.Wrapper,{label:t("params.title_downloaddata")},r.createElement(V.Group,null,l)))};function ph(e){var t;const{getLabel:o,getValue:a=eg,items:i,onItemSelect:l,selectedItem:s}=e,[u,c]=n.useMemo((()=>{const e=tg(a),t=o?tg(o):e,n=i.map((n=>({label:t(n),value:e(n),item:n})));return[n,rg(n,(e=>e.value))]}),[i,o,a]),d=n.useMemo((()=>null==s?null:"string"==typeof s?s:tg(a)(s)),[s,a]),p=n.useCallback((e=>{l&&l(c[e].item)}),[c]);return 0!==i.length&&d?r.createElement(y,{data:u,disabled:e.loading||e.disabled,hidden:e.hidden,label:e.label,onChange:p,onClick:gh,onFocus:gh,searchable:null!=(t=e.searchable)?t:e.items.length>6,value:d}):null}function mh(e){const{items:t,onItemSelect:o,selectedItem:a}=e;return n.useMemo((()=>{if(t.length>3)return null;const n=tg(e.getValue||eg),i=e.getLabel?tg(e.getLabel):n,l="string"==typeof a?a:a&&n(a);return r.createElement(J.Wrapper,{hidden:e.hidden,label:e.label},r.createElement(ee,{spacing:"xs",grow:!0},t.map((e=>{const t=n(e);return r.createElement(V,{variant:l===t?"filled":"outline",key:t,onClick:o?()=>o(e):void 0},i(e))}))))}),[t,o,a])||r.createElement(ph,{getLabel:e.getLabel,getValue:e.getValue,hidden:e.hidden,items:t,label:e.label,onItemSelect:e.onItemSelect,searchable:e.searchable,selectedItem:a})}function gh(e){e.target instanceof HTMLInputElement&&e.target.select()}var fh=rh;function hh(e){const{item:t}=e,o=Cf(),a=l(),{translate:i}=Dm(),s=_(`(max-width: ${a.breakpoints.md}px)`),u=la(Kf),d=la(Ug),[m,g]=n.useState(!1),f=n.useCallback((()=>{o.updateDrilldown({...t,active:!t.active})}),[t]),h=n.useCallback((e=>{e.stopPropagation(),o.removeDrilldown(t.key)}),[t.key]),b=n.useCallback((e=>{const n=e.level?e.name:"";o.updateDrilldown({...t,captionProperty:n})}),[t]),v=n.useCallback((e=>{const n=t.properties.map((t=>hg({...t,active:e.includes(t.key)})));o.updateDrilldown({...t,properties:n})}),[t]),y=n.useMemo((()=>rg(t.properties,(e=>e.key))),[t.properties]),w=n.useMemo((()=>[{name:i("placeholders.unselected")},...t.properties]),[d.code,t.properties]),x=Wm(t.properties,(e=>xg(e)?e.key:null)),S=n.useMemo((()=>{const e=u[`${t.dimension}.${t.hierarchy}.${t.level}`].map((e=>Um(e,d.code)));return i("params.tag_drilldowns",{abbr:Xf(e,i("params.tag_drilldowns_abbrjoint")),dimension:e[0],hierarchy:e[1],level:e[2],propCount:x.length})}),[x.join("-"),t,d.code]),C=t.properties.length>0&&r.createElement(G.Target,null,r.createElement(p,{variant:m?"filled":void 0,onClick:n.useCallback((()=>g((e=>!e))),[])},m?r.createElement(fn,null):r.createElement(gn,null))),E=r.createElement(ne,{padding:"xs",withBorder:!0},r.createElement(ee,{noWrap:!0,position:"apart"},r.createElement(I,{checked:t.active,label:S,onChange:f,size:"xs",styles:{label:{fontSize:"0.875rem"}}}),r.createElement(ee,{noWrap:!0,spacing:"xs"},C,r.createElement(re,{onClick:h}))));if(0===t.properties.length)return E;const k=r.createElement(c,{miw:400,sx:e=>({[e.fn.smallerThan("md")]:{minWidth:"unset",maxWidth:250}})},r.createElement(ph,{getValue:"name",items:w,label:i("params.title_caption"),onItemSelect:b,selectedItem:t.captionProperty||i("placeholders.unselected")}),r.createElement(J.Wrapper,{label:i("params.title_properties")},r.createElement(fh,{activeItems:x,getLabel:e=>e.name,items:y,itemPredicate:(e,t)=>e.test(t.name),onChange:v})));return r.createElement(G,{onChange:g,opened:m,position:s?"bottom":"right",shadow:"md",withArrow:!0,withinPortal:!0},E,r.createElement(G.Dropdown,null,k))}var bh=()=>{const e=Cf(),{translate:t}=Dm(),o=la(Wg),a=la(qf),i=n.useCallback((()=>{e.resetDrilldowns({})}),[]),l=n.useCallback((t=>{const n=pg(t);e.updateDrilldown(n),e.willFetchMembers({...t,level:t.name}).then((r=>{const o=a.find((e=>e.name===t.dimension));o&&e.updateDrilldown({...n,dimType:o.dimensionType,memberCount:r.length})}))}),[a]),s=n.useMemo((()=>o.map((e=>r.createElement(hh,{key:e.key,item:e})))),[o]),u=r.createElement(r.Fragment,null,o.length>0&&r.createElement(p,{onClick:i,variant:"subtle"},r.createElement(pn,null)),r.createElement(th,{onItemSelect:l,selectedItems:o,variant:"subtle"},r.createElement(jt,null)));return r.createElement(nh,{id:"drilldowns",title:t("params.title_area_drilldowns",{n:`${o.reduce(Sg,0)}`}),toolbar:u,tooltip:t("params.tooltip_area_drilldowns"),value:"drilldowns"},r.createElement(D,{spacing:"xs"},0===o.length&&r.createElement(L,{color:"yellow",icon:r.createElement(mt,{size:"2rem"}),title:t("params.error_no_dimension_selected_title")},t("params.error_no_dimension_selected_detail")),s))};function vh(){const e=Cf(),{code:t}=la(Ug),o=la(Yg),a=la(Hf),i=la(Gf),[l,s]=n.useState(""),{translate:u}=Dm(),c=n.useMemo((()=>{const e=l?ag(l,"i"):null;return Wm(i,(n=>e&&!e.test(Um(n,t))?null:o[n.name]||gg({active:!1,...n})))}),[o,i,l,t]),d=c.filter(xg),m=n.useMemo((()=>c.map((n=>{const o=a[n.name];return r.createElement(F,{key:n.key,checked:n.active,label:Um(o,t),onChange:()=>{e.updateMeasure({...n,active:!n.active})}})}))),[c,a]),g=n.useCallback((()=>{const t=i.map((e=>({...o[e.name],active:!1})));e.resetMeasures(rg(t,"key"))}),[o,i]),f=n.useCallback((()=>s("")),[]),h=r.createElement(r.Fragment,null,d.length>0&&r.createElement(p,{onClick:g,variant:"subtle"},r.createElement(pn,null)),r.createElement(G,{closeOnClickOutside:!0,closeOnEscape:!0,position:"bottom",shadow:"md",trapFocus:!0,withArrow:!0,withinPortal:!0},r.createElement(G.Target,null,r.createElement(p,{variant:"subtle"},l?r.createElement(qt,{onClick:f}):r.createElement(Wt,null))),r.createElement(G.Dropdown,null,r.createElement(J,{icon:r.createElement(an,null),onChange:e=>s(e.target.value),placeholder:u("params.search_placeholder"),rightSection:l.length>0?r.createElement(re,{onClick:f}):void 0,type:"search",value:l}))));return r.createElement(nh,{id:"measures",title:u("params.title_area_measures",{n:d.length}),toolbar:h,tooltip:u("params.tooltip_area_measures"),value:"measures"},r.createElement(D,{spacing:"xs"},m))}var yh=()=>{const e=Cf(),{translate:t}=Dm(),{limit:o,offset:a}=la(Jg),i=la(Zg),{rowLimit:l}=Sf(),s=n.useCallback((t=>{e.updatePagination({limit:t||0,offset:a})}),[a]),u=n.useCallback((t=>{e.updatePagination({limit:o,offset:t||0})}),[o]);return r.createElement(ee,{noWrap:!0,spacing:"xs",align:"start",grow:!0},r.createElement(J.Wrapper,{label:t("params.label_pagination_limit"),description:l&&!i?t("params.label_pagination_limit_description",{limit:l}):"",inputWrapperOrder:["label","input","description"]},r.createElement(me,{disabled:i,min:0,max:l||void 0,onChange:s,value:o})),r.createElement(J.Wrapper,{label:t("params.label_pagination_offset")},r.createElement(me,{disabled:i,min:0,onChange:u,value:a})))},wh=n.memo((e=>{const{activeOnly:t,onItemSelect:o}=e,{translate:a}=Dm(),i=la(Gf),l=la(Yg),[s,u]=n.useMemo((()=>{const e=Wm(i,(e=>{const{name:n}=e;return t&&!xg(l[n])?null:{item:e,label:n,value:n}})),n=rg(e,(e=>e.value));return[e,e=>{e&&o&&o(n[e].item)}]}),[l,o]);return r.createElement(y,{data:s,onChange:u,placeholder:a("selectmeasure_placeholder"),searchable:s.length>6})}),bg);function xh(){const e=Cf(),{locale:t,translate:o}=Dm(),{sortDir:a,sortKey:i}=la(ef),l=n.useMemo((()=>{const e={asc:o("direction.ASC"),desc:o("direction.DESC")};return{directions:e,options:[{value:"asc",label:e.asc},{value:"desc",label:e.desc}]}}),[t]),s=n.useCallback((t=>{e.updateSorting({key:t.name,dir:a})}),[]),u=n.useCallback((t=>{e.updateSorting({key:i,dir:t.value})}),[]);return r.createElement(J.Wrapper,{label:o("params.label_sorting_key")},r.createElement(ee,{noWrap:!0,spacing:"xs",align:"end"},r.createElement(wh,{activeOnly:!0,selectedItem:i,onItemSelect:s}),r.createElement(ph,{getValue:"value",getLabel:"label",items:l.options,onItemSelect:u,selectedItem:a,searchable:!1})))}var Sh=()=>{const e=Cf(),{translate:t}=Dm(),n=ff(Qg),o=ff(Pg);return r.createElement(nh,{id:"options",title:t("params.title_area_options"),tooltip:t("params.tooltip_area_options"),value:"options"},r.createElement(D,{spacing:"xs"},r.createElement(D,{spacing:"xs"},o.map((o=>r.createElement(F,{key:o,label:t(`params.label_boolean_${o}`),checked:n[o]||!1,onChange:()=>{e.updateBoolean({key:o})}})))),r.createElement(xh,null),r.createElement(yh,null)))},Ch=()=>{const e=Cf(),{translate:t}=Dm(),{isValid:o,error:a}=la(tf),{cube:i,locale:l,measures:s}=la(Bg),u=a?t(a):"";return r.createElement(ee,{id:"button-group-execute-query",noWrap:!0,spacing:"xs"},r.createElement(d,{color:"red",disabled:o,events:{hover:!0,focus:!1,touch:!0},label:u,multiline:!0,withArrow:!0,withinPortal:!0},r.createElement(V,{disabled:!o,fullWidth:!0,id:"button-execute-query",leftIcon:r.createElement(Dt,null),onClick:n.useCallback((()=>{e.willRequestQuery()}),[]),sx:{"&[data-disabled]":{pointerEvents:"all"}}},t("params.action_execute"))),r.createElement(d,{events:{hover:!0,focus:!1,touch:!0},label:t("params.action_clear_description"),multiline:!0,withArrow:!0,withinPortal:!0},r.createElement(p,{color:"red",id:"button-clear-params",onClick:n.useCallback((()=>{const t=Object.values(s).map((e=>gg({...e,active:!1})));e.resetAllParams({cube:i,locale:l,measures:rg(t,"key")})}),[]),size:"lg"},r.createElement(mn,null))))},Eh=o(((e,t)=>({paper:{borderRadius:0,padding:`${e.spacing.xs} ${e.spacing.md}`,[e.fn.largerThan("md")]:{height:"100%",padding:`${e.spacing.sm} ${e.spacing.xs}`,writingMode:"vertical-rl"},"&[data-active]":{[e.fn.largerThan("md")]:{display:"flex",flexFlow:"column nowrap",width:t.width,padding:`${e.spacing.xs} ${e.spacing.md}`,writingMode:"horizontal-tb"}}},toggle:{marginBottom:e.spacing.sm},title:{textTransform:"uppercase",lineHeight:1}}))),kh={width:380,withBorder:!1};function _h(e){const{defaultOpen:t=!0,classNames:o,styles:a,unstyled:l}=e,s={name:_h.displayName,classNames:o,styles:a,unstyled:l},{width:c,withBorder:d}=i(s.name,kh,e),{classes:p,cx:m}=Eh({width:c,withBorder:d},s),[g,f]=n.useState(t),h=n.useCallback((()=>{f((e=>!e))}),[]);return r.createElement(k,{className:m(e.className,p.paper),"data-active":g?"true":void 0,id:e.id,withBorder:d},r.createElement(S,{className:p.toggle,onClick:h},r.createElement(se,{order:4,className:p.title},e.title)),g&&r.createElement(u,{mx:"-sm",px:"sm"},r.createElement(D,null,e.children)))}_h.displayName="DEX-CollapsiblePanel";var Rh=e=>{const t=!!e.withTooltip,o=Cf(),{translate:a}=Dm(),i=la(Zg),l=la(Yf),{previewLimit:s}=Sf();n.useEffect((()=>{i&&o.willRequestQuery()}),[i,l]);const u=n.useCallback((()=>{o.updateIsPreview(!i)}),[i]),c=r.createElement(I,{checked:!i,styles:{label:{display:"flex",alignContent:"center",gap:"0.25rem"}},label:r.createElement(r.Fragment,null,a("params.label_boolean_full_results"),t&&r.createElement(ie,{variant:"subtle",size:"sm"},r.createElement(Xt,null))),onChange:u});return t?r.createElement(d,{events:{hover:!0,focus:!1,touch:!0},label:i?a("preview_mode.description_preview",{limit:s}):a("preview_mode.description_full"),multiline:!0,withArrow:!0,withinPortal:!0},r.createElement("div",null,c)):c},Oh=mh,Ih=mh;function Ph(){const e=la(jg),t=la(Uf);return 1===e.length?null:r.createElement(Fh,{items:e,selectedItem:t})}function Fh(e){const{items:t,selectedItem:o}=e,a=Cf(),i=n.useCallback((e=>{a.willSetCube(e.name)}),[]),{translate:l}=Dm(),{code:s}=la(Ug),{level:u,setLevel:c,keys:d,values:p}=Ah(t,o,(e=>Gm(e,"topic",s)),[s]),{level:m,setLevel:g,keys:f,values:h}=Ah(p,o,(e=>Gm(e,"subtopic",s)),[s]),{level:b,setLevel:y,keys:w,values:x}=Ah(h,o,(e=>Gm(e,"table",s)),[s]),S=x.length>0?x:h.length>0?h:p.length>0?p:t;return n.useEffect((()=>{o&&S.length>0&&!S.includes(o)&&i(S[0])}),[S,o]),r.createElement(D,{id:"select-cube",spacing:0},r.createElement(Oh,{hidden:"Hidden"===u,items:d,label:l("params.label_topic"),onItemSelect:c,selectedItem:u}),r.createElement(Oh,{hidden:"Hidden"===m,items:f,label:l("params.label_subtopic"),onItemSelect:g,selectedItem:m}),r.createElement(Oh,{hidden:"Hidden"===b,items:w,label:l("params.label_table"),onItemSelect:y,selectedItem:b}),r.createElement(Ih,{hidden:S.length<2,getLabel:e=>Um(e,s),getValue:"name",items:S,label:l("params.label_cube"),onItemSelect:i,selectedItem:o}),o&&r.createElement(v,{mt:"sm",sx:{"& p":{margin:0}}},r.createElement(jh,{annotation:"description",className:"dex-cube-description",item:o,locale:s}),r.createElement(Mh,{item:o,locale:s,fz:"xs"}),r.createElement(jh,{annotation:"source_description",className:"dex-cube-srcdescription",fz:"xs",item:o,locale:s})))}function jh(e){const{annotation:t,item:n,locale:o,...a}=e,i=Gm(n,t,o);return i?r.createElement(v,{component:"p",...a},i):null}function Mh(e){const{item:t,locale:n,...o}=e,{translate:a}=Dm(),i=Gm(t,"source_name",n),l=Gm(t,"source_link",n);return i?r.createElement(v,{component:"p",...o},`${a("params.label_source")}: `,l?r.createElement(Z,{href:l},i):r.createElement(v,{span:!0},i)):null}function Ah(e,t,r,o=[]){const[a,i]=n.useState((()=>t&&r(t)||""));n.useEffect((()=>{t&&i(r(t)||"")}),[t,...o]);const[l,s]=n.useMemo((()=>{const t=function(e,t){const n="function"==typeof t?t:e=>e[t],r=new Map;for(let o=0;oua.getLanguages(i).map((e=>({label:t("params.label_localeoption",{code:e.code,engName:e.name,nativeName:e.nativeName,customName:t(`params.label_localecustom_${e.code}`)})||e.nativeName,value:e.code})))),[o,i]),s=n.useCallback((t=>{e.updateLocale(t.value)}),[]);return i.length<2?null:r.createElement(c,{id:"select-locale"},r.createElement(J.Wrapper,{label:t("params.label_locale")},r.createElement(ph,{getLabel:"label",getValue:"value",items:l,onItemSelect:s,selectedItem:a})))}var Nh=e=>{const{translate:t}=Dm();return r.createElement(_h,{id:"layout-column-explorer-params",title:t("params.column_title")},r.createElement(Th,null),r.createElement(Ph,null),r.createElement(de,{multiple:!0,chevronPosition:"left",defaultValue:[e.defaultOpen],styles:e=>({chevron:{marginRight:`calc(${e.spacing.xs} / 2)`}}),variant:"contained"},r.createElement(vh,null),r.createElement(bh,null),r.createElement(sh,null),r.createElement(Sh,null)),r.createElement("div",{id:"switch-params-load-all-results"},r.createElement(Rh,{withTooltip:!0})),r.createElement(Ch,null),r.createElement(dh,null))},Lh=e=>r.createElement(ee,{noWrap:!0,spacing:"xs"},e.icon&&e.icon,r.createElement(v,{lineClamp:1,sx:{wordBreak:"break-all"}},e.text)),Dh=n.memo((e=>{const{onSelect:t,onDelete:o}=e,{params:a}=e.item,{translate:i}=Dm(),l=Object.values(a.drilldowns).filter(xg).map((e=>e.level)),s=Object.values(a.measures).filter(xg).map((e=>e.name)),u=n.useMemo((()=>({size:15})),[]);return r.createElement(V.Group,null,r.createElement(V,{fullWidth:!0,h:"auto",mih:35,styles:{inner:{justifyContent:"flex-start"}},onClick:()=>t&&t(e.item.key),tabIndex:0,variant:e.active?"filled":"default"},r.createElement(R,{direction:"column"},a.cube&&r.createElement(Lh,{icon:r.createElement(St,{...u}),text:a.cube}),s.length>0&&r.createElement(Lh,{icon:r.createElement(Qt,{...u}),text:s.join(", ")}),l.length>0&&r.createElement(Lh,{icon:r.createElement(dn,{...u}),text:l.join(", ")}),!a.cube&&r.createElement("span",null,i("queries.unset_parameters")))),r.createElement(V,{color:"red",disabled:e.hideDelete,h:"auto",onClick:()=>o&&o(e.item.key),variant:"filled"},r.createElement(mn,null)))}),bg),zh=()=>{const e=Cf(),t=la($g),o=la(zg),{translate:a}=Dm(),i=n.useCallback((()=>{const n=sg({params:null==t?void 0:t.params});e.updateQuery(n),e.selectQuery(n.key)}),[t]),l=n.useCallback((t=>{e.removeQuery(t)}),[]),s=n.useCallback((t=>{e.selectQuery(t)}),[]),u=n.useCallback((()=>{const t=window.prompt("Enter the URL of the query you want to parse:");if(t){e.setLoadingState("FETCHING");const n=new URL(t);e.willParseQueryUrl(n).then((t=>{e.updateQuery(t),e.selectQuery(t.key)})).then((()=>e.willHydrateParams())).then((()=>e.willExecuteQuery())).then((()=>e.setLoadingState("SUCCESS")),(t=>e.setLoadingState("FAILURE",t.message)))}}),[]);return r.createElement(_h,{id:"layout-column-explorer-queries",title:a("queries.column_title"),defaultOpen:o.length>1},r.createElement(pe,{h:"xs"}),r.createElement(ee,{id:"button-group-queries-actions",noWrap:!0,spacing:"xs"},r.createElement(V,{fullWidth:!0,leftIcon:r.createElement(rn,null),onClick:i},a("queries.action_create")),r.createElement(V,{fullWidth:!0,leftIcon:r.createElement(Kt,null),onClick:u},a("queries.action_parse"))),r.createElement(U,{my:"xs"}),r.createElement(D,{id:"button-group-stored-queries",spacing:"xs"},o.map(((e,n,o)=>r.createElement(Dh,{active:e===t,key:e.key,item:e,hideDelete:1===o.length,onSelect:s,onDelete:l})))))},$h=o((()=>({container:{minHeight:"40vh",display:"flex",flexFlow:"column nowrap"}})));function Bh(e){const t=la(Uf),n=la(_g),{isDirty:o,params:a,result:i}=la($g),{online:l,url:s}=n,{data:u,error:c}=i,{translate:d}=Dm(),{classes:p,cx:m}=$h();if("object"==typeof window&&!1===window.navigator.onLine)return r.createElement(Vh,{className:m(p.container,e.className),icon:r.createElement(hn,{color:"orange",size:"5rem"}),title:d("results.error_disconnected_title")});if(!1===l)return r.createElement(Vh,{className:m(p.container,e.className),icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:d("results.error_serveroffline_title"),description:r.createElement(v,{span:!0},d("results.error_serveroffline_detail"),r.createElement(Z,{href:s,target:"_blank",rel:"noopener noreferrer"},s),".")});if(c){const t=d(`results.error_execquery_code${c.status}`,c);return r.createElement(Vh,{className:m(p.container,e.className),icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:d("results.error_execquery_title",c),description:t.startsWith("results.error_")?d("results.error_execquery_default",c):t})}return null==l||!t||o?r.createElement(k,{className:m(p.container,e.className),id:"query-results-transient",radius:0},e.splash||null):0===u.length?r.createElement(Vh,{className:m(p.container,e.className),icon:r.createElement(St,{color:"orange",size:"5rem"}),title:d("results.error_emptyresult_title"),description:d("results.error_emptyresult_detail")}):r.createElement(Uh,{className:m(p.container,e.className),cube:t,panels:e.panels,params:a,result:i},e.splash)}function Vh(e){return r.createElement(k,{id:"query-results-failure",className:e.className,radius:0,withBorder:!0,sx:{justifyContent:"center"}},r.createElement(D,{align:"center",spacing:"xs"},e.icon&&e.icon,e.title&&r.createElement(se,{order:5},e.title),e.description&&r.createElement(v,{ta:"center",sx:{whiteSpace:"pre"}},e.description),e.children&&e.children,e.action&&e.action))}function Uh(e){const{cube:t,panels:o,params:a,result:i}=e,{translate:l}=Dm(),{previewLimit:s,rowLimit:u,actions:d}=Sf(),p=la($g),g=la(Zg),[f,h,b]=n.useMemo((()=>{const e=p.panel||`${o[0].key}-`,[t,...n]=e.split("-"),r=o.find((e=>e.key===t))||o[0];return[r.component,r.key,n.join("-")]}),[o,p.panel]),y=n.useCallback((e=>{d.switchPanel(e)}),[]);return r.createElement(k,{id:"query-results-success",className:e.className,radius:0,withBorder:!0},r.createElement(m,{id:"query-results-tabs",onTabChange:y,value:h},r.createElement(m.List,null,o.map((e=>r.createElement(m.Tab,{key:e.key,id:e.key,value:e.key},l(e.label)))),r.createElement(m.Tab,{disabled:!0,ml:"auto",value:"_results"},r.createElement(se,{order:5},l("results.count_rows",{n:i.data.length}))))),g&&r.createElement(L,{id:"alert-load-all-results",color:"yellow",radius:0,sx:{flex:"0 0 auto"}},r.createElement(ee,{position:"apart"},r.createElement(v,null,r.createElement(v,{fw:700,span:!0},l("preview_mode.title_preview"),": "),r.createElement(v,{span:!0},l("preview_mode.description_preview",{limit:s}))),r.createElement(Rh,null))),!g&&u>0&&u===i.data.length&&r.createElement(L,{id:"alert-limit-hit-results",color:"orange",radius:0,sx:{flex:"0 0 auto"}},r.createElement(v,null,r.createElement(v,{fw:700,span:!0},l("row_limit.title"),": "),r.createElement(v,{span:!0},l("row_limit.description",{limit:u})))),r.createElement(c,{id:"query-results-content",sx:{flex:"1 1"},h:{base:"auto",md:0}},r.createElement(n.Suspense,{fallback:e.children},r.createElement(f,{cube:t,panelKey:`${h}-${b}`,params:a,result:i}))))}var Gh=()=>{const{translate:e}=Dm(),{loading:t,message:n}=la(uf),o=n?"HEAVY_QUERY"===n.type?e("loading.message_heavyquery",n):e("loading.message_default",n):void 0,a=r.createElement(R,{justify:"center",align:"center",direction:"column"},r.createElement(oe,{size:"xl"}),r.createElement(pe,{h:"md"}),r.createElement(se,{order:4},e("loading.title")),r.createElement(v,null,o));return r.createElement(O,{loader:a,visible:t,sx:{position:"fixed",top:0}})},Hh=o(((e,t)=>({root:{display:"flex",flexFlow:"column nowrap",height:"100%",[e.fn.largerThan("md")]:{flexDirection:"row",height:t.height,width:"100%"}},flexCol:{flex:"1 1 auto",[e.fn.largerThan("md")]:{width:0}}})));function qh(e){const t=Dm(),o=function(e,t){const r=Cf(),[o,a]=n.useState(!1),i=n.useMemo((()=>{const e=qm(t?`${t}`.split(","):[]).map((e=>e.trim()));return r.updateLocaleList(e),e}),[`${t}`]);return n.useMemo((()=>{"object"==typeof window&&(r.setLoadingState("FETCHING"),Promise.all([Df(r),r.willSetupClient(e).then((()=>r.willReloadCubes()))]).then((e=>{const[t,n]=e;if(!t||!Xm(n,t.params.cube)){const e=Object.keys(n)[0];return r.willHydrateParams(e)}return t.params.locale=t.params.locale||i[0],r.resetQueries({[t.key]:t}),r.willHydrateParams().then((()=>r.willExecuteQuery()))})).then((()=>{r.setLoadingState("SUCCESS"),a(!0)}),(e=>{console.dir("There was an error during setup:",e),r.setLoadingState("FAILURE",e.message),a(!0)})))}),[]),o}(e.source,e.dataLocale),a=la(_g),{classes:i}=Hh({height:e.height});n.useEffect((()=>{e.uiLocale&&t.setLocale(e.uiLocale)}),[e.uiLocale]);const l=n.useMemo((()=>{const n=e.splash;return n?r.createElement(n,{translation:t}):r.createElement(le,{h:"100%",sx:{flex:1}},r.createElement(Vf,null))}),[e.splash]);return r.createElement("div",{className:i.root},r.createElement(Gh,null),o&&a.online&&e.withMultiQuery?r.createElement(zh,null):null,o&&a.online?r.createElement(Nh,{defaultOpen:e.defaultOpenParams}):null,r.createElement(Bh,{className:i.flexCol,panels:e.panels,splash:l}))}var Wh="application/javascript",Kh="object"==typeof window?window.Worker:null;if(Kh){let e;const t=Yh("self.onmessage = function () {}"),n=new Uint8Array(1);try{if(/(?:Trident|Edge)\/(?:[567]|12)/i.test(navigator.userAgent))throw new Error("Not available");e=new Kh(t),e.postMessage(n,[n.buffer])}catch(Io){Kh=null}finally{URL.revokeObjectURL(t),e&&e.terminate()}}function Yh(e){try{return URL.createObjectURL(new Blob([e],{type:Wh}))}catch(Io){const n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);return n.append(e),URL.createObjectURL(n.getBlob(Wh))}}var Xh=function(e){function t(t){const n=this;if(Kh&&!t){const t=Yh(`(${e.toString().trim()})(this);`);return this._worker=new Kh(t),void URL.revokeObjectURL(t)}const r={onmessage(e){},onmessageerror(e){},postMessage(e){console.debug("Message from shim worker to main:",e),setTimeout((()=>{n.onmessage({data:e,target:r})}))},terminate(){console.debug("Worker terminated by shim worker.")}};e.call(r,r),this.threadShim=r,this.isThisThread=!0,this.onerror=void 0,this.onmessage=void 0,this.onmessageerror=void 0}return Object.defineProperties(t.prototype,{onerror:{get(){return this._worker.onerror},set(e){this._worker.onerror=e}},onmessage:{get(){return this._worker.onmessage},set(e){this._worker.onmessage=e}},onmessageerror:{get(){return this._worker.onmessageerror},set(e){this._worker.onmessageerror=e}}}),t.prototype.postMessage=function(e){const t=this._worker;return t?t.postMessage(e):(setTimeout((()=>{var t;null==(t=null==this?void 0:this.threadShim)||t.onmessage({data:e,target:this})})),console.debug("Message from main thread to ShimWorker:",e))},t.prototype.terminate=function(){const e=this._worker;return e?e.terminate():console.debug("ShimWorker terminated by main.")},t}((e=>{e.onmessage=function(n){const{data:r,sides:o}=n.data,a=t(r,o);e.postMessage(a)};const t=new Function("data","sides",'\n const {valProp} = sides;\n const colProp = getIdProperty(sides.colProp);\n const rowProp = getIdProperty(sides.rowProp);\n\n /** @type {Set} */ const colMembers = new Set();\n /** @type {Set} */ const rowMembers = new Set();\n\n /** @type {Map} */ const colDict = new Map();\n /** @type {Map} */ const rowDict = new Map();\n\n /** @type {Map[]>} */\n const valReference = new Map();\n\n const n = data.length;\n let i = 0;\n while (i < n) {\n const datum = data[i++];\n\n const colId = datum[colProp];\n const rowId = datum[rowProp];\n colMembers.add(colId);\n rowMembers.add(rowId);\n getValueReference(colId, rowId).push(datum);\n\n const colLabel = datum[sides.colProp];\n const rowLabel = datum[sides.rowProp];\n colDict.set(colId, colLabel);\n rowDict.set(rowId, rowLabel);\n }\n\n const sortedCols = Array.from(colMembers).sort();\n\n return {\n headers: [\n sides.rowProp,\n ...sortedCols.map(colId => colDict.get(colId) || colId)\n ],\n data: Array.from(rowMembers, rowId => [\n rowDict.get(rowId) || rowId,\n ...sortedCols.map(colId => {\n const items = getValueReference(colId, rowId);\n if (items.length === 0) return undefined;\n const value = items.reduce((sum, datum) => sum + datum[valProp], 0);\n return isNaN(value) ? undefined : value;\n })\n ])\n };\n\n /**\n * Gets the property name for the ID of the required property.\n * @type {(prop: string) => string}\n */\n function getIdProperty(prop) {\n const propid = "".concat(prop, " ID");\n return {}.hasOwnProperty.call(data[0], propid) ? propid : prop;\n }\n\n /**\n * Retrieves the container array for the elements in the data that match a\n * specified (col, row) tuple. If this array was not previously defined, is\n * created.\n * @type {(colId: string, rowId: string) => Record[]}\n */\n function getValueReference(colId, rowId) {\n const key = "".concat("<", colId, ">x<", rowId, ">");\n const value = valReference.get(key);\n if (value !== undefined) return value;\n const defaultValue = [];\n valReference.set(key, defaultValue);\n return defaultValue;\n }\n ')})),Qh={undefined:e=>e,identity:e=>`${e}`,Decimal:new Intl.NumberFormat(void 0,{useGrouping:!1}).format,Dollars:new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"}).format,Human:e=>Am(e,"en-US"),Milliards:new Intl.NumberFormat(void 0,{useGrouping:!0}).format},Zh=["Decimal","Milliards","Human"];function Jh(e){const{formatters:t}=Sf(),[r,o]=n.useState({}),a=n.useRef({});return n.useEffect((()=>{const t=e.map((e=>{const{annotations:t}=e;return[e.name,t.format_template||t.units_of_measurement]})),n=Object.fromEntries(t);a.current=n,o(n)}),[e]),n.useMemo((()=>({currentFormats:r,getAvailableKeys(e){const t=a.current[e];return t&&!Zh.includes(t)?[t].concat(Zh):Zh},getFormatterKey:e=>r[e]||a.current[e],getFormatter(e){if(/^[A-Z]{3}$/.test(e))return t[e]||(e=>{const n={style:"currency",currency:e},r=new Intl.NumberFormat(void 0,n).format;return t[e]=r,r})(e);try{return t[e]||Qh[e]||Tm(e)}catch(Io){return console.error(`Formatter not configured: "${e}"`),Qh.identity}},setFormat(e,t){o({...r,[e]:t})}})),[r,a.current])}function eb(e,t,r,o,a=null){const[i,l]=n.useState(a),[s,u]=n.useState(null);return n.useEffect((()=>(l(a),u(null),function(e,t){return new Promise(((n,r)=>{const o=new Xh;o.onmessage=e=>{n(e.data),o.terminate()},o.onerror=e=>{r(e),o.terminate()};try{o.postMessage({data:e,sides:t})}catch(a){r(a)}}))}(e,{colProp:t,rowProp:r,valProp:o}).then(l,u),()=>{l(null),u(null)})),[e,t,r,o]),[i,s]}var tb,nb=e=>r.createElement(le,{h:"100%",w:"100%",sx:e=>({[e.fn.smallerThan("md")]:{minHeight:"100vh"}})},r.createElement(D,{align:"center",spacing:"xs"},e.icon&&e.icon,e.title&&r.createElement(se,{order:5},e.title),e.description&&r.createElement(v,null,e.description),e.children&&e.children,e.action&&e.action)),rb=ph,ob=o((e=>({container:{[e.fn.largerThan("md")]:{height:"100%",display:"flex",flexFlow:"row nowrap"}},colParams:{[e.fn.largerThan("md")]:{flex:"0 0 280px"}},colContent:{[e.fn.largerThan("md")]:{width:0,flex:"1 1 auto"}}})));function ab(e){const{cube:t,params:o,result:a,...i}=e,{translate:l}=Dm(),s=la(Wf),{classes:u,cx:d}=ob(),p=n.useMemo((()=>Wm(Object.values(a.types),(e=>"measure"===e.entityType?null:{value:e.label,label:e.localeLabel,type:"level"===e.entityType?s[e.entity.dimension].dimensionType:"prop"}))),[a]),m=n.useMemo((()=>Wm(Object.values(a.types),(e=>"measure"!==e.entityType?null:{value:e.label,label:e.localeLabel,type:e.entity.aggregatorType}))),[a]),[g,f]=n.useState((()=>p.find((e=>"time"===e.type))||p[0])),[h,b]=n.useState((()=>p.find((e=>e!==g))||p[0])),[v,y]=n.useState((()=>m[0])),w=[o.cube,g.label,h.label,v.value].join("_"),[x,S]=eb(a.data,g.value,h.value,v.value),{formatter:C,formatterKey:E,formatterKeyOptions:k,setFormat:_}=function(e,t){const{translate:r}=Dm(),o=Jh(e);return n.useMemo((()=>{const e=o.getFormatterKey(t)||"undefined",n=o.getFormatter(e);return{formatExample:n(12345.6789),formatter:n,formatterKey:e,formatterKeyOptions:[{label:r("placeholders.none"),value:"undefined"}].concat(o.getAvailableKeys(t).map((e=>({label:o.getFormatter(e)(12345.6789),value:e})))),setFormat:o.setFormat}}),[t,o])}(t.measures,v.value),R=n.useMemo((()=>{const e=[];return"prop"!==h.type&&"prop"!==g.type||e.push(r.createElement(L,{color:"yellow",m:"sm",icon:r.createElement(mt,{size:"2rem"}),key:"propertypivot"},l("pivot_view.warning_propertypivot"))),Object.values(o.drilldowns).filter(xg).length>2&&e.push("SUM"!==v.type?r.createElement(L,{color:"yellow",m:"sm",icon:r.createElement(mt,{size:"2rem"}),key:"notsummeasure"},l("pivot_view.warning_notsummeasure")):r.createElement(L,{color:"yellow",m:"sm",icon:r.createElement(mt,{size:"2rem"}),key:"sumdimensions"},l("pivot_view.warning_sumdimensions"))),e}),[o.drilldowns,h,g,v]),O=n.useMemo((()=>x?r.createElement(J.Wrapper,{label:l("pivot_view.title_download")},r.createElement(V.Group,null,r.createElement(ch,{provider:()=>({name:w,extension:"csv",content:lb(x,C,"csv")})},"CSV"),r.createElement(ch,{provider:()=>({name:w,extension:"tsv",content:lb(x,C,"tsv")})},"TSV"))):null),[x,C]);if(p.length<2)return r.createElement(nb,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_missingparams")});let I;return I=g&&h&&v?g===h?r.createElement(nb,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_onedimension")}):null!=S?r.createElement(nb,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_internal"),description:l("pivot_view.error_internal_detail",{error:S.message})}):x?r.createElement(ib,{key:`${w} ${E}`,data:x.data,headers:x.headers,formatter:C,tableProps:i}):r.createElement(nb,{icon:r.createElement(oe,{size:"xl"}),title:l("pivot_view.loading_title"),description:l("pivot_view.loading_details")}):r.createElement(nb,{icon:r.createElement(ft,{color:"orange",size:"5rem"}),title:l("pivot_view.error_missingparams")}),r.createElement(c,{id:"query-results-pivot-view",className:d(e.className,u.container)},r.createElement(c,{className:u.colParams},r.createElement(te,{id:"query-results-pivot-view-params",px:"md",py:"sm",cols:1,breakpoints:[{minWidth:"xs",cols:2},{minWidth:"sm",cols:3},{minWidth:"md",cols:1}]},r.createElement(rb,{getLabel:"label",getValue:"value",items:p,onItemSelect:f,selectedItem:g.value,label:"prop"===g.type?l("pivot_view.label_ddcolumnprop"):l("pivot_view.label_ddcolumn")}),r.createElement(rb,{getLabel:"label",getValue:"value",items:p,onItemSelect:b,selectedItem:h.value,label:"prop"===h.type?l("pivot_view.label_ddrowprop"):l("pivot_view.label_ddrow")}),r.createElement(rb,{getLabel:"label",getValue:"value",items:m,label:l("pivot_view.label_valmeasure"),onItemSelect:y,selectedItem:v.value}),r.createElement(ph,{getLabel:"label",getValue:"value",items:k,label:l("pivot_view.label_formatter"),onItemSelect:e=>_(v.value,e.value),selectedItem:E}),O),R.length>0?R:null),r.createElement(c,{className:u.colContent},I))}function ib(e){const{data:t,formatter:o,headers:a,...i}=e,l=n.useMemo((()=>a.map(((e,t)=>({accesorKey:e,Cell:({row:e})=>t>0&&"number"==typeof e.original[t]?o(e.original[t]):e.original[t],header:e,id:`${e}_${t}`,mantineTableBodyCellProps:{align:t>0?"right":"left"}})))),[a]),s=n.useMemo((()=>({enableBottomToolbar:!1,enableColumnFilterModes:!0,enableColumnResizing:!0,enableColumnVirtualization:!0,enableTopToolbar:!1,enablePagination:!1,enableRowNumbers:!0,enableRowVirtualization:!0,initialState:{density:"xs"},mantineTableProps:{sx:{"& td":{padding:"7px 10px!important"}},withColumnBorders:!0},mantinePaperProps:{id:"query-results-pivot-view-preview",withBorder:!1,sx:e=>({height:"100%",padding:`0 ${e.spacing.sm}`,[e.fn.largerThan("lg")]:{padding:0}})},mantineTableContainerProps:{id:"query-results-pivot-view-table",sx:{height:"100%"}},rowVirtualizerProps:{measureElement:()=>37}})),[]),u=Sp({...s,...i,columns:l,data:t});return r.createElement(gm,{table:u})}function lb(e,t,n){const r={csv:",",tsv:"\t"}[n],o=e=>{const t=`${e}`.trim();return t.includes(r)?JSON.stringify(t):t},a=e=>void 0===e?"":o(t(e));return[e.headers.map(o).join(r),...e.data.map((e=>[o(e[0]),...e.slice(1).map(a)].join(r)))].join("\n")}function sb(e){const{cube:t,result:o,columnFilter:a=(()=>!0),columnSorting:i=(()=>0),...l}=e,{types:s}=o,u=n.useMemo((()=>window.navigator.userAgent.includes("Firefox")?o.data.slice(0,1e4):o.data),[o.data]),c=o.data.length!==u.length,{translate:d}=Dm(),{currentFormats:p,getAvailableKeys:m,getFormatter:g,getFormatterKey:f,setFormat:h}=Jh(t.measures),b=n.useMemo((()=>Object.values(s).filter(a).sort(i).map((e=>{const{entity:t,label:n,localeLabel:r,valueType:o}=e,a="number"===o,i=f(n)||(a?"Decimal":"identity"),l=g(i);return{entity:t,header:r,formatter:l,formatterKey:i,isNumeric:a,id:n,dataType:o,accessorFn:e=>e[n],Cell:a?({cell:e})=>l(e.getValue()):({renderedCellValue:e})=>e,mantineTableBodyCellProps:{align:a?"right":"left"}}}))),[p,u,s]),v=n.useMemo((()=>({enableBottomToolbar:c,enableColumnFilterModes:!0,enableColumnResizing:!0,enableDensityToggle:!1,enableFilterMatchHighlighting:!0,enableGlobalFilter:!0,enablePagination:!1,enableRowNumbers:!0,enableRowVirtualization:!0,globalFilterFn:"contains",initialState:{density:"xs"},mantineBottomToolbarProps:{id:"query-results-table-view-footer"},mantineTableProps:{sx:{"& td":{padding:"7px 10px!important"}},withColumnBorders:!0},mantinePaperProps:{id:"query-results-table-view",withBorder:!1,sx:e=>({height:"100%",display:"flex",flexFlow:"column nowrap",padding:`0 ${e.spacing.sm}`,[e.fn.largerThan("md")]:{padding:0}})},mantineTableContainerProps:{id:"query-results-table-view-table",h:{base:"auto",md:0},sx:{flex:"1 1 auto"}},mantineTopToolbarProps:{id:"query-results-table-view-toolbar",sx:{flex:"0 0 auto"}},renderBottomToolbar(){const[e,t]=n.useState(c);return e?r.createElement(L,{icon:r.createElement(mt,{size:"1rem"}),color:"yellow",withCloseButton:!0,onClose:()=>t(!1)},d("table_view.slicedresult")):null},renderColumnActionsMenuItems({column:e}){const t=e.columnDef||{};return t.isNumeric?r.createElement(r.Fragment,null,r.createElement(M.Label,null,d("table_view.numeral_format")),m(t.id).map((e=>r.createElement(M.Item,{key:e,icon:t.formatterKey===e?r.createElement(Ft,null):r.createElement(At,null),onClick:()=>h(t.id,e)},g(e)(12345.678))))):null},rowVirtualizerProps:{measureElement:()=>37}})),[c]),y=Sp({...v,...l,columns:b,data:u});return r.createElement(gm,{table:y})}function ub(e){const{dataLocale:t="en",defaultOpenParams:o="measures",height:a="100vh",previewLimit:i=50,rowLimit:l=0,withinMantineProvider:s=!0,withinReduxProvider:u=!1,withMultiQuery:c=!1}=e,d=n.useMemo((()=>t.toString().split(",")),[t]),p=n.useMemo((()=>e.panels||[{key:"table",label:"table_view.tab_label",component:sb},{key:"pivot",label:"pivot_view.tab_label",component:ab},{key:"debug",label:"debug_view.tab_label",component:Bm}]),[e.panels]),m=u?n.useMemo(gf,[]):ra(),g=n.useMemo((()=>function(e,t){if("function"==typeof e)return jr(e,t);if("object"!=typeof e||null===e)throw new Error(_r(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=jr(o,t))}return n}(Lf,m.dispatch)),[]);n.useMemo((()=>{m.dispatch(((e,t,n)=>{n.previewLimit=i,n.rowLimit=l}))}),[i,l]);let f=r.createElement(xf,{actions:g,defaultMembersFilter:e.defaultMembersFilter,formatters:e.formatters,previewLimit:i,rowLimit:l,withPermalink:e.withPermalink},r.createElement($m,{defaultLocale:e.uiLocale,translations:e.translations},r.createElement(qh,{dataLocale:d,defaultOpenParams:o,height:a,panels:p,source:e.source,splash:e.splash,uiLocale:e.uiLocale,withMultiQuery:c})));return s&&(f=r.createElement(ue,{withNormalizeCSS:!0},f)),u&&(f=r.createElement(Eo,{store:m},f)),f}sb.displayName="TesseractExplorer:TableView",ub.defaultProps={version:"2.0.0-alpha.17"},ub.displayName="TesseractExplorer";var cb=f;tb=cb.createRoot,cb.hydrateRoot,document.querySelector("p#warning")?.remove();const db=document.getElementById("app");db&&function(e){const o=n.lazy((()=>fe((()=>t.import("./vizbuilder-legacy-6ffafa1e.js")),0,t.meta.url)));tb(e).render(r.createElement(ub,{uiLocale:"en",dataLocale:"en",previewLimit:100,panels:[{key:"table",label:"Data Table",component:sb},{key:"matrix",label:"Pivot Table",component:ab},{key:"debug",label:"Raw response",component:Bm},{key:"vizbuilder",label:"Vizbuilder",component:o}],source:{url:"/tesseract/"},withinMantineProvider:!0,withinReduxProvider:!0,withPermalink:!0}))}(db)}}})); diff --git a/explorer/assets/vizbuilder-f4715974.js b/explorer/assets/vizbuilder-f4715974.js new file mode 100644 index 0000000..9766eba --- /dev/null +++ b/explorer/assets/vizbuilder-f4715974.js @@ -0,0 +1 @@ +var t,n,e,i,r,a,o,u,l,s,c,h,f,g,d,p,m,_,y=Object.freeze,v=Object.defineProperty,b=(t,n)=>y(v(t,"raw",{value:y(n||t.slice())}));import{c as w,e as S,f as x,a as k,b as C,d as A,g as E,P as M,t as T,A as O,C as P,D as j,T as B,u as D,h as z}from"./index-4922982c.js";import{h as N,g as R,r as F,R as L,F as I,a6 as H,j as G,_ as K,G as U,$ as q,B as W,E as Y,P as V,y as Z}from"./extras-2ba1cc58.js";var X=w("arrows-maximize","IconArrowsMaximize",[["path",{d:"M16 4l4 0l0 4",key:"svg-0"}],["path",{d:"M14 10l6 -6",key:"svg-1"}],["path",{d:"M8 20l-4 0l0 -4",key:"svg-2"}],["path",{d:"M4 20l6 -6",key:"svg-3"}],["path",{d:"M16 20l4 0l0 -4",key:"svg-4"}],["path",{d:"M14 14l6 6",key:"svg-5"}],["path",{d:"M8 4l-4 0l0 4",key:"svg-6"}],["path",{d:"M4 4l6 6",key:"svg-7"}]]),J=w("arrows-minimize","IconArrowsMinimize",[["path",{d:"M5 9l4 0l0 -4",key:"svg-0"}],["path",{d:"M3 3l6 6",key:"svg-1"}],["path",{d:"M5 15l4 0l0 4",key:"svg-2"}],["path",{d:"M3 21l6 -6",key:"svg-3"}],["path",{d:"M19 9l-4 0l0 -4",key:"svg-4"}],["path",{d:"M15 9l6 -6",key:"svg-5"}],["path",{d:"M19 15l-4 0l0 4",key:"svg-6"}],["path",{d:"M15 15l6 6",key:"svg-7"}]]),Q=w("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),$=w("photo-down","IconPhotoDown",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M12.5 21h-6.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6.5",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l4 4",key:"svg-2"}],["path",{d:"M14 14l1 -1c.653 -.629 1.413 -.815 2.13 -.559",key:"svg-3"}],["path",{d:"M19 16v6",key:"svg-4"}],["path",{d:"M22 19l-3 3l-3 -3",key:"svg-5"}]]),tt=w("vector-triangle","IconVectorTriangle",[["path",{d:"M10 4m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M17 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M6.5 17.1l5 -9.1",key:"svg-3"}],["path",{d:"M17.5 17.1l-5 -9.1",key:"svg-4"}],["path",{d:"M7 19l10 0",key:"svg-5"}]]);const nt=new Date,et=new Date;function it(t,n,e,i){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),r.round=t=>{const n=r(t),e=r.ceil(t);return t-n(n(t=new Date(+t),null==e?1:Math.floor(e)),t),r.range=(e,i,a)=>{const o=[];if(e=r.ceil(e),a=null==a?1:Math.floor(a),!(e0))return o;let u;do{o.push(u=new Date(+e)),n(e,a),t(e)}while(uit((n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;n(t,-1),!e(t););else for(;--i>=0;)for(;n(t,1),!e(t););})),e&&(r.count=(n,i)=>(nt.setTime(+n),et.setTime(+i),t(nt),t(et),Math.floor(e(nt,et))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?n=>i(n)%t==0:n=>r.count(0,n)%t==0):r:null)),r}const rt=it((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));rt.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?it((n=>{n.setTime(Math.floor(n/t)*t)}),((n,e)=>{n.setTime(+n+e*t)}),((n,e)=>(e-n)/t)):rt:null),rt.range;const at=1e3,ot=6e4,ut=36e5,lt=864e5,st=6048e5,ct=2592e6,ht=31536e6,ft=it((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*at)}),((t,n)=>(n-t)/at),(t=>t.getUTCSeconds()));ft.range;const gt=it((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*at)}),((t,n)=>{t.setTime(+t+n*ot)}),((t,n)=>(n-t)/ot),(t=>t.getMinutes()));gt.range;const dt=it((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ot)}),((t,n)=>(n-t)/ot),(t=>t.getUTCMinutes()));dt.range;const pt=it((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*at-t.getMinutes()*ot)}),((t,n)=>{t.setTime(+t+n*ut)}),((t,n)=>(n-t)/ut),(t=>t.getHours()));pt.range;const mt=it((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*ut)}),((t,n)=>(n-t)/ut),(t=>t.getUTCHours()));mt.range;const _t=it((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ot)/lt),(t=>t.getDate()-1));_t.range;const yt=it((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/lt),(t=>t.getUTCDate()-1));yt.range;const vt=it((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/lt),(t=>Math.floor(t/lt)));function bt(t){return it((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ot)/st))}vt.range;const wt=bt(0),St=bt(1),xt=bt(2),kt=bt(3),Ct=bt(4),At=bt(5),Et=bt(6);function Mt(t){return it((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/st))}wt.range,St.range,xt.range,kt.range,Ct.range,At.range,Et.range;const Tt=Mt(0),Ot=Mt(1),Pt=Mt(2),jt=Mt(3),Bt=Mt(4),Dt=Mt(5),zt=Mt(6);Tt.range,Ot.range,Pt.range,jt.range,Bt.range,Dt.range,zt.range;const Nt=it((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Nt.range;const Rt=it((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Rt.range;const Ft=it((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Ft.every=t=>isFinite(t=Math.floor(t))&&t>0?it((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,e)=>{n.setFullYear(n.getFullYear()+e*t)})):null,Ft.range;const Lt=it((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function It(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function Ht(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function Gt(t){let n,e,i;function r(t,i,r=0,a=t.length){if(r>>1;e(t[n],i)<0?r=n+1:a=n}while(rIt(t(n),e),i=(n,e)=>t(n)-e):(n=t===It||t===Ht?t:Kt,e=t,i=t),{left:r,center:function(t,n,e=0,a=t.length){const o=r(t,n,e,a-1);return o>e&&i(t[o-1],n)>-i(t[o],n)?o-1:o},right:function(t,i,r=0,a=t.length){if(r>>1;e(t[n],i)<=0?r=n+1:a=n}while(risFinite(t=Math.floor(t))&&t>0?it((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null,Lt.range;const qt=Gt(It).right;Gt(Ut).center;const Wt=qt;function Yt(t,n){const e=function(t,n){let e,i=0,r=0,a=0;if(void 0===n)for(let o of t)null!=o&&(o=+o)>=o&&(e=o-r,r+=e/++i,a+=e*(o-r));else{let o=-1;for(let u of t)null!=(u=n(u,++o,t))&&(u=+u)>=u&&(e=u-r,r+=e/++i,a+=e*(u-r))}if(i>1)return a/(i-1)}(t,n);return e?Math.sqrt(e):e}function Vt(t,n){let e,i;if(void 0===n)for(const r of t)null!=r&&(void 0===e?r>=r&&(e=i=r):(e>r&&(e=r),i=a&&(e=i=a):(e>a&&(e=a),i0){for(a=t[--r];r>0&&(n=a,e=t[--r],a=n+e,i=e-(a-n),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(e=2*i,n=a+e,e==n-a&&(a=n))}return a}};class Xt extends Map{constructor(t,n=Qt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[e,i]of t)this.set(e,i)}get(t){return super.get(Jt(this,t))}has(t){return super.has(Jt(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},e){const i=n(e);return t.has(i)?t.get(i):(t.set(i,e),e)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},e){const i=n(e);t.has(i)&&(e=t.get(i),t.delete(i));return e}(this,t))}}function Jt({_intern:t,_key:n},e){const i=n(e);return t.has(i)?t.get(i):e}function Qt(t){return null!==t&&"object"==typeof t?t.valueOf():t}function $t(t){return t}function tn(t,n,...e){return nn(t,$t,n,e)}function nn(t,n,e,i){return function t(r,a){if(a>=i.length)return e(r);const o=new Xt,u=i[a++];let l=-1;for(const n of r){const t=u(n,++l,r),e=o.get(t);e?e.push(n):o.set(t,[n])}for(const[n,e]of o)o.set(n,t(e,a));return n(o)}(t,0)}function en(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}const rn=Math.sqrt(50),an=Math.sqrt(10),on=Math.sqrt(2);function un(t,n,e){const i=(n-t)/Math.max(0,e),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=rn?10:a>=an?5:a>=on?2:1;let u,l,s;return r<0?(s=Math.pow(10,-r)/o,u=Math.round(t*s),l=Math.round(n*s),u/sn&&--l,s=-s):(s=Math.pow(10,r)*o,u=Math.round(t/s),l=Math.round(n/s),u*sn&&--l),l0))return[];if((t=+t)===(n=+n))return[t];const i=n=r))return[];const u=a-r+1,l=new Array(u);if(i)if(o<0)for(let s=0;s=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e=r)&&(e=r)}return e}function fn(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}function gn(t,n,e=0,i=1/0,r){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),i=Math.floor(Math.min(t.length-1,i)),!(e<=n&&n<=i))return t;for(r=void 0===r?en:function(t=It){if(t===It)return en;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const i=t(n,e);return i||0===i?i:(0===t(e,e))-(0===t(n,n))}}(r);i>e;){if(i-e>600){const a=i-e+1,o=n-e+1,u=Math.log(a),l=.5*Math.exp(2*u/3),s=.5*Math.sqrt(u*l*(a-l)/a)*(o-a/2<0?-1:1);gn(t,n,Math.max(e,Math.floor(n-o*l/a+s)),Math.min(i,Math.floor(n+(a-o)*l/a+s)),r)}const a=t[n];let o=e,u=i;for(dn(t,e,n),r(t[i],a)>0&&dn(t,e,i);o0;)--u}0===r(t[e],a)?dn(t,e,u):(++u,dn(t,u,i)),u<=n&&(e=u+1),n<=u&&(i=u-1)}return t}function dn(t,n,e){const i=t[n];t[n]=t[e],t[e]=i}function pn(t,n,e){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let e=-1;for(let i of t)null!=(i=n(i,++e,t))&&(i=+i)>=i&&(yield i)}}(t,e)),(i=t.length)&&!isNaN(n=+n)){if(n<=0||i<2)return fn(t);if(n>=1)return hn(t);var i,r=(i-1)*n,a=Math.floor(r),o=hn(gn(t,a).subarray(0,a+1));return o+(fn(t.subarray(a+1))-o)*(r-a)}}function mn(t,n,e=Ut){if((i=t.length)&&!isNaN(n=+n)){if(n<=0||i<2)return+e(t[0],0,t);if(n>=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,a=Math.floor(r),o=+e(t[a],a,t);return o+(+e(t[a+1],a+1,t)-o)*(r-a)}}function _n(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function yn(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),a=new Array(r);++it)).right(o,r);if(a===o.length)return t.every(cn(n/ht,e/ht,i));if(0===a)return rt.every(Math.max(cn(n,e,i),1));const[u,l]=o[r/o[a-1][2][t.toLowerCase(),n])))}function Ln(t,n,e){var i=jn.exec(n.slice(e,e+1));return i?(t.w=+i[0],e+i[0].length):-1}function In(t,n,e){var i=jn.exec(n.slice(e,e+1));return i?(t.u=+i[0],e+i[0].length):-1}function Hn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.U=+i[0],e+i[0].length):-1}function Gn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.V=+i[0],e+i[0].length):-1}function Kn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.W=+i[0],e+i[0].length):-1}function Un(t,n,e){var i=jn.exec(n.slice(e,e+4));return i?(t.y=+i[0],e+i[0].length):-1}function qn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function Wn(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function Yn(t,n,e){var i=jn.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function Vn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function Zn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function Xn(t,n,e){var i=jn.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function Jn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function Qn(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function $n(t,n,e){var i=jn.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function te(t,n,e){var i=jn.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function ne(t,n,e){var i=jn.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function ee(t,n,e){var i=Bn.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function ie(t,n,e){var i=jn.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function re(t,n,e){var i=jn.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function ae(t,n){return zn(t.getDate(),n,2)}function oe(t,n){return zn(t.getHours(),n,2)}function ue(t,n){return zn(t.getHours()%12||12,n,2)}function le(t,n){return zn(1+_t.count(Ft(t),t),n,3)}function se(t,n){return zn(t.getMilliseconds(),n,3)}function ce(t,n){return se(t,n)+"000"}function he(t,n){return zn(t.getMonth()+1,n,2)}function fe(t,n){return zn(t.getMinutes(),n,2)}function ge(t,n){return zn(t.getSeconds(),n,2)}function de(t){var n=t.getDay();return 0===n?7:n}function pe(t,n){return zn(wt.count(Ft(t)-1,t),n,2)}function me(t){var n=t.getDay();return n>=4||0===n?Ct(t):Ct.ceil(t)}function _e(t,n){return t=me(t),zn(Ct.count(Ft(t),t)+(4===Ft(t).getDay()),n,2)}function ye(t){return t.getDay()}function ve(t,n){return zn(St.count(Ft(t)-1,t),n,2)}function be(t,n){return zn(t.getFullYear()%100,n,2)}function we(t,n){return zn((t=me(t)).getFullYear()%100,n,2)}function Se(t,n){return zn(t.getFullYear()%1e4,n,4)}function xe(t,n){var e=t.getDay();return zn((t=e>=4||0===e?Ct(t):Ct.ceil(t)).getFullYear()%1e4,n,4)}function ke(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+zn(n/60|0,"0",2)+zn(n%60,"0",2)}function Ce(t,n){return zn(t.getUTCDate(),n,2)}function Ae(t,n){return zn(t.getUTCHours(),n,2)}function Ee(t,n){return zn(t.getUTCHours()%12||12,n,2)}function Me(t,n){return zn(1+yt.count(Lt(t),t),n,3)}function Te(t,n){return zn(t.getUTCMilliseconds(),n,3)}function Oe(t,n){return Te(t,n)+"000"}function Pe(t,n){return zn(t.getUTCMonth()+1,n,2)}function je(t,n){return zn(t.getUTCMinutes(),n,2)}function Be(t,n){return zn(t.getUTCSeconds(),n,2)}function De(t){var n=t.getUTCDay();return 0===n?7:n}function ze(t,n){return zn(Tt.count(Lt(t)-1,t),n,2)}function Ne(t){var n=t.getUTCDay();return n>=4||0===n?Bt(t):Bt.ceil(t)}function Re(t,n){return t=Ne(t),zn(Bt.count(Lt(t),t)+(4===Lt(t).getUTCDay()),n,2)}function Fe(t){return t.getUTCDay()}function Le(t,n){return zn(Ot.count(Lt(t)-1,t),n,2)}function Ie(t,n){return zn(t.getUTCFullYear()%100,n,2)}function He(t,n){return zn((t=Ne(t)).getUTCFullYear()%100,n,2)}function Ge(t,n){return zn(t.getUTCFullYear()%1e4,n,4)}function Ke(t,n){var e=t.getUTCDay();return zn((t=e>=4||0===e?Bt(t):Bt.ceil(t)).getUTCFullYear()%1e4,n,4)}function Ue(){return"+0000"}function qe(){return"%"}function We(t){return+t}function Ye(t){return Math.floor(+t/1e3)}function Ve(t){return Mn=function(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,a=t.days,o=t.shortDays,u=t.months,l=t.shortMonths,s=Rn(r),c=Fn(r),h=Rn(a),f=Fn(a),g=Rn(o),d=Fn(o),p=Rn(u),m=Fn(u),_=Rn(l),y=Fn(l),v={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:ae,e:ae,f:ce,g:we,G:xe,H:oe,I:ue,j:le,L:se,m:he,M:fe,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:We,s:Ye,S:ge,u:de,U:pe,V:_e,w:ye,W:ve,x:null,X:null,y:be,Y:Se,Z:ke,"%":qe},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Ce,e:Ce,f:Oe,g:He,G:Ke,H:Ae,I:Ee,j:Me,L:Te,m:Pe,M:je,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:We,s:Ye,S:Be,u:De,U:ze,V:Re,w:Fe,W:Le,x:null,X:null,y:Ie,Y:Ge,Z:Ue,"%":qe},w={a:function(t,n,e){var i=g.exec(n.slice(e));return i?(t.w=d.get(i[0].toLowerCase()),e+i[0].length):-1},A:function(t,n,e){var i=h.exec(n.slice(e));return i?(t.w=f.get(i[0].toLowerCase()),e+i[0].length):-1},b:function(t,n,e){var i=_.exec(n.slice(e));return i?(t.m=y.get(i[0].toLowerCase()),e+i[0].length):-1},B:function(t,n,e){var i=p.exec(n.slice(e));return i?(t.m=m.get(i[0].toLowerCase()),e+i[0].length):-1},c:function(t,e,i){return k(t,n,e,i)},d:Zn,e:Zn,f:ne,g:qn,G:Un,H:Jn,I:Jn,j:Xn,L:te,m:Vn,M:Qn,p:function(t,n,e){var i=s.exec(n.slice(e));return i?(t.p=c.get(i[0].toLowerCase()),e+i[0].length):-1},q:Yn,Q:ie,s:re,S:$n,u:In,U:Hn,V:Gn,w:Ln,W:Kn,x:function(t,n,i){return k(t,e,n,i)},X:function(t,n,e){return k(t,i,n,e)},y:qn,Y:Un,Z:Wn,"%":ee};function S(t,n){return function(e){var i,r,a,o=[],u=-1,l=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=An(En(a.y,0,1))).getUTCDay(),i=r>4||0===r?Ot.ceil(i):Ot(i),i=yt.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=Cn(En(a.y,0,1))).getDay(),i=r>4||0===r?St.ceil(i):St(i),i=_t.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?An(En(a.y,0,1)).getUTCDay():Cn(En(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,An(a)):Cn(a)}}function k(t,n,e,i){for(var r,a,o=0,u=n.length,l=e.length;o=l)return-1;if(37===(r=n.charCodeAt(o++))){if(r=n.charAt(o++),!(a=w[r in Pn?n.charAt(o++):r])||(i=a(t,e,i))<0)return-1}else if(r!=e.charCodeAt(i++))return-1}return i}return v.x=S(e,v),v.X=S(i,v),v.c=S(n,v),b.x=S(e,b),b.X=S(i,b),b.c=S(n,b),{format:function(t){var n=S(t+="",v);return n.toString=function(){return t},n},parse:function(t){var n=x(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=S(t+="",b);return n.toString=function(){return t},n},utcParse:function(t){var n=x(t+="",!0);return n.toString=function(){return t},n}}}(t),Tn=Mn.format,Mn.parse,On=Mn.utcFormat,Mn.utcParse,Mn}function Ze(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,a,o,u=[],l=!0,s=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=a.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Xe(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Xe(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:Tn,i=e("%I %p"),r=e(".%L"),a=e("%I:%M"),o=e("%b"),u=e("%b %-d"),l=e("%b %-d, %Y"),s=e("%b %Y"),c=e("Q%q"),h=e("Q%q %Y"),f=e(":%S"),g=e("%Y"),d=n.findIndex((function(n){return+n==+t})),p=0===d||d===n.length-1,m=n.length<=5,_=Ze(n.reduce((function(t,e,i){return i&&(t[0].push(e.getFullYear()-n[i-1].getFullYear()),t[1].push(function(t,n){var e;return e=12*(n.getFullYear()-t.getFullYear()),e-=t.getMonth(),e+=n.getMonth(),e<=0?0:e}(n[i-1],e)),t[2].push(Math.round((e-n[i-1])/864e5)),t[3].push(Math.round((e-n[i-1])/36e5))),t}),[[],[],[],[]]),4),y=_[0],v=_[1],b=_[2],w=_[3];return(y.every((function(t){return t>=1&&!(t%1)}))?g:v.every((function(t){return t>=3&&!(t%3)}))?+Ft(t)===t||p||m?h:c:v.every((function(t){return t>=1&&!(t%1)}))?+Ft(t)===t||p||m?s:o:b.every((function(t){return t>=1&&!(t%1)}))?+Ft(t)===t||p||m?l:u:w.every((function(t){return t>=1&&!(t%1)}))?p||m?l:+Nt(t)===t?u:i:ft(t)0&&i(l)?e>1?t(l,e-1,i,r,a):Mi(a,l):r||(a[a.length]=l)}return a};var Pi=function(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e-1},qi=function(t,n){var e=this.__data__,i=Ii(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};function Wi(t){var n=-1,e=null==t?0:t.length;for(this.clear();++nu))return!1;var s=a.get(t),c=a.get(n);if(s&&c)return s==n&&c==t;var h=-1,f=!0,g=2&e?new ya:void 0;for(a.set(t,n),a.set(n,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},$a=di,to=Qa,no=pi,eo={};eo["[object Float32Array]"]=eo["[object Float64Array]"]=eo["[object Int8Array]"]=eo["[object Int16Array]"]=eo["[object Int32Array]"]=eo["[object Uint8Array]"]=eo["[object Uint8ClampedArray]"]=eo["[object Uint16Array]"]=eo["[object Uint32Array]"]=!0,eo["[object Arguments]"]=eo["[object Array]"]=eo["[object ArrayBuffer]"]=eo["[object Boolean]"]=eo["[object DataView]"]=eo["[object Date]"]=eo["[object Error]"]=eo["[object Function]"]=eo["[object Map]"]=eo["[object Number]"]=eo["[object Object]"]=eo["[object RegExp]"]=eo["[object Set]"]=eo["[object String]"]=eo["[object WeakMap]"]=!1;var io=function(t){return no(t)&&to(t.length)&&!!eo[$a(t)]};var ro=function(t){return function(n){return t(n)}},ao={exports:{}};!function(t,n){var e=$e,i=n&&!n.nodeType&&n,r=i&&t&&!t.nodeType&&t,a=r&&r.exports===i&&e.process,o=function(){try{var t=r&&r.require&&r.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(n){}}();t.exports=o}(ao,ao.exports);var oo=ao.exports,uo=io,lo=ro,so=oo&&oo.isTypedArray,co=so?lo(so):uo,ho=Ya,fo=xi,go=ki,po=Za,mo=Ja,_o=co,yo=Object.prototype.hasOwnProperty;var vo=function(t,n){var e=go(t),i=!e&&fo(t),r=!e&&!i&&po(t),a=!e&&!i&&!r&&_o(t),o=e||i||r||a,u=o?ho(t.length,String):[],l=u.length;for(var s in t)!n&&!yo.call(t,s)||o&&("length"==s||r&&("offset"==s||"parent"==s)||a&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||mo(s,l))||u.push(s);return u},bo=Object.prototype;var wo=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||bo)};var So=function(t,n){return function(e){return t(n(e))}}(Object.keys,Object),xo=wo,ko=So,Co=Object.prototype.hasOwnProperty;var Ao=ir,Eo=Qa;var Mo=function(t){return null!=t&&Eo(t.length)&&!Ao(t)},To=vo,Oo=function(t){if(!xo(t))return ko(t);var n=[];for(var e in Object(t))Co.call(t,e)&&"constructor"!=e&&n.push(e);return n},Po=Mo;var jo=function(t){return Po(t)?To(t):Oo(t)},Bo=Ba,Do=Fa,zo=jo;var No=function(t){return Bo(t,zo,Do)},Ro=Object.prototype.hasOwnProperty;var Fo=function(t,n,e,i,r,a){var o=1&e,u=No(t),l=u.length;if(l!=No(n).length&&!o)return!1;for(var s=l;s--;){var c=u[s];if(!(o?c in n:Ro.call(n,c)))return!1}var h=a.get(t),f=a.get(n);if(h&&f)return h==n&&f==t;var g=!0;a.set(t,n),a.set(n,t);for(var d=o;++sn||a&&o&&l&&!u&&!s||i&&o&&l||!e&&l||!r)return 1;if(!i&&!a&&!s&&t=u?l:l*("desc"==e[i]?-1:1)}return t.index-n.index},gs=Cl,ds=ki;var ps=function(t,n,e){n=n.length?os(n,(function(t){return ds(t)?function(n){return us(n,1===t.length?t[0]:t)}:t})):[gs];var i=-1;n=os(n,hs(ls));var r=ss(t,(function(t,e,r){return{criteria:os(n,(function(n){return n(t)})),index:++i,value:t}}));return cs(r,(function(t,n){return fs(t,n,e)}))};var ms=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)},_s=Math.max;var ys=function(t,n,e){return n=_s(void 0===n?t.length-1:n,0),function(){for(var i=arguments,r=-1,a=_s(i.length-n,0),o=Array(a);++r0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}(ws),ks=Cl,Cs=ys,As=xs;var Es=Bi,Ms=Mo,Ts=Ja,Os=$i;var Ps=function(t,n,e){if(!Os(e))return!1;var i=typeof n;return!!("number"==i?Ms(e)&&Ts(n,e.length):"string"==i&&n in e)&&Es(e[n],t)},js=Oi,Bs=ps,Ds=Ps;const zs=R(function(t,n){return As(Cs(t,n,ks),t+"")}((function(t,n){if(null==t)return[];var e=n.length;return e>1&&Ds(t,n[0],n[1])?n=[]:e>2&&Ds(n[0],n[1],n[2])&&(n=[n[0]]),Bs(t,js(n,1),[])})));var Ns=function(t,n,e,i){for(var r=t.length,a=e+(i?1:-1);i?a--:++a-1};var Gs=function(t,n,e){for(var i=-1,r=null==t?0:t.length;++i=200){var s=n?null:Xs(t);if(s)return Js(s);o=!1,r=Zs,l=new Ws}else l=n?[]:u;t:for(;++i-1:!!r&&kc(t,n,e)>-1}));var Pc=Math.ceil,jc=Math.max;var Bc=function(t,n,e,i){for(var r=-1,a=jc(Pc((n-t)/(e||1)),0),o=Array(a);a--;)o[i?a:++r]=t,t+=e;return o},Dc=Ps,zc=vc;const Nc=R(function(t){return function(n,e,i){return i&&"number"!=typeof i&&Dc(n,e,i)&&(e=i=void 0),n=zc(n),void 0===e?(e=n,n=0):e=zc(e),i=void 0===i?nn},Ic=Nl;const Hc=R((function(t,n){return t&&t.length?Fc(t,Ic(n),Lc):void 0}));function Gc(t,n){return void 0===n?function(n){return n[t]}:function(e){return void 0===e[t]?n:e[t]}}function Kc(t){return(Kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Uc(t){return!(!t||"object"!==Kc(t)||"undefined"!=typeof window&&(t===window||t===window.document||t instanceof Element)||Array.isArray(t))}function qc(){for(var t=arguments,n=arguments.length<=0?void 0:arguments[0],e=function(){var e=i<0||t.length<=i?void 0:t[i];if(!Uc(e))return"continue";Object.keys(e).forEach((function(t){var i,r=e[t];Uc(r)&&(i=r,"undefined"==typeof window||i!==window&&i!==document)?Object.prototype.hasOwnProperty.call(n,t)&&Uc(n[t])?n[t]=qc({},n[t],r):n[t]=qc({},r):Array.isArray(r)?n[t]=r.slice():n[t]=r}))},i=1;i1&&void 0!==arguments[1]?arguments[1]:{};for(var e in n)({}).hasOwnProperty.call(n,e)&&t.attr(e,n[e])}const Yc={aa:{language:"Afar",location:null,id:4096,tag:"aa"},"aa-dj":{language:"Afar",location:"Djibouti",id:4096,tag:"aa-DJ"},"aa-er":{language:"Afar",location:"Eritrea",id:4096,tag:"aa-ER"},"aa-et":{language:"Afar",location:"Ethiopia",id:4096,tag:"aa-ET"},af:{language:"Afrikaans",location:null,id:54,tag:"af"},"af-na":{language:"Afrikaans",location:"Namibia",id:4096,tag:"af-NA"},"af-za":{language:"Afrikaans",location:"South Africa",id:1078,tag:"af-ZA"},agq:{language:"Aghem",location:null,id:4096,tag:"agq"},"agq-cm":{language:"Aghem",location:"Cameroon",id:4096,tag:"agq-CM"},ak:{language:"Akan",location:null,id:4096,tag:"ak"},"ak-gh":{language:"Akan",location:"Ghana",id:4096,tag:"ak-GH"},sq:{language:"Albanian",location:null,id:28,tag:"sq"},"sq-al":{language:"Albanian",location:"Albania",id:1052,tag:"sq-AL"},"sq-mk":{language:"Albanian",location:"North Macedonia",id:4096,tag:"sq-MK"},gsw:{language:"Alsatian",location:null,id:132,tag:"gsw"},"gsw-fr":{language:"Alsatian",location:"France",id:1156,tag:"gsw-FR"},"gsw-li":{language:"Alsatian",location:"Liechtenstein",id:4096,tag:"gsw-LI"},"gsw-ch":{language:"Alsatian",location:"Switzerland",id:4096,tag:"gsw-CH"},am:{language:"Amharic",location:null,id:94,tag:"am"},"am-et":{language:"Amharic",location:"Ethiopia",id:1118,tag:"am-ET"},ar:{language:"Arabic",location:null,id:1,tag:"ar"},"ar-dz":{language:"Arabic",location:"Algeria",id:5121,tag:"ar-DZ"},"ar-bh":{language:"Arabic",location:"Bahrain",id:15361,tag:"ar-BH"},"ar-td":{language:"Arabic",location:"Chad",id:4096,tag:"ar-TD"},"ar-km":{language:"Arabic",location:"Comoros",id:4096,tag:"ar-KM"},"ar-dj":{language:"Arabic",location:"Djibouti",id:4096,tag:"ar-DJ"},"ar-eg":{language:"Arabic",location:"Egypt",id:3073,tag:"ar-EG"},"ar-er":{language:"Arabic",location:"Eritrea",id:4096,tag:"ar-ER"},"ar-iq":{language:"Arabic",location:"Iraq",id:2049,tag:"ar-IQ"},"ar-il":{language:"Arabic",location:"Israel",id:4096,tag:"ar-IL"},"ar-jo":{language:"Arabic",location:"Jordan",id:11265,tag:"ar-JO"},"ar-kw":{language:"Arabic",location:"Kuwait",id:13313,tag:"ar-KW"},"ar-lb":{language:"Arabic",location:"Lebanon",id:12289,tag:"ar-LB"},"ar-ly":{language:"Arabic",location:"Libya",id:4097,tag:"ar-LY"},"ar-mr":{language:"Arabic",location:"Mauritania",id:4096,tag:"ar-MR"},"ar-ma":{language:"Arabic",location:"Morocco",id:6145,tag:"ar-MA"},"ar-om":{language:"Arabic",location:"Oman",id:8193,tag:"ar-OM"},"ar-ps":{language:"Arabic",location:"Palestinian Authority",id:4096,tag:"ar-PS"},"ar-qa":{language:"Arabic",location:"Qatar",id:16385,tag:"ar-QA"},"ar-sa":{language:"Arabic",location:"Saudi Arabia",id:1025,tag:"ar-SA"},"ar-so":{language:"Arabic",location:"Somalia",id:4096,tag:"ar-SO"},"ar-ss":{language:"Arabic",location:"South Sudan",id:4096,tag:"ar-SS"},"ar-sd":{language:"Arabic",location:"Sudan",id:4096,tag:"ar-SD"},"ar-sy":{language:"Arabic",location:"Syria",id:10241,tag:"ar-SY"},"ar-tn":{language:"Arabic",location:"Tunisia",id:7169,tag:"ar-TN"},"ar-ae":{language:"Arabic",location:"U.A.E.",id:14337,tag:"ar-AE"},"ar-001":{language:"Arabic",location:"World",id:4096,tag:"ar-001"},"ar-ye":{language:"Arabic",location:"Yemen",id:9217,tag:"ar-YE"},hy:{language:"Armenian",location:null,id:43,tag:"hy"},"hy-am":{language:"Armenian",location:"Armenia",id:1067,tag:"hy-AM"},as:{language:"Assamese",location:null,id:77,tag:"as"},"as-in":{language:"Assamese",location:"India",id:1101,tag:"as-IN"},ast:{language:"Asturian",location:null,id:4096,tag:"ast"},"ast-es":{language:"Asturian",location:"Spain",id:4096,tag:"ast-ES"},asa:{language:"Asu",location:null,id:4096,tag:"asa"},"asa-tz":{language:"Asu",location:"Tanzania",id:4096,tag:"asa-TZ"},"az-cyrl":{language:"Azerbaijani (Cyrillic)",location:null,id:29740,tag:"az-Cyrl",version:"Windows 7"},"az-cyrl-az":{language:"Azerbaijani (Cyrillic)",location:"Azerbaijan",id:2092,tag:"az-Cyrl-AZ"},az:{language:"Azerbaijani (Latin)",location:null,id:44,tag:"az"},"az-latn":{language:"Azerbaijani (Latin)",location:null,id:30764,tag:"az-Latn",version:"Windows 7"},"az-latn-az":{language:"Azerbaijani (Latin)",location:"Azerbaijan",id:1068,tag:"az-Latn-AZ"},ksf:{language:"Bafia",location:null,id:4096,tag:"ksf"},"ksf-cm":{language:"Bafia",location:"Cameroon",id:4096,tag:"ksf-CM"},bm:{language:"Bamanankan",location:null,id:4096,tag:"bm"},"bm-latn-ml":{language:"Bamanankan (Latin)",location:"Mali",id:4096,tag:"bm-Latn-ML"},bn:{language:"Bangla",location:null,id:69,tag:"bn"},"bn-bd":{language:"Bangla",location:"Bangladesh",id:2117,tag:"bn-BD"},"bn-in":{language:"Bangla",location:"India",id:1093,tag:"bn-IN"},bas:{language:"Basaa",location:null,id:4096,tag:"bas"},"bas-cm":{language:"Basaa",location:"Cameroon",id:4096,tag:"bas-CM"},ba:{language:"Bashkir",location:null,id:109,tag:"ba"},"ba-ru":{language:"Bashkir",location:"Russia",id:1133,tag:"ba-RU"},eu:{language:"Basque",location:null,id:45,tag:"eu"},"eu-es":{language:"Basque",location:"Spain",id:1069,tag:"eu-ES"},be:{language:"Belarusian",location:null,id:35,tag:"be"},"be-by":{language:"Belarusian",location:"Belarus",id:1059,tag:"be-BY"},bem:{language:"Bemba",location:null,id:4096,tag:"bem"},"bem-zm":{language:"Bemba",location:"Zambia",id:4096,tag:"bem-ZM"},bez:{language:"Bena",location:null,id:4096,tag:"bez"},"bez-tz":{language:"Bena",location:"Tanzania",id:4096,tag:"bez-TZ"},byn:{language:"Blin",location:null,id:4096,tag:"byn"},"byn-er":{language:"Blin",location:"Eritrea",id:4096,tag:"byn-ER"},brx:{language:"Bodo",location:null,id:4096,tag:"brx"},"brx-in":{language:"Bodo",location:"India",id:4096,tag:"brx-IN"},"bs-cyrl":{language:"Bosnian (Cyrillic)",location:null,id:25626,tag:"bs-Cyrl",version:"Windows 7"},"bs-cyrl-ba":{language:"Bosnian (Cyrillic)",location:"Bosnia and Herzegovina",id:8218,tag:"bs-Cyrl-BA"},"bs-latn":{language:"Bosnian (Latin)",location:null,id:26650,tag:"bs-Latn",version:"Windows 7"},bs:{language:"Bosnian (Latin)",location:null,id:30746,tag:"bs"},"bs-latn-ba":{language:"Bosnian (Latin)",location:"Bosnia and Herzegovina",id:5146,tag:"bs-Latn-BA"},br:{language:"Breton",location:null,id:126,tag:"br"},"br-fr":{language:"Breton",location:"France",id:1150,tag:"br-FR"},bg:{language:"Bulgarian",location:null,id:2,tag:"bg"},"bg-bg":{language:"Bulgarian",location:"Bulgaria",id:1026,tag:"bg-BG"},my:{language:"Burmese",location:null,id:85,tag:"my"},"my-mm":{language:"Burmese",location:"Myanmar",id:1109,tag:"my-MM"},ca:{language:"Catalan",location:null,id:3,tag:"ca"},"ca-ad":{language:"Catalan",location:"Andorra",id:4096,tag:"ca-AD"},"ca-fr":{language:"Catalan",location:"France",id:4096,tag:"ca-FR"},"ca-it":{language:"Catalan",location:"Italy",id:4096,tag:"ca-IT"},"ca-es":{language:"Catalan",location:"Spain",id:1027,tag:"ca-ES"},ceb:{language:"Cebuano",location:null,id:4096,tag:"ceb"},"ceb-latn":{language:"Cebuan (Latin)",location:null,id:4096,tag:"ceb-Latn"},"ceb-latn-ph":{language:"Cebuan (Latin)",location:"Philippines",id:4096,tag:"ceb-Latn-PH"},"tzm-latn-":{language:"Central Atlas Tamazight (Latin)",location:"Morocco",id:4096,tag:"tzm-Latn-"},ku:{language:"Central Kurdish",location:null,id:146,tag:"ku"},"ku-arab":{language:"Central Kurdish",location:null,id:31890,tag:"ku-Arab"},"ku-arab-iq":{language:"Central Kurdish",location:"Iraq",id:1170,tag:"ku-Arab-IQ"},ccp:{language:"Chakma",location:null,id:4096,tag:"ccp"},"ccp-cakm":{language:"Chakma",location:"Chakma",id:4096,tag:"ccp-Cakm"},"ccp-cakm-":{language:"Chakma",location:"India",id:4096,tag:"ccp-Cakm-"},"cd-ru":{language:"Chechen",location:"Russia",id:4096,tag:"cd-RU"},chr:{language:"Cherokee",location:null,id:92,tag:"chr"},"chr-cher":{language:"Cherokee",location:null,id:31836,tag:"chr-Cher"},"chr-cher-us":{language:"Cherokee",location:"United States",id:1116,tag:"chr-Cher-US"},cgg:{language:"Chiga",location:null,id:4096,tag:"cgg"},"cgg-ug":{language:"Chiga",location:"Uganda",id:4096,tag:"cgg-UG"},"zh-hans":{language:"Chinese (Simplified)",location:null,id:4,tag:"zh-Hans"},zh:{language:"Chinese (Simplified)",location:null,id:30724,tag:"zh",version:"Windows 7"},"zh-cn":{language:"Chinese (Simplified)",location:"People's Republic of China",id:2052,tag:"zh-CN"},"zh-sg":{language:"Chinese (Simplified)",location:"Singapore",id:4100,tag:"zh-SG"},"zh-hant":{language:"Chinese (Traditional)",location:null,id:31748,tag:"zh-Hant"},"zh-hk":{language:"Chinese (Traditional)",location:"Hong Kong S.A.R.",id:3076,tag:"zh-HK"},"zh-mo":{language:"Chinese (Traditional)",location:"Macao S.A.R.",id:5124,tag:"zh-MO"},"zh-tw":{language:"Chinese (Traditional)",location:"Taiwan",id:1028,tag:"zh-TW"},"cu-ru":{language:"Church Slavic",location:"Russia",id:4096,tag:"cu-RU"},swc:{language:"Congo Swahili",location:null,id:4096,tag:"swc"},"swc-cd":{language:"Congo Swahili",location:"Congo DRC",id:4096,tag:"swc-CD"},kw:{language:"Cornish",location:null,id:4096,tag:"kw"},"kw-gb":{language:"Cornish",location:"United Kingdom",id:4096,tag:"kw-GB"},co:{language:"Corsican",location:null,id:131,tag:"co"},"co-fr":{language:"Corsican",location:"France",id:1155,tag:"co-FR"},hr:{language:"Croatian",location:null,id:26,tag:"hr"},"hr-hr":{language:"Croatian",location:"Croatia",id:1050,tag:"hr-HR"},"hr-ba":{language:"Croatian (Latin)",location:"Bosnia and Herzegovina",id:4122,tag:"hr-BA"},cs:{language:"Czech",location:null,id:5,tag:"cs"},"cs-cz":{language:"Czech",location:"Czech Republic",id:1029,tag:"cs-CZ"},da:{language:"Danish",location:null,id:6,tag:"da"},"da-dk":{language:"Danish",location:"Denmark",id:1030,tag:"da-DK"},"da-gl":{language:"Danish",location:"Greenland",id:4096,tag:"da-GL"},prs:{language:"Dari",location:null,id:140,tag:"prs"},"prs-af":{language:"Dari",location:"Afghanistan",id:1164,tag:"prs-AF"},dv:{language:"Divehi",location:null,id:101,tag:"dv"},"dv-mv":{language:"Divehi",location:"Maldives",id:1125,tag:"dv-MV"},dua:{language:"Duala",location:null,id:4096,tag:"dua"},"dua-cm":{language:"Duala",location:"Cameroon",id:4096,tag:"dua-CM"},nl:{language:"Dutch",location:null,id:19,tag:"nl"},"nl-aw":{language:"Dutch",location:"Aruba",id:4096,tag:"nl-AW"},"nl-be":{language:"Dutch",location:"Belgium",id:2067,tag:"nl-BE"},"nl-bq":{language:"Dutch",location:"Bonaire, Sint Eustatius and Saba",id:4096,tag:"nl-BQ"},"nl-cw":{language:"Dutch",location:"Curaçao",id:4096,tag:"nl-CW"},"nl-nl":{language:"Dutch",location:"Netherlands",id:1043,tag:"nl-NL"},"nl-sx":{language:"Dutch",location:"Sint Maarten",id:4096,tag:"nl-SX"},"nl-sr":{language:"Dutch",location:"Suriname",id:4096,tag:"nl-SR"},dz:{language:"Dzongkha",location:null,id:4096,tag:"dz"},"dz-bt":{language:"Dzongkha",location:"Bhutan",id:3153,tag:"dz-BT"},ebu:{language:"Embu",location:null,id:4096,tag:"ebu"},"ebu-ke":{language:"Embu",location:"Kenya",id:4096,tag:"ebu-KE"},en:{language:"English",location:null,id:9,tag:"en"},"en-as":{language:"English",location:"American Samoa",id:4096,tag:"en-AS"},"en-ai":{language:"English",location:"Anguilla",id:4096,tag:"en-AI"},"en-ag":{language:"English",location:"Antigua and Barbuda",id:4096,tag:"en-AG"},"en-au":{language:"English",location:"Australia",id:3081,tag:"en-AU"},"en-at":{language:"English",location:"Austria",id:4096,tag:"en-AT"},"en-bs":{language:"English",location:"Bahamas",id:4096,tag:"en-BS"},"en-bb":{language:"English",location:"Barbados",id:4096,tag:"en-BB"},"en-be":{language:"English",location:"Belgium",id:4096,tag:"en-BE"},"en-bz":{language:"English",location:"Belize",id:10249,tag:"en-BZ"},"en-bm":{language:"English",location:"Bermuda",id:4096,tag:"en-BM"},"en-bw":{language:"English",location:"Botswana",id:4096,tag:"en-BW"},"en-io":{language:"English",location:"British Indian Ocean Territory",id:4096,tag:"en-IO"},"en-vg":{language:"English",location:"British Virgin Islands",id:4096,tag:"en-VG"},"en-bi":{language:"English",location:"Burundi",id:4096,tag:"en-BI"},"en-cm":{language:"English",location:"Cameroon",id:4096,tag:"en-CM"},"en-ca":{language:"English",location:"Canada",id:4105,tag:"en-CA"},"en-029":{language:"English",location:"Caribbean",id:9225,tag:"en-029"},"en-ky":{language:"English",location:"Cayman Islands",id:4096,tag:"en-KY"},"en-cx":{language:"English",location:"Christmas Island",id:4096,tag:"en-CX"},"en-cc":{language:"English",location:"Cocos [Keeling] Islands",id:4096,tag:"en-CC"},"en-ck":{language:"English",location:"Cook Islands",id:4096,tag:"en-CK"},"en-cy":{language:"English",location:"Cyprus",id:4096,tag:"en-CY"},"en-dk":{language:"English",location:"Denmark",id:4096,tag:"en-DK"},"en-dm":{language:"English",location:"Dominica",id:4096,tag:"en-DM"},"en-er":{language:"English",location:"Eritrea",id:4096,tag:"en-ER"},"en-150":{language:"English",location:"Europe",id:4096,tag:"en-150"},"en-fk":{language:"English",location:"Falkland Islands",id:4096,tag:"en-FK"},"en-fi":{language:"English",location:"Finland",id:4096,tag:"en-FI"},"en-fj":{language:"English",location:"Fiji",id:4096,tag:"en-FJ"},"en-gm":{language:"English",location:"Gambia",id:4096,tag:"en-GM"},"en-de":{language:"English",location:"Germany",id:4096,tag:"en-DE"},"en-gh":{language:"English",location:"Ghana",id:4096,tag:"en-GH"},"en-gi":{language:"English",location:"Gibraltar",id:4096,tag:"en-GI"},"en-gd":{language:"English",location:"Grenada",id:4096,tag:"en-GD"},"en-gu":{language:"English",location:"Guam",id:4096,tag:"en-GU"},"en-gg":{language:"English",location:"Guernsey",id:4096,tag:"en-GG"},"en-gy":{language:"English",location:"Guyana",id:4096,tag:"en-GY"},"en-hk":{language:"English",location:"Hong Kong",id:15369,tag:"en-HK"},"en-in":{language:"English",location:"India",id:16393,tag:"en-IN"},"en-ie":{language:"English",location:"Ireland",id:6153,tag:"en-IE"},"en-im":{language:"English",location:"Isle of Man",id:4096,tag:"en-IM"},"en-il":{language:"English",location:"Israel",id:4096,tag:"en-IL"},"en-jm":{language:"English",location:"Jamaica",id:8201,tag:"en-JM"},"en-je":{language:"English",location:"Jersey",id:4096,tag:"en-JE"},"en-ke":{language:"English",location:"Kenya",id:4096,tag:"en-KE"},"en-ki":{language:"English",location:"Kiribati",id:4096,tag:"en-KI"},"en-ls":{language:"English",location:"Lesotho",id:4096,tag:"en-LS"},"en-lr":{language:"English",location:"Liberia",id:4096,tag:"en-LR"},"en-mo":{language:"English",location:"Macao SAR",id:4096,tag:"en-MO"},"en-mg":{language:"English",location:"Madagascar",id:4096,tag:"en-MG"},"en-mw":{language:"English",location:"Malawi",id:4096,tag:"en-MW"},"en-my":{language:"English",location:"Malaysia",id:17417,tag:"en-MY"},"en-mt":{language:"English",location:"Malta",id:4096,tag:"en-MT"},"en-mh":{language:"English",location:"Marshall Islands",id:4096,tag:"en-MH"},"en-mu":{language:"English",location:"Mauritius",id:4096,tag:"en-MU"},"en-fm":{language:"English",location:"Micronesia",id:4096,tag:"en-FM"},"en-ms":{language:"English",location:"Montserrat",id:4096,tag:"en-MS"},"en-na":{language:"English",location:"Namibia",id:4096,tag:"en-NA"},"en-nr":{language:"English",location:"Nauru",id:4096,tag:"en-NR"},"en-nl":{language:"English",location:"Netherlands",id:4096,tag:"en-NL"},"en-nz":{language:"English",location:"New Zealand",id:5129,tag:"en-NZ"},"en-ng":{language:"English",location:"Nigeria",id:4096,tag:"en-NG"},"en-nu":{language:"English",location:"Niue",id:4096,tag:"en-NU"},"en-nf":{language:"English",location:"Norfolk Island",id:4096,tag:"en-NF"},"en-mp":{language:"English",location:"Northern Mariana Islands",id:4096,tag:"en-MP"},"en-pk":{language:"English",location:"Pakistan",id:4096,tag:"en-PK"},"en-pw":{language:"English",location:"Palau",id:4096,tag:"en-PW"},"en-pg":{language:"English",location:"Papua New Guinea",id:4096,tag:"en-PG"},"en-pn":{language:"English",location:"Pitcairn Islands",id:4096,tag:"en-PN"},"en-pr":{language:"English",location:"Puerto Rico",id:4096,tag:"en-PR"},"en-ph":{language:"English",location:"Republic of the Philippines",id:13321,tag:"en-PH"},"en-rw":{language:"English",location:"Rwanda",id:4096,tag:"en-RW"},"en-kn":{language:"English",location:"Saint Kitts and Nevis",id:4096,tag:"en-KN"},"en-lc":{language:"English",location:"Saint Lucia",id:4096,tag:"en-LC"},"en-vc":{language:"English",location:"Saint Vincent and the Grenadines",id:4096,tag:"en-VC"},"en-ws":{language:"English",location:"Samoa",id:4096,tag:"en-WS"},"en-sc":{language:"English",location:"Seychelles",id:4096,tag:"en-SC"},"en-sl":{language:"English",location:"Sierra Leone",id:4096,tag:"en-SL"},"en-sg":{language:"English",location:"Singapore",id:18441,tag:"en-SG"},"en-sx":{language:"English",location:"Sint Maarten",id:4096,tag:"en-SX"},"en-si":{language:"English",location:"Slovenia",id:4096,tag:"en-SI"},"en-sb":{language:"English",location:"Solomon Islands",id:4096,tag:"en-SB"},"en-za":{language:"English",location:"South Africa",id:7177,tag:"en-ZA"},"en-ss":{language:"English",location:"South Sudan",id:4096,tag:"en-SS"},"en-sh":{language:"English",location:"St Helena, Ascension, Tristan da Cunha",id:4096,tag:"en-SH"},"en-sd":{language:"English",location:"Sudan",id:4096,tag:"en-SD"},"en-sz":{language:"English",location:"Swaziland",id:4096,tag:"en-SZ"},"en-se":{language:"English",location:"Sweden",id:4096,tag:"en-SE"},"en-ch":{language:"English",location:"Switzerland",id:4096,tag:"en-CH"},"en-tz":{language:"English",location:"Tanzania",id:4096,tag:"en-TZ"},"en-tk":{language:"English",location:"Tokelau",id:4096,tag:"en-TK"},"en-to":{language:"English",location:"Tonga",id:4096,tag:"en-TO"},"en-tt":{language:"English",location:"Trinidad and Tobago",id:11273,tag:"en-TT"},"en-tc":{language:"English",location:"Turks and Caicos Islands",id:4096,tag:"en-TC"},"en-tv":{language:"English",location:"Tuvalu",id:4096,tag:"en-TV"},"en-ug":{language:"English",location:"Uganda",id:4096,tag:"en-UG"},"en-ae":{language:"English",location:"United Arab Emirates",id:19465,tag:"en-AE"},"en-gb":{language:"English",location:"United Kingdom",id:2057,tag:"en-GB"},"en-us":{language:"English",location:"United States",id:1033,tag:"en-US"},"en-um":{language:"English",location:"US Minor Outlying Islands",id:4096,tag:"en-UM"},"en-vi":{language:"English",location:"US Virgin Islands",id:4096,tag:"en-VI"},"en-vu":{language:"English",location:"Vanuatu",id:4096,tag:"en-VU"},"en-001":{language:"English",location:"World",id:4096,tag:"en-001"},"en-zm":{language:"English",location:"Zambia",id:4096,tag:"en-ZM"},"en-zw":{language:"English",location:"Zimbabwe",id:12297,tag:"en-ZW"},eo:{language:"Esperanto",location:null,id:4096,tag:"eo"},"eo-001":{language:"Esperanto",location:"World",id:4096,tag:"eo-001"},et:{language:"Estonian",location:null,id:37,tag:"et"},"et-ee":{language:"Estonian",location:"Estonia",id:1061,tag:"et-EE"},ee:{language:"Ewe",location:null,id:4096,tag:"ee"},"ee-gh":{language:"Ewe",location:"Ghana",id:4096,tag:"ee-GH"},"ee-tg":{language:"Ewe",location:"Togo",id:4096,tag:"ee-TG"},ewo:{language:"Ewondo",location:null,id:4096,tag:"ewo"},"ewo-cm":{language:"Ewondo",location:"Cameroon",id:4096,tag:"ewo-CM"},fo:{language:"Faroese",location:null,id:56,tag:"fo"},"fo-dk":{language:"Faroese",location:"Denmark",id:4096,tag:"fo-DK"},"fo-fo":{language:"Faroese",location:"Faroe Islands",id:1080,tag:"fo-FO"},fil:{language:"Filipino",location:null,id:100,tag:"fil"},"fil-ph":{language:"Filipino",location:"Philippines",id:1124,tag:"fil-PH"},fi:{language:"Finnish",location:null,id:11,tag:"fi"},"fi-fi":{language:"Finnish",location:"Finland",id:1035,tag:"fi-FI"},fr:{language:"French",location:null,id:12,tag:"fr"},"fr-dz":{language:"French",location:"Algeria",id:4096,tag:"fr-DZ"},"fr-be":{language:"French",location:"Belgium",id:2060,tag:"fr-BE"},"fr-bj":{language:"French",location:"Benin",id:4096,tag:"fr-BJ"},"fr-bf":{language:"French",location:"Burkina Faso",id:4096,tag:"fr-BF"},"fr-bi":{language:"French",location:"Burundi",id:4096,tag:"fr-BI"},"fr-cm":{language:"French",location:"Cameroon",id:11276,tag:"fr-CM"},"fr-ca":{language:"French",location:"Canada",id:3084,tag:"fr-CA"},"fr-cf":{language:"French",location:"Central African Republic",id:4096,tag:"fr-CF",version:"Release10"},"fr-td":{language:"French",location:"Chad",id:4096,tag:"fr-TD"},"fr-km":{language:"French",location:"Comoros",id:4096,tag:"fr-KM"},"fr-cg":{language:"French",location:"Congo",id:4096,tag:"fr-CG"},"fr-cd":{language:"French",location:"Congo, DRC",id:9228,tag:"fr-CD"},"fr-ci":{language:"French",location:"Côte d'Ivoire",id:12300,tag:"fr-CI"},"fr-dj":{language:"French",location:"Djibouti",id:4096,tag:"fr-DJ"},"fr-gq":{language:"French",location:"Equatorial Guinea",id:4096,tag:"fr-GQ"},"fr-fr":{language:"French",location:"France",id:1036,tag:"fr-FR"},"fr-gf":{language:"French",location:"French Guiana",id:4096,tag:"fr-GF"},"fr-pf":{language:"French",location:"French Polynesia",id:4096,tag:"fr-PF"},"fr-ga":{language:"French",location:"Gabon",id:4096,tag:"fr-GA"},"fr-gp":{language:"French",location:"Guadeloupe",id:4096,tag:"fr-GP"},"fr-gn":{language:"French",location:"Guinea",id:4096,tag:"fr-GN"},"fr-ht":{language:"French",location:"Haiti",id:15372,tag:"fr-HT"},"fr-lu":{language:"French",location:"Luxembourg",id:5132,tag:"fr-LU"},"fr-mg":{language:"French",location:"Madagascar",id:4096,tag:"fr-MG"},"fr-ml":{language:"French",location:"Mali",id:13324,tag:"fr-ML"},"fr-mq":{language:"French",location:"Martinique",id:4096,tag:"fr-MQ"},"fr-mr":{language:"French",location:"Mauritania",id:4096,tag:"fr-MR"},"fr-mu":{language:"French",location:"Mauritius",id:4096,tag:"fr-MU"},"fr-yt":{language:"French",location:"Mayotte",id:4096,tag:"fr-YT"},"fr-ma":{language:"French",location:"Morocco",id:14348,tag:"fr-MA"},"fr-nc":{language:"French",location:"New Caledonia",id:4096,tag:"fr-NC"},"fr-ne":{language:"French",location:"Niger",id:4096,tag:"fr-NE"},"fr-mc":{language:"French",location:"Principality of Monaco",id:6156,tag:"fr-MC"},"fr-re":{language:"French",location:"Reunion",id:8204,tag:"fr-RE"},"fr-rw":{language:"French",location:"Rwanda",id:4096,tag:"fr-RW"},"fr-bl":{language:"French",location:"Saint Barthélemy",id:4096,tag:"fr-BL"},"fr-mf":{language:"French",location:"Saint Martin",id:4096,tag:"fr-MF"},"fr-pm":{language:"French",location:"Saint Pierre and Miquelon",id:4096,tag:"fr-PM"},"fr-sn":{language:"French",location:"Senegal",id:10252,tag:"fr-SN"},"fr-sc":{language:"French",location:"Seychelles",id:4096,tag:"fr-SC"},"fr-ch":{language:"French",location:"Switzerland",id:4108,tag:"fr-CH"},"fr-sy":{language:"French",location:"Syria",id:4096,tag:"fr-SY"},"fr-tg":{language:"French",location:"Togo",id:4096,tag:"fr-TG"},"fr-tn":{language:"French",location:"Tunisia",id:4096,tag:"fr-TN"},"fr-vu":{language:"French",location:"Vanuatu",id:4096,tag:"fr-VU"},"fr-wf":{language:"French",location:"Wallis and Futuna",id:4096,tag:"fr-WF"},fy:{language:"Frisian",location:null,id:98,tag:"fy"},"fy-nl":{language:"Frisian",location:"Netherlands",id:1122,tag:"fy-NL"},fur:{language:"Friulian",location:null,id:4096,tag:"fur"},"fur-it":{language:"Friulian",location:"Italy",id:4096,tag:"fur-IT"},ff:{language:"Fulah",location:null,id:103,tag:"ff"},"ff-latn":{language:"Fulah (Latin)",location:null,id:31847,tag:"ff-Latn"},"ff-latn-bf":{language:"Fulah (Latin)",location:"Burkina Faso",id:4096,tag:"ff-Latn-BF"},"ff-cm":{language:"Fulah",location:"Cameroon",id:4096,tag:"ff-CM"},"ff-latn-cm":{language:"Fulah (Latin)",location:"Cameroon",id:4096,tag:"ff-Latn-CM"},"ff-latn-gm":{language:"Fulah (Latin)",location:"Gambia",id:4096,tag:"ff-Latn-GM"},"ff-latn-gh":{language:"Fulah (Latin)",location:"Ghana",id:4096,tag:"ff-Latn-GH"},"ff-gn":{language:"Fulah",location:"Guinea",id:4096,tag:"ff-GN"},"ff-latn-gn":{language:"Fulah (Latin)",location:"Guinea",id:4096,tag:"ff-Latn-GN"},"ff-latn-gw":{language:"Fulah (Latin)",location:"Guinea-Bissau",id:4096,tag:"ff-Latn-GW"},"ff-latn-lr":{language:"Fulah (Latin)",location:"Liberia",id:4096,tag:"ff-Latn-LR"},"ff-mr":{language:"Fulah",location:"Mauritania",id:4096,tag:"ff-MR"},"ff-latn-mr":{language:"Fulah (Latin)",location:"Mauritania",id:4096,tag:"ff-Latn-MR"},"ff-latn-ne":{language:"Fulah (Latin)",location:"Niger",id:4096,tag:"ff-Latn-NE"},"ff-ng":{language:"Fulah",location:"Nigeria",id:4096,tag:"ff-NG"},"ff-latn-ng":{language:"Fulah (Latin)",location:"Nigeria",id:4096,tag:"ff-Latn-NG"},"ff-latn-sn":{language:"Fulah",location:"Senegal",id:2151,tag:"ff-Latn-SN"},"ff-latn-sl":{language:"Fulah (Latin)",location:"Sierra Leone",id:4096,tag:"ff-Latn-SL"},gl:{language:"Galician",location:null,id:86,tag:"gl"},"gl-es":{language:"Galician",location:"Spain",id:1110,tag:"gl-ES"},lg:{language:"Ganda",location:null,id:4096,tag:"lg"},"lg-ug":{language:"Ganda",location:"Uganda",id:4096,tag:"lg-UG"},ka:{language:"Georgian",location:null,id:55,tag:"ka"},"ka-ge":{language:"Georgian",location:"Georgia",id:1079,tag:"ka-GE"},de:{language:"German",location:null,id:7,tag:"de"},"de-at":{language:"German",location:"Austria",id:3079,tag:"de-AT"},"de-be":{language:"German",location:"Belgium",id:4096,tag:"de-BE"},"de-de":{language:"German",location:"Germany",id:1031,tag:"de-DE"},"de-it":{language:"German",location:"Italy",id:4096,tag:"de-IT"},"de-li":{language:"German",location:"Liechtenstein",id:5127,tag:"de-LI"},"de-lu":{language:"German",location:"Luxembourg",id:4103,tag:"de-LU"},"de-ch":{language:"German",location:"Switzerland",id:2055,tag:"de-CH"},el:{language:"Greek",location:null,id:8,tag:"el"},"el-cy":{language:"Greek",location:"Cyprus",id:4096,tag:"el-CY"},"el-gr":{language:"Greek",location:"Greece",id:1032,tag:"el-GR"},kl:{language:"Greenlandic",location:null,id:111,tag:"kl"},"kl-gl":{language:"Greenlandic",location:"Greenland",id:1135,tag:"kl-GL"},gn:{language:"Guarani",location:null,id:116,tag:"gn"},"gn-py":{language:"Guarani",location:"Paraguay",id:1140,tag:"gn-PY"},gu:{language:"Gujarati",location:null,id:71,tag:"gu"},"gu-in":{language:"Gujarati",location:"India",id:1095,tag:"gu-IN"},guz:{language:"Gusii",location:null,id:4096,tag:"guz"},"guz-ke":{language:"Gusii",location:"Kenya",id:4096,tag:"guz-KE"},ha:{language:"Hausa (Latin)",location:null,id:104,tag:"ha"},"ha-latn":{language:"Hausa (Latin)",location:null,id:31848,tag:"ha-Latn",version:"Windows 7"},"ha-latn-gh":{language:"Hausa (Latin)",location:"Ghana",id:4096,tag:"ha-Latn-GH"},"ha-latn-ne":{language:"Hausa (Latin)",location:"Niger",id:4096,tag:"ha-Latn-NE"},"ha-latn-ng":{language:"Hausa (Latin)",location:"Nigeria",id:1128,tag:"ha-Latn-NG"},haw:{language:"Hawaiian",location:null,id:117,tag:"haw"},"haw-us":{language:"Hawaiian",location:"United States",id:1141,tag:"haw-US"},he:{language:"Hebrew",location:null,id:13,tag:"he"},"he-il":{language:"Hebrew",location:"Israel",id:1037,tag:"he-IL"},hi:{language:"Hindi",location:null,id:57,tag:"hi"},"hi-in":{language:"Hindi",location:"India",id:1081,tag:"hi-IN"},hu:{language:"Hungarian",location:null,id:14,tag:"hu"},"hu-hu":{language:"Hungarian",location:"Hungary",id:1038,tag:"hu-HU"},is:{language:"Icelandic",location:null,id:15,tag:"is"},"is-is":{language:"Icelandic",location:"Iceland",id:1039,tag:"is-IS"},ig:{language:"Igbo",location:null,id:112,tag:"ig"},"ig-ng":{language:"Igbo",location:"Nigeria",id:1136,tag:"ig-NG"},id:{language:"Indonesian",location:null,id:33,tag:"id"},"id-id":{language:"Indonesian",location:"Indonesia",id:1057,tag:"id-ID"},ia:{language:"Interlingua",location:null,id:4096,tag:"ia"},"ia-fr":{language:"Interlingua",location:"France",id:4096,tag:"ia-FR"},"ia-001":{language:"Interlingua",location:"World",id:4096,tag:"ia-001"},iu:{language:"Inuktitut (Latin)",location:null,id:93,tag:"iu"},"iu-latn":{language:"Inuktitut (Latin)",location:null,id:31837,tag:"iu-Latn",version:"Windows 7"},"iu-latn-ca":{language:"Inuktitut (Latin)",location:"Canada",id:2141,tag:"iu-Latn-CA"},"iu-cans":{language:"Inuktitut (Syllabics)",location:null,id:30813,tag:"iu-Cans",version:"Windows 7"},"iu-cans-ca":{language:"Inuktitut (Syllabics)",location:"Canada",id:1117,tag:"iu-Cans-CA"},ga:{language:"Irish",location:null,id:60,tag:"ga",version:"Windows 7"},"ga-ie":{language:"Irish",location:"Ireland",id:2108,tag:"ga-IE"},it:{language:"Italian",location:null,id:16,tag:"it"},"it-it":{language:"Italian",location:"Italy",id:1040,tag:"it-IT"},"it-sm":{language:"Italian",location:"San Marino",id:4096,tag:"it-SM"},"it-ch":{language:"Italian",location:"Switzerland",id:2064,tag:"it-CH"},"it-va":{language:"Italian",location:"Vatican City",id:4096,tag:"it-VA"},ja:{language:"Japanese",location:null,id:17,tag:"ja"},"ja-jp":{language:"Japanese",location:"Japan",id:1041,tag:"ja-JP"},jv:{language:"Javanese",location:null,id:4096,tag:"jv"},"jv-latn":{language:"Javanese",location:"Latin",id:4096,tag:"jv-Latn"},"jv-latn-id":{language:"Javanese",location:"Latin, Indonesia",id:4096,tag:"jv-Latn-ID"},dyo:{language:"Jola-Fonyi",location:null,id:4096,tag:"dyo"},"dyo-sn":{language:"Jola-Fonyi",location:"Senegal",id:4096,tag:"dyo-SN"},kea:{language:"Kabuverdianu",location:null,id:4096,tag:"kea"},"kea-cv":{language:"Kabuverdianu",location:"Cabo Verde",id:4096,tag:"kea-CV"},kab:{language:"Kabyle",location:null,id:4096,tag:"kab"},"kab-dz":{language:"Kabyle",location:"Algeria",id:4096,tag:"kab-DZ"},kkj:{language:"Kako",location:null,id:4096,tag:"kkj"},"kkj-cm":{language:"Kako",location:"Cameroon",id:4096,tag:"kkj-CM"},kln:{language:"Kalenjin",location:null,id:4096,tag:"kln"},"kln-ke":{language:"Kalenjin",location:"Kenya",id:4096,tag:"kln-KE"},kam:{language:"Kamba",location:null,id:4096,tag:"kam"},"kam-ke":{language:"Kamba",location:"Kenya",id:4096,tag:"kam-KE"},kn:{language:"Kannada",location:null,id:75,tag:"kn"},"kn-in":{language:"Kannada",location:"India",id:1099,tag:"kn-IN"},ks:{language:"Kashmiri",location:null,id:96,tag:"ks"},"ks-arab":{language:"Kashmiri",location:"Perso-Arabic",id:1120,tag:"ks-Arab"},"ks-arab-in":{language:"Kashmiri",location:"Perso-Arabic",id:4096,tag:"ks-Arab-IN"},kk:{language:"Kazakh",location:null,id:63,tag:"kk"},"kk-kz":{language:"Kazakh",location:"Kazakhstan",id:1087,tag:"kk-KZ"},km:{language:"Khmer",location:null,id:83,tag:"km"},"km-kh":{language:"Khmer",location:"Cambodia",id:1107,tag:"km-KH"},quc:{language:"K'iche",location:null,id:134,tag:"quc"},"quc-latn-gt":{language:"K'iche",location:"Guatemala",id:1158,tag:"quc-Latn-GT"},ki:{language:"Kikuyu",location:null,id:4096,tag:"ki"},"ki-ke":{language:"Kikuyu",location:"Kenya",id:4096,tag:"ki-KE"},rw:{language:"Kinyarwanda",location:null,id:135,tag:"rw"},"rw-rw":{language:"Kinyarwanda",location:"Rwanda",id:1159,tag:"rw-RW"},sw:{language:"Kiswahili",location:null,id:65,tag:"sw"},"sw-ke":{language:"Kiswahili",location:"Kenya",id:1089,tag:"sw-KE"},"sw-tz":{language:"Kiswahili",location:"Tanzania",id:4096,tag:"sw-TZ"},"sw-ug":{language:"Kiswahili",location:"Uganda",id:4096,tag:"sw-UG"},kok:{language:"Konkani",location:null,id:87,tag:"kok"},"kok-in":{language:"Konkani",location:"India",id:1111,tag:"kok-IN"},ko:{language:"Korean",location:null,id:18,tag:"ko"},"ko-kr":{language:"Korean",location:"Korea",id:1042,tag:"ko-KR"},"ko-kp":{language:"Korean",location:"North Korea",id:4096,tag:"ko-KP"},khq:{language:"Koyra Chiini",location:null,id:4096,tag:"khq"},"khq-ml":{language:"Koyra Chiini",location:"Mali",id:4096,tag:"khq-ML"},ses:{language:"Koyraboro Senni",location:null,id:4096,tag:"ses"},"ses-ml":{language:"Koyraboro Senni",location:"Mali",id:4096,tag:"ses-ML"},nmg:{language:"Kwasio",location:null,id:4096,tag:"nmg"},"nmg-cm":{language:"Kwasio",location:"Cameroon",id:4096,tag:"nmg-CM"},ky:{language:"Kyrgyz",location:null,id:64,tag:"ky"},"ky-kg":{language:"Kyrgyz",location:"Kyrgyzstan",id:1088,tag:"ky-KG"},"ku-arab-ir":{language:"Kurdish",location:"Perso-Arabic, Iran",id:4096,tag:"ku-Arab-IR"},lkt:{language:"Lakota",location:null,id:4096,tag:"lkt"},"lkt-us":{language:"Lakota",location:"United States",id:4096,tag:"lkt-US"},lag:{language:"Langi",location:null,id:4096,tag:"lag"},"lag-tz":{language:"Langi",location:"Tanzania",id:4096,tag:"lag-TZ"},lo:{language:"Lao",location:null,id:84,tag:"lo"},"lo-la":{language:"Lao",location:"Lao P.D.R.",id:1108,tag:"lo-LA"},lv:{language:"Latvian",location:null,id:38,tag:"lv"},"lv-lv":{language:"Latvian",location:"Latvia",id:1062,tag:"lv-LV"},ln:{language:"Lingala",location:null,id:4096,tag:"ln"},"ln-ao":{language:"Lingala",location:"Angola",id:4096,tag:"ln-AO"},"ln-cf":{language:"Lingala",location:"Central African Republic",id:4096,tag:"ln-CF"},"ln-cg":{language:"Lingala",location:"Congo",id:4096,tag:"ln-CG"},"ln-cd":{language:"Lingala",location:"Congo DRC",id:4096,tag:"ln-CD"},lt:{language:"Lithuanian",location:null,id:39,tag:"lt"},"lt-lt":{language:"Lithuanian",location:"Lithuania",id:1063,tag:"lt-LT"},nds:{language:"Low German",location:null,id:4096,tag:"nds"},"nds-de":{language:"Low German",location:"Germany",id:4096,tag:"nds-DE"},"nds-nl":{language:"Low German",location:"Netherlands",id:4096,tag:"nds-NL"},dsb:{language:"Lower Sorbian",location:null,id:31790,tag:"dsb",version:"Windows 7"},"dsb-de":{language:"Lower Sorbian",location:"Germany",id:2094,tag:"dsb-DE"},lu:{language:"Luba-Katanga",location:null,id:4096,tag:"lu"},"lu-cd":{language:"Luba-Katanga",location:"Congo DRC",id:4096,tag:"lu-CD"},luo:{language:"Luo",location:null,id:4096,tag:"luo"},"luo-ke":{language:"Luo",location:"Kenya",id:4096,tag:"luo-KE"},lb:{language:"Luxembourgish",location:null,id:110,tag:"lb"},"lb-lu":{language:"Luxembourgish",location:"Luxembourg",id:1134,tag:"lb-LU"},luy:{language:"Luyia",location:null,id:4096,tag:"luy"},"luy-ke":{language:"Luyia",location:"Kenya",id:4096,tag:"luy-KE"},mk:{language:"Macedonian",location:null,id:47,tag:"mk"},"mk-mk":{language:"Macedonian",location:"North Macedonia",id:1071,tag:"mk-MK"},jmc:{language:"Machame",location:null,id:4096,tag:"jmc"},"jmc-tz":{language:"Machame",location:"Tanzania",id:4096,tag:"jmc-TZ"},mgh:{language:"Makhuwa-Meetto",location:null,id:4096,tag:"mgh"},"mgh-mz":{language:"Makhuwa-Meetto",location:"Mozambique",id:4096,tag:"mgh-MZ"},kde:{language:"Makonde",location:null,id:4096,tag:"kde"},"kde-tz":{language:"Makonde",location:"Tanzania",id:4096,tag:"kde-TZ"},mg:{language:"Malagasy",location:null,id:4096,tag:"mg"},"mg-mg":{language:"Malagasy",location:"Madagascar",id:4096,tag:"mg-MG"},ms:{language:"Malay",location:null,id:62,tag:"ms"},"ms-bn":{language:"Malay",location:"Brunei Darussalam",id:2110,tag:"ms-BN"},"ms-my":{language:"Malay",location:"Malaysia",id:1086,tag:"ms-MY"},ml:{language:"Malayalam",location:null,id:76,tag:"ml"},"ml-in":{language:"Malayalam",location:"India",id:1100,tag:"ml-IN"},mt:{language:"Maltese",location:null,id:58,tag:"mt"},"mt-mt":{language:"Maltese",location:"Malta",id:1082,tag:"mt-MT"},gv:{language:"Manx",location:null,id:4096,tag:"gv"},"gv-im":{language:"Manx",location:"Isle of Man",id:4096,tag:"gv-IM"},mi:{language:"Maori",location:null,id:129,tag:"mi"},"mi-nz":{language:"Maori",location:"New Zealand",id:1153,tag:"mi-NZ"},arn:{language:"Mapudungun",location:null,id:122,tag:"arn"},"arn-cl":{language:"Mapudungun",location:"Chile",id:1146,tag:"arn-CL"},mr:{language:"Marathi",location:null,id:78,tag:"mr"},"mr-in":{language:"Marathi",location:"India",id:1102,tag:"mr-IN"},mas:{language:"Masai",location:null,id:4096,tag:"mas"},"mas-ke":{language:"Masai",location:"Kenya",id:4096,tag:"mas-KE"},"mas-tz":{language:"Masai",location:"Tanzania",id:4096,tag:"mas-TZ"},"mzn-ir":{language:"Mazanderani",location:"Iran",id:4096,tag:"mzn-IR"},mer:{language:"Meru",location:null,id:4096,tag:"mer"},"mer-ke":{language:"Meru",location:"Kenya",id:4096,tag:"mer-KE"},mgo:{language:"Meta'",location:null,id:4096,tag:"mgo"},"mgo-cm":{language:"Meta'",location:"Cameroon",id:4096,tag:"mgo-CM"},moh:{language:"Mohawk",location:null,id:124,tag:"moh"},"moh-ca":{language:"Mohawk",location:"Canada",id:1148,tag:"moh-CA"},mn:{language:"Mongolian (Cyrillic)",location:null,id:80,tag:"mn"},"mn-cyrl":{language:"Mongolian (Cyrillic)",location:null,id:30800,tag:"mn-Cyrl",version:"Windows 7"},"mn-mn":{language:"Mongolian (Cyrillic)",location:"Mongolia",id:1104,tag:"mn-MN"},"mn-mong":{language:"Mongolian (Traditional Mongolian)",location:null,id:31824,tag:"mn-Mong",version:"Windows 7"},"mn-mong-cn":{language:"Mongolian (Traditional Mongolian)",location:"People's Republic of China",id:2128,tag:"mn-Mong-CN",version:"Windows V"},"mn-mong-mn":{language:"Mongolian (Traditional Mongolian)",location:"Mongolia",id:3152,tag:"mn-Mong-MN",version:"Windows 7"},mfe:{language:"Morisyen",location:null,id:4096,tag:"mfe"},"mfe-mu":{language:"Morisyen",location:"Mauritius",id:4096,tag:"mfe-MU"},mua:{language:"Mundang",location:null,id:4096,tag:"mua"},"mua-cm":{language:"Mundang",location:"Cameroon",id:4096,tag:"mua-CM"},nqo:{language:"N'ko",location:null,id:4096,tag:"nqo"},"nqo-gn":{language:"N'ko",location:"Guinea",id:4096,tag:"nqo-GN"},naq:{language:"Nama",location:null,id:4096,tag:"naq"},"naq-na":{language:"Nama",location:"Namibia",id:4096,tag:"naq-NA"},ne:{language:"Nepali",location:null,id:97,tag:"ne"},"ne-in":{language:"Nepali",location:"India",id:2145,tag:"ne-IN"},"ne-np":{language:"Nepali",location:"Nepal",id:1121,tag:"ne-NP"},nnh:{language:"Ngiemboon",location:null,id:4096,tag:"nnh"},"nnh-cm":{language:"Ngiemboon",location:"Cameroon",id:4096,tag:"nnh-CM"},jgo:{language:"Ngomba",location:null,id:4096,tag:"jgo"},"jgo-cm":{language:"Ngomba",location:"Cameroon",id:4096,tag:"jgo-CM"},"lrc-iq":{language:"Northern Luri",location:"Iraq",id:4096,tag:"lrc-IQ"},"lrc-ir":{language:"Northern Luri",location:"Iran",id:4096,tag:"lrc-IR"},nd:{language:"North Ndebele",location:null,id:4096,tag:"nd"},"nd-zw":{language:"North Ndebele",location:"Zimbabwe",id:4096,tag:"nd-ZW"},no:{language:"Norwegian (Bokmal)",location:null,id:20,tag:"no"},nb:{language:"Norwegian (Bokmal)",location:null,id:31764,tag:"nb"},"nb-no":{language:"Norwegian (Bokmal)",location:"Norway",id:1044,tag:"nb-NO"},nn:{language:"Norwegian (Nynorsk)",location:null,id:30740,tag:"nn"},"nn-no":{language:"Norwegian (Nynorsk)",location:"Norway",id:2068,tag:"nn-NO"},"nb-sj":{language:"Norwegian Bokmål",location:"Svalbard and Jan Mayen",id:4096,tag:"nb-SJ"},nus:{language:"Nuer",location:null,id:4096,tag:"nus"},"nus-sd":{language:"Nuer",location:"Sudan",id:4096,tag:"nus-SD"},"nus-ss":{language:"Nuer",location:"South Sudan",id:4096,tag:"nus-SS"},nyn:{language:"Nyankole",location:null,id:4096,tag:"nyn"},"nyn-ug":{language:"Nyankole",location:"Uganda",id:4096,tag:"nyn-UG"},oc:{language:"Occitan",location:null,id:130,tag:"oc"},"oc-fr":{language:"Occitan",location:"France",id:1154,tag:"oc-FR"},or:{language:"Odia",location:null,id:72,tag:"or"},"or-in":{language:"Odia",location:"India",id:1096,tag:"or-IN"},om:{language:"Oromo",location:null,id:114,tag:"om"},"om-et":{language:"Oromo",location:"Ethiopia",id:1138,tag:"om-ET"},"om-ke":{language:"Oromo",location:"Kenya",id:4096,tag:"om-KE"},os:{language:"Ossetian",location:null,id:4096,tag:"os"},"os-ge":{language:"Ossetian",location:"Cyrillic, Georgia",id:4096,tag:"os-GE"},"os-ru":{language:"Ossetian",location:"Cyrillic, Russia",id:4096,tag:"os-RU"},ps:{language:"Pashto",location:null,id:99,tag:"ps"},"ps-af":{language:"Pashto",location:"Afghanistan",id:1123,tag:"ps-AF"},"ps-pk":{language:"Pashto",location:"Pakistan",id:4096,tag:"ps-PK"},fa:{language:"Persian",location:null,id:41,tag:"fa"},"fa-af":{language:"Persian",location:"Afghanistan",id:4096,tag:"fa-AF"},"fa-ir":{language:"Persian",location:"Iran",id:1065,tag:"fa-IR"},pl:{language:"Polish",location:null,id:21,tag:"pl"},"pl-pl":{language:"Polish",location:"Poland",id:1045,tag:"pl-PL"},pt:{language:"Portuguese",location:null,id:22,tag:"pt"},"pt-ao":{language:"Portuguese",location:"Angola",id:4096,tag:"pt-AO"},"pt-br":{language:"Portuguese",location:"Brazil",id:1046,tag:"pt-BR"},"pt-cv":{language:"Portuguese",location:"Cabo Verde",id:4096,tag:"pt-CV"},"pt-gq":{language:"Portuguese",location:"Equatorial Guinea",id:4096,tag:"pt-GQ"},"pt-gw":{language:"Portuguese",location:"Guinea-Bissau",id:4096,tag:"pt-GW"},"pt-lu":{language:"Portuguese",location:"Luxembourg",id:4096,tag:"pt-LU"},"pt-mo":{language:"Portuguese",location:"Macao SAR",id:4096,tag:"pt-MO"},"pt-mz":{language:"Portuguese",location:"Mozambique",id:4096,tag:"pt-MZ"},"pt-pt":{language:"Portuguese",location:"Portugal",id:2070,tag:"pt-PT"},"pt-st":{language:"Portuguese",location:"São Tomé and Príncipe",id:4096,tag:"pt-ST"},"pt-ch":{language:"Portuguese",location:"Switzerland",id:4096,tag:"pt-CH"},"pt-tl":{language:"Portuguese",location:"Timor-Leste",id:4096,tag:"pt-TL"},"prg-001":{language:"Prussian",location:null,id:4096,tag:"prg-001"},"qps-ploca":{language:"Pseudo Language",location:"Pseudo locale for east Asian/complex script localization testing",id:1534,tag:"qps-ploca"},"qps-ploc":{language:"Pseudo Language",location:"Pseudo locale used for localization testing",id:1281,tag:"qps-ploc"},"qps-plocm":{language:"Pseudo Language",location:"Pseudo locale used for localization testing of mirrored locales",id:2559,tag:"qps-plocm"},pa:{language:"Punjabi",location:null,id:70,tag:"pa"},"pa-arab":{language:"Punjabi",location:null,id:31814,tag:"pa-Arab"},"pa-in":{language:"Punjabi",location:"India",id:1094,tag:"pa-IN"},"pa-arab-pk":{language:"Punjabi",location:"Islamic Republic of Pakistan",id:2118,tag:"pa-Arab-PK"},quz:{language:"Quechua",location:null,id:107,tag:"quz"},"quz-bo":{language:"Quechua",location:"Bolivia",id:1131,tag:"quz-BO"},"quz-ec":{language:"Quechua",location:"Ecuador",id:2155,tag:"quz-EC"},"quz-pe":{language:"Quechua",location:"Peru",id:3179,tag:"quz-PE"},ksh:{language:"Ripuarian",location:null,id:4096,tag:"ksh"},"ksh-de":{language:"Ripuarian",location:"Germany",id:4096,tag:"ksh-DE"},ro:{language:"Romanian",location:null,id:24,tag:"ro"},"ro-md":{language:"Romanian",location:"Moldova",id:2072,tag:"ro-MD"},"ro-ro":{language:"Romanian",location:"Romania",id:1048,tag:"ro-RO"},rm:{language:"Romansh",location:null,id:23,tag:"rm"},"rm-ch":{language:"Romansh",location:"Switzerland",id:1047,tag:"rm-CH"},rof:{language:"Rombo",location:null,id:4096,tag:"rof"},"rof-tz":{language:"Rombo",location:"Tanzania",id:4096,tag:"rof-TZ"},rn:{language:"Rundi",location:null,id:4096,tag:"rn"},"rn-bi":{language:"Rundi",location:"Burundi",id:4096,tag:"rn-BI"},ru:{language:"Russian",location:null,id:25,tag:"ru"},"ru-by":{language:"Russian",location:"Belarus",id:4096,tag:"ru-BY"},"ru-kz":{language:"Russian",location:"Kazakhstan",id:4096,tag:"ru-KZ"},"ru-kg":{language:"Russian",location:"Kyrgyzstan",id:4096,tag:"ru-KG"},"ru-md":{language:"Russian",location:"Moldova",id:2073,tag:"ru-MD"},"ru-ru":{language:"Russian",location:"Russia",id:1049,tag:"ru-RU"},"ru-ua":{language:"Russian",location:"Ukraine",id:4096,tag:"ru-UA"},rwk:{language:"Rwa",location:null,id:4096,tag:"rwk"},"rwk-tz":{language:"Rwa",location:"Tanzania",id:4096,tag:"rwk-TZ"},ssy:{language:"Saho",location:null,id:4096,tag:"ssy"},"ssy-er":{language:"Saho",location:"Eritrea",id:4096,tag:"ssy-ER"},sah:{language:"Sakha",location:null,id:133,tag:"sah"},"sah-ru":{language:"Sakha",location:"Russia",id:1157,tag:"sah-RU"},saq:{language:"Samburu",location:null,id:4096,tag:"saq"},"saq-ke":{language:"Samburu",location:"Kenya",id:4096,tag:"saq-KE"},smn:{language:"Sami (Inari)",location:null,id:28731,tag:"smn",version:"Windows 7"},"smn-fi":{language:"Sami (Inari)",location:"Finland",id:9275,tag:"smn-FI"},smj:{language:"Sami (Lule)",location:null,id:31803,tag:"smj",version:"Windows 7"},"smj-no":{language:"Sami (Lule)",location:"Norway",id:4155,tag:"smj-NO"},"smj-se":{language:"Sami (Lule)",location:"Sweden",id:5179,tag:"smj-SE"},se:{language:"Sami (Northern)",location:null,id:59,tag:"se"},"se-fi":{language:"Sami (Northern)",location:"Finland",id:3131,tag:"se-FI"},"se-no":{language:"Sami (Northern)",location:"Norway",id:1083,tag:"se-NO"},"se-se":{language:"Sami (Northern)",location:"Sweden",id:2107,tag:"se-SE"},sms:{language:"Sami (Skolt)",location:null,id:29755,tag:"sms",version:"Windows 7"},"sms-fi":{language:"Sami (Skolt)",location:"Finland",id:8251,tag:"sms-FI"},sma:{language:"Sami (Southern)",location:null,id:30779,tag:"sma",version:"Windows 7"},"sma-no":{language:"Sami (Southern)",location:"Norway",id:6203,tag:"sma-NO"},"sma-se":{language:"Sami (Southern)",location:"Sweden",id:7227,tag:"sma-SE"},sg:{language:"Sango",location:null,id:4096,tag:"sg"},"sg-cf":{language:"Sango",location:"Central African Republic",id:4096,tag:"sg-CF"},sbp:{language:"Sangu",location:null,id:4096,tag:"sbp"},"sbp-tz":{language:"Sangu",location:"Tanzania",id:4096,tag:"sbp-TZ"},sa:{language:"Sanskrit",location:null,id:79,tag:"sa"},"sa-in":{language:"Sanskrit",location:"India",id:1103,tag:"sa-IN"},gd:{language:"Scottish Gaelic",location:null,id:145,tag:"gd",version:"Windows 7"},"gd-gb":{language:"Scottish Gaelic",location:"United Kingdom",id:1169,tag:"gd-GB"},seh:{language:"Sena",location:null,id:4096,tag:"seh"},"seh-mz":{language:"Sena",location:"Mozambique",id:4096,tag:"seh-MZ"},"sr-cyrl":{language:"Serbian (Cyrillic)",location:null,id:27674,tag:"sr-Cyrl",version:"Windows 7"},"sr-cyrl-ba":{language:"Serbian (Cyrillic)",location:"Bosnia and Herzegovina",id:7194,tag:"sr-Cyrl-BA"},"sr-cyrl-me":{language:"Serbian (Cyrillic)",location:"Montenegro",id:12314,tag:"sr-Cyrl-ME"},"sr-cyrl-rs":{language:"Serbian (Cyrillic)",location:"Serbia",id:10266,tag:"sr-Cyrl-RS"},"sr-cyrl-cs":{language:"Serbian (Cyrillic)",location:"Serbia and Montenegro (Former)",id:3098,tag:"sr-Cyrl-CS"},"sr-latn":{language:"Serbian (Latin)",location:null,id:28698,tag:"sr-Latn",version:"Windows 7"},sr:{language:"Serbian (Latin)",location:null,id:31770,tag:"sr"},"sr-latn-ba":{language:"Serbian (Latin)",location:"Bosnia and Herzegovina",id:6170,tag:"sr-Latn-BA"},"sr-latn-me":{language:"Serbian (Latin)",location:"Montenegro",id:11290,tag:"sr-Latn-ME"},"sr-latn-rs":{language:"Serbian (Latin)",location:"Serbia",id:9242,tag:"sr-Latn-RS"},"sr-latn-cs":{language:"Serbian (Latin)",location:"Serbia and Montenegro (Former)",id:2074,tag:"sr-Latn-CS"},nso:{language:"Sesotho sa Leboa",location:null,id:108,tag:"nso"},"nso-za":{language:"Sesotho sa Leboa",location:"South Africa",id:1132,tag:"nso-ZA"},tn:{language:"Setswana",location:null,id:50,tag:"tn"},"tn-bw":{language:"Setswana",location:"Botswana",id:2098,tag:"tn-BW"},"tn-za":{language:"Setswana",location:"South Africa",id:1074,tag:"tn-ZA"},ksb:{language:"Shambala",location:null,id:4096,tag:"ksb"},"ksb-tz":{language:"Shambala",location:"Tanzania",id:4096,tag:"ksb-TZ"},sn:{language:"Shona",location:null,id:4096,tag:"sn"},"sn-latn":{language:"Shona",location:"Latin",id:4096,tag:"sn-Latn"},"sn-latn-zw":{language:"Shona",location:"Zimbabwe",id:4096,tag:"sn-Latn-ZW"},sd:{language:"Sindhi",location:null,id:89,tag:"sd"},"sd-arab":{language:"Sindhi",location:null,id:31833,tag:"sd-Arab"},"sd-arab-pk":{language:"Sindhi",location:"Islamic Republic of Pakistan",id:2137,tag:"sd-Arab-PK"},si:{language:"Sinhala",location:null,id:91,tag:"si"},"si-lk":{language:"Sinhala",location:"Sri Lanka",id:1115,tag:"si-LK"},sk:{language:"Slovak",location:null,id:27,tag:"sk"},"sk-sk":{language:"Slovak",location:"Slovakia",id:1051,tag:"sk-SK"},sl:{language:"Slovenian",location:null,id:36,tag:"sl"},"sl-si":{language:"Slovenian",location:"Slovenia",id:1060,tag:"sl-SI"},xog:{language:"Soga",location:null,id:4096,tag:"xog"},"xog-ug":{language:"Soga",location:"Uganda",id:4096,tag:"xog-UG"},so:{language:"Somali",location:null,id:119,tag:"so"},"so-dj":{language:"Somali",location:"Djibouti",id:4096,tag:"so-DJ"},"so-et":{language:"Somali",location:"Ethiopia",id:4096,tag:"so-ET"},"so-ke":{language:"Somali",location:"Kenya",id:4096,tag:"so-KE"},"so-so":{language:"Somali",location:"Somalia",id:1143,tag:"so-SO"},st:{language:"Sotho",location:null,id:48,tag:"st"},"st-za":{language:"Sotho",location:"South Africa",id:1072,tag:"st-ZA"},nr:{language:"South Ndebele",location:null,id:4096,tag:"nr"},"nr-za":{language:"South Ndebele",location:"South Africa",id:4096,tag:"nr-ZA"},"st-ls":{language:"Southern Sotho",location:"Lesotho",id:4096,tag:"st-LS"},es:{language:"Spanish",location:null,id:10,tag:"es"},"es-ar":{language:"Spanish",location:"Argentina",id:11274,tag:"es-AR"},"es-bz":{language:"Spanish",location:"Belize",id:4096,tag:"es-BZ"},"es-ve":{language:"Spanish",location:"Bolivarian Republic of Venezuela",id:8202,tag:"es-VE"},"es-bo":{language:"Spanish",location:"Bolivia",id:16394,tag:"es-BO"},"es-br":{language:"Spanish",location:"Brazil",id:4096,tag:"es-BR"},"es-cl":{language:"Spanish",location:"Chile",id:13322,tag:"es-CL"},"es-co":{language:"Spanish",location:"Colombia",id:9226,tag:"es-CO"},"es-cr":{language:"Spanish",location:"Costa Rica",id:5130,tag:"es-CR"},"es-cu":{language:"Spanish",location:"Cuba",id:23562,tag:"es-CU"},"es-do":{language:"Spanish",location:"Dominican Republic",id:7178,tag:"es-DO"},"es-ec":{language:"Spanish",location:"Ecuador",id:12298,tag:"es-EC"},"es-sv":{language:"Spanish",location:"El Salvador",id:17418,tag:"es-SV"},"es-gq":{language:"Spanish",location:"Equatorial Guinea",id:4096,tag:"es-GQ"},"es-gt":{language:"Spanish",location:"Guatemala",id:4106,tag:"es-GT"},"es-hn":{language:"Spanish",location:"Honduras",id:18442,tag:"es-HN"},"es-419":{language:"Spanish",location:"Latin America",id:22538,tag:"es-419"},"es-mx":{language:"Spanish",location:"Mexico",id:2058,tag:"es-MX"},"es-ni":{language:"Spanish",location:"Nicaragua",id:19466,tag:"es-NI"},"es-pa":{language:"Spanish",location:"Panama",id:6154,tag:"es-PA"},"es-py":{language:"Spanish",location:"Paraguay",id:15370,tag:"es-PY"},"es-pe":{language:"Spanish",location:"Peru",id:10250,tag:"es-PE"},"es-ph":{language:"Spanish",location:"Philippines",id:4096,tag:"es-PH"},"es-pr":{language:"Spanish",location:"Puerto Rico",id:20490,tag:"es-PR"},"es-es_tradnl":{language:"Spanish",location:"Spain",id:1034,tag:"es-ES_tradnl"},"es-es":{language:"Spanish",location:"Spain",id:3082,tag:"es-ES"},"es-us":{language:"Spanish",location:"UnitedStates",id:21514,tag:"es-US"},"es-uy":{language:"Spanish",location:"Uruguay",id:14346,tag:"es-UY"},zgh:{language:"Standard Moroccan Tamazight",location:null,id:4096,tag:"zgh"},"zgh-tfng-ma":{language:"Standard Moroccan Tamazight",location:"Morocco",id:4096,tag:"zgh-Tfng-MA"},"zgh-tfng":{language:"Standard Moroccan Tamazight",location:"Tifinagh",id:4096,tag:"zgh-Tfng"},ss:{language:"Swati",location:null,id:4096,tag:"ss"},"ss-za":{language:"Swati",location:"South Africa",id:4096,tag:"ss-ZA"},"ss-sz":{language:"Swati",location:"Swaziland",id:4096,tag:"ss-SZ"},sv:{language:"Swedish",location:null,id:29,tag:"sv"},"sv-ax":{language:"Swedish",location:"Åland Islands",id:4096,tag:"sv-AX"},"sv-fi":{language:"Swedish",location:"Finland",id:2077,tag:"sv-FI"},"sv-se":{language:"Swedish",location:"Sweden",id:1053,tag:"sv-SE"},syr:{language:"Syriac",location:null,id:90,tag:"syr"},"syr-sy":{language:"Syriac",location:"Syria",id:1114,tag:"syr-SY"},shi:{language:"Tachelhit",location:null,id:4096,tag:"shi"},"shi-tfng":{language:"Tachelhit",location:"Tifinagh",id:4096,tag:"shi-Tfng"},"shi-tfng-ma":{language:"Tachelhit",location:"Tifinagh, Morocco",id:4096,tag:"shi-Tfng-MA"},"shi-latn":{language:"Tachelhit (Latin)",location:null,id:4096,tag:"shi-Latn"},"shi-latn-ma":{language:"Tachelhit (Latin)",location:"Morocco",id:4096,tag:"shi-Latn-MA"},dav:{language:"Taita",location:null,id:4096,tag:"dav"},"dav-ke":{language:"Taita",location:"Kenya",id:4096,tag:"dav-KE"},tg:{language:"Tajik (Cyrillic)",location:null,id:40,tag:"tg"},"tg-cyrl":{language:"Tajik (Cyrillic)",location:null,id:31784,tag:"tg-Cyrl",version:"Windows 7"},"tg-cyrl-tj":{language:"Tajik (Cyrillic)",location:"Tajikistan",id:1064,tag:"tg-Cyrl-TJ"},tzm:{language:"Tamazight (Latin)",location:null,id:95,tag:"tzm"},"tzm-latn":{language:"Tamazight (Latin)",location:null,id:31839,tag:"tzm-Latn",version:"Windows 7"},"tzm-latn-dz":{language:"Tamazight (Latin)",location:"Algeria",id:2143,tag:"tzm-Latn-DZ"},ta:{language:"Tamil",location:null,id:73,tag:"ta"},"ta-in":{language:"Tamil",location:"India",id:1097,tag:"ta-IN"},"ta-my":{language:"Tamil",location:"Malaysia",id:4096,tag:"ta-MY"},"ta-sg":{language:"Tamil",location:"Singapore",id:4096,tag:"ta-SG"},"ta-lk":{language:"Tamil",location:"Sri Lanka",id:2121,tag:"ta-LK"},twq:{language:"Tasawaq",location:null,id:4096,tag:"twq"},"twq-ne":{language:"Tasawaq",location:"Niger",id:4096,tag:"twq-NE"},tt:{language:"Tatar",location:null,id:68,tag:"tt"},"tt-ru":{language:"Tatar",location:"Russia",id:1092,tag:"tt-RU"},te:{language:"Telugu",location:null,id:74,tag:"te"},"te-in":{language:"Telugu",location:"India",id:1098,tag:"te-IN"},teo:{language:"Teso",location:null,id:4096,tag:"teo"},"teo-ke":{language:"Teso",location:"Kenya",id:4096,tag:"teo-KE"},"teo-ug":{language:"Teso",location:"Uganda",id:4096,tag:"teo-UG"},th:{language:"Thai",location:null,id:30,tag:"th"},"th-th":{language:"Thai",location:"Thailand",id:1054,tag:"th-TH"},bo:{language:"Tibetan",location:null,id:81,tag:"bo"},"bo-in":{language:"Tibetan",location:"India",id:4096,tag:"bo-IN"},"bo-cn":{language:"Tibetan",location:"People's Republic of China",id:1105,tag:"bo-CN"},tig:{language:"Tigre",location:null,id:4096,tag:"tig"},"tig-er":{language:"Tigre",location:"Eritrea",id:4096,tag:"tig-ER"},ti:{language:"Tigrinya",location:null,id:115,tag:"ti"},"ti-er":{language:"Tigrinya",location:"Eritrea",id:2163,tag:"ti-ER"},"ti-et":{language:"Tigrinya",location:"Ethiopia",id:1139,tag:"ti-ET"},to:{language:"Tongan",location:null,id:4096,tag:"to"},"to-to":{language:"Tongan",location:"Tonga",id:4096,tag:"to-TO"},ts:{language:"Tsonga",location:null,id:49,tag:"ts"},"ts-za":{language:"Tsonga",location:"South Africa",id:1073,tag:"ts-ZA"},tr:{language:"Turkish",location:null,id:31,tag:"tr"},"tr-cy":{language:"Turkish",location:"Cyprus",id:4096,tag:"tr-CY"},"tr-tr":{language:"Turkish",location:"Turkey",id:1055,tag:"tr-TR"},tk:{language:"Turkmen",location:null,id:66,tag:"tk"},"tk-tm":{language:"Turkmen",location:"Turkmenistan",id:1090,tag:"tk-TM"},uk:{language:"Ukrainian",location:null,id:34,tag:"uk"},"uk-ua":{language:"Ukrainian",location:"Ukraine",id:1058,tag:"uk-UA"},hsb:{language:"Upper Sorbian",location:null,id:46,tag:"hsb"},"hsb-de":{language:"Upper Sorbian",location:"Germany",id:1070,tag:"hsb-DE"},ur:{language:"Urdu",location:null,id:32,tag:"ur"},"ur-in":{language:"Urdu",location:"India",id:2080,tag:"ur-IN"},"ur-pk":{language:"Urdu",location:"Islamic Republic of Pakistan",id:1056,tag:"ur-PK"},ug:{language:"Uyghur",location:null,id:128,tag:"ug"},"ug-cn":{language:"Uyghur",location:"People's Republic of China",id:1152,tag:"ug-CN"},"uz-arab":{language:"Uzbek",location:"Perso-Arabic",id:4096,tag:"uz-Arab"},"uz-arab-af":{language:"Uzbek",location:"Perso-Arabic, Afghanistan",id:4096,tag:"uz-Arab-AF"},"uz-cyrl":{language:"Uzbek (Cyrillic)",location:null,id:30787,tag:"uz-Cyrl",version:"Windows 7"},"uz-cyrl-uz":{language:"Uzbek (Cyrillic)",location:"Uzbekistan",id:2115,tag:"uz-Cyrl-UZ"},uz:{language:"Uzbek (Latin)",location:null,id:67,tag:"uz"},"uz-latn":{language:"Uzbek (Latin)",location:null,id:31811,tag:"uz-Latn",version:"Windows7"},"uz-latn-uz":{language:"Uzbek (Latin)",location:"Uzbekistan",id:1091,tag:"uz-Latn-UZ"},vai:{language:"Vai",location:null,id:4096,tag:"vai"},"vai-vaii":{language:"Vai",location:null,id:4096,tag:"vai-Vaii"},"vai-vaii-lr":{language:"Vai",location:"Liberia",id:4096,tag:"vai-Vaii-LR"},"vai-latn-lr":{language:"Vai (Latin)",location:"Liberia",id:4096,tag:"vai-Latn-LR"},"vai-latn":{language:"Vai (Latin)",location:null,id:4096,tag:"vai-Latn"},"ca-es-":{language:"Valencian",location:"Spain",id:2051,tag:"ca-ES-"},ve:{language:"Venda",location:null,id:51,tag:"ve"},"ve-za":{language:"Venda",location:"South Africa",id:1075,tag:"ve-ZA"},vi:{language:"Vietnamese",location:null,id:42,tag:"vi"},"vi-vn":{language:"Vietnamese",location:"Vietnam",id:1066,tag:"vi-VN"},vo:{language:"Volapük",location:null,id:4096,tag:"vo"},"vo-001":{language:"Volapük",location:"World",id:4096,tag:"vo-001"},vun:{language:"Vunjo",location:null,id:4096,tag:"vun"},"vun-tz":{language:"Vunjo",location:"Tanzania",id:4096,tag:"vun-TZ"},wae:{language:"Walser",location:null,id:4096,tag:"wae"},"wae-ch":{language:"Walser",location:"Switzerland",id:4096,tag:"wae-CH"},cy:{language:"Welsh",location:null,id:82,tag:"cy"},"cy-gb":{language:"Welsh",location:"United Kingdom",id:1106,tag:"cy-GB",version:"ReleaseE1"},wal:{language:"Wolaytta",location:null,id:4096,tag:"wal"},"wal-et":{language:"Wolaytta",location:"Ethiopia",id:4096,tag:"wal-ET"},wo:{language:"Wolof",location:null,id:136,tag:"wo"},"wo-sn":{language:"Wolof",location:"Senegal",id:1160,tag:"wo-SN"},xh:{language:"Xhosa",location:null,id:52,tag:"xh"},"xh-za":{language:"Xhosa",location:"South Africa",id:1076,tag:"xh-ZA"},yav:{language:"Yangben",location:null,id:4096,tag:"yav"},"yav-cm":{language:"Yangben",location:"Cameroon",id:4096,tag:"yav-CM"},ii:{language:"Yi",location:null,id:120,tag:"ii"},"ii-cn":{language:"Yi",location:"People's Republic of China",id:1144,tag:"ii-CN"},yo:{language:"Yoruba",location:null,id:106,tag:"yo"},"yo-bj":{language:"Yoruba",location:"Benin",id:4096,tag:"yo-BJ"},"yo-ng":{language:"Yoruba",location:"Nigeria",id:1130,tag:"yo-NG"},dje:{language:"Zarma",location:null,id:4096,tag:"dje"},"dje-ne":{language:"Zarma",location:"Niger",id:4096,tag:"dje-NE"},zu:{language:"Zulu",location:null,id:53,tag:"zu"},"zu-za":{language:"Zulu",location:"South Africa",id:1077,tag:"zu-ZA"}},Vc={Abkhazian:{name:"Abkhazian",names:["Abkhazian"],"iso639-2":"abk","iso639-1":"ab"},Achinese:{name:"Achinese",names:["Achinese"],"iso639-2":"ace","iso639-1":null},Acoli:{name:"Acoli",names:["Acoli"],"iso639-2":"ach","iso639-1":null},Adangme:{name:"Adangme",names:["Adangme"],"iso639-2":"ada","iso639-1":null},Adygei:{name:"Adygei",names:["Adyghe","Adygei"],"iso639-2":"ady","iso639-1":null},Adyghe:{name:"Adyghe",names:["Adyghe","Adygei"],"iso639-2":"ady","iso639-1":null},Afar:{name:"Afar",names:["Afar"],"iso639-2":"aar","iso639-1":"aa"},Afrihili:{name:"Afrihili",names:["Afrihili"],"iso639-2":"afh","iso639-1":null},Afrikaans:{name:"Afrikaans",names:["Afrikaans"],"iso639-2":"afr","iso639-1":"af"},"Afro-Asiatic languages":{name:"Afro-Asiatic languages",names:["Afro-Asiatic languages"],"iso639-2":"afa","iso639-1":null},Ainu:{name:"Ainu",names:["Ainu"],"iso639-2":"ain","iso639-1":null},Akan:{name:"Akan",names:["Akan"],"iso639-2":"aka","iso639-1":"ak"},Akkadian:{name:"Akkadian",names:["Akkadian"],"iso639-2":"akk","iso639-1":null},Albanian:{name:"Albanian",names:["Albanian"],"iso639-2":"alb/sqi","iso639-1":"sq"},Alemannic:{name:"Alemannic",names:["Swiss German","Alemannic","Alsatian"],"iso639-2":"gsw","iso639-1":null},Aleut:{name:"Aleut",names:["Aleut"],"iso639-2":"ale","iso639-1":null},"Algonquian languages":{name:"Algonquian languages",names:["Algonquian languages"],"iso639-2":"alg","iso639-1":null},Alsatian:{name:"Alsatian",names:["Swiss German","Alemannic","Alsatian"],"iso639-2":"gsw","iso639-1":null},"Altaic languages":{name:"Altaic languages",names:["Altaic languages"],"iso639-2":"tut","iso639-1":null},Amharic:{name:"Amharic",names:["Amharic"],"iso639-2":"amh","iso639-1":"am"},Angika:{name:"Angika",names:["Angika"],"iso639-2":"anp","iso639-1":null},"Apache languages":{name:"Apache languages",names:["Apache languages"],"iso639-2":"apa","iso639-1":null},Arabic:{name:"Arabic",names:["Arabic"],"iso639-2":"ara","iso639-1":"ar"},Aragonese:{name:"Aragonese",names:["Aragonese"],"iso639-2":"arg","iso639-1":"an"},Arapaho:{name:"Arapaho",names:["Arapaho"],"iso639-2":"arp","iso639-1":null},Arawak:{name:"Arawak",names:["Arawak"],"iso639-2":"arw","iso639-1":null},Armenian:{name:"Armenian",names:["Armenian"],"iso639-2":"arm/hye","iso639-1":"hy"},Aromanian:{name:"Aromanian",names:["Aromanian","Arumanian","Macedo-Romanian"],"iso639-2":"rup","iso639-1":null},"Artificial languages":{name:"Artificial languages",names:["Artificial languages"],"iso639-2":"art","iso639-1":null},Arumanian:{name:"Arumanian",names:["Aromanian","Arumanian","Macedo-Romanian"],"iso639-2":"rup","iso639-1":null},Assamese:{name:"Assamese",names:["Assamese"],"iso639-2":"asm","iso639-1":"as"},Asturian:{name:"Asturian",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},Asturleonese:{name:"Asturleonese",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},"Athapascan languages":{name:"Athapascan languages",names:["Athapascan languages"],"iso639-2":"ath","iso639-1":null},"Australian languages":{name:"Australian languages",names:["Australian languages"],"iso639-2":"aus","iso639-1":null},"Austronesian languages":{name:"Austronesian languages",names:["Austronesian languages"],"iso639-2":"map","iso639-1":null},Avaric:{name:"Avaric",names:["Avaric"],"iso639-2":"ava","iso639-1":"av"},Avestan:{name:"Avestan",names:["Avestan"],"iso639-2":"ave","iso639-1":"ae"},Awadhi:{name:"Awadhi",names:["Awadhi"],"iso639-2":"awa","iso639-1":null},Aymara:{name:"Aymara",names:["Aymara"],"iso639-2":"aym","iso639-1":"ay"},Azerbaijani:{name:"Azerbaijani",names:["Azerbaijani"],"iso639-2":"aze","iso639-1":"az"},Bable:{name:"Bable",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},Balinese:{name:"Balinese",names:["Balinese"],"iso639-2":"ban","iso639-1":null},"Baltic languages":{name:"Baltic languages",names:["Baltic languages"],"iso639-2":"bat","iso639-1":null},Baluchi:{name:"Baluchi",names:["Baluchi"],"iso639-2":"bal","iso639-1":null},Bambara:{name:"Bambara",names:["Bambara"],"iso639-2":"bam","iso639-1":"bm"},"Bamileke languages":{name:"Bamileke languages",names:["Bamileke languages"],"iso639-2":"bai","iso639-1":null},"Banda languages":{name:"Banda languages",names:["Banda languages"],"iso639-2":"bad","iso639-1":null},"Bantu languages":{name:"Bantu languages",names:["Bantu languages"],"iso639-2":"bnt","iso639-1":null},Basa:{name:"Basa",names:["Basa"],"iso639-2":"bas","iso639-1":null},Bashkir:{name:"Bashkir",names:["Bashkir"],"iso639-2":"bak","iso639-1":"ba"},Basque:{name:"Basque",names:["Basque"],"iso639-2":"baq/eus","iso639-1":"eu"},"Batak languages":{name:"Batak languages",names:["Batak languages"],"iso639-2":"btk","iso639-1":null},Bedawiyet:{name:"Bedawiyet",names:["Beja","Bedawiyet"],"iso639-2":"bej","iso639-1":null},Beja:{name:"Beja",names:["Beja","Bedawiyet"],"iso639-2":"bej","iso639-1":null},Belarusian:{name:"Belarusian",names:["Belarusian"],"iso639-2":"bel","iso639-1":"be"},Bemba:{name:"Bemba",names:["Bemba"],"iso639-2":"bem","iso639-1":null},Bengali:{name:"Bengali",names:["Bengali"],"iso639-2":"ben","iso639-1":"bn"},"Berber languages":{name:"Berber languages",names:["Berber languages"],"iso639-2":"ber","iso639-1":null},Bhojpuri:{name:"Bhojpuri",names:["Bhojpuri"],"iso639-2":"bho","iso639-1":null},"Bihari languages":{name:"Bihari languages",names:["Bihari languages"],"iso639-2":"bih","iso639-1":"bh"},Bikol:{name:"Bikol",names:["Bikol"],"iso639-2":"bik","iso639-1":null},Bilin:{name:"Bilin",names:["Blin","Bilin"],"iso639-2":"byn","iso639-1":null},Bini:{name:"Bini",names:["Bini","Edo"],"iso639-2":"bin","iso639-1":null},Bislama:{name:"Bislama",names:["Bislama"],"iso639-2":"bis","iso639-1":"bi"},Blin:{name:"Blin",names:["Blin","Bilin"],"iso639-2":"byn","iso639-1":null},Bliss:{name:"Bliss",names:["Blissymbols","Blissymbolics","Bliss"],"iso639-2":"zbl","iso639-1":null},Blissymbolics:{name:"Blissymbolics",names:["Blissymbols","Blissymbolics","Bliss"],"iso639-2":"zbl","iso639-1":null},Blissymbols:{name:"Blissymbols",names:["Blissymbols","Blissymbolics","Bliss"],"iso639-2":"zbl","iso639-1":null},"Bokmål, Norwegian":{name:"Bokmål, Norwegian",names:["Bokmål, Norwegian","Norwegian Bokmål"],"iso639-2":"nob","iso639-1":"nb"},Bosnian:{name:"Bosnian",names:["Bosnian"],"iso639-2":"bos","iso639-1":"bs"},Braj:{name:"Braj",names:["Braj"],"iso639-2":"bra","iso639-1":null},Breton:{name:"Breton",names:["Breton"],"iso639-2":"bre","iso639-1":"br"},Buginese:{name:"Buginese",names:["Buginese"],"iso639-2":"bug","iso639-1":null},Bulgarian:{name:"Bulgarian",names:["Bulgarian"],"iso639-2":"bul","iso639-1":"bg"},Buriat:{name:"Buriat",names:["Buriat"],"iso639-2":"bua","iso639-1":null},Burmese:{name:"Burmese",names:["Burmese"],"iso639-2":"bur/mya","iso639-1":"my"},Caddo:{name:"Caddo",names:["Caddo"],"iso639-2":"cad","iso639-1":null},Castilian:{name:"Castilian",names:["Spanish","Castilian"],"iso639-2":"spa","iso639-1":"es"},Catalan:{name:"Catalan",names:["Catalan","Valencian"],"iso639-2":"cat","iso639-1":"ca"},"Caucasian languages":{name:"Caucasian languages",names:["Caucasian languages"],"iso639-2":"cau","iso639-1":null},Cebuano:{name:"Cebuano",names:["Cebuano"],"iso639-2":"ceb","iso639-1":null},"Celtic languages":{name:"Celtic languages",names:["Celtic languages"],"iso639-2":"cel","iso639-1":null},"Central American Indian languages":{name:"Central American Indian languages",names:["Central American Indian languages"],"iso639-2":"cai","iso639-1":null},"Central Khmer":{name:"Central Khmer",names:["Central Khmer"],"iso639-2":"khm","iso639-1":"km"},Chagatai:{name:"Chagatai",names:["Chagatai"],"iso639-2":"chg","iso639-1":null},"Chamic languages":{name:"Chamic languages",names:["Chamic languages"],"iso639-2":"cmc","iso639-1":null},Chamorro:{name:"Chamorro",names:["Chamorro"],"iso639-2":"cha","iso639-1":"ch"},Chechen:{name:"Chechen",names:["Chechen"],"iso639-2":"che","iso639-1":"ce"},Cherokee:{name:"Cherokee",names:["Cherokee"],"iso639-2":"chr","iso639-1":null},Chewa:{name:"Chewa",names:["Chichewa","Chewa","Nyanja"],"iso639-2":"nya","iso639-1":"ny"},Cheyenne:{name:"Cheyenne",names:["Cheyenne"],"iso639-2":"chy","iso639-1":null},Chibcha:{name:"Chibcha",names:["Chibcha"],"iso639-2":"chb","iso639-1":null},Chichewa:{name:"Chichewa",names:["Chichewa","Chewa","Nyanja"],"iso639-2":"nya","iso639-1":"ny"},Chinese:{name:"Chinese",names:["Chinese"],"iso639-2":"chi/zho","iso639-1":"zh"},"Chinook jargon":{name:"Chinook jargon",names:["Chinook jargon"],"iso639-2":"chn","iso639-1":null},Chipewyan:{name:"Chipewyan",names:["Chipewyan","Dene Suline"],"iso639-2":"chp","iso639-1":null},Choctaw:{name:"Choctaw",names:["Choctaw"],"iso639-2":"cho","iso639-1":null},Chuang:{name:"Chuang",names:["Zhuang","Chuang"],"iso639-2":"zha","iso639-1":"za"},"Church Slavic":{name:"Church Slavic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},"Church Slavonic":{name:"Church Slavonic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},Chuukese:{name:"Chuukese",names:["Chuukese"],"iso639-2":"chk","iso639-1":null},Chuvash:{name:"Chuvash",names:["Chuvash"],"iso639-2":"chv","iso639-1":"cv"},"Classical Nepal Bhasa":{name:"Classical Nepal Bhasa",names:["Classical Newari","Old Newari","Classical Nepal Bhasa"],"iso639-2":"nwc","iso639-1":null},"Classical Newari":{name:"Classical Newari",names:["Classical Newari","Old Newari","Classical Nepal Bhasa"],"iso639-2":"nwc","iso639-1":null},"Classical Syriac":{name:"Classical Syriac",names:["Classical Syriac"],"iso639-2":"syc","iso639-1":null},"Cook Islands Maori":{name:"Cook Islands Maori",names:["Rarotongan","Cook Islands Maori"],"iso639-2":"rar","iso639-1":null},Coptic:{name:"Coptic",names:["Coptic"],"iso639-2":"cop","iso639-1":null},Cornish:{name:"Cornish",names:["Cornish"],"iso639-2":"cor","iso639-1":"kw"},Corsican:{name:"Corsican",names:["Corsican"],"iso639-2":"cos","iso639-1":"co"},Cree:{name:"Cree",names:["Cree"],"iso639-2":"cre","iso639-1":"cr"},Creek:{name:"Creek",names:["Creek"],"iso639-2":"mus","iso639-1":null},"Creoles and pidgins":{name:"Creoles and pidgins",names:["Creoles and pidgins"],"iso639-2":"crp","iso639-1":null},"Creoles and pidgins, English based":{name:"Creoles and pidgins, English based",names:["Creoles and pidgins, English based"],"iso639-2":"cpe","iso639-1":null},"Creoles and pidgins, French-based":{name:"Creoles and pidgins, French-based",names:["Creoles and pidgins, French-based"],"iso639-2":"cpf","iso639-1":null},"Creoles and pidgins, Portuguese-based":{name:"Creoles and pidgins, Portuguese-based",names:["Creoles and pidgins, Portuguese-based"],"iso639-2":"cpp","iso639-1":null},"Crimean Tatar":{name:"Crimean Tatar",names:["Crimean Tatar","Crimean Turkish"],"iso639-2":"crh","iso639-1":null},"Crimean Turkish":{name:"Crimean Turkish",names:["Crimean Tatar","Crimean Turkish"],"iso639-2":"crh","iso639-1":null},Croatian:{name:"Croatian",names:["Croatian"],"iso639-2":"hrv","iso639-1":"hr"},"Cushitic languages":{name:"Cushitic languages",names:["Cushitic languages"],"iso639-2":"cus","iso639-1":null},Czech:{name:"Czech",names:["Czech"],"iso639-2":"cze/ces","iso639-1":"cs"},Dakota:{name:"Dakota",names:["Dakota"],"iso639-2":"dak","iso639-1":null},Danish:{name:"Danish",names:["Danish"],"iso639-2":"dan","iso639-1":"da"},Dargwa:{name:"Dargwa",names:["Dargwa"],"iso639-2":"dar","iso639-1":null},Delaware:{name:"Delaware",names:["Delaware"],"iso639-2":"del","iso639-1":null},"Dene Suline":{name:"Dene Suline",names:["Chipewyan","Dene Suline"],"iso639-2":"chp","iso639-1":null},Dhivehi:{name:"Dhivehi",names:["Divehi","Dhivehi","Maldivian"],"iso639-2":"div","iso639-1":"dv"},Dimili:{name:"Dimili",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Dimli:{name:"Dimli",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Dinka:{name:"Dinka",names:["Dinka"],"iso639-2":"din","iso639-1":null},Divehi:{name:"Divehi",names:["Divehi","Dhivehi","Maldivian"],"iso639-2":"div","iso639-1":"dv"},Dogri:{name:"Dogri",names:["Dogri"],"iso639-2":"doi","iso639-1":null},Dogrib:{name:"Dogrib",names:["Dogrib"],"iso639-2":"dgr","iso639-1":null},"Dravidian languages":{name:"Dravidian languages",names:["Dravidian languages"],"iso639-2":"dra","iso639-1":null},Duala:{name:"Duala",names:["Duala"],"iso639-2":"dua","iso639-1":null},Dutch:{name:"Dutch",names:["Dutch","Flemish"],"iso639-2":"dut/nld","iso639-1":"nl"},"Dutch, Middle (ca.1050-1350)":{name:"Dutch, Middle (ca.1050-1350)",names:["Dutch, Middle (ca.1050-1350)"],"iso639-2":"dum","iso639-1":null},Dyula:{name:"Dyula",names:["Dyula"],"iso639-2":"dyu","iso639-1":null},Dzongkha:{name:"Dzongkha",names:["Dzongkha"],"iso639-2":"dzo","iso639-1":"dz"},"Eastern Frisian":{name:"Eastern Frisian",names:["Eastern Frisian"],"iso639-2":"frs","iso639-1":null},Edo:{name:"Edo",names:["Bini","Edo"],"iso639-2":"bin","iso639-1":null},Efik:{name:"Efik",names:["Efik"],"iso639-2":"efi","iso639-1":null},"Egyptian (Ancient)":{name:"Egyptian (Ancient)",names:["Egyptian (Ancient)"],"iso639-2":"egy","iso639-1":null},Ekajuk:{name:"Ekajuk",names:["Ekajuk"],"iso639-2":"eka","iso639-1":null},Elamite:{name:"Elamite",names:["Elamite"],"iso639-2":"elx","iso639-1":null},English:{name:"English",names:["English"],"iso639-2":"eng","iso639-1":"en"},"English, Middle (1100-1500)":{name:"English, Middle (1100-1500)",names:["English, Middle (1100-1500)"],"iso639-2":"enm","iso639-1":null},"English, Old (ca.450-1100)":{name:"English, Old (ca.450-1100)",names:["English, Old (ca.450-1100)"],"iso639-2":"ang","iso639-1":null},Erzya:{name:"Erzya",names:["Erzya"],"iso639-2":"myv","iso639-1":null},Esperanto:{name:"Esperanto",names:["Esperanto"],"iso639-2":"epo","iso639-1":"eo"},Estonian:{name:"Estonian",names:["Estonian"],"iso639-2":"est","iso639-1":"et"},Ewe:{name:"Ewe",names:["Ewe"],"iso639-2":"ewe","iso639-1":"ee"},Ewondo:{name:"Ewondo",names:["Ewondo"],"iso639-2":"ewo","iso639-1":null},Fang:{name:"Fang",names:["Fang"],"iso639-2":"fan","iso639-1":null},Fanti:{name:"Fanti",names:["Fanti"],"iso639-2":"fat","iso639-1":null},Faroese:{name:"Faroese",names:["Faroese"],"iso639-2":"fao","iso639-1":"fo"},Fijian:{name:"Fijian",names:["Fijian"],"iso639-2":"fij","iso639-1":"fj"},Filipino:{name:"Filipino",names:["Filipino","Pilipino"],"iso639-2":"fil","iso639-1":null},Finnish:{name:"Finnish",names:["Finnish"],"iso639-2":"fin","iso639-1":"fi"},"Finno-Ugrian languages":{name:"Finno-Ugrian languages",names:["Finno-Ugrian languages"],"iso639-2":"fiu","iso639-1":null},Flemish:{name:"Flemish",names:["Dutch","Flemish"],"iso639-2":"dut/nld","iso639-1":"nl"},Fon:{name:"Fon",names:["Fon"],"iso639-2":"fon","iso639-1":null},French:{name:"French",names:["French"],"iso639-2":"fre/fra","iso639-1":"fr"},"French, Middle (ca.1400-1600)":{name:"French, Middle (ca.1400-1600)",names:["French, Middle (ca.1400-1600)"],"iso639-2":"frm","iso639-1":null},"French, Old (842-ca.1400)":{name:"French, Old (842-ca.1400)",names:["French, Old (842-ca.1400)"],"iso639-2":"fro","iso639-1":null},Friulian:{name:"Friulian",names:["Friulian"],"iso639-2":"fur","iso639-1":null},Fulah:{name:"Fulah",names:["Fulah"],"iso639-2":"ful","iso639-1":"ff"},Ga:{name:"Ga",names:["Ga"],"iso639-2":"gaa","iso639-1":null},Gaelic:{name:"Gaelic",names:["Gaelic","Scottish Gaelic"],"iso639-2":"gla","iso639-1":"gd"},"Galibi Carib":{name:"Galibi Carib",names:["Galibi Carib"],"iso639-2":"car","iso639-1":null},Galician:{name:"Galician",names:["Galician"],"iso639-2":"glg","iso639-1":"gl"},Ganda:{name:"Ganda",names:["Ganda"],"iso639-2":"lug","iso639-1":"lg"},Gayo:{name:"Gayo",names:["Gayo"],"iso639-2":"gay","iso639-1":null},Gbaya:{name:"Gbaya",names:["Gbaya"],"iso639-2":"gba","iso639-1":null},Geez:{name:"Geez",names:["Geez"],"iso639-2":"gez","iso639-1":null},Georgian:{name:"Georgian",names:["Georgian"],"iso639-2":"geo/kat","iso639-1":"ka"},German:{name:"German",names:["German"],"iso639-2":"ger/deu","iso639-1":"de"},"German, Low":{name:"German, Low",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},"German, Middle High (ca.1050-1500)":{name:"German, Middle High (ca.1050-1500)",names:["German, Middle High (ca.1050-1500)"],"iso639-2":"gmh","iso639-1":null},"German, Old High (ca.750-1050)":{name:"German, Old High (ca.750-1050)",names:["German, Old High (ca.750-1050)"],"iso639-2":"goh","iso639-1":null},"Germanic languages":{name:"Germanic languages",names:["Germanic languages"],"iso639-2":"gem","iso639-1":null},Gikuyu:{name:"Gikuyu",names:["Kikuyu","Gikuyu"],"iso639-2":"kik","iso639-1":"ki"},Gilbertese:{name:"Gilbertese",names:["Gilbertese"],"iso639-2":"gil","iso639-1":null},Gondi:{name:"Gondi",names:["Gondi"],"iso639-2":"gon","iso639-1":null},Gorontalo:{name:"Gorontalo",names:["Gorontalo"],"iso639-2":"gor","iso639-1":null},Gothic:{name:"Gothic",names:["Gothic"],"iso639-2":"got","iso639-1":null},Grebo:{name:"Grebo",names:["Grebo"],"iso639-2":"grb","iso639-1":null},"Greek, Ancient (to 1453)":{name:"Greek, Ancient (to 1453)",names:["Greek, Ancient (to 1453)"],"iso639-2":"grc","iso639-1":null},"Greek, Modern (1453-)":{name:"Greek, Modern (1453-)",names:["Greek, Modern (1453-)"],"iso639-2":"gre/ell","iso639-1":"el"},Greenlandic:{name:"Greenlandic",names:["Kalaallisut","Greenlandic"],"iso639-2":"kal","iso639-1":"kl"},Guarani:{name:"Guarani",names:["Guarani"],"iso639-2":"grn","iso639-1":"gn"},Gujarati:{name:"Gujarati",names:["Gujarati"],"iso639-2":"guj","iso639-1":"gu"},"Gwich'in":{name:"Gwich'in",names:["Gwich'in"],"iso639-2":"gwi","iso639-1":null},Haida:{name:"Haida",names:["Haida"],"iso639-2":"hai","iso639-1":null},Haitian:{name:"Haitian",names:["Haitian","Haitian Creole"],"iso639-2":"hat","iso639-1":"ht"},"Haitian Creole":{name:"Haitian Creole",names:["Haitian","Haitian Creole"],"iso639-2":"hat","iso639-1":"ht"},Hausa:{name:"Hausa",names:["Hausa"],"iso639-2":"hau","iso639-1":"ha"},Hawaiian:{name:"Hawaiian",names:["Hawaiian"],"iso639-2":"haw","iso639-1":null},Hebrew:{name:"Hebrew",names:["Hebrew"],"iso639-2":"heb","iso639-1":"he"},Herero:{name:"Herero",names:["Herero"],"iso639-2":"her","iso639-1":"hz"},Hiligaynon:{name:"Hiligaynon",names:["Hiligaynon"],"iso639-2":"hil","iso639-1":null},"Himachali languages":{name:"Himachali languages",names:["Himachali languages","Western Pahari languages"],"iso639-2":"him","iso639-1":null},Hindi:{name:"Hindi",names:["Hindi"],"iso639-2":"hin","iso639-1":"hi"},"Hiri Motu":{name:"Hiri Motu",names:["Hiri Motu"],"iso639-2":"hmo","iso639-1":"ho"},Hittite:{name:"Hittite",names:["Hittite"],"iso639-2":"hit","iso639-1":null},Hmong:{name:"Hmong",names:["Hmong","Mong"],"iso639-2":"hmn","iso639-1":null},Hungarian:{name:"Hungarian",names:["Hungarian"],"iso639-2":"hun","iso639-1":"hu"},Hupa:{name:"Hupa",names:["Hupa"],"iso639-2":"hup","iso639-1":null},Iban:{name:"Iban",names:["Iban"],"iso639-2":"iba","iso639-1":null},Icelandic:{name:"Icelandic",names:["Icelandic"],"iso639-2":"ice/isl","iso639-1":"is"},Ido:{name:"Ido",names:["Ido"],"iso639-2":"ido","iso639-1":"io"},Igbo:{name:"Igbo",names:["Igbo"],"iso639-2":"ibo","iso639-1":"ig"},"Ijo languages":{name:"Ijo languages",names:["Ijo languages"],"iso639-2":"ijo","iso639-1":null},Iloko:{name:"Iloko",names:["Iloko"],"iso639-2":"ilo","iso639-1":null},"Imperial Aramaic (700-300 BCE)":{name:"Imperial Aramaic (700-300 BCE)",names:["Official Aramaic (700-300 BCE)","Imperial Aramaic (700-300 BCE)"],"iso639-2":"arc","iso639-1":null},"Inari Sami":{name:"Inari Sami",names:["Inari Sami"],"iso639-2":"smn","iso639-1":null},"Indic languages":{name:"Indic languages",names:["Indic languages"],"iso639-2":"inc","iso639-1":null},"Indo-European languages":{name:"Indo-European languages",names:["Indo-European languages"],"iso639-2":"ine","iso639-1":null},Indonesian:{name:"Indonesian",names:["Indonesian"],"iso639-2":"ind","iso639-1":"id"},Ingush:{name:"Ingush",names:["Ingush"],"iso639-2":"inh","iso639-1":null},"Interlingua (International Auxiliary Language Association)":{name:"Interlingua (International Auxiliary Language Association)",names:["Interlingua (International Auxiliary Language Association)"],"iso639-2":"ina","iso639-1":"ia"},Interlingue:{name:"Interlingue",names:["Interlingue","Occidental"],"iso639-2":"ile","iso639-1":"ie"},Inuktitut:{name:"Inuktitut",names:["Inuktitut"],"iso639-2":"iku","iso639-1":"iu"},Inupiaq:{name:"Inupiaq",names:["Inupiaq"],"iso639-2":"ipk","iso639-1":"ik"},"Iranian languages":{name:"Iranian languages",names:["Iranian languages"],"iso639-2":"ira","iso639-1":null},Irish:{name:"Irish",names:["Irish"],"iso639-2":"gle","iso639-1":"ga"},"Irish, Middle (900-1200)":{name:"Irish, Middle (900-1200)",names:["Irish, Middle (900-1200)"],"iso639-2":"mga","iso639-1":null},"Irish, Old (to 900)":{name:"Irish, Old (to 900)",names:["Irish, Old (to 900)"],"iso639-2":"sga","iso639-1":null},"Iroquoian languages":{name:"Iroquoian languages",names:["Iroquoian languages"],"iso639-2":"iro","iso639-1":null},Italian:{name:"Italian",names:["Italian"],"iso639-2":"ita","iso639-1":"it"},Japanese:{name:"Japanese",names:["Japanese"],"iso639-2":"jpn","iso639-1":"ja"},Javanese:{name:"Javanese",names:["Javanese"],"iso639-2":"jav","iso639-1":"jv"},Jingpho:{name:"Jingpho",names:["Kachin","Jingpho"],"iso639-2":"kac","iso639-1":null},"Judeo-Arabic":{name:"Judeo-Arabic",names:["Judeo-Arabic"],"iso639-2":"jrb","iso639-1":null},"Judeo-Persian":{name:"Judeo-Persian",names:["Judeo-Persian"],"iso639-2":"jpr","iso639-1":null},Kabardian:{name:"Kabardian",names:["Kabardian"],"iso639-2":"kbd","iso639-1":null},Kabyle:{name:"Kabyle",names:["Kabyle"],"iso639-2":"kab","iso639-1":null},Kachin:{name:"Kachin",names:["Kachin","Jingpho"],"iso639-2":"kac","iso639-1":null},Kalaallisut:{name:"Kalaallisut",names:["Kalaallisut","Greenlandic"],"iso639-2":"kal","iso639-1":"kl"},Kalmyk:{name:"Kalmyk",names:["Kalmyk","Oirat"],"iso639-2":"xal","iso639-1":null},Kamba:{name:"Kamba",names:["Kamba"],"iso639-2":"kam","iso639-1":null},Kannada:{name:"Kannada",names:["Kannada"],"iso639-2":"kan","iso639-1":"kn"},Kanuri:{name:"Kanuri",names:["Kanuri"],"iso639-2":"kau","iso639-1":"kr"},Kapampangan:{name:"Kapampangan",names:["Pampanga","Kapampangan"],"iso639-2":"pam","iso639-1":null},"Kara-Kalpak":{name:"Kara-Kalpak",names:["Kara-Kalpak"],"iso639-2":"kaa","iso639-1":null},"Karachay-Balkar":{name:"Karachay-Balkar",names:["Karachay-Balkar"],"iso639-2":"krc","iso639-1":null},Karelian:{name:"Karelian",names:["Karelian"],"iso639-2":"krl","iso639-1":null},"Karen languages":{name:"Karen languages",names:["Karen languages"],"iso639-2":"kar","iso639-1":null},Kashmiri:{name:"Kashmiri",names:["Kashmiri"],"iso639-2":"kas","iso639-1":"ks"},Kashubian:{name:"Kashubian",names:["Kashubian"],"iso639-2":"csb","iso639-1":null},Kawi:{name:"Kawi",names:["Kawi"],"iso639-2":"kaw","iso639-1":null},Kazakh:{name:"Kazakh",names:["Kazakh"],"iso639-2":"kaz","iso639-1":"kk"},Khasi:{name:"Khasi",names:["Khasi"],"iso639-2":"kha","iso639-1":null},"Khoisan languages":{name:"Khoisan languages",names:["Khoisan languages"],"iso639-2":"khi","iso639-1":null},Khotanese:{name:"Khotanese",names:["Khotanese","Sakan"],"iso639-2":"kho","iso639-1":null},Kikuyu:{name:"Kikuyu",names:["Kikuyu","Gikuyu"],"iso639-2":"kik","iso639-1":"ki"},Kimbundu:{name:"Kimbundu",names:["Kimbundu"],"iso639-2":"kmb","iso639-1":null},Kinyarwanda:{name:"Kinyarwanda",names:["Kinyarwanda"],"iso639-2":"kin","iso639-1":"rw"},Kirdki:{name:"Kirdki",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Kirghiz:{name:"Kirghiz",names:["Kirghiz","Kyrgyz"],"iso639-2":"kir","iso639-1":"ky"},Kirmanjki:{name:"Kirmanjki",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Klingon:{name:"Klingon",names:["Klingon","tlhIngan-Hol"],"iso639-2":"tlh","iso639-1":null},Komi:{name:"Komi",names:["Komi"],"iso639-2":"kom","iso639-1":"kv"},Kongo:{name:"Kongo",names:["Kongo"],"iso639-2":"kon","iso639-1":"kg"},Konkani:{name:"Konkani",names:["Konkani"],"iso639-2":"kok","iso639-1":null},Korean:{name:"Korean",names:["Korean"],"iso639-2":"kor","iso639-1":"ko"},Kosraean:{name:"Kosraean",names:["Kosraean"],"iso639-2":"kos","iso639-1":null},Kpelle:{name:"Kpelle",names:["Kpelle"],"iso639-2":"kpe","iso639-1":null},"Kru languages":{name:"Kru languages",names:["Kru languages"],"iso639-2":"kro","iso639-1":null},Kuanyama:{name:"Kuanyama",names:["Kuanyama","Kwanyama"],"iso639-2":"kua","iso639-1":"kj"},Kumyk:{name:"Kumyk",names:["Kumyk"],"iso639-2":"kum","iso639-1":null},Kurdish:{name:"Kurdish",names:["Kurdish"],"iso639-2":"kur","iso639-1":"ku"},Kurukh:{name:"Kurukh",names:["Kurukh"],"iso639-2":"kru","iso639-1":null},Kutenai:{name:"Kutenai",names:["Kutenai"],"iso639-2":"kut","iso639-1":null},Kwanyama:{name:"Kwanyama",names:["Kuanyama","Kwanyama"],"iso639-2":"kua","iso639-1":"kj"},Kyrgyz:{name:"Kyrgyz",names:["Kirghiz","Kyrgyz"],"iso639-2":"kir","iso639-1":"ky"},Ladino:{name:"Ladino",names:["Ladino"],"iso639-2":"lad","iso639-1":null},Lahnda:{name:"Lahnda",names:["Lahnda"],"iso639-2":"lah","iso639-1":null},Lamba:{name:"Lamba",names:["Lamba"],"iso639-2":"lam","iso639-1":null},"Land Dayak languages":{name:"Land Dayak languages",names:["Land Dayak languages"],"iso639-2":"day","iso639-1":null},Lao:{name:"Lao",names:["Lao"],"iso639-2":"lao","iso639-1":"lo"},Latin:{name:"Latin",names:["Latin"],"iso639-2":"lat","iso639-1":"la"},Latvian:{name:"Latvian",names:["Latvian"],"iso639-2":"lav","iso639-1":"lv"},Leonese:{name:"Leonese",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},Letzeburgesch:{name:"Letzeburgesch",names:["Luxembourgish","Letzeburgesch"],"iso639-2":"ltz","iso639-1":"lb"},Lezghian:{name:"Lezghian",names:["Lezghian"],"iso639-2":"lez","iso639-1":null},Limburgan:{name:"Limburgan",names:["Limburgan","Limburger","Limburgish"],"iso639-2":"lim","iso639-1":"li"},Limburger:{name:"Limburger",names:["Limburgan","Limburger","Limburgish"],"iso639-2":"lim","iso639-1":"li"},Limburgish:{name:"Limburgish",names:["Limburgan","Limburger","Limburgish"],"iso639-2":"lim","iso639-1":"li"},Lingala:{name:"Lingala",names:["Lingala"],"iso639-2":"lin","iso639-1":"ln"},Lithuanian:{name:"Lithuanian",names:["Lithuanian"],"iso639-2":"lit","iso639-1":"lt"},Lojban:{name:"Lojban",names:["Lojban"],"iso639-2":"jbo","iso639-1":null},"Low German":{name:"Low German",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},"Low Saxon":{name:"Low Saxon",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},"Lower Sorbian":{name:"Lower Sorbian",names:["Lower Sorbian"],"iso639-2":"dsb","iso639-1":null},Lozi:{name:"Lozi",names:["Lozi"],"iso639-2":"loz","iso639-1":null},"Luba-Katanga":{name:"Luba-Katanga",names:["Luba-Katanga"],"iso639-2":"lub","iso639-1":"lu"},"Luba-Lulua":{name:"Luba-Lulua",names:["Luba-Lulua"],"iso639-2":"lua","iso639-1":null},Luiseno:{name:"Luiseno",names:["Luiseno"],"iso639-2":"lui","iso639-1":null},"Lule Sami":{name:"Lule Sami",names:["Lule Sami"],"iso639-2":"smj","iso639-1":null},Lunda:{name:"Lunda",names:["Lunda"],"iso639-2":"lun","iso639-1":null},"Luo (Kenya and Tanzania)":{name:"Luo (Kenya and Tanzania)",names:["Luo (Kenya and Tanzania)"],"iso639-2":"luo","iso639-1":null},Lushai:{name:"Lushai",names:["Lushai"],"iso639-2":"lus","iso639-1":null},Luxembourgish:{name:"Luxembourgish",names:["Luxembourgish","Letzeburgesch"],"iso639-2":"ltz","iso639-1":"lb"},"Macedo-Romanian":{name:"Macedo-Romanian",names:["Aromanian","Arumanian","Macedo-Romanian"],"iso639-2":"rup","iso639-1":null},Macedonian:{name:"Macedonian",names:["Macedonian"],"iso639-2":"mac/mkd","iso639-1":"mk"},Madurese:{name:"Madurese",names:["Madurese"],"iso639-2":"mad","iso639-1":null},Magahi:{name:"Magahi",names:["Magahi"],"iso639-2":"mag","iso639-1":null},Maithili:{name:"Maithili",names:["Maithili"],"iso639-2":"mai","iso639-1":null},Makasar:{name:"Makasar",names:["Makasar"],"iso639-2":"mak","iso639-1":null},Malagasy:{name:"Malagasy",names:["Malagasy"],"iso639-2":"mlg","iso639-1":"mg"},Malay:{name:"Malay",names:["Malay"],"iso639-2":"may/msa","iso639-1":"ms"},Malayalam:{name:"Malayalam",names:["Malayalam"],"iso639-2":"mal","iso639-1":"ml"},Maldivian:{name:"Maldivian",names:["Divehi","Dhivehi","Maldivian"],"iso639-2":"div","iso639-1":"dv"},Maltese:{name:"Maltese",names:["Maltese"],"iso639-2":"mlt","iso639-1":"mt"},Manchu:{name:"Manchu",names:["Manchu"],"iso639-2":"mnc","iso639-1":null},Mandar:{name:"Mandar",names:["Mandar"],"iso639-2":"mdr","iso639-1":null},Mandingo:{name:"Mandingo",names:["Mandingo"],"iso639-2":"man","iso639-1":null},Manipuri:{name:"Manipuri",names:["Manipuri"],"iso639-2":"mni","iso639-1":null},"Manobo languages":{name:"Manobo languages",names:["Manobo languages"],"iso639-2":"mno","iso639-1":null},Manx:{name:"Manx",names:["Manx"],"iso639-2":"glv","iso639-1":"gv"},Maori:{name:"Maori",names:["Maori"],"iso639-2":"mao/mri","iso639-1":"mi"},Mapuche:{name:"Mapuche",names:["Mapudungun","Mapuche"],"iso639-2":"arn","iso639-1":null},Mapudungun:{name:"Mapudungun",names:["Mapudungun","Mapuche"],"iso639-2":"arn","iso639-1":null},Marathi:{name:"Marathi",names:["Marathi"],"iso639-2":"mar","iso639-1":"mr"},Mari:{name:"Mari",names:["Mari"],"iso639-2":"chm","iso639-1":null},Marshallese:{name:"Marshallese",names:["Marshallese"],"iso639-2":"mah","iso639-1":"mh"},Marwari:{name:"Marwari",names:["Marwari"],"iso639-2":"mwr","iso639-1":null},Masai:{name:"Masai",names:["Masai"],"iso639-2":"mas","iso639-1":null},"Mayan languages":{name:"Mayan languages",names:["Mayan languages"],"iso639-2":"myn","iso639-1":null},Mende:{name:"Mende",names:["Mende"],"iso639-2":"men","iso639-1":null},"Mi'kmaq":{name:"Mi'kmaq",names:["Mi'kmaq","Micmac"],"iso639-2":"mic","iso639-1":null},Micmac:{name:"Micmac",names:["Mi'kmaq","Micmac"],"iso639-2":"mic","iso639-1":null},Minangkabau:{name:"Minangkabau",names:["Minangkabau"],"iso639-2":"min","iso639-1":null},Mirandese:{name:"Mirandese",names:["Mirandese"],"iso639-2":"mwl","iso639-1":null},Mohawk:{name:"Mohawk",names:["Mohawk"],"iso639-2":"moh","iso639-1":null},Moksha:{name:"Moksha",names:["Moksha"],"iso639-2":"mdf","iso639-1":null},Moldavian:{name:"Moldavian",names:["Romanian","Moldavian","Moldovan"],"iso639-2":"rum/ron","iso639-1":"ro"},Moldovan:{name:"Moldovan",names:["Romanian","Moldavian","Moldovan"],"iso639-2":"rum/ron","iso639-1":"ro"},"Mon-Khmer languages":{name:"Mon-Khmer languages",names:["Mon-Khmer languages"],"iso639-2":"mkh","iso639-1":null},Mong:{name:"Mong",names:["Hmong","Mong"],"iso639-2":"hmn","iso639-1":null},Mongo:{name:"Mongo",names:["Mongo"],"iso639-2":"lol","iso639-1":null},Mongolian:{name:"Mongolian",names:["Mongolian"],"iso639-2":"mon","iso639-1":"mn"},Montenegrin:{name:"Montenegrin",names:["Montenegrin"],"iso639-2":"cnr","iso639-1":null},Mossi:{name:"Mossi",names:["Mossi"],"iso639-2":"mos","iso639-1":null},"Multiple languages":{name:"Multiple languages",names:["Multiple languages"],"iso639-2":"mul","iso639-1":null},"Munda languages":{name:"Munda languages",names:["Munda languages"],"iso639-2":"mun","iso639-1":null},"N'Ko":{name:"N'Ko",names:["N'Ko"],"iso639-2":"nqo","iso639-1":null},"Nahuatl languages":{name:"Nahuatl languages",names:["Nahuatl languages"],"iso639-2":"nah","iso639-1":null},Nauru:{name:"Nauru",names:["Nauru"],"iso639-2":"nau","iso639-1":"na"},Navaho:{name:"Navaho",names:["Navajo","Navaho"],"iso639-2":"nav","iso639-1":"nv"},Navajo:{name:"Navajo",names:["Navajo","Navaho"],"iso639-2":"nav","iso639-1":"nv"},"Ndebele, North":{name:"Ndebele, North",names:["Ndebele, North","North Ndebele"],"iso639-2":"nde","iso639-1":"nd"},"Ndebele, South":{name:"Ndebele, South",names:["Ndebele, South","South Ndebele"],"iso639-2":"nbl","iso639-1":"nr"},Ndonga:{name:"Ndonga",names:["Ndonga"],"iso639-2":"ndo","iso639-1":"ng"},Neapolitan:{name:"Neapolitan",names:["Neapolitan"],"iso639-2":"nap","iso639-1":null},"Nepal Bhasa":{name:"Nepal Bhasa",names:["Nepal Bhasa","Newari"],"iso639-2":"new","iso639-1":null},Nepali:{name:"Nepali",names:["Nepali"],"iso639-2":"nep","iso639-1":"ne"},Newari:{name:"Newari",names:["Nepal Bhasa","Newari"],"iso639-2":"new","iso639-1":null},Nias:{name:"Nias",names:["Nias"],"iso639-2":"nia","iso639-1":null},"Niger-Kordofanian languages":{name:"Niger-Kordofanian languages",names:["Niger-Kordofanian languages"],"iso639-2":"nic","iso639-1":null},"Nilo-Saharan languages":{name:"Nilo-Saharan languages",names:["Nilo-Saharan languages"],"iso639-2":"ssa","iso639-1":null},Niuean:{name:"Niuean",names:["Niuean"],"iso639-2":"niu","iso639-1":null},"No linguistic content":{name:"No linguistic content",names:["No linguistic content","Not applicable"],"iso639-2":"zxx","iso639-1":null},Nogai:{name:"Nogai",names:["Nogai"],"iso639-2":"nog","iso639-1":null},"Norse, Old":{name:"Norse, Old",names:["Norse, Old"],"iso639-2":"non","iso639-1":null},"North American Indian languages":{name:"North American Indian languages",names:["North American Indian languages"],"iso639-2":"nai","iso639-1":null},"North Ndebele":{name:"North Ndebele",names:["Ndebele, North","North Ndebele"],"iso639-2":"nde","iso639-1":"nd"},"Northern Frisian":{name:"Northern Frisian",names:["Northern Frisian"],"iso639-2":"frr","iso639-1":null},"Northern Sami":{name:"Northern Sami",names:["Northern Sami"],"iso639-2":"sme","iso639-1":"se"},"Northern Sotho":{name:"Northern Sotho",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},Norwegian:{name:"Norwegian",names:["Norwegian"],"iso639-2":"nor","iso639-1":"no"},"Norwegian Bokmål":{name:"Norwegian Bokmål",names:["Bokmål, Norwegian","Norwegian Bokmål"],"iso639-2":"nob","iso639-1":"nb"},"Norwegian Nynorsk":{name:"Norwegian Nynorsk",names:["Norwegian Nynorsk","Nynorsk, Norwegian"],"iso639-2":"nno","iso639-1":"nn"},"Not applicable":{name:"Not applicable",names:["No linguistic content","Not applicable"],"iso639-2":"zxx","iso639-1":null},"Nubian languages":{name:"Nubian languages",names:["Nubian languages"],"iso639-2":"nub","iso639-1":null},Nuosu:{name:"Nuosu",names:["Sichuan Yi","Nuosu"],"iso639-2":"iii","iso639-1":"ii"},Nyamwezi:{name:"Nyamwezi",names:["Nyamwezi"],"iso639-2":"nym","iso639-1":null},Nyanja:{name:"Nyanja",names:["Chichewa","Chewa","Nyanja"],"iso639-2":"nya","iso639-1":"ny"},Nyankole:{name:"Nyankole",names:["Nyankole"],"iso639-2":"nyn","iso639-1":null},"Nynorsk, Norwegian":{name:"Nynorsk, Norwegian",names:["Norwegian Nynorsk","Nynorsk, Norwegian"],"iso639-2":"nno","iso639-1":"nn"},Nyoro:{name:"Nyoro",names:["Nyoro"],"iso639-2":"nyo","iso639-1":null},Nzima:{name:"Nzima",names:["Nzima"],"iso639-2":"nzi","iso639-1":null},Occidental:{name:"Occidental",names:["Interlingue","Occidental"],"iso639-2":"ile","iso639-1":"ie"},"Occitan (post 1500)":{name:"Occitan (post 1500)",names:["Occitan (post 1500)"],"iso639-2":"oci","iso639-1":"oc"},"Occitan, Old (to 1500)":{name:"Occitan, Old (to 1500)",names:["Provençal, Old (to 1500)","Occitan, Old (to 1500)"],"iso639-2":"pro","iso639-1":null},"Official Aramaic (700-300 BCE)":{name:"Official Aramaic (700-300 BCE)",names:["Official Aramaic (700-300 BCE)","Imperial Aramaic (700-300 BCE)"],"iso639-2":"arc","iso639-1":null},Oirat:{name:"Oirat",names:["Kalmyk","Oirat"],"iso639-2":"xal","iso639-1":null},Ojibwa:{name:"Ojibwa",names:["Ojibwa"],"iso639-2":"oji","iso639-1":"oj"},"Old Bulgarian":{name:"Old Bulgarian",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},"Old Church Slavonic":{name:"Old Church Slavonic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},"Old Newari":{name:"Old Newari",names:["Classical Newari","Old Newari","Classical Nepal Bhasa"],"iso639-2":"nwc","iso639-1":null},"Old Slavonic":{name:"Old Slavonic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},Oriya:{name:"Oriya",names:["Oriya"],"iso639-2":"ori","iso639-1":"or"},Oromo:{name:"Oromo",names:["Oromo"],"iso639-2":"orm","iso639-1":"om"},Osage:{name:"Osage",names:["Osage"],"iso639-2":"osa","iso639-1":null},Ossetian:{name:"Ossetian",names:["Ossetian","Ossetic"],"iso639-2":"oss","iso639-1":"os"},Ossetic:{name:"Ossetic",names:["Ossetian","Ossetic"],"iso639-2":"oss","iso639-1":"os"},"Otomian languages":{name:"Otomian languages",names:["Otomian languages"],"iso639-2":"oto","iso639-1":null},Pahlavi:{name:"Pahlavi",names:["Pahlavi"],"iso639-2":"pal","iso639-1":null},Palauan:{name:"Palauan",names:["Palauan"],"iso639-2":"pau","iso639-1":null},Pali:{name:"Pali",names:["Pali"],"iso639-2":"pli","iso639-1":"pi"},Pampanga:{name:"Pampanga",names:["Pampanga","Kapampangan"],"iso639-2":"pam","iso639-1":null},Pangasinan:{name:"Pangasinan",names:["Pangasinan"],"iso639-2":"pag","iso639-1":null},Panjabi:{name:"Panjabi",names:["Panjabi","Punjabi"],"iso639-2":"pan","iso639-1":"pa"},Papiamento:{name:"Papiamento",names:["Papiamento"],"iso639-2":"pap","iso639-1":null},"Papuan languages":{name:"Papuan languages",names:["Papuan languages"],"iso639-2":"paa","iso639-1":null},Pashto:{name:"Pashto",names:["Pushto","Pashto"],"iso639-2":"pus","iso639-1":"ps"},Pedi:{name:"Pedi",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},Persian:{name:"Persian",names:["Persian"],"iso639-2":"per/fas","iso639-1":"fa"},"Persian, Old (ca.600-400 B.C.)":{name:"Persian, Old (ca.600-400 B.C.)",names:["Persian, Old (ca.600-400 B.C.)"],"iso639-2":"peo","iso639-1":null},"Philippine languages":{name:"Philippine languages",names:["Philippine languages"],"iso639-2":"phi","iso639-1":null},Phoenician:{name:"Phoenician",names:["Phoenician"],"iso639-2":"phn","iso639-1":null},Pilipino:{name:"Pilipino",names:["Filipino","Pilipino"],"iso639-2":"fil","iso639-1":null},Pohnpeian:{name:"Pohnpeian",names:["Pohnpeian"],"iso639-2":"pon","iso639-1":null},Polish:{name:"Polish",names:["Polish"],"iso639-2":"pol","iso639-1":"pl"},Portuguese:{name:"Portuguese",names:["Portuguese"],"iso639-2":"por","iso639-1":"pt"},"Prakrit languages":{name:"Prakrit languages",names:["Prakrit languages"],"iso639-2":"pra","iso639-1":null},"Provençal, Old (to 1500)":{name:"Provençal, Old (to 1500)",names:["Provençal, Old (to 1500)","Occitan, Old (to 1500)"],"iso639-2":"pro","iso639-1":null},Punjabi:{name:"Punjabi",names:["Panjabi","Punjabi"],"iso639-2":"pan","iso639-1":"pa"},Pushto:{name:"Pushto",names:["Pushto","Pashto"],"iso639-2":"pus","iso639-1":"ps"},Quechua:{name:"Quechua",names:["Quechua"],"iso639-2":"que","iso639-1":"qu"},Rajasthani:{name:"Rajasthani",names:["Rajasthani"],"iso639-2":"raj","iso639-1":null},Rapanui:{name:"Rapanui",names:["Rapanui"],"iso639-2":"rap","iso639-1":null},Rarotongan:{name:"Rarotongan",names:["Rarotongan","Cook Islands Maori"],"iso639-2":"rar","iso639-1":null},"Reserved for local use":{name:"Reserved for local use",names:["Reserved for local use"],"iso639-2":"qaa-qtz","iso639-1":null},"Romance languages":{name:"Romance languages",names:["Romance languages"],"iso639-2":"roa","iso639-1":null},Romanian:{name:"Romanian",names:["Romanian","Moldavian","Moldovan"],"iso639-2":"rum/ron","iso639-1":"ro"},Romansh:{name:"Romansh",names:["Romansh"],"iso639-2":"roh","iso639-1":"rm"},Romany:{name:"Romany",names:["Romany"],"iso639-2":"rom","iso639-1":null},Rundi:{name:"Rundi",names:["Rundi"],"iso639-2":"run","iso639-1":"rn"},Russian:{name:"Russian",names:["Russian"],"iso639-2":"rus","iso639-1":"ru"},Sakan:{name:"Sakan",names:["Khotanese","Sakan"],"iso639-2":"kho","iso639-1":null},"Salishan languages":{name:"Salishan languages",names:["Salishan languages"],"iso639-2":"sal","iso639-1":null},"Samaritan Aramaic":{name:"Samaritan Aramaic",names:["Samaritan Aramaic"],"iso639-2":"sam","iso639-1":null},"Sami languages":{name:"Sami languages",names:["Sami languages"],"iso639-2":"smi","iso639-1":null},Samoan:{name:"Samoan",names:["Samoan"],"iso639-2":"smo","iso639-1":"sm"},Sandawe:{name:"Sandawe",names:["Sandawe"],"iso639-2":"sad","iso639-1":null},Sango:{name:"Sango",names:["Sango"],"iso639-2":"sag","iso639-1":"sg"},Sanskrit:{name:"Sanskrit",names:["Sanskrit"],"iso639-2":"san","iso639-1":"sa"},Santali:{name:"Santali",names:["Santali"],"iso639-2":"sat","iso639-1":null},Sardinian:{name:"Sardinian",names:["Sardinian"],"iso639-2":"srd","iso639-1":"sc"},Sasak:{name:"Sasak",names:["Sasak"],"iso639-2":"sas","iso639-1":null},"Saxon, Low":{name:"Saxon, Low",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},Scots:{name:"Scots",names:["Scots"],"iso639-2":"sco","iso639-1":null},"Scottish Gaelic":{name:"Scottish Gaelic",names:["Gaelic","Scottish Gaelic"],"iso639-2":"gla","iso639-1":"gd"},Selkup:{name:"Selkup",names:["Selkup"],"iso639-2":"sel","iso639-1":null},"Semitic languages":{name:"Semitic languages",names:["Semitic languages"],"iso639-2":"sem","iso639-1":null},Sepedi:{name:"Sepedi",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},Serbian:{name:"Serbian",names:["Serbian"],"iso639-2":"srp","iso639-1":"sr"},Serer:{name:"Serer",names:["Serer"],"iso639-2":"srr","iso639-1":null},Shan:{name:"Shan",names:["Shan"],"iso639-2":"shn","iso639-1":null},Shona:{name:"Shona",names:["Shona"],"iso639-2":"sna","iso639-1":"sn"},"Sichuan Yi":{name:"Sichuan Yi",names:["Sichuan Yi","Nuosu"],"iso639-2":"iii","iso639-1":"ii"},Sicilian:{name:"Sicilian",names:["Sicilian"],"iso639-2":"scn","iso639-1":null},Sidamo:{name:"Sidamo",names:["Sidamo"],"iso639-2":"sid","iso639-1":null},"Sign Languages":{name:"Sign Languages",names:["Sign Languages"],"iso639-2":"sgn","iso639-1":null},Siksika:{name:"Siksika",names:["Siksika"],"iso639-2":"bla","iso639-1":null},Sindhi:{name:"Sindhi",names:["Sindhi"],"iso639-2":"snd","iso639-1":"sd"},Sinhala:{name:"Sinhala",names:["Sinhala","Sinhalese"],"iso639-2":"sin","iso639-1":"si"},Sinhalese:{name:"Sinhalese",names:["Sinhala","Sinhalese"],"iso639-2":"sin","iso639-1":"si"},"Sino-Tibetan languages":{name:"Sino-Tibetan languages",names:["Sino-Tibetan languages"],"iso639-2":"sit","iso639-1":null},"Siouan languages":{name:"Siouan languages",names:["Siouan languages"],"iso639-2":"sio","iso639-1":null},"Skolt Sami":{name:"Skolt Sami",names:["Skolt Sami"],"iso639-2":"sms","iso639-1":null},"Slave (Athapascan)":{name:"Slave (Athapascan)",names:["Slave (Athapascan)"],"iso639-2":"den","iso639-1":null},"Slavic languages":{name:"Slavic languages",names:["Slavic languages"],"iso639-2":"sla","iso639-1":null},Slovak:{name:"Slovak",names:["Slovak"],"iso639-2":"slo/slk","iso639-1":"sk"},Slovenian:{name:"Slovenian",names:["Slovenian"],"iso639-2":"slv","iso639-1":"sl"},Sogdian:{name:"Sogdian",names:["Sogdian"],"iso639-2":"sog","iso639-1":null},Somali:{name:"Somali",names:["Somali"],"iso639-2":"som","iso639-1":"so"},"Songhai languages":{name:"Songhai languages",names:["Songhai languages"],"iso639-2":"son","iso639-1":null},Soninke:{name:"Soninke",names:["Soninke"],"iso639-2":"snk","iso639-1":null},"Sorbian languages":{name:"Sorbian languages",names:["Sorbian languages"],"iso639-2":"wen","iso639-1":null},"Sotho, Northern":{name:"Sotho, Northern",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},"Sotho, Southern":{name:"Sotho, Southern",names:["Sotho, Southern"],"iso639-2":"sot","iso639-1":"st"},"South American Indian languages":{name:"South American Indian languages",names:["South American Indian languages"],"iso639-2":"sai","iso639-1":null},"South Ndebele":{name:"South Ndebele",names:["Ndebele, South","South Ndebele"],"iso639-2":"nbl","iso639-1":"nr"},"Southern Altai":{name:"Southern Altai",names:["Southern Altai"],"iso639-2":"alt","iso639-1":null},"Southern Sami":{name:"Southern Sami",names:["Southern Sami"],"iso639-2":"sma","iso639-1":null},Spanish:{name:"Spanish",names:["Spanish","Castilian"],"iso639-2":"spa","iso639-1":"es"},"Sranan Tongo":{name:"Sranan Tongo",names:["Sranan Tongo"],"iso639-2":"srn","iso639-1":null},"Standard Moroccan Tamazight":{name:"Standard Moroccan Tamazight",names:["Standard Moroccan Tamazight"],"iso639-2":"zgh","iso639-1":null},Sukuma:{name:"Sukuma",names:["Sukuma"],"iso639-2":"suk","iso639-1":null},Sumerian:{name:"Sumerian",names:["Sumerian"],"iso639-2":"sux","iso639-1":null},Sundanese:{name:"Sundanese",names:["Sundanese"],"iso639-2":"sun","iso639-1":"su"},Susu:{name:"Susu",names:["Susu"],"iso639-2":"sus","iso639-1":null},Swahili:{name:"Swahili",names:["Swahili"],"iso639-2":"swa","iso639-1":"sw"},Swati:{name:"Swati",names:["Swati"],"iso639-2":"ssw","iso639-1":"ss"},Swedish:{name:"Swedish",names:["Swedish"],"iso639-2":"swe","iso639-1":"sv"},"Swiss German":{name:"Swiss German",names:["Swiss German","Alemannic","Alsatian"],"iso639-2":"gsw","iso639-1":null},Syriac:{name:"Syriac",names:["Syriac"],"iso639-2":"syr","iso639-1":null},Tagalog:{name:"Tagalog",names:["Tagalog"],"iso639-2":"tgl","iso639-1":"tl"},Tahitian:{name:"Tahitian",names:["Tahitian"],"iso639-2":"tah","iso639-1":"ty"},"Tai languages":{name:"Tai languages",names:["Tai languages"],"iso639-2":"tai","iso639-1":null},Tajik:{name:"Tajik",names:["Tajik"],"iso639-2":"tgk","iso639-1":"tg"},Tamashek:{name:"Tamashek",names:["Tamashek"],"iso639-2":"tmh","iso639-1":null},Tamil:{name:"Tamil",names:["Tamil"],"iso639-2":"tam","iso639-1":"ta"},Tatar:{name:"Tatar",names:["Tatar"],"iso639-2":"tat","iso639-1":"tt"},Telugu:{name:"Telugu",names:["Telugu"],"iso639-2":"tel","iso639-1":"te"},Tereno:{name:"Tereno",names:["Tereno"],"iso639-2":"ter","iso639-1":null},Tetum:{name:"Tetum",names:["Tetum"],"iso639-2":"tet","iso639-1":null},Thai:{name:"Thai",names:["Thai"],"iso639-2":"tha","iso639-1":"th"},Tibetan:{name:"Tibetan",names:["Tibetan"],"iso639-2":"tib/bod","iso639-1":"bo"},Tigre:{name:"Tigre",names:["Tigre"],"iso639-2":"tig","iso639-1":null},Tigrinya:{name:"Tigrinya",names:["Tigrinya"],"iso639-2":"tir","iso639-1":"ti"},Timne:{name:"Timne",names:["Timne"],"iso639-2":"tem","iso639-1":null},Tiv:{name:"Tiv",names:["Tiv"],"iso639-2":"tiv","iso639-1":null},"tlhIngan-Hol":{name:"tlhIngan-Hol",names:["Klingon","tlhIngan-Hol"],"iso639-2":"tlh","iso639-1":null},Tlingit:{name:"Tlingit",names:["Tlingit"],"iso639-2":"tli","iso639-1":null},"Tok Pisin":{name:"Tok Pisin",names:["Tok Pisin"],"iso639-2":"tpi","iso639-1":null},Tokelau:{name:"Tokelau",names:["Tokelau"],"iso639-2":"tkl","iso639-1":null},"Tonga (Nyasa)":{name:"Tonga (Nyasa)",names:["Tonga (Nyasa)"],"iso639-2":"tog","iso639-1":null},"Tonga (Tonga Islands)":{name:"Tonga (Tonga Islands)",names:["Tonga (Tonga Islands)"],"iso639-2":"ton","iso639-1":"to"},Tsimshian:{name:"Tsimshian",names:["Tsimshian"],"iso639-2":"tsi","iso639-1":null},Tsonga:{name:"Tsonga",names:["Tsonga"],"iso639-2":"tso","iso639-1":"ts"},Tswana:{name:"Tswana",names:["Tswana"],"iso639-2":"tsn","iso639-1":"tn"},Tumbuka:{name:"Tumbuka",names:["Tumbuka"],"iso639-2":"tum","iso639-1":null},"Tupi languages":{name:"Tupi languages",names:["Tupi languages"],"iso639-2":"tup","iso639-1":null},Turkish:{name:"Turkish",names:["Turkish"],"iso639-2":"tur","iso639-1":"tr"},"Turkish, Ottoman (1500-1928)":{name:"Turkish, Ottoman (1500-1928)",names:["Turkish, Ottoman (1500-1928)"],"iso639-2":"ota","iso639-1":null},Turkmen:{name:"Turkmen",names:["Turkmen"],"iso639-2":"tuk","iso639-1":"tk"},Tuvalu:{name:"Tuvalu",names:["Tuvalu"],"iso639-2":"tvl","iso639-1":null},Tuvinian:{name:"Tuvinian",names:["Tuvinian"],"iso639-2":"tyv","iso639-1":null},Twi:{name:"Twi",names:["Twi"],"iso639-2":"twi","iso639-1":"tw"},Udmurt:{name:"Udmurt",names:["Udmurt"],"iso639-2":"udm","iso639-1":null},Ugaritic:{name:"Ugaritic",names:["Ugaritic"],"iso639-2":"uga","iso639-1":null},Uighur:{name:"Uighur",names:["Uighur","Uyghur"],"iso639-2":"uig","iso639-1":"ug"},Ukrainian:{name:"Ukrainian",names:["Ukrainian"],"iso639-2":"ukr","iso639-1":"uk"},Umbundu:{name:"Umbundu",names:["Umbundu"],"iso639-2":"umb","iso639-1":null},"Uncoded languages":{name:"Uncoded languages",names:["Uncoded languages"],"iso639-2":"mis","iso639-1":null},Undetermined:{name:"Undetermined",names:["Undetermined"],"iso639-2":"und","iso639-1":null},"Upper Sorbian":{name:"Upper Sorbian",names:["Upper Sorbian"],"iso639-2":"hsb","iso639-1":null},Urdu:{name:"Urdu",names:["Urdu"],"iso639-2":"urd","iso639-1":"ur"},Uyghur:{name:"Uyghur",names:["Uighur","Uyghur"],"iso639-2":"uig","iso639-1":"ug"},Uzbek:{name:"Uzbek",names:["Uzbek"],"iso639-2":"uzb","iso639-1":"uz"},Vai:{name:"Vai",names:["Vai"],"iso639-2":"vai","iso639-1":null},Valencian:{name:"Valencian",names:["Catalan","Valencian"],"iso639-2":"cat","iso639-1":"ca"},Venda:{name:"Venda",names:["Venda"],"iso639-2":"ven","iso639-1":"ve"},Vietnamese:{name:"Vietnamese",names:["Vietnamese"],"iso639-2":"vie","iso639-1":"vi"},"Volapük":{name:"Volapük",names:["Volapük"],"iso639-2":"vol","iso639-1":"vo"},Votic:{name:"Votic",names:["Votic"],"iso639-2":"vot","iso639-1":null},"Wakashan languages":{name:"Wakashan languages",names:["Wakashan languages"],"iso639-2":"wak","iso639-1":null},Walloon:{name:"Walloon",names:["Walloon"],"iso639-2":"wln","iso639-1":"wa"},Waray:{name:"Waray",names:["Waray"],"iso639-2":"war","iso639-1":null},Washo:{name:"Washo",names:["Washo"],"iso639-2":"was","iso639-1":null},Welsh:{name:"Welsh",names:["Welsh"],"iso639-2":"wel/cym","iso639-1":"cy"},"Western Frisian":{name:"Western Frisian",names:["Western Frisian"],"iso639-2":"fry","iso639-1":"fy"},"Western Pahari languages":{name:"Western Pahari languages",names:["Himachali languages","Western Pahari languages"],"iso639-2":"him","iso639-1":null},Wolaitta:{name:"Wolaitta",names:["Wolaitta","Wolaytta"],"iso639-2":"wal","iso639-1":null},Wolaytta:{name:"Wolaytta",names:["Wolaitta","Wolaytta"],"iso639-2":"wal","iso639-1":null},Wolof:{name:"Wolof",names:["Wolof"],"iso639-2":"wol","iso639-1":"wo"},Xhosa:{name:"Xhosa",names:["Xhosa"],"iso639-2":"xho","iso639-1":"xh"},Yakut:{name:"Yakut",names:["Yakut"],"iso639-2":"sah","iso639-1":null},Yao:{name:"Yao",names:["Yao"],"iso639-2":"yao","iso639-1":null},Yapese:{name:"Yapese",names:["Yapese"],"iso639-2":"yap","iso639-1":null},Yiddish:{name:"Yiddish",names:["Yiddish"],"iso639-2":"yid","iso639-1":"yi"},Yoruba:{name:"Yoruba",names:["Yoruba"],"iso639-2":"yor","iso639-1":"yo"},"Yupik languages":{name:"Yupik languages",names:["Yupik languages"],"iso639-2":"ypk","iso639-1":null},"Zande languages":{name:"Zande languages",names:["Zande languages"],"iso639-2":"znd","iso639-1":null},Zapotec:{name:"Zapotec",names:["Zapotec"],"iso639-2":"zap","iso639-1":null},Zaza:{name:"Zaza",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Zazaki:{name:"Zazaki",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Zenaga:{name:"Zenaga",names:["Zenaga"],"iso639-2":"zen","iso639-1":null},Zhuang:{name:"Zhuang",names:["Zhuang","Chuang"],"iso639-2":"zha","iso639-1":"za"},Zulu:{name:"Zulu",names:["Zulu"],"iso639-2":"zul","iso639-1":"zu"},Zuni:{name:"Zuni",names:["Zuni"],"iso639-2":"zun","iso639-1":null}};function Zc(t){return(Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xc(t,n,e){return(n=function(t){var n=function(t,n){if("object"!==Zc(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!==Zc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===Zc(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Jc=[],Qc=Object.keys(Vc);Object.keys(Yc).map((function(t){var n,e=Yc[t],i=Qc.find((function(t){return t.toLowerCase()===e.language.toLowerCase()}));e.location&&i&&Jc.push((Xc(n={},"name",e.language),Xc(n,"location",e.location),Xc(n,"tag",e.tag),Xc(n,"lcid",e.id),Xc(n,"iso639-2",Vc[i]["iso639-2"]),Xc(n,"iso639-1",Vc[i]["iso639-1"]),n))}));var $c={ar:"ar-SA",ca:"ca-ES",da:"da-DK",en:"en-US",ko:"ko-KR",pa:"pa-IN",pt:"pt-BR",sv:"sv-SE"};function th(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}const nh="D3PLUS-COMMON-RESET",eh={"es-ES":{and:"y",Back:"Atrás","Click to Expand":"Clic para Ampliar","Click to Hide":"Clic para Ocultar","Click to Highlight":"Clic para Resaltar","Click to Show":"Clic para Mostrar","Click to Show All":"Clic para Mostrar Todo",Download:"Descargar","Loading Visualization":"Cargando Visualización",more:"más","No Data Available":"Datos No Disponibles","Powered by D3plus":"Funciona con D3plus",Share:"Porcentaje","Shift+Click to Hide":"Mayús+Clic para Ocultar","Shift+Click to Highlight":"Mayús+Clic para Resaltar",Total:"Total",Values:"Valores"},"pt-BR":{and:"e",Back:"Voltar","Click to Expand":"Clique para Expandir","Click to Hide":"Clique para Ocultar","Click to Highlight":"Clique para Destacar","Click to Show":"Clique para Mostrar","Click to Show All":"Clique para Mostrar Tudo",Download:"Baixar","Loading Visualization":"Carregando Visualização",more:"mais","No Data Available":"Dados Não Disponíveis","Powered by D3plus":"Funciona com D3plus",Share:"Porcentagem","Shift+Click to Hide":"Shift+Clique para Ocultar","Shift+Click to Highlight":"Shift+Clique para Destacar",Total:"Total",Values:"Valores"},"ar-SA":{and:"و",Back:"للخلف","Click to Expand":"انقر للتوسيع","Click to Hide":"اضغط للإخفاء","Click to Highlight":"اضغط للتحديد","Click to Show":"انقر للعرض","Click to Show All":"انقر لعرض الكل",Download:"تحميل","Loading Visualization":"جاري تحميل التصوير البياني","No Data Available":"لا تتوفر بيانات",more:"أخرى","Powered by D3plus":"مدعوم بواسطة D3plus",Share:"مشاركة","Shift+Click to Hide":"Shift+انقر للإخفاء","Shift+Click to Highlight":"Shift + للتحديد اضغط",Total:"المجموع",Values:"القيم"}};function ih(t){return(ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rh(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:n._locale,i=eh[e];return i&&i[t]?i[t]:t},this._uuid="".concat(th()).concat(th(),"-").concat(th(),"-").concat(th(),"-").concat(th(),"-").concat(th()).concat(th()).concat(th())}var n,e,i;return n=t,e=[{key:"config",value:function(t){var n=this;if(!this._configDefault){var e={};oh(this.__proto__).forEach((function(t){var i=n[t]();i!==n&&(e[t]=Uc(i)?qc({},i):i)})),this._configDefault=e}if(arguments.length){for(var i in t)if({}.hasOwnProperty.call(t,i)&&i in this){var r=t[i];r===nh?"on"===i?this._on=this._configDefault[i]:this[i](this._configDefault[i]):(ah(r,this._configDefault[i]),this[i](r))}return this}var a={};return oh(this.__proto__).forEach((function(t){a[t]=n[t]()})),a}},{key:"locale",value:function(t){return arguments.length?(this._locale=function(t){if("string"!=typeof t||5===t.length)return t;if($c[t])return $c[t];var n=Jc.filter((function(n){return n["iso639-1"]===t}));return n.length?1===n.length?n[0].tag:n.find((function(n){return n.tag==="".concat(t,"-").concat(t.toUpperCase())}))?"".concat(t,"-").concat(t.toUpperCase()):n[0].tag:t}(t),this):this._locale}},{key:"on",value:function(t,n){return 2===arguments.length?(this._on[t]=n,this):arguments.length?"string"==typeof t?this._on[t]:(this._on=Object.assign({},this._on,t),this):this._on}},{key:"parent",value:function(t){return arguments.length?(this._parent=t,this):this._parent}},{key:"translate",value:function(t){return arguments.length?(this._translate=t,this):this._translate}},{key:"shapeConfig",value:function(t){return arguments.length?(this._shapeConfig=qc(this._shapeConfig,t),this):this._shapeConfig}}],e&&rh(n.prototype,e),i&&rh(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function lh(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(n&&n instanceof Array&&n.length)return n.reduce((function(n,e){return Math.abs(e-t)0&&void 0!==arguments[0]?arguments[0]:this._shapeConfig,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shape",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={duration:this._duration,on:{}},a=function(n){return function(e,i,r,a){if(!n)return n;for(var o;e.__d3plus__;)o&&(e.__d3plusParent__=o),o=e,i=e.i,e=e.data||e.feature;return n.bind(t)(e,i,r||o,a)}},o=function(t,n){for(var i in n)({}.hasOwnProperty.call(n,i)&&!i.includes(".")||i.includes(".".concat(e)))&&(t.on[i]=a(n[i]))},u=function t(n){return n.map((function(n){return n instanceof Array?t(n):"object"===sh(n)?l({},n):"function"==typeof n?a(n):n}))},l=function t(n,e){for(var i in e)({}).hasOwnProperty.call(e,i)&&("on"===i?o(n,e[i]):"function"==typeof e[i]?n[i]=a(e[i]):e[i]instanceof Array?n[i]=u(e[i]):"object"===sh(e[i])?(n[i]||(n[i]={}),n[i].on={},t(n[i],e[i])):n[i]=e[i])};return l(r,n),this._on&&o(r,this._on),i&&n[i]&&(l(r,n[i]),n[i].on&&o(r,n[i].on)),r}function hh(t){return function(){return t}}var fh="http://www.w3.org/1999/xhtml";const gh={svg:"http://www.w3.org/2000/svg",xhtml:fh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dh(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),gh.hasOwnProperty(n)?{space:gh[n],local:t}:t}function ph(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===fh&&n.documentElement.namespaceURI===fh?n.createElement(t):n.createElementNS(e,t)}}function mh(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _h(t){var n=dh(t);return(n.local?mh:ph)(n)}function yh(){}function vh(t){return null==t?yh:function(){return this.querySelector(t)}}function bh(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function wh(){return[]}function Sh(t){return null==t?wh:function(){return this.querySelectorAll(t)}}function xh(t){return function(){return this.matches(t)}}function kh(t){return function(n){return n.matches(t)}}var Ch=Array.prototype.find;function Ah(){return this.firstElementChild}var Eh=Array.prototype.filter;function Mh(){return Array.from(this.children)}function Th(t){return new Array(t.length)}function Oh(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function Ph(t,n,e,i,r,a){for(var o,u=0,l=n.length,s=a.length;un?1:t>=n?0:NaN}function Nh(t){return function(){this.removeAttribute(t)}}function Rh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fh(t,n){return function(){this.setAttribute(t,n)}}function Lh(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ih(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Hh(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Gh(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Kh(t){return function(){this.style.removeProperty(t)}}function Uh(t,n,e){return function(){this.style.setProperty(t,n,e)}}function qh(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function Wh(t,n){return t.style.getPropertyValue(n)||Gh(t).getComputedStyle(t,null).getPropertyValue(n)}function Yh(t){return function(){delete this[t]}}function Vh(t,n){return function(){this[t]=n}}function Zh(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Xh(t){return t.trim().split(/^|\s+/)}function Jh(t){return t.classList||new Qh(t)}function Qh(t){this._node=t,this._names=Xh(t.getAttribute("class")||"")}function $h(t,n){for(var e=Jh(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Sf=[null];function xf(t,n){this._groups=t,this._parents=n}function kf(){return new xf([[document.documentElement]],Sf)}function Cf(t){return"string"==typeof t?new xf([[document.querySelector(t)]],[document.documentElement]):new xf([[t]],Sf)}function Af(t){let n;for(;n=t.sourceEvent;)t=n;return t}function Ef(t,n){if(t=Af(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(n.getScreenCTM().inverse())).x,i.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}xf.prototype=kf.prototype={constructor:xf,select:function(t){"function"!=typeof t&&(t=vh(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r=w&&(w=b+1);!(v=_[w])&&++w=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=zh);for(var e=this._groups,i=e.length,r=new Array(i),a=0;a1?this.each((null==n?Kh:"function"==typeof n?qh:Uh)(t,n,null==e?"":e)):Wh(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Yh:"function"==typeof n?Zh:Vh)(t,n)):this.node()[t]},classed:function(t,n){var e=Xh(t+"");if(arguments.length<2){for(var i=Jh(this.node()),r=-1,a=e.length;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(u=n?yf:_f,i=0;i{}};function Tf(){for(var t,n=0,e=arguments.length,i={};n=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,u=a.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,i,r=new Array(e),a=0;a=0&&n._call.call(void 0,t),n=n._next;--zf}()}finally{zf=0,function(){var t,n,e=Bf,i=1/0;for(;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Bf=n);Df=t,Xf(i)}(),If=0}}function Zf(){var t=Gf.now(),n=t-Lf;n>Ff&&(Hf-=n,Lf=t)}function Xf(t){zf||(Nf&&(Nf=clearTimeout(Nf)),t-If>24?(t<1/0&&(Nf=setTimeout(Vf,t-Gf.now()-Hf)),Rf&&(Rf=clearInterval(Rf))):(Rf||(Lf=Gf.now(),Rf=setInterval(Zf,Ff)),zf=1,Kf(Vf)))}function Jf(t,n,e){var i=new Wf;return n=null==n?0:+n,i.restart((e=>{i.stop(),t(e+n)}),n,e),i}Wf.prototype=Yf.prototype={constructor:Wf,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Uf():+e)+(null==n?0:+n),this._next||Df===this||(Df?Df._next=this:Bf=this,Df=this),this._call=t,this._time=e,Xf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xf())}};var Qf=Tf("start","end","cancel","interrupt"),$f=[],tg=0,ng=1,eg=2,ig=3,rg=4,ag=5,og=6;function ug(t,n,e,i,r,a){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var i,r=t.__transition;function a(t){e.state=ng,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}function o(a){var s,c,h,f;if(e.state!==ng)return l();for(s in r)if((f=r[s]).name===e.name){if(f.state===ig)return Jf(o);f.state===rg?(f.state=og,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[s]):+stg)throw new Error("too late; already scheduled");return e}function sg(t,n){var e=cg(t,n);if(e.state>ig)throw new Error("too late; already running");return e}function cg(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function hg(t,n){var e,i,r,a=t.__transition,o=!0;if(a){for(r in n=null==n?null:n+"",a)(e=a[r]).name===n?(i=e.state>eg&&e.state>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?jg(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?jg(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=wg.exec(t))?new Dg(n[1],n[2],n[3],1):(n=Sg.exec(t))?new Dg(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=xg.exec(t))?jg(n[1],n[2],n[3],n[4]):(n=kg.exec(t))?jg(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Cg.exec(t))?Ig(n[1],n[2]/100,n[3]/100,1):(n=Ag.exec(t))?Ig(n[1],n[2]/100,n[3]/100,n[4]):Eg.hasOwnProperty(t)?Pg(Eg[t]):"transparent"===t?new Dg(NaN,NaN,NaN,0):null}function Pg(t){return new Dg(t>>16&255,t>>8&255,255&t,1)}function jg(t,n,e,i){return i<=0&&(t=n=e=NaN),new Dg(t,n,e,i)}function Bg(t,n,e,i){return 1===arguments.length?((r=t)instanceof dg||(r=Og(r)),r?new Dg((r=r.rgb()).r,r.g,r.b,r.opacity):new Dg):new Dg(t,n,e,null==i?1:i);var r}function Dg(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function zg(){return"#".concat(Lg(this.r)).concat(Lg(this.g)).concat(Lg(this.b))}function Ng(){const t=Rg(this.opacity);return"".concat(1===t?"rgb(":"rgba(").concat(Fg(this.r),", ").concat(Fg(this.g),", ").concat(Fg(this.b)).concat(1===t?")":", ".concat(t,")"))}function Rg(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Fg(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Lg(t){return((t=Fg(t))<16?"0":"")+t.toString(16)}function Ig(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Kg(t,n,e,i)}function Hg(t){if(t instanceof Kg)return new Kg(t.h,t.s,t.l,t.opacity);if(t instanceof dg||(t=Og(t)),!t)return new Kg;if(t instanceof Kg)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),a=Math.max(n,e,i),o=NaN,u=a-r,l=(a+r)/2;return u?(o=n===a?(e-i)/u+6*(e0&&l<1?0:o,new Kg(o,u,l,t.opacity)}function Gg(t,n,e,i){return 1===arguments.length?Hg(t):new Kg(t,n,e,null==i?1:i)}function Kg(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Ug(t){return(t=(t||0)%360)<0?t+360:t}function qg(t){return Math.max(0,Math.min(1,t||0))}function Wg(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}fg(dg,Og,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Mg,formatHex:Mg,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Hg(this).formatHsl()},formatRgb:Tg,toString:Tg}),fg(Dg,Bg,gg(dg,{brighter(t){return t=null==t?mg:Math.pow(mg,t),new Dg(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?pg:Math.pow(pg,t),new Dg(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Dg(Fg(this.r),Fg(this.g),Fg(this.b),Rg(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:zg,formatHex:zg,formatHex8:function(){return"#".concat(Lg(this.r)).concat(Lg(this.g)).concat(Lg(this.b)).concat(Lg(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:Ng,toString:Ng})),fg(Kg,Gg,gg(dg,{brighter(t){return t=null==t?mg:Math.pow(mg,t),new Kg(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?pg:Math.pow(pg,t),new Kg(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new Dg(Wg(t>=240?t-240:t+120,r,i),Wg(t,r,i),Wg(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Kg(Ug(this.h),qg(this.s),qg(this.l),Rg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Rg(this.opacity);return"".concat(1===t?"hsl(":"hsla(").concat(Ug(this.h),", ").concat(100*qg(this.s),"%, ").concat(100*qg(this.l),"%").concat(1===t?")":", ".concat(t,")"))}}));const Yg=t=>()=>t;function Vg(t){return 1==(t=+t)?Zg:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):Yg(isNaN(n)?e:n)}}function Zg(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):Yg(isNaN(t)?n:t)}const Xg=function t(n){var e=Vg(n);function i(t,n){var i=e((t=Bg(t)).r,(n=Bg(n)).r),r=e(t.g,n.g),a=e(t.b,n.b),o=Zg(t.opacity,n.opacity);return function(n){return t.r=i(n),t.g=r(n),t.b=a(n),t.opacity=o(n),t+""}}return i.gamma=t,i}(1);function Jg(t,n){n||(n=[]);var e,i=t?Math.min(n.length,t.length):0,r=n.slice();return function(a){for(e=0;ea&&(r=n.slice(a,r),u[o]?u[o]+=r:u[++o]=r),(e=e[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,l.push({i:o,x:td(e,i)})),a=id.lastIndex;return a180?n+=360:n-t>180&&(t+=360),a.push({i:e.push(r(e)+"rotate(",null,i)-2,x:td(t,n)})):n&&e.push(r(e)+"rotate("+n+i)}(a.rotate,o.rotate,u,l),function(t,n,e,a){t!==n?a.push({i:e.push(r(e)+"skewX(",null,i)-2,x:td(t,n)}):n&&e.push(r(e)+"skewX("+n+i)}(a.skewX,o.skewX,u,l),function(t,n,e,i,a,o){if(t!==e||n!==i){var u=a.push(r(a)+"scale(",null,",",null,")");o.push({i:u-4,x:td(t,e)},{i:u-2,x:td(n,i)})}else 1===e&&1===i||a.push(r(a)+"scale("+e+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,l),a=o=null,function(t){for(var n,e=-1,i=l.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?lg:sg;return function(){var o=a(this,t),u=o.on;u!==i&&(r=(i=u).copy()).on(n,e),o.on=r}}(e,t,n))},attr:function(t,n){var e=dh(t),i="transform"===e?gd:vd;return this.attrTween(t,"function"==typeof n?(e.local?Cd:kd)(e,i,yd(this,"attr."+t,n)):null==n?(e.local?wd:bd)(e):(e.local?xd:Sd)(e,i,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=dh(t);return this.tween(e,(i.local?Ad:Ed)(i,n))},style:function(t,n,e){var i="transform"==(t+="")?fd:vd;return null==n?this.styleTween(t,function(t,n){var e,i,r;return function(){var a=Wh(this,t),o=(this.style.removeProperty(t),Wh(this,t));return a===o?null:a===e&&o===i?r:r=n(e=a,i=o)}}(t,i)).on("end.style."+t,Bd(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var i,r,a;return function(){var o=Wh(this,t),u=e(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=Wh(this,t)),o===l?null:o===i&&l===r?a:(r=l,a=n(i=o,u))}}(t,i,yd(this,"style."+t,n))).each(function(t,n){var e,i,r,a,o="style."+n,u="end."+o;return function(){var l=sg(this,t),s=l.on,c=null==l.value[o]?a||(a=Bd(n)):void 0;s===e&&r===c||(i=(e=s).copy()).on(u,r=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,n,e){var i,r,a=e+"";return function(){var o=Wh(this,t);return o===a?null:o===i?r:r=n(i=o,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function(t,n,e){var i,r;function a(){var a=n.apply(this,arguments);return a!==r&&(i=(r=a)&&function(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,a,e)),i}return a._value=n,a}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(yd(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function i(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&function(t){return function(n){this.textContent=t.call(this,n)}}(i)),n}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var i,r=cg(this.node(),e).tween,a=0,o=r.length;a1&&void 0!==arguments[1]?arguments[1]:function(t){return t},e=t.map(n).map((function(t){return t instanceof Date?+t:t}));return t.filter((function(t,i){var r=n(t);return e.indexOf(r instanceof Date?+r:r)===i}))}function Kd(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=Gd(_n(t.map((function(t){return Object.keys(t)})))),i={};return e.forEach((function(e){var r;if(n[e])r=n[e](t,(function(t){return t[e]}));else{var a=t.map((function(t){return t[e]})),o=a.map((function(t){return t||!1===t?t.constructor:t})).filter((function(t){return void 0!==t}));o.length?o.indexOf(Array)>=0?1===(r=Gd(r=_n(a.map((function(t){return t instanceof Array?t:[t]}))))).length&&(r=r[0]):o.indexOf(String)>=0?1===(r=Gd(a)).length&&(r=r[0]):o.indexOf(Number)>=0?r=vn(a):o.indexOf(Object)>=0?r=1===(r=Gd(a.filter((function(t){return t})))).length?r[0]:Kd(r):1===(r=Gd(a.filter((function(t){return void 0!==t})))).length&&(r=r[0]):r=void 0}i[e]=r})),i}function Ud(t){var n;return 1===(n="number"==typeof t?[t]:t.split(/\s+/)).length?n=[n[0],n[0],n[0],n[0]]:2===n.length?n=n.concat(n):3===n.length&&n.push(n[1]),["top","right","bottom","left"].reduce((function(t,e,i){var r=parseFloat(n[i]);return t[e]=r||0,t}),{})}function qd(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var e in n)({}).hasOwnProperty.call(n,e)&&t.style(e,n[e])}kf.prototype.interrupt=function(t){return this.each((function(){hg(this,t)}))},kf.prototype.transition=function(t){var n,e;t instanceof zd?(n=t._id,t=t._name):(n=Rd(),(e=Ld).time=Uf(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a=i.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var l,s,c,h=-1,f=e.length,g=i[r++],d=Vd(),p=o();++hi.length)return t;var a,u=r[e-1];return null!=n&&e>=i.length?a=t.entries():(a=[],t.each((function(t,n){a.push({key:n,values:o(t,e)})}))),null!=u?a.sort((function(t,n){return u(t.key,n.key)})):a}return e={object:function(t){return a(t,0,Xd,Jd)},map:function(t){return a(t,0,Qd,$d)},entries:function(t){return o(a(t,0,Qd,$d),0)},key:function(t){return i.push(t),e},sortKeys:function(t){return r[i.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}}function Xd(){return{}}function Jd(t,n,e){t[n]=e}function Qd(){return Vd()}function $d(t,n,e){t.set(n,e)}function tp(){}Yd.prototype=Vd.prototype={constructor:Yd,has:function(t){return Wd+t in this},get:function(t){return this[Wd+t]},set:function(t,n){return this[Wd+t]=n,this},remove:function(t){var n=Wd+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===Wd&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===Wd&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===Wd&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===Wd&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===Wd&&++t;return t},empty:function(){for(var t in this)if(t[0]===Wd)return!1;return!0},each:function(t){for(var n in this)n[0]===Wd&&t(this[n],n.slice(1),this)}};var np=Vd.prototype;function ep(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function ip(t,n){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof n?this.interpolator(n):this.range(n)}return this}tp.prototype={constructor:tp,has:np.has,add:function(t){return this[Wd+(t+="")]=t,this},remove:np.remove,clear:np.clear,values:np.keys,size:np.size,empty:np.empty,each:np.each};const rp=Symbol("implicit");function ap(){var t=new Xt,n=[],e=[],i=rp;function r(r){let a=t.get(r);if(void 0===a){if(i!==rp)return i;t.set(r,a=n.push(r)-1)}return e[a%e.length]}return r.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Xt;for(const i of e)t.has(i)||t.set(i,n.push(i)-1);return r},r.range=function(t){return arguments.length?(e=Array.from(t),r):e.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return ap(n,e).unknown(i)},ep.apply(r,arguments),r}function op(){var t,n,e=ap().unknown(void 0),i=e.domain,r=e.range,a=0,o=1,u=!1,l=0,s=0,c=.5;function h(){var e=i().length,h=on&&(e=t,t=n,n=e),s=function(e){return Math.max(t,Math.min(n,e))}),i=l>2?gp:fp,r=a=null,h}function h(n){return null==n||isNaN(n=+n)?e:(r||(r=i(o.map(t),u,l)))(t(s(n)))}return h.invert=function(e){return s(n((a||(a=i(u,o.map(t),td)))(e)))},h.domain=function(t){return arguments.length?(o=Array.from(t,lp),c()):o.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},h.rangeRound=function(t){return u=Array.from(t),l=od,c()},h.clamp=function(t){return arguments.length?(s=!!t||cp,c()):s!==cp},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,i){return t=e,n=i,c()}}function mp(){return pp()(cp,cp)}function _p(t,n,e,i){var r,a=cn(t,n,e);switch((i=x(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(n));return null!=i.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(S(n)/3)))-S(Math.abs(t)))}(a,o))||(i.precision=r),k(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,S(n)-S(t))+1}(a,Math.max(Math.abs(t),Math.abs(n))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-S(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return C(i)}function yp(t){var n=t.domain;return t.ticks=function(t){var e=n();return ln(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var i=n();return _p(i[0],i[i.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var i,r,a=n(),o=0,u=a.length-1,l=a[o],s=a[u],c=10;for(s0;){if((r=sn(l,s,e))===i)return a[o]=l,a[u]=s,n(a);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}i=r}return t},t}function vp(){var t=mp();return t.copy=function(){return dp(t,vp())},ep.apply(t,arguments),yp(t)}function bp(t,n){var e,i=0,r=(t=t.slice()).length-1,a=t[i],o=t[r];return o-t(-n,e)}function Ep(t){const n=t(wp,Sp),e=n.domain;let i,r,a=10;function o(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(a),r=function(t){return 10===t?Cp:t===Math.E?Math.exp:n=>Math.pow(t,n)}(a),e()[0]<0?(i=Ap(i),r=Ap(r),t(xp,kp)):t(wp,Sp),n}return n.base=function(t){return arguments.length?(a=+t,o()):a},n.domain=function(t){return arguments.length?(e(t),o()):e()},n.ticks=t=>{const n=e();let o=n[0],u=n[n.length-1];const l=u0){for(;h<=f;++h)for(s=1;su)break;d.push(c)}}else for(;h<=f;++h)for(s=a-1;s>=1;--s)if(c=h>0?s/r(-h):s*r(h),!(cu)break;d.push(c)}2*d.length{if(null==t&&(t=10),null==e&&(e=10===a?"s":","),"function"!=typeof e&&(a%1||null!=(e=x(e)).precision||(e.trim=!0),e=C(e)),t===1/0)return e;const o=Math.max(1,a*t/n.ticks().length);return t=>{let n=t/r(Math.round(i(t)));return n*ae(bp(e(),{floor:t=>r(Math.floor(i(t))),ceil:t=>r(Math.ceil(i(t)))})),n}function Mp(){const t=Ep(pp()).domain([1,10]);return t.copy=()=>dp(t,Mp()).base(t.base()),ep.apply(t,arguments),t}function Tp(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Op(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Pp(t){var n=1,e=t(Tp(n),Op(n));return e.constant=function(e){return arguments.length?t(Tp(n=+e),Op(n)):n},yp(e)}function jp(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Bp(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Dp(t){return t<0?-t*t:t*t}function zp(t){var n=t(cp,cp),e=1;return n.exponent=function(n){return arguments.length?1===(e=+n)?t(cp,cp):.5===e?t(Bp,Dp):t(jp(e),jp(1/e)):e},yp(n)}function Np(){var t=zp(pp());return t.copy=function(){return dp(t,Np()).exponent(t.exponent())},ep.apply(t,arguments),t}function Rp(t){return Math.sign(t)*t*t}function Fp(){var t,n=[.5],e=[0,1],i=1;function r(r){return null!=r&&r<=r?e[Wt(n,r,0,i)]:t}return r.domain=function(t){return arguments.length?(n=Array.from(t),i=Math.min(n.length,e.length-1),r):n.slice()},r.range=function(t){return arguments.length?(e=Array.from(t),i=Math.min(n.length,e.length-1),r):e.slice()},r.invertExtent=function(t){var i=e.indexOf(t);return[n[i-1],n[i]]},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return Fp().domain(n).range(e).unknown(t)},ep.apply(r,arguments)}function Lp(t){return new Date(t)}function Ip(t){return t instanceof Date?+t:+new Date(+t)}function Hp(t,n,e,i,r,a,o,u,l,s){var c=mp(),h=c.invert,f=c.domain,g=s(".%L"),d=s(":%S"),p=s("%I:%M"),m=s("%I %p"),_=s("%a %d"),y=s("%b %d"),v=s("%B"),b=s("%Y");function w(t){return(l(t)0?r[n-1]:e[0],n=r?[a[r-1],i]:[a[n-1],a[n]]},u.unknown=function(t){return arguments.length?(n=t,u):u},u.thresholds=function(){return a.slice()},u.copy=function(){return t().domain([e,i]).range(o).unknown(n)},ep.apply(yp(u),arguments)},scaleRadial:function t(){var n,e=mp(),i=[0,1],r=!1;function a(t){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(t));return isNaN(i)?n:r?Math.round(i):i}return a.invert=function(t){return e.invert(Rp(t))},a.domain=function(t){return arguments.length?(e.domain(t),a):e.domain()},a.range=function(t){return arguments.length?(e.range((i=Array.from(t,lp)).map(Rp)),a):i.slice()},a.rangeRound=function(t){return a.range(t).round(!0)},a.round=function(t){return arguments.length?(r=!!t,a):r},a.clamp=function(t){return arguments.length?(e.clamp(t),a):e.clamp()},a.unknown=function(t){return arguments.length?(n=t,a):n},a.copy=function(){return t(e.domain(),i).round(r).clamp(e.clamp()).unknown(n)},ep.apply(a,arguments),yp(a)},scaleSequential:function t(){var n=yp(Kp()(cp));return n.copy=function(){return Up(n,t())},ip.apply(n,arguments)},scaleSequentialLog:function t(){var n=Ep(Kp()).domain([1,10]);return n.copy=function(){return Up(n,t()).base(n.base())},ip.apply(n,arguments)},scaleSequentialPow:qp,scaleSequentialQuantile:function t(){var n=[],e=cp;function i(t){if(null!=t&&!isNaN(t=+t))return e((Wt(n,t,1)-1)/(n.length-1))}return i.domain=function(t){if(!arguments.length)return n.slice();n=[];for(let e of t)null==e||isNaN(e=+e)||n.push(e);return n.sort(It),i},i.interpolator=function(t){return arguments.length?(e=t,i):e},i.range=function(){return n.map(((t,i)=>e(i/(n.length-1))))},i.quantiles=function(t){return Array.from({length:t+1},((e,i)=>pn(n,i/t)))},i.copy=function(){return t(e).domain(n)},ip.apply(i,arguments)},scaleSequentialSqrt:function(){return qp.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function t(){var n=Pp(Kp());return n.copy=function(){return Up(n,t()).constant(n.constant())},ip.apply(n,arguments)},scaleSqrt:function(){return Np.apply(null,arguments).exponent(.5)},scaleSymlog:function t(){var n=Pp(pp());return n.copy=function(){return dp(n,t()).constant(n.constant())},ep.apply(n,arguments)},scaleThreshold:Fp,scaleTime:Gp,scaleUtc:function(){return ep.apply(Hp(wn,Sn,Lt,Rt,Tt,yt,mt,dt,ft,On).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:_p},Symbol.toStringTag,{value:"Module"}));function Zp(t){return function(){return t}}const Xp=Math.abs,Jp=Math.atan2,Qp=Math.cos,$p=Math.max,tm=Math.min,nm=Math.sin,em=Math.sqrt,im=1e-12,rm=Math.PI,am=rm/2,om=2*rm;function um(t){return t>=1?am:t<=-1?-am:Math.asin(t)}const lm=Math.PI,sm=2*lm,cm=1e-6,hm=sm-cm;function fm(t){this._+=t[0];for(let n=1,e=t.length;n=0))throw new Error("invalid digits: ".concat(t));if(n>15)return fm;const e=10**n;return function(t){this._+=t[0];for(let n=1,i=t.length;ncm)if(Math.abs(d*h-f*g)>cm&&r){let a=e-s,o=i-c,m=h*h+f*f,_=a*a+o*o,y=Math.sqrt(m),v=Math.sqrt(p),w=r*Math.tan((lm-Math.acos((m+p-_)/(2*y*v)))/2),S=w/v,x=w/y;Math.abs(S-1)>cm&&this._append(u||(u=b(["L",",",""])),t+S*g,n+S*d),this._append(l||(l=b(["A",",",",0,0,",",",",",""])),r,r,+(d*a>g*o),this._x1=t+x*h,this._y1=n+x*f)}else this._append(o||(o=b(["L",",",""])),this._x1=t,this._y1=n);else;}arc(t,n,e,i,r,a){if(t=+t,n=+n,a=!!a,(e=+e)<0)throw new Error("negative radius: ".concat(e));let o=e*Math.cos(i),u=e*Math.sin(i),l=t+o,g=n+u,d=1^a,p=a?i-r:r-i;null===this._x1?this._append(s||(s=b(["M",",",""])),l,g):(Math.abs(this._x1-l)>cm||Math.abs(this._y1-g)>cm)&&this._append(c||(c=b(["L",",",""])),l,g),e&&(p<0&&(p=p%sm+sm),p>hm?this._append(h||(h=b(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),e,e,d,t-o,n-u,e,e,d,this._x1=l,this._y1=g):p>cm&&this._append(f||(f=b(["A",",",",0,",",",",",",",""])),e,e,+(p>=lm),d,this._x1=t+e*Math.cos(r),this._y1=n+e*Math.sin(r)))}rect(t,n,e,i){this._append(g||(g=b(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+n,e=+e,+i,-e)}toString(){return this._}};function dm(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError("invalid digits: ".concat(e));n=t}return t},()=>new gm(n)}function pm(t){return t.innerRadius}function mm(t){return t.outerRadius}function _m(t){return t.startAngle}function ym(t){return t.endAngle}function vm(t){return t&&t.padAngle}function bm(t,n,e,i,r,a,o){var u=t-e,l=n-i,s=(o?a:-a)/em(u*u+l*l),c=s*l,h=-s*u,f=t+c,g=n+h,d=e+c,p=i+h,m=(f+d)/2,_=(g+p)/2,y=d-f,v=p-g,b=y*y+v*v,w=r-a,S=f*p-d*g,x=(v<0?-1:1)*em($p(0,w*w*b-S*S)),k=(S*v-y*x)/b,C=(-S*y-v*x)/b,A=(S*v+y*x)/b,E=(-S*y+v*x)/b,M=k-m,T=C-_,O=A-m,P=E-_;return M*M+T*T>O*O+P*P&&(k=A,C=E),{cx:k,cy:C,x01:-c,y01:-h,x11:k*(r/w-1),y11:C*(r/w-1)}}function wm(){var t=pm,n=mm,e=Zp(0),i=null,r=_m,a=ym,o=vm,u=null,l=dm(s);function s(){var s,c,h,f=+t.apply(this,arguments),g=+n.apply(this,arguments),d=r.apply(this,arguments)-am,p=a.apply(this,arguments)-am,m=Xp(p-d),_=p>d;if(u||(u=s=l()),gim)if(m>om-im)u.moveTo(g*Qp(d),g*nm(d)),u.arc(0,0,g,d,p,!_),f>im&&(u.moveTo(f*Qp(p),f*nm(p)),u.arc(0,0,f,p,d,_));else{var y,v,b=d,w=p,S=d,x=p,k=m,C=m,A=o.apply(this,arguments)/2,E=A>im&&(i?+i.apply(this,arguments):em(f*f+g*g)),M=tm(Xp(g-f)/2,+e.apply(this,arguments)),T=M,O=M;if(E>im){var P=um(E/f*nm(A)),j=um(E/g*nm(A));(k-=2*P)>im?(S+=P*=_?1:-1,x-=P):(k=0,S=x=(d+p)/2),(C-=2*j)>im?(b+=j*=_?1:-1,w-=j):(C=0,b=w=(d+p)/2)}var B=g*Qp(b),D=g*nm(b),z=f*Qp(x),N=f*nm(x);if(M>im){var R,F=g*Qp(w),L=g*nm(w),I=f*Qp(S),H=f*nm(S);if(m1?0:h<-1?rm:Math.acos(h))/2),Y=em(R[0]*R[0]+R[1]*R[1]);T=tm(M,(f-Y)/(W-1)),O=tm(M,(g-Y)/(W+1))}else T=O=0}C>im?O>im?(y=bm(I,H,B,D,g,O,_),v=bm(F,L,z,N,g,O,_),u.moveTo(y.cx+y.x01,y.cy+y.y01),Oim&&k>im?T>im?(y=bm(z,N,F,L,f,-T,_),v=bm(B,D,I,H,f,-T,_),u.lineTo(y.cx+y.x01,y.cy+y.y01),T=h;--f)u.point(_[f],y[f]);u.lineEnd(),u.areaEnd()}m&&(_[c]=+t(g,c,s),y[c]=+n(g,c,s),u.point(i?+i(g,c,s):_[c],e?+e(g,c,s):y[c]))}if(d)return u=null,d+""||null}function c(){return Mm().defined(r).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?Am:Zp(+t),n="function"==typeof n?n:Zp(void 0===n?0:+n),e="function"==typeof e?e:void 0===e?Em:Zp(+e),s.x=function(n){return arguments.length?(t="function"==typeof n?n:Zp(+n),i=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:Zp(+n),s):t},s.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Zp(+t),s):i},s.y=function(t){return arguments.length?(n="function"==typeof t?t:Zp(+t),e=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:Zp(+t),s):n},s.y1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Zp(+t),s):e},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(e)},s.lineX1=function(){return c().x(i).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Zp(!!t),s):r},s.curve=function(t){return arguments.length?(o=t,null!=a&&(u=o(a)),s):o},s.context=function(t){return arguments.length?(null==t?a=u=null:u=o(a=t),s):a},s}function Om(t,n){return nt?1:n>=t?0:NaN}function Pm(t){return t}function jm(){var t=Pm,n=Om,e=null,i=Zp(0),r=Zp(om),a=Zp(0);function o(o){var u,l,s,c,h,f=(o=xm(o)).length,g=0,d=new Array(f),p=new Array(f),m=+i.apply(this,arguments),_=Math.min(om,Math.max(-om,r.apply(this,arguments)-m)),y=Math.min(Math.abs(_)/f,a.apply(this,arguments)),v=y*(_<0?-1:1);for(u=0;u0&&(g+=h);for(null!=n?d.sort((function(t,e){return n(p[t],p[e])})):null!=e&&d.sort((function(t,n){return e(o[t],o[n])})),u=0,s=g?(_-f*v)/g:0;u0?h*s:0)+v,p[l]={data:o[l],index:u,value:h,startAngle:m,endAngle:c,padAngle:y};return p}return o.value=function(n){return arguments.length?(t="function"==typeof n?n:Zp(+n),o):t},o.sortValues=function(t){return arguments.length?(n=t,e=null,o):n},o.sort=function(t){return arguments.length?(e=t,n=null,o):e},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Zp(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Zp(+t),o):r},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Zp(+t),o):a},o}km.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Bm=zm(Cm);function Dm(t){this._curve=t}function zm(t){function n(n){return new Dm(t(n))}return n._curve=t,n}function Nm(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(zm(t)):n()._curve},t}function Rm(){return Nm(Mm().curve(Bm))}function Fm(){var t=Tm().curve(Bm),n=t.curve,e=t.lineX0,i=t.lineX1,r=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Nm(e())},delete t.lineX0,t.lineEndAngle=function(){return Nm(i())},delete t.lineX1,t.lineInnerRadius=function(){return Nm(r())},delete t.lineY0,t.lineOuterRadius=function(){return Nm(a())},delete t.lineY1,t.curve=function(t){return arguments.length?n(zm(t)):n()._curve},t}function Lm(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}Dm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class Im{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class Hm{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0===this._point)this._point=1;else{const e=Lm(this._x0,this._y0),i=Lm(this._x0,this._y0=(this._y0+n)/2),r=Lm(t,this._y0),a=Lm(t,n);this._context.moveTo(...e),this._context.bezierCurveTo(...i,...r,...a)}this._x0=t,this._y0=n}}function Gm(t){return new Im(t,!0)}function Km(t){return new Im(t,!1)}function Um(t){return new Hm(t)}function qm(t){return t.source}function Wm(t){return t.target}function Ym(t){let n=qm,e=Wm,i=Am,r=Em,a=null,o=null,u=dm(l);function l(){let l;const s=Sm.call(arguments),c=n.apply(this,s),h=e.apply(this,s);if(null==a&&(o=t(l=u())),o.lineStart(),s[0]=c,o.point(+i.apply(this,s),+r.apply(this,s)),s[0]=h,o.point(+i.apply(this,s),+r.apply(this,s)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(e=t,l):e},l.x=function(t){return arguments.length?(i="function"==typeof t?t:Zp(+t),l):i},l.y=function(t){return arguments.length?(r="function"==typeof t?t:Zp(+t),l):r},l.context=function(n){return arguments.length?(null==n?a=o=null:o=t(a=n),l):a},l}const Vm=em(3),Zm={draw(t,n){const e=.59436*em(n+tm(n/28,.75)),i=e/2,r=i*Vm;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-r,-i),t.lineTo(r,i),t.moveTo(-r,i),t.lineTo(r,-i)}},Xm={draw(t,n){const e=em(n/rm);t.moveTo(e,0),t.arc(0,0,e,0,om)}},Jm={draw(t,n){const e=em(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},Qm=em(1/3),$m=2*Qm,t_={draw(t,n){const e=em(n/$m),i=e*Qm;t.moveTo(0,-e),t.lineTo(i,0),t.lineTo(0,e),t.lineTo(-i,0),t.closePath()}},n_={draw(t,n){const e=.62625*em(n);t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},e_={draw(t,n){const e=.87559*em(n-tm(n/7,2));t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},i_={draw(t,n){const e=em(n),i=-e/2;t.rect(i,i,e,e)}},r_={draw(t,n){const e=.4431*em(n);t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}},a_=nm(rm/10)/nm(7*rm/10),o_=nm(om/10)*a_,u_=-Qp(om/10)*a_,l_={draw(t,n){const e=em(.8908130915292852*n),i=o_*e,r=u_*e;t.moveTo(0,-e),t.lineTo(i,r);for(let a=1;a<5;++a){const n=om*a/5,o=Qp(n),u=nm(n);t.lineTo(u*e,-o*e),t.lineTo(o*i-u*r,u*i+o*r)}t.closePath()}},s_=em(3),c_={draw(t,n){const e=-em(n/(3*s_));t.moveTo(0,2*e),t.lineTo(-s_*e,-e),t.lineTo(s_*e,-e),t.closePath()}},h_=em(3),f_={draw(t,n){const e=.6824*em(n),i=e/2,r=e*h_/2;t.moveTo(0,-e),t.lineTo(r,i),t.lineTo(-r,i),t.closePath()}},g_=-.5,d_=em(3)/2,p_=1/em(12),m_=3*(p_/2+1),__={draw(t,n){const e=em(n/m_),i=e/2,r=e*p_,a=i,o=e*p_+e,u=-a,l=o;t.moveTo(i,r),t.lineTo(a,o),t.lineTo(u,l),t.lineTo(g_*i-d_*r,d_*i+g_*r),t.lineTo(g_*a-d_*o,d_*a+g_*o),t.lineTo(g_*u-d_*l,d_*u+g_*l),t.lineTo(g_*i+d_*r,g_*r-d_*i),t.lineTo(g_*a+d_*o,g_*o-d_*a),t.lineTo(g_*u+d_*l,g_*l-d_*u),t.closePath()}},y_={draw(t,n){const e=.6189*em(n-tm(n/6,1.7));t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}},v_=[Xm,Jm,t_,i_,l_,c_,__],b_=[Xm,e_,y_,f_,Zm,r_,n_];function w_(){}function S_(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function x_(t){this._context=t}function k_(t){this._context=t}function C_(t){this._context=t}function A_(t,n){this._basis=new x_(t),this._beta=n}x_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:S_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:S_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},k_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:S_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},C_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break;case 3:this._point=4;default:S_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},A_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var i,r=t[0],a=n[0],o=t[e]-r,u=n[e]-a,l=-1;++l<=e;)i=l/e,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*o),this._beta*n[l]+(1-this._beta)*(a+i*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const E_=function t(n){function e(t){return 1===n?new x_(t):new A_(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function M_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function T_(t,n){this._context=t,this._k=(1-n)/6}T_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:M_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:M_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const O_=function t(n){function e(t){return new T_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function P_(t,n){this._context=t,this._k=(1-n)/6}P_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:M_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const j_=function t(n){function e(t){return new P_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function B_(t,n){this._context=t,this._k=(1-n)/6}B_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:M_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const D_=function t(n){function e(t){return new B_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function z_(t,n,e){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>im){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>im){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*s+t._x1*t._l23_2a-n*t._l12_2a)/c,o=(o*s+t._y1*t._l23_2a-e*t._l12_2a)/c}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function N_(t,n){this._context=t,this._alpha=n}N_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:z_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const R_=function t(n){function e(t){return n?new N_(t,n):new T_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function F_(t,n){this._context=t,this._alpha=n}F_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:z_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const L_=function t(n){function e(t){return n?new F_(t,n):new P_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function I_(t,n){this._context=t,this._alpha=n}I_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const H_=function t(n){function e(t){return n?new I_(t,n):new B_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function G_(t){this._context=t}function K_(t){return t<0?-1:1}function U_(t,n,e){var i=t._x1-t._x0,r=n-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(e-t._y1)/(r||i<0&&-0),u=(a*r+o*i)/(i+r);return(K_(a)+K_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function q_(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function W_(t,n,e){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,u=(a-i)/3;t._context.bezierCurveTo(i+u,r+u*n,a-u,o-u*e,a,o)}function Y_(t){this._context=t}function V_(t){this._context=new Z_(t)}function Z_(t){this._context=t}function X_(t){this._context=t}function J_(t){var n,e,i=t.length-1,r=new Array(i),a=new Array(i),o=new Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[i-1]=(t[i]+r[i-1])/2,n=0;n1)for(var e,i,r,a=1,o=t[n[0]],u=o.length;a=0;)e[n]=n;return e}function ny(t,n){return t[n]}function ey(t){const n=[];return n.key=t,n}function iy(){var t=Zp([]),n=ty,e=$_,i=ny;function r(r){var a,o,u=Array.from(t.apply(this,arguments),ey),l=u.length,s=-1;for(const t of r)for(a=0,++s;aa&&(a=n,i=e);return i}function oy(t){var n=t.map(uy);return ty(t).sort((function(t,e){return n[t]-n[e]}))}function uy(t){for(var n,e=0,i=-1,r=t.length;++i=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};const ly=Object.freeze(Object.defineProperty({__proto__:null,arc:wm,area:Tm,areaRadial:Fm,curveBasis:function(t){return new x_(t)},curveBasisClosed:function(t){return new k_(t)},curveBasisOpen:function(t){return new C_(t)},curveBumpX:Gm,curveBumpY:Km,curveBundle:E_,curveCardinal:O_,curveCardinalClosed:j_,curveCardinalOpen:D_,curveCatmullRom:R_,curveCatmullRomClosed:L_,curveCatmullRomOpen:H_,curveLinear:Cm,curveLinearClosed:function(t){return new G_(t)},curveMonotoneX:function(t){return new Y_(t)},curveMonotoneY:function(t){return new V_(t)},curveNatural:function(t){return new X_(t)},curveStep:function(t){return new Q_(t,.5)},curveStepAfter:function(t){return new Q_(t,1)},curveStepBefore:function(t){return new Q_(t,0)},line:Mm,lineRadial:Rm,link:Ym,linkHorizontal:function(){return Ym(Gm)},linkRadial:function(){const t=Ym(Um);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},linkVertical:function(){return Ym(Km)},pie:jm,pointRadial:Lm,radialArea:Fm,radialLine:Rm,stack:iy,stackOffsetDiverging:function(t,n){if((u=t.length)>0)for(var e,i,r,a,o,u,l=0,s=t[n[0]].length;l0?(i[0]=a,i[1]=a+=r):r<0?(i[1]=o,i[0]=o+=r):(i[0]=0,i[1]=r)},stackOffsetExpand:function(t,n){if((i=t.length)>0){for(var e,i,r,a=0,o=t[0].length;a0){for(var e,i=0,r=t[n[0]],a=r.length;i0&&(i=(e=t[n[0]]).length)>0){for(var e,i,r,a=0,o=1;o1&&void 0!==arguments[1]?arguments[1]:{};return t in n?n[t]:t in sy?sy[t]:sy.missing}const hy=sy;function fy(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[null,void 0].indexOf(t)>=0?cy("missing",n):!0===t?cy("on",n):!1===t?cy("off",n):Og(t)?t.toString():cy("scale",n)(t)}function gy(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return cy((299*(t=Bg(t)).r+587*t.g+114*t.b)/1e3>=128?"dark":"light",n)}function dy(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5;return n*=1-(t=Gg(t)).l,t.l+=n,t.s-=n,t.toString()}function py(t){return(py="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function my(t,n){for(var e=0;e]+>/g,""),"text/html");return n.documentElement?n.documentElement.textContent:t}function vy(t,n){n=Object.assign({"font-size":10,"font-family":"sans-serif","font-style":"normal","font-weight":400,"font-variant":"normal"},n);var e=document.createElement("canvas").getContext("2d"),i=[];return i.push(n["font-style"]),i.push(n["font-variant"]),i.push(n["font-weight"]),i.push("string"==typeof n["font-size"]?n["font-size"]:"".concat(n["font-size"],"px")),i.push(n["font-family"]),e.font=i.join(" "),t instanceof Array?t.map((function(t){return e.measureText(yy(t)).width})):e.measureText(yy(t)).width}function by(t){return t.toString().replace(/^\s+|\s+$/g,"")}function wy(t){return t.toString().replace(/\s+$/,"")}var Sy,xy,ky,Cy,Ay="abcdefghiABCDEFGHI_!@#$%^&*()_+1234567890",Ey={};const My=function(t){Sy||(Sy=vy(Ay,{"font-family":"DejaVuSans","font-size":32}),xy=vy(Ay,{"font-family":"-apple-system","font-size":32}),ky=vy(Ay,{"font-family":"monospace","font-size":32}),Cy=vy(Ay,{"font-family":"sans-serif","font-size":32})),t instanceof Array||(t=t.split(",")),t=t.map((function(t){return by(t)}));for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"body";for(t=Cf(t).node();t&&t.parentNode&&t!==document.body&&!Ty(t);)t=t.parentNode;return Ty(t)||Ty("html")};function Py(t){return void 0===t?t="undefined":"string"==typeof t||t instanceof String||(t=JSON.stringify(t)),t}var jy=[[/[\300-\305]/g,"A"],[/[\340-\345]/g,"a"],[/[\306]/g,"AE"],[/[\346]/g,"ae"],[/[\337]/g,"B"],[/[\307]/g,"C"],[/[\347]/g,"c"],[/[\320\336\376]/g,"D"],[/[\360]/g,"d"],[/[\310-\313]/g,"E"],[/[\350-\353]/g,"e"],[/[\314-\317]/g,"I"],[/[\354-\357]/g,"i"],[/[\321]/g,"N"],[/[\361]/g,"n"],[/[\u014c\322-\326\330]/g,"O"],[/[\u014d\362-\366\370]/g,"o"],[/[\u016a\331-\334]/g,"U"],[/[\u016b\371-\374]/g,"u"],[/[\327]/g,"x"],[/[\335]/g,"Y"],[/[\375\377]/g,"y"]];function By(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return"".concat(t).replace(/[^A-Za-z0-9\-_\u0621-\u064A]/g,(function(t){if(" "===t)return n;for(var e=!1,i=0;i",")","}","]",".","!","?","/","u00BB","u300B","u3009"].concat(zy),Ry="က-ဪဿ-၉ၐ-ၕ㐀-龿぀-ゟ゠-ヿ＀-+--}⦅-゚㐀-䶿ກ-ຮະ-ໄ່-໋ໍ-ໝ",Fy=new RegExp("(\\".concat(zy.join("|\\"),")*[^\\s|\\").concat(zy.join("|\\"),"]*(\\").concat(zy.join("|\\"),")*"),"g"),Ly=new RegExp("[".concat(Ry,"]")),Iy=new RegExp("(\\".concat(["'","<","(","{","[","u00AB","u300A","u3008"].join("|\\"),")*[").concat(Ry,"](\\").concat(Ny.join("|\\"),"|\\").concat(Dy.join("|\\"),")*|[a-z0-9]+"),"gi");function Hy(t){return Ly.test(t)?_n(Py(t).match(Fy).map((function(t){return Ly.test(t)?t.match(Iy):[t]}))):Py(t).match(Fy).filter((function(t){return t.length}))}function Gy(){var t,n="sans-serif",e=10,i=400,r=200,a=null,o=!1,u=Hy,l=200;function s(s){s=Py(s),void 0===t&&(t=Math.ceil(1.4*e));for(var c=u(s),h={"font-family":n,"font-size":e,"font-weight":i,"line-height":t},f=1,g="",d=!1,p=0,m=[],_=vy(c,h),y=vy(" ",h),v=0;vl){if(!v&&!o){d=!0;break}if(m.length>=f&&(m[f-1]=wy(m[f-1])),f++,t*f>r||w>l&&!o||a&&f>a){d=!0;break}p=0,m.push(b)}else v?m[f-1]+=b:m[0]=b;g+=b,p+=w,p+=b.match(/[\s]*$/g)[0].length*y}return{lines:m,sentence:s,truncated:d,widths:vy(m,h),words:c}}return s.fontFamily=function(t){return arguments.length?(n=t,s):n},s.fontSize=function(t){return arguments.length?(e=t,s):e},s.fontWeight=function(t){return arguments.length?(i=t,s):i},s.height=function(t){return arguments.length?(r=t,s):r},s.lineHeight=function(n){return arguments.length?(t=n,s):t},s.maxLines=function(t){return arguments.length?(a=t,s):a},s.overflow=function(t){return arguments.length?(o=t,s):o},s.split=function(t){return arguments.length?(u=t,s):u},s.width=function(t){return arguments.length?(l=t,s):l},s}function Ky(t){return(Ky="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Uy(t,n){for(var e=0;eb&&(m>h||l&&m>b*s)){if(l){var x=1.165+_/m*.1,k=_*m,C=hn(o=vy(S,d)),A=vn(o,(function(t){return t*h}))*x;if(C>_||A>k){var E=fn([Math.sqrt(k/A),_/C]);c=Math.floor(c*E)}var M=Math.floor(.8*m);c>M&&(c=M)}!function t(){var n=function(){f<1?g=[e._ellipsis("",f)]:g[f-1]=e._ellipsis(g[f-1],f)};if(c=fn([c=hn([c,b]),v]),l&&(h=c*s,y.fontSize(c).lineHeight(h),d["font-size"]=c,d["line-height"]=h),u=y(a),g=u.lines.filter((function(t){return""!==t})),f=g.length,u.truncated)if(l){if(--c^/]+>)([^<^>]+)$/g,(function(t,n,e){return"".concat(n).concat(e).concat(n.replace("<","]+)(<\/[^>]+>)/g,(function(t,n,e){return"".concat(e.replace("^\s]{0,1}[0-9.,]{2,}[^<^\s]{0,1}/g,(function(t){var n=i.indexOf(t);return""===i.slice(n-5,n)?t:"".concat(t,"")})));var r=new RegExp(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g);return i.match(r)?i=i.replace(r,(function(i,r,a){if(n=!!e._html[r]&&r){var o=e._html[n];return t.includes(""))&&(n=!1),'').concat(a,"")}return a})):n.length&&(i='').concat(i,"")),i}))}function i(n){n.attr("aria-hidden",t.aH).attr("dir",u?"rtl":"ltr").attr("fill",t.fC).attr("stroke",t.fStroke).attr("stroke-width",t.fSW).attr("text-anchor",t.tA).attr("font-family",t.fF).style("font-family",t.fF).attr("font-size","".concat(t.fS,"px")).style("font-size","".concat(t.fS,"px")).attr("font-weight",t.fW).style("font-weight",t.fW).attr("x","".concat("middle"===t.tA?t.w/2:u?"start"===t.tA?t.w:0:"end"===t.tA?t.w:2*Math.sin(Math.PI*t.r/180),"px")).attr("y",(function(n,e){return 0===t.r||"top"===t.vA?"".concat((e+1)*t.lH-(t.lH-t.fS),"px"):"middle"===t.vA?"".concat((t.h+t.fS)/2-(t.lH-t.fS)+(e-t.lines.length/2+.5)*t.lH,"px"):"".concat(t.h-2*(t.lH-t.fS)-(t.lines.length-(e+1))*t.lH+2*Math.cos(Math.PI*t.r/180),"px")}))}var a=Cf(this).selectAll("text").data(t.lines);0===e._duration?(a.call(n).call(i),a.exit().remove(),a.enter().append("text").attr("dominant-baseline","alphabetic").style("baseline-shift","0%").attr("unicode-bidi","bidi-override").call(n).call(i).attr("opacity",t.fO).style("opacity",t.fO)):(a.call(n).transition(r).call(i),a.exit().transition(r).attr("opacity",0).remove(),a.enter().append("text").attr("dominant-baseline","alphabetic").style("baseline-shift","0%").attr("opacity",0).style("opacity",0).call(n).call(i).merge(a).transition(r).delay(e._delay).call(i).attr("opacity",t.fO).style("opacity",t.fO))})).transition(r).call(a);for(var l=Object.keys(this._on),s=l.reduce((function(t,e){return t[e]=function(t,i){return n._on[e](t.data,i)},t}),{}),c=0;ct.length)&&(n=t.length);for(var e=0,i=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==e.return||e.return()}finally{if(u)throw a}}}}var $y={circles:function(){var t=20,n="",e=2,i=!1,r="#343434",a="#343434",o=0,u=Xy(),l=function(l){var s=l.append("defs").append("pattern").attr("id",u).attr("patternUnits","userSpaceOnUse").attr("width",t).attr("height",t);if(n&&s.append("rect").attr("width",t).attr("height",t).attr("fill",n),s.append("circle").attr("cx",t/2).attr("cy",t/2).attr("r",e).attr("fill",r).attr("stroke",a).attr("stroke-width",o),i)for(var c=0,h=[[0,0],[0,t],[t,0],[t,t]];c0&&void 0!==arguments[0]?arguments[0]:"g";return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this))._activeOpacity=.25,t._activeStyle={stroke:function(n,e){var i=t._fill(n,e);return["transparent","none"].includes(i)&&(i=t._stroke(n,e)),Og(i).darker(1)},"stroke-width":function(n,e){return 3*(t._strokeWidth(n,e)||1)}},t._ariaLabel=hh(""),t._backgroundImage=hh(!1),t._backgroundImageClass=new _y,t._data=[],t._duration=600,t._fill=hh("black"),t._fillOpacity=hh(1),t._hoverOpacity=.5,t._hoverStyle={stroke:function(n,e){var i=t._fill(n,e);return["transparent","none"].includes(i)&&(i=t._stroke(n,e)),Og(i).darker(.5)},"stroke-width":function(n,e){return 2*(t._strokeWidth(n,e)||1)}},t._id=function(t,n){return void 0!==t.id?t.id:n},t._label=hh(!1),t._labelClass=new Zy,t._labelConfig={fontColor:function(n,e){return gy(t._fill(n,e))},fontSize:12,padding:5},t._name="Shape",t._opacity=hh(1),t._pointerEvents=hh("visiblePainted"),t._role=hh("presentation"),t._rotate=hh(0),t._rx=hh(0),t._ry=hh(0),t._scale=hh(1),t._shapeRendering=hh("geometricPrecision"),t._stroke=function(n,e){return Og(t._fill(n,e)).darker(1).formatHex()},t._strokeDasharray=hh("0"),t._strokeLinecap=hh("butt"),t._strokeOpacity=hh(1),t._strokeWidth=hh(0),t._tagName=n,t._textAnchor=hh("start"),t._texture=hh(!1),t._textureDefault={},t._textureDefs={},t._vectorEffect=hh("non-scaling-stroke"),t._verticalAlign=hh("top"),t._x=Gc("x",0),t._y=Gc("y",0),t}return n=a,e=[{key:"_aes",value:function(){return{}}},{key:"_applyEvents",value:function(t){for(var n=this,e=Object.keys(this._on),i=function(i){t.on(e[i],(function(t,r,a){if(n._on[e[i]]){if(void 0!==r.i&&(a=r.i),r.nested&&r.values){var o=Ef(t,n._select.node()),u=r.values.map((function(t){return nv(o,function(t,e){return"x"===n._discrete?[n._x(t,e),o[1]]:"y"===n._discrete?[o[0],n._y(t,e)]:[n._x(t,e),n._y(t,e)]}(t,a))}));a=u.indexOf(fn(u)),r=r.values[a]}n._on[e[i]].bind(n)(r,a,void 0,t)}}))},r=0;r *, g.d3plus-").concat(this._name,"-active > *"),"string"==typeof r?new xf([document.querySelectorAll(r)],[document.documentElement]):new xf([bh(r)],Sf)).each((function(t){t&&t.parentNode?t.parentNode.appendChild(this):this.parentNode.removeChild(this)})),this._group=Hd("g.d3plus-".concat(this._name,"-group"),{parent:this._select});var u=this._update=Hd("g.d3plus-".concat(this._name,"-shape"),{parent:this._group,update:{opacity:this._active?this._activeOpacity:1}}).selectAll(".d3plus-".concat(this._name)).data(e,i);u.order(),this._duration?u.transition(this._transition).call(this._applyTransform.bind(this)):u.call(this._applyTransform.bind(this));var l=(this._enter=u.enter().append(this._tagName).attr("class",(function(t,e){return"d3plus-Shape d3plus-".concat(n._name," d3plus-id-").concat(By(n._nestWrapper(n._id)(t,e)))})).call(this._applyTransform.bind(this)).attr("aria-label",this._ariaLabel).attr("role",this._role).attr("opacity",this._nestWrapper(this._opacity))).merge(u),s=l.attr("shape-rendering",this._nestWrapper(this._shapeRendering));this._duration&&(s=s.attr("pointer-events","none").transition(this._transition).transition().delay(100).attr("pointer-events",this._pointerEvents)),s.attr("opacity",this._nestWrapper(this._opacity));var c=this._exit=u.exit();this._duration?c.transition().delay(this._duration).remove():c.remove(),this._renderImage(),this._renderLabels(),this._hoverGroup=Hd("g.d3plus-".concat(this._name,"-hover"),{parent:this._group}),this._activeGroup=Hd("g.d3plus-".concat(this._name,"-active"),{parent:this._group});var h=this._group.selectAll(".d3plus-HitArea").data(this._hitArea&&Object.keys(this._on).length?e:[],i);h.order().call(this._applyTransform.bind(this));var f="Line"===this._name;if(f){var g=this._curve.bind(this)(this.config());f&&this._path.curve(ly["curve".concat(g.charAt(0).toUpperCase()).concat(g.slice(1))]).defined(this._defined).x(this._x).y(this._y)}var d=h.enter().append(f?"path":"rect").attr("class",(function(t,e){return"d3plus-HitArea d3plus-id-".concat(By(n._nestWrapper(n._id)(t,e)))})).attr("fill","black").attr("stroke","black").attr("pointer-events","painted").attr("opacity",0).call(this._applyTransform.bind(this)),p=this,m=h.merge(d).each((function(t){var n=p._data.indexOf(t),e=p._hitArea(t,n,p._aes(t,n));return!e||"Line"===p._name&&parseFloat(p._strokeWidth(t,n))>10?Cf(this).remove():Cf(this).call(Wc,e)}));return h.exit().remove(),this._applyEvents(this._hitArea?m:l),setTimeout((function(){n._active?n._renderActive():n._hover&&n._renderHover(),t&&t()}),this._duration+100),this}},{key:"active",value:function(t){return arguments.length&&void 0!==t?(this._active=t,this._group&&this._renderActive(),this):this._active}},{key:"activeOpacity",value:function(t){return arguments.length?(this._activeOpacity=t,this):this._activeOpacity}},{key:"activeStyle",value:function(t){return arguments.length?(this._activeStyle=qc({},this._activeStyle,t),this):this._activeStyle}},{key:"ariaLabel",value:function(t){return void 0!==t?(this._ariaLabel="function"==typeof t?t:hh(t),this):this._ariaLabel}},{key:"backgroundImage",value:function(t){return arguments.length?(this._backgroundImage="function"==typeof t?t:hh(t),this):this._backgroundImage}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"discrete",value:function(t){return arguments.length?(this._discrete=t,this):this._discrete}},{key:"duration",value:function(t){return arguments.length?(this._duration=t,this):this._duration}},{key:"fill",value:function(t){return arguments.length?(this._fill="function"==typeof t?t:hh(t),this):this._fill}},{key:"fillOpacity",value:function(t){return arguments.length?(this._fillOpacity="function"==typeof t?t:hh(t),this):this._fillOpacity}},{key:"hover",value:function(t){return arguments.length&&void 0!==t?(this._hover=t,this._group&&this._renderHover(),this):this._hover}},{key:"hoverStyle",value:function(t){return arguments.length?(this._hoverStyle=qc({},this._hoverStyle,t),this):this._hoverStyle}},{key:"hoverOpacity",value:function(t){return arguments.length?(this._hoverOpacity=t,this):this._hoverOpacity}},{key:"hitArea",value:function(t){return arguments.length?(this._hitArea="function"==typeof t?t:hh(t),this):this._hitArea}},{key:"id",value:function(t){return arguments.length?(this._id=t,this):this._id}},{key:"label",value:function(t){return arguments.length?(this._label="function"==typeof t?t:hh(t),this):this._label}},{key:"labelBounds",value:function(t){return arguments.length?(this._labelBounds="function"==typeof t?t:hh(t),this):this._labelBounds}},{key:"labelConfig",value:function(t){return arguments.length?(this._labelConfig=qc(this._labelConfig,t),this):this._labelConfig}},{key:"opacity",value:function(t){return arguments.length?(this._opacity="function"==typeof t?t:hh(t),this):this._opacity}},{key:"pointerEvents",value:function(t){return arguments.length?(this._pointerEvents="function"==typeof t?t:hh(t),this):this._pointerEvents}},{key:"role",value:function(t){return void 0!==t?(this._role="function"==typeof t?t:hh(t),this):this._role}},{key:"rotate",value:function(t){return arguments.length?(this._rotate="function"==typeof t?t:hh(t),this):this._rotate}},{key:"rx",value:function(t){return arguments.length?(this._rx="function"==typeof t?t:hh(t),this):this._rx}},{key:"ry",value:function(t){return arguments.length?(this._ry="function"==typeof t?t:hh(t),this):this._ry}},{key:"scale",value:function(t){return arguments.length?(this._scale="function"==typeof t?t:hh(t),this):this._scale}},{key:"select",value:function(t){return arguments.length?(this._select=Cf(t),this):this._select}},{key:"shapeRendering",value:function(t){return arguments.length?(this._shapeRendering="function"==typeof t?t:hh(t),this):this._shapeRendering}},{key:"sort",value:function(t){return arguments.length?(this._sort=t,this):this._sort}},{key:"stroke",value:function(t){return arguments.length?(this._stroke="function"==typeof t?t:hh(t),this):this._stroke}},{key:"strokeDasharray",value:function(t){return arguments.length?(this._strokeDasharray="function"==typeof t?t:hh(t),this):this._strokeDasharray}},{key:"strokeLinecap",value:function(t){return arguments.length?(this._strokeLinecap="function"==typeof t?t:hh(t),this):this._strokeLinecap}},{key:"strokeOpacity",value:function(t){return arguments.length?(this._strokeOpacity="function"==typeof t?t:hh(t),this):this._strokeOpacity}},{key:"strokeWidth",value:function(t){return arguments.length?(this._strokeWidth="function"==typeof t?t:hh(t),this):this._strokeWidth}},{key:"textAnchor",value:function(t){return arguments.length?(this._textAnchor="function"==typeof t?t:hh(t),this):this._textAnchor}},{key:"texture",value:function(t){return arguments.length?(this._texture="function"==typeof t?t:hh(t),this):this._texture}},{key:"textureDefault",value:function(t){return arguments.length?(this._textureDefault=qc(this._textureDefault,t),this):this._textureDefault}},{key:"vectorEffect",value:function(t){return arguments.length?(this._vectorEffect="function"==typeof t?t:hh(t),this):this._vectorEffect}},{key:"verticalAlign",value:function(t){return arguments.length?(this._verticalAlign="function"==typeof t?t:hh(t),this):this._verticalAlign}},{key:"x",value:function(t){return arguments.length?(this._x="function"==typeof t?t:hh(t),this):this._x}},{key:"y",value:function(t){return arguments.length?(this._y="function"==typeof t?t:hh(t),this):this._y}}],e&&iv(n.prototype,e),i&&iv(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();function lv(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function sv(t){return(sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cv(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function hv(){return hv=Object.assign||function(t){for(var n=1;nt.length)&&(n=t.length);for(var e=0,i=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==e.return||e.return()}finally{if(u)throw a}}}}function dv(t,n){var e=[],i=[];return t.length&&function t(n,r){if(1===n.length)e.push(n[0]),i.push(n[0]);else{for(var a=Array(n.length-1),o=0;o=3&&(n.x1=t[1][0],n.y1=t[1][1]),n.x=t[t.length-1][0],n.y=t[t.length-1][1],4===t.length?n.type="C":3===t.length?n.type="Q":n.type="L",n}function mv(t,n,e){var i=[[t.x,t.y]];return null!=n.x1&&i.push([n.x1,n.y1]),null!=n.x2&&i.push([n.x2,n.y2]),i.push([n.x,n.y]),function(t,n){for(var e=[],i=t,r=1/(n=n||2),a=0;a0?o-=1:o0&&(o-=1))}return n[o]=(n[o]||0)+1,n}),[]).reduce((function(n,e,i){if(i===t.length-1){var r=vv(e,hv({},t[t.length-1]));return"M"===r[0].type&&r.forEach((function(t){t.type="L"})),n.concat(r)}return n.concat(function(t,n,e){var i=[];if("L"===n.type||"Q"===n.type||"C"===n.type)i=i.concat(mv(t,n,e));else{var r=hv({},t);"M"===r.type&&(r.type="L"),(i=i.concat(vv(e-1).map((function(){return r})))).push(n)}return i}(t[i],t[i+1],e))}),[]);return o.unshift(t[0]),o}function Sv(t){for(var n,e,i=(t||"").match(_v)||[],r=[],a=0;a0&&"Z"===i[i.length-1].type&&i.pop(),r.length>0&&"Z"===r[r.length-1].type&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]),0!==Math.abs(r.length-i.length)&&(r.length>i.length?i=wv(i,r,o):r.lengthu!=s>u&&o<(l-e)*(u-i)/(s-i)+e&&(c=!c),l=e,s=i;return c}function Av(t,n,e,i){var r=t[0]-n[0],a=e[0]-i[0],o=t[1]-n[1],u=e[1]-i[1],l=r*u-o*a;if(Math.abs(l)<1e-9)return null;var s=t[0]*n[1]-t[1]*n[0],c=e[0]*i[1]-e[1]*i[0];return[(s*a-c*r)/l,(s*u-c*o)/l]}function Ev(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,a,o,u=[],l=!0,s=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=a.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Mv(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Mv(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mv(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);eMath.max(t[0],n[0])+i||oMath.max(t[1],n[1])+i)}function Ov(t,n,e,i){var r=Av(t,n,e,i);return!!r&&(Tv(t,n,r)&&Tv(e,i,r))}function Pv(t,n){for(var e=-1,i=t.length,r=n.length,a=t[i-1];++et.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:0,i=1e-9,r=jv(n=[n[0]+i*Math.cos(e),n[1]+i*Math.sin(e)],2),a=r[0],o=r[1],u=[a+Math.cos(e),o+Math.sin(e)],l=0;Math.abs(u[0]-a)n[l]&&y2&&void 0!==arguments[2]?arguments[2]:[0,0],i=Math.cos(n),r=Math.sin(n),a=t[0]-e[0],o=t[1]-e[1];return[i*a-r*o+e[0],r*a+i*o+e[1]]}Object.keys(yv).forEach((function(t){yv[t.toLowerCase()]=yv[t]}));const Nv=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0];return t.map((function(t){return zv(t,n,e)}))};function Rv(t,n,e){var i=n[0],r=n[1],a=e[0]-i,o=e[1]-r;if(0!==a||0!==o){var u=((t[0]-i)*a+(t[1]-r)*o)/(a*a+o*o);u>1?(i=e[0],r=e[1]):u>0&&(i+=a*u,r+=o*u)}return(a=t[0]-i)*a+(o=t[1]-r)*o}function Fv(t,n,e,i,r){for(var a,o=i,u=n+1;uo&&(a=u,o=l)}o>i&&(a-n>1&&Fv(t,n,a,i,r),r.push(t[a]),e-a>1&&Fv(t,a,e,i,r))}function Lv(t,n){var e=t.length-1,i=[t[0]];return Fv(t,0,e,n,i),i.push(t[e]),i}const Iv=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.length<=2)return t;var i=n*n;return t=e?t:function(t,n){for(var e,i=t[0],r=[i],a=1,o=t.length;an&&(r.push(e),i=e);return i!==e&&r.push(e),r}(t,i),t=Lv(t,i)};function Hv(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,a,o,u=[],l=!0,s=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=a.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Gv(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Gv(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gv(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e1&&void 0!==arguments[1]?arguments[1]:{};if(t.length<3)return n.verbose&&console.error("polygon has to have at least 3 points",t),null;var e,i=[],r=(n=Object.assign({angle:yn(-90,95,5),cache:!0,maxAspectRatio:15,minAspectRatio:1,minHeight:0,minWidth:0,nTries:20,tolerance:.02,verbose:!1},n)).angle instanceof Array?n.angle:"number"==typeof n.angle?[n.angle]:"string"!=typeof n.angle||isNaN(n.angle)?[]:[Number(n.angle)],a=n.aspectRatio instanceof Array?n.aspectRatio:"number"==typeof n.aspectRatio?[n.aspectRatio]:"string"!=typeof n.aspectRatio||isNaN(n.aspectRatio)?[]:[Number(n.aspectRatio)],o=n.origin&&n.origin instanceof Array?n.origin[0]instanceof Array?n.origin:[n.origin]:[];if(n.cache&&(e=_n(t).join(","),e+="-".concat(n.minAspectRatio),e+="-".concat(n.maxAspectRatio),e+="-".concat(n.minHeight),e+="-".concat(n.minWidth),e+="-".concat(r.join(",")),e+="-".concat(o.join(",")),Kv[e]))return Kv[e];var u=Math.abs(function(t){for(var n,e=-1,i=t.length,r=t[i-1],a=0;++e0&&(t=Iv(t,d)),n.events&&i.push({type:"simplify",poly:t});var p=Hv(Vt(t,(function(t){return t[0]})),2);s=p[0],c=p[1];var m=Hv(Vt(t,(function(t){return t[1]})),2);f=m[0];var _=c-s,y=(g=m[1])-f,v=Math.min(_,y)/50;if(!o.length){var b=function(t){for(var n,e,i=-1,r=t.length,a=0,o=0,u=t[r-1],l=0;++i=v&&i.push({type:"aRatio",aRatio:J});$-Q>=v;){var tt=(Q+$)/2,nt=tt/J,et=Hv(F,2),it=et[0],rt=et[1],at=[[it-tt/2,rt-nt/2],[it+tt/2,rt-nt/2],[it+tt/2,rt+nt/2],[it-tt/2,rt+nt/2]],ot=Pv(at=Nv(at,E,F),t);ot?(x=tt*nt,at.push(at[0]),k={area:x,cx:it,cy:rt,width:tt,height:nt,angle:-A,points:at},Q=tt):$=tt,n.events&&i.push({type:"rectangle",areaFraction:tt*nt/u,cx:it,cy:rt,width:tt,height:nt,angle:A,insidePoly:ot})}}}}}}}}return n.cache&&(Kv[e]=k),n.events?Object.assign(k||{},{events:i}):k}function qv(t){return(qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wv(t,n){for(var e=0;er[0][1]&&(a=a.reverse()),a.push(a[0]),{points:a}}},{key:"_dataFilter",value:function(t){var n=this,e=Zd().key(this._id).entries(t).map((function(e){e.data=Kd(e.values),e.i=t.indexOf(e.values[0]);var i=Vt(e.values.map(n._x).concat(e.values.map(n._x0)).concat(n._x1?e.values.map(n._x1):[]));e.xR=i,e.width=i[1]-i[0],e.x=i[0]+e.width/2;var r=Vt(e.values.map(n._y).concat(e.values.map(n._y0)).concat(n._y1?e.values.map(n._y1):[]));return e.yR=r,e.height=r[1]-r[0],e.y=r[0]+e.height/2,e.nested=!0,e.translate=[e.x,e.y],e.__d3plusShape__=!0,e}));return e.key=function(t){return t.key},e}},{key:"render",value:function(t){var n=this;Yv(Xv(a.prototype),"render",this).call(this,t);var e=this._curve.bind(this)(this.config()),i=ly["curve".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))],r=this._path=Tm().defined(this._defined).curve(i).x(this._x).x0(this._x0).x1(this._x1).y(this._y).y0(this._y0).y1(this._y1),o=Tm().defined((function(t){return t})).curve(i).x(this._x).y(this._y).x0((function(t,e){return n._x1?n._x0(t,e)+(n._x1(t,e)-n._x0(t,e))/2:n._x0(t,e)})).x1((function(t,e){return n._x1?n._x0(t,e)+(n._x1(t,e)-n._x0(t,e))/2:n._x0(t,e)})).y0((function(t,e){return n._y1?n._y0(t,e)+(n._y1(t,e)-n._y0(t,e))/2:n._y0(t,e)})).y1((function(t,e){return n._y1?n._y0(t,e)+(n._y1(t,e)-n._y0(t,e))/2:n._y0(t,e)}));return this._enter.append("path").attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).attr("d",(function(t){return o(t.values)})).call(this._applyStyle.bind(this)).transition(this._transition).attrTween("d",(function(t){return kv(Cf(this).attr("d"),r(t.values))})),this._update.select("path").transition(this._transition).attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).attrTween("d",(function(t){return kv(Cf(this).attr("d"),r(t.values))})).call(this._applyStyle.bind(this)),this._exit.select("path").transition(this._transition).attrTween("d",(function(t){return kv(Cf(this).attr("d"),o(t.values))})),this}},{key:"curve",value:function(t){return arguments.length?(this._curve="function"==typeof t?t:hh(t),this):this._curve}},{key:"defined",value:function(t){return arguments.length?(this._defined=t,this):this._defined}},{key:"x",value:function(t){return arguments.length?(this._x="function"==typeof t?t:hh(t),this._x0=this._x,this):this._x}},{key:"x0",value:function(t){return arguments.length?(this._x0="function"==typeof t?t:hh(t),this._x=this._x0,this):this._x0}},{key:"x1",value:function(t){return arguments.length?(this._x1="function"==typeof t||null===t?t:hh(t),this):this._x1}},{key:"y",value:function(t){return arguments.length?(this._y="function"==typeof t?t:hh(t),this._y0=this._y,this):this._y}},{key:"y0",value:function(t){return arguments.length?(this._y0="function"==typeof t?t:hh(t),this._y=this._y0,this):this._y0}},{key:"y1",value:function(t){return arguments.length?(this._y1="function"==typeof t||null===t?t:hh(t),this):this._y1}}],e&&Wv(n.prototype,e),i&&Wv(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();function Qv(t){return(Qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $v(t,n){for(var e=0;e=t.initialLength)break}i.length>1&&i.length%2&&i.pop(),i[i.length-1]+=t.initialLength-vn(i),i.length%2==0&&i.push(0),t.initialStrokeArray=i.join(" ")}var r=this._curve.bind(this)(this.config()),o=ly["curve".concat(r.charAt(0).toUpperCase()).concat(r.slice(1))];this._path.curve(o).defined(this._defined).x(this._x).y(this._y);var u=this._enter.append("path").attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).attr("d",(function(t){return n._path(t.values)})).call(this._applyStyle.bind(this)),l=this._update.select("path").attr("stroke-dasharray",(function(t){return e._strokeDasharray(t.values[0],e._data.indexOf(t.values[0]))}));return this._duration?(u.each(i).attr("stroke-dasharray",(function(t){return"".concat(t.initialStrokeArray," ").concat(t.initialLength)})).attr("stroke-dashoffset",(function(t){return t.initialLength})).transition(this._transition).attr("stroke-dashoffset",0),l=l.transition(this._transition).attrTween("d",(function(t){return kv(Cf(this).attr("d"),e._path(t.values))})),this._exit.selectAll("path").each(i).attr("stroke-dasharray",(function(t){return"".concat(t.initialStrokeArray," ").concat(t.initialLength)})).transition(this._transition).attr("stroke-dashoffset",(function(t){return-t.initialLength}))):l=l.attr("d",(function(t){return e._path(t.values)})),l.attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).call(this._applyStyle.bind(this)),this}},{key:"_aes",value:function(t,n){var e=this;return{points:t.values.map((function(t){return[e._x(t,n),e._y(t,n)]}))}}},{key:"curve",value:function(t){return arguments.length?(this._curve="function"==typeof t?t:hh(t),this):this._curve}},{key:"defined",value:function(t){return arguments.length?(this._defined=t,this):this._defined}}],e&&bb(n.prototype,e),i&&bb(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();function Ab(t){return(Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Eb(t,n){for(var e=0;ehn(i)&&(e.upperLimit=hn(i))):"extent"===r[1]?e.upperLimit=hn(i):"number"==typeof r[1]&&(e.upperLimit=pn(i,r[1]));var a=e.third-e.first;return"vertical"===e.orient?(e.height=a,e.width=t._rectWidth(e.data,e.i),e.x=t._x(e.data,e.i),e.y=e.first+a/2):"horizontal"===e.orient&&(e.height=t._rectWidth(e.data,e.i),e.width=a,e.x=e.first+a/2,e.y=t._y(e.data,e.i)),e.values.forEach((function(i,r){var a="vertical"===e.orient?t._y(i,r):t._x(i,r);if(ae.upperLimit){var o={__d3plus__:!0};o.data=i,o.i=r,o.outlier=t._outlier(i,r),"vertical"===e.orient?(o.x=e.x,o.y=a,n.push(o)):"horizontal"===e.orient&&(o.y=e.y,o.x=a,n.push(o))}})),e.__d3plus__=!0,e}));this._box=(new yb).data(e).x((function(t){return t.x})).y((function(t){return t.y})).select(Hd("g.d3plus-Box",{parent:this._select}).node()).config(ch.bind(this)(this._rectConfig,"shape")).render(),this._median=(new yb).data(e).x((function(t){return"vertical"===t.orient?t.x:t.median})).y((function(t){return"vertical"===t.orient?t.median:t.y})).height((function(t){return"vertical"===t.orient?1:t.height})).width((function(t){return"vertical"===t.orient?t.width:1})).select(Hd("g.d3plus-Box-Median",{parent:this._select}).node()).config(ch.bind(this)(this._medianConfig,"shape")).render();var i=[];return e.forEach((function(t,n){var e=t.x,r=t.y,a=t.first-t.lowerLimit,o=t.upperLimit-t.third;if("vertical"===t.orient){var u=r-t.height/2,l=r+t.height/2;i.push({__d3plus__:!0,data:t,i:n,x:e,y:u,length:a,orient:"top"},{__d3plus__:!0,data:t,i:n,x:e,y:l,length:o,orient:"bottom"})}else if("horizontal"===t.orient){var s=e+t.width/2,c=e-t.width/2;i.push({__d3plus__:!0,data:t,i:n,x:s,y:r,length:o,orient:"right"},{__d3plus__:!0,data:t,i:n,x:c,y:r,length:a,orient:"left"})}})),this._whisker=(new jb).data(i).select(Hd("g.d3plus-Box-Whisker",{parent:this._select}).node()).config(ch.bind(this)(this._whiskerConfig,"shape")).render(),this._whiskerEndpoint=[],Zd().key((function(t){return t.outlier})).entries(n).forEach((function(n){var e=n.key;t._whiskerEndpoint.push((new Fb[e]).data(n.values).select(Hd("g.d3plus-Box-Outlier-".concat(e),{parent:t._select}).node()).config(ch.bind(t)(t._outlierConfig,"shape",e)).render())})),this}},{key:"active",value:function(t){this._box&&this._box.active(t),this._median&&this._median.active(t),this._whisker&&this._whisker.active(t),this._whiskerEndpoint&&this._whiskerEndpoint.forEach((function(n){return n.active(t)}))}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"hover",value:function(t){this._box&&this._box.hover(t),this._median&&this._median.hover(t),this._whisker&&this._whisker.hover(t),this._whiskerEndpoint&&this._whiskerEndpoint.forEach((function(n){return n.hover(t)}))}},{key:"medianConfig",value:function(t){return arguments.length?(this._medianConfig=qc(this._medianConfig,t),this):this._medianConfig}},{key:"orient",value:function(t){return arguments.length?(this._orient="function"==typeof t?t:hh(t),this):this._orient}},{key:"outlier",value:function(t){return arguments.length?(this._outlier="function"==typeof t?t:hh(t),this):this._outlier}},{key:"outlierConfig",value:function(t){return arguments.length?(this._outlierConfig=qc(this._outlierConfig,t),this):this._outlierConfig}},{key:"rectConfig",value:function(t){return arguments.length?(this._rectConfig=qc(this._rectConfig,t),this):this._rectConfig}},{key:"rectWidth",value:function(t){return arguments.length?(this._rectWidth="function"==typeof t?t:hh(t),this):this._rectWidth}},{key:"select",value:function(t){return arguments.length?(this._select=Cf(t),this):this._select}},{key:"whiskerConfig",value:function(t){return arguments.length?(this._whiskerConfig=qc(this._whiskerConfig,t),this):this._whiskerConfig}},{key:"whiskerMode",value:function(t){return arguments.length?(this._whiskerMode=t instanceof Array?t:[t,t],this):this._whiskerMode}},{key:"x",value:function(t){return arguments.length?(this._x="function"==typeof t?t:Gc(t),this):this._x}},{key:"y",value:function(t){return arguments.length?(this._y="function"==typeof t?t:Gc(t),this):this._y}}],e&&Db(n.prototype,e),i&&Db(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();const Ib=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;if("undefined"==typeof document)return[];var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",t);for(var i=e.getTotalLength(),r=i/n<10?i/10:i/n,a=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:"circle";if(t<0&&(t=2*Vb+t),"square"===e){var i=Vb/180*45,r=0,a=0;if(t5&&t%1==0)return new Date(t);var n="".concat(t),e=new RegExp(/^\d{1,2}[./-]\d{1,2}[./-](-*\d{1,4})$/g).exec(n);if(e){var i=e[1];0===i.indexOf("-")&&(n=n.replace(i,i.substring(1)));var r=new Date(n);return r.setFullYear(i),r}var a=new RegExp(/^[A-z]{1,3} [A-z]{1,3} \d{1,2} (-*\d{1,4}) \d{1,2}:\d{1,2}:\d{1,2} [A-z]{1,3}-*\d{1,4} \([A-z]{1,3}\)/g).exec(n);if(a){var o=a[1];0===o.indexOf("-")&&(n=n.replace(o,o.substring(1)));var u=new Date(n);return u.setFullYear(o),u}var l=new RegExp(/^([qQ]{1}[1-4]{1}|[1-4]{1}[qQ]{1})[\s|-]{0,1}(-*\d{1,4})$/g).exec(n),s=new RegExp(/^(-*\d{1,4})[\s|-]{0,1}([qQ]{1}[1-4]{1}|[1-4]{1}[qQ]{1})$/g).exec(n);if(l||s){var c=+(l?l[1]:s[2]).toLowerCase().replace("q",""),h=+(l?l[2]:s[1]),f=new Date(h,3*c-3,1);return f.setFullYear(h),f}if(!(n.includes("/")||n.includes(" ")||n.includes("-")&&n.indexOf("-"))){var g=new Date(+n,0,1);return g.setFullYear(t),g}return new Date(n)}const Jb={"ar-SA":{dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",quarter:"الربع",periods:["صباحًا","مساءً"],days:["الأحد","الأثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],shortDays:["الأحد","الأثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],months:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],shortMonths:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},"de-DE":{dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",quarter:"Q",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]},"en-GB":{dateTime:"%a %e %b %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"Q",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},"en-US":{dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",quarter:"Q",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},"es-ES":{dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]},"es-MX":{dateTime:"%x, %X",date:"%d/%m/%Y",time:"%-I:%M:%S %p",quarter:"T",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]},"fr-FR":{dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]},"it-IT":{dateTime:"%A %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]},"pt-BR":{dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}};function Qb(t,n,e){return(n=aw(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function $b(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,a,o,u=[],l=!0,s=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=a.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw r}}return u}}(t,n)||nw(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tw(t){return function(t){if(Array.isArray(t))return ew(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||nw(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nw(t,n){if(t){if("string"==typeof t)return ew(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?ew(t,n):void 0}}function ew(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e1&&void 0!==arguments[1]&&arguments[1],e=vp().domain([200,1200]).range([8,28]),i=t.range(),r=Math.abs(i[1]-i[0]),a=Math.floor(e(r));if("time"===this._scale)if(this._data&&this._data.length){var o=Vt(this._data),u=this._data.reduce((function(t,n,e,i){if(e){var r=Math.abs(n-i[e-1]);r1&&void 0!==arguments[1]&&arguments[1],e=[],i=hw.bind(this)(t,n),r=this._data.length?Vt(this._data):t.domain();if(n||"log"!==this._scale){if(e=t.ticks(i),!n&&!["log","time"].includes(this._scale)&&e.length>1){var a=2*(e[1]-e[0]);e=e.filter((function(t){return t%a==0}))}}else{var o=r.map((function(t){return Math.log10(t)%1==0?t:sw(t)})).map((function(t){return(t<0?-1:1)*Math.log10(Math.abs(t))})),u=Math.ceil((Math.abs(o[1]-o[0])+1)/(.75*i));e=o.every((function(t){return!t}))?t.ticks(i):yn(o[0],o[1],o[1]0?1:-1)).replace(/9+/g,"1")}))}if(n)e.map(Number).includes(+r[0])||e.unshift(r[0]),e.map(Number).includes(+r[1])||e.push(r[1]);else if("time"===this._scale)e.map(Number).includes(+r[0])||(e[0]=r[0]),e.map(Number).includes(+r[1])||(e[e.length-1]=r[1]);else if("log"!==this._scale){var l=e.reduce((function(t,n,e,i){return e&&t.5*l&&e.unshift(r[0]),e.map(Number).includes(+r[1])||r[1]-e[e.length-1]>.5*l&&e.push(r[1])}if(this._data.length){var s=this._data.map(Number);e=e.filter((function(t){return s.includes(+t)}))}return e}var gw=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&ow(t,n)}(a,uh);var n,e,i,r=uw(a);function a(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this))._align="middle",t._barConfig={stroke:"#999","stroke-width":1},t._data=[],t._domain=[0,10],t._duration=600,t._gridConfig={stroke:"#eee","stroke-width":1},t._gridLog=!1,t._height=400,t._labelOffset=!1,t._labelRotation=!1,t.orient("bottom"),t._outerBounds={width:0,height:0,x:0,y:0},t._padding=5,t._paddingInner=.1,t._paddingOuter=.1,t._rounding="none",t._scale="linear",t._scalePadding=.5,t._shape="Line",t._shapeConfig={fill:"#999",height:function(t){return t.tick?8:0},label:function(t){return t.text},labelBounds:function(t){return t.labelBounds},labelConfig:{fontColor:"#999",fontFamily:(new Zy).fontFamily(),fontResize:!1,fontSize:hh(14),padding:5,textAnchor:function(){var n=Oy(t._select.node());return"left"===t._orient?n?"start":"end":"right"===t._orient?n?"end":"start":t._labelRotation?"bottom"===t._orient?"end":"start":"middle"},verticalAlign:function(){return"bottom"===t._orient?"top":"top"===t._orient?"bottom":"middle"}},r:function(t){return t.tick?4:0},stroke:"#999",strokeWidth:1,width:function(t){return t.tick?8:0}},t._tickSize=8,t._tickSuffix="normal",t._tickUnit=0,t._timeLocale=void 0,t._titleClass=new Zy,t._titleConfig={fontColor:hy.dark,fontSize:12,textAnchor:"middle"},t._width=400,t}return n=a,e=[{key:"_barPosition",value:function(t){var n=this._position,e=n.height,i=n.x,r=n.y,a=n.opposite,o=this._margin[a],u=["top","left"].includes(this._orient)?this._outerBounds[r]+this._outerBounds[e]-o:this._outerBounds[r]+o,l="band"===this._scale?this._d3Scale.step()-this._d3Scale.bandwidth():"point"===this._scale?this._d3Scale.step()*this._d3Scale.padding():0,s="band"===this._scale?this._d3Scale.step():"point"===this._scale?this._d3Scale.step()*this._d3Scale.padding():0,c=(this._d3ScaleNegative?this._d3ScaleNegative.domain():[]).concat(this._d3Scale?this._d3Scale.domain():[]).sort((function(t,n){return t-n}));t.call(Wc,this._barConfig).attr("".concat(i,"1"),this._getPosition(c[0])-l).attr("".concat(i,"2"),this._getPosition(c[c.length-1])+s).attr("".concat(r,"1"),u).attr("".concat(r,"2"),u)}},{key:"_getDomain",value:function(){var t=[];this._d3ScaleNegative&&(t=this._d3ScaleNegative.domain()),this._d3Scale&&(t=t.concat(this._d3Scale.domain()));var n=["band","ordinal","point"].includes(this._scale)?t:Vt(t);return t[0]>t[1]?n.reverse():n}},{key:"_getPosition",value:function(t){return"log"===this._scale&&0===t?(this._d3Scale||this._d3ScaleNegative).range()[this._d3Scale?0:1]:("log"===this._scale&&t<0?this._d3ScaleNegative||function(){return 0}:this._d3Scale)(t)}},{key:"_getRange",value:function(){var t=[];return this._d3ScaleNegative&&(t=this._d3ScaleNegative.range()),this._d3Scale&&(t=t.concat(this._d3Scale.range())),t[0]>t[1]?Vt(t).reverse():Vt(t)}},{key:"_getLabels",value:function(){var t=[];return this._d3ScaleNegative&&(t=t.concat(fw.bind(this)(this._d3ScaleNegative,!1))),this._d3Scale&&(t=t.concat(fw.bind(this)(this._d3Scale,!1))),"log"===this._scale&&t.includes(-1)&&t.includes(1)&&t.splice(t.indexOf(-1),1),t}},{key:"_getTicks",value:function(){if(["band","ordinal","point","time"].includes(this._scale)&&this._data.length&&this._data.length1&&void 0!==arguments[1]&&arguments[1],e=this._position,i=e.height,r=e.x,a=e.y,o=e.opposite,u=this._margin[o],l=["top","left"].includes(this._orient)?this._outerBounds[a]+this._outerBounds[i]-u:this._outerBounds[a]+u,s=n&&this._lastScale||this._getPosition.bind(this),c=["top","left"].includes(this._orient)?u:-u,h="band"===this._scale?this._d3Scale.bandwidth()/2:0,f=function(t){return s(t.id)+h};t.call(Wc,this._gridConfig).attr("".concat(r,"1"),f).attr("".concat(r,"2"),f).attr("".concat(a,"1"),l).attr("".concat(a,"2"),n?l:l+c)}},{key:"render",value:function(t){var n,e=this;void 0===this._select&&this.select(Cf("body").append("svg").attr("width","".concat(this._width,"px")).attr("height","".concat(this._height,"px")).node());var i=this._timeLocale||Jb[this._locale]||Jb["en-US"];Ve(i).format();var r,a,o,u=this._position,l=u.width,s=u.height,c=u.x,h=u.y,f=u.horizontal,g=u.opposite,d="d3plus-Axis-clip-".concat(this._uuid),p=["top","left"].includes(this._orient),m=this._padding,_=this._select,y=[m,this["_".concat(l)]-m],v=Nd().duration(this._duration),b="Circle"===this._shape?this._shapeConfig.r:"Rect"===this._shape?this._shapeConfig[l]:this._shapeConfig.strokeWidth,w="function"!=typeof b?function(){return b}:b,S=this._margin={top:0,right:0,bottom:0,left:0},x=this._tickFormat?this._tickFormat:function(t){if(isNaN(t)||["band","ordinal","point"].includes(e._scale))return t;if("time"===e._scale)return Je(t,(e._data.length?e._data:e._domain).map(Xb).sort((function(t,n){return+t-+n})),Tn).replace(/^Q/g,i.quarter);if("linear"===e._scale&&"smallest"===e._tickSuffix){var n="object"===iw(e._locale)?e._locale:A[e._locale],r=n.separator,a=n.suffixes,o=t>=1e3?a[e._tickUnit+8]:"",u=t/Math.pow(10,3*e._tickUnit),l=E(u,n,",.".concat(u.toString().length,"r"));return"".concat(l).concat(r).concat(o)}return E(t,e._locale)};function k(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._range;a=n?n.slice():[void 0,void 0];var e=y[0],i=y[1];this._range&&(void 0!==this._range[0]&&(e=this._range[0]),void 0!==this._range[this._range.length-1]&&(i=this._range[this._range.length-1])),(void 0===a[0]||a[0]i)&&(a[1]=i);var u=i-e;if("ordinal"===this._scale&&this._domain.length>a.length)if(n===this._range){var l=this._domain.length+1;a=(a=yn(l).map((function(t){return a[0]+u*(t/(l-1))})).slice(1,l)).map((function(t){return t-a[0]/2}))}else{var s=this._domain.length,c=a[1]-a[0];a=yn(s).map((function(t){return a[0]+c*(t/(s-1))}))}var h="scale".concat(this._scale.charAt(0).toUpperCase()).concat(this._scale.slice(1)),f=this._domain.slice();if(this._d3Scale=Vp[h]().domain("time"===this._scale?f.map(Xb):f).range(a),"none"!==this._rounding){var g=function(){var n=function(t){return"".concat(Math.round(Math.abs(t))).length},e=Math.max(n(f[0]),n(f[1]))-1,i=+"1".concat(Array(e).fill(0).join("")),r=f[1]1}))?this._d3Scale.domain(d):g.bind(this)()}}if(this._d3Scale.padding&&this._d3Scale.padding(this._scalePadding),this._d3Scale.paddingInner&&this._d3Scale.paddingInner(this._paddingInner),this._d3Scale.paddingOuter&&this._d3Scale.paddingOuter(this._paddingOuter),this._d3ScaleNegative=null,"log"===this._scale){var m=this._d3Scale.domain();if(0===m[0]){var _=fn([fn(this._data),Math.abs(m[1])]);m[0]=0===_||1===_?1e-6:_<=1?sw(_):1,m[1]<0&&(m[0]*=-1)}else if(0===m[m.length-1]){var v=fn([fn(this._data),Math.abs(m[0])]);m[m.length-1]=0===v||1===v?1e-6:v<=1?sw(v):1,m[0]<0&&(m[m.length-1]*=-1)}var b=this._d3Scale.range();if(m[0]<0&&m[m.length-1]<0)this._d3ScaleNegative=this._d3Scale.copy().domain(m).range(b),this._d3Scale=null;else if(m[0]>0&&m[m.length-1]>0)this._d3Scale.domain(m).range(b);else{var S=m.map((function(t){return Math.log10(Math.abs(t))})),x=S[0]/vn(S)*(b[1]-b[0]),k=fn([fn(this._data.filter((function(t){return t>=0}))),Math.abs(m[1])]),C=fn([fn(this._data.filter((function(t){return t<0||Object.is(t,-0)}))),Math.abs(m[0])]),A=fn([0===k?1e-6:k<=1?sw(k):1,0===C?-1e-6:C<=1?sw(C):1]);this._d3ScaleNegative=this._d3Scale.copy(),(m[0]<0?this._d3Scale:this._d3ScaleNegative).domain([m[0]<0?A:-A,m[1]]).range([b[0]+x,b[1]]),(m[0]<0?this._d3ScaleNegative:this._d3Scale).domain([m[0],m[0]<0?-A:A]).range([b[0],b[0]+x])}}if(o=(this._ticks?"time"===this._scale?this._ticks.map(Xb):this._ticks:(this._d3Scale?this._d3Scale.ticks:this._d3ScaleNegative.ticks)?this._getTicks():this._domain).slice(),r=(this._labels?"time"===this._scale?this._labels.map(Xb):this._labels:(this._d3Scale?this._d3Scale.ticks:this._d3ScaleNegative.ticks)?this._getLabels():o).slice(),"time"===this._scale&&(o=o.map(Number),r=r.map(Number)),o=o.sort((function(n,e){return t._getPosition(n)-t._getPosition(e)})),r=r.sort((function(n,e){return t._getPosition(n)-t._getPosition(e)})),"linear"===this._scale&&"smallest"===this._tickSuffix){var E=r.filter((function(t){return t>=1e3}));if(E.length>0)for(var M=Math.min.apply(Math,tw(E)),T=1;T&&T<7&&M/Math.pow(10,3*T)>=1;)this._tickUnit=T,T+=1}var O=[];this._availableTicks=o,o.forEach((function(n,e){var i=w({id:n,tick:!0},e);"Circle"===t._shape&&(i*=2);var r=t._getPosition(n);!O.length||Math.abs(lh(r,O)-r)>2*i?O.push(r):O.push(!1)})),o=o.filter((function(t,n){return!1!==O[n]})),this._visibleTicks=o}function C(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,e=t.i,i=t.position;if("band"===this._scale)return this._d3Scale.bandwidth();var r=e-n<0?1===F.length?y[0]:i-(F[e+n].position-i):i-(i-F[e-n].position),a=Math.abs(i-r),o=e+n>F.length-1?1===F.length?y[1]:i+(i-F[e-n].position):i-(i-F[e+n].position);return fn([a,Math.abs(i-o)])}if(k.bind(this)(),this._title){var M=this._titleConfig,T=M.fontFamily,O=M.fontSize,P=M.lineHeight,j=Gy().fontFamily("function"==typeof T?T():T).fontSize("function"==typeof O?O():O).lineHeight("function"==typeof P?P():P).width(a[a.length-1]-a[0]-2*m).height(this["_".concat(s)]-this._tickSize-2*m),B=j(this._title).lines.length;S[this._orient]=B*j.lineHeight()+m}var D="Circle"===this._shape?"function"==typeof this._shapeConfig.r?this._shapeConfig.r({tick:!0}):this._shapeConfig.r:"Rect"===this._shape?"function"==typeof this._shapeConfig[s]?this._shapeConfig[s]({tick:!0}):this._shapeConfig[s]:this._tickSize,z=w({tick:!0});function N(t){var n=t.d,e=t.i,i=t.fF,r=t.fP,a=t.fS,o=t.rotate,u=t.space,l=o?"width":"height",s=o?"height":"width",c=fn([this._maxSize,this._width]),h=fn([this._maxSize,this._height]),g=Gy().fontFamily(i).fontSize(a).lineHeight(this._shapeConfig.lineHeight?this._shapeConfig.lineHeight(n,e):void 0);g[s](f?u:c-D-m-this._margin.left-this._margin.right),g[l](f?h-D-m-this._margin.top-this._margin.bottom:u);var d=g(x(n));return d.lines=d.lines.filter((function(t){return""!==t})),d.width=d.lines.length?Math.ceil(hn(d.widths)):0,d.height=d.lines.length?Math.ceil(d.lines.length*g.lineHeight())+r:0,d}function R(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=0;t.forEach((function(e){var i=t[e.i-1],r=e.rotate&&f||!e.rotate&&!f?"width":"height",a=e.rotate&&f||!e.rotate&&!f?"height":"width";i?i.position+i[a]/2>e.position-e[a]/2&&(n?(e.offset=i[r],n=0):n=1):n=1}))}"function"==typeof D&&(D=hn(o.map(D))),"Rect"===this._shape&&(D/=2),"function"==typeof z&&(z=hn(o.map(z))),"Circle"!==this._shape&&(z/=2);var F=[];function L(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this._shapeConfig.labelConfig,i=e.fontFamily,a=e.fontSize,o=this._shapeConfig.labelConfig.padding;(F=r.map((function(n,e){var r="function"==typeof i?i(n,e):i,u="function"==typeof o?o(n,e):o,l="function"==typeof a?a(n,e):a,s=t._getPosition(n);return{d:n,i:e,fF:r,fP:u,fS:l,lineHeight:t._shapeConfig.lineHeight?t._shapeConfig.lineHeight(n,e):1.4*l,position:s,rotate:t._labelRotation}}))).forEach((function(e){e.space=C.bind(t)(e,n)}));var u=fn(F,(function(t,n){return n&&n!==F.length-1?t.space:1/0}));F=F.map((function(n){"time"===t._scale&&(n.space=u);var e=N.bind(t)(n);return Object.assign(e,n)})),n>1&&R.bind(this)(F)}L.bind(this)();var I=this._labelOffset&&F.some((function(t){return t.truncated}));I&&L.bind(this)(2);var H=[0,1].map((function(t){var n=F[t?F.length-1:0];if(!n)return 0;var e=n.height,i=n.position,r=n.rotate,a=n.width,o=t?y[1]:y[0],u=(r||!f?e:a)/2;if(Math.abs(i-o)>=u)return 0;var l=u-(i-o);return Math.abs(l)})),G=$b(a,2),K=G[0],U=G[1],q=[K+H[0],U-H[1]];this._range&&(void 0!==this._range[0]&&(q[0]=this._range[0]),void 0!==this._range[this._range.length-1]&&(q[1]=this._range[this._range.length-1])),q[0]===K&&q[1]===U||(k.bind(this)(q),L.bind(this)(I?2:1)),F.some((function(t){return t.truncated}))&&F.length>1&&(F[0].truncated&&F[1].truncated&&r.splice(1,1),F[F.length-1].truncated&&F[F.length-2].truncated&&r.splice(F.length-2,1),F.length!==r.length&&L.bind(this)());var W=hn(F,(function(t){return t.height}))||0;this._labelRotation=f&&void 0===this._labelRotation?F.some((function(t){var n=t.i,e=t.height,i=t.position,r=t.truncated,a=F[n-1];return r||n&&a.position+a.height/2>i-e/2})):this._labelRotation;var Y=this._labelOffset?hn(F,(function(t){return t.offset||0})):0;F.forEach((function(t){return t.offset=t.offset?Y:0}));var V="Line"===this._shape?0:D,Z=this._outerBounds=(Qb(n={},s,(hn(F,(function(t){return Math.ceil(t[t.rotate||!f?"width":"height"]+t.offset)}))||0)+(F.length?m:0)),Qb(n,l,y[y.length-1]-y[0]),Qb(n,c,y[0]),n);Z[s]=hn([this._minSize,Z[s]]),S[this._orient]+=D,S[g]=void 0!==this._gridSize?hn([this._gridSize,V]):this["_".concat(s)]-S[this._orient]-Z[s]-m,Z[s]+=S[g]+S[this._orient],Z[h]="start"===this._align?this._padding:"end"===this._align?this["_".concat(s)]-Z[s]-this._padding:this["_".concat(s)]/2-Z[s]/2;var X=Hd("g#d3plus-Axis-".concat(this._uuid),{parent:_});this._group=X;var J=Hd("g.grid",{parent:X}).selectAll("line").data((0!==this._gridSize?this._grid||"log"===this._scale&&!this._gridLog?r:o:[]).map((function(t){return{id:t}})),(function(t){return t.id}));J.exit().transition(v).attr("opacity",0).call(this._gridPosition.bind(this)).remove(),J.enter().append("line").attr("opacity",0).attr("clip-path","url(#".concat(d,")")).call(this._gridPosition.bind(this),!0).merge(J).transition(v).attr("opacity",1).call(this._gridPosition.bind(this));var Q=r.filter((function(t,n){return F[n].lines.length&&!o.includes(t)})),$=F.some((function(t){return t.rotate})),tt=o.concat(Q).map((function(t){var n,i=F.find((function(n){return n.d===t})),a=e._getPosition(t),u=i?i.space:0,l=i?i.lines.length:1,d=i?i.lineHeight:1,_=i?i.fP:0,y=i&&e._labelOffset?i.offset:0,v=f?u:Z.width-S[e._position.opposite]-D-S[e._orient]+m,b=S[g],w=(D+y)*(p?-1:1),k=p?Z[h]+Z[s]-b:Z[h]+b;return Qb(n={id:t,labelBounds:$&&i?{x:-i.width/2+i.fS/4,y:"bottom"===e._orient?w+(i.width-d*l)/2+_:2*w-(i.width+d*l)/2+_,width:i.width,height:i.height}:{x:f?-u/2:"left"===e._orient?-v-m+w:w+m,y:f?"bottom"===e._orient?w+_:w-W-_:-u/2,width:f?u:v,height:f?W:u},rotate:!!i&&i.rotate,size:r.includes(t)||"log"===e._scale&&Math.log10(Math.abs(t))%1==0?w:o.includes(t)?Math.ceil(w/2):e._data.find((function(n){return+n===t}))?Math.ceil(w/4):0,text:!!r.includes(t)&&x(t),tick:o.includes(t)},c,a+("band"===e._scale?e._d3Scale.bandwidth()/2:0)),Qb(n,h,k),n}));"Line"===this._shape&&(tt=tt.concat(tt.map((function(t){var n=Object.assign({},t);return n[h]+=t.size,n})))),(new Zb[this._shape]).data(tt).duration(this._duration).labelConfig({ellipsis:function(t){return t&&t.length?"".concat(t,"..."):""},rotate:function(t){return t.rotate?-90:0}}).select(Hd("g.ticks",{parent:X}).node()).config(ch.bind(this)(this._shapeConfig)).labelConfig({padding:0}).render();var nt=X.selectAll("line.bar").data([null]);return nt.enter().append("line").attr("class","bar").attr("opacity",0).call(this._barPosition.bind(this)).merge(nt).transition(v).attr("opacity",1).call(this._barPosition.bind(this)),this._titleClass.data(this._title?[{text:this._title}]:[]).duration(this._duration).height(S[this._orient]).rotate("left"===this._orient?-90:"right"===this._orient?90:0).select(Hd("g.d3plus-Axis-title",{parent:X}).node()).text((function(t){return t.text})).verticalAlign("middle").width(a[a.length-1]-a[0]).x(f?a[0]:"left"===this._orient?Z.x+S.left/2-(a[a.length-1]-a[0])/2:Z.x+Z.width-S.right/2-(a[a.length-1]-a[0])/2).y(f?"bottom"===this._orient?Z.y+Z.height-S.bottom:Z.y:a[0]+(a[a.length-1]-a[0])/2-S[this._orient]/2).config(ch.bind(this)(this._titleConfig)).render(),this._lastScale=this._getPosition.bind(this),t&&setTimeout(t,this._duration+100),this}},{key:"align",value:function(t){return arguments.length?(this._align=t,this):this._align}},{key:"barConfig",value:function(t){return arguments.length?(this._barConfig=Object.assign(this._barConfig,t),this):this._barConfig}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"domain",value:function(t){return arguments.length?(this._domain=t,this):this._domain}},{key:"duration",value:function(t){return arguments.length?(this._duration=t,this):this._duration}},{key:"grid",value:function(t){return arguments.length?(this._grid=t,this):this._grid}},{key:"gridConfig",value:function(t){return arguments.length?(this._gridConfig=Object.assign(this._gridConfig,t),this):this._gridConfig}},{key:"gridLog",value:function(t){return arguments.length?(this._gridLog=t,this):this._gridLog}},{key:"gridSize",value:function(t){return arguments.length?(this._gridSize=t,this):this._gridSize}},{key:"height",value:function(t){return arguments.length?(this._height=t,this):this._height}},{key:"labels",value:function(t){return arguments.length?(this._labels=t,this):this._labels}},{key:"labelOffset",value:function(t){return arguments.length?(this._labelOffset=t,this):this._labelOffset}},{key:"labelRotation",value:function(t){return arguments.length?(this._labelRotation=t,this):this._labelRotation}},{key:"maxSize",value:function(t){return arguments.length?(this._maxSize=t,this):this._maxSize}},{key:"minSize",value:function(t){return arguments.length?(this._minSize=t,this):this._minSize}},{key:"orient",value:function(t){if(arguments.length){var n=["top","bottom"].includes(t);return this._position={horizontal:n,width:n?"width":"height",height:n?"height":"width",x:n?"x":"y",y:n?"y":"x",opposite:{top:"bottom",right:"left",bottom:"top",left:"right"}[t]},this._orient=t,this}return this._orient}},{key:"outerBounds",value:function(){return this._outerBounds}},{key:"padding",value:function(t){return arguments.length?(this._padding=t,this):this._padding}},{key:"paddingInner",value:function(t){return arguments.length?(this._paddingInner=t,this):this._paddingInner}},{key:"paddingOuter",value:function(t){return arguments.length?(this._paddingOuter=t,this):this._paddingOuter}},{key:"range",value:function(t){return arguments.length?(this._range=t,this):this._range}},{key:"rounding",value:function(t){return arguments.length?(this._rounding=t,this):this._rounding}},{key:"scale",value:function(t){return arguments.length?(this._scale=t,this):this._scale}},{key:"scalePadding",value:function(t){return arguments.length?(this._scalePadding=t,this):this._scalePadding}},{key:"select",value:function(t){return arguments.length?(this._select=Cf(t),this):this._select}},{key:"shape",value:function(t){return arguments.length?(this._shape=t,this):this._shape}},{key:"shapeConfig",value:function(t){return arguments.length?(this._shapeConfig=qc(this._shapeConfig,t),this):this._shapeConfig}},{key:"tickFormat",value:function(t){return arguments.length?(this._tickFormat=t,this):this._tickFormat}},{key:"ticks",value:function(t){return arguments.length?(this._ticks=t,this):this._ticks}},{key:"tickSize",value:function(t){return arguments.length?(this._tickSize=t,this):this._tickSize}},{key:"tickSuffix",value:function(t){return arguments.length?(this._tickSuffix=t,this):this._tickSuffix}},{key:"timeLocale",value:function(t){return arguments.length?(this._timeLocale=t,this):this._timeLocale}},{key:"title",value:function(t){return arguments.length?(this._title=t,this):this._title}},{key:"titleConfig",value:function(t){return arguments.length?(this._titleConfig=Object.assign(this._titleConfig,t),this):this._titleConfig}},{key:"width",value:function(t){return arguments.length?(this._width=t,this):this._width}}],e&&rw(n.prototype,e),i&&rw(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();function dw(t){return(dw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pw(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"data";return t.reduce((function(t,e){var i=[];return Array.isArray(e)?i=e:e[n]?i=e[n]:console.warn('d3plus-viz: Please implement a "dataFormat" callback to concat the arrays manually (consider using the d3plus.dataConcat method in your callback). Currently unable to concatenate (using key: "'.concat(n,'") the following response:'),e),t.concat(i)}),[])};function Lw(t){return(Lw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}const Iw=function(t){return"string"==typeof t||"object"===Lw(t)&&t.url&&t.headers};var Hw={value:function(){}};function Gw(){for(var t,n=0,e=arguments.length,i={};n=200&&i<300||304===i){if(r)try{n=r.call(e,l)}catch(a){return void o.call("error",e,a)}else n=l;o.call("load",e,n)}else o.call("error",e,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=f:l.onreadystatechange=function(t){l.readyState>3&&f(t)},l.onprogress=function(t){o.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?u.get(t):(null==n?u.remove(t):u.set(t,n+""),e)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",e):i},responseType:function(t){return arguments.length?(a=t,e):a},timeout:function(t){return arguments.length?(h=+t,e):h},user:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",e)},response:function(t){return r=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,r,f){return l.open(n,t,!0,s,c),null==i||u.has("accept")||u.set("accept",i+",*/*"),l.setRequestHeader&&u.each((function(t,n){l.setRequestHeader(n,t)})),null!=i&&l.overrideMimeType&&l.overrideMimeType(i),null!=a&&(l.responseType=a),h>0&&(l.timeout=h),null==f&&"function"==typeof r&&(f=r,r=null),null!=f&&1===f.length&&(f=function(t){return function(n,e){t(null==n?e:null)}}(f)),null!=f&&e.on("error",f).on("load",(function(t){f(null,t)})),o.call("beforesend",e,l),l.send(null==r?null:r),e},abort:function(){return l.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e}function Yw(t,n){return function(e,i){var r=Ww(e).mimeType(t).response(n);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return r.get(i)}return r}}Kw.prototype=Gw.prototype={constructor:Kw,on:function(t,n){var e,i,r=this._,a=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,u=a.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,i,r=new Array(e),a=0;a9999?"+"+tS(n,6):tS(n,4))+"-"+tS(t.getUTCMonth()+1,2)+"-"+tS(t.getUTCDate(),2)+(a?"T"+tS(e,2)+":"+tS(i,2)+":"+tS(r,2)+"."+tS(a,3)+"Z":r?"T"+tS(e,2)+":"+tS(i,2)+":"+tS(r,2)+"Z":i||e?"T"+tS(e,2)+":"+tS(i,2)+"Z":"")}function eS(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function i(t,n){var i,r=[],a=t.length,o=0,u=0,l=a<=0,s=!1;function c(){if(l)return Jw;if(s)return s=!1,Xw;var n,i,r=o;if(34===t.charCodeAt(r)){for(;o++=a?l=!0:10===(i=t.charCodeAt(o++))?s=!0:13===i&&(s=!0,10===t.charCodeAt(o)&&++o),t.slice(r+1,n-1).replace(/""/g,'"')}for(;o2&&void 0!==arguments[2]?arguments[2]:"headers";return t[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data"].map((function(e){return t[n].reduce((function(t,n,i){return t[n]=e[i],t}),{})}))};function sS(t){return(sS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cS(t,n,e,i){var r,a=this,o=function(t){return t.reduce((function(t,n){return n?t+1:t}),0)};t instanceof Array||(t=[t]);var u=t.find(Iw),l=new Array(t.length),s=[];u?t.forEach((function(t,n){Iw(t)?s.push(t):l[n]=t})):l[0]=t;var c=o(l);if(s.forEach((function(u){var h={},f=u;"object"===sS(u)&&(f=u.url,h=u.headers);var g=(r=function(t){switch(t.slice(t.length-4)){case".csv":return oS;case".tsv":return uS;case".txt":return Zw;default:return Vw}}(f))(f);for(var d in h)({}).hasOwnProperty.call(h,d)&&g.header(d,h[d]);g.get((function(u,h){if((h=u?[]:h)&&!(h instanceof Array)&&h.data&&h.headers&&(h=lS(h)),h=function(t,n,e){return n!==Vw&&!t&&e&&e instanceof Array&&e.forEach((function(t){for(var n in t)isNaN(t[n])?"false"===t[n].toLowerCase()?t[n]=!1:"true"===t[n].toLowerCase()?t[n]=!0:"null"===t[n].toLowerCase()?t[n]=null:"undefined"===t[n].toLowerCase()&&(t[n]=void 0):t[n]=parseFloat(t[n])})),e}(u,r,h),l[function(t,n){return n.indexOf(t)}(f,t)]=h,o(l)-c===s.length){if(h=1===o(l)?l[0]:l,a._cache&&a._lrucache.set("".concat(e,"_").concat(f),h),n){var g=n(1===o(l)?l[0]:l);"data"===e&&Uc(g)?(h=g.data||[],delete g.data,a.config(g)):h=g||[]}else"data"===e&&(h=Fw(l,"data"));e&&"_".concat(e)in a&&(a["_".concat(e)]=h),i&&i(u,h)}}))})),0===s.length){l=l.map((function(t){return t&&!(t instanceof Array)&&t.data&&t.headers&&(t=lS(t)),t}));var h=1===o(l)?l[0]:l;if(n){var f=n(1===o(l)?l[0]:l);"data"===e&&Uc(f)?(h=f.data||[],delete f.data,this.config(f)):h=f||[]}else"data"===e&&(h=Fw(l,"data"));e&&"_".concat(e)in this&&(this["_".concat(e)]=h),i&&i(null,h)}}function hS(t,n,e){if(t instanceof Array||(t=[t]),t.find(Iw)){var i=this._queue.find((function(t){return t[3]===e})),r=[cS.bind(this),t,n,e];i?this._queue[this._queue.indexOf(i)]=r:this._queue.push(r)}else this["_".concat(e)]=t}const fS={capture:!0,passive:!1};function gS(t){t.preventDefault(),t.stopImmediatePropagation()}function dS(t){var n=t.document.documentElement,e=Cf(t).on("dragstart.drag",gS,fS);"onselectstart"in n?e.on("selectstart.drag",gS,fS):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function pS(t,n){var e=t.document.documentElement,i=Cf(t).on("dragstart.drag",null);n&&(i.on("click.drag",gS,fS),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}const mS=t=>()=>t;function _S(t,{sourceEvent:n,target:e,selection:i,mode:r,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function yS(t){t.preventDefault(),t.stopImmediatePropagation()}var vS={name:"drag"},bS={name:"space"},wS={name:"handle"},SS={name:"center"};const{abs:xS,max:kS,min:CS}=Math;function AS(t){return[+t[0],+t[1]]}function ES(t){return[AS(t[0]),AS(t[1])]}var MS={name:"x",handles:["w","e"].map(NS),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},TS={name:"y",handles:["n","s"].map(NS),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},OS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(NS),input:function(t){return null==t?null:ES(t)},output:function(t){return t}},PS={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},jS={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},BS={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},DS={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},zS={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function NS(t){return{type:t}}function RS(t){return!t.ctrlKey&&!t.button}function FS(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function LS(){return navigator.maxTouchPoints||"ontouchstart"in this}function IS(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function HS(t){var n,e=FS,i=RS,r=LS,a=!0,o=Tf("start","brush","end"),u=6;function l(n){var e=n.property("__brush",p).selectAll(".overlay").data([NS("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",PS.overlay).merge(e).each((function(){var t=IS(this).extent;Cf(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([NS("selection")]).enter().append("rect").attr("class","selection").attr("cursor",PS.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));i.exit().remove(),i.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return PS[t.type]})),n.each(s).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",g).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function s(){var t=Cf(this),n=IS(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,n,e){var i=t.__brush.emitter;return!i||e&&i.clean?new h(t,n,e):i}function h(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function f(e){if((!n||e.touches)&&i.apply(this,arguments)){var r,o,u,l,h,f,g,d,p,m,_,y=this,v=e.target.__data__.type,b="selection"===(a&&e.metaKey?v="overlay":v)?vS:a&&e.altKey?SS:wS,w=t===TS?null:DS[v],S=t===MS?null:zS[v],x=IS(y),k=x.extent,C=x.selection,A=k[0][0],E=k[0][1],M=k[1][0],T=k[1][1],O=0,P=0,j=w&&S&&a&&e.shiftKey,B=Array.from(e.touches||[e],(t=>{const n=t.identifier;return(t=Ef(t,y)).point0=t.slice(),t.identifier=n,t}));hg(y);var D=c(y,arguments,!0).beforestart();if("overlay"===v){C&&(p=!0);const n=[B[0],B[1]||B[0]];x.selection=C=[[r=t===TS?A:CS(n[0][0],n[1][0]),u=t===MS?E:CS(n[0][1],n[1][1])],[h=t===TS?M:kS(n[0][0],n[1][0]),g=t===MS?T:kS(n[0][1],n[1][1])]],B.length>1&&L(e)}else r=C[0][0],u=C[0][1],h=C[1][0],g=C[1][1];o=r,l=u,f=h,d=g;var z=Cf(y).attr("pointer-events","none"),N=z.selectAll(".overlay").attr("cursor",PS[v]);if(e.touches)D.moved=F,D.ended=I;else{var R=Cf(e.view).on("mousemove.brush",F,!0).on("mouseup.brush",I,!0);a&&R.on("keydown.brush",(function(t){switch(t.keyCode){case 16:j=w&&S;break;case 18:b===wS&&(w&&(h=f-O*w,r=o+O*w),S&&(g=d-P*S,u=l+P*S),b=SS,L(t));break;case 32:b!==wS&&b!==SS||(w<0?h=f-O:w>0&&(r=o-O),S<0?g=d-P:S>0&&(u=l-P),b=bS,N.attr("cursor",PS.selection),L(t));break;default:return}yS(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:j&&(m=_=j=!1,L(t));break;case 18:b===SS&&(w<0?h=f:w>0&&(r=o),S<0?g=d:S>0&&(u=l),b=wS,L(t));break;case 32:b===bS&&(t.altKey?(w&&(h=f-O*w,r=o+O*w),S&&(g=d-P*S,u=l+P*S),b=SS):(w<0?h=f:w>0&&(r=o),S<0?g=d:S>0&&(u=l),b=wS),N.attr("cursor",PS[v]),L(t));break;default:return}yS(t)}),!0),dS(e.view)}s.call(y),D.start(e,b.name)}function F(t){for(const n of t.changedTouches||[t])for(const t of B)t.identifier===n.identifier&&(t.cur=Ef(n,y));if(j&&!m&&!_&&1===B.length){const t=B[0];xS(t.cur[0]-t[0])>xS(t.cur[1]-t[1])?_=!0:m=!0}for(const n of B)n.cur&&(n[0]=n.cur[0],n[1]=n.cur[1]);p=!0,yS(t),L(t)}function L(t){const n=B[0],e=n.point0;var i;switch(O=n[0]-e[0],P=n[1]-e[1],b){case bS:case vS:w&&(O=kS(A-r,CS(M-h,O)),o=r+O,f=h+O),S&&(P=kS(E-u,CS(T-g,P)),l=u+P,d=g+P);break;case wS:B[1]?(w&&(o=kS(A,CS(M,B[0][0])),f=kS(A,CS(M,B[1][0])),w=1),S&&(l=kS(E,CS(T,B[0][1])),d=kS(E,CS(T,B[1][1])),S=1)):(w<0?(O=kS(A-r,CS(M-r,O)),o=r+O,f=h):w>0&&(O=kS(A-h,CS(M-h,O)),o=r,f=h+O),S<0?(P=kS(E-u,CS(T-u,P)),l=u+P,d=g):S>0&&(P=kS(E-g,CS(T-g,P)),l=u,d=g+P));break;case SS:w&&(o=kS(A,CS(M,r-O*w)),f=kS(A,CS(M,h+O*w))),S&&(l=kS(E,CS(T,u-P*S)),d=kS(E,CS(T,g+P*S)))}f=0;)if((e=t._tasks[i])&&(t._tasks[i]=null,e.abort))try{e.abort()}catch(r){}t._active=NaN,VS(t)}function VS(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function ZS(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new US(t)}US.prototype=ZS.prototype={constructor:US,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=GS.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),qS(this),this},abort:function(){return null==this._error&&YS(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},VS(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,VS(this),this}};const XS=t=>()=>t;function JS(t,{sourceEvent:n,target:e,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function QS(t,n,e){this.k=t,this.x=n,this.y=e}QS.prototype={constructor:QS,scale:function(t){return 1===t?this:new QS(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new QS(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $S=new QS(1,0,0);function tx(t){for(;!t.__zoom;)if(!(t=t.parentNode))return $S;return t.__zoom}function nx(t){t.stopImmediatePropagation()}function ex(t){t.preventDefault(),t.stopImmediatePropagation()}function ix(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function rx(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ax(){return this.__zoom||$S}function ox(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ux(){return navigator.maxTouchPoints||"ontouchstart"in this}function lx(t,n,e){var i=t.invertX(n[0][0])-e[0][0],r=t.invertX(n[1][0])-e[1][0],a=t.invertY(n[0][1])-e[0][1],o=t.invertY(n[1][1])-e[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}tx.prototype=QS.prototype;var sx={exports:{}};"object"==typeof window&&window;const cx=R(sx.exports=function(){var t=void 0;function n(t){if(!(this instanceof n))return new n(t);this._LRUCacheState=new i(t)}var e=n.prototype;function i(t){this.capacity=t>0?+t:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList=new r}function r(){this.length=0,this.head=null,this.end=null}function a(t){this.key=t,this.p=null,this.n=null}function o(t,n){n!==t.head&&(t.end?t.end===n&&(t.end=n.n):t.end=n,u(n.n,n.p),u(n,t.head),t.head=n,t.head.n=null)}function u(t,n){t!==n&&(t&&(t.p=n),n&&(n.n=t))}return e.get=function(t){var n=this._LRUCacheState,e=n.hash[t];if(e)return o(n.linkedList,e),n.data[t]},e.set=function(n,e){var i=this._LRUCacheState,r=i.hash[n];return e===t||(r||(i.hash[n]=new a(n),i.linkedList.length+=1,r=i.hash[n]),o(i.linkedList,r),i.data[n]=e,i.linkedList.length>i.capacity&&this.remove(i.linkedList.end.key)),this},e.update=function(t,n){return this.has(t)&&this.set(t,n(this.get(t))),this},e.remove=function(t){var n=this._LRUCacheState,e=n.hash[t];return e?(e===n.linkedList.head&&(n.linkedList.head=e.p),e===n.linkedList.end&&(n.linkedList.end=e.n),u(e.n,e.p),delete n.hash[t],delete n.data[t],n.linkedList.length-=1,this):this},e.removeAll=function(){return this._LRUCacheState=new i(this._LRUCacheState.capacity),this},e.info=function(){var t=this._LRUCacheState;return{capacity:t.capacity,length:t.linkedList.length}},e.keys=function(){for(var t=[],n=this._LRUCacheState.linkedList.head;n;)t.push(n.key),n=n.p;return t},e.has=function(t){return!!this._LRUCacheState.hash[t]},e.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},e.popStale=function(){var t=this.staleKey();if(!t)return null;var n=[t,this._LRUCacheState.data[t]];return this.remove(t),n},n}());function hx(t,n){for(var e=[],i=0;i0){var a=(e[n]-e[t-1])/(n-t+1);r=i[n]-i[t-1]-(n-t+1)*a*a}else r=i[n]-e[n]*e[n]/(n+1);return r<0?0:r}function gx(t,n,e,i,r,a,o){if(!(t>n)){var u=Math.floor((t+n)/2);i[e][u]=i[e-1][u-1],r[e][u]=u;var l=e;t>e&&(l=Math.max(l,r[e][t-1]||0)),l=Math.max(l,r[e-1][u]||0);var s=u-1;n=l;--c){var h=fx(c,u,a,o);if(h+i[e-1][l-1]>=i[e][u])break;var f=fx(l,u,a,o)+i[e-1][l-1];ft.length)throw new Error("Cannot generate more classes than there are data values");var e=t.slice().sort((function(t,n){return t-n}));if(1===function(t){for(var n,e=0,i=0;i=0;o--){var u=i[o][r];a[o]=e.slice(u,r+1),o>0&&(r=u-1)}return a}function px(t){return(px="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mx(t,n){for(var e=0;el){var s=1,c=[],h=hn(this._lineData.map((function(t){return t.words.length})));if(this._wrapLines=function(){var t=this;if(!(++s>h)){var n=1===s?this._lineData.slice():this._lineData.filter((function(n){return n.width+n.shapeWidth+t._padding*(n.width?2:1)>l&&n.words.length>=s})).sort((function(t,n){return n.sentence.length-t.sentence.length}));if(n.length&&i>n[0].height*s){for(var e=!1,r=function(){var t=n[a],i=t.og.height*s,r=t.og.width*(1/s*1.5),o=Gy().fontFamily(t.f).fontSize(t.s).lineHeight(t.lh).width(r).height(i)(t.sentence);if(o.truncated)return e=!0,"break";t.width=Math.ceil(hn(o.lines.map((function(n){return vy(n,{"font-family":t.f,"font-size":t.s})}))))+t.s,t.height=o.lines.length*(t.lh+1)},a=0;ai){c=[];break}if(a>l){c=[],this._wrapLines();break}n+ai){e=vn(this._lineData.map((function(t){return t.shapeWidth+n._padding})))-this._padding;for(var f=0;f=1||c<=-1?Math.round(c).toString().length-1:-1*c.toString().split(".")[1].replace(/([1-9])[1-9].*$/,"$1").length,f=Math.pow(10,h),g=a(u===n&&1===e?fn([n+f,r.find((function(t){return t>n&&tn&&tthis._midpoint,g=h&&f,d=fn([this._buckets instanceof Array?this._buckets.length:this._buckets,g&&"jenks"!==this._scale?2*Math.floor(Gd(s).length/2)-1:Gd(s).length]),p=g?void 0:this._color;if(!p||p instanceof Array||(p=yn(0,d,1).map((function(t){return dy(p,(t+1)/d)})).reverse()),"jenks"===this._scale){var m=fn([p?p.length:d,d,s.length]),_=[];if(this._buckets instanceof Array)l=this._buckets;else{if(g&&this._centered){var y=Math.floor(m/2),v=m%2,b=s.filter((function(t){return t=n._midpoint})),x=Yt(S),k=x>w?1:0,C=dx(b,fn([y+v*(w>x?1:0),b.length])),A=dx(S,fn([y+v*k,S.length]));_=C.concat(A)}else _=dx(s,m);l=_.map((function(t){return t[0]}))}var E=new Set(l);if(l.length!==E.size&&(u=Array.from(E)),!p)if(g){p=[this._colorMin,this._colorMid,this._colorMax];var M=l.slice(0,m).filter((function(t,e){return tn._midpoint})),O=l.slice(0,m).filter((function(t){return t>n._midpoint})),P=M.map((function(t,n){return n?dy(p[0],n/M.length):p[0]})),j=T.map((function(){return p[1]})),B=O.map((function(t,n){return n===O.length-1?p[2]:dy(p[2],1-(n+1)/O.length)}));p=P.concat(j).concat(B)}else p=yn(0,d,1).map((function(t){return dy(n._colorMax,t/d)})).reverse();l.length<=m&&(p=p.slice(-l.length)),p=[p[0]].concat(p),this._colorScale=Fp().domain(l).range(p)}else{var D=this._buckets instanceof Array?this._buckets:void 0;if(g&&!p){var z=Math.floor(d/2),N=Xg.gamma(2.2)(this._colorMin,this._colorMid),R=yn(0,z,1).map((function(t){return N(t/z)})),F=(d%2?[0]:[]).map((function(){return n._colorMid})),L=Xg.gamma(2.2)(this._colorMax,this._colorMid),I=yn(0,z,1).map((function(t){return L(t/z)})).reverse();if(p=R.concat(F).concat(I),!D){var H=(p.length-1)/2;D=[c[0],this._midpoint,c[1]],D=yn(c[0],this._midpoint,-(c[0]-this._midpoint)/H).concat(yn(this._midpoint,c[1],(c[1]-this._midpoint)/H)).concat([c[1]])}}else if(p||("buckets"===this._scale||"quantile"===this._scale?(p=yn(0,d,1).map((function(t){return dy(h?n._colorMin:n._colorMax,t/d)})),f&&(p=p.reverse())):p=h?[this._colorMin,dy(this._colorMin,.8)]:[dy(this._colorMax,.8),this._colorMax]),!D)if("quantile"===this._scale){var G=1/(p.length-1);D=yn(0,1+G/2,G).map((function(t){return pn(s,t)}))}else if(g&&this._color&&this._centered){var K=(this._midpoint-c[0])/Math.floor(p.length/2),U=(c[1]-this._midpoint)/Math.floor(p.length/2),q=yn(c[0],this._midpoint,K),W=yn(this._midpoint,c[1]+U/2,U);D=q.concat(W)}else{var Y=(c[1]-c[0])/(p.length-1);D=yn(c[0],c[1]+Y/2,Y)}if("buckets"===this._scale||"quantile"===this._scale)l=D,p=[p[0]].concat(p);else if("log"===this._scale){var V=D.filter((function(t){return t<0}));if(V.length){var Z=V[0],X=V.map((function(t){return-Math.pow(Math.abs(Z),t/Z)}));V.forEach((function(t,n){D[D.indexOf(t)]=X[n]}))}var J=D.filter((function(t){return t>0}));if(J.length){var Q=J[J.length-1],$=J.map((function(t){return Math.pow(Q,t/Q)}));J.forEach((function(t,n){D[D.indexOf(t)]=$[n]}))}D.includes(0)&&(D[D.indexOf(0)]=1)}this._colorScale=("buckets"===this._scale||"quantile"===this._scale?Fp:vp)().domain(D).range(p)}this._colorScale.clamp&&this._colorScale.clamp(!0);var tt=this._bucketAxis||!["buckets","jenks","quantile"].includes(this._scale),nt=Nd().duration(this._duration),et={enter:{opacity:0},exit:{opacity:0},parent:this._group,transition:nt,update:{opacity:1}},it=Hd("g.d3plus-ColorScale-labels",Object.assign({condition:tt},et)),rt=Hd("g.d3plus-ColorScale-Rect",Object.assign({condition:tt},et)),at=Hd("g.d3plus-ColorScale-legend",Object.assign({condition:!tt},et));if(tt){var ot,ut={x:0,y:0},lt=c.slice();if(this._bucketAxis){var st=lt[lt.length-1],ct=lt[lt.length-2],ht=st?st/10:ct/10,ft=ht>=1||ht<=-1?Math.round(ht).toString().length-1:-1*ht.toString().split(".")[1].replace(/([1-9])[1-9].*$/,"$1").length,gt=Math.pow(10,ft);lt[lt.length-1]=st+gt}var dt=qc({domain:e?lt:lt.slice().reverse(),duration:this._duration,height:this._height,labels:u||l,orient:this._orient,padding:this._padding,scale:"log"===this._scale?"log":"linear",ticks:l,width:this._width},this._axisConfig),pt=qc({height:this["_".concat(i)]/2,width:this["_".concat(r)]/2},this._labelConfig);this._labelClass.config(pt);var mt=[];if(e&&this._labelMin){var _t={"font-family":this._labelClass.fontFamily()(this._labelMin),"font-size":this._labelClass.fontSize()(this._labelMin),"font-weight":this._labelClass.fontWeight()(this._labelMin)};_t["font-family"]instanceof Array&&(_t["font-family"]=_t["font-family"][0]);var yt=vy(this._labelMin,_t);yt&&ytEf(t,e)))),r=t.selection&&this._brushing||!i.length?t.selection:[i[0][0],i[0][0]];if("ticks"===this._buttonBehaviorCurrent&&(r=r.map(this._d3Scale.invert)),r=r.map(Number),"brush"===t.type&&this._brushing&&"buttons"===this._buttonBehaviorCurrent){var a=t.selection.map((function(n){return Math.abs(n-t.sourceEvent.offsetX)}));r=a[1]<=a[0]?[t.selection[0],t.sourceEvent.offsetX].sort((function(t,n){return t-n})):[t.sourceEvent.offsetX,t.selection[1]].sort((function(t,n){return t-n}))}var o="ticks"===this._buttonBehaviorCurrent?this._availableTicks.map(Number):this._d3Scale.range();if("ticks"===this._buttonBehaviorCurrent){var u=Xb(lh(r[0],o)),l=o.indexOf(+u),s=Xb(lh(r[1],o)),c=o.indexOf(+s),h=Math.abs(c-l),f=this._brushMin()-1;hb.length?b[0]:b[b.length-this._brushMin()],b[b.length-1]],S=void 0===this._selection?w:this._selection instanceof Array?"buttons"===this._buttonBehaviorCurrent?this._selection.map(Xb).map((function(t){return y[n._ticks.map(Number).indexOf(+t)]})):this._selection.map(Xb):"buttons"===this._buttonBehaviorCurrent?[y[this._ticks.map(Number).indexOf(+this._selection)]]:[this._selection];1===S.length&&S.push(S[0]),this._updateBrushLimit(S),this._brushGroup=Hd("g.brushGroup",{parent:this._group}),this._brushGroup.call(v).transition(this._transition).call(v.move,"ticks"===this._buttonBehaviorCurrent?this._updateBrushLimit(S):S),this._outerBounds.y-=this._handleSize/2,this._outerBounds.height+=this._handleSize/2;var x=Hd("g.d3plus-Timeline-play",{parent:this._group});return this._playButtonClass.data(this._playButton?[{x:this._paddingLeft-h,y:"buttons"===this._buttonBehaviorCurrent?"middle"===this._align?this._height/2-this._buttonHeight/2:"start"===this._align?this._margin.top:this._height-this._buttonHeight-this._margin.bottom:this._outerBounds.y,width:h,height:h}]:[]).select(x.node()).config(this._playButtonConfig).render(),this}},{key:"buttonPadding",value:function(t){return arguments.length?(this._buttonPadding=t,this):this._buttonPadding}},{key:"brushing",value:function(t){return arguments.length?(this._brushing=t,this):this._brushing}},{key:"brushFilter",value:function(t){return arguments.length?(this._brushFilter=t,this):this._brushFilter}},{key:"brushMin",value:function(t){return arguments.length?(this._brushMin="function"==typeof t?t:hh(t),this):this._brushMin}},{key:"buttonAlign",value:function(t){return arguments.length?(this._buttonAlign=t,this):this._buttonAlign}},{key:"buttonBehavior",value:function(t){return arguments.length?(this._buttonBehavior=t,this):this._buttonBehavior}},{key:"buttonHeight",value:function(t){return arguments.length?(this._buttonHeight=t,this):this._buttonHeight}},{key:"handleConfig",value:function(t){return arguments.length?(this._handleConfig=qc(this._handleConfig,t),this):this._handleConfig}},{key:"handleSize",value:function(t){return arguments.length?(this._handleSize=t,this):this._handleSize}},{key:"on",value:function(t,n){return 2===arguments.length?(this._on[t]=n,this):arguments.length?"string"==typeof t?this._on[t]:(this._on=qc({},this._on,t),this):this._on}},{key:"playButton",value:function(t){return arguments.length?(this._playButton=t,this):this._playButton}},{key:"playButtonConfig",value:function(t){return arguments.length?(this._playButtonConfig=qc(this._playButtonConfig,t),this):this._playButtonConfig}},{key:"playButtonInterval",value:function(t){return arguments.length?(this._playButtonInterval=t,this):this._playButtonInterval}},{key:"selectionConfig",value:function(t){return arguments.length?(this._selectionConfig=qc(this._selectionConfig,t),this):this._selectionConfig}},{key:"selection",value:function(t){return arguments.length?(this._selection=t,this):this._selection}},{key:"snapping",value:function(t){return arguments.length?(this._snapping=t,this):this._snapping}}],e&&Px(n.prototype,e),i&&Px(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(),Fx="top",Lx="bottom",Ix="right",Hx="left",Gx="auto",Kx=[Fx,Lx,Ix,Hx],Ux="start",qx="end",Wx="clippingParents",Yx="viewport",Vx="popper",Zx="reference",Xx=Kx.reduce((function(t,n){return t.concat([n+"-"+Ux,n+"-"+qx])}),[]),Jx=[].concat(Kx,[Gx]).reduce((function(t,n){return t.concat([n,n+"-"+Ux,n+"-"+qx])}),[]),Qx=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $x(t){return t?(t.nodeName||"").toLowerCase():null}function tk(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function nk(t){return t instanceof tk(t).Element||t instanceof Element}function ek(t){return t instanceof tk(t).HTMLElement||t instanceof HTMLElement}function ik(t){return"undefined"!=typeof ShadowRoot&&(t instanceof tk(t).ShadowRoot||t instanceof ShadowRoot)}const rk={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];ek(r)&&$x(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},a=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});ek(i)&&$x(i)&&(Object.assign(i.style,a),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};function ak(t){return t.split("-")[0]}var ok=Math.max,uk=Math.min,lk=Math.round;function sk(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ck(){return!/^((?!chrome|android).)*safari/i.test(sk())}function hk(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,a=1;n&&ek(t)&&(r=t.offsetWidth>0&&lk(i.width)/t.offsetWidth||1,a=t.offsetHeight>0&&lk(i.height)/t.offsetHeight||1);var o=(nk(t)?tk(t):window).visualViewport,u=!ck()&&e,l=(i.left+(u&&o?o.offsetLeft:0))/r,s=(i.top+(u&&o?o.offsetTop:0))/a,c=i.width/r,h=i.height/a;return{width:c,height:h,top:s,right:l+c,bottom:s+h,left:l,x:l,y:s}}function fk(t){var n=hk(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function gk(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&ik(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function dk(t){return tk(t).getComputedStyle(t)}function pk(t){return["table","td","th"].indexOf($x(t))>=0}function mk(t){return((nk(t)?t.ownerDocument:t.document)||window.document).documentElement}function _k(t){return"html"===$x(t)?t:t.assignedSlot||t.parentNode||(ik(t)?t.host:null)||mk(t)}function yk(t){return ek(t)&&"fixed"!==dk(t).position?t.offsetParent:null}function vk(t){for(var n=tk(t),e=yk(t);e&&pk(e)&&"static"===dk(e).position;)e=yk(e);return e&&("html"===$x(e)||"body"===$x(e)&&"static"===dk(e).position)?n:e||function(t){var n=/firefox/i.test(sk());if(/Trident/i.test(sk())&&ek(t)&&"fixed"===dk(t).position)return null;var e=_k(t);for(ik(e)&&(e=e.host);ek(e)&&["html","body"].indexOf($x(e))<0;){var i=dk(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}function bk(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wk(t,n,e){return ok(t,uk(n,e))}function Sk(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function xk(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function kk(t){return t.split("-")[1]}var Ck={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ak(t){var n,e=t.popper,i=t.popperRect,r=t.placement,a=t.variation,o=t.offsets,u=t.position,l=t.gpuAcceleration,s=t.adaptive,c=t.roundOffsets,h=t.isFixed,f=o.x,g=void 0===f?0:f,d=o.y,p=void 0===d?0:d,m="function"==typeof c?c({x:g,y:p}):{x:g,y:p};g=m.x,p=m.y;var _=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=Hx,b=Fx,w=window;if(s){var S=vk(e),x="clientHeight",k="clientWidth";if(S===tk(e)&&"static"!==dk(S=mk(e)).position&&"absolute"===u&&(x="scrollHeight",k="scrollWidth"),r===Fx||(r===Hx||r===Ix)&&a===qx)b=Lx,p-=(h&&S===w&&w.visualViewport?w.visualViewport.height:S[x])-i.height,p*=l?1:-1;if(r===Hx||(r===Fx||r===Lx)&&a===qx)v=Ix,g-=(h&&S===w&&w.visualViewport?w.visualViewport.width:S[k])-i.width,g*=l?1:-1}var C,A=Object.assign({position:u},s&&Ck),E=!0===c?function(t,n){var e=t.x,i=t.y,r=n.devicePixelRatio||1;return{x:lk(e*r)/r||0,y:lk(i*r)/r||0}}({x:g,y:p},tk(e)):{x:g,y:p};return g=E.x,p=E.y,l?Object.assign({},A,((C={})[b]=y?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+g+"px, "+p+"px)":"translate3d("+g+"px, "+p+"px, 0)",C)):Object.assign({},A,((n={})[b]=y?p+"px":"",n[v]=_?g+"px":"",n.transform="",n))}var Ek={passive:!0};var Mk={left:"right",right:"left",bottom:"top",top:"bottom"};function Tk(t){return t.replace(/left|right|bottom|top/g,(function(t){return Mk[t]}))}var Ok={start:"end",end:"start"};function Pk(t){return t.replace(/start|end/g,(function(t){return Ok[t]}))}function jk(t){var n=tk(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Bk(t){return hk(mk(t)).left+jk(t).scrollLeft}function Dk(t){var n=dk(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function zk(t){return["html","body","#document"].indexOf($x(t))>=0?t.ownerDocument.body:ek(t)&&Dk(t)?t:zk(_k(t))}function Nk(t,n){var e;void 0===n&&(n=[]);var i=zk(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),a=tk(i),o=r?[a].concat(a.visualViewport||[],Dk(i)?i:[]):i,u=n.concat(o);return r?u:u.concat(Nk(_k(o)))}function Rk(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Fk(t,n,e){return n===Yx?Rk(function(t,n){var e=tk(t),i=mk(t),r=e.visualViewport,a=i.clientWidth,o=i.clientHeight,u=0,l=0;if(r){a=r.width,o=r.height;var s=ck();(s||!s&&"fixed"===n)&&(u=r.offsetLeft,l=r.offsetTop)}return{width:a,height:o,x:u+Bk(t),y:l}}(t,e)):nk(n)?function(t,n){var e=hk(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):Rk(function(t){var n,e=mk(t),i=jk(t),r=null==(n=t.ownerDocument)?void 0:n.body,a=ok(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=ok(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-i.scrollLeft+Bk(t),l=-i.scrollTop;return"rtl"===dk(r||e).direction&&(u+=ok(e.clientWidth,r?r.clientWidth:0)-a),{width:a,height:o,x:u,y:l}}(mk(t)))}function Lk(t,n,e,i){var r="clippingParents"===n?function(t){var n=Nk(_k(t)),e=["absolute","fixed"].indexOf(dk(t).position)>=0&&ek(t)?vk(t):t;return nk(e)?n.filter((function(t){return nk(t)&&gk(t,e)&&"body"!==$x(t)})):[]}(t):[].concat(n),a=[].concat(r,[e]),o=a[0],u=a.reduce((function(n,e){var r=Fk(t,e,i);return n.top=ok(r.top,n.top),n.right=uk(r.right,n.right),n.bottom=uk(r.bottom,n.bottom),n.left=ok(r.left,n.left),n}),Fk(t,o,i));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ik(t){var n,e=t.reference,i=t.element,r=t.placement,a=r?ak(r):null,o=r?kk(r):null,u=e.x+e.width/2-i.width/2,l=e.y+e.height/2-i.height/2;switch(a){case Fx:n={x:u,y:e.y-i.height};break;case Lx:n={x:u,y:e.y+e.height};break;case Ix:n={x:e.x+e.width,y:l};break;case Hx:n={x:e.x-i.width,y:l};break;default:n={x:e.x,y:e.y}}var s=a?bk(a):null;if(null!=s){var c="y"===s?"height":"width";switch(o){case Ux:n[s]=n[s]-(e[c]/2-i[c]/2);break;case qx:n[s]=n[s]+(e[c]/2-i[c]/2)}}return n}function Hk(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,a=e.strategy,o=void 0===a?t.strategy:a,u=e.boundary,l=void 0===u?Wx:u,s=e.rootBoundary,c=void 0===s?Yx:s,h=e.elementContext,f=void 0===h?Vx:h,g=e.altBoundary,d=void 0!==g&&g,p=e.padding,m=void 0===p?0:p,_=Sk("number"!=typeof m?m:xk(m,Kx)),y=f===Vx?Zx:Vx,v=t.rects.popper,b=t.elements[d?y:f],w=Lk(nk(b)?b:b.contextElement||mk(t.elements.popper),l,c,o),S=hk(t.elements.reference),x=Ik({reference:S,element:v,strategy:"absolute",placement:r}),k=Rk(Object.assign({},v,x)),C=f===Vx?k:S,A={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},E=t.modifiersData.offset;if(f===Vx&&E){var M=E[r];Object.keys(A).forEach((function(t){var n=[Ix,Lx].indexOf(t)>=0?1:-1,e=[Fx,Lx].indexOf(t)>=0?"y":"x";A[t]+=M[e]*n}))}return A}function Gk(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Kk(t){return[Fx,Ix,Lx,Hx].some((function(n){return t[n]>=0}))}function Uk(t,n,e){void 0===e&&(e=!1);var i,r,a=ek(n),o=ek(n)&&function(t){var n=t.getBoundingClientRect(),e=lk(n.width)/t.offsetWidth||1,i=lk(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),u=mk(n),l=hk(t,o,e),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!e)&&(("body"!==$x(n)||Dk(u))&&(s=(i=n)!==tk(i)&&ek(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:jk(i)),ek(n)?((c=hk(n,!0)).x+=n.clientLeft,c.y+=n.clientTop):u&&(c.x=Bk(u))),{x:l.left+s.scrollLeft-c.x,y:l.top+s.scrollTop-c.y,width:l.width,height:l.height}}function qk(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var Wk={placement:"bottom",modifiers:[],strategy:"absolute"};function Yk(){for(var t=arguments.length,n=new Array(t),e=0;e=0?-1:1,a="function"==typeof e?e(Object.assign({},n,{placement:t})):e,o=a[0],u=a[1];return o=o||0,u=(u||0)*r,[Hx,Ix].indexOf(i)>=0?{x:u,y:o}:{x:o,y:u}}(e,n.rects,a),t}),{}),u=o[n.placement],l=u.x,s=u.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=s),n.modifiersData[i]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,a=void 0===r||r,o=e.altAxis,u=void 0===o||o,l=e.fallbackPlacements,s=e.padding,c=e.boundary,h=e.rootBoundary,f=e.altBoundary,g=e.flipVariations,d=void 0===g||g,p=e.allowedAutoPlacements,m=n.options.placement,_=ak(m),y=l||(_===m||!d?[Tk(m)]:function(t){if(ak(t)===Gx)return[];var n=Tk(t);return[Pk(t),n,Pk(n)]}(m)),v=[m].concat(y).reduce((function(t,e){return t.concat(ak(e)===Gx?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,a=e.rootBoundary,o=e.padding,u=e.flipVariations,l=e.allowedAutoPlacements,s=void 0===l?Jx:l,c=kk(i),h=c?u?Xx:Xx.filter((function(t){return kk(t)===c})):Kx,f=h.filter((function(t){return s.indexOf(t)>=0}));0===f.length&&(f=h);var g=f.reduce((function(n,e){return n[e]=Hk(t,{placement:e,boundary:r,rootBoundary:a,padding:o})[ak(e)],n}),{});return Object.keys(g).sort((function(t,n){return g[t]-g[n]}))}(n,{placement:e,boundary:c,rootBoundary:h,padding:s,flipVariations:d,allowedAutoPlacements:p}):e)}),[]),b=n.rects.reference,w=n.rects.popper,S=new Map,x=!0,k=v[0],C=0;C=0,O=T?"width":"height",P=Hk(n,{placement:A,boundary:c,rootBoundary:h,altBoundary:f,padding:s}),j=T?M?Ix:Hx:M?Lx:Fx;b[O]>w[O]&&(j=Tk(j));var B=Tk(j),D=[];if(a&&D.push(P[E]<=0),u&&D.push(P[j]<=0,P[B]<=0),D.every((function(t){return t}))){k=A,x=!1;break}S.set(A,D)}if(x)for(var z=function(t){var n=v.find((function(n){var e=S.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return k=n,"break"},N=d?3:1;N>0;N--){if("break"===z(N))break}n.placement!==k&&(n.modifiersData[i]._skip=!0,n.placement=k,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,a=void 0===r||r,o=e.altAxis,u=void 0!==o&&o,l=e.boundary,s=e.rootBoundary,c=e.altBoundary,h=e.padding,f=e.tether,g=void 0===f||f,d=e.tetherOffset,p=void 0===d?0:d,m=Hk(n,{boundary:l,rootBoundary:s,padding:h,altBoundary:c}),_=ak(n.placement),y=kk(n.placement),v=!y,b=bk(_),w="x"===b?"y":"x",S=n.modifiersData.popperOffsets,x=n.rects.reference,k=n.rects.popper,C="function"==typeof p?p(Object.assign({},n.rects,{placement:n.placement})):p,A="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),E=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,M={x:0,y:0};if(S){if(a){var T,O="y"===b?Fx:Hx,P="y"===b?Lx:Ix,j="y"===b?"height":"width",B=S[b],D=B+m[O],z=B-m[P],N=g?-k[j]/2:0,R=y===Ux?x[j]:k[j],F=y===Ux?-k[j]:-x[j],L=n.elements.arrow,I=g&&L?fk(L):{width:0,height:0},H=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=H[O],K=H[P],U=wk(0,x[j],I[j]),q=v?x[j]/2-N-U-G-A.mainAxis:R-U-G-A.mainAxis,W=v?-x[j]/2+N+U+K+A.mainAxis:F+U+K+A.mainAxis,Y=n.elements.arrow&&vk(n.elements.arrow),V=Y?"y"===b?Y.clientTop||0:Y.clientLeft||0:0,Z=null!=(T=null==E?void 0:E[b])?T:0,X=B+W-Z,J=wk(g?uk(D,B+q-Z-V):D,B,g?ok(z,X):z);S[b]=J,M[b]=J-B}if(u){var Q,$="x"===b?Fx:Hx,tt="x"===b?Lx:Ix,nt=S[w],et="y"===w?"height":"width",it=nt+m[$],rt=nt-m[tt],at=-1!==[Fx,Hx].indexOf(_),ot=null!=(Q=null==E?void 0:E[w])?Q:0,ut=at?it:nt-x[et]-k[et]-ot+A.altAxis,lt=at?nt+x[et]+k[et]-ot-A.altAxis:rt,st=g&&at?function(t,n,e){var i=wk(t,n,e);return i>e?e:i}(ut,nt,lt):wk(g?ut:it,nt,g?lt:rt);S[w]=st,M[w]=st-nt}n.modifiersData[i]=M}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,a=e.elements.arrow,o=e.modifiersData.popperOffsets,u=ak(e.placement),l=bk(u),s=[Hx,Ix].indexOf(u)>=0?"height":"width";if(a&&o){var c=function(t,n){return Sk("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:xk(t,Kx))}(r.padding,e),h=fk(a),f="y"===l?Fx:Hx,g="y"===l?Lx:Ix,d=e.rects.reference[s]+e.rects.reference[l]-o[l]-e.rects.popper[s],p=o[l]-e.rects.reference[l],m=vk(a),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=d/2-p/2,v=c[f],b=_-h[s]-c[g],w=_/2-h[s]/2+y,S=wk(v,w,b),x=l;e.modifiersData[i]=((n={})[x]=S,n.centerOffset=S-w,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&gk(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,a=n.modifiersData.preventOverflow,o=Hk(n,{elementContext:"reference"}),u=Hk(n,{altBoundary:!0}),l=Gk(o,i),s=Gk(u,r,a),c=Kk(l),h=Kk(s);n.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:h},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}}]});function Xk(t){return(Xk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jk(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:[0,0];return function(){return{width:0,height:0,top:t[1],right:t[0],bottom:t[1],left:t[0]}}}var eC=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Qk(t,n)}(a,uh);var n,e,i,r=$k(a);function a(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this))._arrow=Gc("arrow",""),t._arrowStyle={content:"",background:"inherit",border:"inherit","border-width":"0 1px 1px 0",height:"10px",position:"absolute",transform:"rotate(45deg)",width:"10px","z-index":"-1"},t._background=hh(hy.light),t._body=Gc("body",""),t._bodyStyle={color:hy.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","font-weight":"400","z-index":"1"},t._border=hh("1px solid rgba(0, 0, 0, 0.1)"),t._borderRadius=hh("2px"),t._className="d3plus-tooltip",t._data=[],t._footer=Gc("footer",""),t._footerStyle={color:hy.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","font-weight":"400","margin-top":"5px","z-index":"1"},t._height=hh("auto"),t._id=function(t,n){return"".concat(n)},t._offset=hh(5),t._padding=hh("10px"),t._parent="body",t._pointerEvents=hh("auto"),t._popperClasses={},t._position=function(t){return[t.x,t.y]},t._prefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"-o-transform"in document.body.style?"-o-":"",t._tableStyle={"border-collapse":"collapse","border-spacing":"0",width:"100%"},t._tbody=[],t._tbodyStyle={color:hy.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","text-align":"center"},t._thead=[],t._theadStyle={color:hy.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","font-weight":"600","text-align":"center"},t._title=Gc("title",""),t._titleStyle={color:hy.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"16px","font-weight":"600","margin-bottom":"5px"},t._trStyle={"border-top":"1px solid rgba(0, 0, 0, 0.1)"},t._tdStyle={},t._width=hh("auto"),t}return n=a,e=[{key:"render",value:function(t){var n=this,e=this,i=Cf(this._parent).selectAll(".".concat(this._className)).data(this._data,this._id),r=i.enter().append("div").attr("class",this._className),a=i.merge(r);function o(t){r.append("div").attr("class","d3plus-tooltip-".concat(t)).attr("id",(function(n,i){return"d3plus-tooltip-".concat(t,"-").concat(n?e._id(n,i):"")})),qd(a.select(".d3plus-tooltip-".concat(t)).html((function(n,i){return e["_".concat(t)](n,i)})).style("display",(function(n,i){var r=e["_".concat(t)](n,i);return!1!==r&&null!=r?"block":"none"})),e["_".concat(t,"Style")])}function u(t){if("function"==typeof t){var n=Cf(this.parentNode.parentNode).datum();return t(n,e._data.indexOf(n))}return t}function l(t){t.style("background",e._background).style("".concat(e._prefix,"border-radius"),e._borderRadius).style("pointer-events",e._pointerEvents).style("padding",e._padding).style("width",e._width).style("height",e._height).style("border",(function(t,n){var i=Cf(this).style("border");return"0px none rgb(0, 0, 0)"!==i?i:e._border(t,n)}))}o("title"),o("body");var s=r.append("table").attr("class","d3plus-tooltip-table");qd(a.select(".d3plus-tooltip-table"),this._tableStyle),s.append("thead").attr("class","d3plus-tooltip-thead");var c=a.select(".d3plus-tooltip-thead");qd(c,this._theadStyle);var h=c.selectAll("tr").data([0]),f=h.enter().append("tr");h.exit().remove();var g=h.merge(f);qd(g,this._trStyle);var d=g.selectAll("th").data(this._thead);d.enter().append("th").merge(d).html(u),d.exit().remove(),s.append("tbody").attr("class","d3plus-tooltip-tbody");var p=a.select(".d3plus-tooltip-tbody");qd(p,this._tbodyStyle);var m=p.selectAll("tr").data(this._tbody),_=m.enter().append("tr");m.exit().remove();var y=m.merge(_);qd(y,this._trStyle);var v=y.selectAll("td").data((function(t){return t}));return v.enter().append("td").merge(v).html(u),qd(v,this._tdStyle),o("footer"),o("arrow"),r.attr("id",(function(t,e){return"d3plus-tooltip-".concat(t?n._id(t,e):"")})).call(l).each((function(t,i){var r=e._id(t,i),a=document.getElementById("d3plus-tooltip-".concat(r)),o=document.getElementById("d3plus-tooltip-arrow-".concat(r)),u=o.offsetHeight,l=o.getBoundingClientRect().height/2;o.style.bottom="-".concat(u/2,"px");var s=e._position(t,i),c=Array.isArray(s)?{getBoundingClientRect:nC(s)}:s;n._popperClasses[r]=Zk(c,a,{placement:"top",placements:["top","bottom"],modifiers:[{name:"arrow",options:{element:o}},{name:"offset",options:{offset:[0,e._offset(t,i)+l]}},{name:"preventOverflow",options:{boundary:"scrollParent",padding:5}},{name:"flip",options:{behavior:"flip",boundary:"viewport",padding:5}},{name:"update",enabled:!0,phase:"afterWrite",fn:function(t){var n=t.state,e=n.elements.arrow,i=n.styles.arrow;n.modifiersData.flip._skip?(e.style.transform="".concat(i.transform,"rotate(225deg)"),e.style.top="-".concat(u/2,"px")):(e.style.transform="".concat(i.transform,"rotate(45deg)"),e.style.bottom="-".concat(u/2,"px"))}}],removeOnDestroy:!0})})),a.each((function(t,i){var r=e._id(t,i),a=e._position(t,i),o=n._popperClasses[r];o&&(o.state.elements.reference.getBoundingClientRect=Array.isArray(a)?nC(a):a,o.update())})).call(l),i.exit().each((function(t,i){var r=e._id(t,i),a=n._popperClasses[r];a&&(a.destroy(),delete n._popperClasses[r])})).remove(),t&&setTimeout(t,100),this}},{key:"arrow",value:function(t){return arguments.length?(this._arrow="function"==typeof t?t:hh(t),this):this._arrow}},{key:"arrowStyle",value:function(t){return arguments.length?(this._arrowStyle=Object.assign(this._arrowStyle,t),this):this._arrowStyle}},{key:"background",value:function(t){return arguments.length?(this._background="function"==typeof t?t:hh(t),this):this._background}},{key:"body",value:function(t){return arguments.length?(this._body="function"==typeof t?t:hh(t),this):this._body}},{key:"bodyStyle",value:function(t){return arguments.length?(this._bodyStyle=Object.assign(this._bodyStyle,t),this):this._bodyStyle}},{key:"border",value:function(t){return arguments.length?(this._border="function"==typeof t?t:hh(t),this):this._border}},{key:"borderRadius",value:function(t){return arguments.length?(this._borderRadius="function"==typeof t?t:hh(t),this):this._borderRadius}},{key:"className",value:function(t){return arguments.length?(this._className=t,this):this._className}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"footer",value:function(t){return arguments.length?(this._footer="function"==typeof t?t:hh(t),this):this._footer}},{key:"footerStyle",value:function(t){return arguments.length?(this._footerStyle=Object.assign(this._footerStyle,t),this):this._footerStyle}},{key:"height",value:function(t){return arguments.length?(this._height="function"==typeof t?t:hh(t),this):this._height}},{key:"id",value:function(t){return arguments.length?(this._id="function"==typeof t?t:hh(t),this):this._id}},{key:"offset",value:function(t){return arguments.length?(this._offset="function"==typeof t?t:hh(t),this):this._offset}},{key:"padding",value:function(t){return arguments.length?(this._padding="function"==typeof t?t:hh(t),this):this._padding}},{key:"parent",value:function(t){return arguments.length?(this._parent=t,this):this._parent}},{key:"pointerEvents",value:function(t){return arguments.length?(this._pointerEvents="function"==typeof t?t:hh(t),this):this._pointerEvents}},{key:"position",value:function(t){return arguments.length?(this._position="string"==typeof t?hh(Cf(t).node()||[0,0]):"function"==typeof t?t:hh(t),this):this._position}},{key:"tableStyle",value:function(t){return arguments.length?(this._tableStyle=Object.assign(this._tableStyle,t),this):this._tableStyle}},{key:"tbody",value:function(t){return arguments.length?(this._tbody=t,this):this._tbody}},{key:"tbodyStyle",value:function(t){return arguments.length?(this._tbodyStyle=Object.assign(this._tbodyStyle,t),this):this._tbodyStyle}},{key:"thead",value:function(t){return arguments.length?(this._thead=t,this):this._thead}},{key:"theadStyle",value:function(t){return arguments.length?(this._theadStyle=Object.assign(this._theadStyle,t),this):this._theadStyle}},{key:"title",value:function(t){return arguments.length?(this._title="function"==typeof t?t:hh(t),this):this._title}},{key:"titleStyle",value:function(t){return arguments.length?(this._titleStyle=Object.assign(this._titleStyle,t),this):this._titleStyle}},{key:"trStyle",value:function(t){return arguments.length?(this._trStyle=Object.assign(this._trStyle,t),this):this._trStyle}},{key:"tdStyle",value:function(t){return arguments.length?(this._tdStyle=Object.assign(this._tdStyle,t),this):this._tdStyle}},{key:"width",value:function(t){return arguments.length?(this._width="function"==typeof t?t:hh(t),this):this._width}}],e&&Jk(n.prototype,e),i&&Jk(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();function iC(t){return(iC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rC(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{},n=t.duration,e=void 0===n?600:n,i=t.callback;return this.mask.call(this.exit.bind(this),e),this.elem.call(this.exit.bind(this),e),i&&setTimeout(i,e+100),this._isVisible=!1,this}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.callback,e=t.container,i=void 0===e?"body":e,r=t.duration,a=void 0===r?600:r,o=t.html,u=void 0===o?"Please Wait":o,l=t.mask,s=void 0===l?"rgba(0, 0, 0, 0.05)":l,c=t.style,h=void 0===c?{}:c,f=Cf(i);return this.mask=f.selectAll("div.d3plus-Mask").data(s?[s]:[]),this.mask=this.mask.enter().append("div").attr("class","d3plus-Mask").style("opacity",1).merge(this.mask),this.mask.exit().call(this.exit.bind(this),a),qd(this.mask,{"background-color":String,bottom:"0px",left:"0px",position:"absolute",right:"0px",top:"0px"}),this.elem=f.selectAll("div.d3plus-Message").data([u]),this.elem=this.elem.enter().append("div").attr("class","d3plus-Message").style("opacity",1).merge(this.elem).html(String),qd(this.elem,h),n&&setTimeout(n,100),this._isVisible=!0,this}}],e&&rC(n.prototype,e),i&&rC(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function oC(){var t=this._history.length,n=Hd("g.d3plus-viz-back",{parent:this._select,duration:this._duration,update:{transform:"translate(".concat(this._margin.left,", ").concat(this._margin.top,")")}}).node();this._backClass.data(t?[{text:"← ".concat(this._translate("Back")),x:0,y:0}]:[]).select(n).config(this._backConfig).render(),this._margin.top+=t?this._backClass.fontSize()()+2*this._backClass.padding()():0}function uC(){var t=this,n=this._data,e=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(e)||(e="bottom");var i=["top","bottom"].includes(e),r=this._colorScale&&e,a=this._colorScalePadding()?this._padding:{top:0,right:0,bottom:0,left:0},o=this._width-(this._margin.left+this._margin.right+a.left+a.right),u=i?fn([this._colorScaleMaxSize,o]):this._width-(this._margin.left+this._margin.right),l=this._height-(this._margin.bottom+this._margin.top+a.bottom+a.top),s=i?this._height-(this._margin.bottom+this._margin.top):fn([this._colorScaleMaxSize,l]),c={opacity:e?1:0,transform:"translate(".concat(i?this._margin.left+a.left+(o-u)/2:this._margin.left,", ").concat(i?this._margin.top:this._margin.top+a.top+(l-s)/2,")")},h=Hd("g.d3plus-viz-colorScale",{condition:r&&!this._colorScaleConfig.select,enter:c,parent:this._select,duration:this._duration,update:c}).node();if(this._colorScale){var f=n.filter((function(n,e){var i=t._colorScale(n,e);return null!=i}));if(this._colorScaleClass.align({bottom:"end",left:"start",right:"end",top:"start"}[e]||"bottom").duration(this._duration).data(f).height(s).locale(this._locale).orient(e).select(h).value(this._colorScale).width(u).config(this._colorScaleConfig).render(),r){var g=this._colorScaleClass.outerBounds();!this._colorScaleConfig.select&&g.height&&(this._margin[e]+=i?g.height+2*this._legendClass.padding():g.width+2*this._legendClass.padding())}}}var lC=["fill","opacity","texture"];function sC(t,n){return this._drawLabel(t,n,this._legendDepth)}function cC(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[],i=function(n,e,i){var r=t._shape(n,e);"fill"===i&&"Line"===r&&(i="stroke");var a=t._shapeConfig[r]&&t._shapeConfig[r][i]?t._shapeConfig[r][i]:t._shapeConfig[i];return"function"==typeof a?a.bind(t)(n,e):a},r=function(t,n){return lC.map((function(e){return i(t,n,e)})).join("_")};tn(this._colorScale?n.filter((function(n,e){return void 0===t._colorScale(n,e)})):n,(function(n){return e.push(Kd(n,t._aggs))}),r),e.sort(this._legendSort);var a=e.map((function(n,e){return t._ids(n,e).slice(0,t._drawDepth+1)}));this._legendDepth=0;for(var o=function(n){var i=a.map((function(t){return t[n]}));if(!i.some((function(t){return t instanceof Array}))&&Array.from(new Set(i)).length===e.length)return t._legendDepth=n,"break"},u=0;u<=this._drawDepth;u++){if("break"===o(u))break}var l=function(n,e){var i=t._id(n,e);return i instanceof Array&&(i=i[0]),t._hidden.includes(i)||t._solo.length&&!t._solo.includes(i)},s=this._legendClass.outerBounds(),c=this.config(),h=this._legendPosition.bind(this)(c);[!1,"top","bottom","left","right"].includes(h)||(h="bottom");var f=["top","bottom"].includes(h),g=this._legendPadding()?this._padding:{top:0,right:0,bottom:0,left:0},d={transform:"translate(".concat(f?this._margin.left+g.left:this._margin.left,", ").concat(f?this._margin.top:this._margin.top+g.top,")")},p=this._legend.bind(this)(c,e),m=Hd("g.d3plus-viz-legend",{condition:p&&!this._legendConfig.select,enter:d,parent:this._select,duration:this._duration,update:d}).node();this._legendClass.id(r).align(f?"center":h).direction(f?"row":"column").duration(this._duration).data(p?e:[]).height(f?this._height-(this._margin.bottom+this._margin.top):this._height-(this._margin.bottom+this._margin.top+g.bottom+g.top)).locale(this._locale).parent(this).select(m).verticalAlign(f?h:"middle").width(f?this._width-(this._margin.left+this._margin.right+g.left+g.right):this._width-(this._margin.left+this._margin.right)).shapeConfig(ch.bind(this)(this._shapeConfig,"legend")).shapeConfig({fill:function(n,e){return l(n,e)?t._hiddenColor(n,e):i(n,e,"fill")},labelConfig:{fontOpacity:function(n,e){return l(n,e)?t._hiddenOpacity(n,e):1}}}).config(this._legendConfig).render(),!this._legendConfig.select&&s.height&&(this._margin[h]+=f?s.height+2*this._legendClass.padding():s.width+2*this._legendClass.padding())}function hC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=!!this._subtitle&&this._subtitle(t),e=this._subtitlePadding()?this._padding:{top:0,right:0,bottom:0,left:0},i={transform:"translate(".concat(this._margin.left+e.left,", ").concat(this._margin.top,")")},r=Hd("g.d3plus-viz-subtitle",{enter:i,parent:this._select,duration:0,update:i}).node();this._subtitleClass.data(n?[{text:n}]:[]).locale(this._locale).select(r).width(this._width-(this._margin.left+this._margin.right+e.left+e.right)).config(this._subtitleConfig).render(),this._margin.top+=n?r.getBBox().height+2*this._subtitleConfig.padding:0}function fC(t){var n=this;t instanceof Array||(t=[t,t]),JSON.stringify(t)!==JSON.stringify(this._timelineSelection)&&(this._timelineSelection=t,t=t.map(Number),this.timeFilter((function(e){var i=Xb(n._time(e)).getTime();return i>=t[0]&&i<=t[1]})).render())}function gC(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this._time&&this._timeline,i=e?Gd(this._data.map(this._time)).map(Xb):[];e=e&&i.length>1;var r=this._timelinePadding()?this._padding:{top:0,right:0,bottom:0,left:0},a={transform:"translate(".concat(this._margin.left+r.left,", 0)")},o=Hd("g.d3plus-viz-timeline",{condition:e,enter:a,parent:this._select,duration:this._duration,update:a}).node();if(e){var u=this._timelineClass.domain(Vt(i)).duration(this._duration).height(this._height-this._margin.bottom).locale(this._locale).select(o).ticks(i.sort((function(t,n){return+t-+n}))).width(this._width-(this._margin.left+this._margin.right+r.left+r.right)),l=Vt(n.map(this._time).map(Xb));this._timelineSelection?(this._timelineSelection[0]l[1]&&(this._timelineSelection[1]=l[1])):this._timelineSelection=this._timelineDefault||l,u.selection(this._timelineSelection);var s=this._timelineConfig;u.config(s).on("brush",(function(n){fC.bind(t)(n),s.on&&s.on.brush&&s.on.brush(n)})).on("end",(function(n){fC.bind(t)(n),s.on&&s.on.end&&s.on.end(n)})).render(),this._margin.bottom+=u.outerBounds().height+2*u.padding()}}function dC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=!!this._title&&this._title(t),e=this._titlePadding()?this._padding:{top:0,right:0,bottom:0,left:0},i={transform:"translate(".concat(this._margin.left+e.left,", ").concat(this._margin.top,")")},r=Hd("g.d3plus-viz-title",{enter:i,parent:this._select,duration:0,update:i}).node();this._titleClass.data(n?[{text:n}]:[]).locale(this._locale).select(r).width(this._width-(this._margin.left+this._margin.right+e.left+e.right)).config(this._titleConfig).render(),this._margin.top+=n?r.getBBox().height+2*this._titleConfig.padding:0}function pC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n="function"==typeof this._total?vn(t.map(this._total)):!(!0!==this._total||!this._size)&&vn(t.map(this._size)),e=this._totalPadding()?this._padding:{top:0,right:0,bottom:0,left:0},i={transform:"translate(".concat(this._margin.left+e.left,", ").concat(this._margin.top,")")},r=Hd("g.d3plus-viz-total",{enter:i,parent:this._select,duration:0,update:i}).node();this._totalClass.data(n?[{text:this._totalFormat(n)}]:[]).locale(this._locale).select(r).width(this._width-(this._margin.left+this._margin.right+e.left+e.right)).config(this._totalConfig).render(),this._margin.top+=n?r.getBBox().height+2*this._totalConfig.padding:0}function mC(t,n){if(t){if(void 0===t.tagName||["BODY","HTML"].indexOf(t.tagName)>=0){var e=window["inner".concat(n.charAt(0).toUpperCase()+n.slice(1))],i=Cf(t);return"width"===n?(e-=parseFloat(i.style("margin-left"),10),e-=parseFloat(i.style("margin-right"),10),e-=parseFloat(i.style("padding-left"),10),e-=parseFloat(i.style("padding-right"),10)):(e-=parseFloat(i.style("margin-top"),10),e-=parseFloat(i.style("margin-bottom"),10),e-=parseFloat(i.style("padding-top"),10),e-=parseFloat(i.style("padding-bottom"),10)),e}var r=parseFloat(Cf(t).style(n),10);return"number"==typeof r&&r>0?r:mC(t.parentNode,n)}}function _C(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,i=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,r=t.getBoundingClientRect(),a=r.height,o=r.left+e,u=r.top+i,l=r.width;return i+window.innerHeight>u+n&&i+no+n&&e+n=0&&(this._solo=[]),this._hidden.length===l&&(this._hidden=[]),this.render()):u>=0&&(this._solo=[],this._hidden=[],this.render()):(u<0&&this._hidden.length=0?this._hidden.splice(o,a.length):u>=0?(this._solo=[],this._hidden=[]):this._solo.length&&u<0?(this._solo=this._solo.concat(a),this._solo.length===l&&(this._solo=[])):(this._hidden=this._hidden.concat(a),this._hidden.length===l&&(this._hidden=[])),this.render())}function bC(t,n){var e=this;if(1!==this._shapeConfig.hoverOpacity){var i=this._id(t,n);i instanceof Array||(i=[i]),this.hover((function(t,n){var r=e._id(t,n);return r instanceof Array||(r=[r]),i.some((function(t){return r.includes(t)}))}))}}function wC(t,n){var e=this;setTimeout((function(){1!==e._shapeConfig.hoverOpacity&&e._hover&&!e._hover(t,n)||e.hover(!1);var i=e._tooltipClass.data();if(i.length&&e._tooltip(t,n)){for(var r=i[0];r.__d3plus__&&r.data;)r=r.data;e._id(r)===e._id(t)&&e._tooltipClass.data([]).render()}}),50),this._select.style("cursor","auto")}function SC(t,n,e,i){var r=this,a=i.touches?[i.touches[0].clientX,i.touches[0].clientY]:[i.clientX,i.clientY],o=_n(this._legendClass.data().map((function(t,n){var e=r._id(t,n);return e instanceof Array||(e=[e]),e}))).length;if(t&&this._tooltip(t,n)){var u=this._id(t,n);u instanceof Array&&(u=u[0]);var l=this._translate,s=vC.bind(this).toString(),c=Object.keys(this._on).some((function(t){return["click","click.legend"].includes(t)&&r._on[t]&&r._on[t].toString()!==s})),h=this._on["click.legend"]&&this._on["click.legend"].toString()===s,f=this._drawDepth").concat(l("Shift+Click to Hide")):this._solo.length&&!d||p?"".concat(l("Click to Show"),"
").concat(l("Shift+Click to Highlight")):1===this._solo.length&&d||this._hidden.length===o-1?l("Click to Show All"):"".concat(l("Click to Hide"),"
").concat(l("Shift+Click to Highlight")))).title(this._legendConfig.label?this._legendClass.label():sC.bind(this)).position(a).config(ch.bind(this)(this._tooltipConfig)).config(ch.bind(this)(this._legendTooltip)).render()}}function xC(t,n,e,i){var r=this;if(t&&this._tooltip(t,n)){var a=yC.bind(this).toString(),o=Object.keys(this._on).some((function(t){return["click","click.shape"].includes(t)&&r._on[t]&&r._on[t].toString()!==a})),u=this._on["click.shape"]&&this._on["click.shape"].toString()===a,l=this._drawDeptht.length)&&(n=t.length);for(var e=0,i=new Array(n);e0&&void 0!==arguments[0]&&arguments[0])?this._brushGroup.style("display","inline"):this._brushGroup.style("display","none"),!EC&&this._zoom?(this._container.call(this._zoomBehavior),this._zoomScroll||this._container.on("wheel.zoom",null),this._zoomPan||this._container.on("mousedown.zoom mousemove.zoom",null).on("touchstart.zoom touchmove.zoom touchend.zoom touchcancel.zoom",null)):this._container.on(".zoom",null)}function OC(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._zoomGroup&&(n?this._zoomGroup.transition().duration(n).attr("transform",t):this._zoomGroup.attr("transform",t)),this._renderTiles&&this._renderTiles(tx(this._container.node()),n)}function PC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._container){var n=this._zoomBehavior.extent().bind(document)()[1].map((function(t){return t/2})),e=this._zoomBehavior.scaleExtent(),i=tx(this._container.node());if(t){var r=[(n[0]-i.x)/i.k,(n[1]-i.y)/i.k];i.k=Math.min(e[1],i.k*t),i.k<=e[0]?(i.k=e[0],i.x=0,i.y=0):(i.x+=n[0]-(r[0]*i.k+i.x),i.y+=n[1]-(r[1]*i.k+i.y))}else i.k=e[0],i.x=0,i.y=0;OC.bind(this)(i,this._duration)}}function jC(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._duration,e=this._zoomBehavior.scaleExtent(),i=tx(this._container.node());if(t){var r,a,o=CC(this._zoomBehavior.translateExtent()[1],2),u=o[0],l=o[1],s=t[1][0]-t[0][0],c=t[1][1]-t[0][1],h=Math.min(e[1],1/Math.max(s/u,c/l));s/c0?i.x=0:i.x0?i.y=0:i.yt.length)&&(n=t.length);for(var e=0,i=new Array(n);e600}function ZC(t,n,e){for(;n.__d3plus__&&n.data;)e=(n=n.data).i;return t(n,e)}var XC=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&UC(t,n)}(a,uh);var n,e,i,r=qC(a);function a(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this))._aggs={},t._ariaHidden=!0,t._attribution=!1,t._attributionStyle={background:"rgba(255, 255, 255, 0.75)",border:"1px solid rgba(0, 0, 0, 0.25)",color:"rgba(0, 0, 0, 0.75)",display:"block",font:"400 11px/11px 'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",margin:"5px",opacity:.75,padding:"4px 6px 3px"},t._backClass=(new Zy).on("click",(function(){t._history.length?t.config(t._history.pop()).render():t.depth(t._drawDepth-1).filter(!1).render()})).on("mousemove",(function(){return t._backClass.select().style("cursor","pointer")})),t._backConfig={fontSize:10,padding:5,resize:!1},t._cache=!0,t._color=function(n,e){return t._groupBy[0](n,e)},t._colorScaleClass=new Tx,t._colorScaleConfig={scale:"jenks"},t._colorScalePadding=VC,t._colorScalePosition=function(){return t._width>1.5*t._height?"right":"bottom"},t._colorScaleMaxSize=600,t._data=[],t._dataCutoff=100,t._detectResize=!0,t._detectResizeDelay=400,t._detectVisible=!0,t._detectVisibleInterval=1e3,t._downloadButton=!1,t._downloadConfig={type:"png"},t._downloadPosition="top",t._duration=600,t._hidden=[],t._hiddenColor=hh("#aaa"),t._hiddenOpacity=hh(.5),t._history=[],t._groupBy=[Gc("id")],t._legend=function(n,e){var i=hn(e,(function(n,e){var i=t._groupBy[t._legendDepth].bind(WC(t))(n,e);return i instanceof Array?i.length:1}));return e.length>1&&i<=2},t._legendClass=new bx,t._legendConfig={label:sC.bind(WC(t)),shapeConfig:{ariaLabel:sC.bind(WC(t)),labelConfig:{fontColor:void 0,fontResize:!1,padding:0}}},t._legendFilterInvert=hh(!1),t._legendPadding=VC,t._legendPosition=function(){return t._width>1.5*t._height?"right":"bottom"},t._legendSort=function(n,e){return t._drawLabel(n).localeCompare(t._drawLabel(e))},t._legendTooltip={},t._loadingHTML=function(){return"\n
\n ".concat(t._translate("Loading Visualization"),'\n ').concat(t._translate("Powered by D3plus"),"\n
")},t._loadingMessage=!0,t._lrucache=cx(10),t._messageClass=new aC,t._messageMask="rgba(0, 0, 0, 0.05)",t._messageStyle={bottom:"0",left:"0",position:"absolute",right:"0","text-align":"center",top:"0"},t._noDataHTML=function(){return"\n
\n ".concat(t._translate("No Data Available"),"\n
")},t._noDataMessage=!0,t._on={"click.shape":yC.bind(WC(t)),"click.legend":vC.bind(WC(t)),mouseenter:bC.bind(WC(t)),mouseleave:wC.bind(WC(t)),"mousemove.shape":xC.bind(WC(t)),"mousemove.legend":SC.bind(WC(t))},t._queue=[],t._resizeContainer="undefined"==typeof window?"":window,t._scrollContainer="undefined"==typeof window?"":window,t._shape=hh("Rect"),t._shapes=[],t._shapeConfig={ariaLabel:function(n,e){return t._drawLabel(n,e)},fill:function(n,e){for(;n.__d3plus__&&n.data;)e=(n=n.data).i;if(t._colorScale){var i=t._colorScale(n,e);if(null!=i){var r=t._colorScaleClass._colorScale,a=t._colorScaleClass.color();return r?r.domain().length?r(i):r.range()[r.range().length-1]:a instanceof Array?a[a.length-1]:a}}var o=t._color(n,e);return Og(o)?o:fy("string"==typeof o?o:JSON.stringify(o))},labelConfig:{fontColor:function(n,e){return gy("function"==typeof t._shapeConfig.fill?t._shapeConfig.fill(n,e):t._shapeConfig.fill)}},opacity:hh(1),stroke:function(n,e){return Og("function"==typeof t._shapeConfig.fill?t._shapeConfig.fill(n,e):t._shapeConfig.fill).darker(.25)},role:"presentation",strokeWidth:hh(0)},t._solo=[],t._subtitleClass=new Zy,t._subtitleConfig={ariaHidden:!0,fontSize:12,padding:5,resize:!1,textAnchor:"middle"},t._subtitlePadding=VC,t._svgDesc="",t._svgTitle="",t._timeline=!0,t._timelineClass=(new Rx).align("end"),t._timelineConfig={brushing:!1,padding:5},t._timelinePadding=VC,t._threshold=hh(1e-4),t._thresholdKey=void 0,t._thresholdName=function(){return t._translate("Values")},t._titleClass=new Zy,t._titleConfig={ariaHidden:!0,fontSize:16,padding:5,resize:!1,textAnchor:"middle"},t._titlePadding=VC,t._tooltip=hh(!0),t._tooltipClass=new eC,t._tooltipConfig={pointerEvents:"none",titleStyle:{"max-width":"200px"}},t._totalClass=new Zy,t._totalConfig={fontSize:10,padding:5,resize:!1,textAnchor:"middle"},t._totalFormat=function(n){return"".concat(t._translate("Total"),": ").concat(E(n,t._locale))},t._totalPadding=VC,t._zoom=!1,t._zoomBehavior=function(){var t,n,e,i=ix,r=rx,a=lx,o=ox,u=ux,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,h=pd,f=Tf("start","zoom","end"),g=500,d=150,p=0,m=10;function _(t){t.property("__zoom",ax).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",A).filter(u).on("touchstart.zoom",E).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(l[0],Math.min(l[1],n)))===t.k?t:new QS(n,t.x,t.y)}function v(t,n,e){var i=n[0]-e[0]*t.k,r=n[1]-e[1]*t.k;return i===t.x&&r===t.y?t:new QS(t.k,i,r)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,n,e,i){t.on("start.zoom",(function(){S(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){S(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,a=arguments,o=S(t,a).event(i),u=r.apply(t,a),l=null==e?b(u):"function"==typeof e?e.apply(t,a):e,s=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=t.__zoom,f="function"==typeof n?n.apply(t,a):n,g=h(c.invert(l).concat(s/c.k),f.invert(l).concat(s/f.k));return function(t){if(1===t)t=f;else{var n=g(t),e=s/n[2];t=new QS(e,l[0]-n[0]*e,l[1]-n[1]*e)}o.zoom(null,t)}}))}function S(t,n,e){return!e&&t.__zooming||new x(t,n)}function x(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,n),this.taps=0}function k(t,...n){if(i.apply(this,arguments)){var e=S(this,n).event(t),r=this.__zoom,u=Math.max(l[0],Math.min(l[1],r.k*Math.pow(2,o.apply(this,arguments)))),c=Ef(t);if(e.wheel)e.mouse[0][0]===c[0]&&e.mouse[0][1]===c[1]||(e.mouse[1]=r.invert(e.mouse[0]=c)),clearTimeout(e.wheel);else{if(r.k===u)return;e.mouse=[c,r.invert(c)],hg(this),e.start()}ex(t),e.wheel=setTimeout((function(){e.wheel=null,e.end()}),d),e.zoom("mouse",a(v(y(r,u),e.mouse[0],e.mouse[1]),e.extent,s))}}function C(t,...n){if(!e&&i.apply(this,arguments)){var r=t.currentTarget,o=S(this,n,!0).event(t),u=Cf(t.view).on("mousemove.zoom",(function(t){if(ex(t),!o.moved){var n=t.clientX-c,e=t.clientY-h;o.moved=n*n+e*e>p}o.event(t).zoom("mouse",a(v(o.that.__zoom,o.mouse[0]=Ef(t,r),o.mouse[1]),o.extent,s))}),!0).on("mouseup.zoom",(function(t){u.on("mousemove.zoom mouseup.zoom",null),pS(t.view,o.moved),ex(t),o.event(t).end()}),!0),l=Ef(t,r),c=t.clientX,h=t.clientY;dS(t.view),nx(t),o.mouse=[l,this.__zoom.invert(l)],hg(this),o.start()}}function A(t,...n){if(i.apply(this,arguments)){var e=this.__zoom,o=Ef(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(o),l=e.k*(t.shiftKey?.5:2),h=a(v(y(e,l),o,u),r.apply(this,n),s);ex(t),c>0?Cf(this).transition().duration(c).call(w,h,o,t):Cf(this).call(_.transform,h,o,t)}}function E(e,...r){if(i.apply(this,arguments)){var a,o,u,l,s=e.touches,c=s.length,h=S(this,r,e.changedTouches.length===c).event(e);for(nx(e),o=0;o=0?this._depth:0,this._groupBy.length-1]):this._groupBy.length-1,this._id=function(n,e){var i=ZC(t._groupBy[t._drawDepth],n,e);return"number"==typeof i?"".concat(i):i},this._ids=function(n,e){return t._groupBy.map((function(t){return"".concat(ZC(t,n,e))})).filter(Boolean)},this._drawLabel=function(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._drawDepth;if(!e)return"";for(;e.__d3plus__&&e.data;)i=(e=e.data).i;if(e._isAggregation)return"".concat(t._thresholdName(e,i)," < ").concat(E(100*e._threshold,t._locale),"%");if(t._label&&r===t._drawDepth)return"".concat(t._label(e,i));var a=n._ids(e,i).slice(0,r+1),o=a.reverse().find((function(t){return!(t instanceof Array)}))||a[a.length-1];return o instanceof Array?function(t){return t.reduce((function(n,e,i){return i?i===t.length-1&&1===i?n+=" and ".concat(e):i===t.length-1?n+=", and ".concat(e):n+=", ".concat(e):n+=e,n}),"")}(o):"".concat(o)},this._time&&!this._timeFilter&&this._data.length){var e=this._data.map(this._time).map(Xb),i=this._data[0];if(this._discrete&&"_".concat(this._discrete)in this&&this["_".concat(this._discrete)](i,0)===this._time(i,0))this._timeFilter=function(){return!0};else{var r=+hn(e);this._timeFilter=function(n,e){return+Xb(t._time(n,e))===r}}}this._filteredData=[],this._legendData=[];var a=[];if(this._data.length){a=this._timeFilter?this._data.filter(this._timeFilter):this._data,this._filter&&(a=a.filter(this._filter));for(var o=[],u=0;u<=this._drawDepth;u++)o.push(this._groupBy[u]);this._discrete&&"_".concat(this._discrete)in this&&o.push(this["_".concat(this._discrete)]),this._discrete&&"_".concat(this._discrete,"2")in this&&o.push(this["_".concat(this._discrete,"2")]);var l=tn.apply(void 0,[a,function(n){var e=t._data.indexOf(n[0]),i=t._shape(n[0],e),r=t._id(n[0],e),a=Kd(n,t._aggs);t._hidden.includes(r)||t._solo.length&&!t._solo.includes(r)||(t._discrete||"Line"!==i?t._filteredData.push(a):t._filteredData=t._filteredData.concat(n)),t._legendData.push(a)}].concat(o));this._filteredData=this._thresholdFunction(this._filteredData,l)}(function(t,...n){return nn(t,$t,$t,n)})(this._filteredData,this._id).size>this._dataCutoff?(void 0===this._userHover&&(this._userHover=this._shapeConfig.hoverOpacity||.5),void 0===this._userDuration&&(this._userDuration=this._shapeConfig.duration||600),this._shapeConfig.hoverOpacity=1,this._shapeConfig.duration=0):void 0!==this._userHover&&(this._shapeConfig.hoverOpacity=this._userHover,this._shapeConfig.duration=this._userDuration),this._noDataMessage&&!this._filteredData.length&&(this._messageClass.render({container:this._select.node().parentNode,html:this._noDataHTML(this),mask:!1,style:this._messageStyle}),this._select.transition().duration(this._duration).attr("opacity",0))}},{key:"_draw",value:function(){var t=this._legendPosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(t)||(t="bottom");var n=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(n)||(n="bottom"),"left"!==t&&"right"!==t||cC.bind(this)(this._legendData),"left"!==n&&"right"!==n&&!1!==n||uC.bind(this)(this._filteredData),oC.bind(this)(),dC.bind(this)(this._filteredData),hC.bind(this)(this._filteredData),pC.bind(this)(this._filteredData),gC.bind(this)(this._filteredData),"top"!==t&&"bottom"!==t||cC.bind(this)(this._legendData),"top"!==n&&"bottom"!==n||uC.bind(this)(this._filteredData),this._shapes=[]}},{key:"_thresholdFunction",value:function(t){return t}},{key:"render",value:function(t){var n=this;if(this._margin={bottom:0,left:0,right:0,top:0},this._padding={bottom:0,left:0,right:0,top:0},void 0===this._select||"svg"!==this._select.node().tagName.toLowerCase()){var e=(void 0===this._select?Cf("body").append("div"):this._select).append("svg");this.select(e.node())}function i(){var t=this._select.style("display");this._select.style("display","none");var n,e=IC([mC(n=this._select.node().parentNode,"width"),mC(n,"height")],2),i=e[0],r=e[1];i-=parseFloat(this._select.style("border-left-width"),10),i-=parseFloat(this._select.style("border-right-width"),10),r-=parseFloat(this._select.style("border-top-width"),10),r-=parseFloat(this._select.style("border-bottom-width"),10),this._select.style("display",t),this._autoWidth&&(this.width(i),this._select.style("width","".concat(this._width,"px")).attr("width","".concat(this._width,"px"))),this._autoHeight&&(this.height(r),this._select.style("height","".concat(this._height,"px")).attr("height","".concat(this._height,"px")))}this._width&&this._height||this._detectVisible&&!_C(this._select.node())||(this._autoWidth=void 0===this._width,this._autoHeight=void 0===this._height,i.bind(this)()),this._select.attr("class","d3plus-viz").attr("aria-hidden",this._ariaHidden).attr("aria-labelledby","".concat(this._uuid,"-title ").concat(this._uuid,"-desc")).attr("role","img").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").transition().duration(this._duration).style("width",void 0!==this._width?"".concat(this._width,"px"):void 0).style("height",void 0!==this._height?"".concat(this._height,"px"):void 0).attr("width",void 0!==this._width?"".concat(this._width,"px"):void 0).attr("height",void 0!==this._height?"".concat(this._height,"px"):void 0);var r=Cf(this._select.node().parentNode);"static"===r.style("position")&&r.style("position","relative"),null===this._select.attr("opacity")&&this._select.attr("opacity",1);var a=this._select.selectAll("title").data([0]),o=a.enter().append("title").attr("id","".concat(this._uuid,"-title"));a.merge(o).text(this._svgTitle);var u=this._select.selectAll("desc").data([0]),l=u.enter().append("desc").attr("id","".concat(this._uuid,"-desc"));if(u.merge(l).text(this._svgDesc),this._visiblePoll=clearInterval(this._visiblePoll),this._resizePoll=clearTimeout(this._resizePoll),this._scrollPoll=clearTimeout(this._scrollPoll),Cf(this._scrollContainer).on("scroll.".concat(this._uuid),null),Cf(this._resizeContainer).on("resize.".concat(this._uuid),null),this._detectVisible&&"hidden"===this._select.style("visibility"))this._visiblePoll=setInterval((function(){"hidden"!==n._select.style("visibility")&&(n._visiblePoll=clearInterval(n._visiblePoll),n.render(t))}),this._detectVisibleInterval);else if(this._detectVisible&&"none"===this._select.style("display"))this._visiblePoll=setInterval((function(){"none"!==n._select.style("display")&&(n._visiblePoll=clearInterval(n._visiblePoll),n.render(t))}),this._detectVisibleInterval);else if(this._detectVisible&&!_C(this._select.node()))Cf(this._scrollContainer).on("scroll.".concat(this._uuid),(function(){n._scrollPoll||(n._scrollPoll=setTimeout((function(){_C(n._select.node())&&(Cf(n._scrollContainer).on("scroll.".concat(n._uuid),null),n.render(t)),n._scrollPoll=clearTimeout(n._scrollPoll)}),n._detectVisibleInterval))}));else{var s=ZS();this._queue.forEach((function(t){var e=n._cache?n._lrucache.get("".concat(t[3],"_").concat(t[1])):void 0;e?n["_".concat(t[3])]=t[2]?t[2](e):e:s.defer.apply(s,LC(t))})),this._queue=[],this._loadingMessage&&s._tasks.length&&this._messageClass.render({container:this._select.node().parentNode,html:this._loadingHTML(this),mask:!!this._filteredData&&this._messageMask,style:this._messageStyle}),s.awaitAll((function(){var e=n._data instanceof Array&&n._data.length>0?Object.keys(n._data[0]):[],r=n._select.selectAll("g.data-table").data(!n._ariaHidden&&n._data instanceof Array&&n._data.length?[0]:[]),a=r.enter().append("g").attr("class","data-table").attr("role","table");r.exit().remove();var o=r.merge(a).selectAll("text").data(n._data instanceof Array?yn(0,n._data.length+1):[]);o.exit().remove();var u=o.merge(o.enter().append("text").attr("role","row")).selectAll("tspan").data((function(t,i){return e.map((function(t){return{role:i?"cell":"columnheader",text:i?n._data[i-1][t]:t}}))}));u.exit().remove(),u.merge(u.enter().append("tspan")).attr("role",(function(t){return t.role})).attr("dy","-1000px").html((function(t){return t.text})),n._preDraw(),n._draw(t),MC.bind(n)(),RC.bind(n)(),!n._messageClass._isVisible||n._noDataMessage&&!n._filteredData.length||(n._messageClass.hide(),"0"===n._select.attr("opacity")&&n._select.transition().duration(n._duration).attr("opacity",1)),n._detectResize&&(n._autoWidth||n._autoHeight)&&Cf(n._resizeContainer).on("resize.".concat(n._uuid),(function(){n._resizePoll=clearTimeout(n._resizePoll),n._resizePoll=setTimeout((function(){n._resizePoll=clearTimeout(n._resizePoll),i.bind(n)(),n.render(t)}),n._detectResizeDelay)})),t&&setTimeout(t,n._duration+100)}))}return Cf("body").on("touchstart.".concat(this._uuid),kC.bind(this)),this}},{key:"active",value:function(t){return this._active=t,1!==this._shapeConfig.activeOpacity&&(this._shapes.forEach((function(n){return n.active(t)})),this._legend&&this._legendClass.active(t)),this}},{key:"aggs",value:function(t){return arguments.length?(this._aggs=qc(this._aggs,t),this):this._aggs}},{key:"ariaHidden",value:function(t){return arguments.length?(this._ariaHidden=t,this):this._ariaHidden}},{key:"attribution",value:function(t){return arguments.length?(this._attribution=t,this):this._attribution}},{key:"attributionStyle",value:function(t){return arguments.length?(this._attributionStyle=qc(this._attributionStyle,t),this):this._attributionStyle}},{key:"backConfig",value:function(t){return arguments.length?(this._backConfig=qc(this._backConfig,t),this):this._backConfig}},{key:"cache",value:function(t){return arguments.length?(this._cache=t,this):this._cache}},{key:"color",value:function(t){return arguments.length?(this._color=t&&"function"!=typeof t?Gc(t):t,this):this._color}},{key:"colorScale",value:function(t){return arguments.length?(this._colorScale=t&&"function"!=typeof t?Gc(t):t,this):this._colorScale}},{key:"colorScaleConfig",value:function(t){return arguments.length?(this._colorScaleConfig=qc(this._colorScaleConfig,t),this):this._colorScaleConfig}},{key:"colorScalePadding",value:function(t){return arguments.length?(this._colorScalePadding="function"==typeof t?t:hh(t),this):this._colorScalePadding}},{key:"colorScalePosition",value:function(t){return arguments.length?(this._colorScalePosition="function"==typeof t?t:hh(t),this):this._colorScalePosition}},{key:"colorScaleMaxSize",value:function(t){return arguments.length?(this._colorScaleMaxSize=t,this):this._colorScaleMaxSize}},{key:"data",value:function(t,n){return arguments.length?(hS.bind(this)(t,n,"data"),this._hidden=[],this._solo=[],this._userData&&JSON.stringify(t)!==JSON.stringify(this._userData)&&(this._timeFilter=!1,this._timelineSelection=!1),this._userData=t,this):this._data}},{key:"dataCutoff",value:function(t){return arguments.length?(this._dataCutoff=t,this):this._dataCutoff}},{key:"depth",value:function(t){return arguments.length?(this._depth=t,this):this._depth}},{key:"detectResize",value:function(t){return arguments.length?(this._detectResize=t,this):this._detectResize}},{key:"detectResizeDelay",value:function(t){return arguments.length?(this._detectResizeDelay=t,this):this._detectResizeDelay}},{key:"detectVisible",value:function(t){return arguments.length?(this._detectVisible=t,this):this._detectVisible}},{key:"detectVisibleInterval",value:function(t){return arguments.length?(this._detectVisibleInterval=t,this):this._detectVisibleInterval}},{key:"discrete",value:function(t){return arguments.length?(this._discrete=t,this):this._discrete}},{key:"downloadButton",value:function(t){return arguments.length?(this._downloadButton=t,this):this._downloadButton}},{key:"downloadConfig",value:function(t){return arguments.length?(this._downloadConfig=qc(this._downloadConfig,t),this):this._downloadConfig}},{key:"downloadPosition",value:function(t){return arguments.length?(this._downloadPosition=t,this):this._downloadPosition}},{key:"duration",value:function(t){return arguments.length?(this._duration=t,this):this._duration}},{key:"filter",value:function(t){return arguments.length?(this._filter=t,this):this._filter}},{key:"groupBy",value:function(t){var n=this;return arguments.length?(this._groupByRaw=t,t instanceof Array||(t=[t]),this._groupBy=t.map((function(t){return"function"==typeof t?t:(n._aggs[t]||(n._aggs[t]=function(t,n){var e=Gd(t.map(n).map(String));return 1===e.length?e[0]:e}),Gc(t))})),this):this._groupBy}},{key:"height",value:function(t){return arguments.length?(this._height=t,this):this._height}},{key:"hiddenColor",value:function(t){return arguments.length?(this._hiddenColor="function"==typeof t?t:hh(t),this):this._hiddenColor}},{key:"hiddenOpacity",value:function(t){return arguments.length?(this._hiddenOpacity="function"==typeof t?t:hh(t),this):this._hiddenOpacity}},{key:"hover",value:function(t){var n=this,e=this._hover=t;if(1!==this._shapeConfig.hoverOpacity){if("function"==typeof t){var i=_n(this._shapes.map((function(t){return t.data()})));i=i.concat(this._legendClass.data());var r=t?i.filter(t):[],a=[];r.map(this._ids).forEach((function(t){for(var n=1;n<=t.length;n++)a.push(JSON.stringify(t.slice(0,n)))})),(a=a.filter((function(t,n){return a.indexOf(t)===n}))).length&&(e=function(t,e){return a.includes(JSON.stringify(n._ids(t,e)))})}this._shapes.forEach((function(t){return t.hover(e)})),this._legend&&this._legendClass.hover(e)}return this}},{key:"label",value:function(t){return arguments.length?(this._label="function"==typeof t?t:hh(t),this):this._label}},{key:"legend",value:function(t){return arguments.length?(this._legend="function"==typeof t?t:hh(t),this):this._legend}},{key:"legendConfig",value:function(t){return arguments.length?(this._legendConfig=qc(this._legendConfig,t),this):this._legendConfig}},{key:"legendFilterInvert",value:function(t){return arguments.length?(this._legendFilterInvert="function"==typeof t?t:hh(t),this):this._legendFilterInvert}},{key:"legendPadding",value:function(t){return arguments.length?(this._legendPadding="function"==typeof t?t:hh(t),this):this._legendPadding}},{key:"legendPosition",value:function(t){return arguments.length?(this._legendPosition="function"==typeof t?t:hh(t),this):this._legendPosition}},{key:"legendSort",value:function(t){return arguments.length?(this._legendSort=t,this):this._legendSort}},{key:"legendTooltip",value:function(t){return arguments.length?(this._legendTooltip=qc(this._legendTooltip,t),this):this._legendTooltip}},{key:"loadingHTML",value:function(t){return arguments.length?(this._loadingHTML="function"==typeof t?t:hh(t),this):this._loadingHTML}},{key:"loadingMessage",value:function(t){return arguments.length?(this._loadingMessage=t,this):this._loadingMessage}},{key:"messageMask",value:function(t){return arguments.length?(this._messageMask=t,this):this._messageMask}},{key:"messageStyle",value:function(t){return arguments.length?(this._messageStyle=qc(this._messageStyle,t),this):this._messageStyle}},{key:"noDataHTML",value:function(t){return arguments.length?(this._noDataHTML="function"==typeof t?t:hh(t),this):this._noDataHTML}},{key:"noDataMessage",value:function(t){return arguments.length?(this._noDataMessage=t,this):this._noDataMessage}},{key:"resizeContainer",value:function(t){return arguments.length?(this._resizeContainer=t,this):this._resizeContainer}},{key:"scrollContainer",value:function(t){return arguments.length?(this._scrollContainer=t,this):this._scrollContainer}},{key:"select",value:function(t){return arguments.length?(this._select=Cf(t),this):this._select}},{key:"shape",value:function(t){return arguments.length?(this._shape="function"==typeof t?t:hh(t),this):this._shape}},{key:"shapeConfig",value:function(t){return arguments.length?(this._shapeConfig=qc(this._shapeConfig,t),this):this._shapeConfig}},{key:"subtitle",value:function(t){return arguments.length?(this._subtitle="function"==typeof t?t:hh(t),this):this._subtitle}},{key:"subtitleConfig",value:function(t){return arguments.length?(this._subtitleConfig=qc(this._subtitleConfig,t),this):this._subtitleConfig}},{key:"subtitlePadding",value:function(t){return arguments.length?(this._subtitlePadding="function"==typeof t?t:hh(t),this):this._subtitlePadding}},{key:"svgDesc",value:function(t){return arguments.length?(this._svgDesc=t,this):this._svgDesc}},{key:"svgTitle",value:function(t){return arguments.length?(this._svgTitle=t,this):this._svgTitle}},{key:"threshold",value:function(t){return arguments.length?("function"==typeof t?this._threshold=t:isFinite(t)&&!isNaN(t)&&(this._threshold=hh(1*t)),this):this._threshold}},{key:"thresholdKey",value:function(t){return arguments.length?(this._thresholdKey="function"==typeof t?t:Gc(t),this):this._thresholdKey}},{key:"thresholdName",value:function(t){return arguments.length?(this._thresholdName="function"==typeof t?t:hh(t),this):this._thresholdName}},{key:"time",value:function(t){return arguments.length?("function"==typeof t?this._time=t:(this._time=Gc(t),this._aggs[t]||(this._aggs[t]=function(t,n){var e=Gd(t.map(n));return 1===e.length?e[0]:e}),this._userTime&&JSON.stringify(t)!==JSON.stringify(this._userTime)&&(this._timeFilter=!1,this._timelineSelection=!1),this._userTime=t),this):this._time}},{key:"timeFilter",value:function(t){return arguments.length?(this._timeFilter=t,this):this._timeFilter}},{key:"timeline",value:function(t){return arguments.length?(this._timeline=t,this):this._timeline}},{key:"timelineConfig",value:function(t){return arguments.length?(this._timelineConfig=qc(this._timelineConfig,t),this):this._timelineConfig}},{key:"timelineDefault",value:function(t){return arguments.length?(t instanceof Array||(t=[t,t]),this._timelineDefault=t.map(Xb),this):this._timelineDefault}},{key:"timelinePadding",value:function(t){return arguments.length?(this._timelinePadding="function"==typeof t?t:hh(t),this):this._timelinePadding}},{key:"title",value:function(t){return arguments.length?(this._title="function"==typeof t?t:hh(t),this):this._title}},{key:"titleConfig",value:function(t){return arguments.length?(this._titleConfig=qc(this._titleConfig,t),this):this._titleConfig}},{key:"titlePadding",value:function(t){return arguments.length?(this._titlePadding="function"==typeof t?t:hh(t),this):this._titlePadding}},{key:"tooltip",value:function(t){return arguments.length?(this._tooltip="function"==typeof t?t:hh(t),this):this._tooltip}},{key:"tooltipConfig",value:function(t){return arguments.length?(this._tooltipConfig=qc(this._tooltipConfig,t),this):this._tooltipConfig}},{key:"total",value:function(t){return arguments.length?(this._total="function"==typeof t?t:!!t&&Gc(t),this):this._total}},{key:"totalConfig",value:function(t){return arguments.length?(this._totalConfig=qc(this._totalConfig,t),this):this._totalConfig}},{key:"totalFormat",value:function(t){return arguments.length?(this._totalFormat=t,this):this._totalFormat}},{key:"totalPadding",value:function(t){return arguments.length?(this._totalPadding="function"==typeof t?t:hh(t),this):this._totalPadding}},{key:"width",value:function(t){return arguments.length?(this._width=t,this):this._width}},{key:"zoom",value:function(t){return arguments.length?(this._zoom=t,this):this._zoom}},{key:"zoomBrushHandleSize",value:function(t){return arguments.length?(this._zoomBrushHandleSize=t,this):this._zoomBrushHandleSize}},{key:"zoomBrushHandleStyle",value:function(t){return arguments.length?(this._zoomBrushHandleStyle=t,this):this._zoomBrushHandleStyle}},{key:"zoomBrushSelectionStyle",value:function(t){return arguments.length?(this._zoomBrushSelectionStyle=t,this):this._zoomBrushSelectionStyle}},{key:"zoomControlStyle",value:function(t){return arguments.length?(this._zoomControlStyle=t,this):this._zoomControlStyle}},{key:"zoomControlStyleActive",value:function(t){return arguments.length?(this._zoomControlStyleActive=t,this):this._zoomControlStyleActive}},{key:"zoomControlStyleHover",value:function(t){return arguments.length?(this._zoomControlStyleHover=t,this):this._zoomControlStyleHover}},{key:"zoomFactor",value:function(t){return arguments.length?(this._zoomFactor=t,this):this._zoomFactor}},{key:"zoomMax",value:function(t){return arguments.length?(this._zoomMax=t,this):this._zoomMax}},{key:"zoomPan",value:function(t){return arguments.length?(this._zoomPan=t,this):this._zoomPan}},{key:"zoomPadding",value:function(t){return arguments.length?(this._zoomPadding=t,this):this._zoomPadding}},{key:"zoomScroll",value:function(t){return arguments.length?(this._zoomScroll=t,this):this._zoomScroll}}],e&&KC(n.prototype,e),i&&KC(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();const JC=function(t,n,e){if(t.padding)t.padding(.5);else{var i=Array.from(new Set(n.map((function(t){return+t[e]})))).reduce((function(t,n,e,i){if(!e)return t;var r=i[e-1];return!t||n-rd[o]:1===o&&(g=f-id[o]),g};if(t.invert&&c()){if("log"===n)for(var h=0;h<10&&c();){var f=(0===o?-1:1)*(a[o]<0?-1:1);a[o]+=a[o]*s*f,t.domain(u?a.slice().reverse():a),h++}else if(0===o){var g=t.invert(t(e)+(i+10)*(u?1:-1));ga[o]&&(a[o]=d,t.domain(u?a.slice().reverse():a))}}return u?a.reverse():a}function nA(t){return(nA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eA(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,a,o,u=[],l=!0,s=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=a.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return iA(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return iA(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iA(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e0})))})),n=m.map((function(t){return vn(t.filter((function(t){return t<0})))}))}else{var _=r.map((function(t){return t[p?f:h]}));e=_.filter((function(t){return t>0})),n=_.filter((function(t){return t<0}))}var y=g(hn(e));(p?yg(0))&&(y+=p?-c:c),y=g.invert(y);var v=g(fn(n));return(p?v>g(0):vd[1]&&(d[1]=y),v0})))})),n=m.map((function(t){return vn(t.filter((function(t){return t<0})))}))}else n=e=r.map((function(t){return t[p?f:h]}));var _=g(hn(e));_+=p?-c:c,_=g.invert(_);var y=g(fn(n));return y+=p?c:-c,y=g.invert(y),_>d[1]&&(d[1]=_),yc[1]&&(c[1]=f),"x"===this._discrete&&c.reverse(),s.domain(c),[i,r]},Rect:function(t){var n=t.data,e=t.x,i=t.y,r=t.x2,a=t.y2,o=t.yScale,u=t.xScale,l=t.config;e=e.copy(),i=i.copy();var s=r?"x2":"x",c=a?"y2":"y",h=e.domain().slice(),f=i.domain().slice(),g=e.range(),d=i.range();return!e.invert&&e.padding&&JC(e,n,this._discrete),!i.invert&&i.padding&&JC(i,n,this._discrete),(e.invert||i.invert)&&n.forEach((function(t){if(e.invert){var n=l.width(t.data,t.i);h=tA(e,u,t[s],n,g,h,0,!1),h=tA(e,u,t[s],n,g,h,1,!1)}if(i.invert){var r=l.height(t.data,t.i);f=tA(i,o,t[c],r,d,f,0,!0),f=tA(i,o,t[c],r,d,f,1,!0)}})),[e,i]}};function pA(t){return this._sizeScaleD3(this._size?this._size(t):null)}function mA(t){var n=t.map(yA),e=t.map((function(t){return t.key.split("_")[0]}));return ty(t).sort((function(t,i){return e[i].localeCompare(e[t])||n[t]-n[i]}))}function _A(t){return mA(t).reverse()}function yA(t){for(var n,e=-1,i=0,r=t.length;++e0)for(var i,r,a,o,u,l=t[n[0]].length,s=0;s=0?(i[0]=u,i[1]=u+=r):r<0?(i[1]=o,i[0]=o+=r):i[0]=u}function bA(t,n){if(this._stacked)return!1;var e=this._labelPosition(t,n);if("outside"===e)return!0;if("inside"===e)return!1;var i="x"===this._discrete.charAt(0)?"y":"x",r=this._discrete.replace(this._discrete.charAt(0),i),a=this["_".concat(r,"Axis")]._d3Scale.range(),o=this["_".concat(r)](t,n),u=o<0,l=this["_".concat(r,"Axis")]._getPosition(0),s="y"===r?u?a[1]-l:l-a[0]:u?l-a[0]:a[1]-l,c=this["_".concat(r,"Axis")]._getPosition(o);return Math.abs(u?l-c:c-l).45&&(t.s>.8&&(t.s=.8),t.l=.45),t.toString()}("function"==typeof t._shapeConfig.Line.stroke?t._shapeConfig.Line.stroke(n,e):t._shapeConfig.Line.stroke)},fontResize:!1,padding:5,textAnchor:"start",verticalAlign:"middle"},strokeWidth:hh(2)},Rect:{height:function(n){return 2*pA.bind(cA(t))(n)},width:function(n){return 2*pA.bind(cA(t))(n)}}}),t._shapeOrder=["Area","Path","Bar","Box","Line","Rect","Circle"],t._shapeSort=function(n,e){return t._shapeOrder.indexOf(n)-t._shapeOrder.indexOf(e)},t._sizeMax=20,t._sizeMin=5,t._sizeScale="sqrt",t._stackOffset=vA,t._stackOrder=_A,t._timelineConfig=qc(t._timelineConfig,{brushing:!0,brushMin:function(){return t._xTime||t._yTime||t._x2Time||t._y2Time?2:1}}),t._x=Gc("x"),t._xAxis=(new vw).align("end"),t._xTest=(new vw).align("end").gridSize(0),t._xConfig={gridConfig:{stroke:function(n){return t._discrete&&"x"===t._discrete.charAt(0)||t._xAxis.range()[0]===t._xAxis._getPosition.bind(t._xAxis)(n.id)?"transparent":"#eee"}}},t._xCutoff=150,t._x2=Gc("x2"),t._x2Axis=(new Rw).align("start"),t._x2Test=(new Rw).align("start").gridSize(0),t._x2Config={padding:0},t._y=Gc("y"),t._yAxis=(new Cw).align("start"),t._yTest=(new Cw).align("start").gridSize(0),t._yConfig={gridConfig:{stroke:function(n){if(t._discrete&&"y"===t._discrete.charAt(0))return"transparent";var e=t._yAxis.range();return e[e.length-1]===t._yAxis._getPosition.bind(t._yAxis)(n.id)?"transparent":"#eee"}}},t._yCutoff=150,t._y2=Gc("y2"),t._y2Axis=(new Pw).align("end"),t._y2Test=(new Cw).align("end").gridSize(0),t._y2Config={},t}return n=a,e=[{key:"_preDraw",value:function(){var t=this;["x","y","x2","y2"].forEach((function(n){if(t["_".concat(n,"Key")]){var e=t["_".concat(n,"Key")];t._aggs[e]||t._discrete!==n||(t._aggs[e]=function(t,n){var e=Array.from(new Set(t.map(n)));return 1===e.length?e[0]:e}),e!==n&&t["_".concat(n,"Title")]===t["_".concat(n,"Config")].title&&t._discrete!==n&&(t["_".concat(n,"Title")]=e,t["_".concat(n,"Config")].title=e)}})),uA(hA(a.prototype),"_preDraw",this).call(this)}},{key:"_draw",value:function(t){var n=this;if(!this._filteredData.length)return this;var e=!!this._time&&this._time(this._filteredData[0],0),i=this._x2Time=e&&this._x2(this._filteredData[0],0)===e,r=this._xTime=e&&this._x(this._filteredData[0],0)===e,o=this._y2Time=e&&this._y2(this._filteredData[0],0)===e,u=this._yTime=e&&this._y(this._filteredData[0],0)===e,l=r||i||u||o,s=function(t,e){return"".concat(!l&&n._time?n._time(t,e):"time","_").concat(n._stacked?"".concat(n._groupBy.length>1?n._ids(t,e).slice(0,-1).join("_"):"group"):"".concat(n._ids(t,e).join("_")))},c=function(t,e){var a={__d3plus__:!0,data:t,group:s(t,e),i:e,hci:n._confidence&&n._confidence[1]&&n._confidence[1](t,e),id:n._ids(t,e).slice(0,n._drawDepth+1).join("_"),lci:n._confidence&&n._confidence[0]&&n._confidence[0](t,e),shape:n._shape(t,e),x:r?Xb(n._x(t,e)):n._x(t,e),x2:i?Xb(n._x2(t,e)):n._x2(t,e),y:u?Xb(n._y(t,e)):n._y(t,e),y2:o?Xb(n._y2(t,e)):n._y2(t,e)};return a.discrete="Bar"===a.shape?"".concat(a[n._discrete],"_").concat(a.group):"".concat(a[n._discrete]),a.id="Bar"===a.shape?"".concat(a.id,"_").concat(a[n._discrete]):a.id,a},h=this._formattedData=this._filteredData.map(c),f=this._axisPersist?this._data.map(c):h;if(this._size){var g=Vt(f,(function(t){return n._size(t.data)}));this._sizeScaleD3=Vp["scale".concat(this._sizeScale.charAt(0).toUpperCase()).concat(this._sizeScale.slice(1))]().domain(g).range([g[0]===g[1]?this._sizeMax:fn([this._sizeMax/2,this._sizeMin]),this._sizeMax])}else this._sizeScaleD3=function(){return n._sizeMin};var d=f.some((function(t){return void 0!==t.x2})),p=f.some((function(t){return void 0!==t.y2})),m=this._height-this._margin.top-this._margin.bottom,_=this._discrete?"x"===this._discrete?"y":"x":void 0,y=this._discrete?"x"===this._discrete?"y2":"x2":void 0,v=[_,y].filter((function(t){return t})),b=this._select,w=this._transition,S=this._width-this._margin.left-this._margin.right;function x(t){var n=this,e=this["_".concat(t,"Time")]?h:f,i=e.filter((function(n){return![NaN,void 0,!1].includes(n[t])})).sort((function(e,i){return n["_".concat(t,"Sort")]?n["_".concat(t,"Sort")](e.data,i.data):e[t]-i[t]})).map((function(n){return n[t]}));return this._discrete!==t.charAt(0)&&this._confidence&&(this._confidence[0]&&(i=i.concat(e.map((function(t){return t.lci})))),this._confidence[1]&&(i=i.concat(e.map((function(t){return t.hci}))))),Gd(i,(function(t){return"".concat(t)}))}var k,C,A,M,T=x.bind(this)("x"),O=x.bind(this)("x2"),P=x.bind(this)("y"),j=x.bind(this)("y2");if(this._stacked){var B,D=f.filter((function(t){return["Area","Bar"].includes(t.shape)})),z=Zd().key((function(t){return t.group})).entries(D).reduce((function(t,n){return t[n.key]||(t[n.key]=0),t[n.key]+=vn(n.values,(function(t){return t[_]})),t}),{});f.sort((function(t,e){if(n["_".concat(n._discrete,"Sort")])return n["_".concat(n._discrete,"Sort")](t.data,e.data);var i=t[n._discrete],r=e[n._discrete];return i-r!=0?i-r:t.group!==e.group?z[e.group]-z[t.group]:e[_]-t[_]})),k=Array.from(new Set(f.map((function(t){return t.discrete})))),M=Array.from(new Set(f.map((function(t){return t.id})))),(A=Zd().key((function(t){return t.discrete})).entries(f).map((function(t){return t.values}))).forEach((function(t){var e=Array.from(new Set(t.map((function(t){return t.id}))));e.length=r&&(++e,i+=r);else{let r=-1;for(let a of t)null!=(a=n(a,++r,t))&&(a=+a)>=a&&(++e,i+=a)}if(e)return i/e}(r)>3?"log":"linear"}return i||e},J=this._yConfigScale=X("y",Y).toLowerCase(),Q=this._y2ConfigScale=X("y2",Z).toLowerCase(),$=this._xConfigScale=X("x",G).toLowerCase(),tt=this._x2ConfigScale=X("x2",U).toLowerCase();C={x:H,x2:K||H,y:W,y2:V||W},Object.keys(C).forEach((function(t){"log"===n["_".concat(t,"ConfigScale")]&&C[t].includes(0)&&(fn(C[t])<0?C[t][1]=hn(h.map((function(n){return n[t]})).filter((function(t){return![NaN,void 0,!1].includes(t)}))):C[t][0]=fn(f.map((function(n){return n[t]})).filter((function(t){return![NaN,void 0,!1].includes(t)}))))})),v.forEach((function(t){if(n["_".concat(t,"Config")].domain){var e=n["_".concat(t,"Config")].domain;"x"===n._discrete&&e.reverse(),C[t]=e}else if(t&&void 0!==n._baseline){var i=n._baseline;C[t]&&C[t][0]>i?C[t][0]=i:C[t]&&C[t][1]this._discreteCutoff||this._width>this._xCutoff,dt="y"===this._discrete&&this._height>this._discreteCutoff||this._height>this._yCutoff,pt={data:u?P:[],locale:this._locale,scalePadding:it.padding?it.padding():0};gt||(pt.barConfig={stroke:"transparent"},pt.tickSize=0,pt.shapeConfig={labelBounds:function(t,e){var i=t.labelBounds,r=i.width,a=i.y,o=n._height/2;return{x:e?-o:0,y:a,width:r,height:o}},labelConfig:{padding:0,rotate:0},labelRotation:!1});var mt=Hd("g.d3plus-plot-test",{enter:{opacity:0},parent:this._select}),_t=ch.bind(this)(this._shapeConfig,"shape","Bar"),yt=void 0!==_t.label?"function"==typeof _t.label?_t.label:hh(_t.label):this._drawLabel,vt=f.map((function(t){return yt(t.data,t.i)})).filter((function(t){return"number"==typeof t||t})).map(String),bt=Gd(f.map((function(t){return t.x2})));bt="Point"===U&&bt.every((function(t){return vt.includes("".concat(t))}))?[]:null;var wt=Gd(f.map((function(t){return t.x})));wt="Point"===G&&wt.every((function(t){return vt.includes("".concat(t))}))?[]:null;var St=Gd(f.map((function(t){return t.y2})));St="Point"===Z&&St.every((function(t){return vt.includes("".concat(t))}))?[]:null;var xt=Gd(f.map((function(t){return t.y})));xt="Point"===Y&&xt.every((function(t){return vt.includes("".concat(t))}))?[]:null,dt&&this._yTest.domain(lt).height(m).maxSize(S/2).range([void 0,void 0]).select(mt.node()).ticks(xt).width(S).config(pt).config(this._yConfig).scale(J).render();var kt=this._yTest.outerBounds(),Ct=kt.width?kt.width+this._yTest.padding():void 0;p&&this._y2Test.domain(st).height(m).range([void 0,void 0]).select(mt.node()).ticks(St).width(S).config(pt).config(ft).config(this._y2Config).scale(Q).render();var At=this._y2Test.outerBounds(),Et=At.width?At.width+this._y2Test.padding():void 0,Mt={data:r?T:[],locale:this._locale,scalePadding:nt.padding?nt.padding():0};dt||(Mt.barConfig={stroke:"transparent"},Mt.tickSize=0,Mt.shapeConfig={labelBounds:function(t,e){var i=t.labelBounds,r=i.height,a=i.y,o=n._width/2;return{x:e?-o:0,y:a,width:o,height:r}},labelConfig:{padding:0,rotate:0,textAnchor:function(t){return t.id===wt[0]?"start":"end"}},labelRotation:!1});var Tt=void 0;gt&&this._xTest.domain(ot).height(m).maxSize(m/2).range([void 0,Tt]).select(mt.node()).ticks(wt).width(S).config(Mt).config(this._xConfig).scale($).render();var Ot,Pt=[];if(this._lineLabels){var jt=h.filter((function(t){return"Line"===t.shape&&("function"!=typeof n._lineLabels||n._lineLabels(t.data,t.i))})),Bt=Zd().key((function(t){return t.id})).entries(jt);if(Bt.length){var Dt=ch.bind(this)(this._shapeConfig,"shape","Line");fA.config(Dt);var zt=fA.labelConfig(),Nt=void 0!==zt.fontColor?zt.fontColor:gA.fontColor(),Rt=void 0!==zt.fontSize?zt.fontSize:gA.fontSize(),Ft=void 0!==zt.fontWeight?zt.fontWeight:gA.fontWeight(),Lt=void 0!==zt.fontFamily?zt.fontFamily:gA.fontFamily(),It=void 0!==zt.padding?zt.padding:gA.padding(),Ht=Dt.label||this._drawLabel,Gt=function(t){return"log"===$&&0===t&&(t=ot[0]<0?n._xTest._d3Scale.domain()[1]:n._xTest._d3Scale.domain()[0]),n._xTest._getPosition.bind(n._xTest)(t)};Pt=Bt.map((function(t){for(var n,e=t.values[t.values.length-1];e.__d3plus__&&e.data;)n=(e=e.data).i;var i="function"==typeof Ht?Ht(e,n):Ht,r="function"==typeof Nt?Nt(e,n):Nt,a="function"==typeof Rt?Rt(e,n):Rt,o="function"==typeof Ft?Ft(e,n):Ft,u="function"==typeof Lt?Lt(e,n):Lt;u instanceof Array&&(u=u.map((function(t){return"'".concat(t,"'")})).join(", "));var l="function"==typeof It?It(e,n):It,s=vy(i,{"font-size":a,"font-family":u,"font-weight":o}),c=hn(t.values.map((function(t){return Gt(t.x)}))),h=t.values.find((function(t){return Gt(t.x)===c})).y;return{id:t.key,labelWidth:s+2*l,spaceNeeded:s+4*l,value:h,padding:l,fontSize:a,fontColor:r,maxX:c,xValue:hn(t.values,(function(t){return t.x}))}})).sort((function(t,n){return n.value-t.value}));var Kt=hn(Pt,(function(t){return t.maxX}));Ot=hn(Pt.map((function(t){return t.labelWidth})));var Ut=Kt===this._xTest._getRange.bind(this._xTest)()[1]?hn(Pt.filter((function(t){return t.maxX===Kt})),(function(t){return t.spaceNeeded})):0;if(Ut){var qt=fn([Ut,S/4]);Tt=S-qt-this._margin.right}}}gt&&Tt&&this._xTest.domain(ot).height(m).maxSize(m/2).range([void 0,Tt]).select(mt.node()).ticks(wt).width(S).config(Mt).config(this._xConfig).scale($).render(),d&&this._x2Test.domain(ut).height(m).range([void 0,Tt]).select(mt.node()).ticks(bt).width(S).config(Mt).tickSize(0).config(ht).config(this._x2Config).scale(tt).render();var Wt=this._xTest._getRange(),Zt=this._x2Test._getRange(),Xt=this._x2Test.outerBounds(),Jt=d?Xt.height+this._x2Test.padding():0,Qt=hn([Ct,Wt[0],Zt[0]]);gt&&this._xTest.range([Qt,void 0]).render();var $t=dt?this._yTest.shapeConfig().labelConfig.fontSize()/2:0,tn=hn([Et,S-Wt[1],S-Zt[1]]),nn=this._xTest.outerBounds().height+(dt?this._xTest.padding():0);this._padding.left+=Qt,this._padding.right+=tn,this._padding.bottom+=nn,this._padding.top+=Jt+$t,uA(hA(a.prototype),"_draw",this).call(this,t);var en=this._margin.left+this._margin.right,rn=this._margin.top+this._margin.bottom,an=[Jt,m-(nn+$t+rn)];dt&&this._yTest.domain(lt).height(m).maxSize(S/2).range(an).select(mt.node()).ticks(xt).width(S).config(pt).config(this._yConfig).scale(J).render(),Qt=hn([Ct=(kt=this._yTest.outerBounds()).width?kt.width+this._yTest.padding():void 0,Wt[0],Zt[0]]),p&&this._y2Test.config(pt).domain(st).gridSize(0).height(m).range(an).select(mt.node()).width(S-hn([0,tn-Et])).title(!1).config(this._y2Config).config(ft).scale(Q).render(),tn=hn([0,Et=(At=this._y2Test.outerBounds()).width?At.width+this._y2Test.padding():void 0,S-Wt[1],S-Zt[1]]);var on=[Qt,S-(tn+en)],un=Hd("g.d3plus-plot-background",{parent:b,transition:w}),ln="translate(".concat(this._margin.left,", ").concat(this._margin.top+Jt+$t,")"),sn="translate(".concat(this._margin.left,", ").concat(this._margin.top+$t,")"),cn=gt&&Hd("g.d3plus-plot-x-axis",{parent:b,transition:w,enter:{transform:ln},update:{transform:ln}}),gn=d&&Hd("g.d3plus-plot-x2-axis",{parent:b,transition:w,enter:{transform:sn},update:{transform:sn}}),dn=Qt>Ct?Qt-Ct:0,pn="translate(".concat(this._margin.left+dn,", ").concat(this._margin.top+$t,")"),mn=dt&&Hd("g.d3plus-plot-y-axis",{parent:b,transition:w,enter:{transform:pn},update:{transform:pn}}),bn="translate(-".concat(this._margin.right,", ").concat(this._margin.top+$t,")"),wn=p&&Hd("g.d3plus-plot-y2-axis",{parent:b,transition:w,enter:{transform:bn},update:{transform:bn}});this._xAxis.domain(ot).height(m-(Jt+$t+rn)).maxSize(m/2).range(on).select(gt?cn.node():void 0).ticks(wt).width(S).config(Mt).config(this._xConfig).scale($).render(),d&&this._x2Axis.domain(ut).height(m-(nn+$t+rn)).range(on).select(gn.node()).ticks(bt).width(S).config(Mt).config(ht).config(this._x2Config).scale(tt).render(),this._xFunc=nt=function(t,e){return"x2"===e?("log"===tt&&0===t&&(t=ut[0]<0?n._x2Axis._d3Scale.domain()[1]:n._x2Axis._d3Scale.domain()[0]),n._x2Axis._getPosition.bind(n._x2Axis)(t)):("log"===$&&0===t&&(t=ot[0]<0?n._xAxis._d3Scale.domain()[1]:n._xAxis._d3Scale.domain()[0]),n._xAxis._getPosition.bind(n._xAxis)(t))},an=[this._xAxis.outerBounds().y+Jt,m-(nn+$t+rn)],this._yAxis.domain(lt).height(m).maxSize(S/2).range(an).select(dt?mn.node():void 0).ticks(xt).width(on[on.length-1]).config(pt).config(this._yConfig).scale(J).render(),p&&this._y2Axis.config(pt).domain(p?st:lt).gridSize(0).height(m).range(an).select(wn.node()).width(S-hn([0,tn-Et])).title(!1).config(this._y2Config).config(ft).scale(Q).render();var Sn={};Pt&&(Zd().key((function(t){return t.xValue})).entries(Pt).forEach((function(t){var e=t.values,i=hn(e.map((function(t){return t.fontSize}))),r=yn(an[0],an[1],i).reverse(),a=(an[1]-an[0])/8;e.forEach(function t(n,e,i){if(n.defaultY||(n.defaultY=this._yAxis._getPosition(n.value)),e){var o=i[e-1],u=n.fontSize,l=n.padding,s=n.newY||n.defaultY,c=o.newY||o.defaultY;if(s-u/2-l=0?A[n][e][r]:C[_]["x"===_?0:1])},e["".concat(_,"1")]=function(t){var n=M.indexOf(t.id),e=k.indexOf(t.discrete),r=t[_]<0?0:1;return i(n>=0?A[n][e][r]:C[_]["x"===_?0:1])}}var r=(new Zb[t.key]).config(e).data(t.values);if("Bar"===t.key){var a,o="x"===n._discrete?nt:it,u="x"===n._discrete?G:Y,l="x"===n._discrete?ot:lt,s="x"===n._discrete?on:an;if("Point"!==u&&2===l.length){var c=Array.from(new Set(t.values.map((function(t){return o(t[n._discrete])}))));c.unshift(s[0]-c[0]-s[0]),c.push(s[1]+s[1]-c[c.length-1]),a=c.reduce((function(t,n,e,i){if(e){var r=Math.abs(n-i[e-1]);r1?o(l[1])-o(l[0]):s[s.length-1]-s[0];n._groupPadding1)return a[0].id===t.id&&"+".concat(E(a.length,n._locale)," ").concat(n._translate("more"))}return n._drawLabel(t,e)},labelBounds:!!n._lineLabels&&function(t,e,i){var r=eA(i.points[0],2),a=r[0],o=r[1],u=eA(i.points[i.points.length-1],2),l=u[0],s=u[1],c=n._height/4;return{x:l-a,y:s-o-c/2-(Sn[t.id]?s-Sn[t.id]:0),width:Ot,height:c}}})}for(var O=jn.filter((function(n){return n.includes(".".concat(t.key))})),P=jn.filter((function(t){return!t.includes(".")})),j=jn.filter((function(t){return t.includes(".shape")})),B=function(t){r.on(P[t],(function(e,i,r,a){return n._on[P[t]](e.data,e.i,r,a)}))},D=0;Dt.length)&&(n=t.length);for(var e=0,i=new Array(n);e=0;)n+=e[i].value;else n=1;t.value=n}function pE(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=_E)):void 0===n&&(n=mE);for(var e,i,r,a,o,u=new bE(t),l=[u];e=l.pop();)if((r=n(e.data))&&(o=(r=Array.from(r)).length))for(e.children=r,a=o-1;a>=0;--a)l.push(i=r[a]=new bE(r[a])),i.parent=e,i.depth=e.depth+1;return u.eachBefore(vE)}function mE(t){return t.children}function _E(t){return Array.isArray(t)?t[1]:null}function yE(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function vE(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function bE(t){this.data=t,this.depth=this.height=0,this.parent=null}function wE(){return 0}function SE(t){return function(){return t}}function xE(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function kE(t,n,e,i,r){for(var a,o=t.children,u=-1,l=o.length,s=t.value&&(i-n)/t.value;++u=0;--i)a.push(e[i]);return this},find:function(t,n){let e=-1;for(const i of this)if(t.call(n,i,++e,this))return i},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;t=e.pop(),n=i.pop();for(;t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)n=n.parent,i.push(n);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return pE(this).eachBefore(yE)},[Symbol.iterator]:function*(){var t,n,e,i,r=this,a=[r];do{for(t=a.reverse(),a=[];r=t.pop();)if(yield r,n=r.children)for(e=0,i=n.length;ef&&(f=u),m=c*c*p,(g=Math.max(f/m,m/h))>d){c-=u;break}d=g}_.push(o={value:c,dice:l1?n:1)},e}(AE);function TE(){var t=ME,n=!1,e=1,i=1,r=[0],a=wE,o=wE,u=wE,l=wE,s=wE;function c(t){return t.x0=t.y0=0,t.x1=e,t.y1=i,t.eachBefore(h),r=[0],n&&t.eachBefore(xE),t}function h(n){var e=r[n.depth],i=n.x0+e,c=n.y0+e,h=n.x1-e,f=n.y1-e;h1?n:1)},e}(AE);function PE(t){return(PE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jE(t,n){for(var e=0;e=e-1){var c=u[n];return c.x0=r,c.y0=a,c.x1=o,void(c.y1=l)}var h=s[n],f=i/2+h,g=n+1,d=e-1;for(;g>>1;s[p]l-a){var y=i?(r*_+o*m)/i:o;t(n,g,m,r,a,y,l),t(g,e,_,y,a,o,l)}else{var v=i?(a*_+l*m)/i:l;t(n,g,m,r,a,o,v),t(g,e,_,r,v,o,l)}}(0,l,t.value,n,e,i,r)},treemapDice:kE,treemapSlice:CE,treemapSliceDice:function(t,n,e,i,r){(1&t.depth?CE:kE)(t,n,e,i,r)},treemapSquarify:ME,treemapResquarify:OE},LE=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&DE(t,n)}(a,XC);var n,e,i,r=zE(a);function a(){var t;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this))._layoutPadding=1;var n=t._legend;t._legend=function(e,i){return i.length!==t._filteredData.length&&n.bind(NE(t))(e,i)},t._legendSort=function(n,e){return t._sum(e)-t._sum(n)},t._legendTooltip=qc({},t._legendTooltip,{tbody:[]}),t._shapeConfig=qc({},t._shapeConfig,{ariaLabel:function(n,e){var i=t._rankData?"".concat(t._rankData.indexOf(n)+1,". "):"";return"".concat(i).concat(t._drawLabel(n,e),", ").concat(t._sum(n,e),".")},labelConfig:{fontMax:40,fontMin:8,fontResize:!0,padding:5}}),t._sort=function(t,n){var i=e(t),r=e(n);return i&&!r?1:!i&&r?-1:n.value-t.value},t._sum=Gc("value"),t._thresholdKey=t._sum,t._tile=ME,t._tooltipConfig=qc({},t._tooltipConfig,{tbody:[[function(){return t._translate("Share")},function(n,e,i){return"".concat(E(100*i.share,t._locale),"%")}]]}),t._treemap=TE().round(!0);var e=function(t){return t.children&&1===t.children.length&&t.children[0].data._isAggregation};return t}return n=a,e=[{key:"_draw",value:function(t){var n=this;BE(RE(a.prototype),"_draw",this).call(this,t);for(var e=Zd(),i=0;i<=this._drawDepth;i++)e.key(this._groupBy[i]);e=e.entries(this._filteredData);var r=this._treemap.padding(this._layoutPadding).size([this._width-this._margin.left-this._margin.right,this._height-this._margin.top-this._margin.bottom]).tile(this._tile)(pE({values:e},(function(t){return t.values})).sum(this._sum).sort(this._sort)),o=[],u=this;r.children&&function t(n){for(var e=0;e-1?r:void 0,i.data=Kd(i.data.values,u._aggs),i.x=i.x0+(i.x1-i.x0)/2,i.y=i.y0+(i.y1-i.y0)/2,o.push(i)}}}(r.children),this._rankData=o.sort(this._sort).map((function(t){return t.data}));var l=r.value;o.forEach((function(t){t.share=n._sum(t.data,t.i)/l}));var s="translate(".concat(this._margin.left,", ").concat(this._margin.top,")"),c=ch.bind(this)(this._shapeConfig,"shape","Rect"),h=c.labelConfig.fontMax,f=c.labelConfig.fontMin,g=c.labelConfig.padding;return this._shapes.push((new yb).data(o).label((function(t){return[n._drawLabel(t.data,t.i),"".concat(E(100*t.share,n._locale),"%")]})).select(Hd("g.d3plus-Treemap",{parent:this._select,enter:{transform:s},update:{transform:s}}).node()).config({height:function(t){return t.y1-t.y0},labelBounds:function(t,n,e){var i=e.height,r=Math.min(h,.5*(i-2*g));return r0){var m=Kd(c,n);m._isAggregation=!0,m._threshold=s,h.push(m)}return h}throw new Error("Depth is higher than the amount of grouping levels.")}(t,0):t}},{key:"layoutPadding",value:function(t){return arguments.length?(this._layoutPadding="function"==typeof t?t:hh(t),this):this._layoutPadding}},{key:"sort",value:function(t){return arguments.length?(this._sort=t,this):this._sort}},{key:"sum",value:function(t){return arguments.length?(this._sum="function"==typeof t?t:Gc(t),this._thresholdKey=this._sum,this):this._sum}},{key:"tile",value:function(t){return arguments.length?(this._tile="string"==typeof t?FE["treemap".concat(t.charAt(0).toUpperCase()).concat(t.slice(1))]||ME:t,this):this._tile}}],e&&jE(n.prototype,e),i&&jE(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}();function IE(){return IE=Object.assign?Object.assign.bind():function(t){for(var n=1;n0?1:t<0?-1:0},uM=Math.sqrt,lM=Math.tan;function sM(t){return t>1?0:t<-1?UE:Math.acos(t)}function cM(t){return t>1?qE:t<-1?-qE:Math.asin(t)}function hM(t){return(t=aM(t/2))*t}function fM(){}function gM(t,n){t&&pM.hasOwnProperty(t.type)&&pM[t.type](t,n)}var dM={Feature:function(t,n){gM(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++i=0?1:-1,r=i*e,a=$E(n=(n*=ZE)/2+WE),o=aM(n),u=xM*o,l=SM*a+u*$E(r),s=u*i*aM(r);zM.add(QE(s,l)),wM=t,SM=a,xM=o}function GM(t){return[QE(t[1],t[0]),cM(t[2])]}function KM(t){var n=t[0],e=t[1],i=$E(e);return[i*$E(n),i*aM(n),aM(e)]}function UM(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function qM(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function WM(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function YM(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function VM(t){var n=uM(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ZM,XM,JM,QM,$M,tT,nT,eT,iT,rT,aT,oT,uT,lT,sT,cT,hT={point:fT,lineStart:dT,lineEnd:pT,polygonStart:function(){hT.point=mT,hT.lineStart=_T,hT.lineEnd=yT,jM=new Zt,RM.polygonStart()},polygonEnd:function(){RM.polygonEnd(),hT.point=fT,hT.lineStart=dT,hT.lineEnd=pT,zM<0?(kM=-(AM=180),CM=-(EM=90)):jM>GE?EM=90:jM<-GE&&(CM=-90),DM[0]=kM,DM[1]=AM},sphere:function(){kM=-(AM=180),CM=-(EM=90)}};function fT(t,n){BM.push(DM=[kM=t,AM=t]),nEM&&(EM=n)}function gT(t,n){var e=KM([t*ZE,n*ZE]);if(PM){var i=qM(PM,e),r=qM([i[1],-i[0],0],i);VM(r),r=GM(r);var a,o=t-MM,u=o>0?1:-1,l=r[0]*VE*u,s=XE(o)>180;s^(u*MMEM&&(EM=a):s^(u*MM<(l=(l+360)%360-180)&&lEM&&(EM=n)),s?tvT(kM,AM)&&(AM=t):vT(t,AM)>vT(kM,AM)&&(kM=t):AM>=kM?(tAM&&(AM=t)):t>MM?vT(kM,t)>vT(kM,AM)&&(AM=t):vT(t,AM)>vT(kM,AM)&&(kM=t)}else BM.push(DM=[kM=t,AM=t]);nEM&&(EM=n),PM=e,MM=t}function dT(){hT.point=gT}function pT(){DM[0]=kM,DM[1]=AM,hT.point=fT,PM=null}function mT(t,n){if(PM){var e=t-MM;jM.add(XE(e)>180?e+(e>0?360:-360):e)}else TM=t,OM=n;RM.point(t,n),gT(t,n)}function _T(){RM.lineStart()}function yT(){mT(TM,OM),RM.lineEnd(),XE(jM)>GE&&(kM=-(AM=180)),DM[0]=kM,DM[1]=AM,PM=null}function vT(t,n){return(n-=t)<0?n+360:n}function bT(t,n){return t[0]-n[0]}function wT(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nvT(i[0],i[1])&&(i[1]=r[1]),vT(r[0],i[1])>vT(i[0],i[1])&&(i[0]=r[0])):a.push(i=r);for(o=-1/0,n=0,i=a[e=a.length-1];n<=e;i=r,++n)r=a[n],(u=vT(i[1],r[0]))>o&&(o=u,kM=r[0],AM=i[1])}return BM=DM=null,kM===1/0||CM===1/0?[[NaN,NaN],[NaN,NaN]]:[[kM,CM],[AM,EM]]}var xT={sphere:fM,point:kT,lineStart:AT,lineEnd:TT,polygonStart:function(){xT.lineStart=OT,xT.lineEnd=PT},polygonEnd:function(){xT.lineStart=AT,xT.lineEnd=TT}};function kT(t,n){t*=ZE;var e=$E(n*=ZE);CT(e*$E(t),e*aM(t),aM(n))}function CT(t,n,e){++ZM,JM+=(t-JM)/ZM,QM+=(n-QM)/ZM,$M+=(e-$M)/ZM}function AT(){xT.point=ET}function ET(t,n){t*=ZE;var e=$E(n*=ZE);lT=e*$E(t),sT=e*aM(t),cT=aM(n),xT.point=MT,CT(lT,sT,cT)}function MT(t,n){t*=ZE;var e=$E(n*=ZE),i=e*$E(t),r=e*aM(t),a=aM(n),o=QE(uM((o=sT*a-cT*r)*o+(o=cT*i-lT*a)*o+(o=lT*r-sT*i)*o),lT*i+sT*r+cT*a);XM+=o,tT+=o*(lT+(lT=i)),nT+=o*(sT+(sT=r)),eT+=o*(cT+(cT=a)),CT(lT,sT,cT)}function TT(){xT.point=kT}function OT(){xT.point=jT}function PT(){BT(oT,uT),xT.point=kT}function jT(t,n){oT=t,uT=n,t*=ZE,n*=ZE,xT.point=BT;var e=$E(n);lT=e*$E(t),sT=e*aM(t),cT=aM(n),CT(lT,sT,cT)}function BT(t,n){t*=ZE;var e=$E(n*=ZE),i=e*$E(t),r=e*aM(t),a=aM(n),o=sT*a-cT*r,u=cT*i-lT*a,l=lT*r-sT*i,s=eM(o,u,l),c=cM(s),h=s&&-c/s;iT.add(h*o),rT.add(h*u),aT.add(h*l),XM+=c,tT+=c*(lT+(lT=i)),nT+=c*(sT+(sT=r)),eT+=c*(cT+(cT=a)),CT(lT,sT,cT)}function DT(t){ZM=XM=JM=QM=$M=tT=nT=eT=0,iT=new Zt,rT=new Zt,aT=new Zt,yM(t,xT);var n=+iT,e=+rT,i=+aT,r=eM(n,e,i);return rUE&&(t-=Math.round(t/YE)*YE),[t,n]}function FT(t,n,e){return(t%=YE)?n||e?NT(IT(t),HT(n,e)):IT(t):n||e?HT(n,e):RT}function LT(t){return function(n,e){return XE(n+=t)>UE&&(n-=Math.round(n/YE)*YE),[n,e]}}function IT(t){var n=LT(t);return n.invert=LT(-t),n}function HT(t,n){var e=$E(t),i=aM(t),r=$E(n),a=aM(n);function o(t,n){var o=$E(n),u=$E(t)*o,l=aM(t)*o,s=aM(n),c=s*e+u*i;return[QE(l*r-c*a,u*e-s*i),cM(c*r+l*a)]}return o.invert=function(t,n){var o=$E(n),u=$E(t)*o,l=aM(t)*o,s=aM(n),c=s*r-l*a;return[QE(l*r+s*a,u*e+c*i),cM(c*e-u*i)]},o}function GT(t){function n(n){return(n=t(n[0]*ZE,n[1]*ZE))[0]*=VE,n[1]*=VE,n}return t=FT(t[0]*ZE,t[1]*ZE,t.length>2?t[2]*ZE:0),n.invert=function(n){return(n=t.invert(n[0]*ZE,n[1]*ZE))[0]*=VE,n[1]*=VE,n},n}function KT(t,n,e,i,r,a){if(e){var o=$E(n),u=aM(n),l=i*e;null==r?(r=n+i*YE,a=n-l/2):(r=UT(o,r),a=UT(o,a),(i>0?ra)&&(r+=i*YE));for(var s,c=r;i>0?c>a:c1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function YT(t,n){return XE(t[0]-n[0])=0;--a)r.point((c=s[a])[0],c[1]);else i(f.x,f.p.x,-1,r);f=f.p}s=(f=f.o).z,g=!g}while(!f.v);r.lineEnd()}}}function XT(t){if(n=t.length){for(var n,e,i=0,r=t[0];++i=0?1:-1,A=C*k,E=A>UE,M=m*S;if(l.add(QE(M*C*aM(A),_*x+M*$E(A))),o+=E?k+C*YE:k,E^d>=e^b>=e){var T=qM(KM(g),KM(v));VM(T);var O=qM(a,T);VM(O);var P=(E^k>=0?-1:1)*cM(O[2]);(i>P||i===P&&(T[0]||T[1]))&&(u+=E^k>=0?1:-1)}}return(o<-GE||o0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(tO))}return f}}function tO(t){return t.length>1}function nO(t,n){return((t=t.x)[0]<0?t[1]-qE-GE:qE-t[1])-((n=n.x)[0]<0?n[1]-qE-GE:qE-n[1])}RT.invert=RT;const eO=$T((function(){return!0}),(function(t){var n,e=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(a,o){var u=a>0?UE:-UE,l=XE(a-e);XE(l-UE)0?qE:-qE),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),t.point(a,i),n=0):r!==u&&l>=UE&&(XE(e-r)GE?JE((aM(n)*(a=$E(i))*aM(e)-aM(i)*(r=$E(n))*aM(t))/(r*a*o)):(n+i)/2}(e,i,a,o),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),n=0),t.point(e=a,i=o),r=u},lineEnd:function(){t.lineEnd(),e=i=NaN},clean:function(){return 2-n}}}),(function(t,n,e,i){var r;if(null==t)r=e*qE,i.point(-UE,r),i.point(0,r),i.point(UE,r),i.point(UE,0),i.point(UE,-r),i.point(0,-r),i.point(-UE,-r),i.point(-UE,0),i.point(-UE,r);else if(XE(t[0]-n[0])>GE){var a=t[0]0,r=XE(n)>GE;function a(t,e){return $E(t)*$E(e)>n}function o(t,e,i){var r=[1,0,0],a=qM(KM(t),KM(e)),o=UM(a,a),u=a[0],l=o-u*u;if(!l)return!i&&t;var s=n*o/l,c=-n*u/l,h=qM(r,a),f=YM(r,s);WM(f,YM(a,c));var g=h,d=UM(f,g),p=UM(g,g),m=d*d-p*(UM(f,f)-1);if(!(m<0)){var _=uM(m),y=YM(g,(-d-_)/p);if(WM(y,f),y=GM(y),!i)return y;var v,b=t[0],w=e[0],S=t[1],x=e[1];w0^y[1]<(XE(y[0]-b)UE^(b<=y[0]&&y[0]<=w)){var A=YM(g,(-d+_)/p);return WM(A,f),[y,GM(A)]}}}function u(n,e){var r=i?t:UE-t,a=0;return n<-r?a|=1:n>r&&(a|=2),e<-r?a|=4:e>r&&(a|=8),a}return $T(a,(function(t){var n,e,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(h,f){var g,d=[h,f],p=a(h,f),m=i?p?0:u(h,f):p?u(h+(h<0?UE:-UE),f):0;if(!n&&(s=l=p)&&t.lineStart(),p!==l&&(!(g=o(n,d))||YT(n,g)||YT(d,g))&&(d[2]=1),p!==l)c=0,p?(t.lineStart(),g=o(d,n),t.point(g[0],g[1])):(g=o(n,d),t.point(g[0],g[1],2),t.lineEnd()),n=g;else if(r&&n&&i^p){var _;m&e||!(_=o(d,n,!0))||(c=0,i?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!p||n&&YT(n,d)||t.point(d[0],d[1]),n=d,l=p,e=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(s&&l)<<1}}}),(function(n,i,r,a){KT(a,t,e,r,n,i)}),i?[0,-t]:[-UE,t-UE])}var rO,aO,oO,uO,lO=1e9,sO=-lO;function cO(t,n,e,i){function r(r,a){return t<=r&&r<=e&&n<=a&&a<=i}function a(r,a,u,s){var c=0,h=0;if(null==r||(c=o(r,u))!==(h=o(a,u))||l(r,a)<0^u>0)do{s.point(0===c||3===c?t:e,c>1?i:n)}while((c=(c+u+4)%4)!==h);else s.point(a[0],a[1])}function o(i,r){return XE(i[0]-t)0?0:3:XE(i[0]-e)0?2:1:XE(i[1]-n)0?1:0:r>0?3:2}function u(t,n){return l(t.x,n.x)}function l(t,n){var e=o(t,1),i=o(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(o){var l,s,c,h,f,g,d,p,m,_,y,v=o,b=WT(),w={point:S,lineStart:function(){w.point=x,s&&s.push(c=[]);_=!0,m=!1,d=p=NaN},lineEnd:function(){l&&(x(h,f),g&&m&&b.rejoin(),l.push(b.result()));w.point=S,m&&v.lineEnd()},polygonStart:function(){v=b,l=[],s=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(f-a)*(i-o)>(g-o)*(t-a)&&++n:g<=i&&(f-a)*(i-o)<(g-o)*(t-a)&&--n;return n}(),e=y&&n,r=(l=_n(l)).length;(e||r)&&(o.polygonStart(),e&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),r&&ZT(l,u,n,a,o),o.polygonEnd());v=o,l=s=c=null}};function S(t,n){r(t,n)&&v.point(t,n)}function x(a,o){var u=r(a,o);if(s&&c.push([a,o]),_)h=a,f=o,g=u,_=!1,u&&(v.lineStart(),v.point(a,o));else if(u&&m)v.point(a,o);else{var l=[d=Math.max(sO,Math.min(lO,d)),p=Math.max(sO,Math.min(lO,p))],b=[a=Math.max(sO,Math.min(lO,a)),o=Math.max(sO,Math.min(lO,o))];!function(t,n,e,i,r,a){var o,u=t[0],l=t[1],s=0,c=1,h=n[0]-u,f=n[1]-l;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>c)return;o>s&&(s=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>c)return;o>s&&(s=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>s&&(s=o)}else if(f>0){if(o0&&(t[0]=u+s*h,t[1]=l+s*f),c<1&&(n[0]=u+c*h,n[1]=l+c*f),!0}}}}}(l,b,t,n,e,i)?u&&(v.lineStart(),v.point(a,o),y=!1):(m||(v.lineStart(),v.point(l[0],l[1])),v.point(b[0],b[1]),u||v.lineEnd(),y=!1)}d=a,p=o,m=u}return w}}var hO={sphere:fM,point:fM,lineStart:function(){hO.point=gO,hO.lineEnd=fO},lineEnd:fM,polygonStart:fM,polygonEnd:fM};function fO(){hO.point=hO.lineEnd=fM}function gO(t,n){aO=t*=ZE,oO=aM(n*=ZE),uO=$E(n),hO.point=dO}function dO(t,n){t*=ZE;var e=aM(n*=ZE),i=$E(n),r=XE(t-aO),a=$E(r),o=i*aM(r),u=uO*e-oO*i*a,l=oO*e+uO*i*a;rO.add(QE(uM(o*o+u*u),l)),aO=t,oO=e,uO=i}function pO(t){return rO=new Zt,yM(t,hO),+rO}var mO=[null,null],_O={type:"LineString",coordinates:mO};function yO(t,n){return mO[0]=t,mO[1]=n,pO(_O)}var vO={Feature:function(t,n){return wO(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++i0&&(r=yO(t[a],t[a-1]))>0&&e<=r&&i<=r&&(e+i-r)*(1-Math.pow((e-i)/r,2))GE})).map(l)).concat(yn(tM(a/g)*g,r,g).filter((function(t){return XE(t%p)>GE})).map(s))}return _.lines=function(){return y().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[c(i).concat(h(o).slice(1),c(e).reverse().slice(1),h(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],u=+t[0][1],o=+t[1][1],i>e&&(t=i,i=e,e=t),u>o&&(t=u,u=o,o=t),_.precision(m)):[[i,u],[e,o]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],n>t&&(e=n,n=t,t=e),a>r&&(e=a,a=r,r=e),_.precision(m)):[[n,a],[t,r]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(d=+t[0],p=+t[1],_):[d,p]},_.stepMinor=function(t){return arguments.length?(f=+t[0],g=+t[1],_):[f,g]},_.precision=function(f){return arguments.length?(m=+f,l=EO(a,r,90),s=MO(n,t,m),c=EO(u,o,90),h=MO(i,e,m),_):m},_.extentMajor([[-180,-90+GE],[180,90-GE]]).extentMinor([[-180,-80-GE],[180,80+GE]])}function OO(t,n){var e=t[0]*ZE,i=t[1]*ZE,r=n[0]*ZE,a=n[1]*ZE,o=$E(i),u=aM(i),l=$E(a),s=aM(a),c=o*$E(e),h=o*aM(e),f=l*$E(r),g=l*aM(r),d=2*cM(uM(hM(a-i)+o*l*hM(r-e))),p=aM(d),m=d?function(t){var n=aM(t*=d)/p,e=aM(d-t)/p,i=e*c+n*f,r=e*h+n*g,a=e*u+n*s;return[QE(r,i)*VE,QE(a,uM(i*i+r*r))*VE]}:function(){return[e*VE,i*VE]};return m.distance=d,m}const PO=t=>t;var jO,BO,DO,zO,NO=new Zt,RO=new Zt,FO={point:fM,lineStart:fM,lineEnd:fM,polygonStart:function(){FO.lineStart=LO,FO.lineEnd=GO},polygonEnd:function(){FO.lineStart=FO.lineEnd=FO.point=fM,NO.add(XE(RO)),RO=new Zt},result:function(){var t=NO/2;return NO=new Zt,t}};function LO(){FO.point=IO}function IO(t,n){FO.point=HO,jO=DO=t,BO=zO=n}function HO(t,n){RO.add(zO*t-DO*n),DO=t,zO=n}function GO(){HO(jO,BO)}const KO=FO;var UO=1/0,qO=UO,WO=-UO,YO=WO;const VO={point:function(t,n){tWO&&(WO=t);nYO&&(YO=n)},lineStart:fM,lineEnd:fM,polygonStart:fM,polygonEnd:fM,result:function(){var t=[[UO,qO],[WO,YO]];return WO=YO=-(qO=UO=1/0),t}};var ZO,XO,JO,QO,$O=0,tP=0,nP=0,eP=0,iP=0,rP=0,aP=0,oP=0,uP=0,lP={point:sP,lineStart:cP,lineEnd:gP,polygonStart:function(){lP.lineStart=dP,lP.lineEnd=pP},polygonEnd:function(){lP.point=sP,lP.lineStart=cP,lP.lineEnd=gP},result:function(){var t=uP?[aP/uP,oP/uP]:rP?[eP/rP,iP/rP]:nP?[$O/nP,tP/nP]:[NaN,NaN];return $O=tP=nP=eP=iP=rP=aP=oP=uP=0,t}};function sP(t,n){$O+=t,tP+=n,++nP}function cP(){lP.point=hP}function hP(t,n){lP.point=fP,sP(JO=t,QO=n)}function fP(t,n){var e=t-JO,i=n-QO,r=uM(e*e+i*i);eP+=r*(JO+t)/2,iP+=r*(QO+n)/2,rP+=r,sP(JO=t,QO=n)}function gP(){lP.point=sP}function dP(){lP.point=mP}function pP(){_P(ZO,XO)}function mP(t,n){lP.point=_P,sP(ZO=JO=t,XO=QO=n)}function _P(t,n){var e=t-JO,i=n-QO,r=uM(e*e+i*i);eP+=r*(JO+t)/2,iP+=r*(QO+n)/2,rP+=r,aP+=(r=QO*t-JO*n)*(JO+t),oP+=r*(QO+n),uP+=3*r,sP(JO=t,QO=n)}const yP=lP;function vP(t){this._context=t}vP.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,YE)}},result:fM};var bP,wP,SP,xP,kP,CP=new Zt,AP={point:fM,lineStart:function(){AP.point=EP},lineEnd:function(){bP&&MP(wP,SP),AP.point=fM},polygonStart:function(){bP=!0},polygonEnd:function(){bP=null},result:function(){var t=+CP;return CP=new Zt,t}};function EP(t,n){AP.point=MP,wP=xP=t,SP=kP=n}function MP(t,n){xP-=t,kP-=n,CP.add(uM(xP*xP+kP*kP)),xP=t,kP=n}const TP=AP;let OP,PP,jP,BP;class DP{constructor(t){this._append=null==t?zP:function(t){const n=Math.floor(t);if(!(n>=0))throw new RangeError("invalid digits: ".concat(t));if(n>15)return zP;if(n!==OP){const t=10**n;OP=n,PP=function(n){let e=1;this._+=n[0];for(const i=n.length;e4*n&&p--){var b=o+f,w=u+g,S=l+d,x=uM(b*b+w*w+S*S),k=cM(S/=x),C=XE(XE(S)-1)n||XE((_*T+y*O)/v-.5)>.3||o*f+u*g+l*d2?t[2]%360*ZE:0,T()):[m*VE,_*VE,y*VE]},E.angle=function(t){return arguments.length?(v=t%360*ZE,T()):v*VE},E.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(o=qP(u,A=t*t),O()):uM(A)},E.fitExtent=function(t,n){return LP(E,t,n)},E.fitSize=function(t,n){return IP(E,t,n)},E.fitWidth=function(t,n){return HP(E,t,n)},E.fitHeight=function(t,n){return GP(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&M,T()}}function XP(t){var n=0,e=UE/3,i=ZP(t),r=i(n,e);return r.parallels=function(t){return arguments.length?i(n=t[0]*ZE,e=t[1]*ZE):[n*VE,e*VE]},r}function JP(t,n){var e=aM(t),i=(e+aM(n))/2;if(XE(i)0?n<-qE+GE&&(n=-qE+GE):n>qE-GE&&(n=qE-GE);var e=r/rM(oj(n),i);return[e*aM(i*t),r-e*$E(i*t)]}return a.invert=function(t,n){var e=r-n,a=oM(i)*uM(t*t+e*e),o=QE(t,XE(e))*oM(e);return e*i<0&&(o-=UE*oM(t)*oM(e)),[o/i,2*JE(rM(r/a,1/i))-qE]},a}function lj(t,n){return[t,n]}function sj(){return VP(lj).scale(152.63)}function cj(t,n){var e=$E(t),i=t===n?aM(t):(e-$E(n))/(n-t),r=e/i+t;if(XE(i)GE&&--r>0);return[t/(.8707+(a=i*i)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),i]},bj.invert=nj(cM),Sj.invert=nj((function(t){return 2*JE(t)})),xj.invert=function(t,n){return[-n,2*JE(nM(t))-qE]};const kj=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:$P,geoAlbersUsa:function(){var t,n,e,i,r,a,o=$P(),u=QP().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=QP().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){a=[t,n]}};function c(t){var n=t[0],o=t[1];return a=null,e.point(n,o),a||(i.point(n,o),a)||(r.point(n,o),a)}function h(){return t=n=null,c}return c.invert=function(t){var n=o.scale(),e=o.translate(),i=(t[0]-e[0])/n,r=(t[1]-e[1])/n;return(r>=.12&&r<.234&&i>=-.425&&i<-.214?u:r>=.166&&r<.234&&i>=-.214&&i<-.115?l:o).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=0))throw new RangeError("invalid digits: ".concat(t));r=n}return null===n&&(i=new DP(r)),o},o.projection(t).digits(r).context(n)},geoProjection:VP,geoProjectionMutator:ZP,geoRotation:GT,geoStereographic:function(){return VP(Sj).scale(250).clipAngle(142)},geoStereographicRaw:Sj,geoStream:yM,geoTransform:function(t){return{stream:NP(t)}},geoTransverseMercator:function(){var t=aj(xj),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:xj},Symbol.toStringTag,{value:"Module"}));var Cj=Math.abs,Aj=Math.atan,Ej=Math.atan2,Mj=Math.cos,Tj=Math.exp,Oj=Math.floor,Pj=Math.log,jj=Math.max,Bj=Math.min,Dj=Math.pow,zj=Math.round,Nj=Math.sign||function(t){return t>0?1:t<0?-1:0},Rj=Math.sin,Fj=Math.tan,Lj=1e-6,Ij=1e-12,Hj=Math.PI,Gj=Hj/2,Kj=Hj/4,Uj=Math.SQRT1_2,qj=Qj(2),Wj=Qj(Hj),Yj=2*Hj,Vj=180/Hj,Zj=Hj/180;function Xj(t){return t>1?Gj:t<-1?-Gj:Math.asin(t)}function Jj(t){return t>1?0:t<-1?Hj:Math.acos(t)}function Qj(t){return t>0?Math.sqrt(t):0}function $j(t){return(Tj(t)-Tj(-t))/2}function tB(t){return(Tj(t)+Tj(-t))/2}function nB(t){var n=Fj(t/2),e=2*Pj(Mj(t/2))/(n*n);function i(t,n){var i=Mj(t),r=Mj(n),a=Rj(n),o=r*i,u=-((1-o?Pj((1+o)/2)/(1-o):-.5)+e/(1+o));return[u*r*Rj(t),u*a]}return i.invert=function(n,i){var r,a=Qj(n*n+i*i),o=-t/2,u=50;if(!a)return[0,0];do{var l=o/2,s=Mj(l),c=Rj(l),h=c/s,f=-Pj(Cj(s));o-=r=(2/h*f-e*h-a)/(-f/(c*c)+1-e/(2*s*s))*(s<0?.7:1)}while(Cj(r)>Lj&&--u>0);var g=Rj(o);return[Ej(n*g,a*Mj(o)),Xj(i*g/a)]},i}function eB(t,n){var e=Mj(n),i=function(t){return t?t/Math.sin(t):1}(Jj(e*Mj(t/=2)));return[2*e*Rj(t)*i,Rj(n)*i]}function iB(t){var n=Rj(t),e=Mj(t),i=t>=0?1:-1,r=Fj(i*t),a=(1+n-e)/2;function o(t,o){var u=Mj(o),l=Mj(t/=2);return[(1+u)*Rj(t),(i*o>-Ej(l,r)-.001?0:10*-i)+a+Rj(o)*e-(1+u)*n*l]}return o.invert=function(t,o){var u=0,l=0,s=50;do{var c=Mj(u),h=Rj(u),f=Mj(l),g=Rj(l),d=1+f,p=d*h-t,m=a+g*e-d*n*c-o,_=d*c/2,y=-h*g,v=n*d*h/2,b=e*f+n*c*g,w=y*v-b*_,S=(m*y-p*b)/w/2,x=(p*v-m*_)/w;Cj(x)>2&&(x/=2),u-=S,l-=x}while((Cj(S)>Lj||Cj(x)>Lj)&&--s>0);return i*l>-Ej(Mj(u),r)-.001?[2*u,l]:null},o}function rB(t,n){var e=Fj(n/2),i=Qj(1-e*e),r=1+i*Mj(t/=2),a=Rj(t)*i/r,o=e/r,u=a*a,l=o*o;return[4/3*a*(3+u-3*l),4/3*o*(3+3*u-l)]}eB.invert=function(t,n){if(!(t*t+4*n*n>Hj*Hj+Lj)){var e=t,i=n,r=25;do{var a,o=Rj(e),u=Rj(e/2),l=Mj(e/2),s=Rj(i),c=Mj(i),h=Rj(2*i),f=s*s,g=c*c,d=u*u,p=1-g*l*l,m=p?Jj(c*l)*Qj(a=1/p):a=0,_=2*m*c*u-t,y=m*s-n,v=a*(g*d+m*c*l*f),b=a*(.5*o*h-2*m*s*u),w=.25*a*(h*u-m*s*g*o),S=a*(f*l+m*d*c),x=b*w-S*v;if(!x)break;var k=(y*b-_*S)/x,C=(_*w-y*v)/x;e-=k,i-=C}while((Cj(k)>Lj||Cj(C)>Lj)&&--r>0);return[e,i]}},rB.invert=function(t,n){if(n*=3/8,!(t*=3/8)&&Cj(n)>1)return null;var e=1+t*t+n*n,i=Qj((e-Qj(e*e-4*n*n))/2),r=Xj(i)/3,a=i?function(t){return Pj(t+Qj(t*t-1))}(Cj(n/i))/3:function(t){return Pj(t+Qj(t*t+1))}(Cj(t))/3,o=Mj(r),u=tB(a),l=u*u-o*o;return[2*Nj(t)*Ej($j(a)*o,.25-l),2*Nj(n)*Ej(u*Rj(r),.25+l)]};var aB=Qj(8),oB=Pj(1+qj);function uB(t,n){var e=Cj(n);return eGj){var r=Ej(i[1],i[0]),a=Qj(i[0]*i[0]+i[1]*i[1]),o=n*zj((r-Gj)/n)+Gj,u=Ej(Rj(r-=o),2-Mj(r));r=o+Xj(Hj/a*Rj(u))-u,i[0]=a*Mj(r),i[1]=a*Rj(r)}return i}return e.invert=function(t,e){var i=Qj(t*t+e*e);if(i>Gj){var r=Ej(e,t),a=n*zj((r-Gj)/n)+Gj,o=r>a?-1:1,u=i*Mj(a-r),l=1/Fj(o*Jj((u-Hj)/Qj(Hj*(Hj-2*u)+i*i)));r=a+2*Aj((l+o*Qj(l*l-3))/3),t=i*Mj(r),e=i*Rj(r)}return ij.invert(t,e)},e}function sB(t,n){if(arguments.length<2&&(n=t),1===n)return ej;if(n===1/0)return cB;function e(e,i){var r=ej(e/n,i);return r[0]*=t,r}return e.invert=function(e,i){var r=ej.invert(e/t,i);return r[0]*=n,r},e}function cB(t,n){return[t*Mj(n)/Mj(n/=2),2*Rj(n)]}function hB(t,n,e){var i,r,a,o=100;e=void 0===e?0:+e,n=+n;do{(r=t(e))===(a=t(e+Lj))&&(a=r+Lj),e-=i=-1*Lj*(r-n)/(r-a)}while(o-- >0&&Cj(i)>Lj);return o<0?NaN:e}function fB(t,n,e){return void 0===n&&(n=40),void 0===e&&(e=Ij),function(i,r,a,o){var u,l,s;a=void 0===a?0:+a,o=void 0===o?0:+o;for(var c=0;cu)a-=l/=2,o-=s/=2;else{u=d;var p=(a>0?-1:1)*e,m=(o>0?-1:1)*e,_=t(a+p,o),y=t(a,o+m),v=(_[0]-h[0])/p,b=(_[1]-h[1])/p,w=(y[0]-h[0])/m,S=(y[1]-h[1])/m,x=S*v-b*w,k=(Cj(x)<.5?.5:1)/x;if(a+=l=(g*w-f*S)*k,o+=s=(f*b-g*v)*k,Cj(l)0&&(r[1]*=1+a/1.5*r[0]*r[0]),r}return n.invert=fB(n),n}function dB(t,n){var e,i=t*Rj(n),r=30;do{n-=e=(n+Rj(n)-i)/(1+Mj(n))}while(Cj(e)>Lj&&--r>0);return n/2}function pB(t,n,e){function i(i,r){return[t*i*Mj(r=dB(e,r)),n*Rj(r)]}return i.invert=function(i,r){return r=Xj(r/n),[i/(t*Mj(r)),Xj((2*r+Rj(2*r))/e)]},i}uB.invert=function(t,n){if((i=Cj(n))Ij&&--a>0);return[t/(Mj(r)*(aB-1/Rj(r))),Nj(n)*r]},cB.invert=function(t,n){var e=2*Xj(n/2);return[t*Mj(e/2)/Mj(e),e]};var mB=pB(qj/Gj,qj,Hj);var _B=2.00276,yB=1.11072;function vB(t,n){var e=dB(Hj,n);return[_B*t/(1/Mj(n)+yB/Mj(e)),(n+qj*Rj(e))/_B]}function bB(t){var n=0,e=ZP(t),i=e(n);return i.parallel=function(t){return arguments.length?e(n=t*Zj):n*Vj},i}function wB(t,n){return[t*Mj(n),n]}function SB(t){if(!t)return wB;var n=1/Fj(t);function e(e,i){var r=n+t-i,a=r?e*Mj(i)/r:r;return[r*Rj(a),n-r*Mj(a)]}return e.invert=function(e,i){var r=Qj(e*e+(i=n-i)*i),a=n+t-r;return[r/Mj(a)*Ej(e,i),a]},e}function xB(t){function n(n,e){var i=Gj-e,r=i?n*t*Rj(i)/i:i;return[i*Rj(r)/t,Gj-i*Mj(r)]}return n.invert=function(n,e){var i=n*t,r=Gj-e,a=Qj(i*i+r*r),o=Ej(i,r);return[(a?a/Rj(a):1)*o/t,Gj-a]},n}vB.invert=function(t,n){var e,i,r=_B*n,a=n<0?-Kj:Kj,o=25;do{i=r-qj*Rj(a),a-=e=(Rj(2*a)+2*a-Hj*Rj(i))/(2*Mj(2*a)+2+Hj*Mj(i)*qj*Mj(a))}while(Cj(e)>Lj&&--o>0);return i=r-qj*Rj(a),[t*(1/Mj(i)+yB/Mj(a))/_B,i]},wB.invert=function(t,n){return[t/Mj(n),n]};var kB=pB(1,4/Hj,Hj);function CB(t,n,e,i,r,a){var o,u=Mj(a);if(Cj(t)>1||Cj(a)>1)o=Jj(e*r+n*i*u);else{var l=Rj(t/2),s=Rj(a/2);o=2*Xj(Qj(l*l+n*i*s*s))}return Cj(o)>Lj?[o,Ej(i*Rj(a),n*r-e*i*u)]:[0,0]}function AB(t,n,e){return Jj((t*t+n*n-e*e)/(2*t*n))}function EB(t){return t-2*Hj*Oj((t+Hj)/(2*Hj))}function MB(t,n,e){for(var i,r=[[t[0],t[1],Rj(t[1]),Mj(t[1])],[n[0],n[1],Rj(n[1]),Mj(n[1])],[e[0],e[1],Rj(e[1]),Mj(e[1])]],a=r[2],o=0;o<3;++o,a=i)i=r[o],a.v=CB(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var u=AB(r[0].v[0],r[2].v[0],r[1].v[0]),l=AB(r[0].v[0],r[1].v[0],r[2].v[0]),s=Hj-u;r[2].point[1]=0,r[0].point[0]=-(r[1].point[0]=r[0].v[0]/2);var c=[r[2].point[0]=r[0].point[0]+r[2].v[0]*Mj(u),2*(r[0].point[1]=r[1].point[1]=r[2].v[0]*Rj(u))];return function(t,n){var e,i=Rj(n),a=Mj(n),o=new Array(3);for(e=0;e<3;++e){var u=r[e];if(o[e]=CB(n-u[1],u[3],u[2],a,i,t-u[0]),!o[e][0])return u.point;o[e][1]=EB(o[e][1]-u.v[1])}var h=c.slice();for(e=0;e<3;++e){var f=2==e?0:e+1,g=AB(r[e].v[0],o[e][0],o[f][0]);o[e][1]<0&&(g=-g),e?1==e?(g=l-g,h[0]-=o[e][0]*Mj(g),h[1]-=o[e][0]*Rj(g)):(g=s-g,h[0]+=o[e][0]*Mj(g),h[1]+=o[e][0]*Rj(g)):(h[0]+=o[e][0]*Mj(g),h[1]-=o[e][0]*Rj(g))}return h[0]/=3,h[1]/=3,h}}function TB(t){return t[0]*=Zj,t[1]*=Zj,t}function OB(t,n,e){var i=DT({type:"MultiPoint",coordinates:[t,n,e]}),r=[-i[0],-i[1]],a=GT(r),o=MB(TB(a(t)),TB(a(n)),TB(a(e)));o.invert=fB(o);var u=VP(o).rotate(r),l=u.center;return delete u.rotate,u.center=function(t){return arguments.length?l(a(t)):a.invert(l())},u.clipAngle(90)}function PB(t,n){var e=Qj(1-Rj(n));return[2/Wj*t*e,Wj*(1-e)]}function jB(t){var n=Fj(t);function e(t,e){return[t,(t?t/Rj(t):1)*(Rj(e)*Mj(t)-n*Mj(e))]}return e.invert=n?function(t,e){t&&(e*=Rj(t)/t);var i=Mj(t);return[t,2*Ej(Qj(i*i+n*n-e*e)-i,n-e)]}:function(t,n){return[t,Xj(t?n*Fj(t)/t:n)]},e}PB.invert=function(t,n){var e=(e=n/Wj-1)*e;return[e>0?t*Qj(Hj/e)/2:0,Xj(1-e)]};var BB=Qj(3);function DB(t,n){return[BB*t*(2*Mj(2*n/3)-1)/Wj,BB*Wj*Rj(n/3)]}function zB(t){var n=Mj(t);function e(t,e){return[t*n,Rj(e)/n]}return e.invert=function(t,e){return[t/n,Xj(e*n)]},e}function NB(t){var n=Mj(t);function e(t,e){return[t*n,(1+n)*Fj(e/2)]}return e.invert=function(t,e){return[t/n,2*Aj(e/(1+n))]},e}function RB(t,n){var e=Qj(8/(3*Hj));return[e*t*(1-Cj(n)/Hj),e*n]}function FB(t,n){var e=Qj(4-3*Rj(Cj(n)));return[2/Qj(6*Hj)*t*e,Nj(n)*Qj(2*Hj/3)*(2-e)]}function LB(t,n){var e=Qj(Hj*(4+Hj));return[2/e*t*(1+Qj(1-4*n*n/(Hj*Hj))),4/e*n]}function IB(t,n){var e=(2+Gj)*Rj(n);n/=2;for(var i=0,r=1/0;i<10&&Cj(r)>Lj;i++){var a=Mj(n);n-=r=(n+Rj(n)*(a+2)-e)/(2*a*(1+a))}return[2/Qj(Hj*(4+Hj))*t*(1+Mj(n)),2*Qj(Hj/(4+Hj))*Rj(n)]}function HB(t,n){return[t*(1+Mj(n))/Qj(2+Hj),2*n/Qj(2+Hj)]}function GB(t,n){for(var e=(1+Gj)*Rj(n),i=0,r=1/0;i<10&&Cj(r)>Lj;i++)n-=r=(n+Rj(n)-e)/(1+Mj(n));return e=Qj(2+Hj),[t*(1+Mj(n))/e,2*n/e]}DB.invert=function(t,n){var e=3*Xj(n/(BB*Wj));return[Wj*t/(BB*(2*Mj(2*e/3)-1)),e]},RB.invert=function(t,n){var e=Qj(8/(3*Hj)),i=n/e;return[t/(e*(1-Cj(i)/Hj)),i]},FB.invert=function(t,n){var e=2-Cj(n)/Qj(2*Hj/3);return[t*Qj(6*Hj)/(2*e),Nj(n)*Xj((4-e*e)/3)]},LB.invert=function(t,n){var e=Qj(Hj*(4+Hj))/2;return[t*e/(1+Qj(1-n*n*(4+Hj)/(4*Hj))),n*e/2]},IB.invert=function(t,n){var e=n*Qj((4+Hj)/Hj)/2,i=Xj(e),r=Mj(i);return[t/(2/Qj(Hj*(4+Hj))*(1+r)),Xj((i+e*(r+2))/(2+Gj))]},HB.invert=function(t,n){var e=Qj(2+Hj),i=n*e/2;return[e*t/(1+Mj(i)),i]},GB.invert=function(t,n){var e=1+Gj,i=Qj(e/2);return[2*t*i/(1+Mj(n*=i)),Xj((n+Rj(n))/e)]};var KB=3+2*qj;function UB(t,n){var e=Rj(t/=2),i=Mj(t),r=Qj(Mj(n)),a=Mj(n/=2),o=Rj(n)/(a+qj*i*r),u=Qj(2/(1+o*o)),l=Qj((qj*a+(i+e)*r)/(qj*a+(i-e)*r));return[KB*(u*(l-1/l)-2*Pj(l)),KB*(u*o*(l+1/l)-2*Aj(o))]}UB.invert=function(t,n){if(!(e=rB.invert(t/1.2,1.065*n)))return null;var e,i=e[0],r=e[1],a=20;t/=KB,n/=KB;do{var o=i/2,u=r/2,l=Rj(o),s=Mj(o),c=Rj(u),h=Mj(u),f=Mj(r),g=Qj(f),d=c/(h+qj*s*g),p=d*d,m=Qj(2/(1+p)),_=(qj*h+(s+l)*g)/(qj*h+(s-l)*g),y=Qj(_),v=y-1/y,b=y+1/y,w=m*v-2*Pj(y)-t,S=m*d*b-2*Aj(d)-n,x=c&&Uj*g*l*p/c,k=(qj*s*h+g)/(2*(h+qj*s*g)*(h+qj*s*g)*g),C=-.5*d*m*m*m,A=C*x,E=C*k,M=(M=2*h+qj*g*(s-l))*M*y,T=(qj*s*h*g+f)/M,O=-qj*l*c/(g*M),P=v*A-2*T/y+m*(T+T/_),j=v*E-2*O/y+m*(O+O/_),B=d*b*A-2*x/(1+p)+m*b*x+m*d*(T-T/_),D=d*b*E-2*k/(1+p)+m*b*k+m*d*(O-O/_),z=j*B-D*P;if(!z)break;var N=(S*j-w*D)/z,R=(w*B-S*P)/z;i-=N,r=jj(-Gj,Bj(Gj,r-R))}while((Cj(N)>Lj||Cj(R)>Lj)&&--a>0);return Cj(Cj(r)-Gj)i){var s=Qj(l),c=Ej(u,o),h=e*zj(c/e),f=c-h,g=t*Mj(f),d=(t*Rj(f)-f*Rj(g))/(Gj-g),p=QB(f,d),m=(Hj-t)/$B(p,g,Hj);o=s;var _,y=50;do{o-=_=(t+$B(p,g,o)*m-s)/(p(o)*m)}while(Cj(_)>Lj&&--y>0);u=f*Rj(o),oi){var o=Qj(a),u=Ej(r,n),l=e*zj(u/e),s=u-l;n=o*Mj(s),r=o*Rj(s);for(var c=n-Gj,h=Rj(n),f=r/h,g=nLj||Cj(h)>Lj)&&--d>0);return[f,g]},l}WB.invert=function(t,n){var e=n/(1+qB);return[t&&t/(qB*Qj(1-e*e)),2*Aj(e)]},YB.invert=function(t,n){var e=Aj(n/Wj),i=Mj(e),r=2*e;return[t*Wj/2/(Mj(r)*i*i),r]};var nD=tD(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var eD=tD(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var iD=tD(5/6*Hj,-.62636,-.0344,0,1.3493,-.05524,0,.045);function rD(t,n){var e=t*t,i=n*n;return[t*(1-.162388*i)*(.87-952426e-9*e*e),n*(1+i/12)]}rD.invert=function(t,n){var e,i=t,r=n,a=50;do{var o=r*r;r-=e=(r*(1+o/12)-n)/(1+o/4)}while(Cj(e)>Lj&&--a>0);a=50,t/=1-.162388*o;do{var u=(u=i*i)*u;i-=e=(i*(.87-952426e-9*u)-t)/(.87-.00476213*u)}while(Cj(e)>Lj&&--a>0);return[i,r]};var aD=tD(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function oD(t){var n=t(Gj,0)[0]-t(-Gj,0)[0];function e(e,i){var r=e>0?-.5:.5,a=t(e+r*Hj,i);return a[0]-=r*n,a}return t.invert&&(e.invert=function(e,i){var r=e>0?-.5:.5,a=t.invert(e+r*n,i),o=a[0]-r*Hj;return o<-Hj?o+=2*Hj:o>Hj&&(o-=2*Hj),a[0]=o,a}),e}function uD(t,n){var e=Nj(t),i=Nj(n),r=Mj(n),a=Mj(t)*r,o=Rj(t)*r,u=Rj(i*n);t=Cj(Ej(o,u)),n=Xj(a),Cj(t-Gj)>Lj&&(t%=Gj);var l=function(t,n){if(n===Gj)return[0,0];var e,i,r=Rj(n),a=r*r,o=a*a,u=1+o,l=1+3*o,s=1-o,c=Xj(1/Qj(u)),h=s+a*u*c,f=(1-r)/h,g=Qj(f),d=f*u,p=Qj(d),m=g*s;if(0===t)return[0,-(m+a*p)];var _,y=Mj(n),v=1/y,b=2*r*y,w=(-3*a+c*l)*b,S=(-h*y-(1-r)*w)/(h*h),x=-v*b,k=-v*(a*u*S+f*l*b),C=-2*v*(s*(.5*S/g)-2*a*g*b),A=4*t/Hj;if(t>.222*Hj||n.175*Hj){if(e=(m+a*Qj(d*(1+o)-m*m))/(1+o),t>Hj/4)return[e,e];var E=e,M=.5*e;e=.5*(M+E),i=50;do{var T=e*(C+x*Qj(d-e*e))+k*Xj(e/p)-A;if(!T)break;T<0?M=e:E=e,e=.5*(M+E)}while(Cj(E-M)>Lj&&--i>0)}else{e=Lj,i=25;do{var O=e*e,P=Qj(d-O),j=C+x*P,B=e*j+k*Xj(e/p)-A;e-=_=P?B/(j+(k-x*O)/P):0}while(Cj(_)>Lj&&--i>0)}return[e,-m-a*Qj(d-e*e)]}(t>Hj/4?Gj-t:t,n);return t>Hj/4&&(u=l[0],l[0]=-l[1],l[1]=-u),l[0]*=e,l[1]*=-i,l}function lD(t,n){var e,i,r,a,o,u;if(n=1-Lj)return e=(1-n)/4,r=1/(i=tB(t)),[(a=((u=Tj(2*(u=t)))-1)/(u+1))+e*((o=i*$j(t))-t)/(i*i),r-e*a*r*(o-t),r+e*a*r*(o+t),2*Aj(Tj(t))-Gj+e*(o-t)/i];var l=[1,0,0,0,0,0,0,0,0],s=[Qj(n),0,0,0,0,0,0,0,0],c=0;for(i=Qj(1-n),o=1;Cj(s[c]/l[c])>Lj&&c<8;)e=l[c++],s[c]=(e-i)/2,l[c]=(e+i)/2,i=Qj(e*i),o*=2;r=o*l[c]*t;do{r=(Xj(a=s[c]*Rj(i=r)/l[c])+r)/2}while(--c);return[Rj(r),a=Mj(r),a/Mj(r-i),r]}function sD(t,n){if(!n)return t;if(1===n)return Pj(Fj(t/2+Kj));for(var e=1,i=Qj(1-n),r=Qj(n),a=0;Cj(r)>Lj;a++){if(t%Hj){var o=Aj(i*Fj(t)/e);o<0&&(o+=Hj),t+=o+~~(t/Hj)*Hj}else t+=t;r=(e+i)/2,i=Qj(e*i),r=((e=r)-i)/2}return t/(Dj(2,a)*e)}function cD(t,n){var e=(qj-1)/(qj+1),i=Qj(1-e*e),r=sD(Gj,i*i),a=Pj(Fj(Hj/4+Cj(n)/2)),o=Tj(-1*a)/Qj(e),u=function(t,n){var e=t*t,i=n+1,r=1-e-n*n;return[.5*((t>=0?Gj:-Gj)-Ej(r,2*t)),-.25*Pj(r*r+4*e)+.5*Pj(i*i+e)]}(o*Mj(-1*t),o*Rj(-1*t)),l=function(t,n,e){var i=Cj(t),r=$j(Cj(n));if(i){var a=1/Rj(i),o=1/(Fj(i)*Fj(i)),u=-(o+e*(r*r*a*a)-1+e),l=(-u+Qj(u*u-(e-1)*o*4))/2;return[sD(Aj(1/Qj(l)),e)*Nj(t),sD(Aj(Qj((l/o-1)/e)),1-e)*Nj(n)]}return[0,sD(Aj(r),1-e)*Nj(n)]}(u[0],u[1],i*i);return[-l[1],(n>=0?1:-1)*(.5*r-l[0])]}function hD(t){var n=Rj(t),e=Mj(t),i=fD(t);function r(t,r){var a=i(t,r);t=a[0],r=a[1];var o=Rj(r),u=Mj(r),l=Mj(t),s=Jj(n*o+e*u*l),c=Rj(s),h=Cj(c)>Lj?s/c:1;return[h*e*Rj(t),(Cj(t)>Gj?h:-h)*(n*u-e*o*l)]}return i.invert=fD(-t),r.invert=function(t,e){var r=Qj(t*t+e*e),a=-Rj(r),o=Mj(r),u=r*o,l=-e*a,s=r*n,c=Qj(u*u+l*l-s*s),h=Ej(u*s+l*c,l*s-u*c),f=(r>Gj?-1:1)*Ej(t*a,r*Mj(h)*o+e*Rj(h)*a);return i.invert(f,h)},r}function fD(t){var n=Rj(t),e=Mj(t);return function(t,i){var r=Mj(i),a=Mj(t)*r,o=Rj(t)*r,u=Rj(i);return[Ej(o,a*e-u*n),Xj(u*e+a*n)]}}uD.invert=function(t,n){Cj(t)>1&&(t=2*Nj(t)-t),Cj(n)>1&&(n=2*Nj(n)-n);var e=Nj(t),i=Nj(n),r=-e*t,a=-i*n,o=a/r<1,u=function(t,n){var e=0,i=1,r=.5,a=50;for(;;){var o=r*r,u=Qj(r),l=Xj(1/Qj(1+o)),s=1-o+r*(1+o)*l,c=(1-u)/s,h=Qj(c),f=c*(1+o),g=h*(1-o),d=Qj(f-t*t),p=n+g+r*d;if(Cj(i-e)0?e=r:i=r,r=.5*(e+i)}if(!a)return null;var m=Xj(u),_=Mj(m),y=1/_,v=2*u*_,b=(-s*_-(-3*r+l*(1+3*o))*v*(1-u))/(s*s),w=.5*b/h,S=(1-o)*w-2*r*h*v;return[Hj/4*(t*(-2*y*S+-y*v*d)+-y*(r*(1+o)*b+c*(1+3*o)*v)*Xj(t/Qj(f))),m]}(o?a:r,o?r:a),l=u[0],s=u[1],c=Mj(s);return o&&(l=-Gj-l),[e*(Ej(Rj(l)*c,-Rj(s))+Hj),i*Xj(Mj(l)*c)]},cD.invert=function(t,n){var e,i,r,a,o,u,l=(qj-1)/(qj+1),s=Qj(1-l*l),c=sD(Gj,s*s),h=(i=-t,r=s*s,(e=.5*c-n)?(a=lD(e,r),i?(u=(o=lD(i,1-r))[1]*o[1]+r*a[0]*a[0]*o[0]*o[0],[[a[0]*o[2]/u,a[1]*a[2]*o[0]*o[1]/u],[a[1]*o[1]/u,-a[0]*a[2]*o[0]*o[2]/u],[a[2]*o[1]*o[2]/u,-r*a[0]*a[1]*o[0]/u]]):[[a[0],0],[a[1],0],[a[2],0]]):[[0,(o=lD(i,1-r))[0]/o[1]],[1/o[1],0],[o[2]/o[1],0]]),f=function(t,n){var e=n[0]*n[0]+n[1]*n[1];return[(t[0]*n[0]+t[1]*n[1])/e,(t[1]*n[0]-t[0]*n[1])/e]}(h[0],h[1]);return[Ej(f[1],f[0])/-1,2*Aj(Tj(-.5*Pj(l*f[0]*f[0]+l*f[1]*f[1])))-Gj]};var gD=Xj(1-1/3)*Vj,dD=zB(0);function pD(t){var n=gD*Zj,e=PB(Hj,n)[0]-PB(-Hj,n)[0],i=dD(0,n)[1],r=PB(0,n)[1],a=Wj-r,o=Yj/t,u=4/Yj,l=i+a*a*4/Yj;function s(s,c){var h,f=Cj(c);if(f>n){var g=Bj(t-1,jj(0,Oj((s+Hj)/o)));(h=PB(s+=Hj*(t-1)/t-g*o,f))[0]=h[0]*Yj/e-Yj*(t-1)/(2*t)+g*Yj/t,h[1]=i+4*(h[1]-r)*a/Yj,c<0&&(h[1]=-h[1])}else h=dD(s,c);return h[0]*=u,h[1]/=l,h}return s.invert=function(n,s){n/=u;var c=Cj(s*=l);if(c>i){var h=Bj(t-1,jj(0,Oj((n+Hj)/o)));n=(n+Hj*(t-1)/t-h*o)*e/Yj;var f=PB.invert(n,.25*(c-i)*Yj/a+r);return f[0]-=Hj*(t-1)/t-h*o,s<0&&(f[1]=-f[1]),f}return dD.invert(n,s)},s}function mD(t,n){return[t,1&n?90-Lj:gD]}function _D(t,n){return[t,1&n?-90+Lj:-gD]}function yD(t){return[t[0]*(1-Lj),t[1]]}function vD(t){var n,e=1+t,i=Xj(Rj(1/e)),r=2*Qj(Hj/(n=Hj+4*i*e)),a=.5*r*(e+Qj(t*(2+t))),o=t*t,u=e*e;function l(l,s){var c,h,f=1-Rj(s);if(f&&f<2){var g,d=Gj-s,p=25;do{var m=Rj(d),_=Mj(d),y=i+Ej(m,e-_),v=1+u-2*e*_;d-=g=(d-o*i-e*m+v*y-.5*f*n)/(2*e*m*y)}while(Cj(g)>Ij&&--p>0);c=r*Qj(v),h=l*y/Hj}else c=r*(t+f),h=l*i/Hj;return[c*Rj(h),a-c*Mj(h)]}return l.invert=function(t,l){var s=t*t+(l-=a)*l,c=(1+u-s/(r*r))/(2*e),h=Jj(c),f=Rj(h),g=i+Ej(f,e-c);return[Xj(t/Qj(s))*Hj/g,Xj(1-2*(h-o*i-e*f+(1+u-2*e*c)*g)/n)]},l}var bD=.7109889596207567,wD=.0528035274542;function SD(t,n){return n>-bD?((t=mB(t,n))[1]+=wD,t):wB(t,n)}function xD(t,n){return Cj(n)>bD?((t=mB(t,n))[1]-=n>0?wD:-wD,t):wB(t,n)}function kD(t,n,e,i){var r=Qj(4*Hj/(2*e+(1+t-n/2)*Rj(2*e)+(t+n)/2*Rj(4*e)+n/2*Rj(6*e))),a=Qj(i*Rj(e)*Qj((1+t*Mj(2*e)+n*Mj(4*e))/(1+t+n))),o=e*l(1);function u(e){return Qj(1+t*Mj(2*e)+n*Mj(4*e))}function l(i){var r=i*e;return(2*r+(1+t-n/2)*Rj(2*r)+(t+n)/2*Rj(4*r)+n/2*Rj(6*r))/e}function s(t){return u(t)*Rj(t)}var c=function(t,n){var i=e*hB(l,o*Rj(n)/e,n/Hj);isNaN(i)&&(i=e*Nj(n));var s=r*u(i);return[s*a*t/Hj*Mj(i),s/a*Rj(i)]};return c.invert=function(t,n){var i=hB(s,n*a/r);return[t*Hj/(Mj(i)*r*a*u(i)),Xj(e*l(i/e)/o)]},0===e&&(r=Qj(i/Hj),(c=function(t,n){return[t*r,Rj(n)/r]}).invert=function(t,n){return[t/r,Xj(n*r)]}),c}function CD(t,n,e,i,r,a,o,u,l,s,c){if(c.nanEncountered)return NaN;var h,f,g,d,p,m,_,y,v,b;if(f=t(n+.25*(h=e-n)),g=t(e-.25*h),isNaN(f))c.nanEncountered=!0;else{if(!isNaN(g))return b=((m=(d=h*(i+4*f+r)/12)+(p=h*(r+4*g+a)/12))-o)/15,s>l?(c.maxDepthCount++,m+b):Math.abs(b)t?e=i:n=i,i=n+e>>1}while(i>n);var r=l[i+1]-l[i];return r&&(r=(t-l[i+1])/r),(i+1+r)/o}var h=2*c(1)/Hj*a/e,f=function(t,n){var e=c(Cj(Rj(n))),r=i(e)*t;return e/=h,[r,n>=0?e:-e]};return f.invert=function(t,n){var e;return Cj(n*=h)<1&&(e=Nj(n)*Xj(r(Cj(n))*a)),[t/i(Cj(n)),e]},f}function MD(t,n){return Cj(t[0]-n[0])a[o][2][0];++o);var l=t(e-a[o][1][0],i);return l[0]+=t(a[o][1][0],r*i>r*a[o][0][1]?a[o][0][1]:i)[0],l}e?a.invert=e(a):t.invert&&(a.invert=function(e,i){for(var o=r[+(i<0)],u=n[+(i<0)],l=0,s=o.length;l=0;--u)e=(n=t[1][u])[0][0],i=n[0][1],r=n[1][1],a=n[2][0],o=n[2][1],l.push(TD([[a-Lj,o-Lj],[a-Lj,r+Lj],[e+Lj,r+Lj],[e+Lj,i-Lj]],30));return{type:"Polygon",coordinates:[_n(l)]}}(e),n=e.map((function(t){return t.map((function(t){return[[t[0][0]*Zj,t[0][1]*Zj],[t[1][0]*Zj,t[1][1]*Zj],[t[2][0]*Zj,t[2][1]*Zj]]}))})),r=n.map((function(n){return n.map((function(n){var e,i=t(n[0][0],n[0][1])[0],r=t(n[2][0],n[2][1])[0],a=t(n[1][0],n[0][1])[1],o=t(n[1][0],n[1][1])[1];return a>o&&(e=a,a=o,o=e),[[i,a],[r,o]]}))})),o):n.map((function(t){return t.map((function(t){return[[t[0][0]*Vj,t[0][1]*Vj],[t[1][0]*Vj,t[1][1]*Vj],[t[2][0]*Vj,t[2][1]*Vj]]}))}))},null!=n&&o.lobes(n),o}SD.invert=function(t,n){return n>-bD?mB.invert(t,n-wD):wB.invert(t,n)},xD.invert=function(t,n){return Cj(n)>bD?mB.invert(t,n+(n>0?wD:-wD)):wB.invert(t,n)};var PD=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var jD=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var BD=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var DD=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var zD=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var ND=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function RD(t,n){return[3/Yj*t*Qj(Hj*Hj/3-n*n),n]}function FD(t){function n(n,e){if(Cj(Cj(e)-Gj)2)return null;var r=(n/=2)*n,a=(e/=2)*e,o=2*e/(1+r+a);return o=Dj((1+o)/(1-o),1/t),[Ej(2*n,1-r-a)/t,Xj((o-1)/(o+1))]},n}RD.invert=function(t,n){return[Yj/3*t/Qj(Hj*Hj/3-n*n),n]};var LD=Hj/qj;function ID(t,n){return[t*(1+Qj(Mj(n)))/2,n/(Mj(n/2)*Mj(t/6))]}function HD(t,n){var e=t*t,i=n*n;return[t*(.975534+i*(-.0143059*e-.119161+-.0547009*i)),n*(1.00384+e*(.0802894+-.02855*i+199025e-9*e)+i*(.0998909+-.0491032*i))]}function GD(t,n){return[Rj(t)/Mj(n),Fj(n)*Mj(t)]}function KD(t){var n=Mj(t),e=Fj(Kj+t/2);function i(i,r){var a=r-t,o=Cj(a)=0;)h=(c=t[s])[0]+u*(r=h)-l*f,f=c[1]+u*f+l*r;return[h=u*(r=h)-l*f,f=u*f+l*r]}return e.invert=function(e,i){var r=20,a=e,o=i;do{for(var u,l=n,s=t[l],c=s[0],h=s[1],f=0,g=0;--l>=0;)f=c+a*(u=f)-o*g,g=h+a*g+o*u,c=(s=t[l])[0]+a*(u=c)-o*h,h=s[1]+a*h+o*u;var d,p,m=(f=c+a*(u=f)-o*g)*f+(g=h+a*g+o*u)*g;a-=d=((c=a*(u=c)-o*h-e)*f+(h=a*h+o*u-i)*g)/m,o-=p=(h*f-c*g)/m}while(Cj(d)+Cj(p)>Lj*Lj&&--r>0);if(r){var _=Qj(a*a+o*o),y=2*Aj(.5*_),v=Rj(y);return[Ej(a*v,_*Mj(y)),_?Xj(o*v/_):0]}},e}ID.invert=function(t,n){var e=Cj(t),i=Cj(n),r=Lj,a=Gj;iLj||Cj(m)>Lj)&&--r>0);return r&&[e,i]},GD.invert=function(t,n){var e=t*t,i=n*n+1,r=e+i,a=t?Uj*Qj((r-Qj(r*r-4*e))/e):1/Qj(i);return[Xj(t*a),Nj(n)*Jj(a)]},UD.invert=function(t,n){return[t,2.5*Aj(Tj(.8*n))-.625*Hj]};var WD=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],YD=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],VD=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ZD=[[.9245,0],[0,0],[.01943,0]],XD=[[.721316,0],[0,0],[-.00881625,-.00617325]];function JD(t,n){var e=VP(qD(t)).rotate(n).clipAngle(90),i=GT(n),r=e.center;return delete e.rotate,e.center=function(t){return arguments.length?r(i(t)):i.invert(r())},e}var QD=Qj(6),$D=Qj(7);function tz(t,n){var e=Xj(7*Rj(n)/(3*QD));return[QD*t*(2*Mj(2*e/3)-1)/$D,9*Rj(e/3)/$D]}function nz(t,n){for(var e,i=(1+Uj)*Rj(n),r=n,a=0;a<25&&(r-=e=(Rj(r/2)+Rj(r)-i)/(.5*Mj(r/2)+Mj(r)),!(Cj(e)Ij&&--u>0);return[t/(.84719-.13063*(i=o*o)+(a=i*(r=i*i))*a*(.05494*i-.04515-.02326*r+.00331*a)),o]},rz.invert=function(t,n){for(var e=n/2,i=0,r=1/0;i<10&&Cj(r)>Lj;++i){var a=Mj(n/2);n-=r=(n-Fj(n/2)-e)/(1-.5/(a*a))}return[2*t/(1+Mj(n)),n]};var az=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oz(t,n){var e=Rj(n),i=Mj(n),r=Nj(t);if(0===t||Cj(n)===Gj)return[0,n];if(0===n)return[t,0];if(Cj(t)===Gj)return[t*i,Gj*e];var a=Hj/(2*t)-2*t/Hj,o=2*n/Hj,u=(1-o*o)/(e-o),l=a*a,s=u*u,c=1+l/s,h=1+s/l,f=(a*e/u-a/2)/c,g=(s*e/l+u/2)/h,d=g*g-(s*e*e/l+u*e-1)/h;return[Gj*(f+Qj(f*f+i*i/c)*r),Gj*(g+Qj(d<0?0:d)*Nj(-n*a)*r)]}oz.invert=function(t,n){var e=(t/=Gj)*t,i=e+(n/=Gj)*n,r=Hj*Hj;return[t?(i-1+Qj((1-i)*(1-i)+4*e))/(2*t)*Gj:0,hB((function(t){return i*(Hj*Rj(t)-2*t)*Hj+4*t*t*(n-Rj(t))+2*Hj*t-r*n}),0)]};var uz=1.0148,lz=.23185,sz=-.14499,cz=.02406,hz=uz,fz=5*lz,gz=7*sz,dz=9*cz,pz=1.790857183;function mz(t,n){var e=n*n;return[t,n*(uz+e*e*(lz+e*(sz+cz*e)))]}function _z(t,n){if(Cj(n)=0;)if(i=n[u],e[0]===i[0]&&e[1]===i[1]){if(a)return[a,e];a=e}}}(n.face,e.face),r=yz(i.map(e.project),i.map(n.project));n.transform=e.transform?vz(e.transform,r):r;for(var a=e.edges,o=0,u=a.length;opz?n=pz:n<-1.790857183&&(n=-1.790857183);var e,i=n;do{var r=i*i;i-=e=(i*(uz+r*r*(lz+r*(sz+cz*r)))-n)/(hz+r*r*(fz+r*(gz+dz*r)))}while(Cj(e)>Lj);return[t,i]},_z.invert=function(t,n){if(Cj(n)Lj&&--a>0);return o=Fj(r),[(Cj(n){};function Dz(t,n){return{type:"FeatureCollection",features:t.features.map((function(t){return zz(t,n)}))}}function zz(t,n){return{type:"Feature",id:t.id,properties:t.properties,geometry:Nz(t.geometry,n)}}function Nz(t,n){if(!t)return null;if("GeometryCollection"===t.type)return function(t,n){return{type:"GeometryCollection",geometries:t.geometries.map((function(t){return Nz(t,n)}))}}(t,n);var e;switch(t.type){case"Point":case"MultiPoint":e=Lz;break;case"LineString":case"MultiLineString":e=Iz;break;case"Polygon":case"MultiPolygon":case"Sphere":e=Hz;break;default:return null}return yM(t,n(e)),e.result()}var Rz=[],Fz=[],Lz={point:function(t,n){Rz.push([t,n])},result:function(){var t=Rz.length?Rz.length<2?{type:"Point",coordinates:Rz[0]}:{type:"MultiPoint",coordinates:Rz}:null;return Rz=[],t}},Iz={lineStart:Bz,point:function(t,n){Rz.push([t,n])},lineEnd:function(){Rz.length&&(Fz.push(Rz),Rz=[])},result:function(){var t=Fz.length?Fz.length<2?{type:"LineString",coordinates:Fz[0]}:{type:"MultiLineString",coordinates:Fz}:null;return Fz=[],t}},Hz={polygonStart:Bz,lineStart:Bz,point:function(t,n){Rz.push([t,n])},lineEnd:function(){var t=Rz.length;if(t){do{Rz.push(Rz[0].slice())}while(++t<4);Fz.push(Rz),Rz=[]}},polygonEnd:Bz,result:function(){if(!Fz.length)return null;var t=[],n=[];return Fz.forEach((function(e){!function(t){if((n=t.length)<4)return!1;for(var n,e=0,i=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++ei^g>i&&e<(f-s)*(i-c)/(g-c)+s&&(r=!r)}return r}(t[0],e))return t.push(n),!0}))||t.push([n])})),Fz=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}};function Gz(t){var n=t(Gj,0)[0]-t(-Gj,0)[0];function e(e,i){var r=Cj(e)0?e-Hj:e+Hj,i),o=(a[0]-a[1])*Uj,u=(a[0]+a[1])*Uj;if(r)return[o,u];var l=n*Uj,s=o>0^u>0?-1:1;return[s*o-Nj(u)*l,s*u-Nj(o)*l]}return t.invert&&(e.invert=function(e,i){var r=(e+i)*Uj,a=(i-e)*Uj,o=Cj(r)<.5*n&&Cj(a)<.5*n;if(!o){var u=n*Uj,l=r>0^a>0?-1:1,s=-l*e+(a>0?1:-1)*u,c=-l*i+(r>0?1:-1)*u;r=(-s-c)*Uj,a=(s-c)*Uj}var h=t.invert(r,a);return o||(h[0]+=r>0?Hj:-Hj),h}),VP(e).rotate([-90,-90,45]).clipAngle(179.999)}function Kz(t){var n=Rj(t);function e(e,i){var r=n?Fj(e*n/2)/n:e/2;if(!i)return[2*r,-t];var a=2*Aj(r*Rj(i)),o=1/Fj(i);return[Rj(a)*o,i+(1-Mj(a))*o-t]}return e.invert=function(e,i){if(Cj(i+=t)Lj&&--u>0);var h=e*(l=Fj(o)),f=Fj(Cj(i)=0||1===r){e=(n>=0?5:-5)*(f+i);var g,d=50;do{f=(i=Bj(18,Cj(e)/5))-(r=Oj(i)),a=Uz[r][1],o=Uz[r+1][1],u=Uz[Bj(19,r+2)][1],e-=(g=Nj(n)*(o+f*(u-a)/2+f*f*(u-2*o+a)/2)-n)*Vj}while(Cj(g)>Ij&&--d>0);break}}while(--r>=0);var p=Uz[r][0],m=Uz[r+1][0],_=Uz[Bj(19,r+2)][0];return[t/(m+f*(_-p)/2+f*f*(_-2*m+p)/2),e*Zj]};var Yz=1e-4,Vz=1e4,Zz=-180,Xz=Zz+Yz,Jz=180,Qz=Jz-Yz,$z=-90,tN=$z+Yz,nN=90,eN=nN-Yz;function iN(t){return t.length>0}function rN(t){return t===$z||t===nN?[0,t]:[Zz,(n=t,Math.floor(n*Vz)/Vz)];var n}function aN(t){var n=t[0],e=t[1],i=!1;return n<=Xz?(n=Zz,i=!0):n>=Qz&&(n=Jz,i=!0),e<=tN?(e=$z,i=!0):e>=eN&&(e=nN,i=!0),i?[n,e]:t}function oN(t){return t.map(aN)}function uN(t,n,e){for(var i=0,r=t.length;i=Qz||c<=tN||c>=eN){a[o]=aN(l);for(var h=o+1;hXz&&gtN&&d=u)break;e.push({index:-1,polygon:n,ring:a=a.slice(h-1)}),a[0]=rN(a[0][1]),o=-1,u=a.length}}}}function lN(t){var n,e,i,r,a,o,u=t.length,l={},s={};for(n=0;n0?Hj-u:u)*Vj],s=VP(t(o)).rotate(l),c=GT(l),h=s.center;return delete s.rotate,s.center=function(t){return arguments.length?h(c(t)):c.invert(h())},s.clipAngle(90)}function gN(t){var n=Mj(t);function e(t,e){var i=_j(t,e);return i[0]*=n,i}return e.invert=function(t,e){return _j.invert(t/n,e)},e}function dN(t,n){return fN(gN,t,n)}function pN(t){if(!(t*=2))return ij;var n=-t/2,e=-n,i=t*t,r=Fj(e),a=.5/Rj(e);function o(r,a){var o=Jj(Mj(a)*Mj(r-n)),u=Jj(Mj(a)*Mj(r-e));return[((o*=o)-(u*=u))/(2*t),(a<0?-1:1)*Qj(4*i*u-(i-o+u)*(i-o+u))/(2*t)]}return o.invert=function(t,i){var o,u,l=i*i,s=Mj(Qj(l+(o=t+n)*o)),c=Mj(Qj(l+(o=t+e)*o));return[Ej(u=s-c,o=(s+c)*r),(i<0?-1:1)*Jj(Qj(o*o+u*u)*a)]},o}function mN(t,n){return fN(pN,t,n)}function _N(t,n){if(Cj(n).5?Bj(n,Cj(t)):0)),l=t*t+n*n,s=50;do{var c=u*u,h=(8*u-c*(c+2)-5)/(2*c*(u-1)),f=(3*u-c*u-10)/(2*c*u),g=h*h,d=u*h,p=u+h,m=p*p,_=u+3*h,y=-2*p*(4*d*g+(1-4*c+3*c*c)*(1+f)+g*(14*c-6-o+(8*c-8-2*o)*f)+d*(12*c-8+(10*c-10-o)*f)),v=Qj(m*(c+g*o-1)+(1-c)*(c*(_*_+4*g)+g*(12*d+4*g)));u-=e=(a*(m+g-1)+2*v-r*(4*m+o))/(a*(2*h*f+2*p*(1+f))+y/v-8*p*(a*(-1+g+m)+2*v)*(1+f)/(o+4*m))}while(e*l*l>Lj&&--s>0);return[Nj(t)*(Qj(a*a+4)+a)*Hj/4,i*Gj*u]};var xN=4*Hj+3*Qj(3),kN=2*Qj(2*Hj*Qj(3)/xN),CN=pB(kN*Qj(3)/Hj,kN,xN/6);function AN(t,n){return[t*Qj(1-3*n*n/(Hj*Hj)),n]}function EN(t,n){var e=Mj(n),i=Mj(t)*e,r=1-i,a=Mj(t=Ej(Rj(t)*e,-Rj(n))),o=Rj(t);return[o*(e=Qj(1-i*i))-a*r,-a*e-o*r]}function MN(t,n){var e=eB(t,n);return[(e[0]+t/Gj)/2,(e[1]+n)/2]}AN.invert=function(t,n){return[t/Qj(1-3*n*n/(Hj*Hj)),n]},EN.invert=function(t,n){var e=(t*t+n*n)/-2,i=Qj(-e*(2+e)),r=n*e+t*i,a=t*e-n*i,o=Qj(a*a+r*r);return[Ej(i*r,o*(1+e)),o?-Xj(i*a/o):0]},MN.invert=function(t,n){var e=t,i=n,r=25;do{var a,o=Mj(i),u=Rj(i),l=Rj(2*i),s=u*u,c=o*o,h=Rj(e),f=Mj(e/2),g=Rj(e/2),d=g*g,p=1-c*f*f,m=p?Jj(o*f)*Qj(a=1/p):a=0,_=.5*(2*m*o*g+e/Gj)-t,y=.5*(m*u+i)-n,v=.5*a*(c*d+m*o*f*s)+.5/Gj,b=a*(h*l/4-m*u*g),w=.125*a*(l*g-m*u*c*h),S=.5*a*(s*f+m*d*o)+.5,x=b*w-S*v,k=(y*b-_*S)/x,C=(_*w-y*v)/x;e-=k,i-=C}while((Cj(k)>Lj||Cj(C)>Lj)&&--r>0);return[e,i]};const TN=Object.freeze(Object.defineProperty({__proto__:null,geoAiry:function(){var t=Gj,n=ZP(nB),e=n(t);return e.radius=function(e){return arguments.length?n(t=e*Zj):t*Vj},e.scale(179.976).clipAngle(147)},geoAiryRaw:nB,geoAitoff:function(){return VP(eB).scale(152.63)},geoAitoffRaw:eB,geoArmadillo:function(){var t=20*Zj,n=t>=0?1:-1,e=Fj(n*t),i=ZP(iB),r=i(t),a=r.stream;return r.parallel=function(r){return arguments.length?(e=Fj((n=(t=r*Zj)>=0?1:-1)*t),i(t)):t*Vj},r.stream=function(i){var o=r.rotate(),u=a(i),l=(r.rotate([0,0]),a(i)),s=r.precision();return r.rotate(o),u.sphere=function(){l.polygonStart(),l.lineStart();for(var i=-180*n;n*i<180;i+=90*n)l.point(i,90*n);if(t)for(;n*(i-=3*n*s)>=-180;)l.point(i,n*-Ej(Mj(i*Zj/2),e)*Vj);l.lineEnd(),l.polygonEnd()},u},r.scale(218.695).center([0,28.0974])},geoArmadilloRaw:iB,geoAugust:function(){return VP(rB).scale(66.1603)},geoAugustRaw:rB,geoBaker:function(){return VP(uB).scale(112.314)},geoBakerRaw:uB,geoBerghaus:function(){var t=5,n=ZP(lB),e=n(t),i=e.stream,r=.01,a=-Mj(r*Zj),o=Rj(r*Zj);return e.lobes=function(e){return arguments.length?n(t=+e):t},e.stream=function(n){var u=e.rotate(),l=i(n),s=(e.rotate([0,0]),i(n));return e.rotate(u),l.sphere=function(){s.polygonStart(),s.lineStart();for(var n=0,e=360/t,i=2*Hj/t,u=90-180/t,l=Gj;n=0;)t.point((n=e[r])[0],n[1]);t.lineEnd(),t.polygonEnd()},t},e.scale(79.4187).parallel(45).clipAngle(179.999)},geoHammerRetroazimuthalRaw:hD,geoHealpix:function(){var t=4,n=ZP(pD),e=n(t),i=e.stream;return e.lobes=function(e){return arguments.length?n(t=+e):t},e.stream=function(n){var r=e.rotate(),a=i(n),o=(e.rotate([0,0]),i(n));return e.rotate(r),a.sphere=function(){var n,e;yM((e=[].concat(yn(-180,180+(n=180/t)/2,n).map(mD),yn(180,-180-n/2,-n).map(_D)),{type:"Polygon",coordinates:[180===n?e.map(yD):e]}),o)},a},e.scale(239.75)},geoHealpixRaw:pD,geoHill:function(){var t=1,n=ZP(vD),e=n(t);return e.ratio=function(e){return arguments.length?n(t=+e):t},e.scale(167.774).center([0,18.67])},geoHillRaw:vD,geoHomolosine:function(){return VP(xD).scale(152.63)},geoHomolosineRaw:xD,geoHufnagel:function(){var t=1,n=0,e=45*Zj,i=2,r=ZP(kD),a=r(t,n,e,i);return a.a=function(a){return arguments.length?r(t=+a,n,e,i):t},a.b=function(a){return arguments.length?r(t,n=+a,e,i):n},a.psiMax=function(a){return arguments.length?r(t,n,e=+a*Zj,i):e*Vj},a.ratio=function(a){return arguments.length?r(t,n,e,i=+a):i},a.scale(180.739)},geoHufnagelRaw:kD,geoHyperelliptical:function(){var t=0,n=2.5,e=1.183136,i=ZP(ED),r=i(t,n,e);return r.alpha=function(r){return arguments.length?i(t=+r,n,e):t},r.k=function(r){return arguments.length?i(t,n=+r,e):n},r.gamma=function(r){return arguments.length?i(t,n,e=+r):e},r.scale(152.63)},geoHyperellipticalRaw:ED,geoInterrupt:OD,geoInterruptedBoggs:function(){return OD(vB,PD).scale(160.857)},geoInterruptedHomolosine:function(){return OD(xD,jD).scale(152.63)},geoInterruptedMollweide:function(){return OD(mB,BD).scale(169.529)},geoInterruptedMollweideHemispheres:function(){return OD(mB,DD).scale(169.529).rotate([20,0])},geoInterruptedQuarticAuthalic:function(){return OD(sB(1/0),az).rotate([20,0]).scale(152.63)},geoInterruptedSinuMollweide:function(){return OD(SD,zD,fB).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoInterruptedSinusoidal:function(){return OD(wB,ND).scale(152.63).rotate([-20,0])},geoKavrayskiy7:function(){return VP(RD).scale(158.837)},geoKavrayskiy7Raw:RD,geoLagrange:function(){var t=.5,n=ZP(FD),e=n(t);return e.spacing=function(e){return arguments.length?n(t=+e):t},e.scale(124.75)},geoLagrangeRaw:FD,geoLarrivee:function(){return VP(ID).scale(97.2672)},geoLarriveeRaw:ID,geoLaskowski:function(){return VP(HD).scale(139.98)},geoLaskowskiRaw:HD,geoLittrow:function(){return VP(GD).scale(144.049).clipAngle(89.999)},geoLittrowRaw:GD,geoLoximuthal:function(){return bB(KD).parallel(40).scale(158.837)},geoLoximuthalRaw:KD,geoMiller:function(){return VP(UD).scale(108.318)},geoMillerRaw:UD,geoModifiedStereographic:JD,geoModifiedStereographicAlaska:function(){return JD(WD,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},geoModifiedStereographicGs48:function(){return JD(YD,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},geoModifiedStereographicGs50:function(){return JD(VD,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},geoModifiedStereographicLee:function(){return JD(XD,[165,10]).scale(250).clipAngle(130).center([-165,-10])},geoModifiedStereographicMiller:function(){return JD(ZD,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},geoModifiedStereographicRaw:qD,geoMollweide:function(){return VP(mB).scale(169.529)},geoMollweideRaw:mB,geoMtFlatPolarParabolic:function(){return VP(tz).scale(164.859)},geoMtFlatPolarParabolicRaw:tz,geoMtFlatPolarQuartic:function(){return VP(nz).scale(188.209)},geoMtFlatPolarQuarticRaw:nz,geoMtFlatPolarSinusoidal:function(){return VP(ez).scale(166.518)},geoMtFlatPolarSinusoidalRaw:ez,geoNaturalEarth2:function(){return VP(iz).scale(175.295)},geoNaturalEarth2Raw:iz,geoNellHammer:function(){return VP(rz).scale(152.63)},geoNellHammerRaw:rz,geoNicolosi:function(){return VP(oz).scale(127.267)},geoNicolosiRaw:oz,geoPatterson:function(){return VP(mz).scale(139.319)},geoPattersonRaw:mz,geoPeirceQuincuncial:function(){return Gz(cD).scale(111.48)},geoPolyconic:function(){return VP(_z).scale(103.74)},geoPolyconicRaw:_z,geoPolyhedral:Sz,geoPolyhedralButterfly:function(t){t=t||function(t){var n=DT({type:"MultiPoint",coordinates:t});return yj().scale(1).translate([0,0]).rotate([-n[0],-n[1]])};var n=Ez.map((function(n){return{face:n,project:t(n)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var i=n[t];i&&(i.children||(i.children=[])).push(n[e])})),Sz(n[0],(function(t,e){return n[t<-Hj/2?e<0?6:4:t<0?e<0?2:0:t0?[-n[0],0]:[180-n[0],180])};var n=Ez.map((function(n){return{face:n,project:t(n)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var i=n[t];i&&(i.children||(i.children=[])).push(n[e])})),Sz(n[0],(function(t,e){return n[t<-Hj/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=n[0]||a[1]!=n[1])&&(i.push(a),n=a)}return 1===i.length&&t.length>1&&i.push(e(t[t.length-1])),i}function a(t){return t.map(r)}function o(t){if(null==t)return t;var n;switch(t.type){case"GeometryCollection":n={type:"GeometryCollection",geometries:t.geometries.map(o)};break;case"Point":n={type:"Point",coordinates:e(t.coordinates)};break;case"MultiPoint":n={type:t.type,coordinates:i(t.coordinates)};break;case"LineString":n={type:t.type,coordinates:r(t.coordinates)};break;case"MultiLineString":case"Polygon":n={type:t.type,coordinates:a(t.coordinates)};break;case"MultiPolygon":n={type:"MultiPolygon",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(n.bbox=t.bbox),n}function u(t){var n={type:"Feature",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),n}if(null!=t)switch(t.type){case"Feature":return u(t);case"FeatureCollection":var l={type:"FeatureCollection",features:t.features.map(u)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},geoQuincuncial:Gz,geoRectangularPolyconic:function(){return bB(Kz).scale(131.215)},geoRectangularPolyconicRaw:Kz,geoRobinson:function(){return VP(qz).scale(152.63)},geoRobinsonRaw:qz,geoSatellite:function(){var t=2,n=0,e=ZP(Wz),i=e(t,n);return i.distance=function(i){return arguments.length?e(t=+i,n):t},i.tilt=function(i){return arguments.length?e(t,n=i*Zj):n*Vj},i.scale(432.147).clipAngle(Jj(1/t)*Vj-1e-6)},geoSatelliteRaw:Wz,geoSinuMollweide:function(){return VP(SD).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoSinuMollweideRaw:SD,geoSinusoidal:function(){return VP(wB).scale(152.63)},geoSinusoidalRaw:wB,geoStitch:function(t){if(null==t)return t;switch(t.type){case"Feature":return sN(t);case"FeatureCollection":var n={type:"FeatureCollection",features:t.features.map(sN)};return null!=t.bbox&&(n.bbox=t.bbox),n;default:return cN(t)}},geoTimes:function(){return VP(hN).scale(146.153)},geoTimesRaw:hN,geoTwoPointAzimuthal:dN,geoTwoPointAzimuthalRaw:gN,geoTwoPointAzimuthalUsa:function(){return dN([-158,21.5],[-77,39]).clipAngle(60).scale(400)},geoTwoPointEquidistant:mN,geoTwoPointEquidistantRaw:pN,geoTwoPointEquidistantUsa:function(){return mN([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},geoVanDerGrinten:function(){return VP(_N).scale(79.4183)},geoVanDerGrinten2:function(){return VP(yN).scale(79.4183)},geoVanDerGrinten2Raw:yN,geoVanDerGrinten3:function(){return VP(vN).scale(79.4183)},geoVanDerGrinten3Raw:vN,geoVanDerGrinten4:function(){return VP(bN).scale(127.16)},geoVanDerGrinten4Raw:bN,geoVanDerGrintenRaw:_N,geoWagner:SN,geoWagner4:function(){return VP(CN).scale(176.84)},geoWagner4Raw:CN,geoWagner6:function(){return VP(AN).scale(152.63)},geoWagner6Raw:AN,geoWagner7:function(){return SN().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},geoWagnerRaw:wN,geoWiechel:function(){return VP(EN).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},geoWiechelRaw:EN,geoWinkel3:function(){return VP(MN).scale(158.837)},geoWinkel3Raw:MN},Symbol.toStringTag,{value:"Module"}));var ON=1e-6;class PN{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let i=0;i0){for(a=t[--r];r>0&&(n=a,e=t[--r],a=n+e,i=e-(a-n),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(e=2*i,n=a+e,e==n-a&&(a=n))}return a}}function jN(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}var BN=1e-6,DN=1e-12,zN=Math.PI,NN=zN/2,RN=zN/4,FN=2*zN,LN=180/zN,IN=zN/180,HN=Math.abs,GN=Math.atan,KN=Math.atan2,UN=Math.cos,qN=Math.exp,WN=Math.log,YN=Math.pow,VN=Math.sin,ZN=Math.sign||function(t){return t>0?1:t<0?-1:0},XN=Math.sqrt,JN=Math.tan;function QN(t){return t>1?NN:t<-1?-NN:Math.asin(t)}function $N(){}function tR(t,n){t&&eR.hasOwnProperty(t.type)&&eR[t.type](t,n)}var nR={Feature:function(t,n){tR(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++izN?t+Math.round(-t/FN)*FN:t,n]}function pR(t,n,e){return(t%=FN)?n||e?gR(_R(t),yR(n,e)):_R(t):n||e?yR(n,e):dR}function mR(t){return function(n,e){return[(n+=t)>zN?n-FN:n<-zN?n+FN:n,e]}}function _R(t){var n=mR(t);return n.invert=mR(-t),n}function yR(t,n){var e=UN(t),i=VN(t),r=UN(n),a=VN(n);function o(t,n){var o=UN(n),u=UN(t)*o,l=VN(t)*o,s=VN(n),c=s*e+u*i;return[KN(l*r-c*a,u*e-s*i),QN(c*r+l*a)]}return o.invert=function(t,n){var o=UN(n),u=UN(t)*o,l=VN(t)*o,s=VN(n),c=s*r-l*a;return[KN(l*r+s*a,u*e+c*i),QN(c*e-u*i)]},o}function vR(t,n){(n=uR(n))[0]-=t,fR(n);var e,i=(e=-n[1])>1?0:e<-1?zN:Math.acos(e);return((-n[2]<0?-i:i)+FN-BN)%FN}function bR(){var t,n=[];return{point:function(n,e,i){t.push([n,e,i])},lineStart:function(){n.push(t=[])},lineEnd:$N,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function wR(t,n){return HN(t[0]-n[0])=0;--a)r.point((c=s[a])[0],c[1]);else i(f.x,f.p.x,-1,r);f=f.p}s=(f=f.o).z,g=!g}while(!f.v);r.lineEnd()}}}function kR(t){if(n=t.length){for(var n,e,i=0,r=t[0];++i=0?1:-1,A=C*k,E=A>zN,M=m*S;if(l.add(KN(M*C*VN(A),_*x+M*UN(A))),o+=E?k+C*FN:k,E^d>=e^b>=e){var T=sR(uR(g),uR(v));fR(T);var O=sR(a,T);fR(O);var P=(E^k>=0?-1:1)*QN(O[2]);(i>P||i===P&&(T[0]||T[1]))&&(u+=E^k>=0?1:-1)}}return(o<-BN||o0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(ER))}return f}}function ER(t){return t.length>1}function MR(t,n){return((t=t.x)[0]<0?t[1]-NN-BN:NN-t[1])-((n=n.x)[0]<0?n[1]-NN-BN:NN-n[1])}dR.invert=dR;const TR=AR((function(){return!0}),(function(t){var n,e=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(a,o){var u=a>0?zN:-zN,l=HN(a-e);HN(l-zN)0?NN:-NN),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),t.point(a,i),n=0):r!==u&&l>=zN&&(HN(e-r)BN?GN((VN(n)*(a=UN(i))*VN(e)-VN(i)*(r=UN(n))*VN(t))/(r*a*o)):(n+i)/2}(e,i,a,o),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),n=0),t.point(e=a,i=o),r=u},lineEnd:function(){t.lineEnd(),e=i=NaN},clean:function(){return 2-n}}}),(function(t,n,e,i){var r;if(null==t)r=e*NN,i.point(-zN,r),i.point(0,r),i.point(zN,r),i.point(zN,0),i.point(zN,-r),i.point(0,-r),i.point(-zN,-r),i.point(-zN,0),i.point(-zN,r);else if(HN(t[0]-n[0])>BN){var a=t[0]0,r=HN(n)>BN;function a(t,e){return UN(t)*UN(e)>n}function o(t,e,i){var r=[1,0,0],a=sR(uR(t),uR(e)),o=lR(a,a),u=a[0],l=o-u*u;if(!l)return!i&&t;var s=n*o/l,c=-n*u/l,h=sR(r,a),f=hR(r,s);cR(f,hR(a,c));var g=h,d=lR(f,g),p=lR(g,g),m=d*d-p*(lR(f,f)-1);if(!(m<0)){var _=XN(m),y=hR(g,(-d-_)/p);if(cR(y,f),y=oR(y),!i)return y;var v,b=t[0],w=e[0],S=t[1],x=e[1];w0^y[1]<(HN(y[0]-b)zN^(b<=y[0]&&y[0]<=w)){var A=hR(g,(-d+_)/p);return cR(A,f),[y,oR(A)]}}}function u(n,e){var r=i?t:zN-t,a=0;return n<-r?a|=1:n>r&&(a|=2),e<-r?a|=4:e>r&&(a|=8),a}return AR(a,(function(t){var n,e,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(h,f){var g,d=[h,f],p=a(h,f),m=i?p?0:u(h,f):p?u(h+(h<0?zN:-zN),f):0;if(!n&&(s=l=p)&&t.lineStart(),p!==l&&(!(g=o(n,d))||wR(n,g)||wR(d,g))&&(d[2]=1),p!==l)c=0,p?(t.lineStart(),g=o(d,n),t.point(g[0],g[1])):(g=o(n,d),t.point(g[0],g[1],2),t.lineEnd()),n=g;else if(r&&n&&i^p){var _;m&e||!(_=o(d,n,!0))||(c=0,i?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!p||n&&wR(n,d)||t.point(d[0],d[1]),n=d,l=p,e=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(s&&l)<<1}}}),(function(n,i,r,a){!function(t,n,e,i,r,a){if(e){var o=UN(n),u=VN(n),l=i*e;null==r?(r=n+i*FN,a=n-l/2):(r=vR(o,r),a=vR(o,a),(i>0?ra)&&(r+=i*FN));for(var s,c=r;i>0?c>a:c0)do{s.point(0===c||3===c?t:e,c>1?i:n)}while((c=(c+u+4)%4)!==h);else s.point(a[0],a[1])}function o(i,r){return HN(i[0]-t)0?0:3:HN(i[0]-e)0?2:1:HN(i[1]-n)0?1:0:r>0?3:2}function u(t,n){return l(t.x,n.x)}function l(t,n){var e=o(t,1),i=o(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(o){var l,s,c,h,f,g,d,p,m,_,y,v=o,b=bR(),w={point:S,lineStart:function(){w.point=x,s&&s.push(c=[]);_=!0,m=!1,d=p=NaN},lineEnd:function(){l&&(x(h,f),g&&m&&b.rejoin(),l.push(b.result()));w.point=S,m&&v.lineEnd()},polygonStart:function(){v=b,l=[],s=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(f-a)*(i-o)>(g-o)*(t-a)&&++n:g<=i&&(f-a)*(i-o)<(g-o)*(t-a)&&--n;return n}(),e=y&&n,r=(l=jN(l)).length;(e||r)&&(o.polygonStart(),e&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),r&&xR(l,u,n,a,o),o.polygonEnd());v=o,l=s=c=null}};function S(t,n){r(t,n)&&v.point(t,n)}function x(a,o){var u=r(a,o);if(s&&c.push([a,o]),_)h=a,f=o,g=u,_=!1,u&&(v.lineStart(),v.point(a,o));else if(u&&m)v.point(a,o);else{var l=[d=Math.max(jR,Math.min(PR,d)),p=Math.max(jR,Math.min(PR,p))],b=[a=Math.max(jR,Math.min(PR,a)),o=Math.max(jR,Math.min(PR,o))];!function(t,n,e,i,r,a){var o,u=t[0],l=t[1],s=0,c=1,h=n[0]-u,f=n[1]-l;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>c)return;o>s&&(s=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>c)return;o>s&&(s=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>s&&(s=o)}else if(f>0){if(o0&&(t[0]=u+s*h,t[1]=l+s*f),c<1&&(n[0]=u+c*h,n[1]=l+c*f),!0}}}}}(l,b,t,n,e,i)?u&&(v.lineStart(),v.point(a,o),y=!1):(m||(v.lineStart(),v.point(l[0],l[1])),v.point(b[0],b[1]),u||v.lineEnd(),y=!1)}d=a,p=o,m=u}return w}}const DR=t=>t;var zR=1/0,NR=zR,RR=-zR,FR=RR;const LR={point:function(t,n){tRR&&(RR=t);nFR&&(FR=n)},lineStart:$N,lineEnd:$N,polygonStart:$N,polygonEnd:$N,result:function(){var t=[[zR,NR],[RR,FR]];return RR=FR=-(NR=zR=1/0),t}};function IR(t){return function(n){var e=new HR;for(var i in t)e[i]=t[i];return e.stream=n,e}}function HR(){}function GR(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),aR(e,t.stream(LR)),n(LR.result()),null!=i&&t.clipExtent(i),t}function KR(t,n,e){return GR(t,(function(e){var i=n[1][0]-n[0][0],r=n[1][1]-n[0][1],a=Math.min(i/(e[1][0]-e[0][0]),r/(e[1][1]-e[0][1])),o=+n[0][0]+(i-a*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(r-a*(e[1][1]+e[0][1]))/2;t.scale(150*a).translate([o,u])}),e)}HR.prototype={constructor:HR,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var UR=16,qR=UN(30*IN);function WR(t,n){return+n?function(t,n){function e(i,r,a,o,u,l,s,c,h,f,g,d,p,m){var _=s-i,y=c-r,v=_*_+y*y;if(v>4*n&&p--){var b=o+f,w=u+g,S=l+d,x=XN(b*b+w*w+S*S),k=QN(S/=x),C=HN(HN(S)-1)n||HN((_*T+y*O)/v-.5)>.3||o*f+u*g+l*d2?t[2]%360*IN:0,T()):[m*LN,_*LN,y*LN]},E.angle=function(t){return arguments.length?(v=t%360*IN,T()):v*LN},E.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(o=WR(u,A=t*t),O()):XN(A)},E.fitExtent=function(t,n){return KR(E,t,n)},E.fitSize=function(t,n){return function(t,n,e){return KR(t,[[0,0],n],e)}(E,t,n)},E.fitWidth=function(t,n){return function(t,n,e){return GR(t,(function(e){var i=+n,r=i/(e[1][0]-e[0][0]),a=(i-r*(e[1][0]+e[0][0]))/2,o=-r*e[0][1];t.scale(150*r).translate([a,o])}),e)}(E,t,n)},E.fitHeight=function(t,n){return function(t,n,e){return GR(t,(function(e){var i=+n,r=i/(e[1][1]-e[0][1]),a=-r*e[0][0],o=(i-r*(e[1][1]+e[0][1]))/2;t.scale(150*r).translate([a,o])}),e)}(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&M,T()}}function QR(t){var n=0,e=zN/3,i=JR(t),r=i(n,e);return r.parallels=function(t){return arguments.length?i(n=t[0]*IN,e=t[1]*IN):[n*LN,e*LN]},r}function $R(t,n){var e=VN(t),i=(e+VN(n))/2;if(HN(i)2?t[2]*IN:0),n.invert=function(n){return(n=t.invert(n[0]*IN,n[1]*IN))[0]*=LN,n[1]*=LN,n},n}(r.rotate()).invert([0,0]));return l(null==s?[[u[0]-a,u[1]-a],[u[0]+a,u[1]+a]]:t===eF?[[Math.max(u[0]-a,s),n],[Math.min(u[0]+a,e),i]]:[[s,Math.max(u[1]-a,n)],[e,Math.min(u[1]+a,i)]])}return r.scale=function(t){return arguments.length?(o(t),c()):o()},r.translate=function(t){return arguments.length?(u(t),c()):u()},r.center=function(t){return arguments.length?(a(t),c()):a()},r.clipExtent=function(t){return arguments.length?(null==t?s=n=e=i=null:(s=+t[0][0],n=+t[0][1],e=+t[1][0],i=+t[1][1]),c()):null==s?null:[[s,n],[e,i]]},c()}function aF(t){return JN((NN+t)/2)}function oF(t,n){var e=UN(t),i=t===n?VN(t):WN(e/UN(n))/WN(aF(n)/aF(t)),r=e*YN(aF(t),i)/i;if(!i)return eF;function a(t,n){r>0?n<-NN+BN&&(n=-NN+BN):n>NN-BN&&(n=NN-BN);var e=r/YN(aF(n),i);return[e*VN(i*t),r-e*UN(i*t)]}return a.invert=function(t,n){var e=r-n,a=ZN(i)*XN(t*t+e*e),o=KN(t,HN(e))*ZN(e);return e*i<0&&(o-=zN*ZN(t)*ZN(e)),[o/i,2*GN(YN(r/a,1/i))-NN]},a}function uF(){return QR(oF).scale(109.5).parallels([30,30])}function lF(t,n){return[t,n]}function sF(){return XR(lF).scale(152.63)}function cF(t,n){var e=UN(t),i=t===n?VN(t):(e-UN(n))/(n-t),r=e/i+t;if(HN(i)_F&&(_F=t);nyF&&(yF=n)},lineStart:dF,lineEnd:dF,polygonStart:dF,polygonEnd:dF,result:function(){var t=[[pF,mF],[_F,yF]];return _F=yF=-(mF=pF=1/0),t}};function bF(t,n,e){var i=n[1][0]-n[0][0],r=n[1][1]-n[0][1],a=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=a&&t.clipExtent(null),aR(e,t.stream(vF));var o=vF.result(),u=Math.min(i/(o[1][0]-o[0][0]),r/(o[1][1]-o[0][1])),l=+n[0][0]+(i-u*(o[1][0]+o[0][0]))/2,s=+n[0][1]+(r-u*(o[1][1]+o[0][1]))/2;return null!=a&&t.clipExtent(a),t.scale(150*u).translate([l,s])}function wF(t,n,e){return bF(t,[[0,0],n],e)}const SF=Math.PI,xF=2*SF,kF=1e-6,CF=xF-kF;function AF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function EF(){return new AF}AF.prototype=EF.prototype={constructor:AF,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,a){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var a=this._x1,o=this._y1,u=e-t,l=i-n,s=a-t,c=o-n,h=s*s+c*c;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(h>kF)if(Math.abs(c*u-l*s)>kF&&r){var f=e-a,g=i-o,d=u*u+l*l,p=f*f+g*g,m=Math.sqrt(d),_=Math.sqrt(h),y=r*Math.tan((SF-Math.acos((d+h-p)/(2*m*_)))/2),v=y/_,b=y/m;Math.abs(v-1)>kF&&(this._+="L"+(t+v*s)+","+(n+v*c)),this._+="A"+r+","+r+",0,0,"+ +(c*f>s*g)+","+(this._x1=t+b*u)+","+(this._y1=n+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,a){t=+t,n=+n,a=!!a;var o=(e=+e)*Math.cos(i),u=e*Math.sin(i),l=t+o,s=n+u,c=1^a,h=a?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+s:(Math.abs(this._x1-l)>kF||Math.abs(this._y1-s)>kF)&&(this._+="L"+l+","+s),e&&(h<0&&(h=h%xF+xF),h>CF?this._+="A"+e+","+e+",0,1,"+c+","+(t-o)+","+(n-u)+"A"+e+","+e+",0,1,"+c+","+(this._x1=l)+","+(this._y1=s):h>kF&&(this._+="A"+e+","+e+",0,"+ +(h>=SF)+","+c+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const MF=Object.freeze(Object.defineProperty({__proto__:null,geoAlbersUk:function(){var t,n,e,i,r,a=nF().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),o=nF().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),u={point:function(t,n){r=[t,n]}};function l(t){var n=t[0],a=t[1];return r=null,e.point(n,a),r||(i.point(n,a),r)}function s(){return t=n=null,l}return l.invert=function(t){var n=a.scale(),e=a.translate(),i=(t[0]-e[0])/n,r=(t[1]-e[1])/n;return(r>=-.089&&r<.06&&i>=.029&&i<.046?o:a).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),o.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.12&&r<.234&&i>=-.425&&i<-.214?u:r>=.166&&r<.234&&i>=-.214&&i<-.115?l:o).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.12&&r<.234&&i>=-.425&&i<-.214?c:r>=.166&&r<.234&&i>=-.214&&i<-.115?h:r>=.2064&&r<.2413&&i>=.312&&i<.385?f:r>=.09&&r<.1197&&i>=-.4243&&i<-.3232?g:r>=-.0518&&r<.0895&&i>=-.4243&&i<-.3824?d:s).invert(t)},m.stream=function(e){return t&&n===e?t:(i=[s.stream(n=e),c.stream(e),h.stream(e),f.stream(e),g.stream(e),d.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.31&&r<-.24&&i>=.14&&i<.24?m:r>=-.24&&r<-.17&&i>=.14&&i<.24?_:r>=-.17&&r<-.12&&i>=.21&&i<.24?v:r>=-.17&&r<-.14&&i>=.14&&i<.165?b:r>=-.17&&r<-.1&&i>=.14&&i<.24?y:r>=-.1&&r<-.03&&i>=.14&&i<.24?w:r>=-.03&&r<.04&&i>=.14&&i<.24?S:r>=-.31&&r<-.24&&i>=.24&&i<.34?x:r>=-.24&&r<-.17&&i>=.24&&i<.34?k:r>=-.17&&r<-.1&&i>=.24&&i<.34?C:r>=-.1&&r<-.03&&i>=.24&&i<.34?A:p).invert(t)},M.stream=function(e){return t&&n===e?t:(i=[p.stream(n=e),_.stream(e),x.stream(e),m.stream(e),S.stream(e),w.stream(e),k.stream(e),C.stream(e),A.stream(e),y.stream(e),v.stream(e),b.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.029&&r<.0864&&i>=-.14&&i<-.0996?m:r>=0&&r<.029&&i>=-.14&&i<-.0996?_:r>=-.032&&r<0&&i>=-.14&&i<-.0996?y:r>=-.052&&r<-.032&&i>=-.14&&i<-.0996?v:r>=-.076&&r<.052&&i>=-.14&&i<-.0996?b:r>=-.076&&r<-.052&&i>=.0967&&i<.1371?w:r>=-.052&&r<-.02&&i>=.0967&&i<.1371?S:r>=-.02&&r<.012&&i>=.0967&&i<.1371?x:r>=.012&&r<.033&&i>=.0967&&i<.1371?k:r>=.033&&r<.0864&&i>=.0967&&i<.1371?C:p).invert(t)},M.stream=function(e){return t&&n===e?t:(i=[p.stream(n=e),m.stream(e),_.stream(e),y.stream(e),v.stream(e),b.stream(e),w.stream(e),S.stream(e),x.stream(e),k.stream(e),C.stream(e),A.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.0067&&r<.0015&&i>=-.0232&&i<-.0154?u:r>=-.022&&r<-.014&&i>=-.023&&i<-.014?l:o).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.0093&&r<.03678&&i>=-.03875&&i<-.0116?u:r>=-.0412&&r<.0091&&i>=-.07782&&i<-.01166?l:o).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.05346&&r<.0897&&i>=-.13388&&i<-.0322?o:a).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),o.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.10925&&r<-.02701&&i>=-.135&&i<-.0397?u:r>=.04713&&r<.11138&&i>=-.03986&&i<.051?l:o).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.0676&&r<-.026&&i>=-.0857&&i<-.0263?o:a).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),o.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.02&&r<0&&i>=-.038&&i<-.005?u:r>=0&&r<.02&&i>=-.038&&i<-.005?l:o).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.0521&&r<.0229&&i>=-.0111&&i<.1?o:a).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),o.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e2?t[2]+90:90]):[(t=s())[0],t[1],t[2]-90]},s([0,0,90]).scale(159.155)).rotate([72,37]),h=XR(fF).scale(250).clipAngle(142).rotate([72,0]),f=iF().rotate([80,33.5]),g=iF().rotate([110,25]),d={point:function(t,n){o=[t,n]}};function p(t){var n=t[0],u=t[1];return o=null,e.point(n,u),o||(i.point(n,u),o)||(r.point(n,u),o)||(a.point(n,u),o)}function m(){return t=n=null,p}return p.invert=function(t){var n=c.scale(),e=c.translate(),i=(t[0]-e[0])/n,r=(t[1]-e[1])/n;return(r>=.2582&&r<.32&&i>=-.1036&&i<-.087?h:r>=-.01298&&r<.0133&&i>=-.11396&&i<-.05944?f:r>=.01539&&r<.03911&&i>=-.089&&i<-.0588?g:c).invert(t)},p.stream=function(e){return t&&n===e?t:(i=[c.stream(n=e),h.stream(e),f.stream(e),g.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++eOpenStreetMap contributors, © CARTO"},{matches:["opentopomap.org"],text:"© OpenStreetMap contributors"},{matches:["arcgisonline.com"],text:"Powered by Esri"},{matches:["/watercolor/"],text:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL."},{matches:["stamen-tiles","stamen.com"],text:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."}];function zF(t){return(zF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function NF(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,a,o,u=[],l=!0,s=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=a.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return RF(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return RF(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function RF(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e0&&void 0!==arguments[0]?arguments[0]:tx(this._container.node()),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[];this._tiles&&(i=this._tileGen.extent(this._zoomBehavior.translateExtent()).scale(this._projection.scale()*(2*Math.PI)*n.k).translate(n.apply(this._projection.translate()))(),this._tileGroup.transition().duration(e).attr("transform",n));var r=this._tileGroup.selectAll("image.d3plus-geomap-tile").data(i,(function(t){var n=NF(t,3),e=n[0],i=n[1],r=n[2];return"".concat(e,"-").concat(i,"-").concat(r)}));r.exit().transition().duration(e).attr("opacity",0).remove();var a=i.scale/n.k,o=r.enter().append("image").attr("class","d3plus-geomap-tile");o.attr("opacity",0).transition().duration(e).attr("opacity",1),r.merge(o).attr("width",a).attr("height",a).attr("xlink:href",(function(n){var e=NF(n,3),i=e[0],r=e[1],a=e[2];return t._tileUrl.replace("{s}",["a","b","c"][3*Math.random()|0]).replace("{z}",a).replace("{x}",i).replace("{y}",r)})).attr("x",(function(t){return NF(t,1)[0]*a+i.translate[0]*a-n.x/n.k})).attr("y",(function(t){return NF(t,2)[1]*a+i.translate[1]*a-n.y/n.k}))}},{key:"_draw",value:function(t){var n=this;LF(KF(a.prototype),"_draw",this).call(this,t);var e=this._height-this._margin.top-this._margin.bottom,i=this._width-this._margin.left-this._margin.right;this._container=this._select.selectAll("svg.d3plus-geomap").data([0]),this._container=this._container.enter().append("svg").attr("class","d3plus-geomap").attr("opacity",0).attr("width",i).attr("height",e).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color",this._ocean||"transparent").merge(this._container),this._container.transition(this._transition).attr("opacity",1).attr("width",i).attr("height",e).attr("x",this._margin.left).attr("y",this._margin.top);var r=this._container.selectAll("rect.d3plus-geomap-ocean").data([0]);r.enter().append("rect").attr("class","d3plus-geomap-ocean").merge(r).attr("width",i).attr("height",e).attr("fill",this._ocean||"transparent"),this._tileGroup=this._container.selectAll("g.d3plus-geomap-tileGroup").data([0]),this._tileGroup=this._tileGroup.enter().append("g").attr("class","d3plus-geomap-tileGroup").merge(this._tileGroup),this._zoomGroup=this._container.selectAll("g.d3plus-geomap-zoomGroup").data([0]),this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-geomap-zoomGroup").merge(this._zoomGroup);var o=this._zoomGroup.selectAll("g.d3plus-geomap-paths").data([0]);o=o.enter().append("g").attr("class","d3plus-geomap-paths").merge(o);var u=this._coordData=this._topojson?WF(this._topojson,this._topojsonKey):{type:"FeatureCollection",features:[]};this._topojsonFilter&&(u.features=u.features.filter(this._topojsonFilter));var l=this._path=UF.geoPath().projection(this._projection),s=this._filteredData.filter((function(t,e){return n._point(t,e)instanceof Array})),c=this._filteredData.filter((function(t,e){return!(n._point(t,e)instanceof Array)})).reduce((function(t,e){return t[n._id(e)]=e,t}),{}),h=u.features.reduce((function(t,e){var i=n._topojsonId(e);return t.push({__d3plus__:!0,data:c[i],feature:e,id:i}),t}),[]),f=Vp["scale".concat(this._pointSizeScale.charAt(0).toUpperCase()).concat(this._pointSizeScale.slice(1))]().domain(Vt(s,(function(t,e){return n._pointSize(t,e)}))).range([this._pointSizeMin,this._pointSizeMax]);if(!this._zoomSet){var g=this._fitObject?WF(this._fitObject,this._fitKey):u;if(this._extentBounds={type:"FeatureCollection",features:this._fitFilter?g.features.filter(this._fitFilter):g.features.slice()},this._extentBounds.features=this._extentBounds.features.reduce((function(t,n){if(n.geometry){var e={type:n.type,id:n.id,geometry:{coordinates:n.geometry.coordinates,type:n.geometry.type}};if("MultiPolygon"===n.geometry.type&&n.geometry.coordinates.length>1){var i=[],r=[];n.geometry.coordinates.forEach((function(t){e.geometry.coordinates=[t],i.push(l.area(e))})),e.geometry.coordinates=[n.geometry.coordinates[i.indexOf(hn(i))]];var a=l.centroid(e);n.geometry.coordinates.forEach((function(t){e.geometry.coordinates=[t],r.push(nv(l.centroid(e),a))}));var o=pn(i.reduce((function(t,n,e){return n&&t.push(i[e]/n),t}),[]),.9);e.geometry.coordinates=n.geometry.coordinates.filter((function(t,n){var e=r[n];return 0===e||i[n]/e>=o}))}t.push(e)}return t}),[]),!this._extentBounds.features.length&&s.length){var d=[[void 0,void 0],[void 0,void 0]];s.forEach((function(t,e){var i=n._projection(n._point(t,e));(void 0===d[0][0]||i[0]d[1][0])&&(d[1][0]=i[0]),(void 0===d[0][1]||i[1]d[1][1])&&(d[1][1]=i[1])})),this._extentBounds={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:d.map((function(t){return n._projection.invert(t)}))}}]};var p=hn(s,(function(t,e){return f(n._pointSize(t,e))}));this._projectionPadding.top+=p,this._projectionPadding.right+=p,this._projectionPadding.bottom+=p,this._projectionPadding.left+=p}this._zoomBehavior.extent([[0,0],[i,e]]).scaleExtent([1,this._zoomMax]).translateExtent([[0,0],[i,e]]),this._zoomSet=!0}this._projection=this._projection.fitExtent(this._extentBounds.features.length?[[this._projectionPadding.left,this._projectionPadding.top],[i-this._projectionPadding.right,e-this._projectionPadding.bottom]]:[[0,0],[i,e]],this._extentBounds.features.length?this._extentBounds:{type:"Sphere"}),this._shapes.push((new Yb).data(h).d((function(t){return l(t.feature)})).select(o.node()).x(0).y(0).config(ch.bind(this)(this._shapeConfig,"shape","Path")).render());var m=this._zoomGroup.selectAll("g.d3plus-geomap-pins").data([0]);m=m.enter().append("g").attr("class","d3plus-geomap-pins").merge(m);for(var _=(new hb).config(ch.bind(this)(this._shapeConfig,"shape","Circle")).data(s).r((function(t,e){return f(n._pointSize(t,e))})).select(m.node()).sort((function(t,e){return n._pointSize(e)-n._pointSize(t)})).x((function(t,e){return n._projection(n._point(t,e))[0]})).y((function(t,e){return n._projection(n._point(t,e))[1]})),y=Object.keys(this._on),v=y.filter((function(t){return t.includes(".Circle")})),b=y.filter((function(t){return!t.includes(".")})),w=y.filter((function(t){return t.includes(".shape")})),S=0;S({value:e.concat([t[i++]]),done:i>t.length}),[Symbol.iterator](){return this}};let r=uL(t.slice(1),n-1,e.concat([t[i]]));const a={next:function a(){if(i===t.length)return{value:null,done:!0};const o=r.next();if(o.done){i++;const o=t.slice();return r=uL(o,n-1,e.concat(o.splice(i,1))),a()}return{value:o.value,done:!1}},[Symbol.iterator]:()=>a};return a}function lL(t,n){const e="".concat(t).match(/[0-9\.\,]+/);return e?Number.parseFloat(e[0]):n||0}function sL({measuresByName:t},n){const e=t[n.measure];return e?n.moe&&n.moe in t?{collection:t["".concat(n.collection)],formatter:n.formatter||E,measure:e,moe:t["".concat(n.moe)],source:t["".concat(n.source)]}:{collection:t["".concat(n.collection)],formatter:n.formatter||E,lci:t["".concat(n.lci)],measure:e,source:t["".concat(n.source)],uci:t["".concat(n.uci)]}:void 0}var cL=(t,n,e)=>(null==t?void 0:t.hasOwnProperty(e))?t[e]:null==t?void 0:t[n];function hL(t,n=.8){return t.reduce(((t,n)=>{return t+(e=lL(n,NaN),!isNaN(parseFloat(e))&&isFinite(e)?1:0);var e}),0)/t.length>n}function fL(t){var n;return(null==(n=null==t?void 0:t.dimension)?void 0:n.dimensionType)===j.Geographic}function gL(t){var n;return(null==(n=null==t?void 0:t.dimension)?void 0:n.dimensionType)===j.Time}function dL(t,n){if(!Array.isArray(t)||!t.length)return!1;let e=null;return t.every((t=>{const i=t[n.caption];return null===e?(0!==i&&(e=i>0),!0):e?i>=0:i<=0}))}var pL="barchart",mL="barchartyear",_L="donut",yL="geomap",vL="lineplot",bL="treemap",wL=[mL,vL,"stacked"],SL=t=>t.drilldowns.filter((t=>!gL(t))),xL=(t,n)=>n.reduce(((n,e)=>n*t.membersCount[e.caption]),1),kL=(t,n,e,i)=>function(t){let n=5381,e=t.length;for(;e--;)n=33*n^t.charCodeAt(e);return(n>>>0).toString(36)}(n.map((t=>t.caption)).concat(e.measure.name,"".concat(t.length),i).join("|"));function CL(t,n){const e=Nc(1,n.stdDrilldowns.length+1);return Xl(n.measureSets,(i=>Xl(e,(e=>Array.from(uL(SL(n),e),(e=>({chartType:t,dg:n,isMap:e.some(fL),isTimeline:!!n.timeDrilldown&&!wL.includes(t),key:kL(n.dataset,e,i,t),levels:e,measureSet:i})))))))}var AL={barchart(t,n){const e=pL,{dataset:i,members:r,membersCount:a,timeDrilldown:o}=t,u=SL(t).filter((t=>a[t.caption]>1));if(0===u.length)return[];const l=t.measureSets.filter((t=>{var n;return(null==(n=null==t?void 0:t.measure)?void 0:n.aggregatorType)&&"UNKNOWN"!==t.measure.aggregatorType})),s=!!o;return Xl(l,(a=>{const o={chartType:e,dg:t,measureSet:a,members:r,isTimeline:s},l=Nc(1,u.length+1);return Xl(l,(r=>Array.from(uL(u,r),(r=>{if(xL(t,r)>n.BARCHART_MAX_BARS)return null;return{...o,levels:r,isMap:!1,key:kL(i,r,a,e)}})).filter(Boolean)))}))},barchartyear(t,n){const{membersCount:e,timeDrilldown:i,stdDrilldowns:r}=t,a=r[0]||i;if(!i||e[i.caption]<2||e[a.caption]>n.BARCHART_YEAR_MAX_BARS||r.every((t=>1===e[t.caption])))return[];const o=t.measureSets.filter((({measure:t})=>Oc(["SUM","UNKNOWN"],t.aggregatorType)&&(r.length<2||Oc(["Percentage","Rate"],t.annotations.units_of_measurement))));return CL(mL,{...t,measureSets:o})},donut(t,n){const e=t.measureSets.filter((t=>Oc([O.SUM,O.COUNT],t.measure.aggregatorType))),i=SL(t).filter((n=>t.membersCount[n.caption]>1)),r=Nc(1,i.length+1);return Xl(e,(e=>Xl(r,(r=>Array.from(uL(i,r),(i=>xL(t,i)>n.DONUT_SHAPE_MAX?null:{chartType:_L,dg:t,isMap:!1,isTimeline:!!t.timeDrilldown,key:kL(t.dataset,i,e,_L),levels:i,measureSet:e})).filter(Boolean)))))},pie:(t,n)=>AL.donut(t,n),geomap(t,n){var e,i;const{cuts:r,drilldowns:a,geoDrilldown:o,stdDrilldowns:u,membersCount:l}=t;return!t.topojsonConfig||!o||a.length>2||l[o.caption]<3||u[0]&&((null==(i=r.get(null==(e=u[0])?void 0:e.caption))?void 0:i.length)||1)>1?[]:Xl(t.measureSets,(n=>({chartType:yL,dg:t,isMap:!0,isTimeline:!!t.timeDrilldown,key:kL(t.dataset,a,n,yL),levels:SL(t),measureSet:n})))},histogram:(t,n)=>[],lineplot(t,n){const{membersCount:e,timeDrilldown:i}=t;if(!i||e[i.caption]t.membersCount[e.caption]<=n.LINEPLOT_LINE_MAX)),o=a.length>0?a:r.length>0?[]:[!1];return Xl(t.measureSets,(n=>o.map((e=>{const i=e?[e]:[];return{chartType:vL,dg:t,isMap:fL(e),isTimeline:!1,key:kL(t.dataset,i,n,vL),levels:i,measureSet:n}}))))},stacked(t,n){const{drilldowns:e,membersCount:i,timeDrilldown:r}=t,a=SL(t);if(!r||i[r.caption]t*i[n.caption]),1)>n.STACKED_SHAPE_MAX||a.every((t=>1===i[t.caption])))return[];const o=t.measureSets.filter((({measure:n})=>(!Oc(["AVG","AVERAGE","MEDIAN","NONE"],n.aggregatorType)||Oc(["Percentage","Rate"],n.annotations.units_of_measurement)&&i[e[0].caption]>1)&&dL(t.dataset,n)));return CL("stacked",{...t,measureSets:o})},treemap(t,n){const{dataset:e,membersCount:i,members:r,timeDrilldown:a}=t,o=bL,u=SL(t);if(a&&0===u.length||u.every((t=>1===i[t.caption])))return[];const l=u.filter((t=>i[t.caption]>1)),s=t.measureSets.map((s=>{const{measure:c}=s;if(!Oc(["SUM","UNKNOWN"],c.aggregatorType)||Oc(["Percentage","Rate"],c.annotations.units_of_measurement)&&i[null==u?void 0:u[0].caption]>1||!dL(t.dataset,c))return[];const h={chartType:o,dataset:e,dg:t,measureSet:s,members:r};return function(t,n=[]){if(0===t.length)return[];const e=(t,i=[])=>{if(0===t.length)n.push(i);else for(let n=0;nxL(t,i)>n.TREE_MAP_SHAPE_MAX?null:{...h,levels:i,isMap:!1,isTimeline:!!a,key:kL(e,i,s,o)}))}));return ic(s).filter(Boolean)}};function EL(t,n){const{dataset:e,params:i}=t,{datacap:r,getTopojsonConfig:a}=n,o=new P(t.cube),u=[];for(const w of i.measures){const t=sL(o,w);t&&u.push(t)}const l=new Map,s=new Map,c=[];for(const w of o.levelIterator){for(const t of i.drilldowns)if(w.matches(t)){c.push(w);break}for(const t of i.cuts)if(w.matches(t)){l.set(w.caption,t.members),s.set(w.caption,w);break}}const h=c.find(gL),f=null==h?void 0:h.caption,g=f?Hc(e,(t=>t[f])):void 0,d=c.find(fL),p=d?a(d):void 0,m=c.filter((t=>!gL(t)&&!fL(t))),_=c.map((t=>t.caption)),{members:y,membersCount:v}=function(t,n){const e=Object.fromEntries(Xl(n,(n=>{const e=rL(n,t),i=zs(tc(t,(t=>t[n])),(t=>t[e]));return Array.from(new Set([n,e]),(t=>[t,i.map((n=>n[t]))]))})));return{members:e,membersCount:is(e,(t=>t.length))}}(e,_),b=i.filters.map((t=>({...t,formatter:t.formatter||E,measure:o.measuresByName[t.measure]})));return{cube:o,datacap:r,dataset:e,drilldowns:c,geoDrilldown:d,timeDrilldown:h,stdDrilldowns:m,measureSets:u,filters:b,cuts:l,cutLevels:s,locale:i.locale,maxPeriod:g,params:i,membersCount:v,members:y,topojsonConfig:p}}var ML={BARCHART_MAX_BARS:20,BARCHART_YEAR_MAX_BARS:20,DONUT_SHAPE_MAX:30,LINEPLOT_LINE_POINT_MIN:2,LINEPLOT_LINE_MAX:20,STACKED_SHAPE_MAX:200,STACKED_TIME_MEMBER_MIN:2,TREE_MAP_SHAPE_MAX:1e3};function TL(t,n){var e;const{dg:i,measureSet:r}=t,{locale:a,members:o}=i,{translate:u}=n;let l;l=u("title.measure_and_modifier",{modifier:PL(r.measure.aggregatorType,u),measure:aL(r.measure,a)}).trim();const s=new Set(i.cuts.keys()),c=[],h=[],f=oL(t.levels,(t=>{const n=t.caption,e=aL(t,a),i=o[n];if(1===i.length){s.delete(n);const t="".concat(e,": ").concat(i);return h.unshift(t),null}return s.delete(n),e}));(null==(e=i.timeDrilldown)?void 0:e.caption)&&s.has(i.timeDrilldown.caption)&&s.delete(i.timeDrilldown.caption);const g=oL([...s.values()],(t=>{const n=i.cutLevels.get(t);return n?aL(n,a):null}));c.unshift(...g.filter(Boolean)),c.length>0&&(l+=" ".concat(u("title.of_selected_cut_members",{members:OL(c,u)}))),h.length>0&&(l+=" (".concat(h.join(", "),")")),f.length>0&&(l+=" ".concat(u("title.".concat(t.isTopTen?"top":"by","_drilldowns"),{drilldowns:OL(f,u)})));let d=null;if(i.timeDrilldown){const n=i.timeDrilldown.caption,e=aL(i.timeDrilldown,a),r=rL(e,i.dataset);1===i.membersCount[i.timeDrilldown.caption]?l+=" (".concat(i.dataset[0][e],")"):t.isTimeline?d=t=>{const{minTime:i,maxTime:a}=function(t,n,e){if(!(t&&t.length&&n))return{min:null,max:null};const i=t.reduce(((t,e)=>(e[n]t.max[n]&&(t.max=e),t)),{max:t[0],min:t[0]});return{minTime:cL(i.min,n,e).toString(),maxTime:cL(i.max,n,e).toString()}}(t,r,n);return"".concat(l," (").concat(e,": ").concat((o=a!==i&&a,"".concat(i).concat(o?" - ".concat(o):"")),")");var o}:l+=" ".concat(u("title.over_time"))}return d||l}function OL(t,n){if(2===(t=t.filter(Boolean)).length)return t.join(" ".concat(n("sentence_connectors.and")," "));if(t.length>1){const e=t.slice(),i=e.pop();return[e.join(", "),i].join(" ".concat(n("sentence_connectors.and")," "))}return t.join("")}function PL(t,n){const e=t&&"string"==typeof t&&n("aggregators.".concat(t.toLowerCase()));return e&&!e.includes("aggregators.")?e:""}function jL(t,{translate:n}){const{dg:e,measureSet:i}=t,{locale:r}=e,{measure:a,collection:o,source:u,moe:l,uci:s,lci:c,formatter:h}=i,f=a.name,g=o?o.name:"",d=c?c.name:"",p=l?l.name:"",m=u?u.name:"",_=s?s.name:"",y=function(t,{moeName:n,lciName:e,uciName:i,sourceName:r,collectionName:a}){const o={};let u=t.length;for(;u--;){const l=t[u];o.moe=o.moe||!(isNaN(l[n])||0===l[n]),o.lci=o.lci||!(isNaN(l[e])||0===l[e]),o.uci=o.uci||!(isNaN(l[i])||0===l[i]),o.src=o.src||!!l[r],o.clt=o.clt||!!l[a]}return o}(t.dg.dataset,{collectionName:g,lciName:d,moeName:p,sourceName:m,uciName:_});return{title:n=>t.levels.map((t=>t.caption)).map((t=>Array.isArray(n[t])?e.cuts.has(t)||n._isAggregation?function(t,n=2){return Array.isArray(t)?(t.length>n?[...t.slice(0,n),"and ".concat(t.length-n," more")]:t).join(", "):t}(n[t]):"All ".concat(t):n[t])).map(((t,n)=>n>0?"(".concat(t,")"):t)).join(" "),tbody:e=>{const i=[];if(y.lci&&y.uci?i.push([n("chart_labels.ci"),t=>"".concat(h(1*t[d]||0,r)," - ").concat(h(1*t[_]||0,r))]):y.moe&&i.push([n("chart_labels.moe"),t=>"± ".concat(h(1*t[p]||0,r))]),y.src&&i.push([n("chart_labels.source"),t=>"".concat(t[m])]),y.clt&&i.push([n("chart_labels.collection"),t=>"".concat(t[g])]),t.dg.timeDrilldown){const n=aL(t.dg.timeDrilldown,r),a=t.dg.timeDrilldown.caption;i.push([n,e[a]])}return i.push([aL(a,r),h(e[f],r)]),i}}}var BL={barchart(t,n,e){const{levels:i,dg:r}=t,{locale:a,timeDrilldown:o}=r,{formatter:u,measure:l}=t.measureSet,s=n.userConfig.locale||a,c=i[0],h=c.caption,f={groupBy:[h],groupPadding:e?5:1,discrete:"y",x:l.name,xConfig:{title:aL(l,a),tickFormat:t=>u(t,s)},y:h,yConfig:{title:aL(c,a),ticks:[]},stacked:"SUM"===l.aggregatorType&&c.depth>1,ySort:(g=h,d=r.members[h],hL(d)?(t,n)=>lL(t[g])-lL(n[g]):(t,n)=>"".localeCompare.call(t[g]||"",n[g]||""))};var g,d;if(o){const t=o.hierarchy;f.groupBy=t.levels.slice(0,1).filter((t=>t.caption in r.dataset[0])).concat(i).map((t=>t.caption)),f.time=o.caption}else i.length>1&&(f.groupBy=i.map((t=>t.caption)));return f.time||delete f.total,f},barchartyear(t,n,e){const{levels:i,dg:r}=t,{locale:a,timeDrilldown:o}=r,{formatter:u,measure:l}=t.measureSet,s=n.userConfig.locale||a,c=i[0].caption,h=l.name,f=o?o.caption:c;return{discrete:"x",groupPadding:e?5:1,time:f,timeline:!1,x:f,xConfig:{title:o?aL(o,a):null},y:h,yConfig:{title:aL(l,a),tickFormat:t=>u(t,s)},stacked:!0,groupBy:[c]}},donut(t){const{levels:n,dg:e}=t,{timeDrilldown:i}=e,r={groupBy:n.map((t=>t.caption))};return i&&(r.time=i.caption),r},geomap(t,n){const{levels:e,dg:i}=t,{cuts:r,locale:a,timeDrilldown:o,geoDrilldown:u}=i,{formatter:l,measure:s}=t.measureSet,c=n.userConfig.locale||a,h=s.name,f=u?u.caption:e[0].caption,g=qc({colorScale:h,colorScaleConfig:{axisConfig:{tickFormat:t=>l(t,c)},scale:"jenks"},colorScalePosition:"right",groupBy:["ID ".concat(f)in i.dataset[0]?"ID ".concat(f):"".concat(f," ID")in i.dataset[0]?"".concat(f," ID"):f],zoomScroll:!1},i.topojsonConfig),d=r.get(f);return d&&!g.fitFilter&&(g.fitFilter=t=>d.indexOf(t.id)>-1),o&&(g.time=o.caption),g},histogram(t,n,e){const i=BL.barchart(t,n,e);return i.groupPadding=0,i},lineplot(t,n){var e;const{levels:i,dg:r}=t,{locale:a,timeDrilldown:o}=r,{formatter:u,measure:l}=t.measureSet,{userConfig:s,showConfidenceInt:c}=n,h=s.locale||a,f=null==(e=i[0])?void 0:e.caption,g=l.name,d=null==o?void 0:o.caption,p={confidence:!1,discrete:"x",groupBy:(null==i?void 0:i.length)?i.map((t=>t.caption)):()=>"ALL",x:d,xConfig:{title:o?aL(o,r.locale):void 0},y:g,yConfig:{scale:"auto",tickFormat:t=>u(t,h),title:aL(l,a)},time:d,timeline:!1,total:!1};if(t.isTopTen&&(p.yConfig.title="Top ".concat(r.membersCount[f]," items, ").concat(p.yConfig.title)),c&&r.members[f].length<13){const{moe:n,lci:e,uci:i}=t.measureSet;if(e&&i){const t=e.name,n=i.name;p.confidence=[n=>n[t],t=>t[n]]}else if(n){const t=n.name;p.confidence=[n=>n[g]-n[t],n=>n[g]+n[t]]}}return p},pie:(t,n,e)=>BL.donut(t,n,e),stacked(t,n,e){const{levels:i}=t,{measure:r}=t.measureSet,a=BL.lineplot(t,n,e);return a.yConfig={scale:"linear",title:aL(r,t.dg.locale)},i.length>1&&(a.groupBy=i.map((t=>t.caption))),a},treemap(t){const{levels:n,dg:e}=t,{timeDrilldown:i}=e,r=n[0],a=n.slice(1),o=r.hierarchy.levels,u=o.indexOf(r),l={groupBy:o.slice(0,u+1).concat(a).map((t=>t.caption))};return i&&(l.time=i.caption),l.threshold=.005,l.thresholdName=r.caption,l}};function DL(...t){const[n,...e]=t;return Array.isArray(e)&&e.length>0?t=>"".concat(t[n]," (").concat(e.map((n=>t[n])).join(", "),")"):t=>"".concat(t[n])}T({defaultLocale:"en",defaultTranslation:{action_close:"Close",action_enlarge:"Enlarge",action_fileissue:"File an issue",action_retry:"Retry",aggregators:{avg:"Average",max:"Max",min:"Min",sum:""},chart_labels:{ci:"Confidence Interval",moe:"Margin of Error",source:"Source",collection:"Collection"},error:{detail:"",message:'Details: "{{message}}".',title:"Error"},sentence_connectors:{and:"and"},title:{nonidealstate:"No results",of_selected_cut_members:"of Selected {{members}} Members",top_drilldowns:"for Top {{drilldowns}}",by_drilldowns:"by {{drilldowns}}",over_time:"Over Time",measure_and_modifier:"{{modifier}} {{measure}}",total:"Total"}}});var zL={barchart:$A,barchartyear:$A,donut:HE,geomap:ZF,histogram:$A,lineplot:JF,pie:$F,stacked:nL,treemap:iL};function NL(t,n){var e;const i={...ML,...n.chartLimits},r=n.chartTypes||Object.keys(zL),a={datacap:null!=(e=n.datacap)?e:2e4,getTopojsonConfig:RL(n.topojsonConfig||{})};return Xl(t,(t=>{const n=EL(t,a);return Xl(r,(t=>function(t,n,e){return AL.hasOwnProperty(n)?AL[n](t,e):CL(n,t)}(n,t,i)))}))}function RL(t){return"function"==typeof t?t:n=>t[n.uniqueName]||t[n.fullName]||t[n.name]}var FL,LL,IL,HL,GL=Object.create,KL=Object.defineProperty,UL=Object.getOwnPropertyDescriptor,qL=Object.getOwnPropertyNames,WL=Object.getOwnPropertySymbols,YL=Object.getPrototypeOf,VL=Object.prototype.hasOwnProperty,ZL=Object.prototype.propertyIsEnumerable,XL=Math.pow,JL=(t,n,e)=>n in t?KL(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,QL=(t,n)=>{for(var e in n||(n={}))VL.call(n,e)&&JL(t,e,n[e]);if(WL)for(var e of WL(n))ZL.call(n,e)&&JL(t,e,n[e]);return t},$L=(t,n,e)=>new Promise(((i,r)=>{var a=t=>{try{u(e.next(t))}catch(n){r(n)}},o=t=>{try{u(e.throw(t))}catch(n){r(n)}},u=t=>t.done?i(t.value):Promise.resolve(t.value).then(a,o);u((e=e.apply(t,n)).next())})),tI=(FL={"node_modules/tsup/assets/esm_shims.js"(){}},function(){return FL&&(LL=(0,FL[qL(FL)[0]])(FL=0)),LL}),nI=(IL={"../../node_modules/file-saver/FileSaver.js"(t,n){tI();var e=e||function(t){if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var n=t.document,e=function(){return t.URL||t.webkitURL||t},i=n.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in i,a=/constructor/i.test(t.HTMLElement)||t.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(n){(t.setImmediate||t.setTimeout)((function(){throw n}),0)},l=function(t){setTimeout((function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()}),4e4)},s=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},c=function(n,c,h){h||(n=s(n));var f,g=this,d="application/octet-stream"===n.type,p=function(){!function(t,n,e){for(var i=(n=[].concat(n)).length;i--;){var r=t["on"+n[i]];if("function"==typeof r)try{r.call(t,e||t)}catch(a){u(a)}}}(g,"writestart progress write writeend".split(" "))};if(g.readyState=g.INIT,r)return f=e().createObjectURL(n),void setTimeout((function(){var t,n;i.href=f,i.download=c,t=i,n=new MouseEvent("click"),t.dispatchEvent(n),p(),l(f),g.readyState=g.DONE}));!function(){if((o||d&&a)&&t.FileReader){var i=new FileReader;return i.onloadend=function(){var n=o?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(n,"_blank")||(t.location.href=n),n=void 0,g.readyState=g.DONE,p()},i.readAsDataURL(n),void(g.readyState=g.INIT)}f||(f=e().createObjectURL(n)),d?t.location.href=f:t.open(f,"_blank")||(t.location.href=f),g.readyState=g.DONE,p(),l(f)}()},h=c.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,n,e){return n=n||t.name||"download",e||(t=s(t)),navigator.msSaveOrOpenBlob(t,n)}:(h.abort=function(){},h.readyState=h.INIT=0,h.WRITING=1,h.DONE=2,h.error=h.onwritestart=h.onprogress=h.onwrite=h.onabort=h.onerror=h.onwriteend=null,function(t,n,e){return new c(t,n||t.name||"download",e)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||t.content);void 0!==n&&n.exports?n.exports.saveAs=e:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",(function(){return e}))}},function(){return HL||(0,IL[qL(IL)[0]])((HL={exports:{}}).exports,HL),HL.exports});function eI(t){var n,e,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;nt.active)).map(n)}tI(),tI(),tI();var aI={BARCHART_MAX_BARS:20,BARCHART_YEAR_MAX_BARS:20,DONUT_SHAPE_MAX:30,LINEPLOT_LINE_POINT_MIN:2,LINEPLOT_LINE_MAX:20,STACKED_SHAPE_MAX:200,STACKED_TIME_MEMBER_MIN:2,TREE_MAP_SHAPE_MAX:1e3};tI(),tI(),tI(),tI(),tI(),tI(),tI();var oI=(()=>{let t=0;return()=>(t+=1,"u".concat("0000".concat((Math.random()*XL(36,4)|0).toString(36)).slice(-4)).concat(t))})();function uI(t){const n=[];for(let e=0,i=t.length;e{const i=new Image;i.decode=()=>n(i),i.onload=()=>n(i),i.onerror=e,i.crossOrigin="anonymous",i.decoding="async",i.src=t}))}function fI(t,n,e){return $L(this,null,(function*(){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject");return r.setAttribute("width","".concat(n)),r.setAttribute("height","".concat(e)),r.setAttribute("viewBox","0 0 ".concat(n," ").concat(e)),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),r.appendChild(a),a.appendChild(t),function(t){return $L(this,null,(function*(){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(t))).then(encodeURIComponent).then((t=>"data:image/svg+xml;charset=utf-8,".concat(t)))}))}(r)}))}var gI=(t,n)=>{if(t instanceof n)return!0;const e=Object.getPrototypeOf(t);return null!==e&&(e.constructor.name===n.name||gI(e,n))};function dI(t,n,e){const i=".".concat(t,":").concat(n),r=e.cssText?function(t){const n=t.getPropertyValue("content");return"".concat(t.cssText," content: '").concat(n.replace(/'|"/g,""),"';")}(e):function(t){return uI(t).map((n=>{const e=t.getPropertyValue(n),i=t.getPropertyPriority(n);return"".concat(n,": ").concat(e).concat(i?" !important":"",";")})).join(" ")}(e);return document.createTextNode("".concat(i,"{").concat(r,"}"))}function pI(t,n,e){const i=window.getComputedStyle(t,e),r=i.getPropertyValue("content");if(""===r||"none"===r)return;const a=oI();try{n.className="".concat(n.className," ").concat(a)}catch(u){return}const o=document.createElement("style");o.appendChild(dI(a,e,i)),n.appendChild(o)}tI();var mI="application/font-woff",_I="image/jpeg",yI={woff:mI,woff2:mI,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:_I,jpeg:_I,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function vI(t){const n=function(t){const n=/\.([^./]*?)$/g.exec(t);return n?n[1]:""}(t).toLowerCase();return yI[n]||""}function bI(t){return-1!==t.search(/^(data:)/)}function wI(t,n){return"data:".concat(n,";base64,").concat(t)}function SI(t,n,e){return $L(this,null,(function*(){const i=yield fetch(t,n);if(404===i.status)throw new Error('Resource "'.concat(i.url,'" not found'));const r=yield i.blob();return new Promise(((t,n)=>{const a=new FileReader;a.onerror=n,a.onloadend=()=>{try{t(e({res:i,result:a.result}))}catch(r){n(r)}},a.readAsDataURL(r)}))}))}tI();var xI={};function kI(t,n,e){return $L(this,null,(function*(){const i=function(t,n,e){let i=t.replace(/\?.*/,"");return e&&(i=t),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),n?"[".concat(n,"]").concat(i):i}(t,n,e.includeQueryParams);if(null!=xI[i])return xI[i];let r;e.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());try{const i=yield SI(t,e.fetchRequestInit,(({res:t,result:e})=>(n||(n=t.headers.get("Content-Type")||""),function(t){return t.split(/,/)[1]}(e))));r=wI(i,n)}catch(a){r=e.imagePlaceholder||"";let n="Failed to fetch resource: ".concat(t);a&&(n="string"==typeof a?a:a.message),n&&console.warn(n)}return xI[i]=r,r}))}function CI(t,n){return $L(this,null,(function*(){return gI(t,HTMLCanvasElement)?function(t){return $L(this,null,(function*(){const n=t.toDataURL();return"data:,"===n?t.cloneNode(!1):hI(n)}))}(t):gI(t,HTMLVideoElement)?function(t,n){return $L(this,null,(function*(){if(t.currentSrc){const n=document.createElement("canvas"),e=n.getContext("2d");return n.width=t.clientWidth,n.height=t.clientHeight,null==e||e.drawImage(t,0,0,n.width,n.height),hI(n.toDataURL())}const e=t.poster,i=vI(e);return hI(yield kI(e,i,n))}))}(t,n):gI(t,HTMLIFrameElement)?function(t){return $L(this,null,(function*(){var n;try{if(null===(n=null==t?void 0:t.contentDocument)||void 0===n?void 0:n.body)return yield MI(t.contentDocument.body,{},!0)}catch(e){}return t.cloneNode(!1)}))}(t):t.cloneNode(!1)}))}var AI=t=>null!=t.tagName&&"SLOT"===t.tagName.toUpperCase();function EI(t,n){return gI(n,Element)&&(function(t,n){const e=n.style;if(!e)return;const i=window.getComputedStyle(t);i.cssText?(e.cssText=i.cssText,e.transformOrigin=i.transformOrigin):uI(i).forEach((r=>{let a=i.getPropertyValue(r);if("font-size"===r&&a.endsWith("px")){const t=Math.floor(parseFloat(a.substring(0,a.length-2)))-.1;a="".concat(t,"px")}gI(t,HTMLIFrameElement)&&"display"===r&&"inline"===a&&(a="block"),"d"===r&&n.getAttribute("d")&&(a="path(".concat(n.getAttribute("d"),")")),e.setProperty(r,a,i.getPropertyPriority(r))}))}(t,n),function(t,n){pI(t,n,":before"),pI(t,n,":after")}(t,n),function(t,n){gI(t,HTMLTextAreaElement)&&(n.innerHTML=t.value),gI(t,HTMLInputElement)&&n.setAttribute("value",t.value)}(t,n),function(t,n){if(gI(t,HTMLSelectElement)){const e=n,i=Array.from(e.children).find((n=>t.value===n.getAttribute("value")));i&&i.setAttribute("selected","")}}(t,n)),n}function MI(t,n,e){return $L(this,null,(function*(){return e||!n.filter||n.filter(t)?Promise.resolve(t).then((t=>CI(t,n))).then((e=>function(t,n,e){return $L(this,null,(function*(){var i,r;let a=[];return a=AI(t)&&t.assignedNodes?uI(t.assignedNodes()):gI(t,HTMLIFrameElement)&&(null===(i=t.contentDocument)||void 0===i?void 0:i.body)?uI(t.contentDocument.body.childNodes):uI((null!==(r=t.shadowRoot)&&void 0!==r?r:t).childNodes),0===a.length||gI(t,HTMLVideoElement)||(yield a.reduce(((t,i)=>t.then((()=>MI(i,e))).then((t=>{t&&n.appendChild(t)}))),Promise.resolve())),n}))}(t,e,n))).then((n=>EI(t,n))).then((t=>function(t,n){return $L(this,null,(function*(){const e=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===e.length)return t;const i={};for(let a=0;a{for(;;){const[e,,i]=OI.exec(t)||[];if(!i)return"";if(i===n)return"src: ".concat(e,";")}})):t}(t,e),r=function(t){const n=[];return t.replace(TI,((t,e,i)=>(n.push(i),t))),n.filter((t=>!bI(t)))}(i);return r.reduce(((t,i)=>t.then((t=>jI(t,i,n,e)))),Promise.resolve(i))}))}function zI(t,n,e){return $L(this,null,(function*(){var i;const r=null===(i=n.style)||void 0===i?void 0:i.getPropertyValue(t);if(r){const i=yield DI(r,null,e);return n.style.setProperty(t,i,n.style.getPropertyPriority(t)),!0}return!1}))}function NI(t,n){return $L(this,null,(function*(){gI(t,Element)&&(yield function(t,n){return $L(this,null,(function*(){(yield zI("background",t,n))||(yield zI("background-image",t,n)),(yield zI("mask",t,n))||(yield zI("mask-image",t,n))}))}(t,n),yield function(t,n){return $L(this,null,(function*(){const e=gI(t,HTMLImageElement);if((!e||bI(t.src))&&(!gI(t,SVGImageElement)||bI(t.href.baseVal)))return;const i=e?t.src:t.href.baseVal,r=yield kI(i,vI(i),n);yield new Promise(((n,i)=>{t.onload=n,t.onerror=i;const a=t;a.decode&&(a.decode=n),"lazy"===a.loading&&(a.loading="eager"),e?(t.srcset="",t.src=r):t.href.baseVal=r}))}))}(t,n),yield function(t,n){return $L(this,null,(function*(){const e=uI(t.childNodes).map((t=>NI(t,n)));yield Promise.all(e).then((()=>t))}))}(t,n))}))}tI(),tI();var RI={};function FI(t){return $L(this,null,(function*(){let n=RI[t];if(null!=n)return n;const e=yield fetch(t),i=yield e.text();return n={url:t,cssText:i},RI[t]=n,n}))}function LI(t,n){return $L(this,null,(function*(){let e=t.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,r=(e.match(/url\([^)]+\)/g)||[]).map((r=>$L(this,null,(function*(){let a=r.replace(i,"$1");return a.startsWith("https://")||(a=new URL(a,t.url).href),SI(a,n.fetchRequestInit,(({result:t})=>(e=e.replace(r,"url(".concat(t,")")),[r,t])))}))));return Promise.all(r).then((()=>e))}))}function II(t){if(null==t)return[];const n=[];let e=t.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const t=i.exec(e);if(null===t)break;n.push(t[0])}e=e.replace(i,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=r.exec(e);if(null===t){if(t=a.exec(e),null===t)break;r.lastIndex=a.lastIndex}else a.lastIndex=r.lastIndex;n.push(t[0])}return n}function HI(t,n){return $L(this,null,(function*(){if(null==t.ownerDocument)throw new Error("Provided element is not within a Document");const e=uI(t.ownerDocument.styleSheets),i=yield function(t,n){return $L(this,null,(function*(){const e=[],i=[];return t.forEach((e=>{if("cssRules"in e)try{uI(e.cssRules||[]).forEach(((t,r)=>{if(t.type===CSSRule.IMPORT_RULE){let a=r+1;const o=FI(t.href).then((t=>LI(t,n))).then((t=>II(t).forEach((t=>{try{e.insertRule(t,t.startsWith("@import")?a+=1:e.cssRules.length)}catch(n){console.error("Error inserting rule from remote css",{rule:t,error:n})}})))).catch((t=>{console.error("Error loading remote css",t.toString())}));i.push(o)}}))}catch(r){const a=t.find((t=>null==t.href))||document.styleSheets[0];null!=e.href&&i.push(FI(e.href).then((t=>LI(t,n))).then((t=>II(t).forEach((t=>{a.insertRule(t,e.cssRules.length)})))).catch((t=>{console.error("Error loading remote stylesheet",t)}))),console.error("Error inlining remote css file",r)}})),Promise.all(i).then((()=>(t.forEach((t=>{if("cssRules"in t)try{uI(t.cssRules||[]).forEach((t=>{e.push(t)}))}catch(n){console.error("Error while reading CSS rules from ".concat(t.href),n)}})),e)))}))}(e,n);return function(t){return t.filter((t=>t.type===CSSRule.FONT_FACE_RULE)).filter((t=>BI(t.style.getPropertyValue("src"))))}(i)}))}function GI(t,n){return $L(this,null,(function*(){const e=null!=n.fontEmbedCSS?n.fontEmbedCSS:n.skipFonts?null:yield function(t,n){return $L(this,null,(function*(){const e=yield HI(t,n);return(yield Promise.all(e.map((t=>{const e=t.parentStyleSheet?t.parentStyleSheet.href:null;return DI(t.cssText,e,n)})))).join("\n")}))}(t,n);if(e){const n=document.createElement("style"),i=document.createTextNode(e);n.appendChild(i),t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}}))}function KI(t){return $L(this,arguments,(function*(t,n={}){const{width:e,height:i}=sI(t,n),r=yield MI(t,n,!0);yield GI(r,n),yield NI(r,n),function(t,n){const{style:e}=t;n.backgroundColor&&(e.backgroundColor=n.backgroundColor),n.width&&(e.width="".concat(n.width,"px")),n.height&&(e.height="".concat(n.height,"px"));const i=n.style;null!=i&&Object.keys(i).forEach((t=>{e[t]=i[t]}))}(r,n);return yield fI(r,e,i)}))}function UI(t){return $L(this,arguments,(function*(t,n={}){const{width:e,height:i}=sI(t,n),r=yield KI(t,n),a=yield hI(r),o=document.createElement("canvas"),u=o.getContext("2d"),l=n.pixelRatio||function(){let t,n;try{n=process}catch(i){}const e=n&&n.env?n.env.devicePixelRatio:null;return e&&(t=parseInt(e,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}(),s=n.canvasWidth||e,c=n.canvasHeight||i;return o.width=s*l,o.height=c*l,n.skipAutoScale||function(t){(t.width>cI||t.height>cI)&&(t.width>cI&&t.height>cI?t.width>t.height?(t.height*=cI/t.width,t.width=cI):(t.width*=cI/t.height,t.height=cI):t.width>cI?(t.height*=cI/t.width,t.width=cI):(t.width*=cI/t.height,t.height=cI))}(o),o.style.width="".concat(s),o.style.height="".concat(c),n.backgroundColor&&(u.fillStyle=n.backgroundColor,u.fillRect(0,0,o.width,o.height)),u.drawImage(a,0,0,o.width,o.height),o}))}function qI(t){return $L(this,arguments,(function*(t,n={}){const e=yield UI(t,n),i=yield function(t,n={}){return t.toBlob?new Promise((e=>{t.toBlob(e,n.type?n.type:"image/png",n.quality?n.quality:1)})):new Promise((e=>{const i=window.atob(t.toDataURL(n.type?n.type:void 0,n.quality?n.quality:void 0).split(",")[1]),r=i.length,a=new Uint8Array(r);for(let t=0;t(e=null!=t?GL(YL(t)):{},((t,n,e,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let r of qL(n))VL.call(t,r)||r===e||KL(t,r,{get:()=>n[r],enumerable:!(i=UL(n,r))||i.enumerable});return t})(!n&&t&&t.__esModule?e:KL(e,"default",{value:t,enumerable:!0}),t)))(nI(),1),YI={filename:"download",type:"png"};tI();var VI=class extends L.Component{constructor(){super(...arguments),this.state={message:"",name:""},this.clearError=()=>this.setState({message:"",name:""})}static getDerivedStateFromError(t){return{message:t.message,name:t.name}}render(){const{message:t,name:n}=this.state;return t?L.createElement(B,null,(({translate:e})=>{const i=e("error.detail");return L.createElement(I,{p:"xl",align:"center",justify:"center",direction:"column",className:"chart-card error"},L.createElement(H,{order:3},e("error.title")),i.length?L.createElement(G,null,i):null,L.createElement(G,null,e("error.message",{message:t})),L.createElement(K,{spacing:"xs",my:"sm"},L.createElement(U,{onClick:this.clearError,size:"xs",variant:"light"},e("action_retry")),L.createElement(U,{error:n,message:t})))})):this.props.children}},ZI={barchart:$A,barchartyear:$A,donut:HE,geomap:ZF,histogram:$A,lineplot:JF,pie:$F,stacked:nL,treemap:iL},XI={jpg:$,png:$,svg:tt};function JI(t){const{chart:n,currentChart:e,isSingleChart:i}=t,r=e===n.key,{translate:a,locale:o}=z(),u=F.useRef(null),l=ZI[n.chartType],s=F.useMemo((()=>function(t,n){const{translate:e}=n,{chartType:i,dg:r,measureSet:a,levels:o}=t,{timeDrilldown:u,locale:l}=r,{formatter:s,measure:c}=a,{isSingleChart:h,isUniqueChart:f,userConfig:g}=n,d=g.locale||l,p=o.map((t=>t.caption)),m=c.name,_=n.currentChart===t.key||f||h,y=qc({tooltipConfig:jL(t,n),totalFormat:t=>"".concat(e("title.total"),": ").concat(s(t,d)),yConfig:{title:aL(c,l),tickFormat:t=>s(t,d)},label:DL(...p),locale:d,sum:m,value:m},BL[i](t,n,_),g);if(void 0===y.title&&(y.title=TL(t,n)),!Oc(["Percentage","Rate"],c.annotations.units_of_measurement)&&Oc(["SUM","UNKNOWN"],c.aggregatorType)&&(y.total=!!_&&m),u&&y.time&&t.isTimeline&&(y.timeline=!0),qc(y,n.measureConfig(c)||{}),y.data=r.dataset,!_){const t={barConfig:{stroke:"transparent"},padding:0,tickFormat:()=>!1,tickSize:0,shapeConfig:{fill:"transparent",height:0,label:!1,stroke:"transparent",r:0,width:0},title:!1};qc(y,{colorScalePosition:!1,legend:!1,timeline:!1,timePersist:!1,subtitlePadding:!1,titlePadding:!1,total:!1,xConfig:t,yConfig:t,zoom:!1})}return y}(n,{currentChart:e,isSingleChart:i,isUniqueChart:i,measureConfig:t.measureConfig,showConfidenceInt:Boolean(t.showConfidenceInt),translate:(t,n)=>a("vizbuilder.".concat(t),n),userConfig:t.userConfig||{}})),[n,i,o]),c=F.useMemo((()=>{if(!r&&!i)return[];const n=(s.title instanceof Function?s.title():s.title).replace(/[^\w]/g,"_").replace(/[_]+/g,"_");return(e=t.downloadFormats,[].concat(e).filter((t=>null!=t))).map((t=>{const e=t.toLowerCase(),i=XI[e]||Q;return L.createElement(U,{compact:!0,key:t,leftIcon:L.createElement(i,{size:16}),onClick:()=>{const{current:t}=u,i=t&&t.querySelector("svg");i&&function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function i(t){(0,WI.saveAs)(t,"".concat(n.filename,".").concat(n.type)),n.callback&&n.callback()}t&&(n=Object.assign({},YI,n),e=Object.assign({backgroundColor:e.background},e),"svg"===n.type?KI(t,e).then((function(t){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){return i(n.response)},n.send()})):qI(t,e).then(i))}(i,{filename:n,type:e},{background:QI(i)})},size:"sm",variant:"light"},t.toUpperCase())}));var e}),[r,i,t.downloadFormats]),h=F.useMemo((()=>{if(!r&&i)return null;const n=r?J:X;return L.createElement(U,{compact:!0,leftIcon:L.createElement(n,{size:16}),onClick:t.onToggle,size:"sm",variant:r?"filled":"light"},a(r?"vizbuilder.action_close":"vizbuilder.action_enlarge"))}),[r,i,o,t.onToggle]),f=r?"calc(100vh - 3rem)":i?"75vh":300;return L.createElement(V,{h:f,w:"100%",style:{overflow:"hidden"}},L.createElement(VI,null,L.createElement(Z,{spacing:0,h:f,style:{position:"relative"},w:"100%"},L.createElement(K,{position:"right",p:"xs",spacing:"xs",align:"center"},c,h),L.createElement(W,{style:{flex:"1 1 auto"},ref:u,pb:"xs",px:"xs"},L.createElement(l,{config:s})))))}var QI=t=>{if(t.nodeType!==Node.ELEMENT_NODE)return"white";const n=window.getComputedStyle(t).getPropertyValue("background-color");return n&&"rgba(0, 0, 0, 0)"!==n&&"transparent"!==n?n:QI(t.parentNode)};function $I(){const{translate:t}=z();return L.createElement(W,{className:"vizbuilder-nonidealstate"},L.createElement(H,{order:1,className:"vizbuilder-nonidealstate-header"},t("nonidealstate_msg")))}const tH=function(t){const{chartTypes:n,datacap:e,defaultLocale:i="en",downloadFormats:r,nonIdealState:a=$I,showConfidenceInt:o=!1,topojsonConfig:u,userConfig:l={}}=t,s="function"==typeof(c=t.measureConfig||{})?c:t=>c[t.name];var c;const h={chartLimits:QL(QL({},aI),t.chartLimits),chartTypes:n,datacap:e,topojsonConfig:u};return f.defaultProps={version:"0.5.0"},f;function f(t){const{cube:n,panelKey:e,params:u,result:c}=t,{actions:f,formatters:g}=D(),[d,p]=F.useMemo((()=>"".concat(e||"","-").split("-")),[e]),m=F.useCallback((()=>{f.switchPanel(d)}),[d]),_=F.useMemo((()=>NL([{cube:n,dataset:c.data,params:{locale:u.locale||i,booleans:u.booleans,cuts:rI(u.cuts,(t=>({dimension:t.dimension,hierarchy:t.hierarchy,level:t.level,members:t.members}))),drilldowns:rI(u.drilldowns,(t=>({caption:t.captionProperty,dimension:t.dimension,hierarchy:t.hierarchy,level:t.level,properties:t.properties.map((t=>t.name))}))),filters:rI(u.filters,(t=>({constraint1:[t.conditionOne[0],t.conditionOne[2]],constraint2:t.conditionTwo?[t.conditionTwo[0],t.conditionTwo[2]]:void 0,formatter:g[t.measure],joint:t.joint,measure:t.measure}))),measures:rI(u.measures,(t=>({formatter:g[t.name],measure:t.name})))}}],h)),[n,c.data,u]),y=F.useMemo((()=>{const t=1===_.length,n=[...new Map(_.map((t=>[t.key,t]))).values()];return 0===n.length?L.createElement(a,null):L.createElement(q,{breakpoints:[{minWidth:"xs",cols:Math.min(1,n.length)},{minWidth:"md",cols:Math.min(2,n.length)},{minWidth:"lg",cols:Math.min(3,n.length)},{minWidth:"xl",cols:Math.min(4,n.length)}],className:iI({unique:1===n.length})},n.map((n=>L.createElement(JI,{chart:n,currentChart:"",downloadFormats:r,isSingleChart:t,key:n.key,measureConfig:s,onToggle:()=>{f.switchPanel("".concat(d,"-").concat(n.key))},showConfidenceInt:o,userConfig:l}))))}),[p,_]),v=F.useMemo((()=>{const t=_.find((t=>p&&t.key===p));return t?L.createElement(JI,{chart:t,currentChart:p,downloadFormats:r,isSingleChart:!0,key:"".concat(t.key,"-focus"),measureConfig:s,onToggle:m,showConfidenceInt:o,userConfig:l}):null}),[p,_]);return L.createElement(W,{className:t.className,p:"sm"},y,L.createElement(Y,{centered:!0,onClose:m,opened:""!==p,padding:0,size:"calc(100vw - 3rem)",styles:{content:{maxHeight:"none !important"},inner:{padding:"0 !important"}},withCloseButton:!1},v))}}({chartTypes:["barchart","barchartyear","lineplot","stacked","treemap","geomap","donut"],downloadFormats:["svg","png"],showConfidenceInt:!1});export{tH as default}; diff --git a/explorer/assets/vizbuilder-legacy-6ffafa1e.js b/explorer/assets/vizbuilder-legacy-6ffafa1e.js new file mode 100644 index 0000000..e109581 --- /dev/null +++ b/explorer/assets/vizbuilder-legacy-6ffafa1e.js @@ -0,0 +1 @@ +System.register(["./index-legacy-229ca80c.js","./extras-legacy-436a21b2.js"],(function(t,n){"use strict";var e,i,r,o,a,u,l,s,c,h,f,g,d,p,m,_,y,v,b,w,S,x,k,C,A,E,M,T,O;return{setters:[t=>{e=t.c,i=t.e,r=t.f,o=t.a,a=t.b,u=t.d,l=t.g,s=t.P,c=t.t,h=t.A,f=t.C,g=t.D,d=t.T,p=t.u,m=t.h},t=>{_=t.h,y=t.g,v=t.r,b=t.R,w=t.F,S=t.a6,x=t.j,k=t._,C=t.G,A=t.$,E=t.B,M=t.E,T=t.P,O=t.y}],execute:function(){var n=e("arrows-maximize","IconArrowsMaximize",[["path",{d:"M16 4l4 0l0 4",key:"svg-0"}],["path",{d:"M14 10l6 -6",key:"svg-1"}],["path",{d:"M8 20l-4 0l0 -4",key:"svg-2"}],["path",{d:"M4 20l6 -6",key:"svg-3"}],["path",{d:"M16 20l4 0l0 -4",key:"svg-4"}],["path",{d:"M14 14l6 6",key:"svg-5"}],["path",{d:"M8 4l-4 0l0 4",key:"svg-6"}],["path",{d:"M4 4l6 6",key:"svg-7"}]]),P=e("arrows-minimize","IconArrowsMinimize",[["path",{d:"M5 9l4 0l0 -4",key:"svg-0"}],["path",{d:"M3 3l6 6",key:"svg-1"}],["path",{d:"M5 15l4 0l0 4",key:"svg-2"}],["path",{d:"M3 21l6 -6",key:"svg-3"}],["path",{d:"M19 9l-4 0l0 -4",key:"svg-4"}],["path",{d:"M15 9l6 -6",key:"svg-5"}],["path",{d:"M19 15l-4 0l0 4",key:"svg-6"}],["path",{d:"M15 15l6 6",key:"svg-7"}]]),j=e("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),B=e("photo-down","IconPhotoDown",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M12.5 21h-6.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6.5",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l4 4",key:"svg-2"}],["path",{d:"M14 14l1 -1c.653 -.629 1.413 -.815 2.13 -.559",key:"svg-3"}],["path",{d:"M19 16v6",key:"svg-4"}],["path",{d:"M22 19l-3 3l-3 -3",key:"svg-5"}]]),D=e("vector-triangle","IconVectorTriangle",[["path",{d:"M10 4m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M17 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M6.5 17.1l5 -9.1",key:"svg-3"}],["path",{d:"M17.5 17.1l-5 -9.1",key:"svg-4"}],["path",{d:"M7 19l10 0",key:"svg-5"}]]);const z=new Date,N=new Date;function R(t,n,e,i){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),r.round=t=>{const n=r(t),e=r.ceil(t);return t-n(n(t=new Date(+t),null==e?1:Math.floor(e)),t),r.range=(e,i,o)=>{const a=[];if(e=r.ceil(e),o=null==o?1:Math.floor(o),!(e0))return a;let u;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(uR((n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;n(t,-1),!e(t););else for(;--i>=0;)for(;n(t,1),!e(t););})),e&&(r.count=(n,i)=>(z.setTime(+n),N.setTime(+i),t(z),t(N),Math.floor(e(z,N))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?n=>i(n)%t==0:n=>r.count(0,n)%t==0):r:null)),r}const F=R((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));F.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?R((n=>{n.setTime(Math.floor(n/t)*t)}),((n,e)=>{n.setTime(+n+e*t)}),((n,e)=>(e-n)/t)):F:null),F.range;const L=1e3,I=6e4,H=36e5,G=864e5,K=6048e5,U=2592e6,q=31536e6,W=R((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*L)}),((t,n)=>(n-t)/L),(t=>t.getUTCSeconds()));W.range;const $=R((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*L)}),((t,n)=>{t.setTime(+t+n*I)}),((t,n)=>(n-t)/I),(t=>t.getMinutes()));$.range;const Y=R((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*I)}),((t,n)=>(n-t)/I),(t=>t.getUTCMinutes()));Y.range;const V=R((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*L-t.getMinutes()*I)}),((t,n)=>{t.setTime(+t+n*H)}),((t,n)=>(n-t)/H),(t=>t.getHours()));V.range;const Z=R((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*H)}),((t,n)=>(n-t)/H),(t=>t.getUTCHours()));Z.range;const X=R((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*I)/G),(t=>t.getDate()-1));X.range;const J=R((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/G),(t=>t.getUTCDate()-1));J.range;const Q=R((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/G),(t=>Math.floor(t/G)));function tt(t){return R((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*I)/K))}Q.range;const nt=tt(0),et=tt(1),it=tt(2),rt=tt(3),ot=tt(4),at=tt(5),ut=tt(6);function lt(t){return R((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/K))}nt.range,et.range,it.range,rt.range,ot.range,at.range,ut.range;const st=lt(0),ct=lt(1),ht=lt(2),ft=lt(3),gt=lt(4),dt=lt(5),pt=lt(6);st.range,ct.range,ht.range,ft.range,gt.range,dt.range,pt.range;const mt=R((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()));mt.range;const _t=R((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));_t.range;const yt=R((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));yt.every=t=>isFinite(t=Math.floor(t))&&t>0?R((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,e)=>{n.setFullYear(n.getFullYear()+e*t)})):null,yt.range;const vt=R((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function bt(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function wt(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function St(t){let n,e,i;function r(t,i,r=0,o=t.length){if(r>>1;e(t[n],i)<0?r=n+1:o=n}while(rbt(t(n),e),i=(n,e)=>t(n)-e):(n=t===bt||t===wt?t:xt,e=t,i=t),{left:r,center:function(t,n,e=0,o=t.length){const a=r(t,n,e,o-1);return a>e&&i(t[a-1],n)>-i(t[a],n)?a-1:a},right:function(t,i,r=0,o=t.length){if(r>>1;e(t[n],i)<=0?r=n+1:o=n}while(risFinite(t=Math.floor(t))&&t>0?R((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null,vt.range;const Ct=St(bt).right;St(kt).center;const At=Ct;function Et(t,n){const e=function(t,n){let e,i=0,r=0,o=0;if(void 0===n)for(let a of t)null!=a&&(a=+a)>=a&&(e=a-r,r+=e/++i,o+=e*(a-r));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-r,r+=e/++i,o+=e*(u-r))}if(i>1)return o/(i-1)}(t,n);return e?Math.sqrt(e):e}function Mt(t,n){let e,i;if(void 0===n)for(const r of t)null!=r&&(void 0===e?r>=r&&(e=i=r):(e>r&&(e=r),i=o&&(e=i=o):(e>o&&(e=o),i0){for(o=t[--r];r>0&&(n=o,e=t[--r],o=n+e,i=e-(o-n),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(e=2*i,n=o+e,e==n-o&&(o=n))}return o}};class Ot extends Map{constructor(t,n=jt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[e,i]of t)this.set(e,i)}get(t){return super.get(Pt(this,t))}has(t){return super.has(Pt(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},e){const i=n(e);return t.has(i)?t.get(i):(t.set(i,e),e)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},e){const i=n(e);return t.has(i)&&(e=t.get(i),t.delete(i)),e}(this,t))}}function Pt({_intern:t,_key:n},e){const i=n(e);return t.has(i)?t.get(i):e}function jt(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Bt(t){return t}function Dt(t,n,...e){return zt(t,Bt,n,e)}function zt(t,n,e,i){return function t(r,o){if(o>=i.length)return e(r);const a=new Ot,u=i[o++];let l=-1;for(const n of r){const t=u(n,++l,r),e=a.get(t);e?e.push(n):a.set(t,[n])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function Nt(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}const Rt=Math.sqrt(50),Ft=Math.sqrt(10),Lt=Math.sqrt(2);function It(t,n,e){const i=(n-t)/Math.max(0,e),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),a=o>=Rt?10:o>=Ft?5:o>=Lt?2:1;let u,l,s;return r<0?(s=Math.pow(10,-r)/a,u=Math.round(t*s),l=Math.round(n*s),u/sn&&--l,s=-s):(s=Math.pow(10,r)*a,u=Math.round(t/s),l=Math.round(n/s),u*sn&&--l),l0))return[];if((t=+t)==(n=+n))return[t];const i=n=r))return[];const u=o-r+1,l=new Array(u);if(i)if(a<0)for(let s=0;s=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e=r)&&(e=r)}return e}function qt(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}function Wt(t,n,e=0,i=1/0,r){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),i=Math.floor(Math.min(t.length-1,i)),!(e<=n&&n<=i))return t;for(r=void 0===r?Nt:function(t=bt){if(t===bt)return Nt;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const i=t(n,e);return i||0===i?i:(0===t(e,e))-(0===t(n,n))}}(r);i>e;){if(i-e>600){const o=i-e+1,a=n-e+1,u=Math.log(o),l=.5*Math.exp(2*u/3),s=.5*Math.sqrt(u*l*(o-l)/o)*(a-o/2<0?-1:1);Wt(t,n,Math.max(e,Math.floor(n-a*l/o+s)),Math.min(i,Math.floor(n+(o-a)*l/o+s)),r)}const o=t[n];let a=e,u=i;for($t(t,e,n),r(t[i],o)>0&&$t(t,e,i);a0;)--u}0===r(t[e],o)?$t(t,e,u):(++u,$t(t,u,i)),u<=n&&(e=u+1),n<=u&&(i=u-1)}return t}function $t(t,n,e){const i=t[n];t[n]=t[e],t[e]=i}function Yt(t,n,e){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let e=-1;for(let i of t)null!=(i=n(i,++e,t))&&(i=+i)>=i&&(yield i)}}(t,e)),(i=t.length)&&!isNaN(n=+n)){if(n<=0||i<2)return qt(t);if(n>=1)return Ut(t);var i,r=(i-1)*n,o=Math.floor(r),a=Ut(Wt(t,o).subarray(0,o+1));return a+(qt(t.subarray(o+1))-a)*(r-o)}}function Vt(t,n,e=kt){if((i=t.length)&&!isNaN(n=+n)){if(n<=0||i<2)return+e(t[0],0,t);if(n>=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(r-o)}}function Zt(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function Xt(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++it)).right(a,r);if(o===a.length)return t.every(Kt(n/q,e/q,i));if(0===o)return F.every(Math.max(Kt(n,e,i),1));const[u,l]=a[r/a[o-1][2][t.toLowerCase(),n])))}function vn(t,n,e){var i=fn.exec(n.slice(e,e+1));return i?(t.w=+i[0],e+i[0].length):-1}function bn(t,n,e){var i=fn.exec(n.slice(e,e+1));return i?(t.u=+i[0],e+i[0].length):-1}function wn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.U=+i[0],e+i[0].length):-1}function Sn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.V=+i[0],e+i[0].length):-1}function xn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.W=+i[0],e+i[0].length):-1}function kn(t,n,e){var i=fn.exec(n.slice(e,e+4));return i?(t.y=+i[0],e+i[0].length):-1}function Cn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function An(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function En(t,n,e){var i=fn.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function Mn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function Tn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function On(t,n,e){var i=fn.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function Pn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function jn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function Bn(t,n,e){var i=fn.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function Dn(t,n,e){var i=fn.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function zn(t,n,e){var i=fn.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function Nn(t,n,e){var i=gn.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function Rn(t,n,e){var i=fn.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function Fn(t,n,e){var i=fn.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function Ln(t,n){return pn(t.getDate(),n,2)}function In(t,n){return pn(t.getHours(),n,2)}function Hn(t,n){return pn(t.getHours()%12||12,n,2)}function Gn(t,n){return pn(1+X.count(yt(t),t),n,3)}function Kn(t,n){return pn(t.getMilliseconds(),n,3)}function Un(t,n){return Kn(t,n)+"000"}function qn(t,n){return pn(t.getMonth()+1,n,2)}function Wn(t,n){return pn(t.getMinutes(),n,2)}function $n(t,n){return pn(t.getSeconds(),n,2)}function Yn(t){var n=t.getDay();return 0===n?7:n}function Vn(t,n){return pn(nt.count(yt(t)-1,t),n,2)}function Zn(t){var n=t.getDay();return n>=4||0===n?ot(t):ot.ceil(t)}function Xn(t,n){return t=Zn(t),pn(ot.count(yt(t),t)+(4===yt(t).getDay()),n,2)}function Jn(t){return t.getDay()}function Qn(t,n){return pn(et.count(yt(t)-1,t),n,2)}function te(t,n){return pn(t.getFullYear()%100,n,2)}function ne(t,n){return pn((t=Zn(t)).getFullYear()%100,n,2)}function ee(t,n){return pn(t.getFullYear()%1e4,n,4)}function ie(t,n){var e=t.getDay();return pn((t=e>=4||0===e?ot(t):ot.ceil(t)).getFullYear()%1e4,n,4)}function re(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+pn(n/60|0,"0",2)+pn(n%60,"0",2)}function oe(t,n){return pn(t.getUTCDate(),n,2)}function ae(t,n){return pn(t.getUTCHours(),n,2)}function ue(t,n){return pn(t.getUTCHours()%12||12,n,2)}function le(t,n){return pn(1+J.count(vt(t),t),n,3)}function se(t,n){return pn(t.getUTCMilliseconds(),n,3)}function ce(t,n){return se(t,n)+"000"}function he(t,n){return pn(t.getUTCMonth()+1,n,2)}function fe(t,n){return pn(t.getUTCMinutes(),n,2)}function ge(t,n){return pn(t.getUTCSeconds(),n,2)}function de(t){var n=t.getUTCDay();return 0===n?7:n}function pe(t,n){return pn(st.count(vt(t)-1,t),n,2)}function me(t){var n=t.getUTCDay();return n>=4||0===n?gt(t):gt.ceil(t)}function _e(t,n){return t=me(t),pn(gt.count(vt(t),t)+(4===vt(t).getUTCDay()),n,2)}function ye(t){return t.getUTCDay()}function ve(t,n){return pn(ct.count(vt(t)-1,t),n,2)}function be(t,n){return pn(t.getUTCFullYear()%100,n,2)}function we(t,n){return pn((t=me(t)).getUTCFullYear()%100,n,2)}function Se(t,n){return pn(t.getUTCFullYear()%1e4,n,4)}function xe(t,n){var e=t.getUTCDay();return pn((t=e>=4||0===e?gt(t):gt.ceil(t)).getUTCFullYear()%1e4,n,4)}function ke(){return"+0000"}function Ce(){return"%"}function Ae(t){return+t}function Ee(t){return Math.floor(+t/1e3)}function Me(t){return ln=function(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,a=t.shortDays,u=t.months,l=t.shortMonths,s=_n(r),c=yn(r),h=_n(o),f=yn(o),g=_n(a),d=yn(a),p=_n(u),m=yn(u),_=_n(l),y=yn(l),v={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Ln,e:Ln,f:Un,g:ne,G:ie,H:In,I:Hn,j:Gn,L:Kn,m:qn,M:Wn,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ae,s:Ee,S:$n,u:Yn,U:Vn,V:Xn,w:Jn,W:Qn,x:null,X:null,y:te,Y:ee,Z:re,"%":Ce},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:oe,e:oe,f:ce,g:we,G:xe,H:ae,I:ue,j:le,L:se,m:he,M:fe,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ae,s:Ee,S:ge,u:de,U:pe,V:_e,w:ye,W:ve,x:null,X:null,y:be,Y:Se,Z:ke,"%":Ce},w={a:function(t,n,e){var i=g.exec(n.slice(e));return i?(t.w=d.get(i[0].toLowerCase()),e+i[0].length):-1},A:function(t,n,e){var i=h.exec(n.slice(e));return i?(t.w=f.get(i[0].toLowerCase()),e+i[0].length):-1},b:function(t,n,e){var i=_.exec(n.slice(e));return i?(t.m=y.get(i[0].toLowerCase()),e+i[0].length):-1},B:function(t,n,e){var i=p.exec(n.slice(e));return i?(t.m=m.get(i[0].toLowerCase()),e+i[0].length):-1},c:function(t,e,i){return k(t,n,e,i)},d:Tn,e:Tn,f:zn,g:Cn,G:kn,H:Pn,I:Pn,j:On,L:Dn,m:Mn,M:jn,p:function(t,n,e){var i=s.exec(n.slice(e));return i?(t.p=c.get(i[0].toLowerCase()),e+i[0].length):-1},q:En,Q:Rn,s:Fn,S:Bn,u:bn,U:wn,V:Sn,w:vn,W:xn,x:function(t,n,i){return k(t,e,n,i)},X:function(t,n,e){return k(t,i,n,e)},y:Cn,Y:kn,Z:An,"%":Nn};function S(t,n){return function(e){var i,r,o,a=[],u=-1,l=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=an(un(o.y,0,1))).getUTCDay(),i=r>4||0===r?ct.ceil(i):ct(i),i=J.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=on(un(o.y,0,1))).getDay(),i=r>4||0===r?et.ceil(i):et(i),i=X.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?an(un(o.y,0,1)).getUTCDay():on(un(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,an(o)):on(o)}}function k(t,n,e,i){for(var r,o,a=0,u=n.length,l=e.length;a=l)return-1;if(37===(r=n.charCodeAt(a++))){if(r=n.charAt(a++),!(o=w[r in hn?n.charAt(a++):r])||(i=o(t,e,i))<0)return-1}else if(r!=e.charCodeAt(i++))return-1}return i}return v.x=S(e,v),v.X=S(i,v),v.c=S(n,v),b.x=S(e,b),b.X=S(i,b),b.c=S(n,b),{format:function(t){var n=S(t+="",v);return n.toString=function(){return t},n},parse:function(t){var n=x(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=S(t+="",b);return n.toString=function(){return t},n},utcParse:function(t){var n=x(t+="",!0);return n.toString=function(){return t},n}}}(t),sn=ln.format,ln.parse,cn=ln.utcFormat,ln.utcParse,ln}function Te(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,o,a,u=[],l=!0,s=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(t){if("string"==typeof t)return Oe(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Oe(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:sn,i=e("%I %p"),r=e(".%L"),o=e("%I:%M"),a=e("%b"),u=e("%b %-d"),l=e("%b %-d, %Y"),s=e("%b %Y"),c=e("Q%q"),h=e("Q%q %Y"),f=e(":%S"),g=e("%Y"),d=n.findIndex((function(n){return+n==+t})),p=0===d||d===n.length-1,m=n.length<=5,_=n.reduce((function(t,e,i){var r,o,a;return i&&(t[0].push(e.getFullYear()-n[i-1].getFullYear()),t[1].push((r=n[i-1],a=12*((o=e).getFullYear()-r.getFullYear()),a-=r.getMonth(),(a+=o.getMonth())<=0?0:a)),t[2].push(Math.round((e-n[i-1])/864e5)),t[3].push(Math.round((e-n[i-1])/36e5))),t}),[[],[],[],[]]),y=Te(_,4),v=y[0],b=y[1],w=y[2],S=y[3];return(v.every((function(t){return t>=1&&!(t%1)}))?g:b.every((function(t){return t>=3&&!(t%3)}))?+yt(t)===t||p||m?h:c:b.every((function(t){return t>=1&&!(t%1)}))?+yt(t)===t||p||m?s:a:w.every((function(t){return t>=1&&!(t%1)}))?+yt(t)===t||p||m?l:u:S.every((function(t){return t>=1&&!(t%1)}))?p||m?l:+mt(t)===t?u:i:W(t)0&&i(l)?e>1?t(l,e-1,i,r,o):si(o,l):r||(o[o.length]=l)}return o},fi=function(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e-1},Ti=ki;function Oi(t){var n=-1,e=null==t?0:t.length;for(this.clear();++nu))return!1;var s=o.get(t),c=o.get(n);if(s&&c)return s==n&&c==t;var h=-1,f=!0,g=2&e?new oo:void 0;for(o.set(t,n),o.set(n,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},Ro=Ye,Fo=No,Lo=Ve,Io={};Io["[object Float32Array]"]=Io["[object Float64Array]"]=Io["[object Int8Array]"]=Io["[object Int16Array]"]=Io["[object Int32Array]"]=Io["[object Uint8Array]"]=Io["[object Uint8ClampedArray]"]=Io["[object Uint16Array]"]=Io["[object Uint32Array]"]=!0,Io["[object Arguments]"]=Io["[object Array]"]=Io["[object ArrayBuffer]"]=Io["[object Boolean]"]=Io["[object DataView]"]=Io["[object Date]"]=Io["[object Error]"]=Io["[object Function]"]=Io["[object Map]"]=Io["[object Number]"]=Io["[object Object]"]=Io["[object RegExp]"]=Io["[object Set]"]=Io["[object String]"]=Io["[object WeakMap]"]=!1;var Ho=function(t){return Lo(t)&&Fo(t.length)&&!!Io[Ro(t)]},Go=function(t){return function(n){return t(n)}},Ko={exports:{}};!function(t,n){var e=Be,i=n&&!n.nodeType&&n,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i&&e.process,a=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(n){}}();t.exports=a}(Ko,Ko.exports);var Uo=Ko.exports,qo=Ho,Wo=Go,$o=Uo&&Uo.isTypedArray,Yo=$o?Wo($o):qo,Vo=Oo,Zo=ri,Xo=oi,Jo=Bo,Qo=zo,ta=Yo,na=Object.prototype.hasOwnProperty,ea=function(t,n){var e=Xo(t),i=!e&&Zo(t),r=!e&&!i&&Jo(t),o=!e&&!i&&!r&&ta(t),a=e||i||r||o,u=a?Vo(t.length,String):[],l=u.length;for(var s in t)!n&&!na.call(t,s)||a&&("length"==s||r&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Qo(s,l))||u.push(s);return u},ia=Object.prototype,ra=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||ia)},oa=function(t,n){return function(e){return t(n(e))}},aa=oa(Object.keys,Object),ua=ra,la=aa,sa=Object.prototype.hasOwnProperty,ca=function(t){if(!ua(t))return la(t);var n=[];for(var e in Object(t))sa.call(t,e)&&"constructor"!=e&&n.push(e);return n},ha=Hi,fa=No,ga=function(t){return null!=t&&fa(t.length)&&!ha(t)},da=ea,pa=ca,ma=ga,_a=function(t){return ma(t)?da(t):pa(t)},ya=So,va=To,ba=_a,wa=function(t){return ya(t,ba,va)},Sa=wa,xa=Object.prototype.hasOwnProperty,ka=function(t,n,e,i,r,o){var a=1&e,u=Sa(t),l=u.length;if(l!=Sa(n).length&&!a)return!1;for(var s=l;s--;){var c=u[s];if(!(a?c in n:xa.call(n,c)))return!1}var h=o.get(t),f=o.get(n);if(h&&f)return h==n&&f==t;var g=!0;o.set(t,n),o.set(n,t);for(var d=a;++sn||o&&a&&l&&!u&&!s||i&&a&&l||!e&&l||!r)return 1;if(!i&&!o&&!s&&t=u?l:l*("desc"==e[i]?-1:1)}return t.index-n.index},hs=fi,fs=tl,gs=Nl,ds=Ul,ps=us,ms=Go,_s=cs,ys=Sl,vs=oi,bs=function(t,n,e){n=n.length?hs(n,(function(t){return vs(t)?function(n){return fs(n,1===t.length?t[0]:t)}:t})):[ys];var i=-1;n=hs(n,ms(gs));var r=ds(t,(function(t,e,r){return{criteria:hs(n,(function(n){return n(t)})),index:++i,value:t}}));return ps(r,(function(t,n){return _s(t,n,e)}))},ws=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)},Ss=Math.max,xs=function(t,n,e){return n=Ss(void 0===n?t.length-1:n,0),function(){for(var i=arguments,r=-1,o=Ss(i.length-n,0),a=Array(o);++r0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},Ts=Ms(As),Os=Sl,Ps=xs,js=Ts,Bs=function(t,n){return js(Ps(t,n,Os),t+"")},Ds=di,zs=ga,Ns=zo,Rs=Fi,Fs=function(t,n,e){if(!Rs(e))return!1;var i=typeof n;return!!("number"==i?zs(e)&&Ns(n,e.length):"string"==i&&n in e)&&Ds(e[n],t)},Ls=hi,Is=bs,Hs=Fs,Gs=Bs((function(t,n){if(null==t)return[];var e=n.length;return e>1&&Hs(t,n[0],n[1])?n=[]:e>2&&Hs(n[0],n[1],n[2])&&(n=[n[0]]),Is(t,Ls(n,1),[])}));const Ks=y(Gs);var Us=function(t,n,e,i){for(var r=t.length,o=e+(i?1:-1);i?o--:++o-1},Js=function(t,n,e){for(var i=-1,r=null==t?0:t.length;++i=200){var s=n?null:ac(t);if(s)return uc(s);a=!1,r=oc,l=new ec}else l=n?[]:u;t:for(;++i-1:!!r&&Ic(t,n,e)>-1};const $c=y(Wc);var Yc=Math.ceil,Vc=Math.max,Zc=function(t,n,e,i){for(var r=-1,o=Vc(Yc((n-t)/(e||1)),0),a=Array(o);o--;)a[i?o:++r]=t,t+=e;return a},Xc=Zc,Jc=Fs,Qc=Bc,th=function(t){return function(n,e,i){return i&&"number"!=typeof i&&Jc(n,e,i)&&(e=i=void 0),n=Qc(n),void 0===e?(e=n,n=0):e=Qc(e),i=void 0===i?nn},uh=Nl,lh=function(t,n){return t&&t.length?oh(t,uh(n),ah):void 0};const sh=y(lh);function ch(t,n){return void 0===n?function(n){return n[t]}:function(e){return void 0===e[t]?n:e[t]}}function hh(t){return hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hh(t)}function fh(t){return!(!t||"object"!==hh(t)||"undefined"!=typeof window&&(t===window||t===window.document||t instanceof Element)||Array.isArray(t))}function gh(){for(var t=arguments,n=arguments.length<=0?void 0:arguments[0],e=function(){var e=i<0||t.length<=i?void 0:t[i];if(!fh(e))return"continue";Object.keys(e).forEach((function(t){var i,r=e[t];fh(r)&&(i=r,"undefined"==typeof window||i!==window&&i!==document)?Object.prototype.hasOwnProperty.call(n,t)&&fh(n[t])?n[t]=gh({},n[t],r):n[t]=gh({},r):Array.isArray(r)?n[t]=r.slice():n[t]=r}))},i=1;i1&&void 0!==arguments[1]?arguments[1]:{};for(var e in n)({}).hasOwnProperty.call(n,e)&&t.attr(e,n[e])}const ph={aa:{language:"Afar",location:null,id:4096,tag:"aa"},"aa-dj":{language:"Afar",location:"Djibouti",id:4096,tag:"aa-DJ"},"aa-er":{language:"Afar",location:"Eritrea",id:4096,tag:"aa-ER"},"aa-et":{language:"Afar",location:"Ethiopia",id:4096,tag:"aa-ET"},af:{language:"Afrikaans",location:null,id:54,tag:"af"},"af-na":{language:"Afrikaans",location:"Namibia",id:4096,tag:"af-NA"},"af-za":{language:"Afrikaans",location:"South Africa",id:1078,tag:"af-ZA"},agq:{language:"Aghem",location:null,id:4096,tag:"agq"},"agq-cm":{language:"Aghem",location:"Cameroon",id:4096,tag:"agq-CM"},ak:{language:"Akan",location:null,id:4096,tag:"ak"},"ak-gh":{language:"Akan",location:"Ghana",id:4096,tag:"ak-GH"},sq:{language:"Albanian",location:null,id:28,tag:"sq"},"sq-al":{language:"Albanian",location:"Albania",id:1052,tag:"sq-AL"},"sq-mk":{language:"Albanian",location:"North Macedonia",id:4096,tag:"sq-MK"},gsw:{language:"Alsatian",location:null,id:132,tag:"gsw"},"gsw-fr":{language:"Alsatian",location:"France",id:1156,tag:"gsw-FR"},"gsw-li":{language:"Alsatian",location:"Liechtenstein",id:4096,tag:"gsw-LI"},"gsw-ch":{language:"Alsatian",location:"Switzerland",id:4096,tag:"gsw-CH"},am:{language:"Amharic",location:null,id:94,tag:"am"},"am-et":{language:"Amharic",location:"Ethiopia",id:1118,tag:"am-ET"},ar:{language:"Arabic",location:null,id:1,tag:"ar"},"ar-dz":{language:"Arabic",location:"Algeria",id:5121,tag:"ar-DZ"},"ar-bh":{language:"Arabic",location:"Bahrain",id:15361,tag:"ar-BH"},"ar-td":{language:"Arabic",location:"Chad",id:4096,tag:"ar-TD"},"ar-km":{language:"Arabic",location:"Comoros",id:4096,tag:"ar-KM"},"ar-dj":{language:"Arabic",location:"Djibouti",id:4096,tag:"ar-DJ"},"ar-eg":{language:"Arabic",location:"Egypt",id:3073,tag:"ar-EG"},"ar-er":{language:"Arabic",location:"Eritrea",id:4096,tag:"ar-ER"},"ar-iq":{language:"Arabic",location:"Iraq",id:2049,tag:"ar-IQ"},"ar-il":{language:"Arabic",location:"Israel",id:4096,tag:"ar-IL"},"ar-jo":{language:"Arabic",location:"Jordan",id:11265,tag:"ar-JO"},"ar-kw":{language:"Arabic",location:"Kuwait",id:13313,tag:"ar-KW"},"ar-lb":{language:"Arabic",location:"Lebanon",id:12289,tag:"ar-LB"},"ar-ly":{language:"Arabic",location:"Libya",id:4097,tag:"ar-LY"},"ar-mr":{language:"Arabic",location:"Mauritania",id:4096,tag:"ar-MR"},"ar-ma":{language:"Arabic",location:"Morocco",id:6145,tag:"ar-MA"},"ar-om":{language:"Arabic",location:"Oman",id:8193,tag:"ar-OM"},"ar-ps":{language:"Arabic",location:"Palestinian Authority",id:4096,tag:"ar-PS"},"ar-qa":{language:"Arabic",location:"Qatar",id:16385,tag:"ar-QA"},"ar-sa":{language:"Arabic",location:"Saudi Arabia",id:1025,tag:"ar-SA"},"ar-so":{language:"Arabic",location:"Somalia",id:4096,tag:"ar-SO"},"ar-ss":{language:"Arabic",location:"South Sudan",id:4096,tag:"ar-SS"},"ar-sd":{language:"Arabic",location:"Sudan",id:4096,tag:"ar-SD"},"ar-sy":{language:"Arabic",location:"Syria",id:10241,tag:"ar-SY"},"ar-tn":{language:"Arabic",location:"Tunisia",id:7169,tag:"ar-TN"},"ar-ae":{language:"Arabic",location:"U.A.E.",id:14337,tag:"ar-AE"},"ar-001":{language:"Arabic",location:"World",id:4096,tag:"ar-001"},"ar-ye":{language:"Arabic",location:"Yemen",id:9217,tag:"ar-YE"},hy:{language:"Armenian",location:null,id:43,tag:"hy"},"hy-am":{language:"Armenian",location:"Armenia",id:1067,tag:"hy-AM"},as:{language:"Assamese",location:null,id:77,tag:"as"},"as-in":{language:"Assamese",location:"India",id:1101,tag:"as-IN"},ast:{language:"Asturian",location:null,id:4096,tag:"ast"},"ast-es":{language:"Asturian",location:"Spain",id:4096,tag:"ast-ES"},asa:{language:"Asu",location:null,id:4096,tag:"asa"},"asa-tz":{language:"Asu",location:"Tanzania",id:4096,tag:"asa-TZ"},"az-cyrl":{language:"Azerbaijani (Cyrillic)",location:null,id:29740,tag:"az-Cyrl",version:"Windows 7"},"az-cyrl-az":{language:"Azerbaijani (Cyrillic)",location:"Azerbaijan",id:2092,tag:"az-Cyrl-AZ"},az:{language:"Azerbaijani (Latin)",location:null,id:44,tag:"az"},"az-latn":{language:"Azerbaijani (Latin)",location:null,id:30764,tag:"az-Latn",version:"Windows 7"},"az-latn-az":{language:"Azerbaijani (Latin)",location:"Azerbaijan",id:1068,tag:"az-Latn-AZ"},ksf:{language:"Bafia",location:null,id:4096,tag:"ksf"},"ksf-cm":{language:"Bafia",location:"Cameroon",id:4096,tag:"ksf-CM"},bm:{language:"Bamanankan",location:null,id:4096,tag:"bm"},"bm-latn-ml":{language:"Bamanankan (Latin)",location:"Mali",id:4096,tag:"bm-Latn-ML"},bn:{language:"Bangla",location:null,id:69,tag:"bn"},"bn-bd":{language:"Bangla",location:"Bangladesh",id:2117,tag:"bn-BD"},"bn-in":{language:"Bangla",location:"India",id:1093,tag:"bn-IN"},bas:{language:"Basaa",location:null,id:4096,tag:"bas"},"bas-cm":{language:"Basaa",location:"Cameroon",id:4096,tag:"bas-CM"},ba:{language:"Bashkir",location:null,id:109,tag:"ba"},"ba-ru":{language:"Bashkir",location:"Russia",id:1133,tag:"ba-RU"},eu:{language:"Basque",location:null,id:45,tag:"eu"},"eu-es":{language:"Basque",location:"Spain",id:1069,tag:"eu-ES"},be:{language:"Belarusian",location:null,id:35,tag:"be"},"be-by":{language:"Belarusian",location:"Belarus",id:1059,tag:"be-BY"},bem:{language:"Bemba",location:null,id:4096,tag:"bem"},"bem-zm":{language:"Bemba",location:"Zambia",id:4096,tag:"bem-ZM"},bez:{language:"Bena",location:null,id:4096,tag:"bez"},"bez-tz":{language:"Bena",location:"Tanzania",id:4096,tag:"bez-TZ"},byn:{language:"Blin",location:null,id:4096,tag:"byn"},"byn-er":{language:"Blin",location:"Eritrea",id:4096,tag:"byn-ER"},brx:{language:"Bodo",location:null,id:4096,tag:"brx"},"brx-in":{language:"Bodo",location:"India",id:4096,tag:"brx-IN"},"bs-cyrl":{language:"Bosnian (Cyrillic)",location:null,id:25626,tag:"bs-Cyrl",version:"Windows 7"},"bs-cyrl-ba":{language:"Bosnian (Cyrillic)",location:"Bosnia and Herzegovina",id:8218,tag:"bs-Cyrl-BA"},"bs-latn":{language:"Bosnian (Latin)",location:null,id:26650,tag:"bs-Latn",version:"Windows 7"},bs:{language:"Bosnian (Latin)",location:null,id:30746,tag:"bs"},"bs-latn-ba":{language:"Bosnian (Latin)",location:"Bosnia and Herzegovina",id:5146,tag:"bs-Latn-BA"},br:{language:"Breton",location:null,id:126,tag:"br"},"br-fr":{language:"Breton",location:"France",id:1150,tag:"br-FR"},bg:{language:"Bulgarian",location:null,id:2,tag:"bg"},"bg-bg":{language:"Bulgarian",location:"Bulgaria",id:1026,tag:"bg-BG"},my:{language:"Burmese",location:null,id:85,tag:"my"},"my-mm":{language:"Burmese",location:"Myanmar",id:1109,tag:"my-MM"},ca:{language:"Catalan",location:null,id:3,tag:"ca"},"ca-ad":{language:"Catalan",location:"Andorra",id:4096,tag:"ca-AD"},"ca-fr":{language:"Catalan",location:"France",id:4096,tag:"ca-FR"},"ca-it":{language:"Catalan",location:"Italy",id:4096,tag:"ca-IT"},"ca-es":{language:"Catalan",location:"Spain",id:1027,tag:"ca-ES"},ceb:{language:"Cebuano",location:null,id:4096,tag:"ceb"},"ceb-latn":{language:"Cebuan (Latin)",location:null,id:4096,tag:"ceb-Latn"},"ceb-latn-ph":{language:"Cebuan (Latin)",location:"Philippines",id:4096,tag:"ceb-Latn-PH"},"tzm-latn-":{language:"Central Atlas Tamazight (Latin)",location:"Morocco",id:4096,tag:"tzm-Latn-"},ku:{language:"Central Kurdish",location:null,id:146,tag:"ku"},"ku-arab":{language:"Central Kurdish",location:null,id:31890,tag:"ku-Arab"},"ku-arab-iq":{language:"Central Kurdish",location:"Iraq",id:1170,tag:"ku-Arab-IQ"},ccp:{language:"Chakma",location:null,id:4096,tag:"ccp"},"ccp-cakm":{language:"Chakma",location:"Chakma",id:4096,tag:"ccp-Cakm"},"ccp-cakm-":{language:"Chakma",location:"India",id:4096,tag:"ccp-Cakm-"},"cd-ru":{language:"Chechen",location:"Russia",id:4096,tag:"cd-RU"},chr:{language:"Cherokee",location:null,id:92,tag:"chr"},"chr-cher":{language:"Cherokee",location:null,id:31836,tag:"chr-Cher"},"chr-cher-us":{language:"Cherokee",location:"United States",id:1116,tag:"chr-Cher-US"},cgg:{language:"Chiga",location:null,id:4096,tag:"cgg"},"cgg-ug":{language:"Chiga",location:"Uganda",id:4096,tag:"cgg-UG"},"zh-hans":{language:"Chinese (Simplified)",location:null,id:4,tag:"zh-Hans"},zh:{language:"Chinese (Simplified)",location:null,id:30724,tag:"zh",version:"Windows 7"},"zh-cn":{language:"Chinese (Simplified)",location:"People's Republic of China",id:2052,tag:"zh-CN"},"zh-sg":{language:"Chinese (Simplified)",location:"Singapore",id:4100,tag:"zh-SG"},"zh-hant":{language:"Chinese (Traditional)",location:null,id:31748,tag:"zh-Hant"},"zh-hk":{language:"Chinese (Traditional)",location:"Hong Kong S.A.R.",id:3076,tag:"zh-HK"},"zh-mo":{language:"Chinese (Traditional)",location:"Macao S.A.R.",id:5124,tag:"zh-MO"},"zh-tw":{language:"Chinese (Traditional)",location:"Taiwan",id:1028,tag:"zh-TW"},"cu-ru":{language:"Church Slavic",location:"Russia",id:4096,tag:"cu-RU"},swc:{language:"Congo Swahili",location:null,id:4096,tag:"swc"},"swc-cd":{language:"Congo Swahili",location:"Congo DRC",id:4096,tag:"swc-CD"},kw:{language:"Cornish",location:null,id:4096,tag:"kw"},"kw-gb":{language:"Cornish",location:"United Kingdom",id:4096,tag:"kw-GB"},co:{language:"Corsican",location:null,id:131,tag:"co"},"co-fr":{language:"Corsican",location:"France",id:1155,tag:"co-FR"},hr:{language:"Croatian",location:null,id:26,tag:"hr"},"hr-hr":{language:"Croatian",location:"Croatia",id:1050,tag:"hr-HR"},"hr-ba":{language:"Croatian (Latin)",location:"Bosnia and Herzegovina",id:4122,tag:"hr-BA"},cs:{language:"Czech",location:null,id:5,tag:"cs"},"cs-cz":{language:"Czech",location:"Czech Republic",id:1029,tag:"cs-CZ"},da:{language:"Danish",location:null,id:6,tag:"da"},"da-dk":{language:"Danish",location:"Denmark",id:1030,tag:"da-DK"},"da-gl":{language:"Danish",location:"Greenland",id:4096,tag:"da-GL"},prs:{language:"Dari",location:null,id:140,tag:"prs"},"prs-af":{language:"Dari",location:"Afghanistan",id:1164,tag:"prs-AF"},dv:{language:"Divehi",location:null,id:101,tag:"dv"},"dv-mv":{language:"Divehi",location:"Maldives",id:1125,tag:"dv-MV"},dua:{language:"Duala",location:null,id:4096,tag:"dua"},"dua-cm":{language:"Duala",location:"Cameroon",id:4096,tag:"dua-CM"},nl:{language:"Dutch",location:null,id:19,tag:"nl"},"nl-aw":{language:"Dutch",location:"Aruba",id:4096,tag:"nl-AW"},"nl-be":{language:"Dutch",location:"Belgium",id:2067,tag:"nl-BE"},"nl-bq":{language:"Dutch",location:"Bonaire, Sint Eustatius and Saba",id:4096,tag:"nl-BQ"},"nl-cw":{language:"Dutch",location:"Curaçao",id:4096,tag:"nl-CW"},"nl-nl":{language:"Dutch",location:"Netherlands",id:1043,tag:"nl-NL"},"nl-sx":{language:"Dutch",location:"Sint Maarten",id:4096,tag:"nl-SX"},"nl-sr":{language:"Dutch",location:"Suriname",id:4096,tag:"nl-SR"},dz:{language:"Dzongkha",location:null,id:4096,tag:"dz"},"dz-bt":{language:"Dzongkha",location:"Bhutan",id:3153,tag:"dz-BT"},ebu:{language:"Embu",location:null,id:4096,tag:"ebu"},"ebu-ke":{language:"Embu",location:"Kenya",id:4096,tag:"ebu-KE"},en:{language:"English",location:null,id:9,tag:"en"},"en-as":{language:"English",location:"American Samoa",id:4096,tag:"en-AS"},"en-ai":{language:"English",location:"Anguilla",id:4096,tag:"en-AI"},"en-ag":{language:"English",location:"Antigua and Barbuda",id:4096,tag:"en-AG"},"en-au":{language:"English",location:"Australia",id:3081,tag:"en-AU"},"en-at":{language:"English",location:"Austria",id:4096,tag:"en-AT"},"en-bs":{language:"English",location:"Bahamas",id:4096,tag:"en-BS"},"en-bb":{language:"English",location:"Barbados",id:4096,tag:"en-BB"},"en-be":{language:"English",location:"Belgium",id:4096,tag:"en-BE"},"en-bz":{language:"English",location:"Belize",id:10249,tag:"en-BZ"},"en-bm":{language:"English",location:"Bermuda",id:4096,tag:"en-BM"},"en-bw":{language:"English",location:"Botswana",id:4096,tag:"en-BW"},"en-io":{language:"English",location:"British Indian Ocean Territory",id:4096,tag:"en-IO"},"en-vg":{language:"English",location:"British Virgin Islands",id:4096,tag:"en-VG"},"en-bi":{language:"English",location:"Burundi",id:4096,tag:"en-BI"},"en-cm":{language:"English",location:"Cameroon",id:4096,tag:"en-CM"},"en-ca":{language:"English",location:"Canada",id:4105,tag:"en-CA"},"en-029":{language:"English",location:"Caribbean",id:9225,tag:"en-029"},"en-ky":{language:"English",location:"Cayman Islands",id:4096,tag:"en-KY"},"en-cx":{language:"English",location:"Christmas Island",id:4096,tag:"en-CX"},"en-cc":{language:"English",location:"Cocos [Keeling] Islands",id:4096,tag:"en-CC"},"en-ck":{language:"English",location:"Cook Islands",id:4096,tag:"en-CK"},"en-cy":{language:"English",location:"Cyprus",id:4096,tag:"en-CY"},"en-dk":{language:"English",location:"Denmark",id:4096,tag:"en-DK"},"en-dm":{language:"English",location:"Dominica",id:4096,tag:"en-DM"},"en-er":{language:"English",location:"Eritrea",id:4096,tag:"en-ER"},"en-150":{language:"English",location:"Europe",id:4096,tag:"en-150"},"en-fk":{language:"English",location:"Falkland Islands",id:4096,tag:"en-FK"},"en-fi":{language:"English",location:"Finland",id:4096,tag:"en-FI"},"en-fj":{language:"English",location:"Fiji",id:4096,tag:"en-FJ"},"en-gm":{language:"English",location:"Gambia",id:4096,tag:"en-GM"},"en-de":{language:"English",location:"Germany",id:4096,tag:"en-DE"},"en-gh":{language:"English",location:"Ghana",id:4096,tag:"en-GH"},"en-gi":{language:"English",location:"Gibraltar",id:4096,tag:"en-GI"},"en-gd":{language:"English",location:"Grenada",id:4096,tag:"en-GD"},"en-gu":{language:"English",location:"Guam",id:4096,tag:"en-GU"},"en-gg":{language:"English",location:"Guernsey",id:4096,tag:"en-GG"},"en-gy":{language:"English",location:"Guyana",id:4096,tag:"en-GY"},"en-hk":{language:"English",location:"Hong Kong",id:15369,tag:"en-HK"},"en-in":{language:"English",location:"India",id:16393,tag:"en-IN"},"en-ie":{language:"English",location:"Ireland",id:6153,tag:"en-IE"},"en-im":{language:"English",location:"Isle of Man",id:4096,tag:"en-IM"},"en-il":{language:"English",location:"Israel",id:4096,tag:"en-IL"},"en-jm":{language:"English",location:"Jamaica",id:8201,tag:"en-JM"},"en-je":{language:"English",location:"Jersey",id:4096,tag:"en-JE"},"en-ke":{language:"English",location:"Kenya",id:4096,tag:"en-KE"},"en-ki":{language:"English",location:"Kiribati",id:4096,tag:"en-KI"},"en-ls":{language:"English",location:"Lesotho",id:4096,tag:"en-LS"},"en-lr":{language:"English",location:"Liberia",id:4096,tag:"en-LR"},"en-mo":{language:"English",location:"Macao SAR",id:4096,tag:"en-MO"},"en-mg":{language:"English",location:"Madagascar",id:4096,tag:"en-MG"},"en-mw":{language:"English",location:"Malawi",id:4096,tag:"en-MW"},"en-my":{language:"English",location:"Malaysia",id:17417,tag:"en-MY"},"en-mt":{language:"English",location:"Malta",id:4096,tag:"en-MT"},"en-mh":{language:"English",location:"Marshall Islands",id:4096,tag:"en-MH"},"en-mu":{language:"English",location:"Mauritius",id:4096,tag:"en-MU"},"en-fm":{language:"English",location:"Micronesia",id:4096,tag:"en-FM"},"en-ms":{language:"English",location:"Montserrat",id:4096,tag:"en-MS"},"en-na":{language:"English",location:"Namibia",id:4096,tag:"en-NA"},"en-nr":{language:"English",location:"Nauru",id:4096,tag:"en-NR"},"en-nl":{language:"English",location:"Netherlands",id:4096,tag:"en-NL"},"en-nz":{language:"English",location:"New Zealand",id:5129,tag:"en-NZ"},"en-ng":{language:"English",location:"Nigeria",id:4096,tag:"en-NG"},"en-nu":{language:"English",location:"Niue",id:4096,tag:"en-NU"},"en-nf":{language:"English",location:"Norfolk Island",id:4096,tag:"en-NF"},"en-mp":{language:"English",location:"Northern Mariana Islands",id:4096,tag:"en-MP"},"en-pk":{language:"English",location:"Pakistan",id:4096,tag:"en-PK"},"en-pw":{language:"English",location:"Palau",id:4096,tag:"en-PW"},"en-pg":{language:"English",location:"Papua New Guinea",id:4096,tag:"en-PG"},"en-pn":{language:"English",location:"Pitcairn Islands",id:4096,tag:"en-PN"},"en-pr":{language:"English",location:"Puerto Rico",id:4096,tag:"en-PR"},"en-ph":{language:"English",location:"Republic of the Philippines",id:13321,tag:"en-PH"},"en-rw":{language:"English",location:"Rwanda",id:4096,tag:"en-RW"},"en-kn":{language:"English",location:"Saint Kitts and Nevis",id:4096,tag:"en-KN"},"en-lc":{language:"English",location:"Saint Lucia",id:4096,tag:"en-LC"},"en-vc":{language:"English",location:"Saint Vincent and the Grenadines",id:4096,tag:"en-VC"},"en-ws":{language:"English",location:"Samoa",id:4096,tag:"en-WS"},"en-sc":{language:"English",location:"Seychelles",id:4096,tag:"en-SC"},"en-sl":{language:"English",location:"Sierra Leone",id:4096,tag:"en-SL"},"en-sg":{language:"English",location:"Singapore",id:18441,tag:"en-SG"},"en-sx":{language:"English",location:"Sint Maarten",id:4096,tag:"en-SX"},"en-si":{language:"English",location:"Slovenia",id:4096,tag:"en-SI"},"en-sb":{language:"English",location:"Solomon Islands",id:4096,tag:"en-SB"},"en-za":{language:"English",location:"South Africa",id:7177,tag:"en-ZA"},"en-ss":{language:"English",location:"South Sudan",id:4096,tag:"en-SS"},"en-sh":{language:"English",location:"St Helena, Ascension, Tristan da Cunha",id:4096,tag:"en-SH"},"en-sd":{language:"English",location:"Sudan",id:4096,tag:"en-SD"},"en-sz":{language:"English",location:"Swaziland",id:4096,tag:"en-SZ"},"en-se":{language:"English",location:"Sweden",id:4096,tag:"en-SE"},"en-ch":{language:"English",location:"Switzerland",id:4096,tag:"en-CH"},"en-tz":{language:"English",location:"Tanzania",id:4096,tag:"en-TZ"},"en-tk":{language:"English",location:"Tokelau",id:4096,tag:"en-TK"},"en-to":{language:"English",location:"Tonga",id:4096,tag:"en-TO"},"en-tt":{language:"English",location:"Trinidad and Tobago",id:11273,tag:"en-TT"},"en-tc":{language:"English",location:"Turks and Caicos Islands",id:4096,tag:"en-TC"},"en-tv":{language:"English",location:"Tuvalu",id:4096,tag:"en-TV"},"en-ug":{language:"English",location:"Uganda",id:4096,tag:"en-UG"},"en-ae":{language:"English",location:"United Arab Emirates",id:19465,tag:"en-AE"},"en-gb":{language:"English",location:"United Kingdom",id:2057,tag:"en-GB"},"en-us":{language:"English",location:"United States",id:1033,tag:"en-US"},"en-um":{language:"English",location:"US Minor Outlying Islands",id:4096,tag:"en-UM"},"en-vi":{language:"English",location:"US Virgin Islands",id:4096,tag:"en-VI"},"en-vu":{language:"English",location:"Vanuatu",id:4096,tag:"en-VU"},"en-001":{language:"English",location:"World",id:4096,tag:"en-001"},"en-zm":{language:"English",location:"Zambia",id:4096,tag:"en-ZM"},"en-zw":{language:"English",location:"Zimbabwe",id:12297,tag:"en-ZW"},eo:{language:"Esperanto",location:null,id:4096,tag:"eo"},"eo-001":{language:"Esperanto",location:"World",id:4096,tag:"eo-001"},et:{language:"Estonian",location:null,id:37,tag:"et"},"et-ee":{language:"Estonian",location:"Estonia",id:1061,tag:"et-EE"},ee:{language:"Ewe",location:null,id:4096,tag:"ee"},"ee-gh":{language:"Ewe",location:"Ghana",id:4096,tag:"ee-GH"},"ee-tg":{language:"Ewe",location:"Togo",id:4096,tag:"ee-TG"},ewo:{language:"Ewondo",location:null,id:4096,tag:"ewo"},"ewo-cm":{language:"Ewondo",location:"Cameroon",id:4096,tag:"ewo-CM"},fo:{language:"Faroese",location:null,id:56,tag:"fo"},"fo-dk":{language:"Faroese",location:"Denmark",id:4096,tag:"fo-DK"},"fo-fo":{language:"Faroese",location:"Faroe Islands",id:1080,tag:"fo-FO"},fil:{language:"Filipino",location:null,id:100,tag:"fil"},"fil-ph":{language:"Filipino",location:"Philippines",id:1124,tag:"fil-PH"},fi:{language:"Finnish",location:null,id:11,tag:"fi"},"fi-fi":{language:"Finnish",location:"Finland",id:1035,tag:"fi-FI"},fr:{language:"French",location:null,id:12,tag:"fr"},"fr-dz":{language:"French",location:"Algeria",id:4096,tag:"fr-DZ"},"fr-be":{language:"French",location:"Belgium",id:2060,tag:"fr-BE"},"fr-bj":{language:"French",location:"Benin",id:4096,tag:"fr-BJ"},"fr-bf":{language:"French",location:"Burkina Faso",id:4096,tag:"fr-BF"},"fr-bi":{language:"French",location:"Burundi",id:4096,tag:"fr-BI"},"fr-cm":{language:"French",location:"Cameroon",id:11276,tag:"fr-CM"},"fr-ca":{language:"French",location:"Canada",id:3084,tag:"fr-CA"},"fr-cf":{language:"French",location:"Central African Republic",id:4096,tag:"fr-CF",version:"Release10"},"fr-td":{language:"French",location:"Chad",id:4096,tag:"fr-TD"},"fr-km":{language:"French",location:"Comoros",id:4096,tag:"fr-KM"},"fr-cg":{language:"French",location:"Congo",id:4096,tag:"fr-CG"},"fr-cd":{language:"French",location:"Congo, DRC",id:9228,tag:"fr-CD"},"fr-ci":{language:"French",location:"Côte d'Ivoire",id:12300,tag:"fr-CI"},"fr-dj":{language:"French",location:"Djibouti",id:4096,tag:"fr-DJ"},"fr-gq":{language:"French",location:"Equatorial Guinea",id:4096,tag:"fr-GQ"},"fr-fr":{language:"French",location:"France",id:1036,tag:"fr-FR"},"fr-gf":{language:"French",location:"French Guiana",id:4096,tag:"fr-GF"},"fr-pf":{language:"French",location:"French Polynesia",id:4096,tag:"fr-PF"},"fr-ga":{language:"French",location:"Gabon",id:4096,tag:"fr-GA"},"fr-gp":{language:"French",location:"Guadeloupe",id:4096,tag:"fr-GP"},"fr-gn":{language:"French",location:"Guinea",id:4096,tag:"fr-GN"},"fr-ht":{language:"French",location:"Haiti",id:15372,tag:"fr-HT"},"fr-lu":{language:"French",location:"Luxembourg",id:5132,tag:"fr-LU"},"fr-mg":{language:"French",location:"Madagascar",id:4096,tag:"fr-MG"},"fr-ml":{language:"French",location:"Mali",id:13324,tag:"fr-ML"},"fr-mq":{language:"French",location:"Martinique",id:4096,tag:"fr-MQ"},"fr-mr":{language:"French",location:"Mauritania",id:4096,tag:"fr-MR"},"fr-mu":{language:"French",location:"Mauritius",id:4096,tag:"fr-MU"},"fr-yt":{language:"French",location:"Mayotte",id:4096,tag:"fr-YT"},"fr-ma":{language:"French",location:"Morocco",id:14348,tag:"fr-MA"},"fr-nc":{language:"French",location:"New Caledonia",id:4096,tag:"fr-NC"},"fr-ne":{language:"French",location:"Niger",id:4096,tag:"fr-NE"},"fr-mc":{language:"French",location:"Principality of Monaco",id:6156,tag:"fr-MC"},"fr-re":{language:"French",location:"Reunion",id:8204,tag:"fr-RE"},"fr-rw":{language:"French",location:"Rwanda",id:4096,tag:"fr-RW"},"fr-bl":{language:"French",location:"Saint Barthélemy",id:4096,tag:"fr-BL"},"fr-mf":{language:"French",location:"Saint Martin",id:4096,tag:"fr-MF"},"fr-pm":{language:"French",location:"Saint Pierre and Miquelon",id:4096,tag:"fr-PM"},"fr-sn":{language:"French",location:"Senegal",id:10252,tag:"fr-SN"},"fr-sc":{language:"French",location:"Seychelles",id:4096,tag:"fr-SC"},"fr-ch":{language:"French",location:"Switzerland",id:4108,tag:"fr-CH"},"fr-sy":{language:"French",location:"Syria",id:4096,tag:"fr-SY"},"fr-tg":{language:"French",location:"Togo",id:4096,tag:"fr-TG"},"fr-tn":{language:"French",location:"Tunisia",id:4096,tag:"fr-TN"},"fr-vu":{language:"French",location:"Vanuatu",id:4096,tag:"fr-VU"},"fr-wf":{language:"French",location:"Wallis and Futuna",id:4096,tag:"fr-WF"},fy:{language:"Frisian",location:null,id:98,tag:"fy"},"fy-nl":{language:"Frisian",location:"Netherlands",id:1122,tag:"fy-NL"},fur:{language:"Friulian",location:null,id:4096,tag:"fur"},"fur-it":{language:"Friulian",location:"Italy",id:4096,tag:"fur-IT"},ff:{language:"Fulah",location:null,id:103,tag:"ff"},"ff-latn":{language:"Fulah (Latin)",location:null,id:31847,tag:"ff-Latn"},"ff-latn-bf":{language:"Fulah (Latin)",location:"Burkina Faso",id:4096,tag:"ff-Latn-BF"},"ff-cm":{language:"Fulah",location:"Cameroon",id:4096,tag:"ff-CM"},"ff-latn-cm":{language:"Fulah (Latin)",location:"Cameroon",id:4096,tag:"ff-Latn-CM"},"ff-latn-gm":{language:"Fulah (Latin)",location:"Gambia",id:4096,tag:"ff-Latn-GM"},"ff-latn-gh":{language:"Fulah (Latin)",location:"Ghana",id:4096,tag:"ff-Latn-GH"},"ff-gn":{language:"Fulah",location:"Guinea",id:4096,tag:"ff-GN"},"ff-latn-gn":{language:"Fulah (Latin)",location:"Guinea",id:4096,tag:"ff-Latn-GN"},"ff-latn-gw":{language:"Fulah (Latin)",location:"Guinea-Bissau",id:4096,tag:"ff-Latn-GW"},"ff-latn-lr":{language:"Fulah (Latin)",location:"Liberia",id:4096,tag:"ff-Latn-LR"},"ff-mr":{language:"Fulah",location:"Mauritania",id:4096,tag:"ff-MR"},"ff-latn-mr":{language:"Fulah (Latin)",location:"Mauritania",id:4096,tag:"ff-Latn-MR"},"ff-latn-ne":{language:"Fulah (Latin)",location:"Niger",id:4096,tag:"ff-Latn-NE"},"ff-ng":{language:"Fulah",location:"Nigeria",id:4096,tag:"ff-NG"},"ff-latn-ng":{language:"Fulah (Latin)",location:"Nigeria",id:4096,tag:"ff-Latn-NG"},"ff-latn-sn":{language:"Fulah",location:"Senegal",id:2151,tag:"ff-Latn-SN"},"ff-latn-sl":{language:"Fulah (Latin)",location:"Sierra Leone",id:4096,tag:"ff-Latn-SL"},gl:{language:"Galician",location:null,id:86,tag:"gl"},"gl-es":{language:"Galician",location:"Spain",id:1110,tag:"gl-ES"},lg:{language:"Ganda",location:null,id:4096,tag:"lg"},"lg-ug":{language:"Ganda",location:"Uganda",id:4096,tag:"lg-UG"},ka:{language:"Georgian",location:null,id:55,tag:"ka"},"ka-ge":{language:"Georgian",location:"Georgia",id:1079,tag:"ka-GE"},de:{language:"German",location:null,id:7,tag:"de"},"de-at":{language:"German",location:"Austria",id:3079,tag:"de-AT"},"de-be":{language:"German",location:"Belgium",id:4096,tag:"de-BE"},"de-de":{language:"German",location:"Germany",id:1031,tag:"de-DE"},"de-it":{language:"German",location:"Italy",id:4096,tag:"de-IT"},"de-li":{language:"German",location:"Liechtenstein",id:5127,tag:"de-LI"},"de-lu":{language:"German",location:"Luxembourg",id:4103,tag:"de-LU"},"de-ch":{language:"German",location:"Switzerland",id:2055,tag:"de-CH"},el:{language:"Greek",location:null,id:8,tag:"el"},"el-cy":{language:"Greek",location:"Cyprus",id:4096,tag:"el-CY"},"el-gr":{language:"Greek",location:"Greece",id:1032,tag:"el-GR"},kl:{language:"Greenlandic",location:null,id:111,tag:"kl"},"kl-gl":{language:"Greenlandic",location:"Greenland",id:1135,tag:"kl-GL"},gn:{language:"Guarani",location:null,id:116,tag:"gn"},"gn-py":{language:"Guarani",location:"Paraguay",id:1140,tag:"gn-PY"},gu:{language:"Gujarati",location:null,id:71,tag:"gu"},"gu-in":{language:"Gujarati",location:"India",id:1095,tag:"gu-IN"},guz:{language:"Gusii",location:null,id:4096,tag:"guz"},"guz-ke":{language:"Gusii",location:"Kenya",id:4096,tag:"guz-KE"},ha:{language:"Hausa (Latin)",location:null,id:104,tag:"ha"},"ha-latn":{language:"Hausa (Latin)",location:null,id:31848,tag:"ha-Latn",version:"Windows 7"},"ha-latn-gh":{language:"Hausa (Latin)",location:"Ghana",id:4096,tag:"ha-Latn-GH"},"ha-latn-ne":{language:"Hausa (Latin)",location:"Niger",id:4096,tag:"ha-Latn-NE"},"ha-latn-ng":{language:"Hausa (Latin)",location:"Nigeria",id:1128,tag:"ha-Latn-NG"},haw:{language:"Hawaiian",location:null,id:117,tag:"haw"},"haw-us":{language:"Hawaiian",location:"United States",id:1141,tag:"haw-US"},he:{language:"Hebrew",location:null,id:13,tag:"he"},"he-il":{language:"Hebrew",location:"Israel",id:1037,tag:"he-IL"},hi:{language:"Hindi",location:null,id:57,tag:"hi"},"hi-in":{language:"Hindi",location:"India",id:1081,tag:"hi-IN"},hu:{language:"Hungarian",location:null,id:14,tag:"hu"},"hu-hu":{language:"Hungarian",location:"Hungary",id:1038,tag:"hu-HU"},is:{language:"Icelandic",location:null,id:15,tag:"is"},"is-is":{language:"Icelandic",location:"Iceland",id:1039,tag:"is-IS"},ig:{language:"Igbo",location:null,id:112,tag:"ig"},"ig-ng":{language:"Igbo",location:"Nigeria",id:1136,tag:"ig-NG"},id:{language:"Indonesian",location:null,id:33,tag:"id"},"id-id":{language:"Indonesian",location:"Indonesia",id:1057,tag:"id-ID"},ia:{language:"Interlingua",location:null,id:4096,tag:"ia"},"ia-fr":{language:"Interlingua",location:"France",id:4096,tag:"ia-FR"},"ia-001":{language:"Interlingua",location:"World",id:4096,tag:"ia-001"},iu:{language:"Inuktitut (Latin)",location:null,id:93,tag:"iu"},"iu-latn":{language:"Inuktitut (Latin)",location:null,id:31837,tag:"iu-Latn",version:"Windows 7"},"iu-latn-ca":{language:"Inuktitut (Latin)",location:"Canada",id:2141,tag:"iu-Latn-CA"},"iu-cans":{language:"Inuktitut (Syllabics)",location:null,id:30813,tag:"iu-Cans",version:"Windows 7"},"iu-cans-ca":{language:"Inuktitut (Syllabics)",location:"Canada",id:1117,tag:"iu-Cans-CA"},ga:{language:"Irish",location:null,id:60,tag:"ga",version:"Windows 7"},"ga-ie":{language:"Irish",location:"Ireland",id:2108,tag:"ga-IE"},it:{language:"Italian",location:null,id:16,tag:"it"},"it-it":{language:"Italian",location:"Italy",id:1040,tag:"it-IT"},"it-sm":{language:"Italian",location:"San Marino",id:4096,tag:"it-SM"},"it-ch":{language:"Italian",location:"Switzerland",id:2064,tag:"it-CH"},"it-va":{language:"Italian",location:"Vatican City",id:4096,tag:"it-VA"},ja:{language:"Japanese",location:null,id:17,tag:"ja"},"ja-jp":{language:"Japanese",location:"Japan",id:1041,tag:"ja-JP"},jv:{language:"Javanese",location:null,id:4096,tag:"jv"},"jv-latn":{language:"Javanese",location:"Latin",id:4096,tag:"jv-Latn"},"jv-latn-id":{language:"Javanese",location:"Latin, Indonesia",id:4096,tag:"jv-Latn-ID"},dyo:{language:"Jola-Fonyi",location:null,id:4096,tag:"dyo"},"dyo-sn":{language:"Jola-Fonyi",location:"Senegal",id:4096,tag:"dyo-SN"},kea:{language:"Kabuverdianu",location:null,id:4096,tag:"kea"},"kea-cv":{language:"Kabuverdianu",location:"Cabo Verde",id:4096,tag:"kea-CV"},kab:{language:"Kabyle",location:null,id:4096,tag:"kab"},"kab-dz":{language:"Kabyle",location:"Algeria",id:4096,tag:"kab-DZ"},kkj:{language:"Kako",location:null,id:4096,tag:"kkj"},"kkj-cm":{language:"Kako",location:"Cameroon",id:4096,tag:"kkj-CM"},kln:{language:"Kalenjin",location:null,id:4096,tag:"kln"},"kln-ke":{language:"Kalenjin",location:"Kenya",id:4096,tag:"kln-KE"},kam:{language:"Kamba",location:null,id:4096,tag:"kam"},"kam-ke":{language:"Kamba",location:"Kenya",id:4096,tag:"kam-KE"},kn:{language:"Kannada",location:null,id:75,tag:"kn"},"kn-in":{language:"Kannada",location:"India",id:1099,tag:"kn-IN"},ks:{language:"Kashmiri",location:null,id:96,tag:"ks"},"ks-arab":{language:"Kashmiri",location:"Perso-Arabic",id:1120,tag:"ks-Arab"},"ks-arab-in":{language:"Kashmiri",location:"Perso-Arabic",id:4096,tag:"ks-Arab-IN"},kk:{language:"Kazakh",location:null,id:63,tag:"kk"},"kk-kz":{language:"Kazakh",location:"Kazakhstan",id:1087,tag:"kk-KZ"},km:{language:"Khmer",location:null,id:83,tag:"km"},"km-kh":{language:"Khmer",location:"Cambodia",id:1107,tag:"km-KH"},quc:{language:"K'iche",location:null,id:134,tag:"quc"},"quc-latn-gt":{language:"K'iche",location:"Guatemala",id:1158,tag:"quc-Latn-GT"},ki:{language:"Kikuyu",location:null,id:4096,tag:"ki"},"ki-ke":{language:"Kikuyu",location:"Kenya",id:4096,tag:"ki-KE"},rw:{language:"Kinyarwanda",location:null,id:135,tag:"rw"},"rw-rw":{language:"Kinyarwanda",location:"Rwanda",id:1159,tag:"rw-RW"},sw:{language:"Kiswahili",location:null,id:65,tag:"sw"},"sw-ke":{language:"Kiswahili",location:"Kenya",id:1089,tag:"sw-KE"},"sw-tz":{language:"Kiswahili",location:"Tanzania",id:4096,tag:"sw-TZ"},"sw-ug":{language:"Kiswahili",location:"Uganda",id:4096,tag:"sw-UG"},kok:{language:"Konkani",location:null,id:87,tag:"kok"},"kok-in":{language:"Konkani",location:"India",id:1111,tag:"kok-IN"},ko:{language:"Korean",location:null,id:18,tag:"ko"},"ko-kr":{language:"Korean",location:"Korea",id:1042,tag:"ko-KR"},"ko-kp":{language:"Korean",location:"North Korea",id:4096,tag:"ko-KP"},khq:{language:"Koyra Chiini",location:null,id:4096,tag:"khq"},"khq-ml":{language:"Koyra Chiini",location:"Mali",id:4096,tag:"khq-ML"},ses:{language:"Koyraboro Senni",location:null,id:4096,tag:"ses"},"ses-ml":{language:"Koyraboro Senni",location:"Mali",id:4096,tag:"ses-ML"},nmg:{language:"Kwasio",location:null,id:4096,tag:"nmg"},"nmg-cm":{language:"Kwasio",location:"Cameroon",id:4096,tag:"nmg-CM"},ky:{language:"Kyrgyz",location:null,id:64,tag:"ky"},"ky-kg":{language:"Kyrgyz",location:"Kyrgyzstan",id:1088,tag:"ky-KG"},"ku-arab-ir":{language:"Kurdish",location:"Perso-Arabic, Iran",id:4096,tag:"ku-Arab-IR"},lkt:{language:"Lakota",location:null,id:4096,tag:"lkt"},"lkt-us":{language:"Lakota",location:"United States",id:4096,tag:"lkt-US"},lag:{language:"Langi",location:null,id:4096,tag:"lag"},"lag-tz":{language:"Langi",location:"Tanzania",id:4096,tag:"lag-TZ"},lo:{language:"Lao",location:null,id:84,tag:"lo"},"lo-la":{language:"Lao",location:"Lao P.D.R.",id:1108,tag:"lo-LA"},lv:{language:"Latvian",location:null,id:38,tag:"lv"},"lv-lv":{language:"Latvian",location:"Latvia",id:1062,tag:"lv-LV"},ln:{language:"Lingala",location:null,id:4096,tag:"ln"},"ln-ao":{language:"Lingala",location:"Angola",id:4096,tag:"ln-AO"},"ln-cf":{language:"Lingala",location:"Central African Republic",id:4096,tag:"ln-CF"},"ln-cg":{language:"Lingala",location:"Congo",id:4096,tag:"ln-CG"},"ln-cd":{language:"Lingala",location:"Congo DRC",id:4096,tag:"ln-CD"},lt:{language:"Lithuanian",location:null,id:39,tag:"lt"},"lt-lt":{language:"Lithuanian",location:"Lithuania",id:1063,tag:"lt-LT"},nds:{language:"Low German",location:null,id:4096,tag:"nds"},"nds-de":{language:"Low German",location:"Germany",id:4096,tag:"nds-DE"},"nds-nl":{language:"Low German",location:"Netherlands",id:4096,tag:"nds-NL"},dsb:{language:"Lower Sorbian",location:null,id:31790,tag:"dsb",version:"Windows 7"},"dsb-de":{language:"Lower Sorbian",location:"Germany",id:2094,tag:"dsb-DE"},lu:{language:"Luba-Katanga",location:null,id:4096,tag:"lu"},"lu-cd":{language:"Luba-Katanga",location:"Congo DRC",id:4096,tag:"lu-CD"},luo:{language:"Luo",location:null,id:4096,tag:"luo"},"luo-ke":{language:"Luo",location:"Kenya",id:4096,tag:"luo-KE"},lb:{language:"Luxembourgish",location:null,id:110,tag:"lb"},"lb-lu":{language:"Luxembourgish",location:"Luxembourg",id:1134,tag:"lb-LU"},luy:{language:"Luyia",location:null,id:4096,tag:"luy"},"luy-ke":{language:"Luyia",location:"Kenya",id:4096,tag:"luy-KE"},mk:{language:"Macedonian",location:null,id:47,tag:"mk"},"mk-mk":{language:"Macedonian",location:"North Macedonia",id:1071,tag:"mk-MK"},jmc:{language:"Machame",location:null,id:4096,tag:"jmc"},"jmc-tz":{language:"Machame",location:"Tanzania",id:4096,tag:"jmc-TZ"},mgh:{language:"Makhuwa-Meetto",location:null,id:4096,tag:"mgh"},"mgh-mz":{language:"Makhuwa-Meetto",location:"Mozambique",id:4096,tag:"mgh-MZ"},kde:{language:"Makonde",location:null,id:4096,tag:"kde"},"kde-tz":{language:"Makonde",location:"Tanzania",id:4096,tag:"kde-TZ"},mg:{language:"Malagasy",location:null,id:4096,tag:"mg"},"mg-mg":{language:"Malagasy",location:"Madagascar",id:4096,tag:"mg-MG"},ms:{language:"Malay",location:null,id:62,tag:"ms"},"ms-bn":{language:"Malay",location:"Brunei Darussalam",id:2110,tag:"ms-BN"},"ms-my":{language:"Malay",location:"Malaysia",id:1086,tag:"ms-MY"},ml:{language:"Malayalam",location:null,id:76,tag:"ml"},"ml-in":{language:"Malayalam",location:"India",id:1100,tag:"ml-IN"},mt:{language:"Maltese",location:null,id:58,tag:"mt"},"mt-mt":{language:"Maltese",location:"Malta",id:1082,tag:"mt-MT"},gv:{language:"Manx",location:null,id:4096,tag:"gv"},"gv-im":{language:"Manx",location:"Isle of Man",id:4096,tag:"gv-IM"},mi:{language:"Maori",location:null,id:129,tag:"mi"},"mi-nz":{language:"Maori",location:"New Zealand",id:1153,tag:"mi-NZ"},arn:{language:"Mapudungun",location:null,id:122,tag:"arn"},"arn-cl":{language:"Mapudungun",location:"Chile",id:1146,tag:"arn-CL"},mr:{language:"Marathi",location:null,id:78,tag:"mr"},"mr-in":{language:"Marathi",location:"India",id:1102,tag:"mr-IN"},mas:{language:"Masai",location:null,id:4096,tag:"mas"},"mas-ke":{language:"Masai",location:"Kenya",id:4096,tag:"mas-KE"},"mas-tz":{language:"Masai",location:"Tanzania",id:4096,tag:"mas-TZ"},"mzn-ir":{language:"Mazanderani",location:"Iran",id:4096,tag:"mzn-IR"},mer:{language:"Meru",location:null,id:4096,tag:"mer"},"mer-ke":{language:"Meru",location:"Kenya",id:4096,tag:"mer-KE"},mgo:{language:"Meta'",location:null,id:4096,tag:"mgo"},"mgo-cm":{language:"Meta'",location:"Cameroon",id:4096,tag:"mgo-CM"},moh:{language:"Mohawk",location:null,id:124,tag:"moh"},"moh-ca":{language:"Mohawk",location:"Canada",id:1148,tag:"moh-CA"},mn:{language:"Mongolian (Cyrillic)",location:null,id:80,tag:"mn"},"mn-cyrl":{language:"Mongolian (Cyrillic)",location:null,id:30800,tag:"mn-Cyrl",version:"Windows 7"},"mn-mn":{language:"Mongolian (Cyrillic)",location:"Mongolia",id:1104,tag:"mn-MN"},"mn-mong":{language:"Mongolian (Traditional Mongolian)",location:null,id:31824,tag:"mn-Mong",version:"Windows 7"},"mn-mong-cn":{language:"Mongolian (Traditional Mongolian)",location:"People's Republic of China",id:2128,tag:"mn-Mong-CN",version:"Windows V"},"mn-mong-mn":{language:"Mongolian (Traditional Mongolian)",location:"Mongolia",id:3152,tag:"mn-Mong-MN",version:"Windows 7"},mfe:{language:"Morisyen",location:null,id:4096,tag:"mfe"},"mfe-mu":{language:"Morisyen",location:"Mauritius",id:4096,tag:"mfe-MU"},mua:{language:"Mundang",location:null,id:4096,tag:"mua"},"mua-cm":{language:"Mundang",location:"Cameroon",id:4096,tag:"mua-CM"},nqo:{language:"N'ko",location:null,id:4096,tag:"nqo"},"nqo-gn":{language:"N'ko",location:"Guinea",id:4096,tag:"nqo-GN"},naq:{language:"Nama",location:null,id:4096,tag:"naq"},"naq-na":{language:"Nama",location:"Namibia",id:4096,tag:"naq-NA"},ne:{language:"Nepali",location:null,id:97,tag:"ne"},"ne-in":{language:"Nepali",location:"India",id:2145,tag:"ne-IN"},"ne-np":{language:"Nepali",location:"Nepal",id:1121,tag:"ne-NP"},nnh:{language:"Ngiemboon",location:null,id:4096,tag:"nnh"},"nnh-cm":{language:"Ngiemboon",location:"Cameroon",id:4096,tag:"nnh-CM"},jgo:{language:"Ngomba",location:null,id:4096,tag:"jgo"},"jgo-cm":{language:"Ngomba",location:"Cameroon",id:4096,tag:"jgo-CM"},"lrc-iq":{language:"Northern Luri",location:"Iraq",id:4096,tag:"lrc-IQ"},"lrc-ir":{language:"Northern Luri",location:"Iran",id:4096,tag:"lrc-IR"},nd:{language:"North Ndebele",location:null,id:4096,tag:"nd"},"nd-zw":{language:"North Ndebele",location:"Zimbabwe",id:4096,tag:"nd-ZW"},no:{language:"Norwegian (Bokmal)",location:null,id:20,tag:"no"},nb:{language:"Norwegian (Bokmal)",location:null,id:31764,tag:"nb"},"nb-no":{language:"Norwegian (Bokmal)",location:"Norway",id:1044,tag:"nb-NO"},nn:{language:"Norwegian (Nynorsk)",location:null,id:30740,tag:"nn"},"nn-no":{language:"Norwegian (Nynorsk)",location:"Norway",id:2068,tag:"nn-NO"},"nb-sj":{language:"Norwegian Bokmål",location:"Svalbard and Jan Mayen",id:4096,tag:"nb-SJ"},nus:{language:"Nuer",location:null,id:4096,tag:"nus"},"nus-sd":{language:"Nuer",location:"Sudan",id:4096,tag:"nus-SD"},"nus-ss":{language:"Nuer",location:"South Sudan",id:4096,tag:"nus-SS"},nyn:{language:"Nyankole",location:null,id:4096,tag:"nyn"},"nyn-ug":{language:"Nyankole",location:"Uganda",id:4096,tag:"nyn-UG"},oc:{language:"Occitan",location:null,id:130,tag:"oc"},"oc-fr":{language:"Occitan",location:"France",id:1154,tag:"oc-FR"},or:{language:"Odia",location:null,id:72,tag:"or"},"or-in":{language:"Odia",location:"India",id:1096,tag:"or-IN"},om:{language:"Oromo",location:null,id:114,tag:"om"},"om-et":{language:"Oromo",location:"Ethiopia",id:1138,tag:"om-ET"},"om-ke":{language:"Oromo",location:"Kenya",id:4096,tag:"om-KE"},os:{language:"Ossetian",location:null,id:4096,tag:"os"},"os-ge":{language:"Ossetian",location:"Cyrillic, Georgia",id:4096,tag:"os-GE"},"os-ru":{language:"Ossetian",location:"Cyrillic, Russia",id:4096,tag:"os-RU"},ps:{language:"Pashto",location:null,id:99,tag:"ps"},"ps-af":{language:"Pashto",location:"Afghanistan",id:1123,tag:"ps-AF"},"ps-pk":{language:"Pashto",location:"Pakistan",id:4096,tag:"ps-PK"},fa:{language:"Persian",location:null,id:41,tag:"fa"},"fa-af":{language:"Persian",location:"Afghanistan",id:4096,tag:"fa-AF"},"fa-ir":{language:"Persian",location:"Iran",id:1065,tag:"fa-IR"},pl:{language:"Polish",location:null,id:21,tag:"pl"},"pl-pl":{language:"Polish",location:"Poland",id:1045,tag:"pl-PL"},pt:{language:"Portuguese",location:null,id:22,tag:"pt"},"pt-ao":{language:"Portuguese",location:"Angola",id:4096,tag:"pt-AO"},"pt-br":{language:"Portuguese",location:"Brazil",id:1046,tag:"pt-BR"},"pt-cv":{language:"Portuguese",location:"Cabo Verde",id:4096,tag:"pt-CV"},"pt-gq":{language:"Portuguese",location:"Equatorial Guinea",id:4096,tag:"pt-GQ"},"pt-gw":{language:"Portuguese",location:"Guinea-Bissau",id:4096,tag:"pt-GW"},"pt-lu":{language:"Portuguese",location:"Luxembourg",id:4096,tag:"pt-LU"},"pt-mo":{language:"Portuguese",location:"Macao SAR",id:4096,tag:"pt-MO"},"pt-mz":{language:"Portuguese",location:"Mozambique",id:4096,tag:"pt-MZ"},"pt-pt":{language:"Portuguese",location:"Portugal",id:2070,tag:"pt-PT"},"pt-st":{language:"Portuguese",location:"São Tomé and Príncipe",id:4096,tag:"pt-ST"},"pt-ch":{language:"Portuguese",location:"Switzerland",id:4096,tag:"pt-CH"},"pt-tl":{language:"Portuguese",location:"Timor-Leste",id:4096,tag:"pt-TL"},"prg-001":{language:"Prussian",location:null,id:4096,tag:"prg-001"},"qps-ploca":{language:"Pseudo Language",location:"Pseudo locale for east Asian/complex script localization testing",id:1534,tag:"qps-ploca"},"qps-ploc":{language:"Pseudo Language",location:"Pseudo locale used for localization testing",id:1281,tag:"qps-ploc"},"qps-plocm":{language:"Pseudo Language",location:"Pseudo locale used for localization testing of mirrored locales",id:2559,tag:"qps-plocm"},pa:{language:"Punjabi",location:null,id:70,tag:"pa"},"pa-arab":{language:"Punjabi",location:null,id:31814,tag:"pa-Arab"},"pa-in":{language:"Punjabi",location:"India",id:1094,tag:"pa-IN"},"pa-arab-pk":{language:"Punjabi",location:"Islamic Republic of Pakistan",id:2118,tag:"pa-Arab-PK"},quz:{language:"Quechua",location:null,id:107,tag:"quz"},"quz-bo":{language:"Quechua",location:"Bolivia",id:1131,tag:"quz-BO"},"quz-ec":{language:"Quechua",location:"Ecuador",id:2155,tag:"quz-EC"},"quz-pe":{language:"Quechua",location:"Peru",id:3179,tag:"quz-PE"},ksh:{language:"Ripuarian",location:null,id:4096,tag:"ksh"},"ksh-de":{language:"Ripuarian",location:"Germany",id:4096,tag:"ksh-DE"},ro:{language:"Romanian",location:null,id:24,tag:"ro"},"ro-md":{language:"Romanian",location:"Moldova",id:2072,tag:"ro-MD"},"ro-ro":{language:"Romanian",location:"Romania",id:1048,tag:"ro-RO"},rm:{language:"Romansh",location:null,id:23,tag:"rm"},"rm-ch":{language:"Romansh",location:"Switzerland",id:1047,tag:"rm-CH"},rof:{language:"Rombo",location:null,id:4096,tag:"rof"},"rof-tz":{language:"Rombo",location:"Tanzania",id:4096,tag:"rof-TZ"},rn:{language:"Rundi",location:null,id:4096,tag:"rn"},"rn-bi":{language:"Rundi",location:"Burundi",id:4096,tag:"rn-BI"},ru:{language:"Russian",location:null,id:25,tag:"ru"},"ru-by":{language:"Russian",location:"Belarus",id:4096,tag:"ru-BY"},"ru-kz":{language:"Russian",location:"Kazakhstan",id:4096,tag:"ru-KZ"},"ru-kg":{language:"Russian",location:"Kyrgyzstan",id:4096,tag:"ru-KG"},"ru-md":{language:"Russian",location:"Moldova",id:2073,tag:"ru-MD"},"ru-ru":{language:"Russian",location:"Russia",id:1049,tag:"ru-RU"},"ru-ua":{language:"Russian",location:"Ukraine",id:4096,tag:"ru-UA"},rwk:{language:"Rwa",location:null,id:4096,tag:"rwk"},"rwk-tz":{language:"Rwa",location:"Tanzania",id:4096,tag:"rwk-TZ"},ssy:{language:"Saho",location:null,id:4096,tag:"ssy"},"ssy-er":{language:"Saho",location:"Eritrea",id:4096,tag:"ssy-ER"},sah:{language:"Sakha",location:null,id:133,tag:"sah"},"sah-ru":{language:"Sakha",location:"Russia",id:1157,tag:"sah-RU"},saq:{language:"Samburu",location:null,id:4096,tag:"saq"},"saq-ke":{language:"Samburu",location:"Kenya",id:4096,tag:"saq-KE"},smn:{language:"Sami (Inari)",location:null,id:28731,tag:"smn",version:"Windows 7"},"smn-fi":{language:"Sami (Inari)",location:"Finland",id:9275,tag:"smn-FI"},smj:{language:"Sami (Lule)",location:null,id:31803,tag:"smj",version:"Windows 7"},"smj-no":{language:"Sami (Lule)",location:"Norway",id:4155,tag:"smj-NO"},"smj-se":{language:"Sami (Lule)",location:"Sweden",id:5179,tag:"smj-SE"},se:{language:"Sami (Northern)",location:null,id:59,tag:"se"},"se-fi":{language:"Sami (Northern)",location:"Finland",id:3131,tag:"se-FI"},"se-no":{language:"Sami (Northern)",location:"Norway",id:1083,tag:"se-NO"},"se-se":{language:"Sami (Northern)",location:"Sweden",id:2107,tag:"se-SE"},sms:{language:"Sami (Skolt)",location:null,id:29755,tag:"sms",version:"Windows 7"},"sms-fi":{language:"Sami (Skolt)",location:"Finland",id:8251,tag:"sms-FI"},sma:{language:"Sami (Southern)",location:null,id:30779,tag:"sma",version:"Windows 7"},"sma-no":{language:"Sami (Southern)",location:"Norway",id:6203,tag:"sma-NO"},"sma-se":{language:"Sami (Southern)",location:"Sweden",id:7227,tag:"sma-SE"},sg:{language:"Sango",location:null,id:4096,tag:"sg"},"sg-cf":{language:"Sango",location:"Central African Republic",id:4096,tag:"sg-CF"},sbp:{language:"Sangu",location:null,id:4096,tag:"sbp"},"sbp-tz":{language:"Sangu",location:"Tanzania",id:4096,tag:"sbp-TZ"},sa:{language:"Sanskrit",location:null,id:79,tag:"sa"},"sa-in":{language:"Sanskrit",location:"India",id:1103,tag:"sa-IN"},gd:{language:"Scottish Gaelic",location:null,id:145,tag:"gd",version:"Windows 7"},"gd-gb":{language:"Scottish Gaelic",location:"United Kingdom",id:1169,tag:"gd-GB"},seh:{language:"Sena",location:null,id:4096,tag:"seh"},"seh-mz":{language:"Sena",location:"Mozambique",id:4096,tag:"seh-MZ"},"sr-cyrl":{language:"Serbian (Cyrillic)",location:null,id:27674,tag:"sr-Cyrl",version:"Windows 7"},"sr-cyrl-ba":{language:"Serbian (Cyrillic)",location:"Bosnia and Herzegovina",id:7194,tag:"sr-Cyrl-BA"},"sr-cyrl-me":{language:"Serbian (Cyrillic)",location:"Montenegro",id:12314,tag:"sr-Cyrl-ME"},"sr-cyrl-rs":{language:"Serbian (Cyrillic)",location:"Serbia",id:10266,tag:"sr-Cyrl-RS"},"sr-cyrl-cs":{language:"Serbian (Cyrillic)",location:"Serbia and Montenegro (Former)",id:3098,tag:"sr-Cyrl-CS"},"sr-latn":{language:"Serbian (Latin)",location:null,id:28698,tag:"sr-Latn",version:"Windows 7"},sr:{language:"Serbian (Latin)",location:null,id:31770,tag:"sr"},"sr-latn-ba":{language:"Serbian (Latin)",location:"Bosnia and Herzegovina",id:6170,tag:"sr-Latn-BA"},"sr-latn-me":{language:"Serbian (Latin)",location:"Montenegro",id:11290,tag:"sr-Latn-ME"},"sr-latn-rs":{language:"Serbian (Latin)",location:"Serbia",id:9242,tag:"sr-Latn-RS"},"sr-latn-cs":{language:"Serbian (Latin)",location:"Serbia and Montenegro (Former)",id:2074,tag:"sr-Latn-CS"},nso:{language:"Sesotho sa Leboa",location:null,id:108,tag:"nso"},"nso-za":{language:"Sesotho sa Leboa",location:"South Africa",id:1132,tag:"nso-ZA"},tn:{language:"Setswana",location:null,id:50,tag:"tn"},"tn-bw":{language:"Setswana",location:"Botswana",id:2098,tag:"tn-BW"},"tn-za":{language:"Setswana",location:"South Africa",id:1074,tag:"tn-ZA"},ksb:{language:"Shambala",location:null,id:4096,tag:"ksb"},"ksb-tz":{language:"Shambala",location:"Tanzania",id:4096,tag:"ksb-TZ"},sn:{language:"Shona",location:null,id:4096,tag:"sn"},"sn-latn":{language:"Shona",location:"Latin",id:4096,tag:"sn-Latn"},"sn-latn-zw":{language:"Shona",location:"Zimbabwe",id:4096,tag:"sn-Latn-ZW"},sd:{language:"Sindhi",location:null,id:89,tag:"sd"},"sd-arab":{language:"Sindhi",location:null,id:31833,tag:"sd-Arab"},"sd-arab-pk":{language:"Sindhi",location:"Islamic Republic of Pakistan",id:2137,tag:"sd-Arab-PK"},si:{language:"Sinhala",location:null,id:91,tag:"si"},"si-lk":{language:"Sinhala",location:"Sri Lanka",id:1115,tag:"si-LK"},sk:{language:"Slovak",location:null,id:27,tag:"sk"},"sk-sk":{language:"Slovak",location:"Slovakia",id:1051,tag:"sk-SK"},sl:{language:"Slovenian",location:null,id:36,tag:"sl"},"sl-si":{language:"Slovenian",location:"Slovenia",id:1060,tag:"sl-SI"},xog:{language:"Soga",location:null,id:4096,tag:"xog"},"xog-ug":{language:"Soga",location:"Uganda",id:4096,tag:"xog-UG"},so:{language:"Somali",location:null,id:119,tag:"so"},"so-dj":{language:"Somali",location:"Djibouti",id:4096,tag:"so-DJ"},"so-et":{language:"Somali",location:"Ethiopia",id:4096,tag:"so-ET"},"so-ke":{language:"Somali",location:"Kenya",id:4096,tag:"so-KE"},"so-so":{language:"Somali",location:"Somalia",id:1143,tag:"so-SO"},st:{language:"Sotho",location:null,id:48,tag:"st"},"st-za":{language:"Sotho",location:"South Africa",id:1072,tag:"st-ZA"},nr:{language:"South Ndebele",location:null,id:4096,tag:"nr"},"nr-za":{language:"South Ndebele",location:"South Africa",id:4096,tag:"nr-ZA"},"st-ls":{language:"Southern Sotho",location:"Lesotho",id:4096,tag:"st-LS"},es:{language:"Spanish",location:null,id:10,tag:"es"},"es-ar":{language:"Spanish",location:"Argentina",id:11274,tag:"es-AR"},"es-bz":{language:"Spanish",location:"Belize",id:4096,tag:"es-BZ"},"es-ve":{language:"Spanish",location:"Bolivarian Republic of Venezuela",id:8202,tag:"es-VE"},"es-bo":{language:"Spanish",location:"Bolivia",id:16394,tag:"es-BO"},"es-br":{language:"Spanish",location:"Brazil",id:4096,tag:"es-BR"},"es-cl":{language:"Spanish",location:"Chile",id:13322,tag:"es-CL"},"es-co":{language:"Spanish",location:"Colombia",id:9226,tag:"es-CO"},"es-cr":{language:"Spanish",location:"Costa Rica",id:5130,tag:"es-CR"},"es-cu":{language:"Spanish",location:"Cuba",id:23562,tag:"es-CU"},"es-do":{language:"Spanish",location:"Dominican Republic",id:7178,tag:"es-DO"},"es-ec":{language:"Spanish",location:"Ecuador",id:12298,tag:"es-EC"},"es-sv":{language:"Spanish",location:"El Salvador",id:17418,tag:"es-SV"},"es-gq":{language:"Spanish",location:"Equatorial Guinea",id:4096,tag:"es-GQ"},"es-gt":{language:"Spanish",location:"Guatemala",id:4106,tag:"es-GT"},"es-hn":{language:"Spanish",location:"Honduras",id:18442,tag:"es-HN"},"es-419":{language:"Spanish",location:"Latin America",id:22538,tag:"es-419"},"es-mx":{language:"Spanish",location:"Mexico",id:2058,tag:"es-MX"},"es-ni":{language:"Spanish",location:"Nicaragua",id:19466,tag:"es-NI"},"es-pa":{language:"Spanish",location:"Panama",id:6154,tag:"es-PA"},"es-py":{language:"Spanish",location:"Paraguay",id:15370,tag:"es-PY"},"es-pe":{language:"Spanish",location:"Peru",id:10250,tag:"es-PE"},"es-ph":{language:"Spanish",location:"Philippines",id:4096,tag:"es-PH"},"es-pr":{language:"Spanish",location:"Puerto Rico",id:20490,tag:"es-PR"},"es-es_tradnl":{language:"Spanish",location:"Spain",id:1034,tag:"es-ES_tradnl"},"es-es":{language:"Spanish",location:"Spain",id:3082,tag:"es-ES"},"es-us":{language:"Spanish",location:"UnitedStates",id:21514,tag:"es-US"},"es-uy":{language:"Spanish",location:"Uruguay",id:14346,tag:"es-UY"},zgh:{language:"Standard Moroccan Tamazight",location:null,id:4096,tag:"zgh"},"zgh-tfng-ma":{language:"Standard Moroccan Tamazight",location:"Morocco",id:4096,tag:"zgh-Tfng-MA"},"zgh-tfng":{language:"Standard Moroccan Tamazight",location:"Tifinagh",id:4096,tag:"zgh-Tfng"},ss:{language:"Swati",location:null,id:4096,tag:"ss"},"ss-za":{language:"Swati",location:"South Africa",id:4096,tag:"ss-ZA"},"ss-sz":{language:"Swati",location:"Swaziland",id:4096,tag:"ss-SZ"},sv:{language:"Swedish",location:null,id:29,tag:"sv"},"sv-ax":{language:"Swedish",location:"Åland Islands",id:4096,tag:"sv-AX"},"sv-fi":{language:"Swedish",location:"Finland",id:2077,tag:"sv-FI"},"sv-se":{language:"Swedish",location:"Sweden",id:1053,tag:"sv-SE"},syr:{language:"Syriac",location:null,id:90,tag:"syr"},"syr-sy":{language:"Syriac",location:"Syria",id:1114,tag:"syr-SY"},shi:{language:"Tachelhit",location:null,id:4096,tag:"shi"},"shi-tfng":{language:"Tachelhit",location:"Tifinagh",id:4096,tag:"shi-Tfng"},"shi-tfng-ma":{language:"Tachelhit",location:"Tifinagh, Morocco",id:4096,tag:"shi-Tfng-MA"},"shi-latn":{language:"Tachelhit (Latin)",location:null,id:4096,tag:"shi-Latn"},"shi-latn-ma":{language:"Tachelhit (Latin)",location:"Morocco",id:4096,tag:"shi-Latn-MA"},dav:{language:"Taita",location:null,id:4096,tag:"dav"},"dav-ke":{language:"Taita",location:"Kenya",id:4096,tag:"dav-KE"},tg:{language:"Tajik (Cyrillic)",location:null,id:40,tag:"tg"},"tg-cyrl":{language:"Tajik (Cyrillic)",location:null,id:31784,tag:"tg-Cyrl",version:"Windows 7"},"tg-cyrl-tj":{language:"Tajik (Cyrillic)",location:"Tajikistan",id:1064,tag:"tg-Cyrl-TJ"},tzm:{language:"Tamazight (Latin)",location:null,id:95,tag:"tzm"},"tzm-latn":{language:"Tamazight (Latin)",location:null,id:31839,tag:"tzm-Latn",version:"Windows 7"},"tzm-latn-dz":{language:"Tamazight (Latin)",location:"Algeria",id:2143,tag:"tzm-Latn-DZ"},ta:{language:"Tamil",location:null,id:73,tag:"ta"},"ta-in":{language:"Tamil",location:"India",id:1097,tag:"ta-IN"},"ta-my":{language:"Tamil",location:"Malaysia",id:4096,tag:"ta-MY"},"ta-sg":{language:"Tamil",location:"Singapore",id:4096,tag:"ta-SG"},"ta-lk":{language:"Tamil",location:"Sri Lanka",id:2121,tag:"ta-LK"},twq:{language:"Tasawaq",location:null,id:4096,tag:"twq"},"twq-ne":{language:"Tasawaq",location:"Niger",id:4096,tag:"twq-NE"},tt:{language:"Tatar",location:null,id:68,tag:"tt"},"tt-ru":{language:"Tatar",location:"Russia",id:1092,tag:"tt-RU"},te:{language:"Telugu",location:null,id:74,tag:"te"},"te-in":{language:"Telugu",location:"India",id:1098,tag:"te-IN"},teo:{language:"Teso",location:null,id:4096,tag:"teo"},"teo-ke":{language:"Teso",location:"Kenya",id:4096,tag:"teo-KE"},"teo-ug":{language:"Teso",location:"Uganda",id:4096,tag:"teo-UG"},th:{language:"Thai",location:null,id:30,tag:"th"},"th-th":{language:"Thai",location:"Thailand",id:1054,tag:"th-TH"},bo:{language:"Tibetan",location:null,id:81,tag:"bo"},"bo-in":{language:"Tibetan",location:"India",id:4096,tag:"bo-IN"},"bo-cn":{language:"Tibetan",location:"People's Republic of China",id:1105,tag:"bo-CN"},tig:{language:"Tigre",location:null,id:4096,tag:"tig"},"tig-er":{language:"Tigre",location:"Eritrea",id:4096,tag:"tig-ER"},ti:{language:"Tigrinya",location:null,id:115,tag:"ti"},"ti-er":{language:"Tigrinya",location:"Eritrea",id:2163,tag:"ti-ER"},"ti-et":{language:"Tigrinya",location:"Ethiopia",id:1139,tag:"ti-ET"},to:{language:"Tongan",location:null,id:4096,tag:"to"},"to-to":{language:"Tongan",location:"Tonga",id:4096,tag:"to-TO"},ts:{language:"Tsonga",location:null,id:49,tag:"ts"},"ts-za":{language:"Tsonga",location:"South Africa",id:1073,tag:"ts-ZA"},tr:{language:"Turkish",location:null,id:31,tag:"tr"},"tr-cy":{language:"Turkish",location:"Cyprus",id:4096,tag:"tr-CY"},"tr-tr":{language:"Turkish",location:"Turkey",id:1055,tag:"tr-TR"},tk:{language:"Turkmen",location:null,id:66,tag:"tk"},"tk-tm":{language:"Turkmen",location:"Turkmenistan",id:1090,tag:"tk-TM"},uk:{language:"Ukrainian",location:null,id:34,tag:"uk"},"uk-ua":{language:"Ukrainian",location:"Ukraine",id:1058,tag:"uk-UA"},hsb:{language:"Upper Sorbian",location:null,id:46,tag:"hsb"},"hsb-de":{language:"Upper Sorbian",location:"Germany",id:1070,tag:"hsb-DE"},ur:{language:"Urdu",location:null,id:32,tag:"ur"},"ur-in":{language:"Urdu",location:"India",id:2080,tag:"ur-IN"},"ur-pk":{language:"Urdu",location:"Islamic Republic of Pakistan",id:1056,tag:"ur-PK"},ug:{language:"Uyghur",location:null,id:128,tag:"ug"},"ug-cn":{language:"Uyghur",location:"People's Republic of China",id:1152,tag:"ug-CN"},"uz-arab":{language:"Uzbek",location:"Perso-Arabic",id:4096,tag:"uz-Arab"},"uz-arab-af":{language:"Uzbek",location:"Perso-Arabic, Afghanistan",id:4096,tag:"uz-Arab-AF"},"uz-cyrl":{language:"Uzbek (Cyrillic)",location:null,id:30787,tag:"uz-Cyrl",version:"Windows 7"},"uz-cyrl-uz":{language:"Uzbek (Cyrillic)",location:"Uzbekistan",id:2115,tag:"uz-Cyrl-UZ"},uz:{language:"Uzbek (Latin)",location:null,id:67,tag:"uz"},"uz-latn":{language:"Uzbek (Latin)",location:null,id:31811,tag:"uz-Latn",version:"Windows7"},"uz-latn-uz":{language:"Uzbek (Latin)",location:"Uzbekistan",id:1091,tag:"uz-Latn-UZ"},vai:{language:"Vai",location:null,id:4096,tag:"vai"},"vai-vaii":{language:"Vai",location:null,id:4096,tag:"vai-Vaii"},"vai-vaii-lr":{language:"Vai",location:"Liberia",id:4096,tag:"vai-Vaii-LR"},"vai-latn-lr":{language:"Vai (Latin)",location:"Liberia",id:4096,tag:"vai-Latn-LR"},"vai-latn":{language:"Vai (Latin)",location:null,id:4096,tag:"vai-Latn"},"ca-es-":{language:"Valencian",location:"Spain",id:2051,tag:"ca-ES-"},ve:{language:"Venda",location:null,id:51,tag:"ve"},"ve-za":{language:"Venda",location:"South Africa",id:1075,tag:"ve-ZA"},vi:{language:"Vietnamese",location:null,id:42,tag:"vi"},"vi-vn":{language:"Vietnamese",location:"Vietnam",id:1066,tag:"vi-VN"},vo:{language:"Volapük",location:null,id:4096,tag:"vo"},"vo-001":{language:"Volapük",location:"World",id:4096,tag:"vo-001"},vun:{language:"Vunjo",location:null,id:4096,tag:"vun"},"vun-tz":{language:"Vunjo",location:"Tanzania",id:4096,tag:"vun-TZ"},wae:{language:"Walser",location:null,id:4096,tag:"wae"},"wae-ch":{language:"Walser",location:"Switzerland",id:4096,tag:"wae-CH"},cy:{language:"Welsh",location:null,id:82,tag:"cy"},"cy-gb":{language:"Welsh",location:"United Kingdom",id:1106,tag:"cy-GB",version:"ReleaseE1"},wal:{language:"Wolaytta",location:null,id:4096,tag:"wal"},"wal-et":{language:"Wolaytta",location:"Ethiopia",id:4096,tag:"wal-ET"},wo:{language:"Wolof",location:null,id:136,tag:"wo"},"wo-sn":{language:"Wolof",location:"Senegal",id:1160,tag:"wo-SN"},xh:{language:"Xhosa",location:null,id:52,tag:"xh"},"xh-za":{language:"Xhosa",location:"South Africa",id:1076,tag:"xh-ZA"},yav:{language:"Yangben",location:null,id:4096,tag:"yav"},"yav-cm":{language:"Yangben",location:"Cameroon",id:4096,tag:"yav-CM"},ii:{language:"Yi",location:null,id:120,tag:"ii"},"ii-cn":{language:"Yi",location:"People's Republic of China",id:1144,tag:"ii-CN"},yo:{language:"Yoruba",location:null,id:106,tag:"yo"},"yo-bj":{language:"Yoruba",location:"Benin",id:4096,tag:"yo-BJ"},"yo-ng":{language:"Yoruba",location:"Nigeria",id:1130,tag:"yo-NG"},dje:{language:"Zarma",location:null,id:4096,tag:"dje"},"dje-ne":{language:"Zarma",location:"Niger",id:4096,tag:"dje-NE"},zu:{language:"Zulu",location:null,id:53,tag:"zu"},"zu-za":{language:"Zulu",location:"South Africa",id:1077,tag:"zu-ZA"}},mh={Abkhazian:{name:"Abkhazian",names:["Abkhazian"],"iso639-2":"abk","iso639-1":"ab"},Achinese:{name:"Achinese",names:["Achinese"],"iso639-2":"ace","iso639-1":null},Acoli:{name:"Acoli",names:["Acoli"],"iso639-2":"ach","iso639-1":null},Adangme:{name:"Adangme",names:["Adangme"],"iso639-2":"ada","iso639-1":null},Adygei:{name:"Adygei",names:["Adyghe","Adygei"],"iso639-2":"ady","iso639-1":null},Adyghe:{name:"Adyghe",names:["Adyghe","Adygei"],"iso639-2":"ady","iso639-1":null},Afar:{name:"Afar",names:["Afar"],"iso639-2":"aar","iso639-1":"aa"},Afrihili:{name:"Afrihili",names:["Afrihili"],"iso639-2":"afh","iso639-1":null},Afrikaans:{name:"Afrikaans",names:["Afrikaans"],"iso639-2":"afr","iso639-1":"af"},"Afro-Asiatic languages":{name:"Afro-Asiatic languages",names:["Afro-Asiatic languages"],"iso639-2":"afa","iso639-1":null},Ainu:{name:"Ainu",names:["Ainu"],"iso639-2":"ain","iso639-1":null},Akan:{name:"Akan",names:["Akan"],"iso639-2":"aka","iso639-1":"ak"},Akkadian:{name:"Akkadian",names:["Akkadian"],"iso639-2":"akk","iso639-1":null},Albanian:{name:"Albanian",names:["Albanian"],"iso639-2":"alb/sqi","iso639-1":"sq"},Alemannic:{name:"Alemannic",names:["Swiss German","Alemannic","Alsatian"],"iso639-2":"gsw","iso639-1":null},Aleut:{name:"Aleut",names:["Aleut"],"iso639-2":"ale","iso639-1":null},"Algonquian languages":{name:"Algonquian languages",names:["Algonquian languages"],"iso639-2":"alg","iso639-1":null},Alsatian:{name:"Alsatian",names:["Swiss German","Alemannic","Alsatian"],"iso639-2":"gsw","iso639-1":null},"Altaic languages":{name:"Altaic languages",names:["Altaic languages"],"iso639-2":"tut","iso639-1":null},Amharic:{name:"Amharic",names:["Amharic"],"iso639-2":"amh","iso639-1":"am"},Angika:{name:"Angika",names:["Angika"],"iso639-2":"anp","iso639-1":null},"Apache languages":{name:"Apache languages",names:["Apache languages"],"iso639-2":"apa","iso639-1":null},Arabic:{name:"Arabic",names:["Arabic"],"iso639-2":"ara","iso639-1":"ar"},Aragonese:{name:"Aragonese",names:["Aragonese"],"iso639-2":"arg","iso639-1":"an"},Arapaho:{name:"Arapaho",names:["Arapaho"],"iso639-2":"arp","iso639-1":null},Arawak:{name:"Arawak",names:["Arawak"],"iso639-2":"arw","iso639-1":null},Armenian:{name:"Armenian",names:["Armenian"],"iso639-2":"arm/hye","iso639-1":"hy"},Aromanian:{name:"Aromanian",names:["Aromanian","Arumanian","Macedo-Romanian"],"iso639-2":"rup","iso639-1":null},"Artificial languages":{name:"Artificial languages",names:["Artificial languages"],"iso639-2":"art","iso639-1":null},Arumanian:{name:"Arumanian",names:["Aromanian","Arumanian","Macedo-Romanian"],"iso639-2":"rup","iso639-1":null},Assamese:{name:"Assamese",names:["Assamese"],"iso639-2":"asm","iso639-1":"as"},Asturian:{name:"Asturian",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},Asturleonese:{name:"Asturleonese",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},"Athapascan languages":{name:"Athapascan languages",names:["Athapascan languages"],"iso639-2":"ath","iso639-1":null},"Australian languages":{name:"Australian languages",names:["Australian languages"],"iso639-2":"aus","iso639-1":null},"Austronesian languages":{name:"Austronesian languages",names:["Austronesian languages"],"iso639-2":"map","iso639-1":null},Avaric:{name:"Avaric",names:["Avaric"],"iso639-2":"ava","iso639-1":"av"},Avestan:{name:"Avestan",names:["Avestan"],"iso639-2":"ave","iso639-1":"ae"},Awadhi:{name:"Awadhi",names:["Awadhi"],"iso639-2":"awa","iso639-1":null},Aymara:{name:"Aymara",names:["Aymara"],"iso639-2":"aym","iso639-1":"ay"},Azerbaijani:{name:"Azerbaijani",names:["Azerbaijani"],"iso639-2":"aze","iso639-1":"az"},Bable:{name:"Bable",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},Balinese:{name:"Balinese",names:["Balinese"],"iso639-2":"ban","iso639-1":null},"Baltic languages":{name:"Baltic languages",names:["Baltic languages"],"iso639-2":"bat","iso639-1":null},Baluchi:{name:"Baluchi",names:["Baluchi"],"iso639-2":"bal","iso639-1":null},Bambara:{name:"Bambara",names:["Bambara"],"iso639-2":"bam","iso639-1":"bm"},"Bamileke languages":{name:"Bamileke languages",names:["Bamileke languages"],"iso639-2":"bai","iso639-1":null},"Banda languages":{name:"Banda languages",names:["Banda languages"],"iso639-2":"bad","iso639-1":null},"Bantu languages":{name:"Bantu languages",names:["Bantu languages"],"iso639-2":"bnt","iso639-1":null},Basa:{name:"Basa",names:["Basa"],"iso639-2":"bas","iso639-1":null},Bashkir:{name:"Bashkir",names:["Bashkir"],"iso639-2":"bak","iso639-1":"ba"},Basque:{name:"Basque",names:["Basque"],"iso639-2":"baq/eus","iso639-1":"eu"},"Batak languages":{name:"Batak languages",names:["Batak languages"],"iso639-2":"btk","iso639-1":null},Bedawiyet:{name:"Bedawiyet",names:["Beja","Bedawiyet"],"iso639-2":"bej","iso639-1":null},Beja:{name:"Beja",names:["Beja","Bedawiyet"],"iso639-2":"bej","iso639-1":null},Belarusian:{name:"Belarusian",names:["Belarusian"],"iso639-2":"bel","iso639-1":"be"},Bemba:{name:"Bemba",names:["Bemba"],"iso639-2":"bem","iso639-1":null},Bengali:{name:"Bengali",names:["Bengali"],"iso639-2":"ben","iso639-1":"bn"},"Berber languages":{name:"Berber languages",names:["Berber languages"],"iso639-2":"ber","iso639-1":null},Bhojpuri:{name:"Bhojpuri",names:["Bhojpuri"],"iso639-2":"bho","iso639-1":null},"Bihari languages":{name:"Bihari languages",names:["Bihari languages"],"iso639-2":"bih","iso639-1":"bh"},Bikol:{name:"Bikol",names:["Bikol"],"iso639-2":"bik","iso639-1":null},Bilin:{name:"Bilin",names:["Blin","Bilin"],"iso639-2":"byn","iso639-1":null},Bini:{name:"Bini",names:["Bini","Edo"],"iso639-2":"bin","iso639-1":null},Bislama:{name:"Bislama",names:["Bislama"],"iso639-2":"bis","iso639-1":"bi"},Blin:{name:"Blin",names:["Blin","Bilin"],"iso639-2":"byn","iso639-1":null},Bliss:{name:"Bliss",names:["Blissymbols","Blissymbolics","Bliss"],"iso639-2":"zbl","iso639-1":null},Blissymbolics:{name:"Blissymbolics",names:["Blissymbols","Blissymbolics","Bliss"],"iso639-2":"zbl","iso639-1":null},Blissymbols:{name:"Blissymbols",names:["Blissymbols","Blissymbolics","Bliss"],"iso639-2":"zbl","iso639-1":null},"Bokmål, Norwegian":{name:"Bokmål, Norwegian",names:["Bokmål, Norwegian","Norwegian Bokmål"],"iso639-2":"nob","iso639-1":"nb"},Bosnian:{name:"Bosnian",names:["Bosnian"],"iso639-2":"bos","iso639-1":"bs"},Braj:{name:"Braj",names:["Braj"],"iso639-2":"bra","iso639-1":null},Breton:{name:"Breton",names:["Breton"],"iso639-2":"bre","iso639-1":"br"},Buginese:{name:"Buginese",names:["Buginese"],"iso639-2":"bug","iso639-1":null},Bulgarian:{name:"Bulgarian",names:["Bulgarian"],"iso639-2":"bul","iso639-1":"bg"},Buriat:{name:"Buriat",names:["Buriat"],"iso639-2":"bua","iso639-1":null},Burmese:{name:"Burmese",names:["Burmese"],"iso639-2":"bur/mya","iso639-1":"my"},Caddo:{name:"Caddo",names:["Caddo"],"iso639-2":"cad","iso639-1":null},Castilian:{name:"Castilian",names:["Spanish","Castilian"],"iso639-2":"spa","iso639-1":"es"},Catalan:{name:"Catalan",names:["Catalan","Valencian"],"iso639-2":"cat","iso639-1":"ca"},"Caucasian languages":{name:"Caucasian languages",names:["Caucasian languages"],"iso639-2":"cau","iso639-1":null},Cebuano:{name:"Cebuano",names:["Cebuano"],"iso639-2":"ceb","iso639-1":null},"Celtic languages":{name:"Celtic languages",names:["Celtic languages"],"iso639-2":"cel","iso639-1":null},"Central American Indian languages":{name:"Central American Indian languages",names:["Central American Indian languages"],"iso639-2":"cai","iso639-1":null},"Central Khmer":{name:"Central Khmer",names:["Central Khmer"],"iso639-2":"khm","iso639-1":"km"},Chagatai:{name:"Chagatai",names:["Chagatai"],"iso639-2":"chg","iso639-1":null},"Chamic languages":{name:"Chamic languages",names:["Chamic languages"],"iso639-2":"cmc","iso639-1":null},Chamorro:{name:"Chamorro",names:["Chamorro"],"iso639-2":"cha","iso639-1":"ch"},Chechen:{name:"Chechen",names:["Chechen"],"iso639-2":"che","iso639-1":"ce"},Cherokee:{name:"Cherokee",names:["Cherokee"],"iso639-2":"chr","iso639-1":null},Chewa:{name:"Chewa",names:["Chichewa","Chewa","Nyanja"],"iso639-2":"nya","iso639-1":"ny"},Cheyenne:{name:"Cheyenne",names:["Cheyenne"],"iso639-2":"chy","iso639-1":null},Chibcha:{name:"Chibcha",names:["Chibcha"],"iso639-2":"chb","iso639-1":null},Chichewa:{name:"Chichewa",names:["Chichewa","Chewa","Nyanja"],"iso639-2":"nya","iso639-1":"ny"},Chinese:{name:"Chinese",names:["Chinese"],"iso639-2":"chi/zho","iso639-1":"zh"},"Chinook jargon":{name:"Chinook jargon",names:["Chinook jargon"],"iso639-2":"chn","iso639-1":null},Chipewyan:{name:"Chipewyan",names:["Chipewyan","Dene Suline"],"iso639-2":"chp","iso639-1":null},Choctaw:{name:"Choctaw",names:["Choctaw"],"iso639-2":"cho","iso639-1":null},Chuang:{name:"Chuang",names:["Zhuang","Chuang"],"iso639-2":"zha","iso639-1":"za"},"Church Slavic":{name:"Church Slavic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},"Church Slavonic":{name:"Church Slavonic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},Chuukese:{name:"Chuukese",names:["Chuukese"],"iso639-2":"chk","iso639-1":null},Chuvash:{name:"Chuvash",names:["Chuvash"],"iso639-2":"chv","iso639-1":"cv"},"Classical Nepal Bhasa":{name:"Classical Nepal Bhasa",names:["Classical Newari","Old Newari","Classical Nepal Bhasa"],"iso639-2":"nwc","iso639-1":null},"Classical Newari":{name:"Classical Newari",names:["Classical Newari","Old Newari","Classical Nepal Bhasa"],"iso639-2":"nwc","iso639-1":null},"Classical Syriac":{name:"Classical Syriac",names:["Classical Syriac"],"iso639-2":"syc","iso639-1":null},"Cook Islands Maori":{name:"Cook Islands Maori",names:["Rarotongan","Cook Islands Maori"],"iso639-2":"rar","iso639-1":null},Coptic:{name:"Coptic",names:["Coptic"],"iso639-2":"cop","iso639-1":null},Cornish:{name:"Cornish",names:["Cornish"],"iso639-2":"cor","iso639-1":"kw"},Corsican:{name:"Corsican",names:["Corsican"],"iso639-2":"cos","iso639-1":"co"},Cree:{name:"Cree",names:["Cree"],"iso639-2":"cre","iso639-1":"cr"},Creek:{name:"Creek",names:["Creek"],"iso639-2":"mus","iso639-1":null},"Creoles and pidgins":{name:"Creoles and pidgins",names:["Creoles and pidgins"],"iso639-2":"crp","iso639-1":null},"Creoles and pidgins, English based":{name:"Creoles and pidgins, English based",names:["Creoles and pidgins, English based"],"iso639-2":"cpe","iso639-1":null},"Creoles and pidgins, French-based":{name:"Creoles and pidgins, French-based",names:["Creoles and pidgins, French-based"],"iso639-2":"cpf","iso639-1":null},"Creoles and pidgins, Portuguese-based":{name:"Creoles and pidgins, Portuguese-based",names:["Creoles and pidgins, Portuguese-based"],"iso639-2":"cpp","iso639-1":null},"Crimean Tatar":{name:"Crimean Tatar",names:["Crimean Tatar","Crimean Turkish"],"iso639-2":"crh","iso639-1":null},"Crimean Turkish":{name:"Crimean Turkish",names:["Crimean Tatar","Crimean Turkish"],"iso639-2":"crh","iso639-1":null},Croatian:{name:"Croatian",names:["Croatian"],"iso639-2":"hrv","iso639-1":"hr"},"Cushitic languages":{name:"Cushitic languages",names:["Cushitic languages"],"iso639-2":"cus","iso639-1":null},Czech:{name:"Czech",names:["Czech"],"iso639-2":"cze/ces","iso639-1":"cs"},Dakota:{name:"Dakota",names:["Dakota"],"iso639-2":"dak","iso639-1":null},Danish:{name:"Danish",names:["Danish"],"iso639-2":"dan","iso639-1":"da"},Dargwa:{name:"Dargwa",names:["Dargwa"],"iso639-2":"dar","iso639-1":null},Delaware:{name:"Delaware",names:["Delaware"],"iso639-2":"del","iso639-1":null},"Dene Suline":{name:"Dene Suline",names:["Chipewyan","Dene Suline"],"iso639-2":"chp","iso639-1":null},Dhivehi:{name:"Dhivehi",names:["Divehi","Dhivehi","Maldivian"],"iso639-2":"div","iso639-1":"dv"},Dimili:{name:"Dimili",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Dimli:{name:"Dimli",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Dinka:{name:"Dinka",names:["Dinka"],"iso639-2":"din","iso639-1":null},Divehi:{name:"Divehi",names:["Divehi","Dhivehi","Maldivian"],"iso639-2":"div","iso639-1":"dv"},Dogri:{name:"Dogri",names:["Dogri"],"iso639-2":"doi","iso639-1":null},Dogrib:{name:"Dogrib",names:["Dogrib"],"iso639-2":"dgr","iso639-1":null},"Dravidian languages":{name:"Dravidian languages",names:["Dravidian languages"],"iso639-2":"dra","iso639-1":null},Duala:{name:"Duala",names:["Duala"],"iso639-2":"dua","iso639-1":null},Dutch:{name:"Dutch",names:["Dutch","Flemish"],"iso639-2":"dut/nld","iso639-1":"nl"},"Dutch, Middle (ca.1050-1350)":{name:"Dutch, Middle (ca.1050-1350)",names:["Dutch, Middle (ca.1050-1350)"],"iso639-2":"dum","iso639-1":null},Dyula:{name:"Dyula",names:["Dyula"],"iso639-2":"dyu","iso639-1":null},Dzongkha:{name:"Dzongkha",names:["Dzongkha"],"iso639-2":"dzo","iso639-1":"dz"},"Eastern Frisian":{name:"Eastern Frisian",names:["Eastern Frisian"],"iso639-2":"frs","iso639-1":null},Edo:{name:"Edo",names:["Bini","Edo"],"iso639-2":"bin","iso639-1":null},Efik:{name:"Efik",names:["Efik"],"iso639-2":"efi","iso639-1":null},"Egyptian (Ancient)":{name:"Egyptian (Ancient)",names:["Egyptian (Ancient)"],"iso639-2":"egy","iso639-1":null},Ekajuk:{name:"Ekajuk",names:["Ekajuk"],"iso639-2":"eka","iso639-1":null},Elamite:{name:"Elamite",names:["Elamite"],"iso639-2":"elx","iso639-1":null},English:{name:"English",names:["English"],"iso639-2":"eng","iso639-1":"en"},"English, Middle (1100-1500)":{name:"English, Middle (1100-1500)",names:["English, Middle (1100-1500)"],"iso639-2":"enm","iso639-1":null},"English, Old (ca.450-1100)":{name:"English, Old (ca.450-1100)",names:["English, Old (ca.450-1100)"],"iso639-2":"ang","iso639-1":null},Erzya:{name:"Erzya",names:["Erzya"],"iso639-2":"myv","iso639-1":null},Esperanto:{name:"Esperanto",names:["Esperanto"],"iso639-2":"epo","iso639-1":"eo"},Estonian:{name:"Estonian",names:["Estonian"],"iso639-2":"est","iso639-1":"et"},Ewe:{name:"Ewe",names:["Ewe"],"iso639-2":"ewe","iso639-1":"ee"},Ewondo:{name:"Ewondo",names:["Ewondo"],"iso639-2":"ewo","iso639-1":null},Fang:{name:"Fang",names:["Fang"],"iso639-2":"fan","iso639-1":null},Fanti:{name:"Fanti",names:["Fanti"],"iso639-2":"fat","iso639-1":null},Faroese:{name:"Faroese",names:["Faroese"],"iso639-2":"fao","iso639-1":"fo"},Fijian:{name:"Fijian",names:["Fijian"],"iso639-2":"fij","iso639-1":"fj"},Filipino:{name:"Filipino",names:["Filipino","Pilipino"],"iso639-2":"fil","iso639-1":null},Finnish:{name:"Finnish",names:["Finnish"],"iso639-2":"fin","iso639-1":"fi"},"Finno-Ugrian languages":{name:"Finno-Ugrian languages",names:["Finno-Ugrian languages"],"iso639-2":"fiu","iso639-1":null},Flemish:{name:"Flemish",names:["Dutch","Flemish"],"iso639-2":"dut/nld","iso639-1":"nl"},Fon:{name:"Fon",names:["Fon"],"iso639-2":"fon","iso639-1":null},French:{name:"French",names:["French"],"iso639-2":"fre/fra","iso639-1":"fr"},"French, Middle (ca.1400-1600)":{name:"French, Middle (ca.1400-1600)",names:["French, Middle (ca.1400-1600)"],"iso639-2":"frm","iso639-1":null},"French, Old (842-ca.1400)":{name:"French, Old (842-ca.1400)",names:["French, Old (842-ca.1400)"],"iso639-2":"fro","iso639-1":null},Friulian:{name:"Friulian",names:["Friulian"],"iso639-2":"fur","iso639-1":null},Fulah:{name:"Fulah",names:["Fulah"],"iso639-2":"ful","iso639-1":"ff"},Ga:{name:"Ga",names:["Ga"],"iso639-2":"gaa","iso639-1":null},Gaelic:{name:"Gaelic",names:["Gaelic","Scottish Gaelic"],"iso639-2":"gla","iso639-1":"gd"},"Galibi Carib":{name:"Galibi Carib",names:["Galibi Carib"],"iso639-2":"car","iso639-1":null},Galician:{name:"Galician",names:["Galician"],"iso639-2":"glg","iso639-1":"gl"},Ganda:{name:"Ganda",names:["Ganda"],"iso639-2":"lug","iso639-1":"lg"},Gayo:{name:"Gayo",names:["Gayo"],"iso639-2":"gay","iso639-1":null},Gbaya:{name:"Gbaya",names:["Gbaya"],"iso639-2":"gba","iso639-1":null},Geez:{name:"Geez",names:["Geez"],"iso639-2":"gez","iso639-1":null},Georgian:{name:"Georgian",names:["Georgian"],"iso639-2":"geo/kat","iso639-1":"ka"},German:{name:"German",names:["German"],"iso639-2":"ger/deu","iso639-1":"de"},"German, Low":{name:"German, Low",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},"German, Middle High (ca.1050-1500)":{name:"German, Middle High (ca.1050-1500)",names:["German, Middle High (ca.1050-1500)"],"iso639-2":"gmh","iso639-1":null},"German, Old High (ca.750-1050)":{name:"German, Old High (ca.750-1050)",names:["German, Old High (ca.750-1050)"],"iso639-2":"goh","iso639-1":null},"Germanic languages":{name:"Germanic languages",names:["Germanic languages"],"iso639-2":"gem","iso639-1":null},Gikuyu:{name:"Gikuyu",names:["Kikuyu","Gikuyu"],"iso639-2":"kik","iso639-1":"ki"},Gilbertese:{name:"Gilbertese",names:["Gilbertese"],"iso639-2":"gil","iso639-1":null},Gondi:{name:"Gondi",names:["Gondi"],"iso639-2":"gon","iso639-1":null},Gorontalo:{name:"Gorontalo",names:["Gorontalo"],"iso639-2":"gor","iso639-1":null},Gothic:{name:"Gothic",names:["Gothic"],"iso639-2":"got","iso639-1":null},Grebo:{name:"Grebo",names:["Grebo"],"iso639-2":"grb","iso639-1":null},"Greek, Ancient (to 1453)":{name:"Greek, Ancient (to 1453)",names:["Greek, Ancient (to 1453)"],"iso639-2":"grc","iso639-1":null},"Greek, Modern (1453-)":{name:"Greek, Modern (1453-)",names:["Greek, Modern (1453-)"],"iso639-2":"gre/ell","iso639-1":"el"},Greenlandic:{name:"Greenlandic",names:["Kalaallisut","Greenlandic"],"iso639-2":"kal","iso639-1":"kl"},Guarani:{name:"Guarani",names:["Guarani"],"iso639-2":"grn","iso639-1":"gn"},Gujarati:{name:"Gujarati",names:["Gujarati"],"iso639-2":"guj","iso639-1":"gu"},"Gwich'in":{name:"Gwich'in",names:["Gwich'in"],"iso639-2":"gwi","iso639-1":null},Haida:{name:"Haida",names:["Haida"],"iso639-2":"hai","iso639-1":null},Haitian:{name:"Haitian",names:["Haitian","Haitian Creole"],"iso639-2":"hat","iso639-1":"ht"},"Haitian Creole":{name:"Haitian Creole",names:["Haitian","Haitian Creole"],"iso639-2":"hat","iso639-1":"ht"},Hausa:{name:"Hausa",names:["Hausa"],"iso639-2":"hau","iso639-1":"ha"},Hawaiian:{name:"Hawaiian",names:["Hawaiian"],"iso639-2":"haw","iso639-1":null},Hebrew:{name:"Hebrew",names:["Hebrew"],"iso639-2":"heb","iso639-1":"he"},Herero:{name:"Herero",names:["Herero"],"iso639-2":"her","iso639-1":"hz"},Hiligaynon:{name:"Hiligaynon",names:["Hiligaynon"],"iso639-2":"hil","iso639-1":null},"Himachali languages":{name:"Himachali languages",names:["Himachali languages","Western Pahari languages"],"iso639-2":"him","iso639-1":null},Hindi:{name:"Hindi",names:["Hindi"],"iso639-2":"hin","iso639-1":"hi"},"Hiri Motu":{name:"Hiri Motu",names:["Hiri Motu"],"iso639-2":"hmo","iso639-1":"ho"},Hittite:{name:"Hittite",names:["Hittite"],"iso639-2":"hit","iso639-1":null},Hmong:{name:"Hmong",names:["Hmong","Mong"],"iso639-2":"hmn","iso639-1":null},Hungarian:{name:"Hungarian",names:["Hungarian"],"iso639-2":"hun","iso639-1":"hu"},Hupa:{name:"Hupa",names:["Hupa"],"iso639-2":"hup","iso639-1":null},Iban:{name:"Iban",names:["Iban"],"iso639-2":"iba","iso639-1":null},Icelandic:{name:"Icelandic",names:["Icelandic"],"iso639-2":"ice/isl","iso639-1":"is"},Ido:{name:"Ido",names:["Ido"],"iso639-2":"ido","iso639-1":"io"},Igbo:{name:"Igbo",names:["Igbo"],"iso639-2":"ibo","iso639-1":"ig"},"Ijo languages":{name:"Ijo languages",names:["Ijo languages"],"iso639-2":"ijo","iso639-1":null},Iloko:{name:"Iloko",names:["Iloko"],"iso639-2":"ilo","iso639-1":null},"Imperial Aramaic (700-300 BCE)":{name:"Imperial Aramaic (700-300 BCE)",names:["Official Aramaic (700-300 BCE)","Imperial Aramaic (700-300 BCE)"],"iso639-2":"arc","iso639-1":null},"Inari Sami":{name:"Inari Sami",names:["Inari Sami"],"iso639-2":"smn","iso639-1":null},"Indic languages":{name:"Indic languages",names:["Indic languages"],"iso639-2":"inc","iso639-1":null},"Indo-European languages":{name:"Indo-European languages",names:["Indo-European languages"],"iso639-2":"ine","iso639-1":null},Indonesian:{name:"Indonesian",names:["Indonesian"],"iso639-2":"ind","iso639-1":"id"},Ingush:{name:"Ingush",names:["Ingush"],"iso639-2":"inh","iso639-1":null},"Interlingua (International Auxiliary Language Association)":{name:"Interlingua (International Auxiliary Language Association)",names:["Interlingua (International Auxiliary Language Association)"],"iso639-2":"ina","iso639-1":"ia"},Interlingue:{name:"Interlingue",names:["Interlingue","Occidental"],"iso639-2":"ile","iso639-1":"ie"},Inuktitut:{name:"Inuktitut",names:["Inuktitut"],"iso639-2":"iku","iso639-1":"iu"},Inupiaq:{name:"Inupiaq",names:["Inupiaq"],"iso639-2":"ipk","iso639-1":"ik"},"Iranian languages":{name:"Iranian languages",names:["Iranian languages"],"iso639-2":"ira","iso639-1":null},Irish:{name:"Irish",names:["Irish"],"iso639-2":"gle","iso639-1":"ga"},"Irish, Middle (900-1200)":{name:"Irish, Middle (900-1200)",names:["Irish, Middle (900-1200)"],"iso639-2":"mga","iso639-1":null},"Irish, Old (to 900)":{name:"Irish, Old (to 900)",names:["Irish, Old (to 900)"],"iso639-2":"sga","iso639-1":null},"Iroquoian languages":{name:"Iroquoian languages",names:["Iroquoian languages"],"iso639-2":"iro","iso639-1":null},Italian:{name:"Italian",names:["Italian"],"iso639-2":"ita","iso639-1":"it"},Japanese:{name:"Japanese",names:["Japanese"],"iso639-2":"jpn","iso639-1":"ja"},Javanese:{name:"Javanese",names:["Javanese"],"iso639-2":"jav","iso639-1":"jv"},Jingpho:{name:"Jingpho",names:["Kachin","Jingpho"],"iso639-2":"kac","iso639-1":null},"Judeo-Arabic":{name:"Judeo-Arabic",names:["Judeo-Arabic"],"iso639-2":"jrb","iso639-1":null},"Judeo-Persian":{name:"Judeo-Persian",names:["Judeo-Persian"],"iso639-2":"jpr","iso639-1":null},Kabardian:{name:"Kabardian",names:["Kabardian"],"iso639-2":"kbd","iso639-1":null},Kabyle:{name:"Kabyle",names:["Kabyle"],"iso639-2":"kab","iso639-1":null},Kachin:{name:"Kachin",names:["Kachin","Jingpho"],"iso639-2":"kac","iso639-1":null},Kalaallisut:{name:"Kalaallisut",names:["Kalaallisut","Greenlandic"],"iso639-2":"kal","iso639-1":"kl"},Kalmyk:{name:"Kalmyk",names:["Kalmyk","Oirat"],"iso639-2":"xal","iso639-1":null},Kamba:{name:"Kamba",names:["Kamba"],"iso639-2":"kam","iso639-1":null},Kannada:{name:"Kannada",names:["Kannada"],"iso639-2":"kan","iso639-1":"kn"},Kanuri:{name:"Kanuri",names:["Kanuri"],"iso639-2":"kau","iso639-1":"kr"},Kapampangan:{name:"Kapampangan",names:["Pampanga","Kapampangan"],"iso639-2":"pam","iso639-1":null},"Kara-Kalpak":{name:"Kara-Kalpak",names:["Kara-Kalpak"],"iso639-2":"kaa","iso639-1":null},"Karachay-Balkar":{name:"Karachay-Balkar",names:["Karachay-Balkar"],"iso639-2":"krc","iso639-1":null},Karelian:{name:"Karelian",names:["Karelian"],"iso639-2":"krl","iso639-1":null},"Karen languages":{name:"Karen languages",names:["Karen languages"],"iso639-2":"kar","iso639-1":null},Kashmiri:{name:"Kashmiri",names:["Kashmiri"],"iso639-2":"kas","iso639-1":"ks"},Kashubian:{name:"Kashubian",names:["Kashubian"],"iso639-2":"csb","iso639-1":null},Kawi:{name:"Kawi",names:["Kawi"],"iso639-2":"kaw","iso639-1":null},Kazakh:{name:"Kazakh",names:["Kazakh"],"iso639-2":"kaz","iso639-1":"kk"},Khasi:{name:"Khasi",names:["Khasi"],"iso639-2":"kha","iso639-1":null},"Khoisan languages":{name:"Khoisan languages",names:["Khoisan languages"],"iso639-2":"khi","iso639-1":null},Khotanese:{name:"Khotanese",names:["Khotanese","Sakan"],"iso639-2":"kho","iso639-1":null},Kikuyu:{name:"Kikuyu",names:["Kikuyu","Gikuyu"],"iso639-2":"kik","iso639-1":"ki"},Kimbundu:{name:"Kimbundu",names:["Kimbundu"],"iso639-2":"kmb","iso639-1":null},Kinyarwanda:{name:"Kinyarwanda",names:["Kinyarwanda"],"iso639-2":"kin","iso639-1":"rw"},Kirdki:{name:"Kirdki",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Kirghiz:{name:"Kirghiz",names:["Kirghiz","Kyrgyz"],"iso639-2":"kir","iso639-1":"ky"},Kirmanjki:{name:"Kirmanjki",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Klingon:{name:"Klingon",names:["Klingon","tlhIngan-Hol"],"iso639-2":"tlh","iso639-1":null},Komi:{name:"Komi",names:["Komi"],"iso639-2":"kom","iso639-1":"kv"},Kongo:{name:"Kongo",names:["Kongo"],"iso639-2":"kon","iso639-1":"kg"},Konkani:{name:"Konkani",names:["Konkani"],"iso639-2":"kok","iso639-1":null},Korean:{name:"Korean",names:["Korean"],"iso639-2":"kor","iso639-1":"ko"},Kosraean:{name:"Kosraean",names:["Kosraean"],"iso639-2":"kos","iso639-1":null},Kpelle:{name:"Kpelle",names:["Kpelle"],"iso639-2":"kpe","iso639-1":null},"Kru languages":{name:"Kru languages",names:["Kru languages"],"iso639-2":"kro","iso639-1":null},Kuanyama:{name:"Kuanyama",names:["Kuanyama","Kwanyama"],"iso639-2":"kua","iso639-1":"kj"},Kumyk:{name:"Kumyk",names:["Kumyk"],"iso639-2":"kum","iso639-1":null},Kurdish:{name:"Kurdish",names:["Kurdish"],"iso639-2":"kur","iso639-1":"ku"},Kurukh:{name:"Kurukh",names:["Kurukh"],"iso639-2":"kru","iso639-1":null},Kutenai:{name:"Kutenai",names:["Kutenai"],"iso639-2":"kut","iso639-1":null},Kwanyama:{name:"Kwanyama",names:["Kuanyama","Kwanyama"],"iso639-2":"kua","iso639-1":"kj"},Kyrgyz:{name:"Kyrgyz",names:["Kirghiz","Kyrgyz"],"iso639-2":"kir","iso639-1":"ky"},Ladino:{name:"Ladino",names:["Ladino"],"iso639-2":"lad","iso639-1":null},Lahnda:{name:"Lahnda",names:["Lahnda"],"iso639-2":"lah","iso639-1":null},Lamba:{name:"Lamba",names:["Lamba"],"iso639-2":"lam","iso639-1":null},"Land Dayak languages":{name:"Land Dayak languages",names:["Land Dayak languages"],"iso639-2":"day","iso639-1":null},Lao:{name:"Lao",names:["Lao"],"iso639-2":"lao","iso639-1":"lo"},Latin:{name:"Latin",names:["Latin"],"iso639-2":"lat","iso639-1":"la"},Latvian:{name:"Latvian",names:["Latvian"],"iso639-2":"lav","iso639-1":"lv"},Leonese:{name:"Leonese",names:["Asturian","Bable","Leonese","Asturleonese"],"iso639-2":"ast","iso639-1":null},Letzeburgesch:{name:"Letzeburgesch",names:["Luxembourgish","Letzeburgesch"],"iso639-2":"ltz","iso639-1":"lb"},Lezghian:{name:"Lezghian",names:["Lezghian"],"iso639-2":"lez","iso639-1":null},Limburgan:{name:"Limburgan",names:["Limburgan","Limburger","Limburgish"],"iso639-2":"lim","iso639-1":"li"},Limburger:{name:"Limburger",names:["Limburgan","Limburger","Limburgish"],"iso639-2":"lim","iso639-1":"li"},Limburgish:{name:"Limburgish",names:["Limburgan","Limburger","Limburgish"],"iso639-2":"lim","iso639-1":"li"},Lingala:{name:"Lingala",names:["Lingala"],"iso639-2":"lin","iso639-1":"ln"},Lithuanian:{name:"Lithuanian",names:["Lithuanian"],"iso639-2":"lit","iso639-1":"lt"},Lojban:{name:"Lojban",names:["Lojban"],"iso639-2":"jbo","iso639-1":null},"Low German":{name:"Low German",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},"Low Saxon":{name:"Low Saxon",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},"Lower Sorbian":{name:"Lower Sorbian",names:["Lower Sorbian"],"iso639-2":"dsb","iso639-1":null},Lozi:{name:"Lozi",names:["Lozi"],"iso639-2":"loz","iso639-1":null},"Luba-Katanga":{name:"Luba-Katanga",names:["Luba-Katanga"],"iso639-2":"lub","iso639-1":"lu"},"Luba-Lulua":{name:"Luba-Lulua",names:["Luba-Lulua"],"iso639-2":"lua","iso639-1":null},Luiseno:{name:"Luiseno",names:["Luiseno"],"iso639-2":"lui","iso639-1":null},"Lule Sami":{name:"Lule Sami",names:["Lule Sami"],"iso639-2":"smj","iso639-1":null},Lunda:{name:"Lunda",names:["Lunda"],"iso639-2":"lun","iso639-1":null},"Luo (Kenya and Tanzania)":{name:"Luo (Kenya and Tanzania)",names:["Luo (Kenya and Tanzania)"],"iso639-2":"luo","iso639-1":null},Lushai:{name:"Lushai",names:["Lushai"],"iso639-2":"lus","iso639-1":null},Luxembourgish:{name:"Luxembourgish",names:["Luxembourgish","Letzeburgesch"],"iso639-2":"ltz","iso639-1":"lb"},"Macedo-Romanian":{name:"Macedo-Romanian",names:["Aromanian","Arumanian","Macedo-Romanian"],"iso639-2":"rup","iso639-1":null},Macedonian:{name:"Macedonian",names:["Macedonian"],"iso639-2":"mac/mkd","iso639-1":"mk"},Madurese:{name:"Madurese",names:["Madurese"],"iso639-2":"mad","iso639-1":null},Magahi:{name:"Magahi",names:["Magahi"],"iso639-2":"mag","iso639-1":null},Maithili:{name:"Maithili",names:["Maithili"],"iso639-2":"mai","iso639-1":null},Makasar:{name:"Makasar",names:["Makasar"],"iso639-2":"mak","iso639-1":null},Malagasy:{name:"Malagasy",names:["Malagasy"],"iso639-2":"mlg","iso639-1":"mg"},Malay:{name:"Malay",names:["Malay"],"iso639-2":"may/msa","iso639-1":"ms"},Malayalam:{name:"Malayalam",names:["Malayalam"],"iso639-2":"mal","iso639-1":"ml"},Maldivian:{name:"Maldivian",names:["Divehi","Dhivehi","Maldivian"],"iso639-2":"div","iso639-1":"dv"},Maltese:{name:"Maltese",names:["Maltese"],"iso639-2":"mlt","iso639-1":"mt"},Manchu:{name:"Manchu",names:["Manchu"],"iso639-2":"mnc","iso639-1":null},Mandar:{name:"Mandar",names:["Mandar"],"iso639-2":"mdr","iso639-1":null},Mandingo:{name:"Mandingo",names:["Mandingo"],"iso639-2":"man","iso639-1":null},Manipuri:{name:"Manipuri",names:["Manipuri"],"iso639-2":"mni","iso639-1":null},"Manobo languages":{name:"Manobo languages",names:["Manobo languages"],"iso639-2":"mno","iso639-1":null},Manx:{name:"Manx",names:["Manx"],"iso639-2":"glv","iso639-1":"gv"},Maori:{name:"Maori",names:["Maori"],"iso639-2":"mao/mri","iso639-1":"mi"},Mapuche:{name:"Mapuche",names:["Mapudungun","Mapuche"],"iso639-2":"arn","iso639-1":null},Mapudungun:{name:"Mapudungun",names:["Mapudungun","Mapuche"],"iso639-2":"arn","iso639-1":null},Marathi:{name:"Marathi",names:["Marathi"],"iso639-2":"mar","iso639-1":"mr"},Mari:{name:"Mari",names:["Mari"],"iso639-2":"chm","iso639-1":null},Marshallese:{name:"Marshallese",names:["Marshallese"],"iso639-2":"mah","iso639-1":"mh"},Marwari:{name:"Marwari",names:["Marwari"],"iso639-2":"mwr","iso639-1":null},Masai:{name:"Masai",names:["Masai"],"iso639-2":"mas","iso639-1":null},"Mayan languages":{name:"Mayan languages",names:["Mayan languages"],"iso639-2":"myn","iso639-1":null},Mende:{name:"Mende",names:["Mende"],"iso639-2":"men","iso639-1":null},"Mi'kmaq":{name:"Mi'kmaq",names:["Mi'kmaq","Micmac"],"iso639-2":"mic","iso639-1":null},Micmac:{name:"Micmac",names:["Mi'kmaq","Micmac"],"iso639-2":"mic","iso639-1":null},Minangkabau:{name:"Minangkabau",names:["Minangkabau"],"iso639-2":"min","iso639-1":null},Mirandese:{name:"Mirandese",names:["Mirandese"],"iso639-2":"mwl","iso639-1":null},Mohawk:{name:"Mohawk",names:["Mohawk"],"iso639-2":"moh","iso639-1":null},Moksha:{name:"Moksha",names:["Moksha"],"iso639-2":"mdf","iso639-1":null},Moldavian:{name:"Moldavian",names:["Romanian","Moldavian","Moldovan"],"iso639-2":"rum/ron","iso639-1":"ro"},Moldovan:{name:"Moldovan",names:["Romanian","Moldavian","Moldovan"],"iso639-2":"rum/ron","iso639-1":"ro"},"Mon-Khmer languages":{name:"Mon-Khmer languages",names:["Mon-Khmer languages"],"iso639-2":"mkh","iso639-1":null},Mong:{name:"Mong",names:["Hmong","Mong"],"iso639-2":"hmn","iso639-1":null},Mongo:{name:"Mongo",names:["Mongo"],"iso639-2":"lol","iso639-1":null},Mongolian:{name:"Mongolian",names:["Mongolian"],"iso639-2":"mon","iso639-1":"mn"},Montenegrin:{name:"Montenegrin",names:["Montenegrin"],"iso639-2":"cnr","iso639-1":null},Mossi:{name:"Mossi",names:["Mossi"],"iso639-2":"mos","iso639-1":null},"Multiple languages":{name:"Multiple languages",names:["Multiple languages"],"iso639-2":"mul","iso639-1":null},"Munda languages":{name:"Munda languages",names:["Munda languages"],"iso639-2":"mun","iso639-1":null},"N'Ko":{name:"N'Ko",names:["N'Ko"],"iso639-2":"nqo","iso639-1":null},"Nahuatl languages":{name:"Nahuatl languages",names:["Nahuatl languages"],"iso639-2":"nah","iso639-1":null},Nauru:{name:"Nauru",names:["Nauru"],"iso639-2":"nau","iso639-1":"na"},Navaho:{name:"Navaho",names:["Navajo","Navaho"],"iso639-2":"nav","iso639-1":"nv"},Navajo:{name:"Navajo",names:["Navajo","Navaho"],"iso639-2":"nav","iso639-1":"nv"},"Ndebele, North":{name:"Ndebele, North",names:["Ndebele, North","North Ndebele"],"iso639-2":"nde","iso639-1":"nd"},"Ndebele, South":{name:"Ndebele, South",names:["Ndebele, South","South Ndebele"],"iso639-2":"nbl","iso639-1":"nr"},Ndonga:{name:"Ndonga",names:["Ndonga"],"iso639-2":"ndo","iso639-1":"ng"},Neapolitan:{name:"Neapolitan",names:["Neapolitan"],"iso639-2":"nap","iso639-1":null},"Nepal Bhasa":{name:"Nepal Bhasa",names:["Nepal Bhasa","Newari"],"iso639-2":"new","iso639-1":null},Nepali:{name:"Nepali",names:["Nepali"],"iso639-2":"nep","iso639-1":"ne"},Newari:{name:"Newari",names:["Nepal Bhasa","Newari"],"iso639-2":"new","iso639-1":null},Nias:{name:"Nias",names:["Nias"],"iso639-2":"nia","iso639-1":null},"Niger-Kordofanian languages":{name:"Niger-Kordofanian languages",names:["Niger-Kordofanian languages"],"iso639-2":"nic","iso639-1":null},"Nilo-Saharan languages":{name:"Nilo-Saharan languages",names:["Nilo-Saharan languages"],"iso639-2":"ssa","iso639-1":null},Niuean:{name:"Niuean",names:["Niuean"],"iso639-2":"niu","iso639-1":null},"No linguistic content":{name:"No linguistic content",names:["No linguistic content","Not applicable"],"iso639-2":"zxx","iso639-1":null},Nogai:{name:"Nogai",names:["Nogai"],"iso639-2":"nog","iso639-1":null},"Norse, Old":{name:"Norse, Old",names:["Norse, Old"],"iso639-2":"non","iso639-1":null},"North American Indian languages":{name:"North American Indian languages",names:["North American Indian languages"],"iso639-2":"nai","iso639-1":null},"North Ndebele":{name:"North Ndebele",names:["Ndebele, North","North Ndebele"],"iso639-2":"nde","iso639-1":"nd"},"Northern Frisian":{name:"Northern Frisian",names:["Northern Frisian"],"iso639-2":"frr","iso639-1":null},"Northern Sami":{name:"Northern Sami",names:["Northern Sami"],"iso639-2":"sme","iso639-1":"se"},"Northern Sotho":{name:"Northern Sotho",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},Norwegian:{name:"Norwegian",names:["Norwegian"],"iso639-2":"nor","iso639-1":"no"},"Norwegian Bokmål":{name:"Norwegian Bokmål",names:["Bokmål, Norwegian","Norwegian Bokmål"],"iso639-2":"nob","iso639-1":"nb"},"Norwegian Nynorsk":{name:"Norwegian Nynorsk",names:["Norwegian Nynorsk","Nynorsk, Norwegian"],"iso639-2":"nno","iso639-1":"nn"},"Not applicable":{name:"Not applicable",names:["No linguistic content","Not applicable"],"iso639-2":"zxx","iso639-1":null},"Nubian languages":{name:"Nubian languages",names:["Nubian languages"],"iso639-2":"nub","iso639-1":null},Nuosu:{name:"Nuosu",names:["Sichuan Yi","Nuosu"],"iso639-2":"iii","iso639-1":"ii"},Nyamwezi:{name:"Nyamwezi",names:["Nyamwezi"],"iso639-2":"nym","iso639-1":null},Nyanja:{name:"Nyanja",names:["Chichewa","Chewa","Nyanja"],"iso639-2":"nya","iso639-1":"ny"},Nyankole:{name:"Nyankole",names:["Nyankole"],"iso639-2":"nyn","iso639-1":null},"Nynorsk, Norwegian":{name:"Nynorsk, Norwegian",names:["Norwegian Nynorsk","Nynorsk, Norwegian"],"iso639-2":"nno","iso639-1":"nn"},Nyoro:{name:"Nyoro",names:["Nyoro"],"iso639-2":"nyo","iso639-1":null},Nzima:{name:"Nzima",names:["Nzima"],"iso639-2":"nzi","iso639-1":null},Occidental:{name:"Occidental",names:["Interlingue","Occidental"],"iso639-2":"ile","iso639-1":"ie"},"Occitan (post 1500)":{name:"Occitan (post 1500)",names:["Occitan (post 1500)"],"iso639-2":"oci","iso639-1":"oc"},"Occitan, Old (to 1500)":{name:"Occitan, Old (to 1500)",names:["Provençal, Old (to 1500)","Occitan, Old (to 1500)"],"iso639-2":"pro","iso639-1":null},"Official Aramaic (700-300 BCE)":{name:"Official Aramaic (700-300 BCE)",names:["Official Aramaic (700-300 BCE)","Imperial Aramaic (700-300 BCE)"],"iso639-2":"arc","iso639-1":null},Oirat:{name:"Oirat",names:["Kalmyk","Oirat"],"iso639-2":"xal","iso639-1":null},Ojibwa:{name:"Ojibwa",names:["Ojibwa"],"iso639-2":"oji","iso639-1":"oj"},"Old Bulgarian":{name:"Old Bulgarian",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},"Old Church Slavonic":{name:"Old Church Slavonic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},"Old Newari":{name:"Old Newari",names:["Classical Newari","Old Newari","Classical Nepal Bhasa"],"iso639-2":"nwc","iso639-1":null},"Old Slavonic":{name:"Old Slavonic",names:["Church Slavic","Old Slavonic","Church Slavonic","Old Bulgarian","Old Church Slavonic"],"iso639-2":"chu","iso639-1":"cu"},Oriya:{name:"Oriya",names:["Oriya"],"iso639-2":"ori","iso639-1":"or"},Oromo:{name:"Oromo",names:["Oromo"],"iso639-2":"orm","iso639-1":"om"},Osage:{name:"Osage",names:["Osage"],"iso639-2":"osa","iso639-1":null},Ossetian:{name:"Ossetian",names:["Ossetian","Ossetic"],"iso639-2":"oss","iso639-1":"os"},Ossetic:{name:"Ossetic",names:["Ossetian","Ossetic"],"iso639-2":"oss","iso639-1":"os"},"Otomian languages":{name:"Otomian languages",names:["Otomian languages"],"iso639-2":"oto","iso639-1":null},Pahlavi:{name:"Pahlavi",names:["Pahlavi"],"iso639-2":"pal","iso639-1":null},Palauan:{name:"Palauan",names:["Palauan"],"iso639-2":"pau","iso639-1":null},Pali:{name:"Pali",names:["Pali"],"iso639-2":"pli","iso639-1":"pi"},Pampanga:{name:"Pampanga",names:["Pampanga","Kapampangan"],"iso639-2":"pam","iso639-1":null},Pangasinan:{name:"Pangasinan",names:["Pangasinan"],"iso639-2":"pag","iso639-1":null},Panjabi:{name:"Panjabi",names:["Panjabi","Punjabi"],"iso639-2":"pan","iso639-1":"pa"},Papiamento:{name:"Papiamento",names:["Papiamento"],"iso639-2":"pap","iso639-1":null},"Papuan languages":{name:"Papuan languages",names:["Papuan languages"],"iso639-2":"paa","iso639-1":null},Pashto:{name:"Pashto",names:["Pushto","Pashto"],"iso639-2":"pus","iso639-1":"ps"},Pedi:{name:"Pedi",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},Persian:{name:"Persian",names:["Persian"],"iso639-2":"per/fas","iso639-1":"fa"},"Persian, Old (ca.600-400 B.C.)":{name:"Persian, Old (ca.600-400 B.C.)",names:["Persian, Old (ca.600-400 B.C.)"],"iso639-2":"peo","iso639-1":null},"Philippine languages":{name:"Philippine languages",names:["Philippine languages"],"iso639-2":"phi","iso639-1":null},Phoenician:{name:"Phoenician",names:["Phoenician"],"iso639-2":"phn","iso639-1":null},Pilipino:{name:"Pilipino",names:["Filipino","Pilipino"],"iso639-2":"fil","iso639-1":null},Pohnpeian:{name:"Pohnpeian",names:["Pohnpeian"],"iso639-2":"pon","iso639-1":null},Polish:{name:"Polish",names:["Polish"],"iso639-2":"pol","iso639-1":"pl"},Portuguese:{name:"Portuguese",names:["Portuguese"],"iso639-2":"por","iso639-1":"pt"},"Prakrit languages":{name:"Prakrit languages",names:["Prakrit languages"],"iso639-2":"pra","iso639-1":null},"Provençal, Old (to 1500)":{name:"Provençal, Old (to 1500)",names:["Provençal, Old (to 1500)","Occitan, Old (to 1500)"],"iso639-2":"pro","iso639-1":null},Punjabi:{name:"Punjabi",names:["Panjabi","Punjabi"],"iso639-2":"pan","iso639-1":"pa"},Pushto:{name:"Pushto",names:["Pushto","Pashto"],"iso639-2":"pus","iso639-1":"ps"},Quechua:{name:"Quechua",names:["Quechua"],"iso639-2":"que","iso639-1":"qu"},Rajasthani:{name:"Rajasthani",names:["Rajasthani"],"iso639-2":"raj","iso639-1":null},Rapanui:{name:"Rapanui",names:["Rapanui"],"iso639-2":"rap","iso639-1":null},Rarotongan:{name:"Rarotongan",names:["Rarotongan","Cook Islands Maori"],"iso639-2":"rar","iso639-1":null},"Reserved for local use":{name:"Reserved for local use",names:["Reserved for local use"],"iso639-2":"qaa-qtz","iso639-1":null},"Romance languages":{name:"Romance languages",names:["Romance languages"],"iso639-2":"roa","iso639-1":null},Romanian:{name:"Romanian",names:["Romanian","Moldavian","Moldovan"],"iso639-2":"rum/ron","iso639-1":"ro"},Romansh:{name:"Romansh",names:["Romansh"],"iso639-2":"roh","iso639-1":"rm"},Romany:{name:"Romany",names:["Romany"],"iso639-2":"rom","iso639-1":null},Rundi:{name:"Rundi",names:["Rundi"],"iso639-2":"run","iso639-1":"rn"},Russian:{name:"Russian",names:["Russian"],"iso639-2":"rus","iso639-1":"ru"},Sakan:{name:"Sakan",names:["Khotanese","Sakan"],"iso639-2":"kho","iso639-1":null},"Salishan languages":{name:"Salishan languages",names:["Salishan languages"],"iso639-2":"sal","iso639-1":null},"Samaritan Aramaic":{name:"Samaritan Aramaic",names:["Samaritan Aramaic"],"iso639-2":"sam","iso639-1":null},"Sami languages":{name:"Sami languages",names:["Sami languages"],"iso639-2":"smi","iso639-1":null},Samoan:{name:"Samoan",names:["Samoan"],"iso639-2":"smo","iso639-1":"sm"},Sandawe:{name:"Sandawe",names:["Sandawe"],"iso639-2":"sad","iso639-1":null},Sango:{name:"Sango",names:["Sango"],"iso639-2":"sag","iso639-1":"sg"},Sanskrit:{name:"Sanskrit",names:["Sanskrit"],"iso639-2":"san","iso639-1":"sa"},Santali:{name:"Santali",names:["Santali"],"iso639-2":"sat","iso639-1":null},Sardinian:{name:"Sardinian",names:["Sardinian"],"iso639-2":"srd","iso639-1":"sc"},Sasak:{name:"Sasak",names:["Sasak"],"iso639-2":"sas","iso639-1":null},"Saxon, Low":{name:"Saxon, Low",names:["Low German","Low Saxon","German, Low","Saxon, Low"],"iso639-2":"nds","iso639-1":null},Scots:{name:"Scots",names:["Scots"],"iso639-2":"sco","iso639-1":null},"Scottish Gaelic":{name:"Scottish Gaelic",names:["Gaelic","Scottish Gaelic"],"iso639-2":"gla","iso639-1":"gd"},Selkup:{name:"Selkup",names:["Selkup"],"iso639-2":"sel","iso639-1":null},"Semitic languages":{name:"Semitic languages",names:["Semitic languages"],"iso639-2":"sem","iso639-1":null},Sepedi:{name:"Sepedi",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},Serbian:{name:"Serbian",names:["Serbian"],"iso639-2":"srp","iso639-1":"sr"},Serer:{name:"Serer",names:["Serer"],"iso639-2":"srr","iso639-1":null},Shan:{name:"Shan",names:["Shan"],"iso639-2":"shn","iso639-1":null},Shona:{name:"Shona",names:["Shona"],"iso639-2":"sna","iso639-1":"sn"},"Sichuan Yi":{name:"Sichuan Yi",names:["Sichuan Yi","Nuosu"],"iso639-2":"iii","iso639-1":"ii"},Sicilian:{name:"Sicilian",names:["Sicilian"],"iso639-2":"scn","iso639-1":null},Sidamo:{name:"Sidamo",names:["Sidamo"],"iso639-2":"sid","iso639-1":null},"Sign Languages":{name:"Sign Languages",names:["Sign Languages"],"iso639-2":"sgn","iso639-1":null},Siksika:{name:"Siksika",names:["Siksika"],"iso639-2":"bla","iso639-1":null},Sindhi:{name:"Sindhi",names:["Sindhi"],"iso639-2":"snd","iso639-1":"sd"},Sinhala:{name:"Sinhala",names:["Sinhala","Sinhalese"],"iso639-2":"sin","iso639-1":"si"},Sinhalese:{name:"Sinhalese",names:["Sinhala","Sinhalese"],"iso639-2":"sin","iso639-1":"si"},"Sino-Tibetan languages":{name:"Sino-Tibetan languages",names:["Sino-Tibetan languages"],"iso639-2":"sit","iso639-1":null},"Siouan languages":{name:"Siouan languages",names:["Siouan languages"],"iso639-2":"sio","iso639-1":null},"Skolt Sami":{name:"Skolt Sami",names:["Skolt Sami"],"iso639-2":"sms","iso639-1":null},"Slave (Athapascan)":{name:"Slave (Athapascan)",names:["Slave (Athapascan)"],"iso639-2":"den","iso639-1":null},"Slavic languages":{name:"Slavic languages",names:["Slavic languages"],"iso639-2":"sla","iso639-1":null},Slovak:{name:"Slovak",names:["Slovak"],"iso639-2":"slo/slk","iso639-1":"sk"},Slovenian:{name:"Slovenian",names:["Slovenian"],"iso639-2":"slv","iso639-1":"sl"},Sogdian:{name:"Sogdian",names:["Sogdian"],"iso639-2":"sog","iso639-1":null},Somali:{name:"Somali",names:["Somali"],"iso639-2":"som","iso639-1":"so"},"Songhai languages":{name:"Songhai languages",names:["Songhai languages"],"iso639-2":"son","iso639-1":null},Soninke:{name:"Soninke",names:["Soninke"],"iso639-2":"snk","iso639-1":null},"Sorbian languages":{name:"Sorbian languages",names:["Sorbian languages"],"iso639-2":"wen","iso639-1":null},"Sotho, Northern":{name:"Sotho, Northern",names:["Pedi","Sepedi","Northern Sotho"],"iso639-2":"nso","iso639-1":null},"Sotho, Southern":{name:"Sotho, Southern",names:["Sotho, Southern"],"iso639-2":"sot","iso639-1":"st"},"South American Indian languages":{name:"South American Indian languages",names:["South American Indian languages"],"iso639-2":"sai","iso639-1":null},"South Ndebele":{name:"South Ndebele",names:["Ndebele, South","South Ndebele"],"iso639-2":"nbl","iso639-1":"nr"},"Southern Altai":{name:"Southern Altai",names:["Southern Altai"],"iso639-2":"alt","iso639-1":null},"Southern Sami":{name:"Southern Sami",names:["Southern Sami"],"iso639-2":"sma","iso639-1":null},Spanish:{name:"Spanish",names:["Spanish","Castilian"],"iso639-2":"spa","iso639-1":"es"},"Sranan Tongo":{name:"Sranan Tongo",names:["Sranan Tongo"],"iso639-2":"srn","iso639-1":null},"Standard Moroccan Tamazight":{name:"Standard Moroccan Tamazight",names:["Standard Moroccan Tamazight"],"iso639-2":"zgh","iso639-1":null},Sukuma:{name:"Sukuma",names:["Sukuma"],"iso639-2":"suk","iso639-1":null},Sumerian:{name:"Sumerian",names:["Sumerian"],"iso639-2":"sux","iso639-1":null},Sundanese:{name:"Sundanese",names:["Sundanese"],"iso639-2":"sun","iso639-1":"su"},Susu:{name:"Susu",names:["Susu"],"iso639-2":"sus","iso639-1":null},Swahili:{name:"Swahili",names:["Swahili"],"iso639-2":"swa","iso639-1":"sw"},Swati:{name:"Swati",names:["Swati"],"iso639-2":"ssw","iso639-1":"ss"},Swedish:{name:"Swedish",names:["Swedish"],"iso639-2":"swe","iso639-1":"sv"},"Swiss German":{name:"Swiss German",names:["Swiss German","Alemannic","Alsatian"],"iso639-2":"gsw","iso639-1":null},Syriac:{name:"Syriac",names:["Syriac"],"iso639-2":"syr","iso639-1":null},Tagalog:{name:"Tagalog",names:["Tagalog"],"iso639-2":"tgl","iso639-1":"tl"},Tahitian:{name:"Tahitian",names:["Tahitian"],"iso639-2":"tah","iso639-1":"ty"},"Tai languages":{name:"Tai languages",names:["Tai languages"],"iso639-2":"tai","iso639-1":null},Tajik:{name:"Tajik",names:["Tajik"],"iso639-2":"tgk","iso639-1":"tg"},Tamashek:{name:"Tamashek",names:["Tamashek"],"iso639-2":"tmh","iso639-1":null},Tamil:{name:"Tamil",names:["Tamil"],"iso639-2":"tam","iso639-1":"ta"},Tatar:{name:"Tatar",names:["Tatar"],"iso639-2":"tat","iso639-1":"tt"},Telugu:{name:"Telugu",names:["Telugu"],"iso639-2":"tel","iso639-1":"te"},Tereno:{name:"Tereno",names:["Tereno"],"iso639-2":"ter","iso639-1":null},Tetum:{name:"Tetum",names:["Tetum"],"iso639-2":"tet","iso639-1":null},Thai:{name:"Thai",names:["Thai"],"iso639-2":"tha","iso639-1":"th"},Tibetan:{name:"Tibetan",names:["Tibetan"],"iso639-2":"tib/bod","iso639-1":"bo"},Tigre:{name:"Tigre",names:["Tigre"],"iso639-2":"tig","iso639-1":null},Tigrinya:{name:"Tigrinya",names:["Tigrinya"],"iso639-2":"tir","iso639-1":"ti"},Timne:{name:"Timne",names:["Timne"],"iso639-2":"tem","iso639-1":null},Tiv:{name:"Tiv",names:["Tiv"],"iso639-2":"tiv","iso639-1":null},"tlhIngan-Hol":{name:"tlhIngan-Hol",names:["Klingon","tlhIngan-Hol"],"iso639-2":"tlh","iso639-1":null},Tlingit:{name:"Tlingit",names:["Tlingit"],"iso639-2":"tli","iso639-1":null},"Tok Pisin":{name:"Tok Pisin",names:["Tok Pisin"],"iso639-2":"tpi","iso639-1":null},Tokelau:{name:"Tokelau",names:["Tokelau"],"iso639-2":"tkl","iso639-1":null},"Tonga (Nyasa)":{name:"Tonga (Nyasa)",names:["Tonga (Nyasa)"],"iso639-2":"tog","iso639-1":null},"Tonga (Tonga Islands)":{name:"Tonga (Tonga Islands)",names:["Tonga (Tonga Islands)"],"iso639-2":"ton","iso639-1":"to"},Tsimshian:{name:"Tsimshian",names:["Tsimshian"],"iso639-2":"tsi","iso639-1":null},Tsonga:{name:"Tsonga",names:["Tsonga"],"iso639-2":"tso","iso639-1":"ts"},Tswana:{name:"Tswana",names:["Tswana"],"iso639-2":"tsn","iso639-1":"tn"},Tumbuka:{name:"Tumbuka",names:["Tumbuka"],"iso639-2":"tum","iso639-1":null},"Tupi languages":{name:"Tupi languages",names:["Tupi languages"],"iso639-2":"tup","iso639-1":null},Turkish:{name:"Turkish",names:["Turkish"],"iso639-2":"tur","iso639-1":"tr"},"Turkish, Ottoman (1500-1928)":{name:"Turkish, Ottoman (1500-1928)",names:["Turkish, Ottoman (1500-1928)"],"iso639-2":"ota","iso639-1":null},Turkmen:{name:"Turkmen",names:["Turkmen"],"iso639-2":"tuk","iso639-1":"tk"},Tuvalu:{name:"Tuvalu",names:["Tuvalu"],"iso639-2":"tvl","iso639-1":null},Tuvinian:{name:"Tuvinian",names:["Tuvinian"],"iso639-2":"tyv","iso639-1":null},Twi:{name:"Twi",names:["Twi"],"iso639-2":"twi","iso639-1":"tw"},Udmurt:{name:"Udmurt",names:["Udmurt"],"iso639-2":"udm","iso639-1":null},Ugaritic:{name:"Ugaritic",names:["Ugaritic"],"iso639-2":"uga","iso639-1":null},Uighur:{name:"Uighur",names:["Uighur","Uyghur"],"iso639-2":"uig","iso639-1":"ug"},Ukrainian:{name:"Ukrainian",names:["Ukrainian"],"iso639-2":"ukr","iso639-1":"uk"},Umbundu:{name:"Umbundu",names:["Umbundu"],"iso639-2":"umb","iso639-1":null},"Uncoded languages":{name:"Uncoded languages",names:["Uncoded languages"],"iso639-2":"mis","iso639-1":null},Undetermined:{name:"Undetermined",names:["Undetermined"],"iso639-2":"und","iso639-1":null},"Upper Sorbian":{name:"Upper Sorbian",names:["Upper Sorbian"],"iso639-2":"hsb","iso639-1":null},Urdu:{name:"Urdu",names:["Urdu"],"iso639-2":"urd","iso639-1":"ur"},Uyghur:{name:"Uyghur",names:["Uighur","Uyghur"],"iso639-2":"uig","iso639-1":"ug"},Uzbek:{name:"Uzbek",names:["Uzbek"],"iso639-2":"uzb","iso639-1":"uz"},Vai:{name:"Vai",names:["Vai"],"iso639-2":"vai","iso639-1":null},Valencian:{name:"Valencian",names:["Catalan","Valencian"],"iso639-2":"cat","iso639-1":"ca"},Venda:{name:"Venda",names:["Venda"],"iso639-2":"ven","iso639-1":"ve"},Vietnamese:{name:"Vietnamese",names:["Vietnamese"],"iso639-2":"vie","iso639-1":"vi"},"Volapük":{name:"Volapük",names:["Volapük"],"iso639-2":"vol","iso639-1":"vo"},Votic:{name:"Votic",names:["Votic"],"iso639-2":"vot","iso639-1":null},"Wakashan languages":{name:"Wakashan languages",names:["Wakashan languages"],"iso639-2":"wak","iso639-1":null},Walloon:{name:"Walloon",names:["Walloon"],"iso639-2":"wln","iso639-1":"wa"},Waray:{name:"Waray",names:["Waray"],"iso639-2":"war","iso639-1":null},Washo:{name:"Washo",names:["Washo"],"iso639-2":"was","iso639-1":null},Welsh:{name:"Welsh",names:["Welsh"],"iso639-2":"wel/cym","iso639-1":"cy"},"Western Frisian":{name:"Western Frisian",names:["Western Frisian"],"iso639-2":"fry","iso639-1":"fy"},"Western Pahari languages":{name:"Western Pahari languages",names:["Himachali languages","Western Pahari languages"],"iso639-2":"him","iso639-1":null},Wolaitta:{name:"Wolaitta",names:["Wolaitta","Wolaytta"],"iso639-2":"wal","iso639-1":null},Wolaytta:{name:"Wolaytta",names:["Wolaitta","Wolaytta"],"iso639-2":"wal","iso639-1":null},Wolof:{name:"Wolof",names:["Wolof"],"iso639-2":"wol","iso639-1":"wo"},Xhosa:{name:"Xhosa",names:["Xhosa"],"iso639-2":"xho","iso639-1":"xh"},Yakut:{name:"Yakut",names:["Yakut"],"iso639-2":"sah","iso639-1":null},Yao:{name:"Yao",names:["Yao"],"iso639-2":"yao","iso639-1":null},Yapese:{name:"Yapese",names:["Yapese"],"iso639-2":"yap","iso639-1":null},Yiddish:{name:"Yiddish",names:["Yiddish"],"iso639-2":"yid","iso639-1":"yi"},Yoruba:{name:"Yoruba",names:["Yoruba"],"iso639-2":"yor","iso639-1":"yo"},"Yupik languages":{name:"Yupik languages",names:["Yupik languages"],"iso639-2":"ypk","iso639-1":null},"Zande languages":{name:"Zande languages",names:["Zande languages"],"iso639-2":"znd","iso639-1":null},Zapotec:{name:"Zapotec",names:["Zapotec"],"iso639-2":"zap","iso639-1":null},Zaza:{name:"Zaza",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Zazaki:{name:"Zazaki",names:["Zaza","Dimili","Dimli","Kirdki","Kirmanjki","Zazaki"],"iso639-2":"zza","iso639-1":null},Zenaga:{name:"Zenaga",names:["Zenaga"],"iso639-2":"zen","iso639-1":null},Zhuang:{name:"Zhuang",names:["Zhuang","Chuang"],"iso639-2":"zha","iso639-1":"za"},Zulu:{name:"Zulu",names:["Zulu"],"iso639-2":"zul","iso639-1":"zu"},Zuni:{name:"Zuni",names:["Zuni"],"iso639-2":"zun","iso639-1":null}};function _h(t){return _h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(t)}function yh(t,n,e){return(n=function(t){var n=function(t,n){if("object"!==_h(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!==_h(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===_h(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var vh=[],bh=Object.keys(mh);Object.keys(ph).map((function(t){var n,e=ph[t],i=bh.find((function(t){return t.toLowerCase()===e.language.toLowerCase()}));e.location&&i&&vh.push((yh(n={},"name",e.language),yh(n,"location",e.location),yh(n,"tag",e.tag),yh(n,"lcid",e.id),yh(n,"iso639-2",mh[i]["iso639-2"]),yh(n,"iso639-1",mh[i]["iso639-1"]),n))}));var wh={ar:"ar-SA",ca:"ca-ES",da:"da-DK",en:"en-US",ko:"ko-KR",pa:"pa-IN",pt:"pt-BR",sv:"sv-SE"};function Sh(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}const xh="D3PLUS-COMMON-RESET",kh={"es-ES":{and:"y",Back:"Atrás","Click to Expand":"Clic para Ampliar","Click to Hide":"Clic para Ocultar","Click to Highlight":"Clic para Resaltar","Click to Show":"Clic para Mostrar","Click to Show All":"Clic para Mostrar Todo",Download:"Descargar","Loading Visualization":"Cargando Visualización",more:"más","No Data Available":"Datos No Disponibles","Powered by D3plus":"Funciona con D3plus",Share:"Porcentaje","Shift+Click to Hide":"Mayús+Clic para Ocultar","Shift+Click to Highlight":"Mayús+Clic para Resaltar",Total:"Total",Values:"Valores"},"pt-BR":{and:"e",Back:"Voltar","Click to Expand":"Clique para Expandir","Click to Hide":"Clique para Ocultar","Click to Highlight":"Clique para Destacar","Click to Show":"Clique para Mostrar","Click to Show All":"Clique para Mostrar Tudo",Download:"Baixar","Loading Visualization":"Carregando Visualização",more:"mais","No Data Available":"Dados Não Disponíveis","Powered by D3plus":"Funciona com D3plus",Share:"Porcentagem","Shift+Click to Hide":"Shift+Clique para Ocultar","Shift+Click to Highlight":"Shift+Clique para Destacar",Total:"Total",Values:"Valores"},"ar-SA":{and:"و",Back:"للخلف","Click to Expand":"انقر للتوسيع","Click to Hide":"اضغط للإخفاء","Click to Highlight":"اضغط للتحديد","Click to Show":"انقر للعرض","Click to Show All":"انقر لعرض الكل",Download:"تحميل","Loading Visualization":"جاري تحميل التصوير البياني","No Data Available":"لا تتوفر بيانات",more:"أخرى","Powered by D3plus":"مدعوم بواسطة D3plus",Share:"مشاركة","Shift+Click to Hide":"Shift+انقر للإخفاء","Shift+Click to Highlight":"Shift + للتحديد اضغط",Total:"المجموع",Values:"القيم"}};function Ch(t){return Ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ch(t)}function Ah(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:n._locale,i=kh[e];return i&&i[t]?i[t]:t},this._uuid="".concat(Sh()).concat(Sh(),"-").concat(Sh(),"-").concat(Sh(),"-").concat(Sh(),"-").concat(Sh()).concat(Sh()).concat(Sh())}var n,e,i;return n=t,e=[{key:"config",value:function(t){var n=this;if(!this._configDefault){var e={};Mh(this.__proto__).forEach((function(t){var i=n[t]();i!==n&&(e[t]=fh(i)?gh({},i):i)})),this._configDefault=e}if(arguments.length){for(var i in t)if({}.hasOwnProperty.call(t,i)&&i in this){var r=t[i];r===xh?"on"===i?this._on=this._configDefault[i]:this[i](this._configDefault[i]):(Eh(r,this._configDefault[i]),this[i](r))}return this}var o={};return Mh(this.__proto__).forEach((function(t){o[t]=n[t]()})),o}},{key:"locale",value:function(t){return arguments.length?(this._locale=function(t){if("string"!=typeof t||5===t.length)return t;if(wh[t])return wh[t];var n=vh.filter((function(n){return n["iso639-1"]===t}));return n.length?1===n.length?n[0].tag:n.find((function(n){return n.tag==="".concat(t,"-").concat(t.toUpperCase())}))?"".concat(t,"-").concat(t.toUpperCase()):n[0].tag:t}(t),this):this._locale}},{key:"on",value:function(t,n){return 2===arguments.length?(this._on[t]=n,this):arguments.length?"string"==typeof t?this._on[t]:(this._on=Object.assign({},this._on,t),this):this._on}},{key:"parent",value:function(t){return arguments.length?(this._parent=t,this):this._parent}},{key:"translate",value:function(t){return arguments.length?(this._translate=t,this):this._translate}},{key:"shapeConfig",value:function(t){return arguments.length?(this._shapeConfig=gh(this._shapeConfig,t),this):this._shapeConfig}}],e&&Ah(n.prototype,e),i&&Ah(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Oh(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(n&&n instanceof Array&&n.length)return n.reduce((function(n,e){return Math.abs(e-t)0&&void 0!==arguments[0]?arguments[0]:this._shapeConfig,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shape",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={duration:this._duration,on:{}},o=function(n){return function(e,i,r,o){if(!n)return n;for(var a;e.__d3plus__;)a&&(e.__d3plusParent__=a),a=e,i=e.i,e=e.data||e.feature;return n.bind(t)(e,i,r||a,o)}},a=function(t,n){for(var i in n)({}.hasOwnProperty.call(n,i)&&!i.includes(".")||i.includes(".".concat(e)))&&(t.on[i]=o(n[i]))},u=function t(n){return n.map((function(n){return n instanceof Array?t(n):"object"===Ph(n)?l({},n):"function"==typeof n?o(n):n}))},l=function t(n,e){for(var i in e)({}).hasOwnProperty.call(e,i)&&("on"===i?a(n,e[i]):"function"==typeof e[i]?n[i]=o(e[i]):e[i]instanceof Array?n[i]=u(e[i]):"object"===Ph(e[i])?(n[i]||(n[i]={}),n[i].on={},t(n[i],e[i])):n[i]=e[i])};return l(r,n),this._on&&a(r,this._on),i&&n[i]&&(l(r,n[i]),n[i].on&&a(r,n[i].on)),r}function Bh(t){return function(){return t}}var Dh="http://www.w3.org/1999/xhtml";const zh={svg:"http://www.w3.org/2000/svg",xhtml:Dh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Nh(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),zh.hasOwnProperty(n)?{space:zh[n],local:t}:t}function Rh(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Dh&&n.documentElement.namespaceURI===Dh?n.createElement(t):n.createElementNS(e,t)}}function Fh(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Lh(t){var n=Nh(t);return(n.local?Fh:Rh)(n)}function Ih(){}function Hh(t){return null==t?Ih:function(){return this.querySelector(t)}}function Gh(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Kh(){return[]}function Uh(t){return null==t?Kh:function(){return this.querySelectorAll(t)}}function qh(t){return function(){return this.matches(t)}}function Wh(t){return function(n){return n.matches(t)}}var $h=Array.prototype.find;function Yh(){return this.firstElementChild}var Vh=Array.prototype.filter;function Zh(){return Array.from(this.children)}function Xh(t){return new Array(t.length)}function Jh(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function Qh(t,n,e,i,r,o){for(var a,u=0,l=n.length,s=o.length;un?1:t>=n?0:NaN}function of(t){return function(){this.removeAttribute(t)}}function af(t){return function(){this.removeAttributeNS(t.space,t.local)}}function uf(t,n){return function(){this.setAttribute(t,n)}}function lf(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function sf(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function cf(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function hf(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ff(t){return function(){this.style.removeProperty(t)}}function gf(t,n,e){return function(){this.style.setProperty(t,n,e)}}function df(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function pf(t,n){return t.style.getPropertyValue(n)||hf(t).getComputedStyle(t,null).getPropertyValue(n)}function mf(t){return function(){delete this[t]}}function _f(t,n){return function(){this[t]=n}}function yf(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function vf(t){return t.trim().split(/^|\s+/)}function bf(t){return t.classList||new wf(t)}function wf(t){this._node=t,this._names=vf(t.getAttribute("class")||"")}function Sf(t,n){for(var e=bf(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Uf=[null];function qf(t,n){this._groups=t,this._parents=n}function Wf(){return new qf([[document.documentElement]],Uf)}function $f(t){return"string"==typeof t?new qf([[document.querySelector(t)]],[document.documentElement]):new qf([[t]],Uf)}function Yf(t){let n;for(;n=t.sourceEvent;)t=n;return t}function Vf(t,n){if(t=Yf(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(n.getScreenCTM().inverse())).x,i.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}qf.prototype=Wf.prototype={constructor:qf,select:function(t){"function"!=typeof t&&(t=Hh(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r=b&&(b=v+1);!(y=m[b])&&++b=0;)(i=r[o])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=rf);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?ff:"function"==typeof n?df:gf)(t,n,null==e?"":e)):pf(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?mf:"function"==typeof n?yf:_f)(t,n)):this.node()[t]},classed:function(t,n){var e=vf(t+"");if(arguments.length<2){for(var i=bf(this.node()),r=-1,o=e.length;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?If:Lf,i=0;i{}};function Xf(){for(var t,n=0,e=arguments.length,i={};n=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),a=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++a0)for(var e,i,r=new Array(e),o=0;o=0&&n._call.call(void 0,t),n=n._next;--ig}()}finally{ig=0,function(){for(var t,n,e=ng,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ng=n);eg=t,yg(i)}(),lg=0}}function _g(){var t=cg.now(),n=t-ug;n>ag&&(sg-=n,ug=t)}function yg(t){ig||(rg&&(rg=clearTimeout(rg)),t-lg>24?(t<1/0&&(rg=setTimeout(mg,t-cg.now()-sg)),og&&(og=clearInterval(og))):(og||(ug=cg.now(),og=setInterval(_g,ag)),ig=1,hg(mg)))}function vg(t,n,e){var i=new dg;return n=null==n?0:+n,i.restart((e=>{i.stop(),t(e+n)}),n,e),i}dg.prototype=pg.prototype={constructor:dg,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?fg():+e)+(null==n?0:+n),this._next||eg===this||(eg?eg._next=this:ng=this,eg=this),this._call=t,this._time=e,yg()},stop:function(){this._call&&(this._call=null,this._time=1/0,yg())}};var bg=Xf("start","end","cancel","interrupt"),wg=[],Sg=0,xg=1,kg=2,Cg=3,Ag=4,Eg=5,Mg=6;function Tg(t,n,e,i,r,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var i,r=t.__transition;function o(t){e.state=xg,e.timer.restart(a,e.delay,e.time),e.delay<=t&&a(t-e.delay)}function a(o){var s,c,h,f;if(e.state!==xg)return l();for(s in r)if((f=r[s]).name===e.name){if(f.state===Cg)return vg(a);f.state===Ag?(f.state=Mg,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[s]):+sSg)throw new Error("too late; already scheduled");return e}function Pg(t,n){var e=jg(t,n);if(e.state>Cg)throw new Error("too late; already running");return e}function jg(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Bg(t,n){var e,i,r,o=t.__transition,a=!0;if(o){for(r in n=null==n?null:n+"",o)(e=o[r]).name===n?(i=e.state>kg&&e.state>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?td(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?td(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Kg.exec(t))?new ed(n[1],n[2],n[3],1):(n=Ug.exec(t))?new ed(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=qg.exec(t))?td(n[1],n[2],n[3],n[4]):(n=Wg.exec(t))?td(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=$g.exec(t))?ld(n[1],n[2]/100,n[3]/100,1):(n=Yg.exec(t))?ld(n[1],n[2]/100,n[3]/100,n[4]):Vg.hasOwnProperty(t)?Qg(Vg[t]):"transparent"===t?new ed(NaN,NaN,NaN,0):null}function Qg(t){return new ed(t>>16&255,t>>8&255,255&t,1)}function td(t,n,e,i){return i<=0&&(t=n=e=NaN),new ed(t,n,e,i)}function nd(t,n,e,i){return 1===arguments.length?((r=t)instanceof Ng||(r=Jg(r)),r?new ed((r=r.rgb()).r,r.g,r.b,r.opacity):new ed):new ed(t,n,e,null==i?1:i);var r}function ed(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function id(){return`#${ud(this.r)}${ud(this.g)}${ud(this.b)}`}function rd(){const t=od(this.opacity);return`${1===t?"rgb(":"rgba("}${ad(this.r)}, ${ad(this.g)}, ${ad(this.b)}${1===t?")":`, ${t})`}`}function od(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ad(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ud(t){return((t=ad(t))<16?"0":"")+t.toString(16)}function ld(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new hd(t,n,e,i)}function sd(t){if(t instanceof hd)return new hd(t.h,t.s,t.l,t.opacity);if(t instanceof Ng||(t=Jg(t)),!t)return new hd;if(t instanceof hd)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),a=NaN,u=o-r,l=(o+r)/2;return u?(a=n===o?(e-i)/u+6*(e0&&l<1?0:a,new hd(a,u,l,t.opacity)}function cd(t,n,e,i){return 1===arguments.length?sd(t):new hd(t,n,e,null==i?1:i)}function hd(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function fd(t){return(t=(t||0)%360)<0?t+360:t}function gd(t){return Math.max(0,Math.min(1,t||0))}function dd(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Dg(Ng,Jg,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Zg,formatHex:Zg,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return sd(this).formatHsl()},formatRgb:Xg,toString:Xg}),Dg(ed,nd,zg(Ng,{brighter(t){return t=null==t?Fg:Math.pow(Fg,t),new ed(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Rg:Math.pow(Rg,t),new ed(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ed(ad(this.r),ad(this.g),ad(this.b),od(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:id,formatHex:id,formatHex8:function(){return`#${ud(this.r)}${ud(this.g)}${ud(this.b)}${ud(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:rd,toString:rd})),Dg(hd,cd,zg(Ng,{brighter(t){return t=null==t?Fg:Math.pow(Fg,t),new hd(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Rg:Math.pow(Rg,t),new hd(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new ed(dd(t>=240?t-240:t+120,r,i),dd(t,r,i),dd(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new hd(fd(this.h),gd(this.s),gd(this.l),od(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=od(this.opacity);return`${1===t?"hsl(":"hsla("}${fd(this.h)}, ${100*gd(this.s)}%, ${100*gd(this.l)}%${1===t?")":`, ${t})`}`}}));const pd=t=>()=>t;function md(t){return 1==(t=+t)?_d:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):pd(isNaN(n)?e:n)}}function _d(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):pd(isNaN(t)?n:t)}const yd=function t(n){var e=md(n);function i(t,n){var i=e((t=nd(t)).r,(n=nd(n)).r),r=e(t.g,n.g),o=e(t.b,n.b),a=_d(t.opacity,n.opacity);return function(n){return t.r=i(n),t.g=r(n),t.b=o(n),t.opacity=a(n),t+""}}return i.gamma=t,i}(1);function vd(t,n){n||(n=[]);var e,i=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(e=0;eo&&(r=n.slice(o,r),u[a]?u[a]+=r:u[++a]=r),(e=e[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,l.push({i:a,x:Sd(e,i)})),o=Cd.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(r(e)+"rotate(",null,i)-2,x:Sd(t,n)})):n&&e.push(r(e)+"rotate("+n+i)}(o.rotate,a.rotate,u,l),function(t,n,e,o){t!==n?o.push({i:e.push(r(e)+"skewX(",null,i)-2,x:Sd(t,n)}):n&&e.push(r(e)+"skewX("+n+i)}(o.skewX,a.skewX,u,l),function(t,n,e,i,o,a){if(t!==e||n!==i){var u=o.push(r(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Sd(t,e)},{i:u-2,x:Sd(n,i)})}else 1===e&&1===i||o.push(r(o)+"scale("+e+","+i+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,l),o=a=null,function(t){for(var n,e=-1,i=l.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Og:Pg;return function(){var a=o(this,t),u=a.on;u!==i&&(r=(i=u).copy()).on(n,e),a.on=r}}(e,t,n))},attr:function(t,n){var e=Nh(t),i="transform"===e?zd:Hd;return this.attrTween(t,"function"==typeof n?(e.local?$d:Wd)(e,i,Id(this,"attr."+t,n)):null==n?(e.local?Kd:Gd)(e):(e.local?qd:Ud)(e,i,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=Nh(t);return this.tween(e,(i.local?Yd:Vd)(i,n))},style:function(t,n,e){var i="transform"==(t+="")?Dd:Hd;return null==n?this.styleTween(t,function(t,n){var e,i,r;return function(){var o=pf(this,t),a=(this.style.removeProperty(t),pf(this,t));return o===a?null:o===e&&a===i?r:r=n(e=o,i=a)}}(t,i)).on("end.style."+t,np(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var i,r,o;return function(){var a=pf(this,t),u=e(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=pf(this,t)),a===l?null:a===i&&l===r?o:(r=l,o=n(i=a,u))}}(t,i,Id(this,"style."+t,n))).each(function(t,n){var e,i,r,o,a="style."+n,u="end."+a;return function(){var l=Pg(this,t),s=l.on,c=null==l.value[a]?o||(o=np(n)):void 0;s===e&&r===c||(i=(e=s).copy()).on(u,r=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,n,e){var i,r,o=e+"";return function(){var a=pf(this,t);return a===o?null:a===i?r:r=n(i=a,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function(t,n,e){var i,r;function o(){var o=n.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,o,e)),i}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Id(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function i(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&function(t){return function(n){this.textContent=t.call(this,n)}}(i)),n}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var i,r=jg(this.node(),e).tween,o=0,a=r.length;o1&&void 0!==arguments[1]?arguments[1]:function(t){return t},e=t.map(n).map((function(t){return t instanceof Date?+t:t}));return t.filter((function(t,i){var r=n(t);return e.indexOf(r instanceof Date?+r:r)===i}))}function hp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=cp(Zt(t.map((function(t){return Object.keys(t)})))),i={};return e.forEach((function(e){var r;if(n[e])r=n[e](t,(function(t){return t[e]}));else{var o=t.map((function(t){return t[e]})),a=o.map((function(t){return t||!1===t?t.constructor:t})).filter((function(t){return void 0!==t}));a.length?a.indexOf(Array)>=0?1===(r=cp(r=Zt(o.map((function(t){return t instanceof Array?t:[t]}))))).length&&(r=r[0]):a.indexOf(String)>=0?1===(r=cp(o)).length&&(r=r[0]):a.indexOf(Number)>=0?r=Jt(o):a.indexOf(Object)>=0?r=1===(r=cp(o.filter((function(t){return t})))).length?r[0]:hp(r):1===(r=cp(o.filter((function(t){return void 0!==t})))).length&&(r=r[0]):r=void 0}i[e]=r})),i}function fp(t){var n;return 1===(n="number"==typeof t?[t]:t.split(/\s+/)).length?n=[n[0],n[0],n[0],n[0]]:2===n.length?n=n.concat(n):3===n.length&&n.push(n[1]),["top","right","bottom","left"].reduce((function(t,e,i){var r=parseFloat(n[i]);return t[e]=r||0,t}),{})}function gp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var e in n)({}).hasOwnProperty.call(n,e)&&t.style(e,n[e])}Wf.prototype.interrupt=function(t){return this.each((function(){Bg(this,t)}))},Wf.prototype.transition=function(t){var n,e;t instanceof ip?(n=t._id,t=t._name):(n=op(),(e=up).time=fg(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o=i.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var l,s,c,h=-1,f=e.length,g=i[r++],d=mp(),p=a();++hi.length)return t;var o,u=r[e-1];return null!=n&&e>=i.length?o=t.entries():(o=[],t.each((function(t,n){o.push({key:n,values:a(t,e)})}))),null!=u?o.sort((function(t,n){return u(t.key,n.key)})):o}return e={object:function(t){return o(t,0,yp,vp)},map:function(t){return o(t,0,bp,wp)},entries:function(t){return a(o(t,0,bp,wp),0)},key:function(t){return i.push(t),e},sortKeys:function(t){return r[i.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}}function yp(){return{}}function vp(t,n,e){t[n]=e}function bp(){return mp()}function wp(t,n,e){t.set(n,e)}function Sp(){}pp.prototype=mp.prototype={constructor:pp,has:function(t){return dp+t in this},get:function(t){return this[dp+t]},set:function(t,n){return this[dp+t]=n,this},remove:function(t){var n=dp+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===dp&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===dp&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===dp&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===dp&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===dp&&++t;return t},empty:function(){for(var t in this)if(t[0]===dp)return!1;return!0},each:function(t){for(var n in this)n[0]===dp&&t(this[n],n.slice(1),this)}};var xp=mp.prototype;function kp(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function Cp(t,n){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof n?this.interpolator(n):this.range(n)}return this}Sp.prototype={constructor:Sp,has:xp.has,add:function(t){return this[dp+(t+="")]=t,this},remove:xp.remove,clear:xp.clear,values:xp.keys,size:xp.size,empty:xp.empty,each:xp.each};const Ap=Symbol("implicit");function Ep(){var t=new Ot,n=[],e=[],i=Ap;function r(r){let o=t.get(r);if(void 0===o){if(i!==Ap)return i;t.set(r,o=n.push(r)-1)}return e[o%e.length]}return r.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Ot;for(const i of e)t.has(i)||t.set(i,n.push(i)-1);return r},r.range=function(t){return arguments.length?(e=Array.from(t),r):e.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Ep(n,e).unknown(i)},kp.apply(r,arguments),r}function Mp(){var t,n,e=Ep().unknown(void 0),i=e.domain,r=e.range,o=0,a=1,u=!1,l=0,s=0,c=.5;function h(){var e=i().length,h=an&&(e=t,t=n,n=e),function(e){return Math.max(t,Math.min(n,e))}}(a[0],a[t-1])),i=t>2?zp:Dp,r=o=null,h}function h(n){return null==n||isNaN(n=+n)?e:(r||(r=i(a.map(t),u,l)))(t(s(n)))}return h.invert=function(e){return s(n((o||(o=i(u,a.map(t),Sd)))(e)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Op),c()):a.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},h.rangeRound=function(t){return u=Array.from(t),l=Md,c()},h.clamp=function(t){return arguments.length?(s=!!t||jp,c()):s!==jp},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,i){return t=e,n=i,c()}}function Fp(){return Rp()(jp,jp)}function Lp(t,n,e,u){var l,s=Kt(t,n,e);switch((u=r(null==u?",f":u)).type){case"s":var c=Math.max(Math.abs(t),Math.abs(n));return null!=u.precision||isNaN(l=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(i(n)/3)))-i(Math.abs(t)))}(s,c))||(u.precision=l),o(u,c);case"":case"e":case"g":case"p":case"r":null!=u.precision||isNaN(l=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,i(n)-i(t))+1}(s,Math.max(Math.abs(t),Math.abs(n))))||(u.precision=l-("e"===u.type));break;case"f":case"%":null!=u.precision||isNaN(l=function(t){return Math.max(0,-i(Math.abs(t)))}(s))||(u.precision=l-2*("%"===u.type))}return a(u)}function Ip(t){var n=t.domain;return t.ticks=function(t){var e=n();return Ht(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var i=n();return Lp(i[0],i[i.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var i,r,o=n(),a=0,u=o.length-1,l=o[a],s=o[u],c=10;for(s0;){if((r=Gt(l,s,e))===i)return o[a]=l,o[u]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}i=r}return t},t}function Hp(){var t=Fp();return t.copy=function(){return Np(t,Hp())},kp.apply(t,arguments),Ip(t)}function Gp(t,n){var e,i=0,r=(t=t.slice()).length-1,o=t[i],a=t[r];return a-t(-n,e)}function Vp(t){const n=t(Kp,Up),e=n.domain;let i,o,u=10;function l(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(u),o=function(t){return 10===t?$p:t===Math.E?Math.exp:n=>Math.pow(t,n)}(u),e()[0]<0?(i=Yp(i),o=Yp(o),t(qp,Wp)):t(Kp,Up),n}return n.base=function(t){return arguments.length?(u=+t,l()):u},n.domain=function(t){return arguments.length?(e(t),l()):e()},n.ticks=t=>{const n=e();let r=n[0],a=n[n.length-1];const l=a0){for(;h<=f;++h)for(s=1;sa)break;d.push(c)}}else for(;h<=f;++h)for(s=u-1;s>=1;--s)if(c=h>0?s/o(-h):s*o(h),!(ca)break;d.push(c)}2*d.length{if(null==t&&(t=10),null==e&&(e=10===u?"s":","),"function"!=typeof e&&(u%1||null!=(e=r(e)).precision||(e.trim=!0),e=a(e)),t===1/0)return e;const l=Math.max(1,u*t/n.ticks().length);return t=>{let n=t/o(Math.round(i(t)));return n*ue(Gp(e(),{floor:t=>o(Math.floor(i(t))),ceil:t=>o(Math.ceil(i(t)))})),n}function Zp(){const t=Vp(Rp()).domain([1,10]);return t.copy=()=>Np(t,Zp()).base(t.base()),kp.apply(t,arguments),t}function Xp(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Jp(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Qp(t){var n=1,e=t(Xp(n),Jp(n));return e.constant=function(e){return arguments.length?t(Xp(n=+e),Jp(n)):n},Ip(e)}function tm(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function nm(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function em(t){return t<0?-t*t:t*t}function im(t){var n=t(jp,jp),e=1;return n.exponent=function(n){return arguments.length?1==(e=+n)?t(jp,jp):.5===e?t(nm,em):t(tm(e),tm(1/e)):e},Ip(n)}function rm(){var t=im(Rp());return t.copy=function(){return Np(t,rm()).exponent(t.exponent())},kp.apply(t,arguments),t}function om(t){return Math.sign(t)*t*t}function am(){var t,n=[.5],e=[0,1],i=1;function r(r){return null!=r&&r<=r?e[At(n,r,0,i)]:t}return r.domain=function(t){return arguments.length?(n=Array.from(t),i=Math.min(n.length,e.length-1),r):n.slice()},r.range=function(t){return arguments.length?(e=Array.from(t),i=Math.min(n.length,e.length-1),r):e.slice()},r.invertExtent=function(t){var i=e.indexOf(t);return[n[i-1],n[i]]},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return am().domain(n).range(e).unknown(t)},kp.apply(r,arguments)}function um(t){return new Date(t)}function lm(t){return t instanceof Date?+t:+new Date(+t)}function sm(t,n,e,i,r,o,a,u,l,s){var c=Fp(),h=c.invert,f=c.domain,g=s(".%L"),d=s(":%S"),p=s("%I:%M"),m=s("%I %p"),_=s("%a %d"),y=s("%b %d"),v=s("%B"),b=s("%Y");function w(t){return(l(t)0?r[n-1]:e[0],n=r?[o[r-1],i]:[o[n-1],o[n]]},u.unknown=function(t){return arguments.length?(n=t,u):u},u.thresholds=function(){return o.slice()},u.copy=function(){return t().domain([e,i]).range(a).unknown(n)},kp.apply(Ip(u),arguments)},scaleRadial:function t(){var n,e=Fp(),i=[0,1],r=!1;function o(t){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(t));return isNaN(i)?n:r?Math.round(i):i}return o.invert=function(t){return e.invert(om(t))},o.domain=function(t){return arguments.length?(e.domain(t),o):e.domain()},o.range=function(t){return arguments.length?(e.range((i=Array.from(t,Op)).map(om)),o):i.slice()},o.rangeRound=function(t){return o.range(t).round(!0)},o.round=function(t){return arguments.length?(r=!!t,o):r},o.clamp=function(t){return arguments.length?(e.clamp(t),o):e.clamp()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(e.domain(),i).round(r).clamp(e.clamp()).unknown(n)},kp.apply(o,arguments),Ip(o)},scaleSequential:function t(){var n=Ip(hm()(jp));return n.copy=function(){return fm(n,t())},Cp.apply(n,arguments)},scaleSequentialLog:function t(){var n=Vp(hm()).domain([1,10]);return n.copy=function(){return fm(n,t()).base(n.base())},Cp.apply(n,arguments)},scaleSequentialPow:gm,scaleSequentialQuantile:function t(){var n=[],e=jp;function i(t){if(null!=t&&!isNaN(t=+t))return e((At(n,t,1)-1)/(n.length-1))}return i.domain=function(t){if(!arguments.length)return n.slice();n=[];for(let e of t)null==e||isNaN(e=+e)||n.push(e);return n.sort(bt),i},i.interpolator=function(t){return arguments.length?(e=t,i):e},i.range=function(){return n.map(((t,i)=>e(i/(n.length-1))))},i.quantiles=function(t){return Array.from({length:t+1},((e,i)=>Yt(n,i/t)))},i.copy=function(){return t(e).domain(n)},Cp.apply(i,arguments)},scaleSequentialSqrt:function(){return gm.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function t(){var n=Qp(hm());return n.copy=function(){return fm(n,t()).constant(n.constant())},Cp.apply(n,arguments)},scaleSqrt:function(){return rm.apply(null,arguments).exponent(.5)},scaleSymlog:function t(){var n=Qp(Rp());return n.copy=function(){return Np(n,t()).constant(n.constant())},kp.apply(n,arguments)},scaleThreshold:am,scaleTime:cm,scaleUtc:function(){return kp.apply(sm(tn,nn,vt,_t,st,J,Z,Y,W,cn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:Lp},Symbol.toStringTag,{value:"Module"}));function _m(t){return function(){return t}}const ym=Math.abs,vm=Math.atan2,bm=Math.cos,wm=Math.max,Sm=Math.min,xm=Math.sin,km=Math.sqrt,Cm=1e-12,Am=Math.PI,Em=Am/2,Mm=2*Am;function Tm(t){return t>=1?Em:t<=-1?-Em:Math.asin(t)}const Om=Math.PI,Pm=2*Om,jm=1e-6,Bm=Pm-jm;function Dm(t){this._+=t[0];for(let n=1,e=t.length;n=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Dm;const e=10**n;return function(t){this._+=t[0];for(let n=1,i=t.length;njm)if(Math.abs(c*u-l*s)>jm&&r){let f=e-o,g=i-a,d=u*u+l*l,p=f*f+g*g,m=Math.sqrt(d),_=Math.sqrt(h),y=r*Math.tan((Om-Math.acos((d+h-p)/(2*m*_)))/2),v=y/_,b=y/m;Math.abs(v-1)>jm&&this._append`L${t+v*s},${n+v*c}`,this._append`A${r},${r},0,0,${+(c*f>s*g)},${this._x1=t+b*u},${this._y1=n+b*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,e,i,r,o){if(t=+t,n=+n,o=!!o,(e=+e)<0)throw new Error(`negative radius: ${e}`);let a=e*Math.cos(i),u=e*Math.sin(i),l=t+a,s=n+u,c=1^o,h=o?i-r:r-i;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>jm||Math.abs(this._y1-s)>jm)&&this._append`L${l},${s}`,e&&(h<0&&(h=h%Pm+Pm),h>Bm?this._append`A${e},${e},0,1,${c},${t-a},${n-u}A${e},${e},0,1,${c},${this._x1=l},${this._y1=s}`:h>jm&&this._append`A${e},${e},0,${+(h>=Om)},${c},${this._x1=t+e*Math.cos(r)},${this._y1=n+e*Math.sin(r)}`)}rect(t,n,e,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${e=+e}v${+i}h${-e}Z`}toString(){return this._}};function Nm(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);n=t}return t},()=>new zm(n)}function Rm(t){return t.innerRadius}function Fm(t){return t.outerRadius}function Lm(t){return t.startAngle}function Im(t){return t.endAngle}function Hm(t){return t&&t.padAngle}function Gm(t,n,e,i,r,o,a){var u=t-e,l=n-i,s=(a?o:-o)/km(u*u+l*l),c=s*l,h=-s*u,f=t+c,g=n+h,d=e+c,p=i+h,m=(f+d)/2,_=(g+p)/2,y=d-f,v=p-g,b=y*y+v*v,w=r-o,S=f*p-d*g,x=(v<0?-1:1)*km(wm(0,w*w*b-S*S)),k=(S*v-y*x)/b,C=(-S*y-v*x)/b,A=(S*v+y*x)/b,E=(-S*y+v*x)/b,M=k-m,T=C-_,O=A-m,P=E-_;return M*M+T*T>O*O+P*P&&(k=A,C=E),{cx:k,cy:C,x01:-c,y01:-h,x11:k*(r/w-1),y11:C*(r/w-1)}}function Km(){var t=Rm,n=Fm,e=_m(0),i=null,r=Lm,o=Im,a=Hm,u=null,l=Nm(s);function s(){var s,c,h=+t.apply(this,arguments),f=+n.apply(this,arguments),g=r.apply(this,arguments)-Em,d=o.apply(this,arguments)-Em,p=ym(d-g),m=d>g;if(u||(u=s=l()),fCm)if(p>Mm-Cm)u.moveTo(f*bm(g),f*xm(g)),u.arc(0,0,f,g,d,!m),h>Cm&&(u.moveTo(h*bm(d),h*xm(d)),u.arc(0,0,h,d,g,m));else{var _,y,v=g,b=d,w=g,S=d,x=p,k=p,C=a.apply(this,arguments)/2,A=C>Cm&&(i?+i.apply(this,arguments):km(h*h+f*f)),E=Sm(ym(f-h)/2,+e.apply(this,arguments)),M=E,T=E;if(A>Cm){var O=Tm(A/h*xm(C)),P=Tm(A/f*xm(C));(x-=2*O)>Cm?(w+=O*=m?1:-1,S-=O):(x=0,w=S=(g+d)/2),(k-=2*P)>Cm?(v+=P*=m?1:-1,b-=P):(k=0,v=b=(g+d)/2)}var j=f*bm(v),B=f*xm(v),D=h*bm(S),z=h*xm(S);if(E>Cm){var N,R=f*bm(b),F=f*xm(b),L=h*bm(w),I=h*xm(w);if(p1?0:t<-1?Am:Math.acos(t)}((H*K+G*U)/(km(H*H+G*G)*km(K*K+U*U)))/2),W=km(N[0]*N[0]+N[1]*N[1]);M=Sm(E,(h-W)/(q-1)),T=Sm(E,(f-W)/(q+1))}else M=T=0}k>Cm?T>Cm?(_=Gm(L,I,j,B,f,T,m),y=Gm(R,F,D,z,f,T,m),u.moveTo(_.cx+_.x01,_.cy+_.y01),TCm&&x>Cm?M>Cm?(_=Gm(D,z,R,F,h,-M,m),y=Gm(j,B,L,I,h,-M,m),u.lineTo(_.cx+_.x01,_.cy+_.y01),M=h;--f)u.point(_[f],y[f]);u.lineEnd(),u.areaEnd()}m&&(_[c]=+t(g,c,s),y[c]=+n(g,c,s),u.point(i?+i(g,c,s):_[c],e?+e(g,c,s):y[c]))}if(d)return u=null,d+""||null}function c(){return Zm().defined(r).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?Ym:_m(+t),n="function"==typeof n?n:_m(void 0===n?0:+n),e="function"==typeof e?e:void 0===e?Vm:_m(+e),s.x=function(n){return arguments.length?(t="function"==typeof n?n:_m(+n),i=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:_m(+n),s):t},s.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:_m(+t),s):i},s.y=function(t){return arguments.length?(n="function"==typeof t?t:_m(+t),e=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:_m(+t),s):n},s.y1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:_m(+t),s):e},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(e)},s.lineX1=function(){return c().x(i).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:_m(!!t),s):r},s.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),s):o},s}function Jm(t,n){return nt?1:n>=t?0:NaN}function Qm(t){return t}function t_(){var t=Qm,n=Jm,e=null,i=_m(0),r=_m(Mm),o=_m(0);function a(a){var u,l,s,c,h,f=(a=qm(a)).length,g=0,d=new Array(f),p=new Array(f),m=+i.apply(this,arguments),_=Math.min(Mm,Math.max(-Mm,r.apply(this,arguments)-m)),y=Math.min(Math.abs(_)/f,o.apply(this,arguments)),v=y*(_<0?-1:1);for(u=0;u0&&(g+=h);for(null!=n?d.sort((function(t,e){return n(p[t],p[e])})):null!=e&&d.sort((function(t,n){return e(a[t],a[n])})),u=0,s=g?(_-f*v)/g:0;u0?h*s:0)+v,p[l]={data:a[l],index:u,value:h,startAngle:m,endAngle:c,padAngle:y};return p}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:_m(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:_m(+t),a):i},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:_m(+t),a):r},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:_m(+t),a):o},a}Wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var n_=i_($m);function e_(t){this._curve=t}function i_(t){function n(n){return new e_(t(n))}return n._curve=t,n}function r_(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(i_(t)):n()._curve},t}function o_(){return r_(Zm().curve(n_))}function a_(){var t=Xm().curve(n_),n=t.curve,e=t.lineX0,i=t.lineX1,r=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return r_(e())},delete t.lineX0,t.lineEndAngle=function(){return r_(i())},delete t.lineX1,t.lineInnerRadius=function(){return r_(r())},delete t.lineY0,t.lineOuterRadius=function(){return r_(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(i_(t)):n()._curve},t}function u_(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}e_.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class l_{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class s_{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0===this._point)this._point=1;else{const e=u_(this._x0,this._y0),i=u_(this._x0,this._y0=(this._y0+n)/2),r=u_(t,this._y0),o=u_(t,n);this._context.moveTo(...e),this._context.bezierCurveTo(...i,...r,...o)}this._x0=t,this._y0=n}}function c_(t){return new l_(t,!0)}function h_(t){return new l_(t,!1)}function f_(t){return new s_(t)}function g_(t){return t.source}function d_(t){return t.target}function p_(t){let n=g_,e=d_,i=Ym,r=Vm,o=null,a=null,u=Nm(l);function l(){let l;const s=Um.call(arguments),c=n.apply(this,s),h=e.apply(this,s);if(null==o&&(a=t(l=u())),a.lineStart(),s[0]=c,a.point(+i.apply(this,s),+r.apply(this,s)),s[0]=h,a.point(+i.apply(this,s),+r.apply(this,s)),a.lineEnd(),l)return a=null,l+""||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(e=t,l):e},l.x=function(t){return arguments.length?(i="function"==typeof t?t:_m(+t),l):i},l.y=function(t){return arguments.length?(r="function"==typeof t?t:_m(+t),l):r},l.context=function(n){return arguments.length?(null==n?o=a=null:a=t(o=n),l):o},l}const m_=km(3),__={draw(t,n){const e=.59436*km(n+Sm(n/28,.75)),i=e/2,r=i*m_;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-r,-i),t.lineTo(r,i),t.moveTo(-r,i),t.lineTo(r,-i)}},y_={draw(t,n){const e=km(n/Am);t.moveTo(e,0),t.arc(0,0,e,0,Mm)}},v_={draw(t,n){const e=km(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},b_=km(1/3),w_=2*b_,S_={draw(t,n){const e=km(n/w_),i=e*b_;t.moveTo(0,-e),t.lineTo(i,0),t.lineTo(0,e),t.lineTo(-i,0),t.closePath()}},x_={draw(t,n){const e=.62625*km(n);t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},k_={draw(t,n){const e=.87559*km(n-Sm(n/7,2));t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},C_={draw(t,n){const e=km(n),i=-e/2;t.rect(i,i,e,e)}},A_={draw(t,n){const e=.4431*km(n);t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}},E_=xm(Am/10)/xm(7*Am/10),M_=xm(Mm/10)*E_,T_=-bm(Mm/10)*E_,O_={draw(t,n){const e=km(.8908130915292852*n),i=M_*e,r=T_*e;t.moveTo(0,-e),t.lineTo(i,r);for(let o=1;o<5;++o){const n=Mm*o/5,a=bm(n),u=xm(n);t.lineTo(u*e,-a*e),t.lineTo(a*i-u*r,u*i+a*r)}t.closePath()}},P_=km(3),j_={draw(t,n){const e=-km(n/(3*P_));t.moveTo(0,2*e),t.lineTo(-P_*e,-e),t.lineTo(P_*e,-e),t.closePath()}},B_=km(3),D_={draw(t,n){const e=.6824*km(n),i=e/2,r=e*B_/2;t.moveTo(0,-e),t.lineTo(r,i),t.lineTo(-r,i),t.closePath()}},z_=-.5,N_=km(3)/2,R_=1/km(12),F_=3*(R_/2+1),L_={draw(t,n){const e=km(n/F_),i=e/2,r=e*R_,o=i,a=e*R_+e,u=-o,l=a;t.moveTo(i,r),t.lineTo(o,a),t.lineTo(u,l),t.lineTo(z_*i-N_*r,N_*i+z_*r),t.lineTo(z_*o-N_*a,N_*o+z_*a),t.lineTo(z_*u-N_*l,N_*u+z_*l),t.lineTo(z_*i+N_*r,z_*r-N_*i),t.lineTo(z_*o+N_*a,z_*a-N_*o),t.lineTo(z_*u+N_*l,z_*l-N_*u),t.closePath()}},I_={draw(t,n){const e=.6189*km(n-Sm(n/6,1.7));t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}},H_=[y_,v_,S_,C_,O_,j_,L_],G_=[y_,k_,I_,D_,__,A_,x_];function K_(){}function U_(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function q_(t){this._context=t}function W_(t){this._context=t}function $_(t){this._context=t}function Y_(t,n){this._basis=new q_(t),this._beta=n}q_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:U_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:U_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},W_.prototype={areaStart:K_,areaEnd:K_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:U_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},$_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break;case 3:this._point=4;default:U_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Y_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var i,r=t[0],o=n[0],a=t[e]-r,u=n[e]-o,l=-1;++l<=e;)i=l/e,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*a),this._beta*n[l]+(1-this._beta)*(o+i*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const V_=function t(n){function e(t){return 1===n?new q_(t):new Y_(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Z_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function X_(t,n){this._context=t,this._k=(1-n)/6}X_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Z_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const J_=function t(n){function e(t){return new X_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Q_(t,n){this._context=t,this._k=(1-n)/6}Q_.prototype={areaStart:K_,areaEnd:K_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Z_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const ty=function t(n){function e(t){return new Q_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function ny(t,n){this._context=t,this._k=(1-n)/6}ny.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Z_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const ey=function t(n){function e(t){return new ny(t,n)}return e.tension=function(n){return t(+n)},e}(0);function iy(t,n,e){var i=t._x1,r=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Cm){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Cm){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/c,a=(a*s+t._y1*t._l23_2a-e*t._l12_2a)/c}t._context.bezierCurveTo(i,r,o,a,t._x2,t._y2)}function ry(t,n){this._context=t,this._alpha=n}ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:iy(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const oy=function t(n){function e(t){return n?new ry(t,n):new X_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function ay(t,n){this._context=t,this._alpha=n}ay.prototype={areaStart:K_,areaEnd:K_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:iy(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const uy=function t(n){function e(t){return n?new ay(t,n):new Q_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function ly(t,n){this._context=t,this._alpha=n}ly.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:iy(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const sy=function t(n){function e(t){return n?new ly(t,n):new ny(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function cy(t){this._context=t}function hy(t){return t<0?-1:1}function fy(t,n,e){var i=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),a=(e-t._y1)/(r||i<0&&-0),u=(o*r+a*i)/(i+r);return(hy(o)+hy(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function gy(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function dy(t,n,e){var i=t._x0,r=t._y0,o=t._x1,a=t._y1,u=(o-i)/3;t._context.bezierCurveTo(i+u,r+u*n,o-u,a-u*e,o,a)}function py(t){this._context=t}function my(t){this._context=new _y(t)}function _y(t){this._context=t}function yy(t){this._context=t}function vy(t){var n,e,i=t.length-1,r=new Array(i),o=new Array(i),a=new Array(i);for(r[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)r[n]=(a[n]-r[n+1])/o[n];for(o[i-1]=(t[i]+r[i-1])/2,n=0;n1)for(var e,i,r,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e}function xy(t,n){return t[n]}function ky(t){const n=[];return n.key=t,n}function Cy(){var t=_m([]),n=Sy,e=wy,i=xy;function r(r){var o,a,u=Array.from(t.apply(this,arguments),ky),l=u.length,s=-1;for(const t of r)for(o=0,++s;oo&&(o=n,i=e);return i}function My(t){var n=t.map(Ty);return Sy(t).sort((function(t,e){return n[t]-n[e]}))}function Ty(t){for(var n,e=0,i=-1,r=t.length;++i=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};const Oy=Object.freeze(Object.defineProperty({__proto__:null,arc:Km,area:Xm,areaRadial:a_,curveBasis:function(t){return new q_(t)},curveBasisClosed:function(t){return new W_(t)},curveBasisOpen:function(t){return new $_(t)},curveBumpX:c_,curveBumpY:h_,curveBundle:V_,curveCardinal:J_,curveCardinalClosed:ty,curveCardinalOpen:ey,curveCatmullRom:oy,curveCatmullRomClosed:uy,curveCatmullRomOpen:sy,curveLinear:$m,curveLinearClosed:function(t){return new cy(t)},curveMonotoneX:function(t){return new py(t)},curveMonotoneY:function(t){return new my(t)},curveNatural:function(t){return new yy(t)},curveStep:function(t){return new by(t,.5)},curveStepAfter:function(t){return new by(t,1)},curveStepBefore:function(t){return new by(t,0)},line:Zm,lineRadial:o_,link:p_,linkHorizontal:function(){return p_(c_)},linkRadial:function(){const t=p_(f_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},linkVertical:function(){return p_(h_)},pie:t_,pointRadial:u_,radialArea:a_,radialLine:o_,stack:Cy,stackOffsetDiverging:function(t,n){if((u=t.length)>0)for(var e,i,r,o,a,u,l=0,s=t[n[0]].length;l0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=a,i[0]=a+=r):(i[0]=0,i[1]=r)},stackOffsetExpand:function(t,n){if((i=t.length)>0){for(var e,i,r,o=0,a=t[0].length;o0){for(var e,i=0,r=t[n[0]],o=r.length;i0&&(i=(e=t[n[0]]).length)>0){for(var e,i,r,o=0,a=1;a1&&void 0!==arguments[1]?arguments[1]:{};return t in n?n[t]:t in Py?Py[t]:Py.missing}const By=Py;function Dy(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[null,void 0].indexOf(t)>=0?jy("missing",n):!0===t?jy("on",n):!1===t?jy("off",n):Jg(t)?t.toString():jy("scale",n)(t)}function zy(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return jy((299*(t=nd(t)).r+587*t.g+114*t.b)/1e3>=128?"dark":"light",n)}function Ny(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5;return n*=1-(t=cd(t)).l,t.l+=n,t.s-=n,t.toString()}function Ry(t){return Ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ry(t)}function Fy(t,n){for(var e=0;e]+>/g,""),"text/html");return n.documentElement?n.documentElement.textContent:t}function Hy(t,n){n=Object.assign({"font-size":10,"font-family":"sans-serif","font-style":"normal","font-weight":400,"font-variant":"normal"},n);var e=document.createElement("canvas").getContext("2d"),i=[];return i.push(n["font-style"]),i.push(n["font-variant"]),i.push(n["font-weight"]),i.push("string"==typeof n["font-size"]?n["font-size"]:"".concat(n["font-size"],"px")),i.push(n["font-family"]),e.font=i.join(" "),t instanceof Array?t.map((function(t){return e.measureText(Iy(t)).width})):e.measureText(Iy(t)).width}function Gy(t){return t.toString().replace(/^\s+|\s+$/g,"")}function Ky(t){return t.toString().replace(/\s+$/,"")}var Uy,qy,Wy,$y,Yy="abcdefghiABCDEFGHI_!@#$%^&*()_+1234567890",Vy={};const Zy=function(t){Uy||(Uy=Hy(Yy,{"font-family":"DejaVuSans","font-size":32}),qy=Hy(Yy,{"font-family":"-apple-system","font-size":32}),Wy=Hy(Yy,{"font-family":"monospace","font-size":32}),$y=Hy(Yy,{"font-family":"sans-serif","font-size":32})),t instanceof Array||(t=t.split(",")),t=t.map((function(t){return Gy(t)}));for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"body";for(t=$f(t).node();t&&t.parentNode&&t!==document.body&&!Xy(t);)t=t.parentNode;return Xy(t)||Xy("html")};function Qy(t){return void 0===t?t="undefined":"string"==typeof t||t instanceof String||(t=JSON.stringify(t)),t}var tv=[[/[\300-\305]/g,"A"],[/[\340-\345]/g,"a"],[/[\306]/g,"AE"],[/[\346]/g,"ae"],[/[\337]/g,"B"],[/[\307]/g,"C"],[/[\347]/g,"c"],[/[\320\336\376]/g,"D"],[/[\360]/g,"d"],[/[\310-\313]/g,"E"],[/[\350-\353]/g,"e"],[/[\314-\317]/g,"I"],[/[\354-\357]/g,"i"],[/[\321]/g,"N"],[/[\361]/g,"n"],[/[\u014c\322-\326\330]/g,"O"],[/[\u014d\362-\366\370]/g,"o"],[/[\u016a\331-\334]/g,"U"],[/[\u016b\371-\374]/g,"u"],[/[\327]/g,"x"],[/[\335]/g,"Y"],[/[\375\377]/g,"y"]];function nv(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return"".concat(t).replace(/[^A-Za-z0-9\-_\u0621-\u064A]/g,(function(t){if(" "===t)return n;for(var e=!1,i=0;i",")","}","]",".","!","?","/","u00BB","u300B","u3009"].concat(iv),ov="က-ဪဿ-၉ၐ-ၕ㐀-龿぀-ゟ゠-ヿ＀-+--}⦅-゚㐀-䶿ກ-ຮະ-ໄ່-໋ໍ-ໝ",av=new RegExp("(\\".concat(iv.join("|\\"),")*[^\\s|\\").concat(iv.join("|\\"),"]*(\\").concat(iv.join("|\\"),")*"),"g"),uv=new RegExp("[".concat(ov,"]")),lv=new RegExp("(\\".concat(["'","<","(","{","[","u00AB","u300A","u3008"].join("|\\"),")*[").concat(ov,"](\\").concat(rv.join("|\\"),"|\\").concat(ev.join("|\\"),")*|[a-z0-9]+"),"gi");function sv(t){return uv.test(t)?Zt(Qy(t).match(av).map((function(t){return uv.test(t)?t.match(lv):[t]}))):Qy(t).match(av).filter((function(t){return t.length}))}function cv(){var t,n="sans-serif",e=10,i=400,r=200,o=null,a=!1,u=sv,l=200;function s(s){s=Qy(s),void 0===t&&(t=Math.ceil(1.4*e));for(var c=u(s),h={"font-family":n,"font-size":e,"font-weight":i,"line-height":t},f=1,g="",d=!1,p=0,m=[],_=Hy(c,h),y=Hy(" ",h),v=0;vl){if(!v&&!a){d=!0;break}if(m.length>=f&&(m[f-1]=Ky(m[f-1])),f++,t*f>r||w>l&&!a||o&&f>o){d=!0;break}p=0,m.push(b)}else v?m[f-1]+=b:m[0]=b;g+=b,p+=w,p+=b.match(/[\s]*$/g)[0].length*y}return{lines:m,sentence:s,truncated:d,widths:Hy(m,h),words:c}}return s.fontFamily=function(t){return arguments.length?(n=t,s):n},s.fontSize=function(t){return arguments.length?(e=t,s):e},s.fontWeight=function(t){return arguments.length?(i=t,s):i},s.height=function(t){return arguments.length?(r=t,s):r},s.lineHeight=function(n){return arguments.length?(t=n,s):t},s.maxLines=function(t){return arguments.length?(o=t,s):o},s.overflow=function(t){return arguments.length?(a=t,s):a},s.split=function(t){return arguments.length?(u=t,s):u},s.width=function(t){return arguments.length?(l=t,s):l},s}function hv(t){return hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hv(t)}function fv(t,n){for(var e=0;eb&&(m>h||l&&m>b*s)){if(l){var x=1.165+_/m*.1,k=_*m,C=Ut(a=Hy(S,d)),A=Jt(a,(function(t){return t*h}))*x;if(C>_||A>k){var E=qt([Math.sqrt(k/A),_/C]);c=Math.floor(c*E)}var M=Math.floor(.8*m);c>M&&(c=M)}!function t(){var n=function(){f<1?g=[e._ellipsis("",f)]:g[f-1]=e._ellipsis(g[f-1],f)};if(c=qt([c=Ut([c,b]),v]),l&&(h=c*s,y.fontSize(c).lineHeight(h),d["font-size"]=c,d["line-height"]=h),u=y(o),g=u.lines.filter((function(t){return""!==t})),f=g.length,u.truncated)if(l){if(--c^/]+>)([^<^>]+)$/g,(function(t,n,e){return"".concat(n).concat(e).concat(n.replace("<","]+)(<\/[^>]+>)/g,(function(t,n,e){return"".concat(e.replace("^\s]{0,1}[0-9.,]{2,}[^<^\s]{0,1}/g,(function(t){var n=i.indexOf(t);return""===i.slice(n-5,n)?t:"".concat(t,"")})));var r=new RegExp(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g);return i.match(r)?i=i.replace(r,(function(i,r,o){if(n=!!e._html[r]&&r){var a=e._html[n];return t.includes(""))&&(n=!1),'').concat(o,"")}return o})):n.length&&(i='').concat(i,"")),i}))}function i(n){n.attr("aria-hidden",t.aH).attr("dir",u?"rtl":"ltr").attr("fill",t.fC).attr("stroke",t.fStroke).attr("stroke-width",t.fSW).attr("text-anchor",t.tA).attr("font-family",t.fF).style("font-family",t.fF).attr("font-size","".concat(t.fS,"px")).style("font-size","".concat(t.fS,"px")).attr("font-weight",t.fW).style("font-weight",t.fW).attr("x","".concat("middle"===t.tA?t.w/2:u?"start"===t.tA?t.w:0:"end"===t.tA?t.w:2*Math.sin(Math.PI*t.r/180),"px")).attr("y",(function(n,e){return 0===t.r||"top"===t.vA?"".concat((e+1)*t.lH-(t.lH-t.fS),"px"):"middle"===t.vA?"".concat((t.h+t.fS)/2-(t.lH-t.fS)+(e-t.lines.length/2+.5)*t.lH,"px"):"".concat(t.h-2*(t.lH-t.fS)-(t.lines.length-(e+1))*t.lH+2*Math.cos(Math.PI*t.r/180),"px")}))}var o=$f(this).selectAll("text").data(t.lines);0===e._duration?(o.call(n).call(i),o.exit().remove(),o.enter().append("text").attr("dominant-baseline","alphabetic").style("baseline-shift","0%").attr("unicode-bidi","bidi-override").call(n).call(i).attr("opacity",t.fO).style("opacity",t.fO)):(o.call(n).transition(r).call(i),o.exit().transition(r).attr("opacity",0).remove(),o.enter().append("text").attr("dominant-baseline","alphabetic").style("baseline-shift","0%").attr("opacity",0).style("opacity",0).call(n).call(i).merge(o).transition(r).delay(e._delay).call(i).attr("opacity",t.fO).style("opacity",t.fO))})).transition(r).call(o);for(var l=Object.keys(this._on),s=l.reduce((function(t,e){return t[e]=function(t,i){return n._on[e](t.data,i)},t}),{}),c=0;ct.length)&&(n=t.length);for(var e=0,i=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw o}}}}var wv={circles:function(){var t=20,n="",e=2,i=!1,r="#343434",o="#343434",a=0,u=yv(),l=function(l){var s=l.append("defs").append("pattern").attr("id",u).attr("patternUnits","userSpaceOnUse").attr("width",t).attr("height",t);if(n&&s.append("rect").attr("width",t).attr("height",t).attr("fill",n),s.append("circle").attr("cx",t/2).attr("cy",t/2).attr("r",e).attr("fill",r).attr("stroke",o).attr("stroke-width",a),i)for(var c=0,h=[[0,0],[0,t],[t,0],[t,t]];c0&&void 0!==arguments[0]?arguments[0]:"g";return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this))._activeOpacity=.25,t._activeStyle={stroke:function(n,e){var i=t._fill(n,e);return["transparent","none"].includes(i)&&(i=t._stroke(n,e)),Jg(i).darker(1)},"stroke-width":function(n,e){return 3*(t._strokeWidth(n,e)||1)}},t._ariaLabel=Bh(""),t._backgroundImage=Bh(!1),t._backgroundImageClass=new Ly,t._data=[],t._duration=600,t._fill=Bh("black"),t._fillOpacity=Bh(1),t._hoverOpacity=.5,t._hoverStyle={stroke:function(n,e){var i=t._fill(n,e);return["transparent","none"].includes(i)&&(i=t._stroke(n,e)),Jg(i).darker(.5)},"stroke-width":function(n,e){return 2*(t._strokeWidth(n,e)||1)}},t._id=function(t,n){return void 0!==t.id?t.id:n},t._label=Bh(!1),t._labelClass=new _v,t._labelConfig={fontColor:function(n,e){return zy(t._fill(n,e))},fontSize:12,padding:5},t._name="Shape",t._opacity=Bh(1),t._pointerEvents=Bh("visiblePainted"),t._role=Bh("presentation"),t._rotate=Bh(0),t._rx=Bh(0),t._ry=Bh(0),t._scale=Bh(1),t._shapeRendering=Bh("geometricPrecision"),t._stroke=function(n,e){return Jg(t._fill(n,e)).darker(1).formatHex()},t._strokeDasharray=Bh("0"),t._strokeLinecap=Bh("butt"),t._strokeOpacity=Bh(1),t._strokeWidth=Bh(0),t._tagName=n,t._textAnchor=Bh("start"),t._texture=Bh(!1),t._textureDefault={},t._textureDefs={},t._vectorEffect=Bh("non-scaling-stroke"),t._verticalAlign=Bh("top"),t._x=ch("x",0),t._y=ch("y",0),t}return n=o,e=[{key:"_aes",value:function(){return{}}},{key:"_applyEvents",value:function(t){for(var n=this,e=Object.keys(this._on),i=function(i){t.on(e[i],(function(t,r,o){if(n._on[e[i]]){if(void 0!==r.i&&(o=r.i),r.nested&&r.values){var a=Vf(t,n._select.node()),u=r.values.map((function(t){return xv(a,function(t,e){return"x"===n._discrete?[n._x(t,e),a[1]]:"y"===n._discrete?[a[0],n._y(t,e)]:[n._x(t,e),n._y(t,e)]}(t,o))}));o=u.indexOf(qt(u)),r=r.values[o]}n._on[e[i]].bind(n)(r,o,void 0,t)}}))},r=0;r *, g.d3plus-").concat(this._name,"-active > *")).each((function(t){t&&t.parentNode?t.parentNode.appendChild(this):this.parentNode.removeChild(this)})),this._group=sp("g.d3plus-".concat(this._name,"-group"),{parent:this._select});var a=this._update=sp("g.d3plus-".concat(this._name,"-shape"),{parent:this._group,update:{opacity:this._active?this._activeOpacity:1}}).selectAll(".d3plus-".concat(this._name)).data(e,i);a.order(),this._duration?a.transition(this._transition).call(this._applyTransform.bind(this)):a.call(this._applyTransform.bind(this));var u=(this._enter=a.enter().append(this._tagName).attr("class",(function(t,e){return"d3plus-Shape d3plus-".concat(n._name," d3plus-id-").concat(nv(n._nestWrapper(n._id)(t,e)))})).call(this._applyTransform.bind(this)).attr("aria-label",this._ariaLabel).attr("role",this._role).attr("opacity",this._nestWrapper(this._opacity))).merge(a),l=u.attr("shape-rendering",this._nestWrapper(this._shapeRendering));this._duration&&(l=l.attr("pointer-events","none").transition(this._transition).transition().delay(100).attr("pointer-events",this._pointerEvents)),l.attr("opacity",this._nestWrapper(this._opacity));var s=this._exit=a.exit();this._duration?s.transition().delay(this._duration).remove():s.remove(),this._renderImage(),this._renderLabels(),this._hoverGroup=sp("g.d3plus-".concat(this._name,"-hover"),{parent:this._group}),this._activeGroup=sp("g.d3plus-".concat(this._name,"-active"),{parent:this._group});var c=this._group.selectAll(".d3plus-HitArea").data(this._hitArea&&Object.keys(this._on).length?e:[],i);c.order().call(this._applyTransform.bind(this));var h="Line"===this._name;if(h){var f=this._curve.bind(this)(this.config());h&&this._path.curve(Oy["curve".concat(f.charAt(0).toUpperCase()).concat(f.slice(1))]).defined(this._defined).x(this._x).y(this._y)}var g=c.enter().append(h?"path":"rect").attr("class",(function(t,e){return"d3plus-HitArea d3plus-id-".concat(nv(n._nestWrapper(n._id)(t,e)))})).attr("fill","black").attr("stroke","black").attr("pointer-events","painted").attr("opacity",0).call(this._applyTransform.bind(this)),d=this,p=c.merge(g).each((function(t){var n=d._data.indexOf(t),e=d._hitArea(t,n,d._aes(t,n));return!e||"Line"===d._name&&parseFloat(d._strokeWidth(t,n))>10?$f(this).remove():$f(this).call(dh,e)}));return c.exit().remove(),this._applyEvents(this._hitArea?p:u),setTimeout((function(){n._active?n._renderActive():n._hover&&n._renderHover(),t&&t()}),this._duration+100),this}},{key:"active",value:function(t){return arguments.length&&void 0!==t?(this._active=t,this._group&&this._renderActive(),this):this._active}},{key:"activeOpacity",value:function(t){return arguments.length?(this._activeOpacity=t,this):this._activeOpacity}},{key:"activeStyle",value:function(t){return arguments.length?(this._activeStyle=gh({},this._activeStyle,t),this):this._activeStyle}},{key:"ariaLabel",value:function(t){return void 0!==t?(this._ariaLabel="function"==typeof t?t:Bh(t),this):this._ariaLabel}},{key:"backgroundImage",value:function(t){return arguments.length?(this._backgroundImage="function"==typeof t?t:Bh(t),this):this._backgroundImage}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"discrete",value:function(t){return arguments.length?(this._discrete=t,this):this._discrete}},{key:"duration",value:function(t){return arguments.length?(this._duration=t,this):this._duration}},{key:"fill",value:function(t){return arguments.length?(this._fill="function"==typeof t?t:Bh(t),this):this._fill}},{key:"fillOpacity",value:function(t){return arguments.length?(this._fillOpacity="function"==typeof t?t:Bh(t),this):this._fillOpacity}},{key:"hover",value:function(t){return arguments.length&&void 0!==t?(this._hover=t,this._group&&this._renderHover(),this):this._hover}},{key:"hoverStyle",value:function(t){return arguments.length?(this._hoverStyle=gh({},this._hoverStyle,t),this):this._hoverStyle}},{key:"hoverOpacity",value:function(t){return arguments.length?(this._hoverOpacity=t,this):this._hoverOpacity}},{key:"hitArea",value:function(t){return arguments.length?(this._hitArea="function"==typeof t?t:Bh(t),this):this._hitArea}},{key:"id",value:function(t){return arguments.length?(this._id=t,this):this._id}},{key:"label",value:function(t){return arguments.length?(this._label="function"==typeof t?t:Bh(t),this):this._label}},{key:"labelBounds",value:function(t){return arguments.length?(this._labelBounds="function"==typeof t?t:Bh(t),this):this._labelBounds}},{key:"labelConfig",value:function(t){return arguments.length?(this._labelConfig=gh(this._labelConfig,t),this):this._labelConfig}},{key:"opacity",value:function(t){return arguments.length?(this._opacity="function"==typeof t?t:Bh(t),this):this._opacity}},{key:"pointerEvents",value:function(t){return arguments.length?(this._pointerEvents="function"==typeof t?t:Bh(t),this):this._pointerEvents}},{key:"role",value:function(t){return void 0!==t?(this._role="function"==typeof t?t:Bh(t),this):this._role}},{key:"rotate",value:function(t){return arguments.length?(this._rotate="function"==typeof t?t:Bh(t),this):this._rotate}},{key:"rx",value:function(t){return arguments.length?(this._rx="function"==typeof t?t:Bh(t),this):this._rx}},{key:"ry",value:function(t){return arguments.length?(this._ry="function"==typeof t?t:Bh(t),this):this._ry}},{key:"scale",value:function(t){return arguments.length?(this._scale="function"==typeof t?t:Bh(t),this):this._scale}},{key:"select",value:function(t){return arguments.length?(this._select=$f(t),this):this._select}},{key:"shapeRendering",value:function(t){return arguments.length?(this._shapeRendering="function"==typeof t?t:Bh(t),this):this._shapeRendering}},{key:"sort",value:function(t){return arguments.length?(this._sort=t,this):this._sort}},{key:"stroke",value:function(t){return arguments.length?(this._stroke="function"==typeof t?t:Bh(t),this):this._stroke}},{key:"strokeDasharray",value:function(t){return arguments.length?(this._strokeDasharray="function"==typeof t?t:Bh(t),this):this._strokeDasharray}},{key:"strokeLinecap",value:function(t){return arguments.length?(this._strokeLinecap="function"==typeof t?t:Bh(t),this):this._strokeLinecap}},{key:"strokeOpacity",value:function(t){return arguments.length?(this._strokeOpacity="function"==typeof t?t:Bh(t),this):this._strokeOpacity}},{key:"strokeWidth",value:function(t){return arguments.length?(this._strokeWidth="function"==typeof t?t:Bh(t),this):this._strokeWidth}},{key:"textAnchor",value:function(t){return arguments.length?(this._textAnchor="function"==typeof t?t:Bh(t),this):this._textAnchor}},{key:"texture",value:function(t){return arguments.length?(this._texture="function"==typeof t?t:Bh(t),this):this._texture}},{key:"textureDefault",value:function(t){return arguments.length?(this._textureDefault=gh(this._textureDefault,t),this):this._textureDefault}},{key:"vectorEffect",value:function(t){return arguments.length?(this._vectorEffect="function"==typeof t?t:Bh(t),this):this._vectorEffect}},{key:"verticalAlign",value:function(t){return arguments.length?(this._verticalAlign="function"==typeof t?t:Bh(t),this):this._verticalAlign}},{key:"x",value:function(t){return arguments.length?(this._x="function"==typeof t?t:Bh(t),this):this._x}},{key:"y",value:function(t){return arguments.length?(this._y="function"==typeof t?t:Bh(t),this):this._y}}],e&&Cv(n.prototype,e),i&&Cv(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Th);function Ov(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function Pv(t){return Pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pv(t)}function jv(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Bv(){return Bv=Object.assign||function(t){for(var n=1;nt.length)&&(n=t.length);for(var e=0,i=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw o}}}}function Nv(t,n){var e=[],i=[];return t.length&&function t(n,r){if(1===n.length)e.push(n[0]),i.push(n[0]);else{for(var o=Array(n.length-1),a=0;a=3&&(n.x1=t[1][0],n.y1=t[1][1]),n.x=t[t.length-1][0],n.y=t[t.length-1][1],4===t.length?n.type="C":3===t.length?n.type="Q":n.type="L",n}function Fv(t,n,e){var i=[[t.x,t.y]];return null!=n.x1&&i.push([n.x1,n.y1]),null!=n.x2&&i.push([n.x2,n.y2]),i.push([n.x,n.y]),function(t,n){for(var e=[],i=t,r=1/(n=n||2),o=0;o0?a-=1:a0&&(a-=1))}return n[a]=(n[a]||0)+1,n}),[]).reduce((function(n,e,i){if(i===t.length-1){var r=Hv(e,Bv({},t[t.length-1]));return"M"===r[0].type&&r.forEach((function(t){t.type="L"})),n.concat(r)}return n.concat(function(t,n,e){var i=[];if("L"===n.type||"Q"===n.type||"C"===n.type)i=i.concat(Fv(t,n,e));else{var r=Bv({},t);"M"===r.type&&(r.type="L"),(i=i.concat(Hv(e-1).map((function(){return r})))).push(n)}return i}(t[i],t[i+1],e))}),[]);return a.unshift(t[0]),a}function Uv(t){for(var n,e,i=(t||"").match(Lv)||[],r=[],o=0;o0&&"Z"===i[i.length-1].type&&i.pop(),r.length>0&&"Z"===r[r.length-1].type&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]),0!==Math.abs(r.length-i.length)&&(r.length>i.length?i=Kv(i,r,a):r.lengthu!=s>u&&a<(l-e)*(u-i)/(s-i)+e&&(c=!c),l=e,s=i;return c}function Yv(t,n,e,i){var r=t[0]-n[0],o=e[0]-i[0],a=t[1]-n[1],u=e[1]-i[1],l=r*u-a*o;if(Math.abs(l)<1e-9)return null;var s=t[0]*n[1]-t[1]*n[0],c=e[0]*i[1]-e[1]*i[0];return[(s*o-c*r)/l,(s*u-c*a)/l]}function Vv(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,o,a,u=[],l=!0,s=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(t){if("string"==typeof t)return Zv(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Zv(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zv(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);eMath.max(t[0],n[0])+i||aMath.max(t[1],n[1])+i)}function Jv(t,n,e,i){var r=Yv(t,n,e,i);return!!r&&Xv(t,n,r)&&Xv(e,i,r)}function Qv(t,n){for(var e=-1,i=t.length,r=n.length,o=t[i-1];++et.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:0,i=1e-9,r=tb(n=[n[0]+i*Math.cos(e),n[1]+i*Math.sin(e)],2),o=r[0],a=r[1],u=[o+Math.cos(e),a+Math.sin(e)],l=0;Math.abs(u[0]-o)n[l]&&y2&&void 0!==arguments[2]?arguments[2]:[0,0],i=Math.cos(n),r=Math.sin(n),o=t[0]-e[0],a=t[1]-e[1];return[i*o-r*a+e[0],r*o+i*a+e[1]]}Object.keys(Iv).forEach((function(t){Iv[t.toLowerCase()]=Iv[t]}));const rb=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0];return t.map((function(t){return ib(t,n,e)}))};function ob(t,n,e){var i=n[0],r=n[1],o=e[0]-i,a=e[1]-r;if(0!==o||0!==a){var u=((t[0]-i)*o+(t[1]-r)*a)/(o*o+a*a);u>1?(i=e[0],r=e[1]):u>0&&(i+=o*u,r+=a*u)}return(o=t[0]-i)*o+(a=t[1]-r)*a}function ab(t,n,e,i,r){for(var o,a=i,u=n+1;ua&&(o=u,a=l)}a>i&&(o-n>1&&ab(t,n,o,i,r),r.push(t[o]),e-o>1&&ab(t,o,e,i,r))}function ub(t,n){var e=t.length-1,i=[t[0]];return ab(t,0,e,n,i),i.push(t[e]),i}const lb=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.length<=2)return t;var i=n*n;return t=e?t:function(t,n){for(var e,i=t[0],r=[i],o=1,a=t.length;on&&(r.push(e),i=e);return i!==e&&r.push(e),r}(t,i),t=ub(t,i)};function sb(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,o,a,u=[],l=!0,s=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(t){if("string"==typeof t)return cb(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?cb(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cb(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e1&&void 0!==arguments[1]?arguments[1]:{};if(t.length<3)return n.verbose&&console.error("polygon has to have at least 3 points",t),null;var e,i=[],r=(n=Object.assign({angle:Xt(-90,95,5),cache:!0,maxAspectRatio:15,minAspectRatio:1,minHeight:0,minWidth:0,nTries:20,tolerance:.02,verbose:!1},n)).angle instanceof Array?n.angle:"number"==typeof n.angle?[n.angle]:"string"!=typeof n.angle||isNaN(n.angle)?[]:[Number(n.angle)],o=n.aspectRatio instanceof Array?n.aspectRatio:"number"==typeof n.aspectRatio?[n.aspectRatio]:"string"!=typeof n.aspectRatio||isNaN(n.aspectRatio)?[]:[Number(n.aspectRatio)],a=n.origin&&n.origin instanceof Array?n.origin[0]instanceof Array?n.origin:[n.origin]:[];if(n.cache&&(e=Zt(t).join(","),e+="-".concat(n.minAspectRatio),e+="-".concat(n.maxAspectRatio),e+="-".concat(n.minHeight),e+="-".concat(n.minWidth),e+="-".concat(r.join(",")),e+="-".concat(a.join(",")),hb[e]))return hb[e];var u=Math.abs(function(t){for(var n,e=-1,i=t.length,r=t[i-1],o=0;++e0&&(t=lb(t,d)),n.events&&i.push({type:"simplify",poly:t});var p=sb(Mt(t,(function(t){return t[0]})),2);s=p[0],c=p[1];var m=sb(Mt(t,(function(t){return t[1]})),2);f=m[0];var _=c-s,y=(g=m[1])-f,v=Math.min(_,y)/50;if(!a.length){var b=function(t){for(var n,e,i=-1,r=t.length,o=0,a=0,u=t[r-1],l=0;++i=v&&i.push({type:"aRatio",aRatio:X});Q-J>=v;){var tt=(J+Q)/2,nt=tt/X,et=sb(F,2),it=et[0],rt=et[1],ot=[[it-tt/2,rt-nt/2],[it+tt/2,rt-nt/2],[it+tt/2,rt+nt/2],[it-tt/2,rt+nt/2]],at=Qv(ot=rb(ot,E,F),t);at?(x=tt*nt,ot.push(ot[0]),k={area:x,cx:it,cy:rt,width:tt,height:nt,angle:-A,points:ot},J=tt):Q=tt,n.events&&i.push({type:"rectangle",areaFraction:tt*nt/u,cx:it,cy:rt,width:tt,height:nt,angle:A,insidePoly:at})}}}}}}}}return n.cache&&(hb[e]=k),n.events?Object.assign(k||{},{events:i}):k}function gb(t){return gb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gb(t)}function db(t,n){for(var e=0;er[0][1]&&(o=o.reverse()),o.push(o[0]),{points:o}}},{key:"_dataFilter",value:function(t){var n=this,e=_p().key(this._id).entries(t).map((function(e){e.data=hp(e.values),e.i=t.indexOf(e.values[0]);var i=Mt(e.values.map(n._x).concat(e.values.map(n._x0)).concat(n._x1?e.values.map(n._x1):[]));e.xR=i,e.width=i[1]-i[0],e.x=i[0]+e.width/2;var r=Mt(e.values.map(n._y).concat(e.values.map(n._y0)).concat(n._y1?e.values.map(n._y1):[]));return e.yR=r,e.height=r[1]-r[0],e.y=r[0]+e.height/2,e.nested=!0,e.translate=[e.x,e.y],e.__d3plusShape__=!0,e}));return e.key=function(t){return t.key},e}},{key:"render",value:function(t){var n=this;pb(yb(o.prototype),"render",this).call(this,t);var e=this._curve.bind(this)(this.config()),i=Oy["curve".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))],r=this._path=Xm().defined(this._defined).curve(i).x(this._x).x0(this._x0).x1(this._x1).y(this._y).y0(this._y0).y1(this._y1),a=Xm().defined((function(t){return t})).curve(i).x(this._x).y(this._y).x0((function(t,e){return n._x1?n._x0(t,e)+(n._x1(t,e)-n._x0(t,e))/2:n._x0(t,e)})).x1((function(t,e){return n._x1?n._x0(t,e)+(n._x1(t,e)-n._x0(t,e))/2:n._x0(t,e)})).y0((function(t,e){return n._y1?n._y0(t,e)+(n._y1(t,e)-n._y0(t,e))/2:n._y0(t,e)})).y1((function(t,e){return n._y1?n._y0(t,e)+(n._y1(t,e)-n._y0(t,e))/2:n._y0(t,e)}));return this._enter.append("path").attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).attr("d",(function(t){return a(t.values)})).call(this._applyStyle.bind(this)).transition(this._transition).attrTween("d",(function(t){return Wv($f(this).attr("d"),r(t.values))})),this._update.select("path").transition(this._transition).attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).attrTween("d",(function(t){return Wv($f(this).attr("d"),r(t.values))})).call(this._applyStyle.bind(this)),this._exit.select("path").transition(this._transition).attrTween("d",(function(t){return Wv($f(this).attr("d"),a(t.values))})),this}},{key:"curve",value:function(t){return arguments.length?(this._curve="function"==typeof t?t:Bh(t),this):this._curve}},{key:"defined",value:function(t){return arguments.length?(this._defined=t,this):this._defined}},{key:"x",value:function(t){return arguments.length?(this._x="function"==typeof t?t:Bh(t),this._x0=this._x,this):this._x}},{key:"x0",value:function(t){return arguments.length?(this._x0="function"==typeof t?t:Bh(t),this._x=this._x0,this):this._x0}},{key:"x1",value:function(t){return arguments.length?(this._x1="function"==typeof t||null===t?t:Bh(t),this):this._x1}},{key:"y",value:function(t){return arguments.length?(this._y="function"==typeof t?t:Bh(t),this._y0=this._y,this):this._y}},{key:"y0",value:function(t){return arguments.length?(this._y0="function"==typeof t?t:Bh(t),this._y=this._y0,this):this._y0}},{key:"y1",value:function(t){return arguments.length?(this._y1="function"==typeof t||null===t?t:Bh(t),this):this._y1}}],e&&db(n.prototype,e),i&&db(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Tv);function bb(t){return bb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(t)}function wb(t,n){for(var e=0;e=t.initialLength)break}i.length>1&&i.length%2&&i.pop(),i[i.length-1]+=t.initialLength-Jt(i),i.length%2==0&&i.push(0),t.initialStrokeArray=i.join(" ")}var r=this._curve.bind(this)(this.config()),a=Oy["curve".concat(r.charAt(0).toUpperCase()).concat(r.slice(1))];this._path.curve(a).defined(this._defined).x(this._x).y(this._y);var u=this._enter.append("path").attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).attr("d",(function(t){return n._path(t.values)})).call(this._applyStyle.bind(this)),l=this._update.select("path").attr("stroke-dasharray",(function(t){return e._strokeDasharray(t.values[0],e._data.indexOf(t.values[0]))}));return this._duration?(u.each(i).attr("stroke-dasharray",(function(t){return"".concat(t.initialStrokeArray," ").concat(t.initialLength)})).attr("stroke-dashoffset",(function(t){return t.initialLength})).transition(this._transition).attr("stroke-dashoffset",0),l=l.transition(this._transition).attrTween("d",(function(t){return Wv($f(this).attr("d"),e._path(t.values))})),this._exit.selectAll("path").each(i).attr("stroke-dasharray",(function(t){return"".concat(t.initialStrokeArray," ").concat(t.initialLength)})).transition(this._transition).attr("stroke-dashoffset",(function(t){return-t.initialLength}))):l=l.attr("d",(function(t){return e._path(t.values)})),l.attr("transform",(function(t){return"translate(".concat(-t.xR[0]-t.width/2,", ").concat(-t.yR[0]-t.height/2,")")})).call(this._applyStyle.bind(this)),this}},{key:"_aes",value:function(t,n){var e=this;return{points:t.values.map((function(t){return[e._x(t,n),e._y(t,n)]}))}}},{key:"curve",value:function(t){return arguments.length?(this._curve="function"==typeof t?t:Bh(t),this):this._curve}},{key:"defined",value:function(t){return arguments.length?(this._defined=t,this):this._defined}}],e&&Gb(n.prototype,e),i&&Gb(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Tv);function Yb(t){return Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yb(t)}function Vb(t,n){for(var e=0;eUt(i)&&(e.upperLimit=Ut(i))):"extent"===r[1]?e.upperLimit=Ut(i):"number"==typeof r[1]&&(e.upperLimit=Yt(i,r[1]));var o=e.third-e.first;return"vertical"===e.orient?(e.height=o,e.width=t._rectWidth(e.data,e.i),e.x=t._x(e.data,e.i),e.y=e.first+o/2):"horizontal"===e.orient&&(e.height=t._rectWidth(e.data,e.i),e.width=o,e.x=e.first+o/2,e.y=t._y(e.data,e.i)),e.values.forEach((function(i,r){var o="vertical"===e.orient?t._y(i,r):t._x(i,r);if(oe.upperLimit){var a={__d3plus__:!0};a.data=i,a.i=r,a.outlier=t._outlier(i,r),"vertical"===e.orient?(a.x=e.x,a.y=o,n.push(a)):"horizontal"===e.orient&&(a.y=e.y,a.x=o,n.push(a))}})),e.__d3plus__=!0,e}));this._box=(new Ib).data(e).x((function(t){return t.x})).y((function(t){return t.y})).select(sp("g.d3plus-Box",{parent:this._select}).node()).config(jh.bind(this)(this._rectConfig,"shape")).render(),this._median=(new Ib).data(e).x((function(t){return"vertical"===t.orient?t.x:t.median})).y((function(t){return"vertical"===t.orient?t.median:t.y})).height((function(t){return"vertical"===t.orient?1:t.height})).width((function(t){return"vertical"===t.orient?t.width:1})).select(sp("g.d3plus-Box-Median",{parent:this._select}).node()).config(jh.bind(this)(this._medianConfig,"shape")).render();var i=[];return e.forEach((function(t,n){var e=t.x,r=t.y,o=t.first-t.lowerLimit,a=t.upperLimit-t.third;if("vertical"===t.orient){var u=r-t.height/2,l=r+t.height/2;i.push({__d3plus__:!0,data:t,i:n,x:e,y:u,length:o,orient:"top"},{__d3plus__:!0,data:t,i:n,x:e,y:l,length:a,orient:"bottom"})}else if("horizontal"===t.orient){var s=e+t.width/2,c=e-t.width/2;i.push({__d3plus__:!0,data:t,i:n,x:s,y:r,length:a,orient:"right"},{__d3plus__:!0,data:t,i:n,x:c,y:r,length:o,orient:"left"})}})),this._whisker=(new tw).data(i).select(sp("g.d3plus-Box-Whisker",{parent:this._select}).node()).config(jh.bind(this)(this._whiskerConfig,"shape")).render(),this._whiskerEndpoint=[],_p().key((function(t){return t.outlier})).entries(n).forEach((function(n){var e=n.key;t._whiskerEndpoint.push((new aw[e]).data(n.values).select(sp("g.d3plus-Box-Outlier-".concat(e),{parent:t._select}).node()).config(jh.bind(t)(t._outlierConfig,"shape",e)).render())})),this}},{key:"active",value:function(t){this._box&&this._box.active(t),this._median&&this._median.active(t),this._whisker&&this._whisker.active(t),this._whiskerEndpoint&&this._whiskerEndpoint.forEach((function(n){return n.active(t)}))}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"hover",value:function(t){this._box&&this._box.hover(t),this._median&&this._median.hover(t),this._whisker&&this._whisker.hover(t),this._whiskerEndpoint&&this._whiskerEndpoint.forEach((function(n){return n.hover(t)}))}},{key:"medianConfig",value:function(t){return arguments.length?(this._medianConfig=gh(this._medianConfig,t),this):this._medianConfig}},{key:"orient",value:function(t){return arguments.length?(this._orient="function"==typeof t?t:Bh(t),this):this._orient}},{key:"outlier",value:function(t){return arguments.length?(this._outlier="function"==typeof t?t:Bh(t),this):this._outlier}},{key:"outlierConfig",value:function(t){return arguments.length?(this._outlierConfig=gh(this._outlierConfig,t),this):this._outlierConfig}},{key:"rectConfig",value:function(t){return arguments.length?(this._rectConfig=gh(this._rectConfig,t),this):this._rectConfig}},{key:"rectWidth",value:function(t){return arguments.length?(this._rectWidth="function"==typeof t?t:Bh(t),this):this._rectWidth}},{key:"select",value:function(t){return arguments.length?(this._select=$f(t),this):this._select}},{key:"whiskerConfig",value:function(t){return arguments.length?(this._whiskerConfig=gh(this._whiskerConfig,t),this):this._whiskerConfig}},{key:"whiskerMode",value:function(t){return arguments.length?(this._whiskerMode=t instanceof Array?t:[t,t],this):this._whiskerMode}},{key:"x",value:function(t){return arguments.length?(this._x="function"==typeof t?t:ch(t),this):this._x}},{key:"y",value:function(t){return arguments.length?(this._y="function"==typeof t?t:ch(t),this):this._y}}],e&&ew(n.prototype,e),i&&ew(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Th);const lw=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;if("undefined"==typeof document)return[];var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",t);for(var i=e.getTotalLength(),r=i/n<10?i/10:i/n,o=[],a=0;a2&&void 0!==arguments[2]?arguments[2]:"circle";if(t<0&&(t=2*mw+t),"square"===e){var i=mw/180*45,r=0,o=0;if(t5&&t%1==0)return new Date(t);var n="".concat(t),e=new RegExp(/^\d{1,2}[./-]\d{1,2}[./-](-*\d{1,4})$/g).exec(n);if(e){var i=e[1];0===i.indexOf("-")&&(n=n.replace(i,i.substring(1)));var r=new Date(n);return r.setFullYear(i),r}var o=new RegExp(/^[A-z]{1,3} [A-z]{1,3} \d{1,2} (-*\d{1,4}) \d{1,2}:\d{1,2}:\d{1,2} [A-z]{1,3}-*\d{1,4} \([A-z]{1,3}\)/g).exec(n);if(o){var a=o[1];0===a.indexOf("-")&&(n=n.replace(a,a.substring(1)));var u=new Date(n);return u.setFullYear(a),u}var l=new RegExp(/^([qQ]{1}[1-4]{1}|[1-4]{1}[qQ]{1})[\s|-]{0,1}(-*\d{1,4})$/g).exec(n),s=new RegExp(/^(-*\d{1,4})[\s|-]{0,1}([qQ]{1}[1-4]{1}|[1-4]{1}[qQ]{1})$/g).exec(n);if(l||s){var c=+(l?l[1]:s[2]).toLowerCase().replace("q",""),h=+(l?l[2]:s[1]),f=new Date(h,3*c-3,1);return f.setFullYear(h),f}if(!(n.includes("/")||n.includes(" ")||n.includes("-")&&n.indexOf("-"))){var g=new Date(+n,0,1);return g.setFullYear(t),g}return new Date(n)}const vw={"ar-SA":{dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",quarter:"الربع",periods:["صباحًا","مساءً"],days:["الأحد","الأثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],shortDays:["الأحد","الأثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],months:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],shortMonths:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},"de-DE":{dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",quarter:"Q",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]},"en-GB":{dateTime:"%a %e %b %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"Q",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},"en-US":{dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",quarter:"Q",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},"es-ES":{dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]},"es-MX":{dateTime:"%x, %X",date:"%d/%m/%Y",time:"%-I:%M:%S %p",quarter:"T",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]},"fr-FR":{dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]},"it-IT":{dateTime:"%A %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]},"pt-BR":{dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",quarter:"T",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}};function bw(t,n,e){return(n=Ew(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function ww(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,o,a,u=[],l=!0,s=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(t,n)||xw(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sw(t){return function(t){if(Array.isArray(t))return kw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||xw(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xw(t,n){if(t){if("string"==typeof t)return kw(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?kw(t,n):void 0}}function kw(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e1&&void 0!==arguments[1]&&arguments[1],e=Hp().domain([200,1200]).range([8,28]),i=t.range(),r=Math.abs(i[1]-i[0]),o=Math.floor(e(r));if("time"===this._scale)if(this._data&&this._data.length){var a=Mt(this._data),u=this._data.reduce((function(t,n,e,i){if(e){var r=Math.abs(n-i[e-1]);r1&&void 0!==arguments[1]&&arguments[1],e=[],i=Bw.bind(this)(t,n),r=this._data.length?Mt(this._data):t.domain();if(n||"log"!==this._scale){if(e=t.ticks(i),!n&&!["log","time"].includes(this._scale)&&e.length>1){var o=2*(e[1]-e[0]);e=e.filter((function(t){return t%o==0}))}}else{var a=r.map((function(t){return Math.log10(t)%1==0?t:Pw(t)})).map((function(t){return(t<0?-1:1)*Math.log10(Math.abs(t))})),u=Math.ceil((Math.abs(a[1]-a[0])+1)/(.75*i));e=a.every((function(t){return!t}))?t.ticks(i):Xt(a[0],a[1],a[1]0?1:-1)).replace(/9+/g,"1")}))}if(n)e.map(Number).includes(+r[0])||e.unshift(r[0]),e.map(Number).includes(+r[1])||e.push(r[1]);else if("time"===this._scale)e.map(Number).includes(+r[0])||(e[0]=r[0]),e.map(Number).includes(+r[1])||(e[e.length-1]=r[1]);else if("log"!==this._scale){var l=e.reduce((function(t,n,e,i){return e&&t.5*l&&e.unshift(r[0]),e.map(Number).includes(+r[1])||r[1]-e[e.length-1]>.5*l&&e.push(r[1])}if(this._data.length){var s=this._data.map(Number);e=e.filter((function(t){return s.includes(+t)}))}return e}var zw=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Mw(t,n)}(o,t);var n,e,i,r=Tw(o);function o(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this))._align="middle",t._barConfig={stroke:"#999","stroke-width":1},t._data=[],t._domain=[0,10],t._duration=600,t._gridConfig={stroke:"#eee","stroke-width":1},t._gridLog=!1,t._height=400,t._labelOffset=!1,t._labelRotation=!1,t.orient("bottom"),t._outerBounds={width:0,height:0,x:0,y:0},t._padding=5,t._paddingInner=.1,t._paddingOuter=.1,t._rounding="none",t._scale="linear",t._scalePadding=.5,t._shape="Line",t._shapeConfig={fill:"#999",height:function(t){return t.tick?8:0},label:function(t){return t.text},labelBounds:function(t){return t.labelBounds},labelConfig:{fontColor:"#999",fontFamily:(new _v).fontFamily(),fontResize:!1,fontSize:Bh(14),padding:5,textAnchor:function(){var n=Jy(t._select.node());return"left"===t._orient?n?"start":"end":"right"===t._orient?n?"end":"start":t._labelRotation?"bottom"===t._orient?"end":"start":"middle"},verticalAlign:function(){return"bottom"===t._orient?"top":"top"===t._orient?"bottom":"middle"}},r:function(t){return t.tick?4:0},stroke:"#999",strokeWidth:1,width:function(t){return t.tick?8:0}},t._tickSize=8,t._tickSuffix="normal",t._tickUnit=0,t._timeLocale=void 0,t._titleClass=new _v,t._titleConfig={fontColor:By.dark,fontSize:12,textAnchor:"middle"},t._width=400,t}return n=o,e=[{key:"_barPosition",value:function(t){var n=this._position,e=n.height,i=n.x,r=n.y,o=n.opposite,a=this._margin[o],u=["top","left"].includes(this._orient)?this._outerBounds[r]+this._outerBounds[e]-a:this._outerBounds[r]+a,l="band"===this._scale?this._d3Scale.step()-this._d3Scale.bandwidth():"point"===this._scale?this._d3Scale.step()*this._d3Scale.padding():0,s="band"===this._scale?this._d3Scale.step():"point"===this._scale?this._d3Scale.step()*this._d3Scale.padding():0,c=(this._d3ScaleNegative?this._d3ScaleNegative.domain():[]).concat(this._d3Scale?this._d3Scale.domain():[]).sort((function(t,n){return t-n}));t.call(dh,this._barConfig).attr("".concat(i,"1"),this._getPosition(c[0])-l).attr("".concat(i,"2"),this._getPosition(c[c.length-1])+s).attr("".concat(r,"1"),u).attr("".concat(r,"2"),u)}},{key:"_getDomain",value:function(){var t=[];this._d3ScaleNegative&&(t=this._d3ScaleNegative.domain()),this._d3Scale&&(t=t.concat(this._d3Scale.domain()));var n=["band","ordinal","point"].includes(this._scale)?t:Mt(t);return t[0]>t[1]?n.reverse():n}},{key:"_getPosition",value:function(t){return"log"===this._scale&&0===t?(this._d3Scale||this._d3ScaleNegative).range()[this._d3Scale?0:1]:("log"===this._scale&&t<0?this._d3ScaleNegative||function(){return 0}:this._d3Scale)(t)}},{key:"_getRange",value:function(){var t=[];return this._d3ScaleNegative&&(t=this._d3ScaleNegative.range()),this._d3Scale&&(t=t.concat(this._d3Scale.range())),t[0]>t[1]?Mt(t).reverse():Mt(t)}},{key:"_getLabels",value:function(){var t=[];return this._d3ScaleNegative&&(t=t.concat(Dw.bind(this)(this._d3ScaleNegative,!1))),this._d3Scale&&(t=t.concat(Dw.bind(this)(this._d3Scale,!1))),"log"===this._scale&&t.includes(-1)&&t.includes(1)&&t.splice(t.indexOf(-1),1),t}},{key:"_getTicks",value:function(){if(["band","ordinal","point","time"].includes(this._scale)&&this._data.length&&this._data.length1&&void 0!==arguments[1]&&arguments[1],e=this._position,i=e.height,r=e.x,o=e.y,a=e.opposite,u=this._margin[a],l=["top","left"].includes(this._orient)?this._outerBounds[o]+this._outerBounds[i]-u:this._outerBounds[o]+u,s=n&&this._lastScale||this._getPosition.bind(this),c=["top","left"].includes(this._orient)?u:-u,h="band"===this._scale?this._d3Scale.bandwidth()/2:0,f=function(t){return s(t.id)+h};t.call(dh,this._gridConfig).attr("".concat(r,"1"),f).attr("".concat(r,"2"),f).attr("".concat(o,"1"),l).attr("".concat(o,"2"),n?l:l+c)}},{key:"render",value:function(t){var n,e=this;void 0===this._select&&this.select($f("body").append("svg").attr("width","".concat(this._width,"px")).attr("height","".concat(this._height,"px")).node());var i=this._timeLocale||vw[this._locale]||vw["en-US"];Me(i).format();var r,o,a,s=this._position,c=s.width,h=s.height,f=s.x,g=s.y,d=s.horizontal,p=s.opposite,m="d3plus-Axis-clip-".concat(this._uuid),_=["top","left"].includes(this._orient),y=this._padding,v=this._select,b=[y,this["_".concat(c)]-y],w=rp().duration(this._duration),S="Circle"===this._shape?this._shapeConfig.r:"Rect"===this._shape?this._shapeConfig[c]:this._shapeConfig.strokeWidth,x="function"!=typeof S?function(){return S}:S,k=this._margin={top:0,right:0,bottom:0,left:0},C=this._tickFormat?this._tickFormat:function(t){if(isNaN(t)||["band","ordinal","point"].includes(e._scale))return t;if("time"===e._scale){var n=(e._data.length?e._data:e._domain).map(yw).sort((function(t,n){return+t-+n}));return Pe(t,n,sn).replace(/^Q/g,i.quarter)}if("linear"===e._scale&&"smallest"===e._tickSuffix){var r="object"===Cw(e._locale)?e._locale:u[e._locale],o=r.separator,a=r.suffixes,s=t>=1e3?a[e._tickUnit+8]:"",c=t/Math.pow(10,3*e._tickUnit),h=l(c,r,",.".concat(c.toString().length,"r"));return"".concat(h).concat(o).concat(s)}return l(t,e._locale)};function A(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._range;o=n?n.slice():[void 0,void 0];var e=b[0],i=b[1];this._range&&(void 0!==this._range[0]&&(e=this._range[0]),void 0!==this._range[this._range.length-1]&&(i=this._range[this._range.length-1])),(void 0===o[0]||o[0]i)&&(o[1]=i);var u=i-e;if("ordinal"===this._scale&&this._domain.length>o.length)if(n===this._range){var l=this._domain.length+1;o=(o=Xt(l).map((function(t){return o[0]+u*(t/(l-1))})).slice(1,l)).map((function(t){return t-o[0]/2}))}else{var s=this._domain.length,c=o[1]-o[0];o=Xt(s).map((function(t){return o[0]+c*(t/(s-1))}))}var h="scale".concat(this._scale.charAt(0).toUpperCase()).concat(this._scale.slice(1)),f=this._domain.slice();if(this._d3Scale=mm[h]().domain("time"===this._scale?f.map(yw):f).range(o),"none"!==this._rounding){var g=function(){var n=function(t){return"".concat(Math.round(Math.abs(t))).length},e=Math.max(n(f[0]),n(f[1]))-1,i=+"1".concat(Array(e).fill(0).join("")),r=f[1]1}))?this._d3Scale.domain(d):g.bind(this)()}}if(this._d3Scale.padding&&this._d3Scale.padding(this._scalePadding),this._d3Scale.paddingInner&&this._d3Scale.paddingInner(this._paddingInner),this._d3Scale.paddingOuter&&this._d3Scale.paddingOuter(this._paddingOuter),this._d3ScaleNegative=null,"log"===this._scale){var m=this._d3Scale.domain();if(0===m[0]){var _=qt([qt(this._data),Math.abs(m[1])]);m[0]=0===_||1===_?1e-6:_<=1?Pw(_):1,m[1]<0&&(m[0]*=-1)}else if(0===m[m.length-1]){var y=qt([qt(this._data),Math.abs(m[0])]);m[m.length-1]=0===y||1===y?1e-6:y<=1?Pw(y):1,m[0]<0&&(m[m.length-1]*=-1)}var v=this._d3Scale.range();if(m[0]<0&&m[m.length-1]<0)this._d3ScaleNegative=this._d3Scale.copy().domain(m).range(v),this._d3Scale=null;else if(m[0]>0&&m[m.length-1]>0)this._d3Scale.domain(m).range(v);else{var w=m.map((function(t){return Math.log10(Math.abs(t))})),S=w[0]/Jt(w)*(v[1]-v[0]),k=qt([qt(this._data.filter((function(t){return t>=0}))),Math.abs(m[1])]),C=qt([qt(this._data.filter((function(t){return t<0||Object.is(t,-0)}))),Math.abs(m[0])]),A=qt([0===k?1e-6:k<=1?Pw(k):1,0===C?-1e-6:C<=1?Pw(C):1]);this._d3ScaleNegative=this._d3Scale.copy(),(m[0]<0?this._d3Scale:this._d3ScaleNegative).domain([m[0]<0?A:-A,m[1]]).range([v[0]+S,v[1]]),(m[0]<0?this._d3ScaleNegative:this._d3Scale).domain([m[0],m[0]<0?-A:A]).range([v[0],v[0]+S])}}if(a=(this._ticks?"time"===this._scale?this._ticks.map(yw):this._ticks:(this._d3Scale?this._d3Scale.ticks:this._d3ScaleNegative.ticks)?this._getTicks():this._domain).slice(),r=(this._labels?"time"===this._scale?this._labels.map(yw):this._labels:(this._d3Scale?this._d3Scale.ticks:this._d3ScaleNegative.ticks)?this._getLabels():a).slice(),"time"===this._scale&&(a=a.map(Number),r=r.map(Number)),a=a.sort((function(n,e){return t._getPosition(n)-t._getPosition(e)})),r=r.sort((function(n,e){return t._getPosition(n)-t._getPosition(e)})),"linear"===this._scale&&"smallest"===this._tickSuffix){var E=r.filter((function(t){return t>=1e3}));if(E.length>0)for(var M=Math.min.apply(Math,Sw(E)),T=1;T&&T<7&&M/Math.pow(10,3*T)>=1;)this._tickUnit=T,T+=1}var O=[];this._availableTicks=a,a.forEach((function(n,e){var i=x({id:n,tick:!0},e);"Circle"===t._shape&&(i*=2);var r=t._getPosition(n);!O.length||Math.abs(Oh(r,O)-r)>2*i?O.push(r):O.push(!1)})),a=a.filter((function(t,n){return!1!==O[n]})),this._visibleTicks=a}function E(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,e=t.i,i=t.position;if("band"===this._scale)return this._d3Scale.bandwidth();var r=e-n<0?1===F.length?b[0]:i-(F[e+n].position-i):i-(i-F[e-n].position),o=Math.abs(i-r),a=e+n>F.length-1?1===F.length?b[1]:i+(i-F[e-n].position):i-(i-F[e+n].position);return qt([o,Math.abs(i-a)])}if(A.bind(this)(),this._title){var M=this._titleConfig,T=M.fontFamily,O=M.fontSize,P=M.lineHeight,j=cv().fontFamily("function"==typeof T?T():T).fontSize("function"==typeof O?O():O).lineHeight("function"==typeof P?P():P).width(o[o.length-1]-o[0]-2*y).height(this["_".concat(h)]-this._tickSize-2*y),B=j(this._title).lines.length;k[this._orient]=B*j.lineHeight()+y}var D="Circle"===this._shape?"function"==typeof this._shapeConfig.r?this._shapeConfig.r({tick:!0}):this._shapeConfig.r:"Rect"===this._shape?"function"==typeof this._shapeConfig[h]?this._shapeConfig[h]({tick:!0}):this._shapeConfig[h]:this._tickSize,z=x({tick:!0});function N(t){var n=t.d,e=t.i,i=t.fF,r=t.fP,o=t.fS,a=t.rotate,u=t.space,l=a?"width":"height",s=a?"height":"width",c=qt([this._maxSize,this._width]),h=qt([this._maxSize,this._height]),f=cv().fontFamily(i).fontSize(o).lineHeight(this._shapeConfig.lineHeight?this._shapeConfig.lineHeight(n,e):void 0);f[s](d?u:c-D-y-this._margin.left-this._margin.right),f[l](d?h-D-y-this._margin.top-this._margin.bottom:u);var g=f(C(n));return g.lines=g.lines.filter((function(t){return""!==t})),g.width=g.lines.length?Math.ceil(Ut(g.widths)):0,g.height=g.lines.length?Math.ceil(g.lines.length*f.lineHeight())+r:0,g}function R(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=0;t.forEach((function(e){var i=t[e.i-1],r=e.rotate&&d||!e.rotate&&!d?"width":"height",o=e.rotate&&d||!e.rotate&&!d?"height":"width";i?i.position+i[o]/2>e.position-e[o]/2&&(n?(e.offset=i[r],n=0):n=1):n=1}))}"function"==typeof D&&(D=Ut(a.map(D))),"Rect"===this._shape&&(D/=2),"function"==typeof z&&(z=Ut(a.map(z))),"Circle"!==this._shape&&(z/=2);var F=[];function L(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this._shapeConfig.labelConfig,i=e.fontFamily,o=e.fontSize,a=this._shapeConfig.labelConfig.padding;(F=r.map((function(n,e){var r="function"==typeof i?i(n,e):i,u="function"==typeof a?a(n,e):a,l="function"==typeof o?o(n,e):o,s=t._getPosition(n);return{d:n,i:e,fF:r,fP:u,fS:l,lineHeight:t._shapeConfig.lineHeight?t._shapeConfig.lineHeight(n,e):1.4*l,position:s,rotate:t._labelRotation}}))).forEach((function(e){e.space=E.bind(t)(e,n)}));var u=qt(F,(function(t,n){return n&&n!==F.length-1?t.space:1/0}));F=F.map((function(n){"time"===t._scale&&(n.space=u);var e=N.bind(t)(n);return Object.assign(e,n)})),n>1&&R.bind(this)(F)}L.bind(this)();var I=this._labelOffset&&F.some((function(t){return t.truncated}));I&&L.bind(this)(2);var H=[0,1].map((function(t){var n=F[t?F.length-1:0];if(!n)return 0;var e=n.height,i=n.position,r=n.rotate,o=n.width,a=t?b[1]:b[0],u=(r||!d?e:o)/2;if(Math.abs(i-a)>=u)return 0;var l=u-(i-a);return Math.abs(l)})),G=ww(o,2),K=G[0],U=G[1],q=[K+H[0],U-H[1]];this._range&&(void 0!==this._range[0]&&(q[0]=this._range[0]),void 0!==this._range[this._range.length-1]&&(q[1]=this._range[this._range.length-1])),q[0]===K&&q[1]===U||(A.bind(this)(q),L.bind(this)(I?2:1)),F.some((function(t){return t.truncated}))&&F.length>1&&(F[0].truncated&&F[1].truncated&&r.splice(1,1),F[F.length-1].truncated&&F[F.length-2].truncated&&r.splice(F.length-2,1),F.length!==r.length&&L.bind(this)());var W=Ut(F,(function(t){return t.height}))||0;this._labelRotation=d&&void 0===this._labelRotation?F.some((function(t){var n=t.i,e=t.height,i=t.position,r=t.truncated,o=F[n-1];return r||n&&o.position+o.height/2>i-e/2})):this._labelRotation;var $=this._labelOffset?Ut(F,(function(t){return t.offset||0})):0;F.forEach((function(t){return t.offset=t.offset?$:0}));var Y="Line"===this._shape?0:D,V=this._outerBounds=(bw(n={},h,(Ut(F,(function(t){return Math.ceil(t[t.rotate||!d?"width":"height"]+t.offset)}))||0)+(F.length?y:0)),bw(n,c,b[b.length-1]-b[0]),bw(n,f,b[0]),n);V[h]=Ut([this._minSize,V[h]]),k[this._orient]+=D,k[p]=void 0!==this._gridSize?Ut([this._gridSize,Y]):this["_".concat(h)]-k[this._orient]-V[h]-y,V[h]+=k[p]+k[this._orient],V[g]="start"===this._align?this._padding:"end"===this._align?this["_".concat(h)]-V[h]-this._padding:this["_".concat(h)]/2-V[h]/2;var Z=sp("g#d3plus-Axis-".concat(this._uuid),{parent:v});this._group=Z;var X=sp("g.grid",{parent:Z}).selectAll("line").data((0!==this._gridSize?this._grid||"log"===this._scale&&!this._gridLog?r:a:[]).map((function(t){return{id:t}})),(function(t){return t.id}));X.exit().transition(w).attr("opacity",0).call(this._gridPosition.bind(this)).remove(),X.enter().append("line").attr("opacity",0).attr("clip-path","url(#".concat(m,")")).call(this._gridPosition.bind(this),!0).merge(X).transition(w).attr("opacity",1).call(this._gridPosition.bind(this));var J=r.filter((function(t,n){return F[n].lines.length&&!a.includes(t)})),Q=F.some((function(t){return t.rotate})),tt=a.concat(J).map((function(t){var n,i=F.find((function(n){return n.d===t})),o=e._getPosition(t),u=i?i.space:0,l=i?i.lines.length:1,s=i?i.lineHeight:1,c=i?i.fP:0,m=i&&e._labelOffset?i.offset:0,v=d?u:V.width-k[e._position.opposite]-D-k[e._orient]+y,b=k[p],w=(D+m)*(_?-1:1),S=_?V[g]+V[h]-b:V[g]+b,x=(n={id:t,labelBounds:Q&&i?{x:-i.width/2+i.fS/4,y:"bottom"===e._orient?w+(i.width-s*l)/2+c:2*w-(i.width+s*l)/2+c,width:i.width,height:i.height}:{x:d?-u/2:"left"===e._orient?-v-y+w:w+y,y:d?"bottom"===e._orient?w+c:w-W-c:-u/2,width:d?u:v,height:d?W:u},rotate:!!i&&i.rotate,size:r.includes(t)||"log"===e._scale&&Math.log10(Math.abs(t))%1==0?w:a.includes(t)?Math.ceil(w/2):e._data.find((function(n){return+n===t}))?Math.ceil(w/4):0,text:!!r.includes(t)&&C(t),tick:a.includes(t)},bw(n,f,o+("band"===e._scale?e._d3Scale.bandwidth()/2:0)),bw(n,g,S),n);return x}));"Line"===this._shape&&(tt=tt.concat(tt.map((function(t){var n=Object.assign({},t);return n[g]+=t.size,n})))),(new _w[this._shape]).data(tt).duration(this._duration).labelConfig({ellipsis:function(t){return t&&t.length?"".concat(t,"..."):""},rotate:function(t){return t.rotate?-90:0}}).select(sp("g.ticks",{parent:Z}).node()).config(jh.bind(this)(this._shapeConfig)).labelConfig({padding:0}).render();var nt=Z.selectAll("line.bar").data([null]);return nt.enter().append("line").attr("class","bar").attr("opacity",0).call(this._barPosition.bind(this)).merge(nt).transition(w).attr("opacity",1).call(this._barPosition.bind(this)),this._titleClass.data(this._title?[{text:this._title}]:[]).duration(this._duration).height(k[this._orient]).rotate("left"===this._orient?-90:"right"===this._orient?90:0).select(sp("g.d3plus-Axis-title",{parent:Z}).node()).text((function(t){return t.text})).verticalAlign("middle").width(o[o.length-1]-o[0]).x(d?o[0]:"left"===this._orient?V.x+k.left/2-(o[o.length-1]-o[0])/2:V.x+V.width-k.right/2-(o[o.length-1]-o[0])/2).y(d?"bottom"===this._orient?V.y+V.height-k.bottom:V.y:o[0]+(o[o.length-1]-o[0])/2-k[this._orient]/2).config(jh.bind(this)(this._titleConfig)).render(),this._lastScale=this._getPosition.bind(this),t&&setTimeout(t,this._duration+100),this}},{key:"align",value:function(t){return arguments.length?(this._align=t,this):this._align}},{key:"barConfig",value:function(t){return arguments.length?(this._barConfig=Object.assign(this._barConfig,t),this):this._barConfig}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"domain",value:function(t){return arguments.length?(this._domain=t,this):this._domain}},{key:"duration",value:function(t){return arguments.length?(this._duration=t,this):this._duration}},{key:"grid",value:function(t){return arguments.length?(this._grid=t,this):this._grid}},{key:"gridConfig",value:function(t){return arguments.length?(this._gridConfig=Object.assign(this._gridConfig,t),this):this._gridConfig}},{key:"gridLog",value:function(t){return arguments.length?(this._gridLog=t,this):this._gridLog}},{key:"gridSize",value:function(t){return arguments.length?(this._gridSize=t,this):this._gridSize}},{key:"height",value:function(t){return arguments.length?(this._height=t,this):this._height}},{key:"labels",value:function(t){return arguments.length?(this._labels=t,this):this._labels}},{key:"labelOffset",value:function(t){return arguments.length?(this._labelOffset=t,this):this._labelOffset}},{key:"labelRotation",value:function(t){return arguments.length?(this._labelRotation=t,this):this._labelRotation}},{key:"maxSize",value:function(t){return arguments.length?(this._maxSize=t,this):this._maxSize}},{key:"minSize",value:function(t){return arguments.length?(this._minSize=t,this):this._minSize}},{key:"orient",value:function(t){if(arguments.length){var n=["top","bottom"].includes(t);return this._position={horizontal:n,width:n?"width":"height",height:n?"height":"width",x:n?"x":"y",y:n?"y":"x",opposite:{top:"bottom",right:"left",bottom:"top",left:"right"}[t]},this._orient=t,this}return this._orient}},{key:"outerBounds",value:function(){return this._outerBounds}},{key:"padding",value:function(t){return arguments.length?(this._padding=t,this):this._padding}},{key:"paddingInner",value:function(t){return arguments.length?(this._paddingInner=t,this):this._paddingInner}},{key:"paddingOuter",value:function(t){return arguments.length?(this._paddingOuter=t,this):this._paddingOuter}},{key:"range",value:function(t){return arguments.length?(this._range=t,this):this._range}},{key:"rounding",value:function(t){return arguments.length?(this._rounding=t,this):this._rounding}},{key:"scale",value:function(t){return arguments.length?(this._scale=t,this):this._scale}},{key:"scalePadding",value:function(t){return arguments.length?(this._scalePadding=t,this):this._scalePadding}},{key:"select",value:function(t){return arguments.length?(this._select=$f(t),this):this._select}},{key:"shape",value:function(t){return arguments.length?(this._shape=t,this):this._shape}},{key:"shapeConfig",value:function(t){return arguments.length?(this._shapeConfig=gh(this._shapeConfig,t),this):this._shapeConfig}},{key:"tickFormat",value:function(t){return arguments.length?(this._tickFormat=t,this):this._tickFormat}},{key:"ticks",value:function(t){return arguments.length?(this._ticks=t,this):this._ticks}},{key:"tickSize",value:function(t){return arguments.length?(this._tickSize=t,this):this._tickSize}},{key:"tickSuffix",value:function(t){return arguments.length?(this._tickSuffix=t,this):this._tickSuffix}},{key:"timeLocale",value:function(t){return arguments.length?(this._timeLocale=t,this):this._timeLocale}},{key:"title",value:function(t){return arguments.length?(this._title=t,this):this._title}},{key:"titleConfig",value:function(t){return arguments.length?(this._titleConfig=Object.assign(this._titleConfig,t),this):this._titleConfig}},{key:"width",value:function(t){return arguments.length?(this._width=t,this):this._width}}],e&&Aw(n.prototype,e),i&&Aw(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Th);function Nw(t){return Nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nw(t)}function Rw(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"data";return t.reduce((function(t,e){var i=[];return Array.isArray(e)?i=e:e[n]?i=e[n]:console.warn('d3plus-viz: Please implement a "dataFormat" callback to concat the arrays manually (consider using the d3plus.dataConcat method in your callback). Currently unable to concatenate (using key: "'.concat(n,'") the following response:'),e),t.concat(i)}),[])};function uS(t){return uS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uS(t)}const lS=function(t){return"string"==typeof t||"object"===uS(t)&&t.url&&t.headers};var sS={value:function(){}};function cS(){for(var t,n=0,e=arguments.length,i={};n=200&&i<300||304===i){if(r)try{n=r.call(e,l)}catch(o){return void a.call("error",e,o)}else n=l;a.call("load",e,n)}else a.call("error",e,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=f:l.onreadystatechange=function(t){l.readyState>3&&f(t)},l.onprogress=function(t){a.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?u.get(t):(null==n?u.remove(t):u.set(t,n+""),e)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",e):i},responseType:function(t){return arguments.length?(o=t,e):o},timeout:function(t){return arguments.length?(h=+t,e):h},user:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",e)},response:function(t){return r=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,r,f){return l.open(n,t,!0,s,c),null==i||u.has("accept")||u.set("accept",i+",*/*"),l.setRequestHeader&&u.each((function(t,n){l.setRequestHeader(n,t)})),null!=i&&l.overrideMimeType&&l.overrideMimeType(i),null!=o&&(l.responseType=o),h>0&&(l.timeout=h),null==f&&"function"==typeof r&&(f=r,r=null),null!=f&&1===f.length&&(f=function(t){return function(n,e){t(null==n?e:null)}}(f)),null!=f&&e.on("error",f).on("load",(function(t){f(null,t)})),a.call("beforesend",e,l),l.send(null==r?null:r),e},abort:function(){return l.abort(),e},on:function(){var t=a.on.apply(a,arguments);return t===a?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e}function pS(t,n){return function(e,i){var r=dS(e).mimeType(t).response(n);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return r.get(i)}return r}}hS.prototype=cS.prototype={constructor:hS,on:function(t,n){var e,i,r=this._,o=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),a=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++a0)for(var e,i,r=new Array(e),o=0;o9999?"+"+SS(n,6):SS(n,4))+"-"+SS(t.getUTCMonth()+1,2)+"-"+SS(t.getUTCDate(),2)+(o?"T"+SS(e,2)+":"+SS(i,2)+":"+SS(r,2)+"."+SS(o,3)+"Z":r?"T"+SS(e,2)+":"+SS(i,2)+":"+SS(r,2)+"Z":i||e?"T"+SS(e,2)+":"+SS(i,2)+"Z":"")}function kS(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function i(t,n){var i,r=[],o=t.length,a=0,u=0,l=o<=0,s=!1;function c(){if(l)return vS;if(s)return s=!1,yS;var n,i,r=a;if(34===t.charCodeAt(r)){for(;a++=o?l=!0:10===(i=t.charCodeAt(a++))?s=!0:13===i&&(s=!0,10===t.charCodeAt(a)&&++a),t.slice(r+1,n-1).replace(/""/g,'"')}for(;a2&&void 0!==arguments[2]?arguments[2]:"headers";return t[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data"].map((function(e){return t[n].reduce((function(t,n,i){return t[n]=e[i],t}),{})}))};function PS(t){return PS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PS(t)}function jS(t,n,e,i){var r,o=this,a=function(t){return t.reduce((function(t,n){return n?t+1:t}),0)};t instanceof Array||(t=[t]);var u=t.find(lS),l=new Array(t.length),s=[];u?t.forEach((function(t,n){lS(t)?s.push(t):l[n]=t})):l[0]=t;var c=a(l);if(s.forEach((function(u){var h={},f=u;"object"===PS(u)&&(f=u.url,h=u.headers),r=function(t){switch(t.slice(t.length-4)){case".csv":return MS;case".tsv":return TS;case".txt":return _S;default:return mS}}(f);var g=r(f);for(var d in h)({}).hasOwnProperty.call(h,d)&&g.header(d,h[d]);g.get((function(u,h){if((h=u?[]:h)&&!(h instanceof Array)&&h.data&&h.headers&&(h=OS(h)),h=function(t,n,e){return n!==mS&&!t&&e&&e instanceof Array&&e.forEach((function(t){for(var n in t)isNaN(t[n])?"false"===t[n].toLowerCase()?t[n]=!1:"true"===t[n].toLowerCase()?t[n]=!0:"null"===t[n].toLowerCase()?t[n]=null:"undefined"===t[n].toLowerCase()&&(t[n]=void 0):t[n]=parseFloat(t[n])})),e}(u,r,h),l[function(t,n){return n.indexOf(t)}(f,t)]=h,a(l)-c===s.length){if(h=1===a(l)?l[0]:l,o._cache&&o._lrucache.set("".concat(e,"_").concat(f),h),n){var g=n(1===a(l)?l[0]:l);"data"===e&&fh(g)?(h=g.data||[],delete g.data,o.config(g)):h=g||[]}else"data"===e&&(h=aS(l,"data"));e&&"_".concat(e)in o&&(o["_".concat(e)]=h),i&&i(u,h)}}))})),0===s.length){l=l.map((function(t){return t&&!(t instanceof Array)&&t.data&&t.headers&&(t=OS(t)),t}));var h=1===a(l)?l[0]:l;if(n){var f=n(1===a(l)?l[0]:l);"data"===e&&fh(f)?(h=f.data||[],delete f.data,this.config(f)):h=f||[]}else"data"===e&&(h=aS(l,"data"));e&&"_".concat(e)in this&&(this["_".concat(e)]=h),i&&i(null,h)}}function BS(t,n,e){if(t instanceof Array||(t=[t]),t.find(lS)){var i=this._queue.find((function(t){return t[3]===e})),r=[jS.bind(this),t,n,e];i?this._queue[this._queue.indexOf(i)]=r:this._queue.push(r)}else this["_".concat(e)]=t}const DS={capture:!0,passive:!1};function zS(t){t.preventDefault(),t.stopImmediatePropagation()}function NS(t){var n=t.document.documentElement,e=$f(t).on("dragstart.drag",zS,DS);"onselectstart"in n?e.on("selectstart.drag",zS,DS):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function RS(t,n){var e=t.document.documentElement,i=$f(t).on("dragstart.drag",null);n&&(i.on("click.drag",zS,DS),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}const FS=t=>()=>t;function LS(t,{sourceEvent:n,target:e,selection:i,mode:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function IS(t){t.preventDefault(),t.stopImmediatePropagation()}var HS={name:"drag"},GS={name:"space"},KS={name:"handle"},US={name:"center"};const{abs:qS,max:WS,min:$S}=Math;function YS(t){return[+t[0],+t[1]]}function VS(t){return[YS(t[0]),YS(t[1])]}var ZS={name:"x",handles:["w","e"].map(rx),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},XS={name:"y",handles:["n","s"].map(rx),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},JS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rx),input:function(t){return null==t?null:VS(t)},output:function(t){return t}},QS={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},tx={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},nx={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ex={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ix={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function rx(t){return{type:t}}function ox(t){return!t.ctrlKey&&!t.button}function ax(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ux(){return navigator.maxTouchPoints||"ontouchstart"in this}function lx(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function sx(t){var n,e=ax,i=ox,r=ux,o=!0,a=Xf("start","brush","end"),u=6;function l(n){var e=n.property("__brush",p).selectAll(".overlay").data([rx("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",QS.overlay).merge(e).each((function(){var t=lx(this).extent;$f(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([rx("selection")]).enter().append("rect").attr("class","selection").attr("cursor",QS.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));i.exit().remove(),i.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return QS[t.type]})),n.each(s).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",g).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function s(){var t=$f(this),n=lx(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,n,e){var i=t.__brush.emitter;return!i||e&&i.clean?new h(t,n,e):i}function h(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function f(e){if((!n||e.touches)&&i.apply(this,arguments)){var r,a,u,l,h,f,g,d,p,m,_,y=this,v=e.target.__data__.type,b="selection"===(o&&e.metaKey?v="overlay":v)?HS:o&&e.altKey?US:KS,w=t===XS?null:ex[v],S=t===ZS?null:ix[v],x=lx(y),k=x.extent,C=x.selection,A=k[0][0],E=k[0][1],M=k[1][0],T=k[1][1],O=0,P=0,j=w&&S&&o&&e.shiftKey,B=Array.from(e.touches||[e],(t=>{const n=t.identifier;return(t=Vf(t,y)).point0=t.slice(),t.identifier=n,t}));Bg(y);var D=c(y,arguments,!0).beforestart();if("overlay"===v){C&&(p=!0);const n=[B[0],B[1]||B[0]];x.selection=C=[[r=t===XS?A:$S(n[0][0],n[1][0]),u=t===ZS?E:$S(n[0][1],n[1][1])],[h=t===XS?M:WS(n[0][0],n[1][0]),g=t===ZS?T:WS(n[0][1],n[1][1])]],B.length>1&&L(e)}else r=C[0][0],u=C[0][1],h=C[1][0],g=C[1][1];a=r,l=u,f=h,d=g;var z=$f(y).attr("pointer-events","none"),N=z.selectAll(".overlay").attr("cursor",QS[v]);if(e.touches)D.moved=F,D.ended=I;else{var R=$f(e.view).on("mousemove.brush",F,!0).on("mouseup.brush",I,!0);o&&R.on("keydown.brush",(function(t){switch(t.keyCode){case 16:j=w&&S;break;case 18:b===KS&&(w&&(h=f-O*w,r=a+O*w),S&&(g=d-P*S,u=l+P*S),b=US,L(t));break;case 32:b!==KS&&b!==US||(w<0?h=f-O:w>0&&(r=a-O),S<0?g=d-P:S>0&&(u=l-P),b=GS,N.attr("cursor",QS.selection),L(t));break;default:return}IS(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:j&&(m=_=j=!1,L(t));break;case 18:b===US&&(w<0?h=f:w>0&&(r=a),S<0?g=d:S>0&&(u=l),b=KS,L(t));break;case 32:b===GS&&(t.altKey?(w&&(h=f-O*w,r=a+O*w),S&&(g=d-P*S,u=l+P*S),b=US):(w<0?h=f:w>0&&(r=a),S<0?g=d:S>0&&(u=l),b=KS),N.attr("cursor",QS[v]),L(t));break;default:return}IS(t)}),!0),NS(e.view)}s.call(y),D.start(e,b.name)}function F(t){for(const n of t.changedTouches||[t])for(const t of B)t.identifier===n.identifier&&(t.cur=Vf(n,y));if(j&&!m&&!_&&1===B.length){const t=B[0];qS(t.cur[0]-t[0])>qS(t.cur[1]-t[1])?_=!0:m=!0}for(const n of B)n.cur&&(n[0]=n.cur[0],n[1]=n.cur[1]);p=!0,IS(t),L(t)}function L(t){const n=B[0],e=n.point0;var i;switch(O=n[0]-e[0],P=n[1]-e[1],b){case GS:case HS:w&&(O=WS(A-r,$S(M-h,O)),a=r+O,f=h+O),S&&(P=WS(E-u,$S(T-g,P)),l=u+P,d=g+P);break;case KS:B[1]?(w&&(a=WS(A,$S(M,B[0][0])),f=WS(A,$S(M,B[1][0])),w=1),S&&(l=WS(E,$S(T,B[0][1])),d=WS(E,$S(T,B[1][1])),S=1)):(w<0?(O=WS(A-r,$S(M-r,O)),a=r+O,f=h):w>0&&(O=WS(A-h,$S(M-h,O)),a=r,f=h+O),S<0?(P=WS(E-u,$S(T-u,P)),l=u+P,d=g):S>0&&(P=WS(E-g,$S(T-g,P)),l=u,d=g+P));break;case US:w&&(a=WS(A,$S(M,r-O*w)),f=WS(A,$S(M,h+O*w))),S&&(l=WS(E,$S(T,u-P*S)),d=WS(E,$S(T,g+P*S)))}f=0;)if((e=t._tasks[i])&&(t._tasks[i]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,mx(t)}function mx(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function _x(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new fx(t)}fx.prototype=_x.prototype={constructor:fx,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=cx.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),gx(this),this},abort:function(){return null==this._error&&px(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},mx(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,mx(this),this}};const yx=t=>()=>t;function vx(t,{sourceEvent:n,target:e,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function bx(t,n,e){this.k=t,this.x=n,this.y=e}bx.prototype={constructor:bx,scale:function(t){return 1===t?this:new bx(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new bx(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wx=new bx(1,0,0);function Sx(t){for(;!t.__zoom;)if(!(t=t.parentNode))return wx;return t.__zoom}function xx(t){t.stopImmediatePropagation()}function kx(t){t.preventDefault(),t.stopImmediatePropagation()}function Cx(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Ax(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Ex(){return this.__zoom||wx}function Mx(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Tx(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ox(t,n,e){var i=t.invertX(n[0][0])-e[0][0],r=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Sx.prototype=bx.prototype;var Px={exports:{}};!function(t){"object"==typeof window&&window,t.exports=function(){var t=void 0;function n(t){if(!(this instanceof n))return new n(t);this._LRUCacheState=new i(t)}var e=n.prototype;function i(t){this.capacity=t>0?+t:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList=new r}function r(){this.length=0,this.head=null,this.end=null}function o(t){this.key=t,this.p=null,this.n=null}function a(t,n){n!==t.head&&(t.end?t.end===n&&(t.end=n.n):t.end=n,u(n.n,n.p),u(n,t.head),t.head=n,t.head.n=null)}function u(t,n){t!==n&&(t&&(t.p=n),n&&(n.n=t))}return e.get=function(t){var n=this._LRUCacheState,e=n.hash[t];if(e)return a(n.linkedList,e),n.data[t]},e.set=function(n,e){var i=this._LRUCacheState,r=i.hash[n];return e===t||(r||(i.hash[n]=new o(n),i.linkedList.length+=1,r=i.hash[n]),a(i.linkedList,r),i.data[n]=e,i.linkedList.length>i.capacity&&this.remove(i.linkedList.end.key)),this},e.update=function(t,n){return this.has(t)&&this.set(t,n(this.get(t))),this},e.remove=function(t){var n=this._LRUCacheState,e=n.hash[t];return e?(e===n.linkedList.head&&(n.linkedList.head=e.p),e===n.linkedList.end&&(n.linkedList.end=e.n),u(e.n,e.p),delete n.hash[t],delete n.data[t],n.linkedList.length-=1,this):this},e.removeAll=function(){return this._LRUCacheState=new i(this._LRUCacheState.capacity),this},e.info=function(){var t=this._LRUCacheState;return{capacity:t.capacity,length:t.linkedList.length}},e.keys=function(){for(var t=[],n=this._LRUCacheState.linkedList.head;n;)t.push(n.key),n=n.p;return t},e.has=function(t){return!!this._LRUCacheState.hash[t]},e.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},e.popStale=function(){var t=this.staleKey();if(!t)return null;var n=[t,this._LRUCacheState.data[t]];return this.remove(t),n},n}()}(Px);const jx=y(Px.exports);function Bx(t,n){for(var e=[],i=0;i0){var o=(e[n]-e[t-1])/(n-t+1);r=i[n]-i[t-1]-(n-t+1)*o*o}else r=i[n]-e[n]*e[n]/(n+1);return r<0?0:r}function zx(t,n,e,i,r,o,a){if(!(t>n)){var u=Math.floor((t+n)/2);i[e][u]=i[e-1][u-1],r[e][u]=u;var l=e;t>e&&(l=Math.max(l,r[e][t-1]||0)),l=Math.max(l,r[e-1][u]||0);var s=u-1;n=l;--c){var h=Dx(c,u,o,a);if(h+i[e-1][l-1]>=i[e][u])break;var f=Dx(l,u,o,a)+i[e-1][l-1];ft.length)throw new Error("Cannot generate more classes than there are data values");var e=function(t){return t.slice().sort((function(t,n){return t-n}))}(t);if(1===function(t){for(var n,e=0,i=0;i=0;a--){var u=i[a][r];o[a]=e.slice(u,r+1),a>0&&(r=u-1)}return o}function Rx(t){return Rx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rx(t)}function Fx(t,n){for(var e=0;el){var s=1,c=[],h=Ut(this._lineData.map((function(t){return t.words.length})));if(this._wrapLines=function(){var t=this;if(!(++s>h)){var n=1===s?this._lineData.slice():this._lineData.filter((function(n){return n.width+n.shapeWidth+t._padding*(n.width?2:1)>l&&n.words.length>=s})).sort((function(t,n){return n.sentence.length-t.sentence.length}));if(n.length&&i>n[0].height*s){for(var e=!1,r=function(){var t=n[o],i=t.og.height*s,r=t.og.width*(1/s*1.5),a=cv().fontFamily(t.f).fontSize(t.s).lineHeight(t.lh).width(r).height(i)(t.sentence);if(a.truncated)return e=!0,"break";t.width=Math.ceil(Ut(a.lines.map((function(n){return Hy(n,{"font-family":t.f,"font-size":t.s})}))))+t.s,t.height=a.lines.length*(t.lh+1)},o=0;oi){c=[];break}if(o>l){c=[],this._wrapLines();break}n+oi){e=Jt(this._lineData.map((function(t){return t.shapeWidth+n._padding})))-this._padding;for(var f=0;f=1||h<=-1?Math.round(h).toString().length-1:-1*h.toString().split(".")[1].replace(/([1-9])[1-9].*$/,"$1").length,g=Math.pow(10,f),d=o(u===n&&1===e?qt([n+g,r.find((function(t){return t>n&&tn&&tthis._midpoint,g=h&&f,d=qt([this._buckets instanceof Array?this._buckets.length:this._buckets,g&&"jenks"!==this._scale?2*Math.floor(cp(s).length/2)-1:cp(s).length]),p=g?void 0:this._color;if(!p||p instanceof Array||(p=Xt(0,d,1).map((function(t){return Ny(p,(t+1)/d)})).reverse()),"jenks"===this._scale){var m=qt([p?p.length:d,d,s.length]),_=[];if(this._buckets instanceof Array)l=this._buckets;else{if(g&&this._centered){var y=Math.floor(m/2),v=m%2,b=s.filter((function(t){return t=n._midpoint})),x=Et(S),k=x>w?1:0,C=Nx(b,qt([y+v*(w>x?1:0),b.length])),A=Nx(S,qt([y+v*k,S.length]));_=C.concat(A)}else _=Nx(s,m);l=_.map((function(t){return t[0]}))}var E=new Set(l);if(l.length!==E.size&&(u=Array.from(E)),!p)if(g){p=[this._colorMin,this._colorMid,this._colorMax];var M=l.slice(0,m).filter((function(t,e){return tn._midpoint})),O=l.slice(0,m).filter((function(t){return t>n._midpoint})),P=M.map((function(t,n){return n?Ny(p[0],n/M.length):p[0]})),j=T.map((function(){return p[1]})),B=O.map((function(t,n){return n===O.length-1?p[2]:Ny(p[2],1-(n+1)/O.length)}));p=P.concat(j).concat(B)}else p=Xt(0,d,1).map((function(t){return Ny(n._colorMax,t/d)})).reverse();l.length<=m&&(p=p.slice(-l.length)),p=[p[0]].concat(p),this._colorScale=am().domain(l).range(p)}else{var D=this._buckets instanceof Array?this._buckets:void 0;if(g&&!p){var z=Math.floor(d/2),N=yd.gamma(2.2)(this._colorMin,this._colorMid),R=Xt(0,z,1).map((function(t){return N(t/z)})),F=(d%2?[0]:[]).map((function(){return n._colorMid})),L=yd.gamma(2.2)(this._colorMax,this._colorMid),I=Xt(0,z,1).map((function(t){return L(t/z)})).reverse();if(p=R.concat(F).concat(I),!D){var H=(p.length-1)/2;D=[c[0],this._midpoint,c[1]],D=Xt(c[0],this._midpoint,-(c[0]-this._midpoint)/H).concat(Xt(this._midpoint,c[1],(c[1]-this._midpoint)/H)).concat([c[1]])}}else if(p||("buckets"===this._scale||"quantile"===this._scale?(p=Xt(0,d,1).map((function(t){return Ny(h?n._colorMin:n._colorMax,t/d)})),f&&(p=p.reverse())):p=h?[this._colorMin,Ny(this._colorMin,.8)]:[Ny(this._colorMax,.8),this._colorMax]),!D)if("quantile"===this._scale){var G=1/(p.length-1);D=Xt(0,1+G/2,G).map((function(t){return Yt(s,t)}))}else if(g&&this._color&&this._centered){var K=(this._midpoint-c[0])/Math.floor(p.length/2),U=(c[1]-this._midpoint)/Math.floor(p.length/2),q=Xt(c[0],this._midpoint,K),W=Xt(this._midpoint,c[1]+U/2,U);D=q.concat(W)}else{var $=(c[1]-c[0])/(p.length-1);D=Xt(c[0],c[1]+$/2,$)}if("buckets"===this._scale||"quantile"===this._scale)l=D,p=[p[0]].concat(p);else if("log"===this._scale){var Y=D.filter((function(t){return t<0}));if(Y.length){var V=Y[0],Z=Y.map((function(t){return-Math.pow(Math.abs(V),t/V)}));Y.forEach((function(t,n){D[D.indexOf(t)]=Z[n]}))}var X=D.filter((function(t){return t>0}));if(X.length){var J=X[X.length-1],Q=X.map((function(t){return Math.pow(J,t/J)}));X.forEach((function(t,n){D[D.indexOf(t)]=Q[n]}))}D.includes(0)&&(D[D.indexOf(0)]=1)}this._colorScale=("buckets"===this._scale||"quantile"===this._scale?am:Hp)().domain(D).range(p)}this._colorScale.clamp&&this._colorScale.clamp(!0);var tt=this._bucketAxis||!["buckets","jenks","quantile"].includes(this._scale),nt=rp().duration(this._duration),et={enter:{opacity:0},exit:{opacity:0},parent:this._group,transition:nt,update:{opacity:1}},it=sp("g.d3plus-ColorScale-labels",Object.assign({condition:tt},et)),rt=sp("g.d3plus-ColorScale-Rect",Object.assign({condition:tt},et)),ot=sp("g.d3plus-ColorScale-legend",Object.assign({condition:!tt},et));if(tt){var at,ut={x:0,y:0},lt=c.slice();if(this._bucketAxis){var st=lt[lt.length-1],ct=lt[lt.length-2],ht=st?st/10:ct/10,ft=ht>=1||ht<=-1?Math.round(ht).toString().length-1:-1*ht.toString().split(".")[1].replace(/([1-9])[1-9].*$/,"$1").length,gt=Math.pow(10,ft);lt[lt.length-1]=st+gt}var dt=gh({domain:e?lt:lt.slice().reverse(),duration:this._duration,height:this._height,labels:u||l,orient:this._orient,padding:this._padding,scale:"log"===this._scale?"log":"linear",ticks:l,width:this._width},this._axisConfig),pt=gh({height:this["_".concat(i)]/2,width:this["_".concat(r)]/2},this._labelConfig);this._labelClass.config(pt);var mt=[];if(e&&this._labelMin){var _t={"font-family":this._labelClass.fontFamily()(this._labelMin),"font-size":this._labelClass.fontSize()(this._labelMin),"font-weight":this._labelClass.fontWeight()(this._labelMin)};_t["font-family"]instanceof Array&&(_t["font-family"]=_t["font-family"][0]);var yt=Hy(this._labelMin,_t);yt&&ytVf(t,e)))),r=t.selection&&this._brushing||!i.length?t.selection:[i[0][0],i[0][0]];if("ticks"===this._buttonBehaviorCurrent&&(r=r.map(this._d3Scale.invert)),r=r.map(Number),"brush"===t.type&&this._brushing&&"buttons"===this._buttonBehaviorCurrent){var o=t.selection.map((function(n){return Math.abs(n-t.sourceEvent.offsetX)}));r=o[1]<=o[0]?[t.selection[0],t.sourceEvent.offsetX].sort((function(t,n){return t-n})):[t.sourceEvent.offsetX,t.selection[1]].sort((function(t,n){return t-n}))}var a="ticks"===this._buttonBehaviorCurrent?this._availableTicks.map(Number):this._d3Scale.range();if("ticks"===this._buttonBehaviorCurrent){var u=yw(Oh(r[0],a)),l=a.indexOf(+u),s=yw(Oh(r[1],a)),c=a.indexOf(+s),h=Math.abs(c-l),f=this._brushMin()-1;hb.length?b[0]:b[b.length-this._brushMin()],b[b.length-1]],S=void 0===this._selection?w:this._selection instanceof Array?"buttons"===this._buttonBehaviorCurrent?this._selection.map(yw).map((function(t){return y[n._ticks.map(Number).indexOf(+t)]})):this._selection.map(yw):"buttons"===this._buttonBehaviorCurrent?[y[this._ticks.map(Number).indexOf(+this._selection)]]:[this._selection];1===S.length&&S.push(S[0]),this._updateBrushLimit(S),this._brushGroup=sp("g.brushGroup",{parent:this._group}),this._brushGroup.call(v).transition(this._transition).call(v.move,"ticks"===this._buttonBehaviorCurrent?this._updateBrushLimit(S):S),this._outerBounds.y-=this._handleSize/2,this._outerBounds.height+=this._handleSize/2;var x=sp("g.d3plus-Timeline-play",{parent:this._group});return this._playButtonClass.data(this._playButton?[{x:this._paddingLeft-h,y:"buttons"===this._buttonBehaviorCurrent?"middle"===this._align?this._height/2-this._buttonHeight/2:"start"===this._align?this._margin.top:this._height-this._buttonHeight-this._margin.bottom:this._outerBounds.y,width:h,height:h}]:[]).select(x.node()).config(this._playButtonConfig).render(),this}},{key:"buttonPadding",value:function(t){return arguments.length?(this._buttonPadding=t,this):this._buttonPadding}},{key:"brushing",value:function(t){return arguments.length?(this._brushing=t,this):this._brushing}},{key:"brushFilter",value:function(t){return arguments.length?(this._brushFilter=t,this):this._brushFilter}},{key:"brushMin",value:function(t){return arguments.length?(this._brushMin="function"==typeof t?t:Bh(t),this):this._brushMin}},{key:"buttonAlign",value:function(t){return arguments.length?(this._buttonAlign=t,this):this._buttonAlign}},{key:"buttonBehavior",value:function(t){return arguments.length?(this._buttonBehavior=t,this):this._buttonBehavior}},{key:"buttonHeight",value:function(t){return arguments.length?(this._buttonHeight=t,this):this._buttonHeight}},{key:"handleConfig",value:function(t){return arguments.length?(this._handleConfig=gh(this._handleConfig,t),this):this._handleConfig}},{key:"handleSize",value:function(t){return arguments.length?(this._handleSize=t,this):this._handleSize}},{key:"on",value:function(t,n){return 2===arguments.length?(this._on[t]=n,this):arguments.length?"string"==typeof t?this._on[t]:(this._on=gh({},this._on,t),this):this._on}},{key:"playButton",value:function(t){return arguments.length?(this._playButton=t,this):this._playButton}},{key:"playButtonConfig",value:function(t){return arguments.length?(this._playButtonConfig=gh(this._playButtonConfig,t),this):this._playButtonConfig}},{key:"playButtonInterval",value:function(t){return arguments.length?(this._playButtonInterval=t,this):this._playButtonInterval}},{key:"selectionConfig",value:function(t){return arguments.length?(this._selectionConfig=gh(this._selectionConfig,t),this):this._selectionConfig}},{key:"selection",value:function(t){return arguments.length?(this._selection=t,this):this._selection}},{key:"snapping",value:function(t){return arguments.length?(this._snapping=t,this):this._snapping}}],e&&Qx(n.prototype,e),i&&Qx(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(zw),ak="top",uk="bottom",lk="right",sk="left",ck="auto",hk=[ak,uk,lk,sk],fk="start",gk="end",dk="clippingParents",pk="viewport",mk="popper",_k="reference",yk=hk.reduce((function(t,n){return t.concat([n+"-"+fk,n+"-"+gk])}),[]),vk=[].concat(hk,[ck]).reduce((function(t,n){return t.concat([n,n+"-"+fk,n+"-"+gk])}),[]),bk=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function wk(t){return t?(t.nodeName||"").toLowerCase():null}function Sk(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function xk(t){return t instanceof Sk(t).Element||t instanceof Element}function kk(t){return t instanceof Sk(t).HTMLElement||t instanceof HTMLElement}function Ck(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Sk(t).ShadowRoot||t instanceof ShadowRoot)}const Ak={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];kk(r)&&wk(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});kk(i)&&wk(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Ek(t){return t.split("-")[0]}var Mk=Math.max,Tk=Math.min,Ok=Math.round;function Pk(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function jk(){return!/^((?!chrome|android).)*safari/i.test(Pk())}function Bk(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&kk(t)&&(r=t.offsetWidth>0&&Ok(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ok(i.height)/t.offsetHeight||1);var a=(xk(t)?Sk(t):window).visualViewport,u=!jk()&&e,l=(i.left+(u&&a?a.offsetLeft:0))/r,s=(i.top+(u&&a?a.offsetTop:0))/o,c=i.width/r,h=i.height/o;return{width:c,height:h,top:s,right:l+c,bottom:s+h,left:l,x:l,y:s}}function Dk(t){var n=Bk(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function zk(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&Ck(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Nk(t){return Sk(t).getComputedStyle(t)}function Rk(t){return["table","td","th"].indexOf(wk(t))>=0}function Fk(t){return((xk(t)?t.ownerDocument:t.document)||window.document).documentElement}function Lk(t){return"html"===wk(t)?t:t.assignedSlot||t.parentNode||(Ck(t)?t.host:null)||Fk(t)}function Ik(t){return kk(t)&&"fixed"!==Nk(t).position?t.offsetParent:null}function Hk(t){for(var n=Sk(t),e=Ik(t);e&&Rk(e)&&"static"===Nk(e).position;)e=Ik(e);return e&&("html"===wk(e)||"body"===wk(e)&&"static"===Nk(e).position)?n:e||function(t){var n=/firefox/i.test(Pk());if(/Trident/i.test(Pk())&&kk(t)&&"fixed"===Nk(t).position)return null;var e=Lk(t);for(Ck(e)&&(e=e.host);kk(e)&&["html","body"].indexOf(wk(e))<0;){var i=Nk(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}function Gk(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Kk(t,n,e){return Mk(t,Tk(n,e))}function Uk(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function qk(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}const Wk={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,a=e.modifiersData.popperOffsets,u=Ek(e.placement),l=Gk(u),s=[sk,lk].indexOf(u)>=0?"height":"width";if(o&&a){var c=function(t,n){return Uk("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:qk(t,hk))}(r.padding,e),h=Dk(o),f="y"===l?ak:sk,g="y"===l?uk:lk,d=e.rects.reference[s]+e.rects.reference[l]-a[l]-e.rects.popper[s],p=a[l]-e.rects.reference[l],m=Hk(o),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=d/2-p/2,v=c[f],b=_-h[s]-c[g],w=_/2-h[s]/2+y,S=Kk(v,w,b),x=l;e.modifiersData[i]=((n={})[x]=S,n.centerOffset=S-w,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&zk(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $k(t){return t.split("-")[1]}var Yk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vk(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,a=t.offsets,u=t.position,l=t.gpuAcceleration,s=t.adaptive,c=t.roundOffsets,h=t.isFixed,f=a.x,g=void 0===f?0:f,d=a.y,p=void 0===d?0:d,m="function"==typeof c?c({x:g,y:p}):{x:g,y:p};g=m.x,p=m.y;var _=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=sk,b=ak,w=window;if(s){var S=Hk(e),x="clientHeight",k="clientWidth";S===Sk(e)&&"static"!==Nk(S=Fk(e)).position&&"absolute"===u&&(x="scrollHeight",k="scrollWidth"),(r===ak||(r===sk||r===lk)&&o===gk)&&(b=uk,p-=(h&&S===w&&w.visualViewport?w.visualViewport.height:S[x])-i.height,p*=l?1:-1),r!==sk&&(r!==ak&&r!==uk||o!==gk)||(v=lk,g-=(h&&S===w&&w.visualViewport?w.visualViewport.width:S[k])-i.width,g*=l?1:-1)}var C,A=Object.assign({position:u},s&&Yk),E=!0===c?function(t,n){var e=t.x,i=t.y,r=n.devicePixelRatio||1;return{x:Ok(e*r)/r||0,y:Ok(i*r)/r||0}}({x:g,y:p},Sk(e)):{x:g,y:p};return g=E.x,p=E.y,l?Object.assign({},A,((C={})[b]=y?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+g+"px, "+p+"px)":"translate3d("+g+"px, "+p+"px, 0)",C)):Object.assign({},A,((n={})[b]=y?p+"px":"",n[v]=_?g+"px":"",n.transform="",n))}var Zk={passive:!0},Xk={left:"right",right:"left",bottom:"top",top:"bottom"};function Jk(t){return t.replace(/left|right|bottom|top/g,(function(t){return Xk[t]}))}var Qk={start:"end",end:"start"};function tC(t){return t.replace(/start|end/g,(function(t){return Qk[t]}))}function nC(t){var n=Sk(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function eC(t){return Bk(Fk(t)).left+nC(t).scrollLeft}function iC(t){var n=Nk(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function rC(t){return["html","body","#document"].indexOf(wk(t))>=0?t.ownerDocument.body:kk(t)&&iC(t)?t:rC(Lk(t))}function oC(t,n){var e;void 0===n&&(n=[]);var i=rC(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Sk(i),a=r?[o].concat(o.visualViewport||[],iC(i)?i:[]):i,u=n.concat(a);return r?u:u.concat(oC(Lk(a)))}function aC(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function uC(t,n,e){return n===pk?aC(function(t,n){var e=Sk(t),i=Fk(t),r=e.visualViewport,o=i.clientWidth,a=i.clientHeight,u=0,l=0;if(r){o=r.width,a=r.height;var s=jk();(s||!s&&"fixed"===n)&&(u=r.offsetLeft,l=r.offsetTop)}return{width:o,height:a,x:u+eC(t),y:l}}(t,e)):xk(n)?function(t,n){var e=Bk(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):aC(function(t){var n,e=Fk(t),i=nC(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=Mk(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Mk(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-i.scrollLeft+eC(t),l=-i.scrollTop;return"rtl"===Nk(r||e).direction&&(u+=Mk(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:u,y:l}}(Fk(t)))}function lC(t,n,e,i){var r="clippingParents"===n?function(t){var n=oC(Lk(t)),e=["absolute","fixed"].indexOf(Nk(t).position)>=0&&kk(t)?Hk(t):t;return xk(e)?n.filter((function(t){return xk(t)&&zk(t,e)&&"body"!==wk(t)})):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o[0],u=o.reduce((function(n,e){var r=uC(t,e,i);return n.top=Mk(r.top,n.top),n.right=Tk(r.right,n.right),n.bottom=Tk(r.bottom,n.bottom),n.left=Mk(r.left,n.left),n}),uC(t,a,i));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function sC(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?Ek(r):null,a=r?$k(r):null,u=e.x+e.width/2-i.width/2,l=e.y+e.height/2-i.height/2;switch(o){case ak:n={x:u,y:e.y-i.height};break;case uk:n={x:u,y:e.y+e.height};break;case lk:n={x:e.x+e.width,y:l};break;case sk:n={x:e.x-i.width,y:l};break;default:n={x:e.x,y:e.y}}var s=o?Gk(o):null;if(null!=s){var c="y"===s?"height":"width";switch(a){case fk:n[s]=n[s]-(e[c]/2-i[c]/2);break;case gk:n[s]=n[s]+(e[c]/2-i[c]/2)}}return n}function cC(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.strategy,a=void 0===o?t.strategy:o,u=e.boundary,l=void 0===u?dk:u,s=e.rootBoundary,c=void 0===s?pk:s,h=e.elementContext,f=void 0===h?mk:h,g=e.altBoundary,d=void 0!==g&&g,p=e.padding,m=void 0===p?0:p,_=Uk("number"!=typeof m?m:qk(m,hk)),y=f===mk?_k:mk,v=t.rects.popper,b=t.elements[d?y:f],w=lC(xk(b)?b:b.contextElement||Fk(t.elements.popper),l,c,a),S=Bk(t.elements.reference),x=sC({reference:S,element:v,strategy:"absolute",placement:r}),k=aC(Object.assign({},v,x)),C=f===mk?k:S,A={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},E=t.modifiersData.offset;if(f===mk&&E){var M=E[r];Object.keys(A).forEach((function(t){var n=[lk,uk].indexOf(t)>=0?1:-1,e=[ak,uk].indexOf(t)>=0?"y":"x";A[t]+=M[e]*n}))}return A}function hC(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,a=e.padding,u=e.flipVariations,l=e.allowedAutoPlacements,s=void 0===l?vk:l,c=$k(i),h=c?u?yk:yk.filter((function(t){return $k(t)===c})):hk,f=h.filter((function(t){return s.indexOf(t)>=0}));0===f.length&&(f=h);var g=f.reduce((function(n,e){return n[e]=cC(t,{placement:e,boundary:r,rootBoundary:o,padding:a})[Ek(e)],n}),{});return Object.keys(g).sort((function(t,n){return g[t]-g[n]}))}const fC={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,a=e.altAxis,u=void 0===a||a,l=e.fallbackPlacements,s=e.padding,c=e.boundary,h=e.rootBoundary,f=e.altBoundary,g=e.flipVariations,d=void 0===g||g,p=e.allowedAutoPlacements,m=n.options.placement,_=Ek(m),y=l||(_!==m&&d?function(t){if(Ek(t)===ck)return[];var n=Jk(t);return[tC(t),n,tC(n)]}(m):[Jk(m)]),v=[m].concat(y).reduce((function(t,e){return t.concat(Ek(e)===ck?hC(n,{placement:e,boundary:c,rootBoundary:h,padding:s,flipVariations:d,allowedAutoPlacements:p}):e)}),[]),b=n.rects.reference,w=n.rects.popper,S=new Map,x=!0,k=v[0],C=0;C=0,O=T?"width":"height",P=cC(n,{placement:A,boundary:c,rootBoundary:h,altBoundary:f,padding:s}),j=T?M?lk:sk:M?uk:ak;b[O]>w[O]&&(j=Jk(j));var B=Jk(j),D=[];if(o&&D.push(P[E]<=0),u&&D.push(P[j]<=0,P[B]<=0),D.every((function(t){return t}))){k=A,x=!1;break}S.set(A,D)}if(x)for(var z=function(t){var n=v.find((function(n){var e=S.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return k=n,"break"},N=d?3:1;N>0&&"break"!==z(N);N--);n.placement!==k&&(n.modifiersData[i]._skip=!0,n.placement=k,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function gC(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function dC(t){return[ak,lk,uk,sk].some((function(n){return t[n]>=0}))}const pC={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,a=vk.reduce((function(t,e){return t[e]=function(t,n,e){var i=Ek(t),r=[sk,ak].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,a=o[0],u=o[1];return a=a||0,u=(u||0)*r,[sk,lk].indexOf(i)>=0?{x:u,y:a}:{x:a,y:u}}(e,n.rects,o),t}),{}),u=a[n.placement],l=u.x,s=u.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=s),n.modifiersData[i]=a}},mC={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,a=e.altAxis,u=void 0!==a&&a,l=e.boundary,s=e.rootBoundary,c=e.altBoundary,h=e.padding,f=e.tether,g=void 0===f||f,d=e.tetherOffset,p=void 0===d?0:d,m=cC(n,{boundary:l,rootBoundary:s,padding:h,altBoundary:c}),_=Ek(n.placement),y=$k(n.placement),v=!y,b=Gk(_),w="x"===b?"y":"x",S=n.modifiersData.popperOffsets,x=n.rects.reference,k=n.rects.popper,C="function"==typeof p?p(Object.assign({},n.rects,{placement:n.placement})):p,A="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),E=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,M={x:0,y:0};if(S){if(o){var T,O="y"===b?ak:sk,P="y"===b?uk:lk,j="y"===b?"height":"width",B=S[b],D=B+m[O],z=B-m[P],N=g?-k[j]/2:0,R=y===fk?x[j]:k[j],F=y===fk?-k[j]:-x[j],L=n.elements.arrow,I=g&&L?Dk(L):{width:0,height:0},H=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=H[O],K=H[P],U=Kk(0,x[j],I[j]),q=v?x[j]/2-N-U-G-A.mainAxis:R-U-G-A.mainAxis,W=v?-x[j]/2+N+U+K+A.mainAxis:F+U+K+A.mainAxis,$=n.elements.arrow&&Hk(n.elements.arrow),Y=$?"y"===b?$.clientTop||0:$.clientLeft||0:0,V=null!=(T=null==E?void 0:E[b])?T:0,Z=B+W-V,X=Kk(g?Tk(D,B+q-V-Y):D,B,g?Mk(z,Z):z);S[b]=X,M[b]=X-B}if(u){var J,Q="x"===b?ak:sk,tt="x"===b?uk:lk,nt=S[w],et="y"===w?"height":"width",it=nt+m[Q],rt=nt-m[tt],ot=-1!==[ak,sk].indexOf(_),at=null!=(J=null==E?void 0:E[w])?J:0,ut=ot?it:nt-x[et]-k[et]-at+A.altAxis,lt=ot?nt+x[et]+k[et]-at-A.altAxis:rt,st=g&&ot?function(t,n,e){var i=Kk(t,n,e);return i>e?e:i}(ut,nt,lt):Kk(g?ut:it,nt,g?lt:rt);S[w]=st,M[w]=st-nt}n.modifiersData[i]=M}},requiresIfExists:["offset"]};function _C(t,n,e){void 0===e&&(e=!1);var i,r,o=kk(n),a=kk(n)&&function(t){var n=t.getBoundingClientRect(),e=Ok(n.width)/t.offsetWidth||1,i=Ok(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),u=Fk(n),l=Bk(t,a,e),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!e)&&(("body"!==wk(n)||iC(u))&&(s=(i=n)!==Sk(i)&&kk(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:nC(i)),kk(n)?((c=Bk(n,!0)).x+=n.clientLeft,c.y+=n.clientTop):u&&(c.x=eC(u))),{x:l.left+s.scrollLeft-c.x,y:l.top+s.scrollTop-c.y,width:l.width,height:l.height}}function yC(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var vC={placement:"bottom",modifiers:[],strategy:"absolute"};function bC(){for(var t=arguments.length,n=new Array(t),e=0;e0&&void 0!==arguments[0]?arguments[0]:[0,0];return function(){return{width:0,height:0,top:t[1],right:t[0],bottom:t[1],left:t[0]}}}var TC=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&CC(t,n)}(o,t);var n,e,i,r=AC(o);function o(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this))._arrow=ch("arrow",""),t._arrowStyle={content:"",background:"inherit",border:"inherit","border-width":"0 1px 1px 0",height:"10px",position:"absolute",transform:"rotate(45deg)",width:"10px","z-index":"-1"},t._background=Bh(By.light),t._body=ch("body",""),t._bodyStyle={color:By.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","font-weight":"400","z-index":"1"},t._border=Bh("1px solid rgba(0, 0, 0, 0.1)"),t._borderRadius=Bh("2px"),t._className="d3plus-tooltip",t._data=[],t._footer=ch("footer",""),t._footerStyle={color:By.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","font-weight":"400","margin-top":"5px","z-index":"1"},t._height=Bh("auto"),t._id=function(t,n){return"".concat(n)},t._offset=Bh(5),t._padding=Bh("10px"),t._parent="body",t._pointerEvents=Bh("auto"),t._popperClasses={},t._position=function(t){return[t.x,t.y]},t._prefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"-o-transform"in document.body.style?"-o-":"",t._tableStyle={"border-collapse":"collapse","border-spacing":"0",width:"100%"},t._tbody=[],t._tbodyStyle={color:By.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","text-align":"center"},t._thead=[],t._theadStyle={color:By.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"12px","font-weight":"600","text-align":"center"},t._title=ch("title",""),t._titleStyle={color:By.dark,"font-family":"'Roboto', 'Helvetica Neue', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif","font-size":"16px","font-weight":"600","margin-bottom":"5px"},t._trStyle={"border-top":"1px solid rgba(0, 0, 0, 0.1)"},t._tdStyle={},t._width=Bh("auto"),t}return n=o,e=[{key:"render",value:function(t){var n=this,e=this,i=$f(this._parent).selectAll(".".concat(this._className)).data(this._data,this._id),r=i.enter().append("div").attr("class",this._className),o=i.merge(r);function a(t){r.append("div").attr("class","d3plus-tooltip-".concat(t)).attr("id",(function(n,i){return"d3plus-tooltip-".concat(t,"-").concat(n?e._id(n,i):"")})),gp(o.select(".d3plus-tooltip-".concat(t)).html((function(n,i){return e["_".concat(t)](n,i)})).style("display",(function(n,i){var r=e["_".concat(t)](n,i);return!1!==r&&null!=r?"block":"none"})),e["_".concat(t,"Style")])}function u(t){if("function"==typeof t){var n=$f(this.parentNode.parentNode).datum();return t(n,e._data.indexOf(n))}return t}function l(t){t.style("background",e._background).style("".concat(e._prefix,"border-radius"),e._borderRadius).style("pointer-events",e._pointerEvents).style("padding",e._padding).style("width",e._width).style("height",e._height).style("border",(function(t,n){var i=$f(this).style("border");return"0px none rgb(0, 0, 0)"!==i?i:e._border(t,n)}))}a("title"),a("body");var s=r.append("table").attr("class","d3plus-tooltip-table");gp(o.select(".d3plus-tooltip-table"),this._tableStyle),s.append("thead").attr("class","d3plus-tooltip-thead");var c=o.select(".d3plus-tooltip-thead");gp(c,this._theadStyle);var h=c.selectAll("tr").data([0]),f=h.enter().append("tr");h.exit().remove();var g=h.merge(f);gp(g,this._trStyle);var d=g.selectAll("th").data(this._thead);d.enter().append("th").merge(d).html(u),d.exit().remove(),s.append("tbody").attr("class","d3plus-tooltip-tbody");var p=o.select(".d3plus-tooltip-tbody");gp(p,this._tbodyStyle);var m=p.selectAll("tr").data(this._tbody),_=m.enter().append("tr");m.exit().remove();var y=m.merge(_);gp(y,this._trStyle);var v=y.selectAll("td").data((function(t){return t}));return v.enter().append("td").merge(v).html(u),gp(v,this._tdStyle),a("footer"),a("arrow"),r.attr("id",(function(t,e){return"d3plus-tooltip-".concat(t?n._id(t,e):"")})).call(l).each((function(t,i){var r=e._id(t,i),o=document.getElementById("d3plus-tooltip-".concat(r)),a=document.getElementById("d3plus-tooltip-arrow-".concat(r)),u=a.offsetHeight,l=a.getBoundingClientRect().height/2;a.style.bottom="-".concat(u/2,"px");var s=e._position(t,i),c=Array.isArray(s)?{getBoundingClientRect:MC(s)}:s;n._popperClasses[r]=SC(c,o,{placement:"top",placements:["top","bottom"],modifiers:[{name:"arrow",options:{element:a}},{name:"offset",options:{offset:[0,e._offset(t,i)+l]}},{name:"preventOverflow",options:{boundary:"scrollParent",padding:5}},{name:"flip",options:{behavior:"flip",boundary:"viewport",padding:5}},{name:"update",enabled:!0,phase:"afterWrite",fn:function(t){var n=t.state,e=n.elements.arrow,i=n.styles.arrow;n.modifiersData.flip._skip?(e.style.transform="".concat(i.transform,"rotate(225deg)"),e.style.top="-".concat(u/2,"px")):(e.style.transform="".concat(i.transform,"rotate(45deg)"),e.style.bottom="-".concat(u/2,"px"))}}],removeOnDestroy:!0})})),o.each((function(t,i){var r=e._id(t,i),o=e._position(t,i),a=n._popperClasses[r];a&&(a.state.elements.reference.getBoundingClientRect=Array.isArray(o)?MC(o):o,a.update())})).call(l),i.exit().each((function(t,i){var r=e._id(t,i),o=n._popperClasses[r];o&&(o.destroy(),delete n._popperClasses[r])})).remove(),t&&setTimeout(t,100),this}},{key:"arrow",value:function(t){return arguments.length?(this._arrow="function"==typeof t?t:Bh(t),this):this._arrow}},{key:"arrowStyle",value:function(t){return arguments.length?(this._arrowStyle=Object.assign(this._arrowStyle,t),this):this._arrowStyle}},{key:"background",value:function(t){return arguments.length?(this._background="function"==typeof t?t:Bh(t),this):this._background}},{key:"body",value:function(t){return arguments.length?(this._body="function"==typeof t?t:Bh(t),this):this._body}},{key:"bodyStyle",value:function(t){return arguments.length?(this._bodyStyle=Object.assign(this._bodyStyle,t),this):this._bodyStyle}},{key:"border",value:function(t){return arguments.length?(this._border="function"==typeof t?t:Bh(t),this):this._border}},{key:"borderRadius",value:function(t){return arguments.length?(this._borderRadius="function"==typeof t?t:Bh(t),this):this._borderRadius}},{key:"className",value:function(t){return arguments.length?(this._className=t,this):this._className}},{key:"data",value:function(t){return arguments.length?(this._data=t,this):this._data}},{key:"footer",value:function(t){return arguments.length?(this._footer="function"==typeof t?t:Bh(t),this):this._footer}},{key:"footerStyle",value:function(t){return arguments.length?(this._footerStyle=Object.assign(this._footerStyle,t),this):this._footerStyle}},{key:"height",value:function(t){return arguments.length?(this._height="function"==typeof t?t:Bh(t),this):this._height}},{key:"id",value:function(t){return arguments.length?(this._id="function"==typeof t?t:Bh(t),this):this._id}},{key:"offset",value:function(t){return arguments.length?(this._offset="function"==typeof t?t:Bh(t),this):this._offset}},{key:"padding",value:function(t){return arguments.length?(this._padding="function"==typeof t?t:Bh(t),this):this._padding}},{key:"parent",value:function(t){return arguments.length?(this._parent=t,this):this._parent}},{key:"pointerEvents",value:function(t){return arguments.length?(this._pointerEvents="function"==typeof t?t:Bh(t),this):this._pointerEvents}},{key:"position",value:function(t){return arguments.length?(this._position="string"==typeof t?Bh($f(t).node()||[0,0]):"function"==typeof t?t:Bh(t),this):this._position}},{key:"tableStyle",value:function(t){return arguments.length?(this._tableStyle=Object.assign(this._tableStyle,t),this):this._tableStyle}},{key:"tbody",value:function(t){return arguments.length?(this._tbody=t,this):this._tbody}},{key:"tbodyStyle",value:function(t){return arguments.length?(this._tbodyStyle=Object.assign(this._tbodyStyle,t),this):this._tbodyStyle}},{key:"thead",value:function(t){return arguments.length?(this._thead=t,this):this._thead}},{key:"theadStyle",value:function(t){return arguments.length?(this._theadStyle=Object.assign(this._theadStyle,t),this):this._theadStyle}},{key:"title",value:function(t){return arguments.length?(this._title="function"==typeof t?t:Bh(t),this):this._title}},{key:"titleStyle",value:function(t){return arguments.length?(this._titleStyle=Object.assign(this._titleStyle,t),this):this._titleStyle}},{key:"trStyle",value:function(t){return arguments.length?(this._trStyle=Object.assign(this._trStyle,t),this):this._trStyle}},{key:"tdStyle",value:function(t){return arguments.length?(this._tdStyle=Object.assign(this._tdStyle,t),this):this._tdStyle}},{key:"width",value:function(t){return arguments.length?(this._width="function"==typeof t?t:Bh(t),this):this._width}}],e&&kC(n.prototype,e),i&&kC(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Th);function OC(t){return OC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},OC(t)}function PC(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{},n=t.duration,e=void 0===n?600:n,i=t.callback;return this.mask.call(this.exit.bind(this),e),this.elem.call(this.exit.bind(this),e),i&&setTimeout(i,e+100),this._isVisible=!1,this}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.callback,e=t.container,i=void 0===e?"body":e,r=t.duration,o=void 0===r?600:r,a=t.html,u=void 0===a?"Please Wait":a,l=t.mask,s=void 0===l?"rgba(0, 0, 0, 0.05)":l,c=t.style,h=void 0===c?{}:c,f=$f(i);return this.mask=f.selectAll("div.d3plus-Mask").data(s?[s]:[]),this.mask=this.mask.enter().append("div").attr("class","d3plus-Mask").style("opacity",1).merge(this.mask),this.mask.exit().call(this.exit.bind(this),o),gp(this.mask,{"background-color":String,bottom:"0px",left:"0px",position:"absolute",right:"0px",top:"0px"}),this.elem=f.selectAll("div.d3plus-Message").data([u]),this.elem=this.elem.enter().append("div").attr("class","d3plus-Message").style("opacity",1).merge(this.elem).html(String),gp(this.elem,h),n&&setTimeout(n,100),this._isVisible=!0,this}}],e&&PC(n.prototype,e),i&&PC(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function BC(){var t=this._history.length,n=sp("g.d3plus-viz-back",{parent:this._select,duration:this._duration,update:{transform:"translate(".concat(this._margin.left,", ").concat(this._margin.top,")")}}).node();this._backClass.data(t?[{text:"← ".concat(this._translate("Back")),x:0,y:0}]:[]).select(n).config(this._backConfig).render(),this._margin.top+=t?this._backClass.fontSize()()+2*this._backClass.padding()():0}function DC(){var t=this,n=this._data,e=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(e)||(e="bottom");var i=["top","bottom"].includes(e),r=this._colorScale&&e,o=this._colorScalePadding()?this._padding:{top:0,right:0,bottom:0,left:0},a=this._width-(this._margin.left+this._margin.right+o.left+o.right),u=i?qt([this._colorScaleMaxSize,a]):this._width-(this._margin.left+this._margin.right),l=this._height-(this._margin.bottom+this._margin.top+o.bottom+o.top),s=i?this._height-(this._margin.bottom+this._margin.top):qt([this._colorScaleMaxSize,l]),c={opacity:e?1:0,transform:"translate(".concat(i?this._margin.left+o.left+(a-u)/2:this._margin.left,", ").concat(i?this._margin.top:this._margin.top+o.top+(l-s)/2,")")},h=sp("g.d3plus-viz-colorScale",{condition:r&&!this._colorScaleConfig.select,enter:c,parent:this._select,duration:this._duration,update:c}).node();if(this._colorScale){var f=n.filter((function(n,e){var i=t._colorScale(n,e);return null!=i}));if(this._colorScaleClass.align({bottom:"end",left:"start",right:"end",top:"start"}[e]||"bottom").duration(this._duration).data(f).height(s).locale(this._locale).orient(e).select(h).value(this._colorScale).width(u).config(this._colorScaleConfig).render(),r){var g=this._colorScaleClass.outerBounds();!this._colorScaleConfig.select&&g.height&&(this._margin[e]+=i?g.height+2*this._legendClass.padding():g.width+2*this._legendClass.padding())}}}var zC=["fill","opacity","texture"];function NC(t,n){return this._drawLabel(t,n,this._legendDepth)}function RC(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[],i=function(n,e,i){var r=t._shape(n,e);"fill"===i&&"Line"===r&&(i="stroke");var o=t._shapeConfig[r]&&t._shapeConfig[r][i]?t._shapeConfig[r][i]:t._shapeConfig[i];return"function"==typeof o?o.bind(t)(n,e):o},r=function(t,n){return zC.map((function(e){return i(t,n,e)})).join("_")};Dt(this._colorScale?n.filter((function(n,e){return void 0===t._colorScale(n,e)})):n,(function(n){return e.push(hp(n,t._aggs))}),r),e.sort(this._legendSort);var o=e.map((function(n,e){return t._ids(n,e).slice(0,t._drawDepth+1)}));this._legendDepth=0;for(var a=function(n){var i=o.map((function(t){return t[n]}));if(!i.some((function(t){return t instanceof Array}))&&Array.from(new Set(i)).length===e.length)return t._legendDepth=n,"break"},u=0;u<=this._drawDepth&&"break"!==a(u);u++);var l=function(n,e){var i=t._id(n,e);return i instanceof Array&&(i=i[0]),t._hidden.includes(i)||t._solo.length&&!t._solo.includes(i)},s=this._legendClass.outerBounds(),c=this.config(),h=this._legendPosition.bind(this)(c);[!1,"top","bottom","left","right"].includes(h)||(h="bottom");var f=["top","bottom"].includes(h),g=this._legendPadding()?this._padding:{top:0,right:0,bottom:0,left:0},d={transform:"translate(".concat(f?this._margin.left+g.left:this._margin.left,", ").concat(f?this._margin.top:this._margin.top+g.top,")")},p=this._legend.bind(this)(c,e),m=sp("g.d3plus-viz-legend",{condition:p&&!this._legendConfig.select,enter:d,parent:this._select,duration:this._duration,update:d}).node();this._legendClass.id(r).align(f?"center":h).direction(f?"row":"column").duration(this._duration).data(p?e:[]).height(f?this._height-(this._margin.bottom+this._margin.top):this._height-(this._margin.bottom+this._margin.top+g.bottom+g.top)).locale(this._locale).parent(this).select(m).verticalAlign(f?h:"middle").width(f?this._width-(this._margin.left+this._margin.right+g.left+g.right):this._width-(this._margin.left+this._margin.right)).shapeConfig(jh.bind(this)(this._shapeConfig,"legend")).shapeConfig({fill:function(n,e){return l(n,e)?t._hiddenColor(n,e):i(n,e,"fill")},labelConfig:{fontOpacity:function(n,e){return l(n,e)?t._hiddenOpacity(n,e):1}}}).config(this._legendConfig).render(),!this._legendConfig.select&&s.height&&(this._margin[h]+=f?s.height+2*this._legendClass.padding():s.width+2*this._legendClass.padding())}function FC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=!!this._subtitle&&this._subtitle(t),e=this._subtitlePadding()?this._padding:{top:0,right:0,bottom:0,left:0},i={transform:"translate(".concat(this._margin.left+e.left,", ").concat(this._margin.top,")")},r=sp("g.d3plus-viz-subtitle",{enter:i,parent:this._select,duration:0,update:i}).node();this._subtitleClass.data(n?[{text:n}]:[]).locale(this._locale).select(r).width(this._width-(this._margin.left+this._margin.right+e.left+e.right)).config(this._subtitleConfig).render(),this._margin.top+=n?r.getBBox().height+2*this._subtitleConfig.padding:0}function LC(t){var n=this;t instanceof Array||(t=[t,t]),JSON.stringify(t)!==JSON.stringify(this._timelineSelection)&&(this._timelineSelection=t,t=t.map(Number),this.timeFilter((function(e){var i=yw(n._time(e)).getTime();return i>=t[0]&&i<=t[1]})).render())}function IC(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this._time&&this._timeline,i=e?cp(this._data.map(this._time)).map(yw):[];e=e&&i.length>1;var r=this._timelinePadding()?this._padding:{top:0,right:0,bottom:0,left:0},o={transform:"translate(".concat(this._margin.left+r.left,", 0)")},a=sp("g.d3plus-viz-timeline",{condition:e,enter:o,parent:this._select,duration:this._duration,update:o}).node();if(e){var u=this._timelineClass.domain(Mt(i)).duration(this._duration).height(this._height-this._margin.bottom).locale(this._locale).select(a).ticks(i.sort((function(t,n){return+t-+n}))).width(this._width-(this._margin.left+this._margin.right+r.left+r.right)),l=Mt(n.map(this._time).map(yw));this._timelineSelection?(this._timelineSelection[0]l[1]&&(this._timelineSelection[1]=l[1])):this._timelineSelection=this._timelineDefault||l,u.selection(this._timelineSelection);var s=this._timelineConfig;u.config(s).on("brush",(function(n){LC.bind(t)(n),s.on&&s.on.brush&&s.on.brush(n)})).on("end",(function(n){LC.bind(t)(n),s.on&&s.on.end&&s.on.end(n)})).render(),this._margin.bottom+=u.outerBounds().height+2*u.padding()}}function HC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=!!this._title&&this._title(t),e=this._titlePadding()?this._padding:{top:0,right:0,bottom:0,left:0},i={transform:"translate(".concat(this._margin.left+e.left,", ").concat(this._margin.top,")")},r=sp("g.d3plus-viz-title",{enter:i,parent:this._select,duration:0,update:i}).node();this._titleClass.data(n?[{text:n}]:[]).locale(this._locale).select(r).width(this._width-(this._margin.left+this._margin.right+e.left+e.right)).config(this._titleConfig).render(),this._margin.top+=n?r.getBBox().height+2*this._titleConfig.padding:0}function GC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n="function"==typeof this._total?Jt(t.map(this._total)):!(!0!==this._total||!this._size)&&Jt(t.map(this._size)),e=this._totalPadding()?this._padding:{top:0,right:0,bottom:0,left:0},i={transform:"translate(".concat(this._margin.left+e.left,", ").concat(this._margin.top,")")},r=sp("g.d3plus-viz-total",{enter:i,parent:this._select,duration:0,update:i}).node();this._totalClass.data(n?[{text:this._totalFormat(n)}]:[]).locale(this._locale).select(r).width(this._width-(this._margin.left+this._margin.right+e.left+e.right)).config(this._totalConfig).render(),this._margin.top+=n?r.getBBox().height+2*this._totalConfig.padding:0}function KC(t,n){if(t){if(void 0===t.tagName||["BODY","HTML"].indexOf(t.tagName)>=0){var e=window["inner".concat(n.charAt(0).toUpperCase()+n.slice(1))],i=$f(t);return"width"===n?(e-=parseFloat(i.style("margin-left"),10),e-=parseFloat(i.style("margin-right"),10),e-=parseFloat(i.style("padding-left"),10),e-=parseFloat(i.style("padding-right"),10)):(e-=parseFloat(i.style("margin-top"),10),e-=parseFloat(i.style("margin-bottom"),10),e-=parseFloat(i.style("padding-top"),10),e-=parseFloat(i.style("padding-bottom"),10)),e}var r=parseFloat($f(t).style(n),10);return"number"==typeof r&&r>0?r:KC(t.parentNode,n)}}function UC(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,i=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,r=t.getBoundingClientRect(),o=r.height,a=r.left+e,u=r.top+i,l=r.width;return i+window.innerHeight>u+n&&i+na+n&&e+n=0&&(this._solo=[]),this._hidden.length===l&&(this._hidden=[]),this.render()):u>=0&&(this._solo=[],this._hidden=[],this.render()):(u<0&&this._hidden.length=0?this._hidden.splice(a,o.length):u>=0?(this._solo=[],this._hidden=[]):this._solo.length&&u<0?(this._solo=this._solo.concat(o),this._solo.length===l&&(this._solo=[])):(this._hidden=this._hidden.concat(o),this._hidden.length===l&&(this._hidden=[])),this.render())}function $C(t,n){var e=this;if(1!==this._shapeConfig.hoverOpacity){var i=this._id(t,n);i instanceof Array||(i=[i]),this.hover((function(t,n){var r=e._id(t,n);return r instanceof Array||(r=[r]),i.some((function(t){return r.includes(t)}))}))}}function YC(t,n){var e=this;setTimeout((function(){1!==e._shapeConfig.hoverOpacity&&e._hover&&!e._hover(t,n)||e.hover(!1);var i=e._tooltipClass.data();if(i.length&&e._tooltip(t,n)){for(var r=i[0];r.__d3plus__&&r.data;)r=r.data;e._id(r)===e._id(t)&&e._tooltipClass.data([]).render()}}),50),this._select.style("cursor","auto")}function VC(t,n,e,i){var r=this,o=i.touches?[i.touches[0].clientX,i.touches[0].clientY]:[i.clientX,i.clientY],a=Zt(this._legendClass.data().map((function(t,n){var e=r._id(t,n);return e instanceof Array||(e=[e]),e}))).length;if(t&&this._tooltip(t,n)){var u=this._id(t,n);u instanceof Array&&(u=u[0]);var l=this._translate,s=WC.bind(this).toString(),c=Object.keys(this._on).some((function(t){return["click","click.legend"].includes(t)&&r._on[t]&&r._on[t].toString()!==s})),h=this._on["click.legend"]&&this._on["click.legend"].toString()===s,f=this._drawDepth").concat(l("Shift+Click to Hide")):this._solo.length&&!d||p?"".concat(l("Click to Show"),"
").concat(l("Shift+Click to Highlight")):1===this._solo.length&&d||this._hidden.length===a-1?l("Click to Show All"):"".concat(l("Click to Hide"),"
").concat(l("Shift+Click to Highlight")))).title(this._legendConfig.label?this._legendClass.label():NC.bind(this)).position(o).config(jh.bind(this)(this._tooltipConfig)).config(jh.bind(this)(this._legendTooltip)).render()}}function ZC(t,n,e,i){var r=this;if(t&&this._tooltip(t,n)){var o=qC.bind(this).toString(),a=Object.keys(this._on).some((function(t){return["click","click.shape"].includes(t)&&r._on[t]&&r._on[t].toString()!==o})),u=this._on["click.shape"]&&this._on["click.shape"].toString()===o,l=this._drawDeptht.length)&&(n=t.length);for(var e=0,i=new Array(n);e0&&void 0!==arguments[0]&&arguments[0])?this._brushGroup.style("display","inline"):this._brushGroup.style("display","none"),!tA&&this._zoom?(this._container.call(this._zoomBehavior),this._zoomScroll||this._container.on("wheel.zoom",null),this._zoomPan||this._container.on("mousedown.zoom mousemove.zoom",null).on("touchstart.zoom touchmove.zoom touchend.zoom touchcancel.zoom",null)):this._container.on(".zoom",null)}function iA(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._zoomGroup&&(n?this._zoomGroup.transition().duration(n).attr("transform",t):this._zoomGroup.attr("transform",t)),this._renderTiles&&this._renderTiles(Sx(this._container.node()),n)}function rA(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._container){var n=this._zoomBehavior.extent().bind(document)()[1].map((function(t){return t/2})),e=this._zoomBehavior.scaleExtent(),i=Sx(this._container.node());if(t){var r=[(n[0]-i.x)/i.k,(n[1]-i.y)/i.k];i.k=Math.min(e[1],i.k*t),i.k<=e[0]?(i.k=e[0],i.x=0,i.y=0):(i.x+=n[0]-(r[0]*i.k+i.x),i.y+=n[1]-(r[1]*i.k+i.y))}else i.k=e[0],i.x=0,i.y=0;iA.bind(this)(i,this._duration)}}function oA(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._duration,e=this._zoomBehavior.scaleExtent(),i=Sx(this._container.node());if(t){var r,o,a=JC(this._zoomBehavior.translateExtent()[1],2),u=a[0],l=a[1],s=t[1][0]-t[0][0],c=t[1][1]-t[0][1],h=Math.min(e[1],1/Math.max(s/u,c/l));s/c0?i.x=0:i.x0?i.y=0:i.yt.length)&&(n=t.length);for(var e=0,i=new Array(n);e600}function SA(t,n,e){for(;n.__d3plus__&&n.data;)e=(n=n.data).i;return t(n,e)}var xA=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&_A(t,n)}(o,t);var n,e,i,r=yA(o);function o(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this))._aggs={},t._ariaHidden=!0,t._attribution=!1,t._attributionStyle={background:"rgba(255, 255, 255, 0.75)",border:"1px solid rgba(0, 0, 0, 0.25)",color:"rgba(0, 0, 0, 0.75)",display:"block",font:"400 11px/11px 'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",margin:"5px",opacity:.75,padding:"4px 6px 3px"},t._backClass=(new _v).on("click",(function(){t._history.length?t.config(t._history.pop()).render():t.depth(t._drawDepth-1).filter(!1).render()})).on("mousemove",(function(){return t._backClass.select().style("cursor","pointer")})),t._backConfig={fontSize:10,padding:5,resize:!1},t._cache=!0,t._color=function(n,e){return t._groupBy[0](n,e)},t._colorScaleClass=new Xx,t._colorScaleConfig={scale:"jenks"},t._colorScalePadding=wA,t._colorScalePosition=function(){return t._width>1.5*t._height?"right":"bottom"},t._colorScaleMaxSize=600,t._data=[],t._dataCutoff=100,t._detectResize=!0,t._detectResizeDelay=400,t._detectVisible=!0,t._detectVisibleInterval=1e3,t._downloadButton=!1,t._downloadConfig={type:"png"},t._downloadPosition="top",t._duration=600,t._hidden=[],t._hiddenColor=Bh("#aaa"),t._hiddenOpacity=Bh(.5),t._history=[],t._groupBy=[ch("id")],t._legend=function(n,e){var i=Ut(e,(function(n,e){var i=t._groupBy[t._legendDepth].bind(vA(t))(n,e);return i instanceof Array?i.length:1}));return e.length>1&&i<=2},t._legendClass=new Gx,t._legendConfig={label:NC.bind(vA(t)),shapeConfig:{ariaLabel:NC.bind(vA(t)),labelConfig:{fontColor:void 0,fontResize:!1,padding:0}}},t._legendFilterInvert=Bh(!1),t._legendPadding=wA,t._legendPosition=function(){return t._width>1.5*t._height?"right":"bottom"},t._legendSort=function(n,e){return t._drawLabel(n).localeCompare(t._drawLabel(e))},t._legendTooltip={},t._loadingHTML=function(){return"\n
\n ".concat(t._translate("Loading Visualization"),'\n ').concat(t._translate("Powered by D3plus"),"\n
")},t._loadingMessage=!0,t._lrucache=jx(10),t._messageClass=new jC,t._messageMask="rgba(0, 0, 0, 0.05)",t._messageStyle={bottom:"0",left:"0",position:"absolute",right:"0","text-align":"center",top:"0"},t._noDataHTML=function(){return"\n
\n ".concat(t._translate("No Data Available"),"\n
")},t._noDataMessage=!0,t._on={"click.shape":qC.bind(vA(t)),"click.legend":WC.bind(vA(t)),mouseenter:$C.bind(vA(t)),mouseleave:YC.bind(vA(t)),"mousemove.shape":ZC.bind(vA(t)),"mousemove.legend":VC.bind(vA(t))},t._queue=[],t._resizeContainer="undefined"==typeof window?"":window,t._scrollContainer="undefined"==typeof window?"":window,t._shape=Bh("Rect"),t._shapes=[],t._shapeConfig={ariaLabel:function(n,e){return t._drawLabel(n,e)},fill:function(n,e){for(;n.__d3plus__&&n.data;)e=(n=n.data).i;if(t._colorScale){var i=t._colorScale(n,e);if(null!=i){var r=t._colorScaleClass._colorScale,o=t._colorScaleClass.color();return r?r.domain().length?r(i):r.range()[r.range().length-1]:o instanceof Array?o[o.length-1]:o}}var a=t._color(n,e);return Jg(a)?a:Dy("string"==typeof a?a:JSON.stringify(a))},labelConfig:{fontColor:function(n,e){return zy("function"==typeof t._shapeConfig.fill?t._shapeConfig.fill(n,e):t._shapeConfig.fill)}},opacity:Bh(1),stroke:function(n,e){return Jg("function"==typeof t._shapeConfig.fill?t._shapeConfig.fill(n,e):t._shapeConfig.fill).darker(.25)},role:"presentation",strokeWidth:Bh(0)},t._solo=[],t._subtitleClass=new _v,t._subtitleConfig={ariaHidden:!0,fontSize:12,padding:5,resize:!1,textAnchor:"middle"},t._subtitlePadding=wA,t._svgDesc="",t._svgTitle="",t._timeline=!0,t._timelineClass=(new ok).align("end"),t._timelineConfig={brushing:!1,padding:5},t._timelinePadding=wA,t._threshold=Bh(1e-4),t._thresholdKey=void 0,t._thresholdName=function(){return t._translate("Values")},t._titleClass=new _v,t._titleConfig={ariaHidden:!0,fontSize:16,padding:5,resize:!1,textAnchor:"middle"},t._titlePadding=wA,t._tooltip=Bh(!0),t._tooltipClass=new TC,t._tooltipConfig={pointerEvents:"none",titleStyle:{"max-width":"200px"}},t._totalClass=new _v,t._totalConfig={fontSize:10,padding:5,resize:!1,textAnchor:"middle"},t._totalFormat=function(n){return"".concat(t._translate("Total"),": ").concat(l(n,t._locale))},t._totalPadding=wA,t._zoom=!1,t._zoomBehavior=function(){var t,n,e,i=Cx,r=Ax,o=Ox,a=Mx,u=Tx,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,h=Rd,f=Xf("start","zoom","end"),g=500,d=150,p=0,m=10;function _(t){t.property("__zoom",Ex).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",A).filter(u).on("touchstart.zoom",E).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(l[0],Math.min(l[1],n)))===t.k?t:new bx(n,t.x,t.y)}function v(t,n,e){var i=n[0]-e[0]*t.k,r=n[1]-e[1]*t.k;return i===t.x&&r===t.y?t:new bx(t.k,i,r)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,n,e,i){t.on("start.zoom",(function(){S(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){S(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,a=S(t,o).event(i),u=r.apply(t,o),l=null==e?b(u):"function"==typeof e?e.apply(t,o):e,s=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=t.__zoom,f="function"==typeof n?n.apply(t,o):n,g=h(c.invert(l).concat(s/c.k),f.invert(l).concat(s/f.k));return function(t){if(1===t)t=f;else{var n=g(t),e=s/n[2];t=new bx(e,l[0]-n[0]*e,l[1]-n[1]*e)}a.zoom(null,t)}}))}function S(t,n,e){return!e&&t.__zooming||new x(t,n)}function x(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,n),this.taps=0}function k(t,...n){if(i.apply(this,arguments)){var e=S(this,n).event(t),r=this.__zoom,u=Math.max(l[0],Math.min(l[1],r.k*Math.pow(2,a.apply(this,arguments)))),c=Vf(t);if(e.wheel)e.mouse[0][0]===c[0]&&e.mouse[0][1]===c[1]||(e.mouse[1]=r.invert(e.mouse[0]=c)),clearTimeout(e.wheel);else{if(r.k===u)return;e.mouse=[c,r.invert(c)],Bg(this),e.start()}kx(t),e.wheel=setTimeout((function(){e.wheel=null,e.end()}),d),e.zoom("mouse",o(v(y(r,u),e.mouse[0],e.mouse[1]),e.extent,s))}}function C(t,...n){if(!e&&i.apply(this,arguments)){var r=t.currentTarget,a=S(this,n,!0).event(t),u=$f(t.view).on("mousemove.zoom",(function(t){if(kx(t),!a.moved){var n=t.clientX-c,e=t.clientY-h;a.moved=n*n+e*e>p}a.event(t).zoom("mouse",o(v(a.that.__zoom,a.mouse[0]=Vf(t,r),a.mouse[1]),a.extent,s))}),!0).on("mouseup.zoom",(function(t){u.on("mousemove.zoom mouseup.zoom",null),RS(t.view,a.moved),kx(t),a.event(t).end()}),!0),l=Vf(t,r),c=t.clientX,h=t.clientY;NS(t.view),xx(t),a.mouse=[l,this.__zoom.invert(l)],Bg(this),a.start()}}function A(t,...n){if(i.apply(this,arguments)){var e=this.__zoom,a=Vf(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),l=e.k*(t.shiftKey?.5:2),h=o(v(y(e,l),a,u),r.apply(this,n),s);kx(t),c>0?$f(this).transition().duration(c).call(w,h,a,t):$f(this).call(_.transform,h,a,t)}}function E(e,...r){if(i.apply(this,arguments)){var o,a,u,l,s=e.touches,c=s.length,h=S(this,r,e.changedTouches.length===c).event(e);for(xx(e),a=0;a=0?this._depth:0,this._groupBy.length-1]):this._groupBy.length-1,this._id=function(n,e){var i=SA(t._groupBy[t._drawDepth],n,e);return"number"==typeof i?"".concat(i):i},this._ids=function(n,e){return t._groupBy.map((function(t){return"".concat(SA(t,n,e))})).filter(Boolean)},this._drawLabel=function(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._drawDepth;if(!e)return"";for(;e.__d3plus__&&e.data;)i=(e=e.data).i;if(e._isAggregation)return"".concat(t._thresholdName(e,i)," < ").concat(l(100*e._threshold,t._locale),"%");if(t._label&&r===t._drawDepth)return"".concat(t._label(e,i));var o=n._ids(e,i).slice(0,r+1),a=o.reverse().find((function(t){return!(t instanceof Array)}))||o[o.length-1];return a instanceof Array?function(t){return t.reduce((function(n,e,i){return i?i===t.length-1&&1===i?n+=" and ".concat(e):i===t.length-1?n+=", and ".concat(e):n+=", ".concat(e):n+=e,n}),"")}(a):"".concat(a)},this._time&&!this._timeFilter&&this._data.length){var e=this._data.map(this._time).map(yw),i=this._data[0];if(this._discrete&&"_".concat(this._discrete)in this&&this["_".concat(this._discrete)](i,0)===this._time(i,0))this._timeFilter=function(){return!0};else{var r=+Ut(e);this._timeFilter=function(n,e){return+yw(t._time(n,e))===r}}}this._filteredData=[],this._legendData=[];var o=[];if(this._data.length){o=this._timeFilter?this._data.filter(this._timeFilter):this._data,this._filter&&(o=o.filter(this._filter));for(var a=[],u=0;u<=this._drawDepth;u++)a.push(this._groupBy[u]);this._discrete&&"_".concat(this._discrete)in this&&a.push(this["_".concat(this._discrete)]),this._discrete&&"_".concat(this._discrete,"2")in this&&a.push(this["_".concat(this._discrete,"2")]);var s=Dt.apply(void 0,[o,function(n){var e=t._data.indexOf(n[0]),i=t._shape(n[0],e),r=t._id(n[0],e),o=hp(n,t._aggs);t._hidden.includes(r)||t._solo.length&&!t._solo.includes(r)||(t._discrete||"Line"!==i?t._filteredData.push(o):t._filteredData=t._filteredData.concat(n)),t._legendData.push(o)}].concat(a));this._filteredData=this._thresholdFunction(this._filteredData,s)}var c=function(t,...n){return zt(t,Bt,Bt,n)}(this._filteredData,this._id).size;c>this._dataCutoff?(void 0===this._userHover&&(this._userHover=this._shapeConfig.hoverOpacity||.5),void 0===this._userDuration&&(this._userDuration=this._shapeConfig.duration||600),this._shapeConfig.hoverOpacity=1,this._shapeConfig.duration=0):void 0!==this._userHover&&(this._shapeConfig.hoverOpacity=this._userHover,this._shapeConfig.duration=this._userDuration),this._noDataMessage&&!this._filteredData.length&&(this._messageClass.render({container:this._select.node().parentNode,html:this._noDataHTML(this),mask:!1,style:this._messageStyle}),this._select.transition().duration(this._duration).attr("opacity",0))}},{key:"_draw",value:function(){var t=this._legendPosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(t)||(t="bottom");var n=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(n)||(n="bottom"),"left"!==t&&"right"!==t||RC.bind(this)(this._legendData),"left"!==n&&"right"!==n&&!1!==n||DC.bind(this)(this._filteredData),BC.bind(this)(),HC.bind(this)(this._filteredData),FC.bind(this)(this._filteredData),GC.bind(this)(this._filteredData),IC.bind(this)(this._filteredData),"top"!==t&&"bottom"!==t||RC.bind(this)(this._legendData),"top"!==n&&"bottom"!==n||DC.bind(this)(this._filteredData),this._shapes=[]}},{key:"_thresholdFunction",value:function(t){return t}},{key:"render",value:function(t){var n=this;if(this._margin={bottom:0,left:0,right:0,top:0},this._padding={bottom:0,left:0,right:0,top:0},void 0===this._select||"svg"!==this._select.node().tagName.toLowerCase()){var e=(void 0===this._select?$f("body").append("div"):this._select).append("svg");this.select(e.node())}function i(){var t=this._select.style("display");this._select.style("display","none");var n=function(t){return[KC(t,"width"),KC(t,"height")]}(this._select.node().parentNode),e=gA(n,2),i=e[0],r=e[1];i-=parseFloat(this._select.style("border-left-width"),10),i-=parseFloat(this._select.style("border-right-width"),10),r-=parseFloat(this._select.style("border-top-width"),10),r-=parseFloat(this._select.style("border-bottom-width"),10),this._select.style("display",t),this._autoWidth&&(this.width(i),this._select.style("width","".concat(this._width,"px")).attr("width","".concat(this._width,"px"))),this._autoHeight&&(this.height(r),this._select.style("height","".concat(this._height,"px")).attr("height","".concat(this._height,"px")))}this._width&&this._height||this._detectVisible&&!UC(this._select.node())||(this._autoWidth=void 0===this._width,this._autoHeight=void 0===this._height,i.bind(this)()),this._select.attr("class","d3plus-viz").attr("aria-hidden",this._ariaHidden).attr("aria-labelledby","".concat(this._uuid,"-title ").concat(this._uuid,"-desc")).attr("role","img").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").transition().duration(this._duration).style("width",void 0!==this._width?"".concat(this._width,"px"):void 0).style("height",void 0!==this._height?"".concat(this._height,"px"):void 0).attr("width",void 0!==this._width?"".concat(this._width,"px"):void 0).attr("height",void 0!==this._height?"".concat(this._height,"px"):void 0);var r=$f(this._select.node().parentNode);"static"===r.style("position")&&r.style("position","relative"),null===this._select.attr("opacity")&&this._select.attr("opacity",1);var o=this._select.selectAll("title").data([0]),a=o.enter().append("title").attr("id","".concat(this._uuid,"-title"));o.merge(a).text(this._svgTitle);var u=this._select.selectAll("desc").data([0]),l=u.enter().append("desc").attr("id","".concat(this._uuid,"-desc"));if(u.merge(l).text(this._svgDesc),this._visiblePoll=clearInterval(this._visiblePoll),this._resizePoll=clearTimeout(this._resizePoll),this._scrollPoll=clearTimeout(this._scrollPoll),$f(this._scrollContainer).on("scroll.".concat(this._uuid),null),$f(this._resizeContainer).on("resize.".concat(this._uuid),null),this._detectVisible&&"hidden"===this._select.style("visibility"))this._visiblePoll=setInterval((function(){"hidden"!==n._select.style("visibility")&&(n._visiblePoll=clearInterval(n._visiblePoll),n.render(t))}),this._detectVisibleInterval);else if(this._detectVisible&&"none"===this._select.style("display"))this._visiblePoll=setInterval((function(){"none"!==n._select.style("display")&&(n._visiblePoll=clearInterval(n._visiblePoll),n.render(t))}),this._detectVisibleInterval);else if(this._detectVisible&&!UC(this._select.node()))$f(this._scrollContainer).on("scroll.".concat(this._uuid),(function(){n._scrollPoll||(n._scrollPoll=setTimeout((function(){UC(n._select.node())&&($f(n._scrollContainer).on("scroll.".concat(n._uuid),null),n.render(t)),n._scrollPoll=clearTimeout(n._scrollPoll)}),n._detectVisibleInterval))}));else{var s=_x();this._queue.forEach((function(t){var e=n._cache?n._lrucache.get("".concat(t[3],"_").concat(t[1])):void 0;e?n["_".concat(t[3])]=t[2]?t[2](e):e:s.defer.apply(s,fA(t))})),this._queue=[],this._loadingMessage&&s._tasks.length&&this._messageClass.render({container:this._select.node().parentNode,html:this._loadingHTML(this),mask:!!this._filteredData&&this._messageMask,style:this._messageStyle}),s.awaitAll((function(){var e=n._data instanceof Array&&n._data.length>0?Object.keys(n._data[0]):[],r=n._select.selectAll("g.data-table").data(!n._ariaHidden&&n._data instanceof Array&&n._data.length?[0]:[]),o=r.enter().append("g").attr("class","data-table").attr("role","table");r.exit().remove();var a=r.merge(o).selectAll("text").data(n._data instanceof Array?Xt(0,n._data.length+1):[]);a.exit().remove();var u=a.merge(a.enter().append("text").attr("role","row")).selectAll("tspan").data((function(t,i){return e.map((function(t){return{role:i?"cell":"columnheader",text:i?n._data[i-1][t]:t}}))}));u.exit().remove(),u.merge(u.enter().append("tspan")).attr("role",(function(t){return t.role})).attr("dy","-1000px").html((function(t){return t.text})),n._preDraw(),n._draw(t),nA.bind(n)(),cA.bind(n)(),!n._messageClass._isVisible||n._noDataMessage&&!n._filteredData.length||(n._messageClass.hide(),"0"===n._select.attr("opacity")&&n._select.transition().duration(n._duration).attr("opacity",1)),n._detectResize&&(n._autoWidth||n._autoHeight)&&$f(n._resizeContainer).on("resize.".concat(n._uuid),(function(){n._resizePoll=clearTimeout(n._resizePoll),n._resizePoll=setTimeout((function(){n._resizePoll=clearTimeout(n._resizePoll),i.bind(n)(),n.render(t)}),n._detectResizeDelay)})),t&&setTimeout(t,n._duration+100)}))}return $f("body").on("touchstart.".concat(this._uuid),XC.bind(this)),this}},{key:"active",value:function(t){return this._active=t,1!==this._shapeConfig.activeOpacity&&(this._shapes.forEach((function(n){return n.active(t)})),this._legend&&this._legendClass.active(t)),this}},{key:"aggs",value:function(t){return arguments.length?(this._aggs=gh(this._aggs,t),this):this._aggs}},{key:"ariaHidden",value:function(t){return arguments.length?(this._ariaHidden=t,this):this._ariaHidden}},{key:"attribution",value:function(t){return arguments.length?(this._attribution=t,this):this._attribution}},{key:"attributionStyle",value:function(t){return arguments.length?(this._attributionStyle=gh(this._attributionStyle,t),this):this._attributionStyle}},{key:"backConfig",value:function(t){return arguments.length?(this._backConfig=gh(this._backConfig,t),this):this._backConfig}},{key:"cache",value:function(t){return arguments.length?(this._cache=t,this):this._cache}},{key:"color",value:function(t){return arguments.length?(this._color=t&&"function"!=typeof t?ch(t):t,this):this._color}},{key:"colorScale",value:function(t){return arguments.length?(this._colorScale=t&&"function"!=typeof t?ch(t):t,this):this._colorScale}},{key:"colorScaleConfig",value:function(t){return arguments.length?(this._colorScaleConfig=gh(this._colorScaleConfig,t),this):this._colorScaleConfig}},{key:"colorScalePadding",value:function(t){return arguments.length?(this._colorScalePadding="function"==typeof t?t:Bh(t),this):this._colorScalePadding}},{key:"colorScalePosition",value:function(t){return arguments.length?(this._colorScalePosition="function"==typeof t?t:Bh(t),this):this._colorScalePosition}},{key:"colorScaleMaxSize",value:function(t){return arguments.length?(this._colorScaleMaxSize=t,this):this._colorScaleMaxSize}},{key:"data",value:function(t,n){return arguments.length?(BS.bind(this)(t,n,"data"),this._hidden=[],this._solo=[],this._userData&&JSON.stringify(t)!==JSON.stringify(this._userData)&&(this._timeFilter=!1,this._timelineSelection=!1),this._userData=t,this):this._data}},{key:"dataCutoff",value:function(t){return arguments.length?(this._dataCutoff=t,this):this._dataCutoff}},{key:"depth",value:function(t){return arguments.length?(this._depth=t,this):this._depth}},{key:"detectResize",value:function(t){return arguments.length?(this._detectResize=t,this):this._detectResize}},{key:"detectResizeDelay",value:function(t){return arguments.length?(this._detectResizeDelay=t,this):this._detectResizeDelay}},{key:"detectVisible",value:function(t){return arguments.length?(this._detectVisible=t,this):this._detectVisible}},{key:"detectVisibleInterval",value:function(t){return arguments.length?(this._detectVisibleInterval=t,this):this._detectVisibleInterval}},{key:"discrete",value:function(t){return arguments.length?(this._discrete=t,this):this._discrete}},{key:"downloadButton",value:function(t){return arguments.length?(this._downloadButton=t,this):this._downloadButton}},{key:"downloadConfig",value:function(t){return arguments.length?(this._downloadConfig=gh(this._downloadConfig,t),this):this._downloadConfig}},{key:"downloadPosition",value:function(t){return arguments.length?(this._downloadPosition=t,this):this._downloadPosition}},{key:"duration",value:function(t){return arguments.length?(this._duration=t,this):this._duration}},{key:"filter",value:function(t){return arguments.length?(this._filter=t,this):this._filter}},{key:"groupBy",value:function(t){var n=this;return arguments.length?(this._groupByRaw=t,t instanceof Array||(t=[t]),this._groupBy=t.map((function(t){return"function"==typeof t?t:(n._aggs[t]||(n._aggs[t]=function(t,n){var e=cp(t.map(n).map(String));return 1===e.length?e[0]:e}),ch(t))})),this):this._groupBy}},{key:"height",value:function(t){return arguments.length?(this._height=t,this):this._height}},{key:"hiddenColor",value:function(t){return arguments.length?(this._hiddenColor="function"==typeof t?t:Bh(t),this):this._hiddenColor}},{key:"hiddenOpacity",value:function(t){return arguments.length?(this._hiddenOpacity="function"==typeof t?t:Bh(t),this):this._hiddenOpacity}},{key:"hover",value:function(t){var n=this,e=this._hover=t;if(1!==this._shapeConfig.hoverOpacity){if("function"==typeof t){var i=Zt(this._shapes.map((function(t){return t.data()})));i=i.concat(this._legendClass.data());var r=t?i.filter(t):[],o=[];r.map(this._ids).forEach((function(t){for(var n=1;n<=t.length;n++)o.push(JSON.stringify(t.slice(0,n)))})),o=o.filter((function(t,n){return o.indexOf(t)===n})),o.length&&(e=function(t,e){return o.includes(JSON.stringify(n._ids(t,e)))})}this._shapes.forEach((function(t){return t.hover(e)})),this._legend&&this._legendClass.hover(e)}return this}},{key:"label",value:function(t){return arguments.length?(this._label="function"==typeof t?t:Bh(t),this):this._label}},{key:"legend",value:function(t){return arguments.length?(this._legend="function"==typeof t?t:Bh(t),this):this._legend}},{key:"legendConfig",value:function(t){return arguments.length?(this._legendConfig=gh(this._legendConfig,t),this):this._legendConfig}},{key:"legendFilterInvert",value:function(t){return arguments.length?(this._legendFilterInvert="function"==typeof t?t:Bh(t),this):this._legendFilterInvert}},{key:"legendPadding",value:function(t){return arguments.length?(this._legendPadding="function"==typeof t?t:Bh(t),this):this._legendPadding}},{key:"legendPosition",value:function(t){return arguments.length?(this._legendPosition="function"==typeof t?t:Bh(t),this):this._legendPosition}},{key:"legendSort",value:function(t){return arguments.length?(this._legendSort=t,this):this._legendSort}},{key:"legendTooltip",value:function(t){return arguments.length?(this._legendTooltip=gh(this._legendTooltip,t),this):this._legendTooltip}},{key:"loadingHTML",value:function(t){return arguments.length?(this._loadingHTML="function"==typeof t?t:Bh(t),this):this._loadingHTML}},{key:"loadingMessage",value:function(t){return arguments.length?(this._loadingMessage=t,this):this._loadingMessage}},{key:"messageMask",value:function(t){return arguments.length?(this._messageMask=t,this):this._messageMask}},{key:"messageStyle",value:function(t){return arguments.length?(this._messageStyle=gh(this._messageStyle,t),this):this._messageStyle}},{key:"noDataHTML",value:function(t){return arguments.length?(this._noDataHTML="function"==typeof t?t:Bh(t),this):this._noDataHTML}},{key:"noDataMessage",value:function(t){return arguments.length?(this._noDataMessage=t,this):this._noDataMessage}},{key:"resizeContainer",value:function(t){return arguments.length?(this._resizeContainer=t,this):this._resizeContainer}},{key:"scrollContainer",value:function(t){return arguments.length?(this._scrollContainer=t,this):this._scrollContainer}},{key:"select",value:function(t){return arguments.length?(this._select=$f(t),this):this._select}},{key:"shape",value:function(t){return arguments.length?(this._shape="function"==typeof t?t:Bh(t),this):this._shape}},{key:"shapeConfig",value:function(t){return arguments.length?(this._shapeConfig=gh(this._shapeConfig,t),this):this._shapeConfig}},{key:"subtitle",value:function(t){return arguments.length?(this._subtitle="function"==typeof t?t:Bh(t),this):this._subtitle}},{key:"subtitleConfig",value:function(t){return arguments.length?(this._subtitleConfig=gh(this._subtitleConfig,t),this):this._subtitleConfig}},{key:"subtitlePadding",value:function(t){return arguments.length?(this._subtitlePadding="function"==typeof t?t:Bh(t),this):this._subtitlePadding}},{key:"svgDesc",value:function(t){return arguments.length?(this._svgDesc=t,this):this._svgDesc}},{key:"svgTitle",value:function(t){return arguments.length?(this._svgTitle=t,this):this._svgTitle}},{key:"threshold",value:function(t){return arguments.length?("function"==typeof t?this._threshold=t:isFinite(t)&&!isNaN(t)&&(this._threshold=Bh(1*t)),this):this._threshold}},{key:"thresholdKey",value:function(t){return arguments.length?(this._thresholdKey="function"==typeof t?t:ch(t),this):this._thresholdKey}},{key:"thresholdName",value:function(t){return arguments.length?(this._thresholdName="function"==typeof t?t:Bh(t),this):this._thresholdName}},{key:"time",value:function(t){return arguments.length?("function"==typeof t?this._time=t:(this._time=ch(t),this._aggs[t]||(this._aggs[t]=function(t,n){var e=cp(t.map(n));return 1===e.length?e[0]:e}),this._userTime&&JSON.stringify(t)!==JSON.stringify(this._userTime)&&(this._timeFilter=!1,this._timelineSelection=!1),this._userTime=t),this):this._time}},{key:"timeFilter",value:function(t){return arguments.length?(this._timeFilter=t,this):this._timeFilter}},{key:"timeline",value:function(t){return arguments.length?(this._timeline=t,this):this._timeline}},{key:"timelineConfig",value:function(t){return arguments.length?(this._timelineConfig=gh(this._timelineConfig,t),this):this._timelineConfig}},{key:"timelineDefault",value:function(t){return arguments.length?(t instanceof Array||(t=[t,t]),this._timelineDefault=t.map(yw),this):this._timelineDefault}},{key:"timelinePadding",value:function(t){return arguments.length?(this._timelinePadding="function"==typeof t?t:Bh(t),this):this._timelinePadding}},{key:"title",value:function(t){return arguments.length?(this._title="function"==typeof t?t:Bh(t),this):this._title}},{key:"titleConfig",value:function(t){return arguments.length?(this._titleConfig=gh(this._titleConfig,t),this):this._titleConfig}},{key:"titlePadding",value:function(t){return arguments.length?(this._titlePadding="function"==typeof t?t:Bh(t),this):this._titlePadding}},{key:"tooltip",value:function(t){return arguments.length?(this._tooltip="function"==typeof t?t:Bh(t),this):this._tooltip}},{key:"tooltipConfig",value:function(t){return arguments.length?(this._tooltipConfig=gh(this._tooltipConfig,t),this):this._tooltipConfig}},{key:"total",value:function(t){return arguments.length?(this._total="function"==typeof t?t:!!t&&ch(t),this):this._total}},{key:"totalConfig",value:function(t){return arguments.length?(this._totalConfig=gh(this._totalConfig,t),this):this._totalConfig}},{key:"totalFormat",value:function(t){return arguments.length?(this._totalFormat=t,this):this._totalFormat}},{key:"totalPadding",value:function(t){return arguments.length?(this._totalPadding="function"==typeof t?t:Bh(t),this):this._totalPadding}},{key:"width",value:function(t){return arguments.length?(this._width=t,this):this._width}},{key:"zoom",value:function(t){return arguments.length?(this._zoom=t,this):this._zoom}},{key:"zoomBrushHandleSize",value:function(t){return arguments.length?(this._zoomBrushHandleSize=t,this):this._zoomBrushHandleSize}},{key:"zoomBrushHandleStyle",value:function(t){return arguments.length?(this._zoomBrushHandleStyle=t,this):this._zoomBrushHandleStyle}},{key:"zoomBrushSelectionStyle",value:function(t){return arguments.length?(this._zoomBrushSelectionStyle=t,this):this._zoomBrushSelectionStyle}},{key:"zoomControlStyle",value:function(t){return arguments.length?(this._zoomControlStyle=t,this):this._zoomControlStyle}},{key:"zoomControlStyleActive",value:function(t){return arguments.length?(this._zoomControlStyleActive=t,this):this._zoomControlStyleActive}},{key:"zoomControlStyleHover",value:function(t){return arguments.length?(this._zoomControlStyleHover=t,this):this._zoomControlStyleHover}},{key:"zoomFactor",value:function(t){return arguments.length?(this._zoomFactor=t,this):this._zoomFactor}},{key:"zoomMax",value:function(t){return arguments.length?(this._zoomMax=t,this):this._zoomMax}},{key:"zoomPan",value:function(t){return arguments.length?(this._zoomPan=t,this):this._zoomPan}},{key:"zoomPadding",value:function(t){return arguments.length?(this._zoomPadding=t,this):this._zoomPadding}},{key:"zoomScroll",value:function(t){return arguments.length?(this._zoomScroll=t,this):this._zoomScroll}}],e&&mA(n.prototype,e),i&&mA(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(Th);const kA=function(t,n,e){if(t.padding)t.padding(.5);else{var i=Array.from(new Set(n.map((function(t){return+t[e]})))).reduce((function(t,n,e,i){if(!e)return t;var r=i[e-1];return!t||n-rd[a]:1===a&&(g=f-id[a]),g};if(t.invert&&c())if("log"===n)for(var h=0;h<10&&c();){var f=(0===a?-1:1)*(o[a]<0?-1:1);o[a]+=o[a]*s*f,t.domain(u?o.slice().reverse():o),h++}else if(0===a){var g=t.invert(t(e)+(i+10)*(u?1:-1));go[a]&&(o[a]=d,t.domain(u?o.slice().reverse():o))}return u?o.reverse():o}function MA(t){return MA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MA(t)}function TA(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,o,a,u=[],l=!0,s=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(t){if("string"==typeof t)return OA(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?OA(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OA(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e0})))})),n=m.map((function(t){return Jt(t.filter((function(t){return t<0})))}))}else{var _=r.map((function(t){return t[p?f:h]}));e=_.filter((function(t){return t>0})),n=_.filter((function(t){return t<0}))}var y=g(Ut(e));(p?yg(0))&&(y+=p?-c:c),y=g.invert(y);var v=g(qt(n));return(p?v>g(0):vd[1]&&(d[1]=y),v0})))})),n=m.map((function(t){return Jt(t.filter((function(t){return t<0})))}))}else n=e=r.map((function(t){return t[p?f:h]}));var _=g(Ut(e));_+=p?-c:c,_=g.invert(_);var y=g(qt(n));return y+=p?c:-c,y=g.invert(y),_>d[1]&&(d[1]=_),yc[1]&&(c[1]=f),"x"===this._discrete&&c.reverse(),s.domain(c),[i,r]},Rect:function(t){var n=t.data,e=t.x,i=t.y,r=t.x2,o=t.y2,a=t.yScale,u=t.xScale,l=t.config;e=e.copy(),i=i.copy();var s=r?"x2":"x",c=o?"y2":"y",h=e.domain().slice(),f=i.domain().slice(),g=e.range(),d=i.range();return!e.invert&&e.padding&&kA(e,n,this._discrete),!i.invert&&i.padding&&kA(i,n,this._discrete),(e.invert||i.invert)&&n.forEach((function(t){if(e.invert){var n=l.width(t.data,t.i);h=EA(e,u,t[s],n,g,h,0,!1),h=EA(e,u,t[s],n,g,h,1,!1)}if(i.invert){var r=l.height(t.data,t.i);f=EA(i,a,t[c],r,d,f,0,!0),f=EA(i,a,t[c],r,d,f,1,!0)}})),[e,i]}};function GA(t){return this._sizeScaleD3(this._size?this._size(t):null)}function KA(t){var n=t.map(qA),e=t.map((function(t){return t.key.split("_")[0]}));return Sy(t).sort((function(t,i){return e[i].localeCompare(e[t])||n[t]-n[i]}))}function UA(t){return KA(t).reverse()}function qA(t){for(var n,e=-1,i=0,r=t.length;++e0)for(var i,r,o,a,u,l=t[n[0]].length,s=0;s=0?(i[0]=u,i[1]=u+=r):r<0?(i[1]=a,i[0]=a+=r):i[0]=u}function $A(t,n){if(this._stacked)return!1;var e=this._labelPosition(t,n);if("outside"===e)return!0;if("inside"===e)return!1;var i="x"===this._discrete.charAt(0)?"y":"x",r=this._discrete.replace(this._discrete.charAt(0),i),o=this["_".concat(r,"Axis")]._d3Scale.range(),a=this["_".concat(r)](t,n),u=a<0,l=this["_".concat(r,"Axis")]._getPosition(0),s="y"===r?u?o[1]-l:l-o[0]:u?l-o[0]:o[1]-l,c=this["_".concat(r,"Axis")]._getPosition(a);return Math.abs(u?l-c:c-l).45&&(t.s>.8&&(t.s=.8),t.l=.45),t.toString()}("function"==typeof t._shapeConfig.Line.stroke?t._shapeConfig.Line.stroke(n,e):t._shapeConfig.Line.stroke)},fontResize:!1,padding:5,textAnchor:"start",verticalAlign:"middle"},strokeWidth:Bh(2)},Rect:{height:function(n){return 2*GA.bind(RA(t))(n)},width:function(n){return 2*GA.bind(RA(t))(n)}}}),t._shapeOrder=["Area","Path","Bar","Box","Line","Rect","Circle"],t._shapeSort=function(n,e){return t._shapeOrder.indexOf(n)-t._shapeOrder.indexOf(e)},t._sizeMax=20,t._sizeMin=5,t._sizeScale="sqrt",t._stackOffset=WA,t._stackOrder=UA,t._timelineConfig=gh(t._timelineConfig,{brushing:!0,brushMin:function(){return t._xTime||t._yTime||t._x2Time||t._y2Time?2:1}}),t._x=ch("x"),t._xAxis=(new Hw).align("end"),t._xTest=(new Hw).align("end").gridSize(0),t._xConfig={gridConfig:{stroke:function(n){return t._discrete&&"x"===t._discrete.charAt(0)||t._xAxis.range()[0]===t._xAxis._getPosition.bind(t._xAxis)(n.id)?"transparent":"#eee"}}},t._xCutoff=150,t._x2=ch("x2"),t._x2Axis=(new oS).align("start"),t._x2Test=(new oS).align("start").gridSize(0),t._x2Config={padding:0},t._y=ch("y"),t._yAxis=(new $w).align("start"),t._yTest=(new $w).align("start").gridSize(0),t._yConfig={gridConfig:{stroke:function(n){if(t._discrete&&"y"===t._discrete.charAt(0))return"transparent";var e=t._yAxis.range();return e[e.length-1]===t._yAxis._getPosition.bind(t._yAxis)(n.id)?"transparent":"#eee"}}},t._yCutoff=150,t._y2=ch("y2"),t._y2Axis=(new Qw).align("end"),t._y2Test=(new $w).align("end").gridSize(0),t._y2Config={},t}return n=o,e=[{key:"_preDraw",value:function(){var t=this;["x","y","x2","y2"].forEach((function(n){if(t["_".concat(n,"Key")]){var e=t["_".concat(n,"Key")];t._aggs[e]||t._discrete!==n||(t._aggs[e]=function(t,n){var e=Array.from(new Set(t.map(n)));return 1===e.length?e[0]:e}),e!==n&&t["_".concat(n,"Title")]===t["_".concat(n,"Config")].title&&t._discrete!==n&&(t["_".concat(n,"Title")]=e,t["_".concat(n,"Config")].title=e)}})),DA(FA(o.prototype),"_preDraw",this).call(this)}},{key:"_draw",value:function(t){var n=this;if(!this._filteredData.length)return this;var e=!!this._time&&this._time(this._filteredData[0],0),i=this._x2Time=e&&this._x2(this._filteredData[0],0)===e,r=this._xTime=e&&this._x(this._filteredData[0],0)===e,a=this._y2Time=e&&this._y2(this._filteredData[0],0)===e,u=this._yTime=e&&this._y(this._filteredData[0],0)===e,s=r||i||u||a,c=function(t,e){return"".concat(!s&&n._time?n._time(t,e):"time","_").concat(n._stacked?"".concat(n._groupBy.length>1?n._ids(t,e).slice(0,-1).join("_"):"group"):"".concat(n._ids(t,e).join("_")))},h=function(t,e){var o={__d3plus__:!0,data:t,group:c(t,e),i:e,hci:n._confidence&&n._confidence[1]&&n._confidence[1](t,e),id:n._ids(t,e).slice(0,n._drawDepth+1).join("_"),lci:n._confidence&&n._confidence[0]&&n._confidence[0](t,e),shape:n._shape(t,e),x:r?yw(n._x(t,e)):n._x(t,e),x2:i?yw(n._x2(t,e)):n._x2(t,e),y:u?yw(n._y(t,e)):n._y(t,e),y2:a?yw(n._y2(t,e)):n._y2(t,e)};return o.discrete="Bar"===o.shape?"".concat(o[n._discrete],"_").concat(o.group):"".concat(o[n._discrete]),o.id="Bar"===o.shape?"".concat(o.id,"_").concat(o[n._discrete]):o.id,o},f=this._formattedData=this._filteredData.map(h),g=this._axisPersist?this._data.map(h):f;if(this._size){var d=Mt(g,(function(t){return n._size(t.data)}));this._sizeScaleD3=mm["scale".concat(this._sizeScale.charAt(0).toUpperCase()).concat(this._sizeScale.slice(1))]().domain(d).range([d[0]===d[1]?this._sizeMax:qt([this._sizeMax/2,this._sizeMin]),this._sizeMax])}else this._sizeScaleD3=function(){return n._sizeMin};var p=g.some((function(t){return void 0!==t.x2})),m=g.some((function(t){return void 0!==t.y2})),_=this._height-this._margin.top-this._margin.bottom,y=this._discrete?"x"===this._discrete?"y":"x":void 0,v=this._discrete?"x"===this._discrete?"y2":"x2":void 0,b=[y,v].filter((function(t){return t})),w=this._select,S=this._transition,x=this._width-this._margin.left-this._margin.right;function k(t){var n=this,e=this["_".concat(t,"Time")]?f:g,i=e.filter((function(n){return![NaN,void 0,!1].includes(n[t])})).sort((function(e,i){return n["_".concat(t,"Sort")]?n["_".concat(t,"Sort")](e.data,i.data):e[t]-i[t]})).map((function(n){return n[t]}));return this._discrete!==t.charAt(0)&&this._confidence&&(this._confidence[0]&&(i=i.concat(e.map((function(t){return t.lci})))),this._confidence[1]&&(i=i.concat(e.map((function(t){return t.hci}))))),cp(i,(function(t){return"".concat(t)}))}var C,A,E,M,T=k.bind(this)("x"),O=k.bind(this)("x2"),P=k.bind(this)("y"),j=k.bind(this)("y2");if(this._stacked){var B,D=g.filter((function(t){return["Area","Bar"].includes(t.shape)})),z=_p().key((function(t){return t.group})).entries(D).reduce((function(t,n){return t[n.key]||(t[n.key]=0),t[n.key]+=Jt(n.values,(function(t){return t[y]})),t}),{});g.sort((function(t,e){if(n["_".concat(n._discrete,"Sort")])return n["_".concat(n._discrete,"Sort")](t.data,e.data);var i=t[n._discrete],r=e[n._discrete];return i-r!=0?i-r:t.group!==e.group?z[e.group]-z[t.group]:e[y]-t[y]})),C=Array.from(new Set(g.map((function(t){return t.discrete})))),M=Array.from(new Set(g.map((function(t){return t.id})))),(E=_p().key((function(t){return t.discrete})).entries(g).map((function(t){return t.values}))).forEach((function(t){var e=Array.from(new Set(t.map((function(t){return t.id}))));e.length=r&&(++e,i+=r);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++e,i+=o)}if(e)return i/e}(r)>3?"log":"linear"}return i||e},X=this._yConfigScale=Z("y",$).toLowerCase(),J=this._y2ConfigScale=Z("y2",V).toLowerCase(),Q=this._xConfigScale=Z("x",G).toLowerCase(),tt=this._x2ConfigScale=Z("x2",U).toLowerCase();A={x:H,x2:K||H,y:W,y2:Y||W},Object.keys(A).forEach((function(t){"log"===n["_".concat(t,"ConfigScale")]&&A[t].includes(0)&&(qt(A[t])<0?A[t][1]=Ut(f.map((function(n){return n[t]})).filter((function(t){return![NaN,void 0,!1].includes(t)}))):A[t][0]=qt(g.map((function(n){return n[t]})).filter((function(t){return![NaN,void 0,!1].includes(t)}))))})),b.forEach((function(t){if(n["_".concat(t,"Config")].domain){var e=n["_".concat(t,"Config")].domain;"x"===n._discrete&&e.reverse(),A[t]=e}else if(t&&void 0!==n._baseline){var i=n._baseline;A[t]&&A[t][0]>i?A[t][0]=i:A[t]&&A[t][1]this._discreteCutoff||this._width>this._xCutoff,dt="y"===this._discrete&&this._height>this._discreteCutoff||this._height>this._yCutoff,pt={data:u?P:[],locale:this._locale,scalePadding:it.padding?it.padding():0};gt||(pt.barConfig={stroke:"transparent"},pt.tickSize=0,pt.shapeConfig={labelBounds:function(t,e){var i=t.labelBounds,r=i.width,o=i.y,a=n._height/2;return{x:e?-a:0,y:o,width:r,height:a}},labelConfig:{padding:0,rotate:0},labelRotation:!1});var mt=sp("g.d3plus-plot-test",{enter:{opacity:0},parent:this._select}),_t=jh.bind(this)(this._shapeConfig,"shape","Bar"),yt=void 0!==_t.label?"function"==typeof _t.label?_t.label:Bh(_t.label):this._drawLabel,vt=g.map((function(t){return yt(t.data,t.i)})).filter((function(t){return"number"==typeof t||t})).map(String),bt=cp(g.map((function(t){return t.x2})));bt="Point"===U&&bt.every((function(t){return vt.includes("".concat(t))}))?[]:null;var wt=cp(g.map((function(t){return t.x})));wt="Point"===G&&wt.every((function(t){return vt.includes("".concat(t))}))?[]:null;var St=cp(g.map((function(t){return t.y2})));St="Point"===V&&St.every((function(t){return vt.includes("".concat(t))}))?[]:null;var xt=cp(g.map((function(t){return t.y})));xt="Point"===$&&xt.every((function(t){return vt.includes("".concat(t))}))?[]:null,dt&&this._yTest.domain(lt).height(_).maxSize(x/2).range([void 0,void 0]).select(mt.node()).ticks(xt).width(x).config(pt).config(this._yConfig).scale(X).render();var kt=this._yTest.outerBounds(),Ct=kt.width?kt.width+this._yTest.padding():void 0;m&&this._y2Test.domain(st).height(_).range([void 0,void 0]).select(mt.node()).ticks(St).width(x).config(pt).config(ft).config(this._y2Config).scale(J).render();var At=this._y2Test.outerBounds(),Tt=At.width?At.width+this._y2Test.padding():void 0,Ot={data:r?T:[],locale:this._locale,scalePadding:nt.padding?nt.padding():0};dt||(Ot.barConfig={stroke:"transparent"},Ot.tickSize=0,Ot.shapeConfig={labelBounds:function(t,e){var i=t.labelBounds,r=i.height,o=i.y,a=n._width/2;return{x:e?-a:0,y:o,width:a,height:r}},labelConfig:{padding:0,rotate:0,textAnchor:function(t){return t.id===wt[0]?"start":"end"}},labelRotation:!1});var Pt=void 0;gt&&this._xTest.domain(at).height(_).maxSize(_/2).range([void 0,Pt]).select(mt.node()).ticks(wt).width(x).config(Ot).config(this._xConfig).scale(Q).render();var jt,Bt=[];if(this._lineLabels){var Dt=f.filter((function(t){return"Line"===t.shape&&("function"!=typeof n._lineLabels||n._lineLabels(t.data,t.i))})),zt=_p().key((function(t){return t.id})).entries(Dt);if(zt.length){var Nt=jh.bind(this)(this._shapeConfig,"shape","Line");LA.config(Nt);var Rt=LA.labelConfig(),Ft=void 0!==Rt.fontColor?Rt.fontColor:IA.fontColor(),Lt=void 0!==Rt.fontSize?Rt.fontSize:IA.fontSize(),It=void 0!==Rt.fontWeight?Rt.fontWeight:IA.fontWeight(),Ht=void 0!==Rt.fontFamily?Rt.fontFamily:IA.fontFamily(),Gt=void 0!==Rt.padding?Rt.padding:IA.padding(),Kt=Nt.label||this._drawLabel,Wt=function(t){return"log"===Q&&0===t&&(t=at[0]<0?n._xTest._d3Scale.domain()[1]:n._xTest._d3Scale.domain()[0]),n._xTest._getPosition.bind(n._xTest)(t)};Bt=zt.map((function(t){for(var n,e=t.values[t.values.length-1];e.__d3plus__&&e.data;)n=(e=e.data).i;var i="function"==typeof Kt?Kt(e,n):Kt,r="function"==typeof Ft?Ft(e,n):Ft,o="function"==typeof Lt?Lt(e,n):Lt,a="function"==typeof It?It(e,n):It,u="function"==typeof Ht?Ht(e,n):Ht;u instanceof Array&&(u=u.map((function(t){return"'".concat(t,"'")})).join(", "));var l="function"==typeof Gt?Gt(e,n):Gt,s=Hy(i,{"font-size":o,"font-family":u,"font-weight":a}),c=Ut(t.values.map((function(t){return Wt(t.x)}))),h=t.values.find((function(t){return Wt(t.x)===c})).y;return{id:t.key,labelWidth:s+2*l,spaceNeeded:s+4*l,value:h,padding:l,fontSize:o,fontColor:r,maxX:c,xValue:Ut(t.values,(function(t){return t.x}))}})).sort((function(t,n){return n.value-t.value}));var $t=Ut(Bt,(function(t){return t.maxX}));jt=Ut(Bt.map((function(t){return t.labelWidth})));var Yt=$t===this._xTest._getRange.bind(this._xTest)()[1]?Ut(Bt.filter((function(t){return t.maxX===$t})),(function(t){return t.spaceNeeded})):0;if(Yt){var Vt=qt([Yt,x/4]);Pt=x-Vt-this._margin.right}}}gt&&Pt&&this._xTest.domain(at).height(_).maxSize(_/2).range([void 0,Pt]).select(mt.node()).ticks(wt).width(x).config(Ot).config(this._xConfig).scale(Q).render(),p&&this._x2Test.domain(ut).height(_).range([void 0,Pt]).select(mt.node()).ticks(bt).width(x).config(Ot).tickSize(0).config(ht).config(this._x2Config).scale(tt).render();var Qt=this._xTest._getRange(),tn=this._x2Test._getRange(),nn=this._x2Test.outerBounds(),en=p?nn.height+this._x2Test.padding():0,rn=Ut([Ct,Qt[0],tn[0]]);gt&&this._xTest.range([rn,void 0]).render();var on=dt?this._yTest.shapeConfig().labelConfig.fontSize()/2:0,an=Ut([Tt,x-Qt[1],x-tn[1]]),un=this._xTest.outerBounds().height+(dt?this._xTest.padding():0);this._padding.left+=rn,this._padding.right+=an,this._padding.bottom+=un,this._padding.top+=en+on,DA(FA(o.prototype),"_draw",this).call(this,t);var ln=this._margin.left+this._margin.right,sn=this._margin.top+this._margin.bottom,cn=[en,_-(un+on+sn)];dt&&this._yTest.domain(lt).height(_).maxSize(x/2).range(cn).select(mt.node()).ticks(xt).width(x).config(pt).config(this._yConfig).scale(X).render(),rn=Ut([Ct=(kt=this._yTest.outerBounds()).width?kt.width+this._yTest.padding():void 0,Qt[0],tn[0]]),m&&this._y2Test.config(pt).domain(st).gridSize(0).height(_).range(cn).select(mt.node()).width(x-Ut([0,an-Tt])).title(!1).config(this._y2Config).config(ft).scale(J).render(),an=Ut([0,Tt=(At=this._y2Test.outerBounds()).width?At.width+this._y2Test.padding():void 0,x-Qt[1],x-tn[1]]);var hn=[rn,x-(an+ln)],fn=sp("g.d3plus-plot-background",{parent:w,transition:S}),gn="translate(".concat(this._margin.left,", ").concat(this._margin.top+en+on,")"),dn="translate(".concat(this._margin.left,", ").concat(this._margin.top+on,")"),pn=gt&&sp("g.d3plus-plot-x-axis",{parent:w,transition:S,enter:{transform:gn},update:{transform:gn}}),mn=p&&sp("g.d3plus-plot-x2-axis",{parent:w,transition:S,enter:{transform:dn},update:{transform:dn}}),_n=rn>Ct?rn-Ct:0,yn="translate(".concat(this._margin.left+_n,", ").concat(this._margin.top+on,")"),vn=dt&&sp("g.d3plus-plot-y-axis",{parent:w,transition:S,enter:{transform:yn},update:{transform:yn}}),bn="translate(-".concat(this._margin.right,", ").concat(this._margin.top+on,")"),wn=m&&sp("g.d3plus-plot-y2-axis",{parent:w,transition:S,enter:{transform:bn},update:{transform:bn}});this._xAxis.domain(at).height(_-(en+on+sn)).maxSize(_/2).range(hn).select(gt?pn.node():void 0).ticks(wt).width(x).config(Ot).config(this._xConfig).scale(Q).render(),p&&this._x2Axis.domain(ut).height(_-(un+on+sn)).range(hn).select(mn.node()).ticks(bt).width(x).config(Ot).config(ht).config(this._x2Config).scale(tt).render(),this._xFunc=nt=function(t,e){return"x2"===e?("log"===tt&&0===t&&(t=ut[0]<0?n._x2Axis._d3Scale.domain()[1]:n._x2Axis._d3Scale.domain()[0]),n._x2Axis._getPosition.bind(n._x2Axis)(t)):("log"===Q&&0===t&&(t=at[0]<0?n._xAxis._d3Scale.domain()[1]:n._xAxis._d3Scale.domain()[0]),n._xAxis._getPosition.bind(n._xAxis)(t))},cn=[this._xAxis.outerBounds().y+en,_-(un+on+sn)],this._yAxis.domain(lt).height(_).maxSize(x/2).range(cn).select(dt?vn.node():void 0).ticks(xt).width(hn[hn.length-1]).config(pt).config(this._yConfig).scale(X).render(),m&&this._y2Axis.config(pt).domain(m?st:lt).gridSize(0).height(_).range(cn).select(wn.node()).width(x-Ut([0,an-Tt])).title(!1).config(this._y2Config).config(ft).scale(J).render();var Sn={};Bt&&(_p().key((function(t){return t.xValue})).entries(Bt).forEach((function(t){var e=t.values,i=Ut(e.map((function(t){return t.fontSize}))),r=Xt(cn[0],cn[1],i).reverse(),o=(cn[1]-cn[0])/8;e.forEach(function t(n,e,i){if(n.defaultY||(n.defaultY=this._yAxis._getPosition(n.value)),e){var a=i[e-1],u=n.fontSize,l=n.padding,s=n.newY||n.defaultY,c=a.newY||a.defaultY;if(s-u/2-l=0?E[n][e][r]:A[y]["x"===y?0:1])},e["".concat(y,"1")]=function(t){var n=M.indexOf(t.id),e=C.indexOf(t.discrete),r=t[y]<0?0:1;return i(n>=0?E[n][e][r]:A[y]["x"===y?0:1])}}var r=(new _w[t.key]).config(e).data(t.values);if("Bar"===t.key){var o,a="x"===n._discrete?nt:it,u="x"===n._discrete?G:$,s="x"===n._discrete?at:lt,c="x"===n._discrete?hn:cn;if("Point"!==u&&2===s.length){var h=Array.from(new Set(t.values.map((function(t){return a(t[n._discrete])}))));h.unshift(c[0]-h[0]-c[0]),h.push(c[1]+c[1]-h[h.length-1]),o=h.reduce((function(t,n,e,i){if(e){var r=Math.abs(n-i[e-1]);r1?a(s[1])-a(s[0]):c[c.length-1]-c[0];n._groupPadding1)return o[0].id===t.id&&"+".concat(l(o.length,n._locale)," ").concat(n._translate("more"))}return n._drawLabel(t,e)},labelBounds:!!n._lineLabels&&function(t,e,i){var r=TA(i.points[0],2),o=r[0],a=r[1],u=TA(i.points[i.points.length-1],2),l=u[0],s=u[1],c=n._height/4;return{x:l-o,y:s-a-c/2-(Sn[t.id]?s-Sn[t.id]:0),width:jt,height:c}}})}for(var O=jn.filter((function(n){return n.includes(".".concat(t.key))})),P=jn.filter((function(t){return!t.includes(".")})),j=jn.filter((function(t){return t.includes(".shape")})),B=function(t){r.on(P[t],(function(e,i,r,o){return n._on[P[t]](e.data,e.i,r,o)}))},D=0;Dt.length)&&(n=t.length);for(var e=0,i=new Array(n);e=0;)n+=e[i].value;else n=1;t.value=n}function GE(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=UE)):void 0===n&&(n=KE);for(var e,i,r,o,a,u=new $E(t),l=[u];e=l.pop();)if((r=n(e.data))&&(a=(r=Array.from(r)).length))for(e.children=r,o=a-1;o>=0;--o)l.push(i=r[o]=new $E(r[o])),i.parent=e,i.depth=e.depth+1;return u.eachBefore(WE)}function KE(t){return t.children}function UE(t){return Array.isArray(t)?t[1]:null}function qE(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function WE(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function $E(t){this.data=t,this.depth=this.height=0,this.parent=null}function YE(){return 0}function VE(t){return function(){return t}}function ZE(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function XE(t,n,e,i,r){for(var o,a=t.children,u=-1,l=a.length,s=t.value&&(i-n)/t.value;++u=0;--i)o.push(e[i]);return this},find:function(t,n){let e=-1;for(const i of this)if(t.call(n,i,++e,this))return i},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)n=n.parent,i.push(n);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return GE(this).eachBefore(qE)},[Symbol.iterator]:function*(){var t,n,e,i,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(e=0,i=n.length;ef&&(f=u),m=c*c*p,(g=Math.max(f/m,m/h))>d){c-=u;break}d=g}_.push(a={value:c,dice:l1?n:1)},e}(QE);function eM(){var t=nM,n=!1,e=1,i=1,r=[0],o=YE,a=YE,u=YE,l=YE,s=YE;function c(t){return t.x0=t.y0=0,t.x1=e,t.y1=i,t.eachBefore(h),r=[0],n&&t.eachBefore(ZE),t}function h(n){var e=r[n.depth],i=n.x0+e,c=n.y0+e,h=n.x1-e,f=n.y1-e;h1?n:1)},e}(QE);function rM(t){return rM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rM(t)}function oM(t,n){for(var e=0;e=e-1){var c=u[n];return c.x0=r,c.y0=o,c.x1=a,void(c.y1=l)}for(var h=s[n],f=i/2+h,g=n+1,d=e-1;g>>1;s[p]l-o){var y=i?(r*_+a*m)/i:a;t(n,g,m,r,o,y,l),t(g,e,_,y,o,a,l)}else{var v=i?(o*_+l*m)/i:l;t(n,g,m,r,o,a,v),t(g,e,_,r,v,a,l)}}(0,l,t.value,n,e,i,r)},treemapDice:XE,treemapSlice:JE,treemapSliceDice:function(t,n,e,i,r){(1&t.depth?JE:XE)(t,n,e,i,r)},treemapSquarify:nM,treemapResquarify:iM},fM=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&uM(t,n)}(o,t);var n,e,i,r=lM(o);function o(){var t;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this))._layoutPadding=1;var n=t._legend;t._legend=function(e,i){return i.length!==t._filteredData.length&&n.bind(sM(t))(e,i)},t._legendSort=function(n,e){return t._sum(e)-t._sum(n)},t._legendTooltip=gh({},t._legendTooltip,{tbody:[]}),t._shapeConfig=gh({},t._shapeConfig,{ariaLabel:function(n,e){var i=t._rankData?"".concat(t._rankData.indexOf(n)+1,". "):"";return"".concat(i).concat(t._drawLabel(n,e),", ").concat(t._sum(n,e),".")},labelConfig:{fontMax:40,fontMin:8,fontResize:!0,padding:5}}),t._sort=function(t,n){var i=e(t),r=e(n);return i&&!r?1:!i&&r?-1:n.value-t.value},t._sum=ch("value"),t._thresholdKey=t._sum,t._tile=nM,t._tooltipConfig=gh({},t._tooltipConfig,{tbody:[[function(){return t._translate("Share")},function(n,e,i){return"".concat(l(100*i.share,t._locale),"%")}]]}),t._treemap=eM().round(!0);var e=function(t){return t.children&&1===t.children.length&&t.children[0].data._isAggregation};return t}return n=o,e=[{key:"_draw",value:function(t){var n=this;aM(cM(o.prototype),"_draw",this).call(this,t);for(var e=_p(),i=0;i<=this._drawDepth;i++)e.key(this._groupBy[i]);e=e.entries(this._filteredData);var r=this._treemap.padding(this._layoutPadding).size([this._width-this._margin.left-this._margin.right,this._height-this._margin.top-this._margin.bottom]).tile(this._tile)(GE({values:e},(function(t){return t.values})).sum(this._sum).sort(this._sort)),a=[],u=this;r.children&&function t(n){for(var e=0;e-1?r:void 0,i.data=hp(i.data.values,u._aggs),i.x=i.x0+(i.x1-i.x0)/2,i.y=i.y0+(i.y1-i.y0)/2,a.push(i)}}}(r.children),this._rankData=a.sort(this._sort).map((function(t){return t.data}));var s=r.value;a.forEach((function(t){t.share=n._sum(t.data,t.i)/s}));var c="translate(".concat(this._margin.left,", ").concat(this._margin.top,")"),h=jh.bind(this)(this._shapeConfig,"shape","Rect"),f=h.labelConfig.fontMax,g=h.labelConfig.fontMin,d=h.labelConfig.padding;return this._shapes.push((new Ib).data(a).label((function(t){return[n._drawLabel(t.data,t.i),"".concat(l(100*t.share,n._locale),"%")]})).select(sp("g.d3plus-Treemap",{parent:this._select,enter:{transform:c},update:{transform:c}}).node()).config({height:function(t){return t.y1-t.y0},labelBounds:function(t,n,e){var i=e.height,r=Math.min(f,.5*(i-2*d));return r0){var m=hp(c,n);m._isAggregation=!0,m._threshold=s,h.push(m)}return h}throw new Error("Depth is higher than the amount of grouping levels.")}(t,0):t}},{key:"layoutPadding",value:function(t){return arguments.length?(this._layoutPadding="function"==typeof t?t:Bh(t),this):this._layoutPadding}},{key:"sort",value:function(t){return arguments.length?(this._sort=t,this):this._sort}},{key:"sum",value:function(t){return arguments.length?(this._sum="function"==typeof t?t:ch(t),this._thresholdKey=this._sum,this):this._sum}},{key:"tile",value:function(t){return arguments.length?(this._tile="string"==typeof t?hM["treemap".concat(t.charAt(0).toUpperCase()).concat(t.slice(1))]||nM:t,this):this._tile}}],e&&oM(n.prototype,e),i&&oM(n,i),Object.defineProperty(n,"prototype",{writable:!1}),o}(xA);function gM(){return gM=Object.assign?Object.assign.bind():function(t){for(var n=1;n0?1:t<0?-1:0},DM=Math.sqrt,zM=Math.tan;function NM(t){return t>1?0:t<-1?_M:Math.acos(t)}function RM(t){return t>1?yM:t<-1?-yM:Math.asin(t)}function FM(t){return(t=jM(t/2))*t}function LM(){}function IM(t,n){t&&GM.hasOwnProperty(t.type)&&GM[t.type](t,n)}var HM={Feature:function(t,n){IM(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++i=0?1:-1,r=i*e,o=AM(n=(n*=SM)/2+vM),a=jM(n),u=ZM*a,l=VM*o+u*AM(r),s=u*i*jM(r);lT.add(CM(s,l)),YM=t,VM=o,ZM=a}function pT(t){return[CM(t[1],t[0]),RM(t[2])]}function mT(t){var n=t[0],e=t[1],i=AM(e);return[i*AM(n),i*jM(n),jM(e)]}function _T(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function yT(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function vT(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function bT(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function wT(t){var n=DM(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ST,xT,kT,CT,AT,ET,MT,TT,OT,PT,jT,BT,DT,zT,NT,RT,FT={point:LT,lineStart:HT,lineEnd:GT,polygonStart:function(){FT.point=KT,FT.lineStart=UT,FT.lineEnd=qT,oT=new Tt,cT.polygonStart()},polygonEnd:function(){cT.polygonEnd(),FT.point=LT,FT.lineStart=HT,FT.lineEnd=GT,lT<0?(XM=-(QM=180),JM=-(tT=90)):oT>pM?tT=90:oT<-pM&&(JM=-90),uT[0]=XM,uT[1]=QM},sphere:function(){XM=-(QM=180),JM=-(tT=90)}};function LT(t,n){aT.push(uT=[XM=t,QM=t]),ntT&&(tT=n)}function IT(t,n){var e=mT([t*SM,n*SM]);if(rT){var i=yT(rT,e),r=yT([i[1],-i[0],0],i);wT(r),r=pT(r);var o,a=t-nT,u=a>0?1:-1,l=r[0]*wM*u,s=xM(a)>180;s^(u*nTtT&&(tT=o):s^(u*nT<(l=(l+360)%360-180)&&ltT&&(tT=n)),s?tWT(XM,QM)&&(QM=t):WT(t,QM)>WT(XM,QM)&&(XM=t):QM>=XM?(tQM&&(QM=t)):t>nT?WT(XM,t)>WT(XM,QM)&&(QM=t):WT(t,QM)>WT(XM,QM)&&(XM=t)}else aT.push(uT=[XM=t,QM=t]);ntT&&(tT=n),rT=e,nT=t}function HT(){FT.point=IT}function GT(){uT[0]=XM,uT[1]=QM,FT.point=LT,rT=null}function KT(t,n){if(rT){var e=t-nT;oT.add(xM(e)>180?e+(e>0?360:-360):e)}else eT=t,iT=n;cT.point(t,n),IT(t,n)}function UT(){cT.lineStart()}function qT(){KT(eT,iT),cT.lineEnd(),xM(oT)>pM&&(XM=-(QM=180)),uT[0]=XM,uT[1]=QM,rT=null}function WT(t,n){return(n-=t)<0?n+360:n}function $T(t,n){return t[0]-n[0]}function YT(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nWT(i[0],i[1])&&(i[1]=r[1]),WT(r[0],i[1])>WT(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(a=-1/0,n=0,i=o[e=o.length-1];n<=e;i=r,++n)r=o[n],(u=WT(i[1],r[0]))>a&&(a=u,XM=r[0],QM=i[1])}return aT=uT=null,XM===1/0||JM===1/0?[[NaN,NaN],[NaN,NaN]]:[[XM,JM],[QM,tT]]}var ZT={sphere:LM,point:XT,lineStart:QT,lineEnd:eO,polygonStart:function(){ZT.lineStart=iO,ZT.lineEnd=rO},polygonEnd:function(){ZT.lineStart=QT,ZT.lineEnd=eO}};function XT(t,n){t*=SM;var e=AM(n*=SM);JT(e*AM(t),e*jM(t),jM(n))}function JT(t,n,e){++ST,kT+=(t-kT)/ST,CT+=(n-CT)/ST,AT+=(e-AT)/ST}function QT(){ZT.point=tO}function tO(t,n){t*=SM;var e=AM(n*=SM);zT=e*AM(t),NT=e*jM(t),RT=jM(n),ZT.point=nO,JT(zT,NT,RT)}function nO(t,n){t*=SM;var e=AM(n*=SM),i=e*AM(t),r=e*jM(t),o=jM(n),a=CM(DM((a=NT*o-RT*r)*a+(a=RT*i-zT*o)*a+(a=zT*r-NT*i)*a),zT*i+NT*r+RT*o);xT+=a,ET+=a*(zT+(zT=i)),MT+=a*(NT+(NT=r)),TT+=a*(RT+(RT=o)),JT(zT,NT,RT)}function eO(){ZT.point=XT}function iO(){ZT.point=oO}function rO(){aO(BT,DT),ZT.point=XT}function oO(t,n){BT=t,DT=n,t*=SM,n*=SM,ZT.point=aO;var e=AM(n);zT=e*AM(t),NT=e*jM(t),RT=jM(n),JT(zT,NT,RT)}function aO(t,n){t*=SM;var e=AM(n*=SM),i=e*AM(t),r=e*jM(t),o=jM(n),a=NT*o-RT*r,u=RT*i-zT*o,l=zT*r-NT*i,s=TM(a,u,l),c=RM(s),h=s&&-c/s;OT.add(h*a),PT.add(h*u),jT.add(h*l),xT+=c,ET+=c*(zT+(zT=i)),MT+=c*(NT+(NT=r)),TT+=c*(RT+(RT=o)),JT(zT,NT,RT)}function uO(t){ST=xT=kT=CT=AT=ET=MT=TT=0,OT=new Tt,PT=new Tt,jT=new Tt,qM(t,ZT);var n=+OT,e=+PT,i=+jT,r=TM(n,e,i);return r_M&&(t-=Math.round(t/bM)*bM),[t,n]}function hO(t,n,e){return(t%=bM)?n||e?sO(gO(t),dO(n,e)):gO(t):n||e?dO(n,e):cO}function fO(t){return function(n,e){return xM(n+=t)>_M&&(n-=Math.round(n/bM)*bM),[n,e]}}function gO(t){var n=fO(t);return n.invert=fO(-t),n}function dO(t,n){var e=AM(t),i=jM(t),r=AM(n),o=jM(n);function a(t,n){var a=AM(n),u=AM(t)*a,l=jM(t)*a,s=jM(n),c=s*e+u*i;return[CM(l*r-c*o,u*e-s*i),RM(c*r+l*o)]}return a.invert=function(t,n){var a=AM(n),u=AM(t)*a,l=jM(t)*a,s=jM(n),c=s*r-l*o;return[CM(l*r+s*o,u*e+c*i),RM(c*e-u*i)]},a}function pO(t){function n(n){return(n=t(n[0]*SM,n[1]*SM))[0]*=wM,n[1]*=wM,n}return t=hO(t[0]*SM,t[1]*SM,t.length>2?t[2]*SM:0),n.invert=function(n){return(n=t.invert(n[0]*SM,n[1]*SM))[0]*=wM,n[1]*=wM,n},n}function mO(t,n,e,i,r,o){if(e){var a=AM(n),u=jM(n),l=i*e;null==r?(r=n+i*bM,o=n-l/2):(r=_O(a,r),o=_O(a,o),(i>0?ro)&&(r+=i*bM));for(var s,c=r;i>0?c>o:c1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function bO(t,n){return xM(t[0]-n[0])=0;--o)r.point((c=s[o])[0],c[1]);else i(f.x,f.p.x,-1,r);f=f.p}s=(f=f.o).z,g=!g}while(!f.v);r.lineEnd()}}}function xO(t){if(n=t.length){for(var n,e,i=0,r=t[0];++i=0?1:-1,A=C*k,E=A>_M,M=m*S;if(l.add(CM(M*C*jM(A),_*x+M*AM(A))),a+=E?k+C*bM:k,E^d>=e^b>=e){var T=yT(mT(g),mT(v));wT(T);var O=yT(o,T);wT(O);var P=(E^k>=0?-1:1)*RM(O[2]);(i>P||i===P&&(T[0]||T[1]))&&(u+=E^k>=0?1:-1)}}return(a<-pM||a0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t1&&2&l&&f.push(f.pop().concat(f.shift())),a.push(f.filter(EO))}return f}}function EO(t){return t.length>1}function MO(t,n){return((t=t.x)[0]<0?t[1]-yM-pM:yM-t[1])-((n=n.x)[0]<0?n[1]-yM-pM:yM-n[1])}cO.invert=cO;const TO=AO((function(){return!0}),(function(t){var n,e=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?_M:-_M,l=xM(o-e);xM(l-_M)0?yM:-yM),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),t.point(o,i),n=0):r!==u&&l>=_M&&(xM(e-r)pM?kM((jM(n)*(o=AM(i))*jM(e)-jM(i)*(r=AM(n))*jM(t))/(r*o*a)):(n+i)/2}(e,i,o,a),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),n=0),t.point(e=o,i=a),r=u},lineEnd:function(){t.lineEnd(),e=i=NaN},clean:function(){return 2-n}}}),(function(t,n,e,i){var r;if(null==t)r=e*yM,i.point(-_M,r),i.point(0,r),i.point(_M,r),i.point(_M,0),i.point(_M,-r),i.point(0,-r),i.point(-_M,-r),i.point(-_M,0),i.point(-_M,r);else if(xM(t[0]-n[0])>pM){var o=t[0]0,r=xM(n)>pM;function o(t,e){return AM(t)*AM(e)>n}function a(t,e,i){var r=[1,0,0],o=yT(mT(t),mT(e)),a=_T(o,o),u=o[0],l=a-u*u;if(!l)return!i&&t;var s=n*a/l,c=-n*u/l,h=yT(r,o),f=bT(r,s);vT(f,bT(o,c));var g=h,d=_T(f,g),p=_T(g,g),m=d*d-p*(_T(f,f)-1);if(!(m<0)){var _=DM(m),y=bT(g,(-d-_)/p);if(vT(y,f),y=pT(y),!i)return y;var v,b=t[0],w=e[0],S=t[1],x=e[1];w0^y[1]<(xM(y[0]-b)_M^(b<=y[0]&&y[0]<=w)){var A=bT(g,(-d+_)/p);return vT(A,f),[y,pT(A)]}}}function u(n,e){var r=i?t:_M-t,o=0;return n<-r?o|=1:n>r&&(o|=2),e<-r?o|=4:e>r&&(o|=8),o}return AO(o,(function(t){var n,e,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(h,f){var g,d=[h,f],p=o(h,f),m=i?p?0:u(h,f):p?u(h+(h<0?_M:-_M),f):0;if(!n&&(s=l=p)&&t.lineStart(),p!==l&&(!(g=a(n,d))||bO(n,g)||bO(d,g))&&(d[2]=1),p!==l)c=0,p?(t.lineStart(),g=a(d,n),t.point(g[0],g[1])):(g=a(n,d),t.point(g[0],g[1],2),t.lineEnd()),n=g;else if(r&&n&&i^p){var _;m&e||!(_=a(d,n,!0))||(c=0,i?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!p||n&&bO(n,d)||t.point(d[0],d[1]),n=d,l=p,e=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(s&&l)<<1}}}),(function(n,i,r,o){mO(o,t,e,r,n,i)}),i?[0,-t]:[-_M,t-_M])}var PO,jO,BO,DO,zO=1e9,NO=-zO;function RO(t,n,e,i){function r(r,o){return t<=r&&r<=e&&n<=o&&o<=i}function o(r,o,u,s){var c=0,h=0;if(null==r||(c=a(r,u))!==(h=a(o,u))||l(r,o)<0^u>0)do{s.point(0===c||3===c?t:e,c>1?i:n)}while((c=(c+u+4)%4)!==h);else s.point(o[0],o[1])}function a(i,r){return xM(i[0]-t)0?0:3:xM(i[0]-e)0?2:1:xM(i[1]-n)0?1:0:r>0?3:2}function u(t,n){return l(t.x,n.x)}function l(t,n){var e=a(t,1),i=a(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var l,s,c,h,f,g,d,p,m,_,y,v=a,b=vO(),w={point:S,lineStart:function(){w.point=x,s&&s.push(c=[]),_=!0,m=!1,d=p=NaN},lineEnd:function(){l&&(x(h,f),g&&m&&b.rejoin(),l.push(b.result())),w.point=S,m&&v.lineEnd()},polygonStart:function(){v=b,l=[],s=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(f-o)*(i-a)>(g-a)*(t-o)&&++n:g<=i&&(f-o)*(i-a)<(g-a)*(t-o)&&--n;return n}(),e=y&&n,r=(l=Zt(l)).length;(e||r)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),r&&SO(l,u,n,o,a),a.polygonEnd()),v=a,l=s=c=null}};function S(t,n){r(t,n)&&v.point(t,n)}function x(o,a){var u=r(o,a);if(s&&c.push([o,a]),_)h=o,f=a,g=u,_=!1,u&&(v.lineStart(),v.point(o,a));else if(u&&m)v.point(o,a);else{var l=[d=Math.max(NO,Math.min(zO,d)),p=Math.max(NO,Math.min(zO,p))],b=[o=Math.max(NO,Math.min(zO,o)),a=Math.max(NO,Math.min(zO,a))];!function(t,n,e,i,r,o){var a,u=t[0],l=t[1],s=0,c=1,h=n[0]-u,f=n[1]-l;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>c)return;a>s&&(s=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>s&&(s=a)}else if(h>0){if(a0)){if(a/=f,f<0){if(a0){if(a>c)return;a>s&&(s=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>s&&(s=a)}else if(f>0){if(a0&&(t[0]=u+s*h,t[1]=l+s*f),c<1&&(n[0]=u+c*h,n[1]=l+c*f),!0}}}}}(l,b,t,n,e,i)?u&&(v.lineStart(),v.point(o,a),y=!1):(m||(v.lineStart(),v.point(l[0],l[1])),v.point(b[0],b[1]),u||v.lineEnd(),y=!1)}d=o,p=a,m=u}return w}}var FO={sphere:LM,point:LM,lineStart:function(){FO.point=IO,FO.lineEnd=LO},lineEnd:LM,polygonStart:LM,polygonEnd:LM};function LO(){FO.point=FO.lineEnd=LM}function IO(t,n){jO=t*=SM,BO=jM(n*=SM),DO=AM(n),FO.point=HO}function HO(t,n){t*=SM;var e=jM(n*=SM),i=AM(n),r=xM(t-jO),o=AM(r),a=i*jM(r),u=DO*e-BO*i*o,l=BO*e+DO*i*o;PO.add(CM(DM(a*a+u*u),l)),jO=t,BO=e,DO=i}function GO(t){return PO=new Tt,qM(t,FO),+PO}var KO=[null,null],UO={type:"LineString",coordinates:KO};function qO(t,n){return KO[0]=t,KO[1]=n,GO(UO)}var WO={Feature:function(t,n){return YO(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++i0&&(r=qO(t[o],t[o-1]))>0&&e<=r&&i<=r&&(e+i-r)*(1-Math.pow((e-i)/r,2))pM})).map(l)).concat(Xt(EM(o/g)*g,r,g).filter((function(t){return xM(t%p)>pM})).map(s))}return _.lines=function(){return y().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[c(i).concat(h(a).slice(1),c(e).reverse().slice(1),h(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),u>a&&(t=u,u=a,a=t),_.precision(m)):[[i,u],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],r=+e[1][1],n>t&&(e=n,n=t,t=e),o>r&&(e=o,o=r,r=e),_.precision(m)):[[n,o],[t,r]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(d=+t[0],p=+t[1],_):[d,p]},_.stepMinor=function(t){return arguments.length?(f=+t[0],g=+t[1],_):[f,g]},_.precision=function(f){return arguments.length?(m=+f,l=tP(o,r,90),s=nP(n,t,m),c=tP(u,a,90),h=nP(i,e,m),_):m},_.extentMajor([[-180,-90+pM],[180,90-pM]]).extentMinor([[-180,-80-pM],[180,80+pM]])}function iP(t,n){var e=t[0]*SM,i=t[1]*SM,r=n[0]*SM,o=n[1]*SM,a=AM(i),u=jM(i),l=AM(o),s=jM(o),c=a*AM(e),h=a*jM(e),f=l*AM(r),g=l*jM(r),d=2*RM(DM(FM(o-i)+a*l*FM(r-e))),p=jM(d),m=d?function(t){var n=jM(t*=d)/p,e=jM(d-t)/p,i=e*c+n*f,r=e*h+n*g,o=e*u+n*s;return[CM(r,i)*wM,CM(o,DM(i*i+r*r))*wM]}:function(){return[e*wM,i*wM]};return m.distance=d,m}const rP=t=>t;var oP,aP,uP,lP,sP=new Tt,cP=new Tt,hP={point:LM,lineStart:LM,lineEnd:LM,polygonStart:function(){hP.lineStart=fP,hP.lineEnd=pP},polygonEnd:function(){hP.lineStart=hP.lineEnd=hP.point=LM,sP.add(xM(cP)),cP=new Tt},result:function(){var t=sP/2;return sP=new Tt,t}};function fP(){hP.point=gP}function gP(t,n){hP.point=dP,oP=uP=t,aP=lP=n}function dP(t,n){cP.add(lP*t-uP*n),uP=t,lP=n}function pP(){dP(oP,aP)}const mP=hP;var _P=1/0,yP=_P,vP=-_P,bP=vP,wP={point:function(t,n){t<_P&&(_P=t),t>vP&&(vP=t),nbP&&(bP=n)},lineStart:LM,lineEnd:LM,polygonStart:LM,polygonEnd:LM,result:function(){var t=[[_P,yP],[vP,bP]];return vP=bP=-(yP=_P=1/0),t}};const SP=wP;var xP,kP,CP,AP,EP=0,MP=0,TP=0,OP=0,PP=0,jP=0,BP=0,DP=0,zP=0,NP={point:RP,lineStart:FP,lineEnd:HP,polygonStart:function(){NP.lineStart=GP,NP.lineEnd=KP},polygonEnd:function(){NP.point=RP,NP.lineStart=FP,NP.lineEnd=HP},result:function(){var t=zP?[BP/zP,DP/zP]:jP?[OP/jP,PP/jP]:TP?[EP/TP,MP/TP]:[NaN,NaN];return EP=MP=TP=OP=PP=jP=BP=DP=zP=0,t}};function RP(t,n){EP+=t,MP+=n,++TP}function FP(){NP.point=LP}function LP(t,n){NP.point=IP,RP(CP=t,AP=n)}function IP(t,n){var e=t-CP,i=n-AP,r=DM(e*e+i*i);OP+=r*(CP+t)/2,PP+=r*(AP+n)/2,jP+=r,RP(CP=t,AP=n)}function HP(){NP.point=RP}function GP(){NP.point=UP}function KP(){qP(xP,kP)}function UP(t,n){NP.point=qP,RP(xP=CP=t,kP=AP=n)}function qP(t,n){var e=t-CP,i=n-AP,r=DM(e*e+i*i);OP+=r*(CP+t)/2,PP+=r*(AP+n)/2,jP+=r,BP+=(r=AP*t-CP*n)*(CP+t),DP+=r*(AP+n),zP+=3*r,RP(CP=t,AP=n)}const WP=NP;function $P(t){this._context=t}$P.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,bM)}},result:LM};var YP,VP,ZP,XP,JP,QP=new Tt,tj={point:LM,lineStart:function(){tj.point=nj},lineEnd:function(){YP&&ej(VP,ZP),tj.point=LM},polygonStart:function(){YP=!0},polygonEnd:function(){YP=null},result:function(){var t=+QP;return QP=new Tt,t}};function nj(t,n){tj.point=ej,VP=XP=t,ZP=JP=n}function ej(t,n){XP-=t,JP-=n,QP.add(DM(XP*XP+JP*JP)),XP=t,JP=n}const ij=tj;let rj,oj,aj,uj;class lj{constructor(t){this._append=null==t?sj:function(t){const n=Math.floor(t);if(!(n>=0))throw new RangeError(`invalid digits: ${t}`);if(n>15)return sj;if(n!==rj){const t=10**n;rj=n,oj=function(n){let e=1;this._+=n[0];for(const i=n.length;e4*n&&p--){var b=a+f,w=u+g,S=l+d,x=DM(b*b+w*w+S*S),k=RM(S/=x),C=xM(xM(S)-1)n||xM((_*T+y*O)/v-.5)>.3||a*f+u*g+l*d2?t[2]%360*SM:0,T()):[m*wM,_*wM,y*wM]},E.angle=function(t){return arguments.length?(v=t%360*SM,T()):v*wM},E.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(a=vj(u,A=t*t),O()):DM(A)},E.fitExtent=function(t,n){return gj(E,t,n)},E.fitSize=function(t,n){return dj(E,t,n)},E.fitWidth=function(t,n){return pj(E,t,n)},E.fitHeight=function(t,n){return mj(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&M,T()}}function kj(t){var n=0,e=_M/3,i=xj(t),r=i(n,e);return r.parallels=function(t){return arguments.length?i(n=t[0]*SM,e=t[1]*SM):[n*wM,e*wM]},r}function Cj(t,n){var e=jM(t),i=(e+jM(n))/2;if(xM(i)0?n<-yM+pM&&(n=-yM+pM):n>yM-pM&&(n=yM-pM);var e=r/PM(Dj(n),i);return[e*jM(i*t),r-e*AM(i*t)]}return o.invert=function(t,n){var e=r-n,o=BM(i)*DM(t*t+e*e),a=CM(t,xM(e))*BM(e);return e*i<0&&(a-=_M*BM(t)*BM(e)),[a/i,2*kM(PM(r/o,1/i))-yM]},o}function Nj(t,n){return[t,n]}function Rj(){return Sj(Nj).scale(152.63)}function Fj(t,n){var e=AM(t),i=t===n?jM(t):(e-AM(n))/(n-t),r=e/i+t;if(xM(i)pM&&--r>0);return[t/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]},Yj.invert=Tj(RM),Zj.invert=Tj((function(t){return 2*kM(t)})),Xj.invert=function(t,n){return[-n,2*kM(MM(t))-yM]};const Jj=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:Ej,geoAlbersUsa:function(){var t,n,e,i,r,o,a=Ej(),u=Aj().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Aj().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){o=[t,n]}};function c(t){var n=t[0],a=t[1];return o=null,e.point(n,a),o||(i.point(n,a),o)||(r.point(n,a),o)}function h(){return t=n=null,c}return c.invert=function(t){var n=a.scale(),e=a.translate(),i=(t[0]-e[0])/n,r=(t[1]-e[1])/n;return(r>=.12&&r<.234&&i>=-.425&&i<-.214?u:r>=.166&&r<.234&&i>=-.214&&i<-.115?l:a).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=0))throw new RangeError(`invalid digits: ${t}`);r=n}return null===n&&(i=new lj(r)),a},a.projection(t).digits(r).context(n)},geoProjection:Sj,geoProjectionMutator:xj,geoRotation:pO,geoStereographic:function(){return Sj(Zj).scale(250).clipAngle(142)},geoStereographicRaw:Zj,geoStream:qM,geoTransform:function(t){return{stream:cj(t)}},geoTransverseMercator:function(){var t=Bj(Xj),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:Xj},Symbol.toStringTag,{value:"Module"}));var Qj=Math.abs,tB=Math.atan,nB=Math.atan2,eB=Math.cos,iB=Math.exp,rB=Math.floor,oB=Math.log,aB=Math.max,uB=Math.min,lB=Math.pow,sB=Math.round,cB=Math.sign||function(t){return t>0?1:t<0?-1:0},hB=Math.sin,fB=Math.tan,gB=1e-6,dB=1e-12,pB=Math.PI,mB=pB/2,_B=pB/4,yB=Math.SQRT1_2,vB=AB(2),bB=AB(pB),wB=2*pB,SB=180/pB,xB=pB/180;function kB(t){return t>1?mB:t<-1?-mB:Math.asin(t)}function CB(t){return t>1?0:t<-1?pB:Math.acos(t)}function AB(t){return t>0?Math.sqrt(t):0}function EB(t){return(iB(t)-iB(-t))/2}function MB(t){return(iB(t)+iB(-t))/2}function TB(t){var n=fB(t/2),e=2*oB(eB(t/2))/(n*n);function i(t,n){var i=eB(t),r=eB(n),o=hB(n),a=r*i,u=-((1-a?oB((1+a)/2)/(1-a):-.5)+e/(1+a));return[u*r*hB(t),u*o]}return i.invert=function(n,i){var r,o=AB(n*n+i*i),a=-t/2,u=50;if(!o)return[0,0];do{var l=a/2,s=eB(l),c=hB(l),h=c/s,f=-oB(Qj(s));a-=r=(2/h*f-e*h-o)/(-f/(c*c)+1-e/(2*s*s))*(s<0?.7:1)}while(Qj(r)>gB&&--u>0);var g=hB(a);return[nB(n*g,o*eB(a)),kB(i*g/o)]},i}function OB(t,n){var e=eB(n),i=function(t){return t?t/Math.sin(t):1}(CB(e*eB(t/=2)));return[2*e*hB(t)*i,hB(n)*i]}function PB(t){var n=hB(t),e=eB(t),i=t>=0?1:-1,r=fB(i*t),o=(1+n-e)/2;function a(t,a){var u=eB(a),l=eB(t/=2);return[(1+u)*hB(t),(i*a>-nB(l,r)-.001?0:10*-i)+o+hB(a)*e-(1+u)*n*l]}return a.invert=function(t,a){var u=0,l=0,s=50;do{var c=eB(u),h=hB(u),f=eB(l),g=hB(l),d=1+f,p=d*h-t,m=o+g*e-d*n*c-a,_=d*c/2,y=-h*g,v=n*d*h/2,b=e*f+n*c*g,w=y*v-b*_,S=(m*y-p*b)/w/2,x=(p*v-m*_)/w;Qj(x)>2&&(x/=2),u-=S,l-=x}while((Qj(S)>gB||Qj(x)>gB)&&--s>0);return i*l>-nB(eB(u),r)-.001?[2*u,l]:null},a}function jB(t,n){var e=fB(n/2),i=AB(1-e*e),r=1+i*eB(t/=2),o=hB(t)*i/r,a=e/r,u=o*o,l=a*a;return[4/3*o*(3+u-3*l),4/3*a*(3+3*u-l)]}OB.invert=function(t,n){if(!(t*t+4*n*n>pB*pB+gB)){var e=t,i=n,r=25;do{var o,a=hB(e),u=hB(e/2),l=eB(e/2),s=hB(i),c=eB(i),h=hB(2*i),f=s*s,g=c*c,d=u*u,p=1-g*l*l,m=p?CB(c*l)*AB(o=1/p):o=0,_=2*m*c*u-t,y=m*s-n,v=o*(g*d+m*c*l*f),b=o*(.5*a*h-2*m*s*u),w=.25*o*(h*u-m*s*g*a),S=o*(f*l+m*d*c),x=b*w-S*v;if(!x)break;var k=(y*b-_*S)/x,C=(_*w-y*v)/x;e-=k,i-=C}while((Qj(k)>gB||Qj(C)>gB)&&--r>0);return[e,i]}},jB.invert=function(t,n){if(n*=3/8,!(t*=3/8)&&Qj(n)>1)return null;var e=1+t*t+n*n,i=AB((e-AB(e*e-4*n*n))/2),r=kB(i)/3,o=i?function(t){return oB(t+AB(t*t-1))}(Qj(n/i))/3:function(t){return oB(t+AB(t*t+1))}(Qj(t))/3,a=eB(r),u=MB(o),l=u*u-a*a;return[2*cB(t)*nB(EB(o)*a,.25-l),2*cB(n)*nB(u*hB(r),.25+l)]};var BB=AB(8),DB=oB(1+vB);function zB(t,n){var e=Qj(n);return e<_B?[t,oB(fB(_B+n/2))]:[t*eB(e)*(2*vB-1/hB(e)),cB(n)*(2*vB*(e-_B)-oB(fB(e/2)))]}function NB(t){var n=2*pB/t;function e(t,e){var i=Pj(t,e);if(Qj(t)>mB){var r=nB(i[1],i[0]),o=AB(i[0]*i[0]+i[1]*i[1]),a=n*sB((r-mB)/n)+mB,u=nB(hB(r-=a),2-eB(r));r=a+kB(pB/o*hB(u))-u,i[0]=o*eB(r),i[1]=o*hB(r)}return i}return e.invert=function(t,e){var i=AB(t*t+e*e);if(i>mB){var r=nB(e,t),o=n*sB((r-mB)/n)+mB,a=r>o?-1:1,u=i*eB(o-r),l=1/fB(a*CB((u-pB)/AB(pB*(pB-2*u)+i*i)));r=o+2*tB((l+a*AB(l*l-3))/3),t=i*eB(r),e=i*hB(r)}return Pj.invert(t,e)},e}function RB(t,n){if(arguments.length<2&&(n=t),1===n)return Oj;if(n===1/0)return FB;function e(e,i){var r=Oj(e/n,i);return r[0]*=t,r}return e.invert=function(e,i){var r=Oj.invert(e/t,i);return r[0]*=n,r},e}function FB(t,n){return[t*eB(n)/eB(n/=2),2*hB(n)]}function LB(t,n,e){var i,r,o,a=100;e=void 0===e?0:+e,n=+n;do{(r=t(e))===(o=t(e+gB))&&(o=r+gB),e-=i=-1*gB*(r-n)/(r-o)}while(a-- >0&&Qj(i)>gB);return a<0?NaN:e}function IB(t,n,e){return void 0===n&&(n=40),void 0===e&&(e=dB),function(i,r,o,a){var u,l,s;o=void 0===o?0:+o,a=void 0===a?0:+a;for(var c=0;cu)o-=l/=2,a-=s/=2;else{u=d;var p=(o>0?-1:1)*e,m=(a>0?-1:1)*e,_=t(o+p,a),y=t(o,a+m),v=(_[0]-h[0])/p,b=(_[1]-h[1])/p,w=(y[0]-h[0])/m,S=(y[1]-h[1])/m,x=S*v-b*w,k=(Qj(x)<.5?.5:1)/x;if(o+=l=(g*w-f*S)*k,a+=s=(f*b-g*v)*k,Qj(l)0&&(r[1]*=1+o/1.5*r[0]*r[0]),r}return n.invert=IB(n),n}function GB(t,n){var e,i=t*hB(n),r=30;do{n-=e=(n+hB(n)-i)/(1+eB(n))}while(Qj(e)>gB&&--r>0);return n/2}function KB(t,n,e){function i(i,r){return[t*i*eB(r=GB(e,r)),n*hB(r)]}return i.invert=function(i,r){return r=kB(r/n),[i/(t*eB(r)),kB((2*r+hB(2*r))/e)]},i}zB.invert=function(t,n){if((i=Qj(n))dB&&--o>0);return[t/(eB(r)*(BB-1/hB(r))),cB(n)*r]},FB.invert=function(t,n){var e=2*kB(n/2);return[t*eB(e/2)/eB(e),e]};var UB=KB(vB/mB,vB,pB),qB=2.00276,WB=1.11072;function $B(t,n){var e=GB(pB,n);return[qB*t/(1/eB(n)+WB/eB(e)),(n+vB*hB(e))/qB]}function YB(t){var n=0,e=xj(t),i=e(n);return i.parallel=function(t){return arguments.length?e(n=t*xB):n*SB},i}function VB(t,n){return[t*eB(n),n]}function ZB(t){if(!t)return VB;var n=1/fB(t);function e(e,i){var r=n+t-i,o=r?e*eB(i)/r:r;return[r*hB(o),n-r*eB(o)]}return e.invert=function(e,i){var r=AB(e*e+(i=n-i)*i),o=n+t-r;return[r/eB(o)*nB(e,i),o]},e}function XB(t){function n(n,e){var i=mB-e,r=i?n*t*hB(i)/i:i;return[i*hB(r)/t,mB-i*eB(r)]}return n.invert=function(n,e){var i=n*t,r=mB-e,o=AB(i*i+r*r),a=nB(i,r);return[(o?o/hB(o):1)*a/t,mB-o]},n}$B.invert=function(t,n){var e,i,r=qB*n,o=n<0?-_B:_B,a=25;do{i=r-vB*hB(o),o-=e=(hB(2*o)+2*o-pB*hB(i))/(2*eB(2*o)+2+pB*eB(i)*vB*eB(o))}while(Qj(e)>gB&&--a>0);return i=r-vB*hB(o),[t*(1/eB(i)+WB/eB(o))/qB,i]},VB.invert=function(t,n){return[t/eB(n),n]};var JB=KB(1,4/pB,pB);function QB(t,n,e,i,r,o){var a,u=eB(o);if(Qj(t)>1||Qj(o)>1)a=CB(e*r+n*i*u);else{var l=hB(t/2),s=hB(o/2);a=2*kB(AB(l*l+n*i*s*s))}return Qj(a)>gB?[a,nB(i*hB(o),n*r-e*i*u)]:[0,0]}function tD(t,n,e){return CB((t*t+n*n-e*e)/(2*t*n))}function nD(t){return t-2*pB*rB((t+pB)/(2*pB))}function eD(t,n,e){for(var i,r=[[t[0],t[1],hB(t[1]),eB(t[1])],[n[0],n[1],hB(n[1]),eB(n[1])],[e[0],e[1],hB(e[1]),eB(e[1])]],o=r[2],a=0;a<3;++a,o=i)i=r[a],o.v=QB(i[1]-o[1],o[3],o[2],i[3],i[2],i[0]-o[0]),o.point=[0,0];var u=tD(r[0].v[0],r[2].v[0],r[1].v[0]),l=tD(r[0].v[0],r[1].v[0],r[2].v[0]),s=pB-u;r[2].point[1]=0,r[0].point[0]=-(r[1].point[0]=r[0].v[0]/2);var c=[r[2].point[0]=r[0].point[0]+r[2].v[0]*eB(u),2*(r[0].point[1]=r[1].point[1]=r[2].v[0]*hB(u))];return function(t,n){var e,i=hB(n),o=eB(n),a=new Array(3);for(e=0;e<3;++e){var u=r[e];if(a[e]=QB(n-u[1],u[3],u[2],o,i,t-u[0]),!a[e][0])return u.point;a[e][1]=nD(a[e][1]-u.v[1])}var h=c.slice();for(e=0;e<3;++e){var f=2==e?0:e+1,g=tD(r[e].v[0],a[e][0],a[f][0]);a[e][1]<0&&(g=-g),e?1==e?(g=l-g,h[0]-=a[e][0]*eB(g),h[1]-=a[e][0]*hB(g)):(g=s-g,h[0]+=a[e][0]*eB(g),h[1]+=a[e][0]*hB(g)):(h[0]+=a[e][0]*eB(g),h[1]-=a[e][0]*hB(g))}return h[0]/=3,h[1]/=3,h}}function iD(t){return t[0]*=xB,t[1]*=xB,t}function rD(t,n,e){var i=uO({type:"MultiPoint",coordinates:[t,n,e]}),r=[-i[0],-i[1]],o=pO(r),a=eD(iD(o(t)),iD(o(n)),iD(o(e)));a.invert=IB(a);var u=Sj(a).rotate(r),l=u.center;return delete u.rotate,u.center=function(t){return arguments.length?l(o(t)):o.invert(l())},u.clipAngle(90)}function oD(t,n){var e=AB(1-hB(n));return[2/bB*t*e,bB*(1-e)]}function aD(t){var n=fB(t);function e(t,e){return[t,(t?t/hB(t):1)*(hB(e)*eB(t)-n*eB(e))]}return e.invert=n?function(t,e){t&&(e*=hB(t)/t);var i=eB(t);return[t,2*nB(AB(i*i+n*n-e*e)-i,n-e)]}:function(t,n){return[t,kB(t?n*fB(t)/t:n)]},e}oD.invert=function(t,n){var e=(e=n/bB-1)*e;return[e>0?t*AB(pB/e)/2:0,kB(1-e)]};var uD=AB(3);function lD(t,n){return[uD*t*(2*eB(2*n/3)-1)/bB,uD*bB*hB(n/3)]}function sD(t){var n=eB(t);function e(t,e){return[t*n,hB(e)/n]}return e.invert=function(t,e){return[t/n,kB(e*n)]},e}function cD(t){var n=eB(t);function e(t,e){return[t*n,(1+n)*fB(e/2)]}return e.invert=function(t,e){return[t/n,2*tB(e/(1+n))]},e}function hD(t,n){var e=AB(8/(3*pB));return[e*t*(1-Qj(n)/pB),e*n]}function fD(t,n){var e=AB(4-3*hB(Qj(n)));return[2/AB(6*pB)*t*e,cB(n)*AB(2*pB/3)*(2-e)]}function gD(t,n){var e=AB(pB*(4+pB));return[2/e*t*(1+AB(1-4*n*n/(pB*pB))),4/e*n]}function dD(t,n){var e=(2+mB)*hB(n);n/=2;for(var i=0,r=1/0;i<10&&Qj(r)>gB;i++){var o=eB(n);n-=r=(n+hB(n)*(o+2)-e)/(2*o*(1+o))}return[2/AB(pB*(4+pB))*t*(1+eB(n)),2*AB(pB/(4+pB))*hB(n)]}function pD(t,n){return[t*(1+eB(n))/AB(2+pB),2*n/AB(2+pB)]}function mD(t,n){for(var e=(1+mB)*hB(n),i=0,r=1/0;i<10&&Qj(r)>gB;i++)n-=r=(n+hB(n)-e)/(1+eB(n));return e=AB(2+pB),[t*(1+eB(n))/e,2*n/e]}lD.invert=function(t,n){var e=3*kB(n/(uD*bB));return[bB*t/(uD*(2*eB(2*e/3)-1)),e]},hD.invert=function(t,n){var e=AB(8/(3*pB)),i=n/e;return[t/(e*(1-Qj(i)/pB)),i]},fD.invert=function(t,n){var e=2-Qj(n)/AB(2*pB/3);return[t*AB(6*pB)/(2*e),cB(n)*kB((4-e*e)/3)]},gD.invert=function(t,n){var e=AB(pB*(4+pB))/2;return[t*e/(1+AB(1-n*n*(4+pB)/(4*pB))),n*e/2]},dD.invert=function(t,n){var e=n*AB((4+pB)/pB)/2,i=kB(e),r=eB(i);return[t/(2/AB(pB*(4+pB))*(1+r)),kB((i+e*(r+2))/(2+mB))]},pD.invert=function(t,n){var e=AB(2+pB),i=n*e/2;return[e*t/(1+eB(i)),i]},mD.invert=function(t,n){var e=1+mB,i=AB(e/2);return[2*t*i/(1+eB(n*=i)),kB((n+hB(n))/e)]};var _D=3+2*vB;function yD(t,n){var e=hB(t/=2),i=eB(t),r=AB(eB(n)),o=eB(n/=2),a=hB(n)/(o+vB*i*r),u=AB(2/(1+a*a)),l=AB((vB*o+(i+e)*r)/(vB*o+(i-e)*r));return[_D*(u*(l-1/l)-2*oB(l)),_D*(u*a*(l+1/l)-2*tB(a))]}yD.invert=function(t,n){if(!(e=jB.invert(t/1.2,1.065*n)))return null;var e,i=e[0],r=e[1],o=20;t/=_D,n/=_D;do{var a=i/2,u=r/2,l=hB(a),s=eB(a),c=hB(u),h=eB(u),f=eB(r),g=AB(f),d=c/(h+vB*s*g),p=d*d,m=AB(2/(1+p)),_=(vB*h+(s+l)*g)/(vB*h+(s-l)*g),y=AB(_),v=y-1/y,b=y+1/y,w=m*v-2*oB(y)-t,S=m*d*b-2*tB(d)-n,x=c&&yB*g*l*p/c,k=(vB*s*h+g)/(2*(h+vB*s*g)*(h+vB*s*g)*g),C=-.5*d*m*m*m,A=C*x,E=C*k,M=(M=2*h+vB*g*(s-l))*M*y,T=(vB*s*h*g+f)/M,O=-vB*l*c/(g*M),P=v*A-2*T/y+m*(T+T/_),j=v*E-2*O/y+m*(O+O/_),B=d*b*A-2*x/(1+p)+m*b*x+m*d*(T-T/_),D=d*b*E-2*k/(1+p)+m*b*k+m*d*(O-O/_),z=j*B-D*P;if(!z)break;var N=(S*j-w*D)/z,R=(w*B-S*P)/z;i-=N,r=aB(-mB,uB(mB,r-R))}while((Qj(N)>gB||Qj(R)>gB)&&--o>0);return Qj(Qj(r)-mB)i){var s=AB(l),c=nB(u,a),h=e*sB(c/e),f=c-h,g=t*eB(f),d=(t*hB(f)-f*hB(g))/(mB-g),p=AD(f,d),m=(pB-t)/ED(p,g,pB);a=s;var _,y=50;do{a-=_=(t+ED(p,g,a)*m-s)/(p(a)*m)}while(Qj(_)>gB&&--y>0);u=f*hB(a),ai){var a=AB(o),u=nB(r,n),l=e*sB(u/e),s=u-l;n=a*eB(s),r=a*hB(s);for(var c=n-mB,h=hB(n),f=r/h,g=ngB||Qj(h)>gB)&&--d>0);return[f,g]},l}bD.invert=function(t,n){var e=n/(1+vD);return[t&&t/(vD*AB(1-e*e)),2*tB(e)]},wD.invert=function(t,n){var e=tB(n/bB),i=eB(e),r=2*e;return[t*bB/2/(eB(r)*i*i),r]};var TD=MD(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),OD=MD(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),PD=MD(5/6*pB,-.62636,-.0344,0,1.3493,-.05524,0,.045);function jD(t,n){var e=t*t,i=n*n;return[t*(1-.162388*i)*(.87-952426e-9*e*e),n*(1+i/12)]}jD.invert=function(t,n){var e,i=t,r=n,o=50;do{var a=r*r;r-=e=(r*(1+a/12)-n)/(1+a/4)}while(Qj(e)>gB&&--o>0);o=50,t/=1-.162388*a;do{var u=(u=i*i)*u;i-=e=(i*(.87-952426e-9*u)-t)/(.87-.00476213*u)}while(Qj(e)>gB&&--o>0);return[i,r]};var BD=MD(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function DD(t){var n=t(mB,0)[0]-t(-mB,0)[0];function e(e,i){var r=e>0?-.5:.5,o=t(e+r*pB,i);return o[0]-=r*n,o}return t.invert&&(e.invert=function(e,i){var r=e>0?-.5:.5,o=t.invert(e+r*n,i),a=o[0]-r*pB;return a<-pB?a+=2*pB:a>pB&&(a-=2*pB),o[0]=a,o}),e}function zD(t,n){var e=cB(t),i=cB(n),r=eB(n),o=eB(t)*r,a=hB(t)*r,u=hB(i*n);t=Qj(nB(a,u)),n=kB(o),Qj(t-mB)>gB&&(t%=mB);var l=function(t,n){if(n===mB)return[0,0];var e,i,r=hB(n),o=r*r,a=o*o,u=1+a,l=1+3*a,s=1-a,c=kB(1/AB(u)),h=s+o*u*c,f=(1-r)/h,g=AB(f),d=f*u,p=AB(d),m=g*s;if(0===t)return[0,-(m+o*p)];var _,y=eB(n),v=1/y,b=2*r*y,w=(-3*o+c*l)*b,S=(-h*y-(1-r)*w)/(h*h),x=s*(.5*S/g)-2*o*g*b,k=o*u*S+f*l*b,C=-v*b,A=-v*k,E=-2*v*x,M=4*t/pB;if(t>.222*pB||n.175*pB){if(e=(m+o*AB(d*(1+a)-m*m))/(1+a),t>pB/4)return[e,e];var T=e,O=.5*e;e=.5*(O+T),i=50;do{var P=e*(E+C*AB(d-e*e))+A*kB(e/p)-M;if(!P)break;P<0?O=e:T=e,e=.5*(O+T)}while(Qj(T-O)>gB&&--i>0)}else{e=gB,i=25;do{var j=e*e,B=AB(d-j),D=E+C*B,z=e*D+A*kB(e/p)-M;e-=_=B?z/(D+(A-C*j)/B):0}while(Qj(_)>gB&&--i>0)}return[e,-m-o*AB(d-e*e)]}(t>pB/4?mB-t:t,n);return t>pB/4&&(u=l[0],l[0]=-l[1],l[1]=-u),l[0]*=e,l[1]*=-i,l}function ND(t,n){var e,i,r,o,a;if(n=1-gB)return e=(1-n)/4,i=MB(t),o=function(t){return((t=iB(2*t))-1)/(t+1)}(t),r=1/i,[o+e*((a=i*EB(t))-t)/(i*i),r-e*o*r*(a-t),r+e*o*r*(a+t),2*tB(iB(t))-mB+e*(a-t)/i];var u=[1,0,0,0,0,0,0,0,0],l=[AB(n),0,0,0,0,0,0,0,0],s=0;for(i=AB(1-n),a=1;Qj(l[s]/u[s])>gB&&s<8;)e=u[s++],l[s]=(e-i)/2,u[s]=(e+i)/2,i=AB(e*i),a*=2;r=a*u[s]*t;do{r=(kB(o=l[s]*hB(i=r)/u[s])+r)/2}while(--s);return[hB(r),o=eB(r),o/eB(r-i),r]}function RD(t,n){if(!n)return t;if(1===n)return oB(fB(t/2+_B));for(var e=1,i=AB(1-n),r=AB(n),o=0;Qj(r)>gB;o++){if(t%pB){var a=tB(i*fB(t)/e);a<0&&(a+=pB),t+=a+~~(t/pB)*pB}else t+=t;r=(e+i)/2,i=AB(e*i),r=((e=r)-i)/2}return t/(lB(2,o)*e)}function FD(t,n){var e=(vB-1)/(vB+1),i=AB(1-e*e),r=RD(mB,i*i),o=oB(fB(pB/4+Qj(n)/2)),a=iB(-1*o)/AB(e),u=function(t,n){var e=t*t,i=n+1,r=1-e-n*n;return[.5*((t>=0?mB:-mB)-nB(r,2*t)),-.25*oB(r*r+4*e)+.5*oB(i*i+e)]}(a*eB(-1*t),a*hB(-1*t)),l=function(t,n,e){var i=Qj(t),r=EB(Qj(n));if(i){var o=1/hB(i),a=1/(fB(i)*fB(i)),u=-(a+e*(r*r*o*o)-1+e),l=(-u+AB(u*u-(e-1)*a*4))/2;return[RD(tB(1/AB(l)),e)*cB(t),RD(tB(AB((l/a-1)/e)),1-e)*cB(n)]}return[0,RD(tB(r),1-e)*cB(n)]}(u[0],u[1],i*i);return[-l[1],(n>=0?1:-1)*(.5*r-l[0])]}function LD(t){var n=hB(t),e=eB(t),i=ID(t);function r(t,r){var o=i(t,r);t=o[0],r=o[1];var a=hB(r),u=eB(r),l=eB(t),s=CB(n*a+e*u*l),c=hB(s),h=Qj(c)>gB?s/c:1;return[h*e*hB(t),(Qj(t)>mB?h:-h)*(n*u-e*a*l)]}return i.invert=ID(-t),r.invert=function(t,e){var r=AB(t*t+e*e),o=-hB(r),a=eB(r),u=r*a,l=-e*o,s=r*n,c=AB(u*u+l*l-s*s),h=nB(u*s+l*c,l*s-u*c),f=(r>mB?-1:1)*nB(t*o,r*eB(h)*a+e*hB(h)*o);return i.invert(f,h)},r}function ID(t){var n=hB(t),e=eB(t);return function(t,i){var r=eB(i),o=eB(t)*r,a=hB(t)*r,u=hB(i);return[nB(a,o*e-u*n),kB(u*e+o*n)]}}zD.invert=function(t,n){Qj(t)>1&&(t=2*cB(t)-t),Qj(n)>1&&(n=2*cB(n)-n);var e=cB(t),i=cB(n),r=-e*t,o=-i*n,a=o/r<1,u=function(t,n){for(var e=0,i=1,r=.5,o=50;;){var a=r*r,u=AB(r),l=kB(1/AB(1+a)),s=1-a+r*(1+a)*l,c=(1-u)/s,h=AB(c),f=c*(1+a),g=h*(1-a),d=AB(f-t*t),p=n+g+r*d;if(Qj(i-e)0?e=r:i=r,r=.5*(e+i)}if(!o)return null;var m=kB(u),_=eB(m),y=1/_,v=2*u*_,b=(-3*r+l*(1+3*a))*v,w=(-s*_-(1-u)*b)/(s*s),S=.5*w/h,x=(1-a)*S-2*r*h*v,k=-y*(r*(1+a)*w+c*(1+3*a)*v);return[pB/4*(t*(-2*y*x+-y*v*d)+k*kB(t/AB(f))),m]}(a?o:r,a?r:o),l=u[0],s=u[1],c=eB(s);return a&&(l=-mB-l),[e*(nB(hB(l)*c,-hB(s))+pB),i*kB(eB(l)*c)]},FD.invert=function(t,n){var e=(vB-1)/(vB+1),i=AB(1-e*e),r=function(t,n,e){var i,r,o;return t?(i=ND(t,e),n?(o=(r=ND(n,1-e))[1]*r[1]+e*i[0]*i[0]*r[0]*r[0],[[i[0]*r[2]/o,i[1]*i[2]*r[0]*r[1]/o],[i[1]*r[1]/o,-i[0]*i[2]*r[0]*r[2]/o],[i[2]*r[1]*r[2]/o,-e*i[0]*i[1]*r[0]/o]]):[[i[0],0],[i[1],0],[i[2],0]]):[[0,(r=ND(n,1-e))[0]/r[1]],[1/r[1],0],[r[2]/r[1],0]]}(.5*RD(mB,i*i)-n,-t,i*i),o=function(t,n){var e=n[0]*n[0]+n[1]*n[1];return[(t[0]*n[0]+t[1]*n[1])/e,(t[1]*n[0]-t[0]*n[1])/e]}(r[0],r[1]);return[nB(o[1],o[0])/-1,2*tB(iB(-.5*oB(e*o[0]*o[0]+e*o[1]*o[1])))-mB]};var HD=kB(1-1/3)*SB,GD=sD(0);function KD(t){var n=HD*xB,e=oD(pB,n)[0]-oD(-pB,n)[0],i=GD(0,n)[1],r=oD(0,n)[1],o=bB-r,a=wB/t,u=4/wB,l=i+o*o*4/wB;function s(s,c){var h,f=Qj(c);if(f>n){var g=uB(t-1,aB(0,rB((s+pB)/a)));(h=oD(s+=pB*(t-1)/t-g*a,f))[0]=h[0]*wB/e-wB*(t-1)/(2*t)+g*wB/t,h[1]=i+4*(h[1]-r)*o/wB,c<0&&(h[1]=-h[1])}else h=GD(s,c);return h[0]*=u,h[1]/=l,h}return s.invert=function(n,s){n/=u;var c=Qj(s*=l);if(c>i){var h=uB(t-1,aB(0,rB((n+pB)/a)));n=(n+pB*(t-1)/t-h*a)*e/wB;var f=oD.invert(n,.25*(c-i)*wB/o+r);return f[0]-=pB*(t-1)/t-h*a,s<0&&(f[1]=-f[1]),f}return GD.invert(n,s)},s}function UD(t,n){return[t,1&n?90-gB:HD]}function qD(t,n){return[t,1&n?-90+gB:-HD]}function WD(t){return[t[0]*(1-gB),t[1]]}function $D(t){var n,e=1+t,i=kB(hB(1/e)),r=2*AB(pB/(n=pB+4*i*e)),o=.5*r*(e+AB(t*(2+t))),a=t*t,u=e*e;function l(l,s){var c,h,f=1-hB(s);if(f&&f<2){var g,d=mB-s,p=25;do{var m=hB(d),_=eB(d),y=i+nB(m,e-_),v=1+u-2*e*_;d-=g=(d-a*i-e*m+v*y-.5*f*n)/(2*e*m*y)}while(Qj(g)>dB&&--p>0);c=r*AB(v),h=l*y/pB}else c=r*(t+f),h=l*i/pB;return[c*hB(h),o-c*eB(h)]}return l.invert=function(t,l){var s=t*t+(l-=o)*l,c=(1+u-s/(r*r))/(2*e),h=CB(c),f=hB(h),g=i+nB(f,e-c);return[kB(t/AB(s))*pB/g,kB(1-2*(h-a*i-e*f+(1+u-2*e*c)*g)/n)]},l}var YD=.7109889596207567,VD=.0528035274542;function ZD(t,n){return n>-YD?((t=UB(t,n))[1]+=VD,t):VB(t,n)}function XD(t,n){return Qj(n)>YD?((t=UB(t,n))[1]-=n>0?VD:-VD,t):VB(t,n)}function JD(t,n,e,i){var r=AB(4*pB/(2*e+(1+t-n/2)*hB(2*e)+(t+n)/2*hB(4*e)+n/2*hB(6*e))),o=AB(i*hB(e)*AB((1+t*eB(2*e)+n*eB(4*e))/(1+t+n))),a=e*l(1);function u(e){return AB(1+t*eB(2*e)+n*eB(4*e))}function l(i){var r=i*e;return(2*r+(1+t-n/2)*hB(2*r)+(t+n)/2*hB(4*r)+n/2*hB(6*r))/e}function s(t){return u(t)*hB(t)}var c=function(t,n){var i=e*LB(l,a*hB(n)/e,n/pB);isNaN(i)&&(i=e*cB(n));var s=r*u(i);return[s*o*t/pB*eB(i),s/o*hB(i)]};return c.invert=function(t,n){var i=LB(s,n*o/r);return[t*pB/(eB(i)*r*o*u(i)),kB(e*l(i/e)/a)]},0===e&&(r=AB(i/pB),c=function(t,n){return[t*r,hB(n)/r]},c.invert=function(t,n){return[t/r,kB(n*r)]}),c}function QD(t,n,e,i,r,o,a,u,l,s,c){if(c.nanEncountered)return NaN;var h,f,g,d,p,m,_,y,v,b;if(f=t(n+.25*(h=e-n)),g=t(e-.25*h),isNaN(f))c.nanEncountered=!0;else{if(!isNaN(g))return b=((m=(d=h*(i+4*f+r)/12)+(p=h*(r+4*g+o)/12))-a)/15,s>l?(c.maxDepthCount++,m+b):Math.abs(b)t?e=i:n=i,i=n+e>>1}while(i>n);var r=l[i+1]-l[i];return r&&(r=(t-l[i+1])/r),(i+1+r)/a}var h=2*c(1)/pB*o/e,f=function(t,n){var e=c(Qj(hB(n))),r=i(e)*t;return e/=h,[r,n>=0?e:-e]};return f.invert=function(t,n){var e;return Qj(n*=h)<1&&(e=cB(n)*kB(r(Qj(n))*o)),[t/i(Qj(n)),e]},f}function ez(t,n){return Qj(t[0]-n[0])o[a][2][0];++a);var l=t(e-o[a][1][0],i);return l[0]+=t(o[a][1][0],r*i>r*o[a][0][1]?o[a][0][1]:i)[0],l}e?o.invert=e(o):t.invert&&(o.invert=function(e,i){for(var a=r[+(i<0)],u=n[+(i<0)],l=0,s=a.length;l=0;--u)e=(n=t[1][u])[0][0],i=n[0][1],r=n[1][1],o=n[2][0],a=n[2][1],l.push(iz([[o-gB,a-gB],[o-gB,r+gB],[e+gB,r+gB],[e+gB,i-gB]],30));return{type:"Polygon",coordinates:[Zt(l)]}}(e),n=e.map((function(t){return t.map((function(t){return[[t[0][0]*xB,t[0][1]*xB],[t[1][0]*xB,t[1][1]*xB],[t[2][0]*xB,t[2][1]*xB]]}))})),r=n.map((function(n){return n.map((function(n){var e,i=t(n[0][0],n[0][1])[0],r=t(n[2][0],n[2][1])[0],o=t(n[1][0],n[0][1])[1],a=t(n[1][0],n[1][1])[1];return o>a&&(e=o,o=a,a=e),[[i,o],[r,a]]}))})),a):n.map((function(t){return t.map((function(t){return[[t[0][0]*SB,t[0][1]*SB],[t[1][0]*SB,t[1][1]*SB],[t[2][0]*SB,t[2][1]*SB]]}))}))},null!=n&&a.lobes(n),a}ZD.invert=function(t,n){return n>-YD?UB.invert(t,n-VD):VB.invert(t,n)},XD.invert=function(t,n){return Qj(n)>YD?UB.invert(t,n+(n>0?VD:-VD)):VB.invert(t,n)};var oz=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],az=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],uz=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],lz=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],sz=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],cz=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function hz(t,n){return[3/wB*t*AB(pB*pB/3-n*n),n]}function fz(t){function n(n,e){if(Qj(Qj(e)-mB)2)return null;var r=(n/=2)*n,o=(e/=2)*e,a=2*e/(1+r+o);return a=lB((1+a)/(1-a),1/t),[nB(2*n,1-r-o)/t,kB((a-1)/(a+1))]},n}hz.invert=function(t,n){return[wB/3*t/AB(pB*pB/3-n*n),n]};var gz=pB/vB;function dz(t,n){return[t*(1+AB(eB(n)))/2,n/(eB(n/2)*eB(t/6))]}function pz(t,n){var e=t*t,i=n*n;return[t*(.975534+i*(-.0143059*e-.119161+-.0547009*i)),n*(1.00384+e*(.0802894+-.02855*i+199025e-9*e)+i*(.0998909+-.0491032*i))]}function mz(t,n){return[hB(t)/eB(n),fB(n)*eB(t)]}function _z(t){var n=eB(t),e=fB(_B+t/2);function i(i,r){var o=r-t,a=Qj(o)=0;)h=(c=t[s])[0]+u*(r=h)-l*f,f=c[1]+u*f+l*r;return[h=u*(r=h)-l*f,f=u*f+l*r]}return e.invert=function(e,i){var r=20,o=e,a=i;do{for(var u,l=n,s=t[l],c=s[0],h=s[1],f=0,g=0;--l>=0;)f=c+o*(u=f)-a*g,g=h+o*g+a*u,c=(s=t[l])[0]+o*(u=c)-a*h,h=s[1]+o*h+a*u;var d,p,m=(f=c+o*(u=f)-a*g)*f+(g=h+o*g+a*u)*g;o-=d=((c=o*(u=c)-a*h-e)*f+(h=o*h+a*u-i)*g)/m,a-=p=(h*f-c*g)/m}while(Qj(d)+Qj(p)>gB*gB&&--r>0);if(r){var _=AB(o*o+a*a),y=2*tB(.5*_),v=hB(y);return[nB(o*v,_*eB(y)),_?kB(a*v/_):0]}},e}dz.invert=function(t,n){var e=Qj(t),i=Qj(n),r=gB,o=mB;igB||Qj(m)>gB)&&--r>0);return r&&[e,i]},mz.invert=function(t,n){var e=t*t,i=n*n+1,r=e+i,o=t?yB*AB((r-AB(r*r-4*e))/e):1/AB(i);return[kB(t*o),cB(n)*CB(o)]},yz.invert=function(t,n){return[t,2.5*tB(iB(.8*n))-.625*pB]};var bz=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],wz=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Sz=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],xz=[[.9245,0],[0,0],[.01943,0]],kz=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Cz(t,n){var e=Sj(vz(t)).rotate(n).clipAngle(90),i=pO(n),r=e.center;return delete e.rotate,e.center=function(t){return arguments.length?r(i(t)):i.invert(r())},e}var Az=AB(6),Ez=AB(7);function Mz(t,n){var e=kB(7*hB(n)/(3*Az));return[Az*t*(2*eB(2*e/3)-1)/Ez,9*hB(e/3)/Ez]}function Tz(t,n){for(var e,i=(1+yB)*hB(n),r=n,o=0;o<25&&(r-=e=(hB(r/2)+hB(r)-i)/(.5*eB(r/2)+eB(r)),!(Qj(e)dB&&--u>0);return[t/(.84719-.13063*(i=a*a)+(o=i*(r=i*i))*o*(.05494*i-.04515-.02326*r+.00331*o)),a]},jz.invert=function(t,n){for(var e=n/2,i=0,r=1/0;i<10&&Qj(r)>gB;++i){var o=eB(n/2);n-=r=(n-fB(n/2)-e)/(1-.5/(o*o))}return[2*t/(1+eB(n)),n]};var Bz=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Dz(t,n){var e=hB(n),i=eB(n),r=cB(t);if(0===t||Qj(n)===mB)return[0,n];if(0===n)return[t,0];if(Qj(t)===mB)return[t*i,mB*e];var o=pB/(2*t)-2*t/pB,a=2*n/pB,u=(1-a*a)/(e-a),l=o*o,s=u*u,c=1+l/s,h=1+s/l,f=(o*e/u-o/2)/c,g=(s*e/l+u/2)/h,d=g*g-(s*e*e/l+u*e-1)/h;return[mB*(f+AB(f*f+i*i/c)*r),mB*(g+AB(d<0?0:d)*cB(-n*o)*r)]}Dz.invert=function(t,n){var e=(t/=mB)*t,i=e+(n/=mB)*n,r=pB*pB;return[t?(i-1+AB((1-i)*(1-i)+4*e))/(2*t)*mB:0,LB((function(t){return i*(pB*hB(t)-2*t)*pB+4*t*t*(n-hB(t))+2*pB*t-r*n}),0)]};var zz=1.0148,Nz=.23185,Rz=-.14499,Fz=.02406,Lz=zz,Iz=5*Nz,Hz=7*Rz,Gz=9*Fz,Kz=1.790857183;function Uz(t,n){var e=n*n;return[t,n*(zz+e*e*(Nz+e*(Rz+Fz*e)))]}function qz(t,n){if(Qj(n)=0;)if(i=n[u],e[0]===i[0]&&e[1]===i[1]){if(o)return[o,e];o=e}}}(n.face,e.face),r=Wz(i.map(e.project),i.map(n.project));n.transform=e.transform?$z(e.transform,r):r;for(var o=e.edges,a=0,u=o.length;aKz?n=Kz:n<-1.790857183&&(n=-1.790857183);var e,i=n;do{var r=i*i;i-=e=(i*(zz+r*r*(Nz+r*(Rz+Fz*r)))-n)/(Lz+r*r*(Iz+r*(Hz+Gz*r)))}while(Qj(e)>gB);return[t,i]},qz.invert=function(t,n){if(Qj(n)gB&&--o>0);return a=fB(r),[(Qj(n){};function sN(t,n){return{type:"FeatureCollection",features:t.features.map((function(t){return cN(t,n)}))}}function cN(t,n){return{type:"Feature",id:t.id,properties:t.properties,geometry:hN(t.geometry,n)}}function hN(t,n){if(!t)return null;if("GeometryCollection"===t.type)return function(t,n){return{type:"GeometryCollection",geometries:t.geometries.map((function(t){return hN(t,n)}))}}(t,n);var e;switch(t.type){case"Point":case"MultiPoint":e=dN;break;case"LineString":case"MultiLineString":e=pN;break;case"Polygon":case"MultiPolygon":case"Sphere":e=mN;break;default:return null}return qM(t,n(e)),e.result()}var fN=[],gN=[],dN={point:function(t,n){fN.push([t,n])},result:function(){var t=fN.length?fN.length<2?{type:"Point",coordinates:fN[0]}:{type:"MultiPoint",coordinates:fN}:null;return fN=[],t}},pN={lineStart:lN,point:function(t,n){fN.push([t,n])},lineEnd:function(){fN.length&&(gN.push(fN),fN=[])},result:function(){var t=gN.length?gN.length<2?{type:"LineString",coordinates:gN[0]}:{type:"MultiLineString",coordinates:gN}:null;return gN=[],t}},mN={polygonStart:lN,lineStart:lN,point:function(t,n){fN.push([t,n])},lineEnd:function(){var t=fN.length;if(t){do{fN.push(fN[0].slice())}while(++t<4);gN.push(fN),fN=[]}},polygonEnd:lN,result:function(){if(!gN.length)return null;var t=[],n=[];return gN.forEach((function(e){!function(t){if((n=t.length)<4)return!1;for(var n,e=0,i=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++ei^g>i&&e<(f-s)*(i-c)/(g-c)+s&&(r=!r)}return r}(t[0],e))return t.push(n),!0}))||t.push([n])})),gN=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}};function _N(t){var n=t(mB,0)[0]-t(-mB,0)[0];function e(e,i){var r=Qj(e)0?e-pB:e+pB,i),a=(o[0]-o[1])*yB,u=(o[0]+o[1])*yB;if(r)return[a,u];var l=n*yB,s=a>0^u>0?-1:1;return[s*a-cB(u)*l,s*u-cB(a)*l]}return t.invert&&(e.invert=function(e,i){var r=(e+i)*yB,o=(i-e)*yB,a=Qj(r)<.5*n&&Qj(o)<.5*n;if(!a){var u=n*yB,l=r>0^o>0?-1:1,s=-l*e+(o>0?1:-1)*u,c=-l*i+(r>0?1:-1)*u;r=(-s-c)*yB,o=(s-c)*yB}var h=t.invert(r,o);return a||(h[0]+=r>0?pB:-pB),h}),Sj(e).rotate([-90,-90,45]).clipAngle(179.999)}function yN(t){var n=hB(t);function e(e,i){var r=n?fB(e*n/2)/n:e/2;if(!i)return[2*r,-t];var o=2*tB(r*hB(i)),a=1/fB(i);return[hB(o)*a,i+(1-eB(o))*a-t]}return e.invert=function(e,i){if(Qj(i+=t)gB&&--u>0);var h=e*(l=fB(a)),f=fB(Qj(i)=0||1===r){e=(n>=0?5:-5)*(f+i);var g,d=50;do{f=(i=uB(18,Qj(e)/5))-(r=rB(i)),o=vN[r][1],a=vN[r+1][1],u=vN[uB(19,r+2)][1],e-=(g=cB(n)*(a+f*(u-o)/2+f*f*(u-2*a+o)/2)-n)*SB}while(Qj(g)>dB&&--d>0);break}}while(--r>=0);var p=vN[r][0],m=vN[r+1][0],_=vN[uB(19,r+2)][0];return[t/(m+f*(_-p)/2+f*f*(_-2*m+p)/2),e*xB]};var SN=1e-4,xN=1e4,kN=-180,CN=kN+SN,AN=180,EN=AN-SN,MN=-90,TN=MN+SN,ON=90,PN=ON-SN;function jN(t){return t.length>0}function BN(t){return Math.floor(t*xN)/xN}function DN(t){return t===MN||t===ON?[0,t]:[kN,BN(t)]}function zN(t){var n=t[0],e=t[1],i=!1;return n<=CN?(n=kN,i=!0):n>=EN&&(n=AN,i=!0),e<=TN?(e=MN,i=!0):e>=PN&&(e=ON,i=!0),i?[n,e]:t}function NN(t){return t.map(zN)}function RN(t,n,e){for(var i=0,r=t.length;i=EN||c<=TN||c>=PN){o[a]=zN(l);for(var h=a+1;hCN&&gTN&&d=u)break;e.push({index:-1,polygon:n,ring:o=o.slice(h-1)}),o[0]=DN(o[0][1]),a=-1,u=o.length}}}}function FN(t){var n,e,i,r,o,a,u=t.length,l={},s={};for(n=0;n0?pB-u:u)*SB],s=Sj(t(a)).rotate(l),c=pO(l),h=s.center;return delete s.rotate,s.center=function(t){return arguments.length?h(c(t)):c.invert(h())},s.clipAngle(90)}function KN(t){var n=eB(t);function e(t,e){var i=qj(t,e);return i[0]*=n,i}return e.invert=function(t,e){return qj.invert(t/n,e)},e}function UN(t,n){return GN(KN,t,n)}function qN(t){if(!(t*=2))return Pj;var n=-t/2,e=-n,i=t*t,r=fB(e),o=.5/hB(e);function a(r,o){var a=CB(eB(o)*eB(r-n)),u=CB(eB(o)*eB(r-e));return[((a*=a)-(u*=u))/(2*t),(o<0?-1:1)*AB(4*i*u-(i-a+u)*(i-a+u))/(2*t)]}return a.invert=function(t,i){var a,u,l=i*i,s=eB(AB(l+(a=t+n)*a)),c=eB(AB(l+(a=t+e)*a));return[nB(u=s-c,a=(s+c)*r),(i<0?-1:1)*CB(AB(a*a+u*u)*o)]},a}function WN(t,n){return GN(qN,t,n)}function $N(t,n){if(Qj(n).5?uB(n,Qj(t)):0)),l=t*t+n*n,s=50;do{var c=u*u,h=(8*u-c*(c+2)-5)/(2*c*(u-1)),f=(3*u-c*u-10)/(2*c*u),g=h*h,d=u*h,p=u+h,m=p*p,_=u+3*h,y=-2*p*(4*d*g+(1-4*c+3*c*c)*(1+f)+g*(14*c-6-a+(8*c-8-2*a)*f)+d*(12*c-8+(10*c-10-a)*f)),v=AB(m*(c+g*a-1)+(1-c)*(c*(_*_+4*g)+g*(12*d+4*g)));u-=e=(o*(m+g-1)+2*v-r*(4*m+a))/(o*(2*h*f+2*p*(1+f))+y/v-8*p*(o*(-1+g+m)+2*v)*(1+f)/(a+4*m))}while(e*l*l>gB&&--s>0);return[cB(t)*(AB(o*o+4)+o)*pB/4,i*mB*u]};var QN=4*pB+3*AB(3),tR=2*AB(2*pB*AB(3)/QN),nR=KB(tR*AB(3)/pB,tR,QN/6);function eR(t,n){return[t*AB(1-3*n*n/(pB*pB)),n]}function iR(t,n){var e=eB(n),i=eB(t)*e,r=1-i,o=eB(t=nB(hB(t)*e,-hB(n))),a=hB(t);return[a*(e=AB(1-i*i))-o*r,-o*e-a*r]}function rR(t,n){var e=OB(t,n);return[(e[0]+t/mB)/2,(e[1]+n)/2]}eR.invert=function(t,n){return[t/AB(1-3*n*n/(pB*pB)),n]},iR.invert=function(t,n){var e=(t*t+n*n)/-2,i=AB(-e*(2+e)),r=n*e+t*i,o=t*e-n*i,a=AB(o*o+r*r);return[nB(i*r,a*(1+e)),a?-kB(i*o/a):0]},rR.invert=function(t,n){var e=t,i=n,r=25;do{var o,a=eB(i),u=hB(i),l=hB(2*i),s=u*u,c=a*a,h=hB(e),f=eB(e/2),g=hB(e/2),d=g*g,p=1-c*f*f,m=p?CB(a*f)*AB(o=1/p):o=0,_=.5*(2*m*a*g+e/mB)-t,y=.5*(m*u+i)-n,v=.5*o*(c*d+m*a*f*s)+.5/mB,b=o*(h*l/4-m*u*g),w=.125*o*(l*g-m*u*c*h),S=.5*o*(s*f+m*d*a)+.5,x=b*w-S*v,k=(y*b-_*S)/x,C=(_*w-y*v)/x;e-=k,i-=C}while((Qj(k)>gB||Qj(C)>gB)&&--r>0);return[e,i]};const oR=Object.freeze(Object.defineProperty({__proto__:null,geoAiry:function(){var t=mB,n=xj(TB),e=n(t);return e.radius=function(e){return arguments.length?n(t=e*xB):t*SB},e.scale(179.976).clipAngle(147)},geoAiryRaw:TB,geoAitoff:function(){return Sj(OB).scale(152.63)},geoAitoffRaw:OB,geoArmadillo:function(){var t=20*xB,n=t>=0?1:-1,e=fB(n*t),i=xj(PB),r=i(t),o=r.stream;return r.parallel=function(r){return arguments.length?(e=fB((n=(t=r*xB)>=0?1:-1)*t),i(t)):t*SB},r.stream=function(i){var a=r.rotate(),u=o(i),l=(r.rotate([0,0]),o(i)),s=r.precision();return r.rotate(a),u.sphere=function(){l.polygonStart(),l.lineStart();for(var i=-180*n;n*i<180;i+=90*n)l.point(i,90*n);if(t)for(;n*(i-=3*n*s)>=-180;)l.point(i,n*-nB(eB(i*xB/2),e)*SB);l.lineEnd(),l.polygonEnd()},u},r.scale(218.695).center([0,28.0974])},geoArmadilloRaw:PB,geoAugust:function(){return Sj(jB).scale(66.1603)},geoAugustRaw:jB,geoBaker:function(){return Sj(zB).scale(112.314)},geoBakerRaw:zB,geoBerghaus:function(){var t=5,n=xj(NB),e=n(t),i=e.stream,r=.01,o=-eB(r*xB),a=hB(r*xB);return e.lobes=function(e){return arguments.length?n(t=+e):t},e.stream=function(n){var u=e.rotate(),l=i(n),s=(e.rotate([0,0]),i(n));return e.rotate(u),l.sphere=function(){s.polygonStart(),s.lineStart();for(var n=0,e=360/t,i=2*pB/t,u=90-180/t,l=mB;n=0;)t.point((n=e[r])[0],n[1]);t.lineEnd(),t.polygonEnd()},t},e.scale(79.4187).parallel(45).clipAngle(179.999)},geoHammerRetroazimuthalRaw:LD,geoHealpix:function(){var t=4,n=xj(KD),e=n(t),i=e.stream;return e.lobes=function(e){return arguments.length?n(t=+e):t},e.stream=function(n){var r=e.rotate(),o=i(n),a=(e.rotate([0,0]),i(n));return e.rotate(r),o.sphere=function(){qM(function(t){var n=[].concat(Xt(-180,180+t/2,t).map(UD),Xt(180,-180-t/2,-t).map(qD));return{type:"Polygon",coordinates:[180===t?n.map(WD):n]}}(180/t),a)},o},e.scale(239.75)},geoHealpixRaw:KD,geoHill:function(){var t=1,n=xj($D),e=n(t);return e.ratio=function(e){return arguments.length?n(t=+e):t},e.scale(167.774).center([0,18.67])},geoHillRaw:$D,geoHomolosine:function(){return Sj(XD).scale(152.63)},geoHomolosineRaw:XD,geoHufnagel:function(){var t=1,n=0,e=45*xB,i=2,r=xj(JD),o=r(t,n,e,i);return o.a=function(o){return arguments.length?r(t=+o,n,e,i):t},o.b=function(o){return arguments.length?r(t,n=+o,e,i):n},o.psiMax=function(o){return arguments.length?r(t,n,e=+o*xB,i):e*SB},o.ratio=function(o){return arguments.length?r(t,n,e,i=+o):i},o.scale(180.739)},geoHufnagelRaw:JD,geoHyperelliptical:function(){var t=0,n=2.5,e=1.183136,i=xj(nz),r=i(t,n,e);return r.alpha=function(r){return arguments.length?i(t=+r,n,e):t},r.k=function(r){return arguments.length?i(t,n=+r,e):n},r.gamma=function(r){return arguments.length?i(t,n,e=+r):e},r.scale(152.63)},geoHyperellipticalRaw:nz,geoInterrupt:rz,geoInterruptedBoggs:function(){return rz($B,oz).scale(160.857)},geoInterruptedHomolosine:function(){return rz(XD,az).scale(152.63)},geoInterruptedMollweide:function(){return rz(UB,uz).scale(169.529)},geoInterruptedMollweideHemispheres:function(){return rz(UB,lz).scale(169.529).rotate([20,0])},geoInterruptedQuarticAuthalic:function(){return rz(RB(1/0),Bz).rotate([20,0]).scale(152.63)},geoInterruptedSinuMollweide:function(){return rz(ZD,sz,IB).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoInterruptedSinusoidal:function(){return rz(VB,cz).scale(152.63).rotate([-20,0])},geoKavrayskiy7:function(){return Sj(hz).scale(158.837)},geoKavrayskiy7Raw:hz,geoLagrange:function(){var t=.5,n=xj(fz),e=n(t);return e.spacing=function(e){return arguments.length?n(t=+e):t},e.scale(124.75)},geoLagrangeRaw:fz,geoLarrivee:function(){return Sj(dz).scale(97.2672)},geoLarriveeRaw:dz,geoLaskowski:function(){return Sj(pz).scale(139.98)},geoLaskowskiRaw:pz,geoLittrow:function(){return Sj(mz).scale(144.049).clipAngle(89.999)},geoLittrowRaw:mz,geoLoximuthal:function(){return YB(_z).parallel(40).scale(158.837)},geoLoximuthalRaw:_z,geoMiller:function(){return Sj(yz).scale(108.318)},geoMillerRaw:yz,geoModifiedStereographic:Cz,geoModifiedStereographicAlaska:function(){return Cz(bz,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},geoModifiedStereographicGs48:function(){return Cz(wz,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},geoModifiedStereographicGs50:function(){return Cz(Sz,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},geoModifiedStereographicLee:function(){return Cz(kz,[165,10]).scale(250).clipAngle(130).center([-165,-10])},geoModifiedStereographicMiller:function(){return Cz(xz,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},geoModifiedStereographicRaw:vz,geoMollweide:function(){return Sj(UB).scale(169.529)},geoMollweideRaw:UB,geoMtFlatPolarParabolic:function(){return Sj(Mz).scale(164.859)},geoMtFlatPolarParabolicRaw:Mz,geoMtFlatPolarQuartic:function(){return Sj(Tz).scale(188.209)},geoMtFlatPolarQuarticRaw:Tz,geoMtFlatPolarSinusoidal:function(){return Sj(Oz).scale(166.518)},geoMtFlatPolarSinusoidalRaw:Oz,geoNaturalEarth2:function(){return Sj(Pz).scale(175.295)},geoNaturalEarth2Raw:Pz,geoNellHammer:function(){return Sj(jz).scale(152.63)},geoNellHammerRaw:jz,geoNicolosi:function(){return Sj(Dz).scale(127.267)},geoNicolosiRaw:Dz,geoPatterson:function(){return Sj(Uz).scale(139.319)},geoPattersonRaw:Uz,geoPeirceQuincuncial:function(){return _N(FD).scale(111.48)},geoPolyconic:function(){return Sj(qz).scale(103.74)},geoPolyconicRaw:qz,geoPolyhedral:Zz,geoPolyhedralButterfly:function(t){t=t||function(t){var n=uO({type:"MultiPoint",coordinates:t});return Wj().scale(1).translate([0,0]).rotate([-n[0],-n[1]])};var n=nN.map((function(n){return{face:n,project:t(n)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var i=n[t];i&&(i.children||(i.children=[])).push(n[e])})),Zz(n[0],(function(t,e){return n[t<-pB/2?e<0?6:4:t<0?e<0?2:0:t0?[-n[0],0]:[180-n[0],180])};var n=nN.map((function(n){return{face:n,project:t(n)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var i=n[t];i&&(i.children||(i.children=[])).push(n[e])})),Zz(n[0],(function(t,e){return n[t<-pB/2?e<0?6:4:t<0?e<0?2:0:t2||o[0]!=n[0]||o[1]!=n[1])&&(i.push(o),n=o)}return 1===i.length&&t.length>1&&i.push(e(t[t.length-1])),i}function o(t){return t.map(r)}function a(t){if(null==t)return t;var n;switch(t.type){case"GeometryCollection":n={type:"GeometryCollection",geometries:t.geometries.map(a)};break;case"Point":n={type:"Point",coordinates:e(t.coordinates)};break;case"MultiPoint":n={type:t.type,coordinates:i(t.coordinates)};break;case"LineString":n={type:t.type,coordinates:r(t.coordinates)};break;case"MultiLineString":case"Polygon":n={type:t.type,coordinates:o(t.coordinates)};break;case"MultiPolygon":n={type:"MultiPolygon",coordinates:t.coordinates.map(o)};break;default:return t}return null!=t.bbox&&(n.bbox=t.bbox),n}function u(t){var n={type:"Feature",properties:t.properties,geometry:a(t.geometry)};return null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),n}if(null!=t)switch(t.type){case"Feature":return u(t);case"FeatureCollection":var l={type:"FeatureCollection",features:t.features.map(u)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return a(t)}return t},geoQuincuncial:_N,geoRectangularPolyconic:function(){return YB(yN).scale(131.215)},geoRectangularPolyconicRaw:yN,geoRobinson:function(){return Sj(bN).scale(152.63)},geoRobinsonRaw:bN,geoSatellite:function(){var t=2,n=0,e=xj(wN),i=e(t,n);return i.distance=function(i){return arguments.length?e(t=+i,n):t},i.tilt=function(i){return arguments.length?e(t,n=i*xB):n*SB},i.scale(432.147).clipAngle(CB(1/t)*SB-1e-6)},geoSatelliteRaw:wN,geoSinuMollweide:function(){return Sj(ZD).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoSinuMollweideRaw:ZD,geoSinusoidal:function(){return Sj(VB).scale(152.63)},geoSinusoidalRaw:VB,geoStitch:function(t){if(null==t)return t;switch(t.type){case"Feature":return LN(t);case"FeatureCollection":var n={type:"FeatureCollection",features:t.features.map(LN)};return null!=t.bbox&&(n.bbox=t.bbox),n;default:return IN(t)}},geoTimes:function(){return Sj(HN).scale(146.153)},geoTimesRaw:HN,geoTwoPointAzimuthal:UN,geoTwoPointAzimuthalRaw:KN,geoTwoPointAzimuthalUsa:function(){return UN([-158,21.5],[-77,39]).clipAngle(60).scale(400)},geoTwoPointEquidistant:WN,geoTwoPointEquidistantRaw:qN,geoTwoPointEquidistantUsa:function(){return WN([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},geoVanDerGrinten:function(){return Sj($N).scale(79.4183)},geoVanDerGrinten2:function(){return Sj(YN).scale(79.4183)},geoVanDerGrinten2Raw:YN,geoVanDerGrinten3:function(){return Sj(VN).scale(79.4183)},geoVanDerGrinten3Raw:VN,geoVanDerGrinten4:function(){return Sj(ZN).scale(127.16)},geoVanDerGrinten4Raw:ZN,geoVanDerGrintenRaw:$N,geoWagner:JN,geoWagner4:function(){return Sj(nR).scale(176.84)},geoWagner4Raw:nR,geoWagner6:function(){return Sj(eR).scale(152.63)},geoWagner6Raw:eR,geoWagner7:function(){return JN().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},geoWagnerRaw:XN,geoWiechel:function(){return Sj(iR).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},geoWiechelRaw:iR,geoWinkel3:function(){return Sj(rR).scale(158.837)},geoWinkel3Raw:rR},Symbol.toStringTag,{value:"Module"}));var aR=1e-6;class uR{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let i=0;i0){for(o=t[--r];r>0&&(n=o,e=t[--r],o=n+e,i=e-(o-n),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(e=2*i,n=o+e,e==n-o&&(o=n))}return o}}function lR(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}var sR=1e-6,cR=1e-12,hR=Math.PI,fR=hR/2,gR=hR/4,dR=2*hR,pR=180/hR,mR=hR/180,_R=Math.abs,yR=Math.atan,vR=Math.atan2,bR=Math.cos,wR=Math.exp,SR=Math.log,xR=Math.pow,kR=Math.sin,CR=Math.sign||function(t){return t>0?1:t<0?-1:0},AR=Math.sqrt,ER=Math.tan;function MR(t){return t>1?fR:t<-1?-fR:Math.asin(t)}function TR(){}function OR(t,n){t&&jR.hasOwnProperty(t.type)&&jR[t.type](t,n)}var PR={Feature:function(t,n){OR(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++ihR?t+Math.round(-t/dR)*dR:t,n]}function qR(t,n,e){return(t%=dR)?n||e?KR($R(t),YR(n,e)):$R(t):n||e?YR(n,e):UR}function WR(t){return function(n,e){return[(n+=t)>hR?n-dR:n<-hR?n+dR:n,e]}}function $R(t){var n=WR(t);return n.invert=WR(-t),n}function YR(t,n){var e=bR(t),i=kR(t),r=bR(n),o=kR(n);function a(t,n){var a=bR(n),u=bR(t)*a,l=kR(t)*a,s=kR(n),c=s*e+u*i;return[vR(l*r-c*o,u*e-s*i),MR(c*r+l*o)]}return a.invert=function(t,n){var a=bR(n),u=bR(t)*a,l=kR(t)*a,s=kR(n),c=s*r-l*o;return[vR(l*r+s*o,u*e+c*i),MR(c*e-u*i)]},a}function VR(t,n){(n=RR(n))[0]-=t,GR(n);var e=function(t){return t>1?0:t<-1?hR:Math.acos(t)}(-n[1]);return((-n[2]<0?-e:e)+dR-sR)%dR}function ZR(){var t,n=[];return{point:function(n,e,i){t.push([n,e,i])},lineStart:function(){n.push(t=[])},lineEnd:TR,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function XR(t,n){return _R(t[0]-n[0])=0;--o)r.point((c=s[o])[0],c[1]);else i(f.x,f.p.x,-1,r);f=f.p}s=(f=f.o).z,g=!g}while(!f.v);r.lineEnd()}}}function tF(t){if(n=t.length){for(var n,e,i=0,r=t[0];++i=0?1:-1,A=C*k,E=A>hR,M=m*S;if(l.add(vR(M*C*kR(A),_*x+M*bR(A))),a+=E?k+C*dR:k,E^d>=e^b>=e){var T=LR(RR(g),RR(v));GR(T);var O=LR(o,T);GR(O);var P=(E^k>=0?-1:1)*MR(O[2]);(i>P||i===P&&(T[0]||T[1]))&&(u+=E^k>=0?1:-1)}}return(a<-sR||a0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t1&&2&l&&f.push(f.pop().concat(f.shift())),a.push(f.filter(iF))}return f}}function iF(t){return t.length>1}function rF(t,n){return((t=t.x)[0]<0?t[1]-fR-sR:fR-t[1])-((n=n.x)[0]<0?n[1]-fR-sR:fR-n[1])}UR.invert=UR;const oF=eF((function(){return!0}),(function(t){var n,e=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?hR:-hR,l=_R(o-e);_R(l-hR)0?fR:-fR),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),t.point(o,i),n=0):r!==u&&l>=hR&&(_R(e-r)sR?yR((kR(n)*(o=bR(i))*kR(e)-kR(i)*(r=bR(n))*kR(t))/(r*o*a)):(n+i)/2}(e,i,o,a),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(u,i),n=0),t.point(e=o,i=a),r=u},lineEnd:function(){t.lineEnd(),e=i=NaN},clean:function(){return 2-n}}}),(function(t,n,e,i){var r;if(null==t)r=e*fR,i.point(-hR,r),i.point(0,r),i.point(hR,r),i.point(hR,0),i.point(hR,-r),i.point(0,-r),i.point(-hR,-r),i.point(-hR,0),i.point(-hR,r);else if(_R(t[0]-n[0])>sR){var o=t[0]0,r=_R(n)>sR;function o(t,e){return bR(t)*bR(e)>n}function a(t,e,i){var r=[1,0,0],o=LR(RR(t),RR(e)),a=FR(o,o),u=o[0],l=a-u*u;if(!l)return!i&&t;var s=n*a/l,c=-n*u/l,h=LR(r,o),f=HR(r,s);IR(f,HR(o,c));var g=h,d=FR(f,g),p=FR(g,g),m=d*d-p*(FR(f,f)-1);if(!(m<0)){var _=AR(m),y=HR(g,(-d-_)/p);if(IR(y,f),y=NR(y),!i)return y;var v,b=t[0],w=e[0],S=t[1],x=e[1];w0^y[1]<(_R(y[0]-b)hR^(b<=y[0]&&y[0]<=w)){var A=HR(g,(-d+_)/p);return IR(A,f),[y,NR(A)]}}}function u(n,e){var r=i?t:hR-t,o=0;return n<-r?o|=1:n>r&&(o|=2),e<-r?o|=4:e>r&&(o|=8),o}return eF(o,(function(t){var n,e,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(h,f){var g,d=[h,f],p=o(h,f),m=i?p?0:u(h,f):p?u(h+(h<0?hR:-hR),f):0;if(!n&&(s=l=p)&&t.lineStart(),p!==l&&(!(g=a(n,d))||XR(n,g)||XR(d,g))&&(d[2]=1),p!==l)c=0,p?(t.lineStart(),g=a(d,n),t.point(g[0],g[1])):(g=a(n,d),t.point(g[0],g[1],2),t.lineEnd()),n=g;else if(r&&n&&i^p){var _;m&e||!(_=a(d,n,!0))||(c=0,i?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!p||n&&XR(n,d)||t.point(d[0],d[1]),n=d,l=p,e=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(s&&l)<<1}}}),(function(n,i,r,o){!function(t,n,e,i,r,o){if(e){var a=bR(n),u=kR(n),l=i*e;null==r?(r=n+i*dR,o=n-l/2):(r=VR(a,r),o=VR(a,o),(i>0?ro)&&(r+=i*dR));for(var s,c=r;i>0?c>o:c0)do{s.point(0===c||3===c?t:e,c>1?i:n)}while((c=(c+u+4)%4)!==h);else s.point(o[0],o[1])}function a(i,r){return _R(i[0]-t)0?0:3:_R(i[0]-e)0?2:1:_R(i[1]-n)0?1:0:r>0?3:2}function u(t,n){return l(t.x,n.x)}function l(t,n){var e=a(t,1),i=a(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var l,s,c,h,f,g,d,p,m,_,y,v=a,b=ZR(),w={point:S,lineStart:function(){w.point=x,s&&s.push(c=[]),_=!0,m=!1,d=p=NaN},lineEnd:function(){l&&(x(h,f),g&&m&&b.rejoin(),l.push(b.result())),w.point=S,m&&v.lineEnd()},polygonStart:function(){v=b,l=[],s=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(f-o)*(i-a)>(g-a)*(t-o)&&++n:g<=i&&(f-o)*(i-a)<(g-a)*(t-o)&&--n;return n}(),e=y&&n,r=(l=lR(l)).length;(e||r)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),r&&QR(l,u,n,o,a),a.polygonEnd()),v=a,l=s=c=null}};function S(t,n){r(t,n)&&v.point(t,n)}function x(o,a){var u=r(o,a);if(s&&c.push([o,a]),_)h=o,f=a,g=u,_=!1,u&&(v.lineStart(),v.point(o,a));else if(u&&m)v.point(o,a);else{var l=[d=Math.max(lF,Math.min(uF,d)),p=Math.max(lF,Math.min(uF,p))],b=[o=Math.max(lF,Math.min(uF,o)),a=Math.max(lF,Math.min(uF,a))];!function(t,n,e,i,r,o){var a,u=t[0],l=t[1],s=0,c=1,h=n[0]-u,f=n[1]-l;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>c)return;a>s&&(s=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>s&&(s=a)}else if(h>0){if(a0)){if(a/=f,f<0){if(a0){if(a>c)return;a>s&&(s=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>s&&(s=a)}else if(f>0){if(a0&&(t[0]=u+s*h,t[1]=l+s*f),c<1&&(n[0]=u+c*h,n[1]=l+c*f),!0}}}}}(l,b,t,n,e,i)?u&&(v.lineStart(),v.point(o,a),y=!1):(m||(v.lineStart(),v.point(l[0],l[1])),v.point(b[0],b[1]),u||v.lineEnd(),y=!1)}d=o,p=a,m=u}return w}}const cF=t=>t;var hF=1/0,fF=hF,gF=-hF,dF=gF,pF={point:function(t,n){tgF&&(gF=t),ndF&&(dF=n)},lineStart:TR,lineEnd:TR,polygonStart:TR,polygonEnd:TR,result:function(){var t=[[hF,fF],[gF,dF]];return gF=dF=-(fF=hF=1/0),t}};const mF=pF;function _F(t){return function(n){var e=new yF;for(var i in t)e[i]=t[i];return e.stream=n,e}}function yF(){}function vF(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),zR(e,t.stream(mF)),n(mF.result()),null!=i&&t.clipExtent(i),t}function bF(t,n,e){return vF(t,(function(e){var i=n[1][0]-n[0][0],r=n[1][1]-n[0][1],o=Math.min(i/(e[1][0]-e[0][0]),r/(e[1][1]-e[0][1])),a=+n[0][0]+(i-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(r-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])}),e)}yF.prototype={constructor:yF,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var wF=16,SF=bR(30*mR);function xF(t,n){return+n?function(t,n){function e(i,r,o,a,u,l,s,c,h,f,g,d,p,m){var _=s-i,y=c-r,v=_*_+y*y;if(v>4*n&&p--){var b=a+f,w=u+g,S=l+d,x=AR(b*b+w*w+S*S),k=MR(S/=x),C=_R(_R(S)-1)n||_R((_*T+y*O)/v-.5)>.3||a*f+u*g+l*d2?t[2]%360*mR:0,T()):[m*pR,_*pR,y*pR]},E.angle=function(t){return arguments.length?(v=t%360*mR,T()):v*pR},E.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(a=xF(u,A=t*t),O()):AR(A)},E.fitExtent=function(t,n){return bF(E,t,n)},E.fitSize=function(t,n){return function(t,n,e){return bF(t,[[0,0],n],e)}(E,t,n)},E.fitWidth=function(t,n){return function(t,n,e){return vF(t,(function(e){var i=+n,r=i/(e[1][0]-e[0][0]),o=(i-r*(e[1][0]+e[0][0]))/2,a=-r*e[0][1];t.scale(150*r).translate([o,a])}),e)}(E,t,n)},E.fitHeight=function(t,n){return function(t,n,e){return vF(t,(function(e){var i=+n,r=i/(e[1][1]-e[0][1]),o=-r*e[0][0],a=(i-r*(e[1][1]+e[0][1]))/2;t.scale(150*r).translate([o,a])}),e)}(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&M,T()}}function MF(t){var n=0,e=hR/3,i=EF(t),r=i(n,e);return r.parallels=function(t){return arguments.length?i(n=t[0]*mR,e=t[1]*mR):[n*pR,e*pR]},r}function TF(t,n){var e=kR(t),i=(e+kR(n))/2;if(_R(i)2?t[2]*mR:0),n.invert=function(n){return(n=t.invert(n[0]*mR,n[1]*mR))[0]*=pR,n[1]*=pR,n},n}(r.rotate()).invert([0,0]));return l(null==s?[[u[0]-o,u[1]-o],[u[0]+o,u[1]+o]]:t===jF?[[Math.max(u[0]-o,s),n],[Math.min(u[0]+o,e),i]]:[[s,Math.max(u[1]-o,n)],[e,Math.min(u[1]+o,i)]])}return r.scale=function(t){return arguments.length?(a(t),c()):a()},r.translate=function(t){return arguments.length?(u(t),c()):u()},r.center=function(t){return arguments.length?(o(t),c()):o()},r.clipExtent=function(t){return arguments.length?(null==t?s=n=e=i=null:(s=+t[0][0],n=+t[0][1],e=+t[1][0],i=+t[1][1]),c()):null==s?null:[[s,n],[e,i]]},c()}function zF(t){return ER((fR+t)/2)}function NF(t,n){var e=bR(t),i=t===n?kR(t):SR(e/bR(n))/SR(zF(n)/zF(t)),r=e*xR(zF(t),i)/i;if(!i)return jF;function o(t,n){r>0?n<-fR+sR&&(n=-fR+sR):n>fR-sR&&(n=fR-sR);var e=r/xR(zF(n),i);return[e*kR(i*t),r-e*bR(i*t)]}return o.invert=function(t,n){var e=r-n,o=CR(i)*AR(t*t+e*e),a=vR(t,_R(e))*CR(e);return e*i<0&&(a-=hR*CR(t)*CR(e)),[a/i,2*yR(xR(r/o,1/i))-fR]},o}function RF(){return MF(NF).scale(109.5).parallels([30,30])}function FF(t,n){return[t,n]}function LF(){return AF(FF).scale(152.63)}function IF(t,n){var e=bR(t),i=t===n?kR(t):(e-bR(n))/(n-t),r=e/i+t;if(_R(i)$F&&($F=t),nYF&&(YF=n)},lineStart:UF,lineEnd:UF,polygonStart:UF,polygonEnd:UF,result:function(){var t=[[qF,WF],[$F,YF]];return $F=YF=-(WF=qF=1/0),t}};function ZF(t,n,e){var i=n[1][0]-n[0][0],r=n[1][1]-n[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),zR(e,t.stream(VF));var a=VF.result(),u=Math.min(i/(a[1][0]-a[0][0]),r/(a[1][1]-a[0][1])),l=+n[0][0]+(i-u*(a[1][0]+a[0][0]))/2,s=+n[0][1]+(r-u*(a[1][1]+a[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*u).translate([l,s])}function XF(t,n,e){return ZF(t,[[0,0],n],e)}const JF=Math.PI,QF=2*JF,tL=1e-6,nL=QF-tL;function eL(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function iL(){return new eL}eL.prototype=iL.prototype={constructor:eL,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var o=this._x1,a=this._y1,u=e-t,l=i-n,s=o-t,c=a-n,h=s*s+c*c;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(h>tL)if(Math.abs(c*u-l*s)>tL&&r){var f=e-o,g=i-a,d=u*u+l*l,p=f*f+g*g,m=Math.sqrt(d),_=Math.sqrt(h),y=r*Math.tan((JF-Math.acos((d+h-p)/(2*m*_)))/2),v=y/_,b=y/m;Math.abs(v-1)>tL&&(this._+="L"+(t+v*s)+","+(n+v*c)),this._+="A"+r+","+r+",0,0,"+ +(c*f>s*g)+","+(this._x1=t+b*u)+","+(this._y1=n+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(i),u=e*Math.sin(i),l=t+a,s=n+u,c=1^o,h=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+s:(Math.abs(this._x1-l)>tL||Math.abs(this._y1-s)>tL)&&(this._+="L"+l+","+s),e&&(h<0&&(h=h%QF+QF),h>nL?this._+="A"+e+","+e+",0,1,"+c+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+c+","+(this._x1=l)+","+(this._y1=s):h>tL&&(this._+="A"+e+","+e+",0,"+ +(h>=JF)+","+c+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const rL=Object.freeze(Object.defineProperty({__proto__:null,geoAlbersUk:function(){var t,n,e,i,r,o=PF().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),a=PF().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),u={point:function(t,n){r=[t,n]}};function l(t){var n=t[0],o=t[1];return r=null,e.point(n,o),r||(i.point(n,o),r)}function s(){return t=n=null,l}return l.invert=function(t){var n=o.scale(),e=o.translate(),i=(t[0]-e[0])/n,r=(t[1]-e[1])/n;return(r>=-.089&&r<.06&&i>=.029&&i<.046?a:o).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),a.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.12&&r<.234&&i>=-.425&&i<-.214?u:r>=.166&&r<.234&&i>=-.214&&i<-.115?l:a).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.12&&r<.234&&i>=-.425&&i<-.214?c:r>=.166&&r<.234&&i>=-.214&&i<-.115?h:r>=.2064&&r<.2413&&i>=.312&&i<.385?f:r>=.09&&r<.1197&&i>=-.4243&&i<-.3232?g:r>=-.0518&&r<.0895&&i>=-.4243&&i<-.3824?d:s).invert(t)},m.stream=function(e){return t&&n===e?t:(i=[s.stream(n=e),c.stream(e),h.stream(e),f.stream(e),g.stream(e),d.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.31&&r<-.24&&i>=.14&&i<.24?m:r>=-.24&&r<-.17&&i>=.14&&i<.24?_:r>=-.17&&r<-.12&&i>=.21&&i<.24?v:r>=-.17&&r<-.14&&i>=.14&&i<.165?b:r>=-.17&&r<-.1&&i>=.14&&i<.24?y:r>=-.1&&r<-.03&&i>=.14&&i<.24?w:r>=-.03&&r<.04&&i>=.14&&i<.24?S:r>=-.31&&r<-.24&&i>=.24&&i<.34?x:r>=-.24&&r<-.17&&i>=.24&&i<.34?k:r>=-.17&&r<-.1&&i>=.24&&i<.34?C:r>=-.1&&r<-.03&&i>=.24&&i<.34?A:p).invert(t)},M.stream=function(e){return t&&n===e?t:(i=[p.stream(n=e),_.stream(e),x.stream(e),m.stream(e),S.stream(e),w.stream(e),k.stream(e),C.stream(e),A.stream(e),y.stream(e),v.stream(e),b.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.029&&r<.0864&&i>=-.14&&i<-.0996?m:r>=0&&r<.029&&i>=-.14&&i<-.0996?_:r>=-.032&&r<0&&i>=-.14&&i<-.0996?y:r>=-.052&&r<-.032&&i>=-.14&&i<-.0996?v:r>=-.076&&r<.052&&i>=-.14&&i<-.0996?b:r>=-.076&&r<-.052&&i>=.0967&&i<.1371?w:r>=-.052&&r<-.02&&i>=.0967&&i<.1371?S:r>=-.02&&r<.012&&i>=.0967&&i<.1371?x:r>=.012&&r<.033&&i>=.0967&&i<.1371?k:r>=.033&&r<.0864&&i>=.0967&&i<.1371?C:p).invert(t)},M.stream=function(e){return t&&n===e?t:(i=[p.stream(n=e),m.stream(e),_.stream(e),y.stream(e),v.stream(e),b.stream(e),w.stream(e),S.stream(e),x.stream(e),k.stream(e),C.stream(e),A.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.0067&&r<.0015&&i>=-.0232&&i<-.0154?u:r>=-.022&&r<-.014&&i>=-.023&&i<-.014?l:a).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.0093&&r<.03678&&i>=-.03875&&i<-.0116?u:r>=-.0412&&r<.0091&&i>=-.07782&&i<-.01166?l:a).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=.05346&&r<.0897&&i>=-.13388&&i<-.0322?a:o).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),a.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.10925&&r<-.02701&&i>=-.135&&i<-.0397?u:r>=.04713&&r<.11138&&i>=-.03986&&i<.051?l:a).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.0676&&r<-.026&&i>=-.0857&&i<-.0263?a:o).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),a.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.02&&r<0&&i>=-.038&&i<-.005?u:r>=0&&r<.02&&i>=-.038&&i<-.005?l:a).invert(t)},c.stream=function(e){return t&&n===e?t:(i=[a.stream(n=e),u.stream(e),l.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e=-.0521&&r<.0229&&i>=-.0111&&i<.1?a:o).invert(t)},l.stream=function(e){return t&&n===e?t:(i=[o.stream(n=e),a.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++e2?t[2]+90:90]):[(t=s())[0],t[1],t[2]-90]},s([0,0,90]).scale(159.155)).rotate([72,37]),h=AF(GF).scale(250).clipAngle(142).rotate([72,0]),f=BF().rotate([80,33.5]),g=BF().rotate([110,25]),d={point:function(t,n){a=[t,n]}};function p(t){var n=t[0],u=t[1];return a=null,e.point(n,u),a||(i.point(n,u),a)||(r.point(n,u),a)||(o.point(n,u),a)}function m(){return t=n=null,p}return p.invert=function(t){var n=c.scale(),e=c.translate(),i=(t[0]-e[0])/n,r=(t[1]-e[1])/n;return(r>=.2582&&r<.32&&i>=-.1036&&i<-.087?h:r>=-.01298&&r<.0133&&i>=-.11396&&i<-.05944?f:r>=.01539&&r<.03911&&i>=-.089&&i<-.0588?g:c).invert(t)},p.stream=function(e){return t&&n===e?t:(i=[c.stream(n=e),h.stream(e),f.stream(e),g.stream(e)],r=i.length,t={point:function(t,n){for(var e=-1;++eOpenStreetMap contributors, © CARTO"},{matches:["opentopomap.org"],text:"© OpenStreetMap contributors"},{matches:["arcgisonline.com"],text:"Powered by Esri"},{matches:["/watercolor/"],text:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL."},{matches:["stamen-tiles","stamen.com"],text:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."}];function hL(t){return hL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hL(t)}function fL(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,r,o,a,u=[],l=!0,s=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw r}}return u}}(t,n)||function(t,n){if(t){if("string"==typeof t)return gL(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?gL(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gL(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e0&&void 0!==arguments[0]?arguments[0]:Sx(this._container.node()),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[];this._tiles&&(i=this._tileGen.extent(this._zoomBehavior.translateExtent()).scale(this._projection.scale()*(2*Math.PI)*n.k).translate(n.apply(this._projection.translate()))(),this._tileGroup.transition().duration(e).attr("transform",n));var r=this._tileGroup.selectAll("image.d3plus-geomap-tile").data(i,(function(t){var n=fL(t,3),e=n[0],i=n[1],r=n[2];return"".concat(e,"-").concat(i,"-").concat(r)}));r.exit().transition().duration(e).attr("opacity",0).remove();var o=i.scale/n.k,a=r.enter().append("image").attr("class","d3plus-geomap-tile");a.attr("opacity",0).transition().duration(e).attr("opacity",1),r.merge(a).attr("width",o).attr("height",o).attr("xlink:href",(function(n){var e=fL(n,3),i=e[0],r=e[1],o=e[2];return t._tileUrl.replace("{s}",["a","b","c"][3*Math.random()|0]).replace("{z}",o).replace("{x}",i).replace("{y}",r)})).attr("x",(function(t){return fL(t,1)[0]*o+i.translate[0]*o-n.x/n.k})).attr("y",(function(t){return fL(t,2)[1]*o+i.translate[1]*o-n.y/n.k}))}},{key:"_draw",value:function(t){var n=this;pL(vL(o.prototype),"_draw",this).call(this,t);var e=this._height-this._margin.top-this._margin.bottom,i=this._width-this._margin.left-this._margin.right;this._container=this._select.selectAll("svg.d3plus-geomap").data([0]),this._container=this._container.enter().append("svg").attr("class","d3plus-geomap").attr("opacity",0).attr("width",i).attr("height",e).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color",this._ocean||"transparent").merge(this._container),this._container.transition(this._transition).attr("opacity",1).attr("width",i).attr("height",e).attr("x",this._margin.left).attr("y",this._margin.top);var r=this._container.selectAll("rect.d3plus-geomap-ocean").data([0]);r.enter().append("rect").attr("class","d3plus-geomap-ocean").merge(r).attr("width",i).attr("height",e).attr("fill",this._ocean||"transparent"),this._tileGroup=this._container.selectAll("g.d3plus-geomap-tileGroup").data([0]),this._tileGroup=this._tileGroup.enter().append("g").attr("class","d3plus-geomap-tileGroup").merge(this._tileGroup),this._zoomGroup=this._container.selectAll("g.d3plus-geomap-zoomGroup").data([0]),this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-geomap-zoomGroup").merge(this._zoomGroup);var a=this._zoomGroup.selectAll("g.d3plus-geomap-paths").data([0]);a=a.enter().append("g").attr("class","d3plus-geomap-paths").merge(a);var u=this._coordData=this._topojson?SL(this._topojson,this._topojsonKey):{type:"FeatureCollection",features:[]};this._topojsonFilter&&(u.features=u.features.filter(this._topojsonFilter));var l=this._path=bL.geoPath().projection(this._projection),s=this._filteredData.filter((function(t,e){return n._point(t,e)instanceof Array})),c=this._filteredData.filter((function(t,e){return!(n._point(t,e)instanceof Array)})).reduce((function(t,e){return t[n._id(e)]=e,t}),{}),h=u.features.reduce((function(t,e){var i=n._topojsonId(e);return t.push({__d3plus__:!0,data:c[i],feature:e,id:i}),t}),[]),f=mm["scale".concat(this._pointSizeScale.charAt(0).toUpperCase()).concat(this._pointSizeScale.slice(1))]().domain(Mt(s,(function(t,e){return n._pointSize(t,e)}))).range([this._pointSizeMin,this._pointSizeMax]);if(!this._zoomSet){var g=this._fitObject?SL(this._fitObject,this._fitKey):u;if(this._extentBounds={type:"FeatureCollection",features:this._fitFilter?g.features.filter(this._fitFilter):g.features.slice()},this._extentBounds.features=this._extentBounds.features.reduce((function(t,n){if(n.geometry){var e={type:n.type,id:n.id,geometry:{coordinates:n.geometry.coordinates,type:n.geometry.type}};if("MultiPolygon"===n.geometry.type&&n.geometry.coordinates.length>1){var i=[],r=[];n.geometry.coordinates.forEach((function(t){e.geometry.coordinates=[t],i.push(l.area(e))})),e.geometry.coordinates=[n.geometry.coordinates[i.indexOf(Ut(i))]];var o=l.centroid(e);n.geometry.coordinates.forEach((function(t){e.geometry.coordinates=[t],r.push(xv(l.centroid(e),o))}));var a=Yt(i.reduce((function(t,n,e){return n&&t.push(i[e]/n),t}),[]),.9);e.geometry.coordinates=n.geometry.coordinates.filter((function(t,n){var e=r[n];return 0===e||i[n]/e>=a}))}t.push(e)}return t}),[]),!this._extentBounds.features.length&&s.length){var d=[[void 0,void 0],[void 0,void 0]];s.forEach((function(t,e){var i=n._projection(n._point(t,e));(void 0===d[0][0]||i[0]d[1][0])&&(d[1][0]=i[0]),(void 0===d[0][1]||i[1]d[1][1])&&(d[1][1]=i[1])})),this._extentBounds={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:d.map((function(t){return n._projection.invert(t)}))}}]};var p=Ut(s,(function(t,e){return f(n._pointSize(t,e))}));this._projectionPadding.top+=p,this._projectionPadding.right+=p,this._projectionPadding.bottom+=p,this._projectionPadding.left+=p}this._zoomBehavior.extent([[0,0],[i,e]]).scaleExtent([1,this._zoomMax]).translateExtent([[0,0],[i,e]]),this._zoomSet=!0}this._projection=this._projection.fitExtent(this._extentBounds.features.length?[[this._projectionPadding.left,this._projectionPadding.top],[i-this._projectionPadding.right,e-this._projectionPadding.bottom]]:[[0,0],[i,e]],this._extentBounds.features.length?this._extentBounds:{type:"Sphere"}),this._shapes.push((new pw).data(h).d((function(t){return l(t.feature)})).select(a.node()).x(0).y(0).config(jh.bind(this)(this._shapeConfig,"shape","Path")).render());var m=this._zoomGroup.selectAll("g.d3plus-geomap-pins").data([0]);m=m.enter().append("g").attr("class","d3plus-geomap-pins").merge(m);for(var _=(new Bb).config(jh.bind(this)(this._shapeConfig,"shape","Circle")).data(s).r((function(t,e){return f(n._pointSize(t,e))})).select(m.node()).sort((function(t,e){return n._pointSize(e)-n._pointSize(t)})).x((function(t,e){return n._projection(n._point(t,e))[0]})).y((function(t,e){return n._projection(n._point(t,e))[1]})),y=Object.keys(this._on),v=y.filter((function(t){return t.includes(".Circle")})),b=y.filter((function(t){return!t.includes(".")})),w=y.filter((function(t){return t.includes(".shape")})),S=0;S({value:e.concat([t[i++]]),done:i>t.length}),[Symbol.iterator](){return this}};let r=RL(t.slice(1),n-1,e.concat([t[i]]));const o={next:function o(){if(i===t.length)return{value:null,done:!0};const a=r.next();if(a.done){i++;const a=t.slice();return r=RL(a,n-1,e.concat(a.splice(i,1))),o()}return{value:a.value,done:!1}},[Symbol.iterator]:()=>o};return o}function FL(t,n){const e=`${t}`.match(/[0-9\.\,]+/);return e?Number.parseFloat(e[0]):n||0}function LL({measuresByName:t},n){const e=t[n.measure];return e?n.moe&&n.moe in t?{collection:t[`${n.collection}`],formatter:n.formatter||l,measure:e,moe:t[`${n.moe}`],source:t[`${n.source}`]}:{collection:t[`${n.collection}`],formatter:n.formatter||l,lci:t[`${n.lci}`],measure:e,source:t[`${n.source}`],uci:t[`${n.uci}`]}:void 0}var IL=(t,n,e)=>(null==t?void 0:t.hasOwnProperty(e))?t[e]:null==t?void 0:t[n];function HL(t,n=.8){return t.reduce(((t,n)=>{return t+(e=FL(n,NaN),!isNaN(parseFloat(e))&&isFinite(e)?1:0);var e}),0)/t.length>n}function GL(t){var n;return(null==(n=null==t?void 0:t.dimension)?void 0:n.dimensionType)===g.Geographic}function KL(t){var n;return(null==(n=null==t?void 0:t.dimension)?void 0:n.dimensionType)===g.Time}function UL(t,n){if(!Array.isArray(t)||!t.length)return!1;let e=null;return t.every((t=>{const i=t[n.caption];return null===e?(0!==i&&(e=i>0),!0):e?i>=0:i<=0}))}var qL="barchart",WL="barchartyear",$L="donut",YL="geomap",VL="lineplot",ZL="treemap",XL=[WL,VL,"stacked"],JL=t=>t.drilldowns.filter((t=>!KL(t))),QL=(t,n)=>n.reduce(((n,e)=>n*t.membersCount[e.caption]),1),tI=(t,n,e,i)=>function(t){let n=5381,e=t.length;for(;e--;)n=33*n^t.charCodeAt(e);return(n>>>0).toString(36)}(n.map((t=>t.caption)).concat(e.measure.name,`${t.length}`,i).join("|"));function nI(t,n){const e=eh(1,n.stdDrilldowns.length+1);return Xl(n.measureSets,(i=>Xl(e,(e=>Array.from(RL(JL(n),e),(e=>({chartType:t,dg:n,isMap:e.some(GL),isTimeline:!!n.timeDrilldown&&!XL.includes(t),key:tI(n.dataset,e,i,t),levels:e,measureSet:i})))))))}var eI={barchart(t,n){const e=qL,{dataset:i,members:r,membersCount:o,timeDrilldown:a}=t,u=JL(t).filter((t=>o[t.caption]>1));if(0===u.length)return[];const l=t.measureSets.filter((t=>{var n;return(null==(n=null==t?void 0:t.measure)?void 0:n.aggregatorType)&&"UNKNOWN"!==t.measure.aggregatorType})),s=!!a;return Xl(l,(o=>{const a={chartType:e,dg:t,measureSet:o,members:r,isTimeline:s},l=eh(1,u.length+1);return Xl(l,(r=>Array.from(RL(u,r),(r=>QL(t,r)>n.BARCHART_MAX_BARS?null:{...a,levels:r,isMap:!1,key:tI(i,r,o,e)})).filter(Boolean)))}))},barchartyear(t,n){const{membersCount:e,timeDrilldown:i,stdDrilldowns:r}=t,o=r[0]||i;if(!i||e[i.caption]<2||e[o.caption]>n.BARCHART_YEAR_MAX_BARS||r.every((t=>1===e[t.caption])))return[];const a=t.measureSets.filter((({measure:t})=>$c(["SUM","UNKNOWN"],t.aggregatorType)&&(r.length<2||$c(["Percentage","Rate"],t.annotations.units_of_measurement))));return nI(WL,{...t,measureSets:a})},donut(t,n){const e=t.measureSets.filter((t=>$c([h.SUM,h.COUNT],t.measure.aggregatorType))),i=JL(t).filter((n=>t.membersCount[n.caption]>1)),r=eh(1,i.length+1);return Xl(e,(e=>Xl(r,(r=>Array.from(RL(i,r),(i=>QL(t,i)>n.DONUT_SHAPE_MAX?null:{chartType:$L,dg:t,isMap:!1,isTimeline:!!t.timeDrilldown,key:tI(t.dataset,i,e,$L),levels:i,measureSet:e})).filter(Boolean)))))},pie:(t,n)=>eI.donut(t,n),geomap(t,n){var e,i;const{cuts:r,drilldowns:o,geoDrilldown:a,stdDrilldowns:u,membersCount:l}=t;return!t.topojsonConfig||!a||o.length>2||l[a.caption]<3||u[0]&&((null==(i=r.get(null==(e=u[0])?void 0:e.caption))?void 0:i.length)||1)>1?[]:Xl(t.measureSets,(n=>({chartType:YL,dg:t,isMap:!0,isTimeline:!!t.timeDrilldown,key:tI(t.dataset,o,n,YL),levels:JL(t),measureSet:n})))},histogram:(t,n)=>[],lineplot(t,n){const{membersCount:e,timeDrilldown:i}=t;if(!i||e[i.caption]t.membersCount[e.caption]<=n.LINEPLOT_LINE_MAX)),a=o.length>0?o:r.length>0?[]:[!1];return Xl(t.measureSets,(n=>a.map((e=>{const i=e?[e]:[];return{chartType:VL,dg:t,isMap:GL(e),isTimeline:!1,key:tI(t.dataset,i,n,VL),levels:i,measureSet:n}}))))},stacked(t,n){const{drilldowns:e,membersCount:i,timeDrilldown:r}=t,o=JL(t);if(!r||i[r.caption]t*i[n.caption]),1)>n.STACKED_SHAPE_MAX||o.every((t=>1===i[t.caption])))return[];const a=t.measureSets.filter((({measure:n})=>(!$c(["AVG","AVERAGE","MEDIAN","NONE"],n.aggregatorType)||$c(["Percentage","Rate"],n.annotations.units_of_measurement)&&i[e[0].caption]>1)&&UL(t.dataset,n)));return nI("stacked",{...t,measureSets:a})},treemap(t,n){const{dataset:e,membersCount:i,members:r,timeDrilldown:o}=t,a=ZL,u=JL(t);if(o&&0===u.length||u.every((t=>1===i[t.caption])))return[];const l=u.filter((t=>i[t.caption]>1)),s=t.measureSets.map((s=>{const{measure:c}=s;if(!$c(["SUM","UNKNOWN"],c.aggregatorType)||$c(["Percentage","Rate"],c.annotations.units_of_measurement)&&i[null==u?void 0:u[0].caption]>1||!UL(t.dataset,c))return[];const h={chartType:a,dataset:e,dg:t,measureSet:s,members:r};return function(t,n=[]){if(0===t.length)return[];const e=(t,i=[])=>{if(0===t.length)n.push(i);else for(let n=0;nQL(t,i)>n.TREE_MAP_SHAPE_MAX?null:{...h,levels:i,isMap:!1,isTimeline:!!o,key:tI(e,i,s,a)}))}));return mc(s).filter(Boolean)}};function iI(t,n){const{dataset:e,params:i}=t,{datacap:r,getTopojsonConfig:o}=n,a=new f(t.cube),u=[];for(const l of i.measures){const t=LL(a,l);t&&u.push(t)}const s=new Map,c=new Map,h=[];for(const l of a.levelIterator){for(const t of i.drilldowns)if(l.matches(t)){h.push(l);break}for(const t of i.cuts)if(l.matches(t)){s.set(l.caption,t.members),c.set(l.caption,l);break}}const g=h.find(KL),d=null==g?void 0:g.caption,p=d?sh(e,(t=>t[d])):void 0,m=h.find(GL),_=m?o(m):void 0,y=h.filter((t=>!KL(t)&&!GL(t))),v=h.map((t=>t.caption)),{members:b,membersCount:w}=function(t,n){const e=Object.fromEntries(Xl(n,(n=>{const e=DL(n,t),i=Ks(fc(t,(t=>t[n])),(t=>t[e]));return Array.from(new Set([n,e]),(t=>[t,i.map((n=>n[t]))]))})));return{members:e,membersCount:as(e,(t=>t.length))}}(e,v),S=i.filters.map((t=>({...t,formatter:t.formatter||l,measure:a.measuresByName[t.measure]})));return{cube:a,datacap:r,dataset:e,drilldowns:h,geoDrilldown:m,timeDrilldown:g,stdDrilldowns:y,measureSets:u,filters:S,cuts:s,cutLevels:c,locale:i.locale,maxPeriod:p,params:i,membersCount:w,members:b,topojsonConfig:_}}var rI={BARCHART_MAX_BARS:20,BARCHART_YEAR_MAX_BARS:20,DONUT_SHAPE_MAX:30,LINEPLOT_LINE_POINT_MIN:2,LINEPLOT_LINE_MAX:20,STACKED_SHAPE_MAX:200,STACKED_TIME_MEMBER_MIN:2,TREE_MAP_SHAPE_MAX:1e3};function oI(t,n){var e;const{dg:i,measureSet:r}=t,{locale:o,members:a}=i,{translate:u}=n;let l;l=u("title.measure_and_modifier",{modifier:uI(r.measure.aggregatorType,u),measure:zL(r.measure,o)}).trim();const s=new Set(i.cuts.keys()),c=[],h=[],f=NL(t.levels,(t=>{const n=t.caption,e=zL(t,o),i=a[n];if(1===i.length){s.delete(n);const t=`${e}: ${i}`;return h.unshift(t),null}return s.delete(n),e}));(null==(e=i.timeDrilldown)?void 0:e.caption)&&s.has(i.timeDrilldown.caption)&&s.delete(i.timeDrilldown.caption);const g=NL([...s.values()],(t=>{const n=i.cutLevels.get(t);return n?zL(n,o):null}));c.unshift(...g.filter(Boolean)),c.length>0&&(l+=` ${u("title.of_selected_cut_members",{members:aI(c,u)})}`),h.length>0&&(l+=` (${h.join(", ")})`),f.length>0&&(l+=` ${u(`title.${t.isTopTen?"top":"by"}_drilldowns`,{drilldowns:aI(f,u)})}`);let d=null;if(i.timeDrilldown){const n=i.timeDrilldown.caption,e=zL(i.timeDrilldown,o),r=DL(e,i.dataset);1===i.membersCount[i.timeDrilldown.caption]?l+=` (${i.dataset[0][e]})`:t.isTimeline?d=t=>{const{minTime:i,maxTime:o}=function(t,n,e){if(!(t&&t.length&&n))return{min:null,max:null};const i=t.reduce(((t,e)=>(e[n]t.max[n]&&(t.max=e),t)),{max:t[0],min:t[0]});return{minTime:IL(i.min,n,e).toString(),maxTime:IL(i.max,n,e).toString()}}(t,r,n);return`${l} (${e}: ${function(t,n){return`${t}${n?` - ${n}`:""}`}(i,o!==i&&o)})`}:l+=` ${u("title.over_time")}`}return d||l}function aI(t,n){if(2===(t=t.filter(Boolean)).length)return t.join(` ${n("sentence_connectors.and")} `);if(t.length>1){const e=t.slice(),i=e.pop();return[e.join(", "),i].join(` ${n("sentence_connectors.and")} `)}return t.join("")}function uI(t,n){const e=t&&"string"==typeof t&&n(`aggregators.${t.toLowerCase()}`);return e&&!e.includes("aggregators.")?e:""}function lI(t,{translate:n}){const{dg:e,measureSet:i}=t,{locale:r}=e,{measure:o,collection:a,source:u,moe:l,uci:s,lci:c,formatter:h}=i,f=o.name,g=a?a.name:"",d=c?c.name:"",p=l?l.name:"",m=u?u.name:"",_=s?s.name:"",y=function(t,{moeName:n,lciName:e,uciName:i,sourceName:r,collectionName:o}){const a={};let u=t.length;for(;u--;){const l=t[u];a.moe=a.moe||!(isNaN(l[n])||0===l[n]),a.lci=a.lci||!(isNaN(l[e])||0===l[e]),a.uci=a.uci||!(isNaN(l[i])||0===l[i]),a.src=a.src||!!l[r],a.clt=a.clt||!!l[o]}return a}(t.dg.dataset,{collectionName:g,lciName:d,moeName:p,sourceName:m,uciName:_});return{title:n=>t.levels.map((t=>t.caption)).map((t=>Array.isArray(n[t])?e.cuts.has(t)||n._isAggregation?function(t,n=2){return Array.isArray(t)?(t.length>n?[...t.slice(0,n),`and ${t.length-n} more`]:t).join(", "):t}(n[t]):`All ${t}`:n[t])).map(((t,n)=>n>0?`(${t})`:t)).join(" "),tbody:e=>{const i=[];if(y.lci&&y.uci?i.push([n("chart_labels.ci"),t=>`${h(1*t[d]||0,r)} - ${h(1*t[_]||0,r)}`]):y.moe&&i.push([n("chart_labels.moe"),t=>`± ${h(1*t[p]||0,r)}`]),y.src&&i.push([n("chart_labels.source"),t=>`${t[m]}`]),y.clt&&i.push([n("chart_labels.collection"),t=>`${t[g]}`]),t.dg.timeDrilldown){const n=zL(t.dg.timeDrilldown,r),o=t.dg.timeDrilldown.caption;i.push([n,e[o]])}return i.push([zL(o,r),h(e[f],r)]),i}}}var sI={barchart(t,n,e){const{levels:i,dg:r}=t,{locale:o,timeDrilldown:a}=r,{formatter:u,measure:l}=t.measureSet,s=n.userConfig.locale||o,c=i[0],h=c.caption,f={groupBy:[h],groupPadding:e?5:1,discrete:"y",x:l.name,xConfig:{title:zL(l,o),tickFormat:t=>u(t,s)},y:h,yConfig:{title:zL(c,o),ticks:[]},stacked:"SUM"===l.aggregatorType&&c.depth>1,ySort:(g=h,d=r.members[h],HL(d)?(t,n)=>FL(t[g])-FL(n[g]):(t,n)=>"".localeCompare.call(t[g]||"",n[g]||""))};var g,d;if(a){const t=a.hierarchy;f.groupBy=t.levels.slice(0,1).filter((t=>t.caption in r.dataset[0])).concat(i).map((t=>t.caption)),f.time=a.caption}else i.length>1&&(f.groupBy=i.map((t=>t.caption)));return f.time||delete f.total,f},barchartyear(t,n,e){const{levels:i,dg:r}=t,{locale:o,timeDrilldown:a}=r,{formatter:u,measure:l}=t.measureSet,s=n.userConfig.locale||o,c=i[0].caption,h=l.name,f=a?a.caption:c;return{discrete:"x",groupPadding:e?5:1,time:f,timeline:!1,x:f,xConfig:{title:a?zL(a,o):null},y:h,yConfig:{title:zL(l,o),tickFormat:t=>u(t,s)},stacked:!0,groupBy:[c]}},donut(t){const{levels:n,dg:e}=t,{timeDrilldown:i}=e,r={groupBy:n.map((t=>t.caption))};return i&&(r.time=i.caption),r},geomap(t,n){const{levels:e,dg:i}=t,{cuts:r,locale:o,timeDrilldown:a,geoDrilldown:u}=i,{formatter:l,measure:s}=t.measureSet,c=n.userConfig.locale||o,h=s.name,f=u?u.caption:e[0].caption,g=gh({colorScale:h,colorScaleConfig:{axisConfig:{tickFormat:t=>l(t,c)},scale:"jenks"},colorScalePosition:"right",groupBy:[`ID ${f}`in i.dataset[0]?`ID ${f}`:`${f} ID`in i.dataset[0]?`${f} ID`:f],zoomScroll:!1},i.topojsonConfig),d=r.get(f);return d&&!g.fitFilter&&(g.fitFilter=t=>d.indexOf(t.id)>-1),a&&(g.time=a.caption),g},histogram(t,n,e){const i=sI.barchart(t,n,e);return i.groupPadding=0,i},lineplot(t,n){var e;const{levels:i,dg:r}=t,{locale:o,timeDrilldown:a}=r,{formatter:u,measure:l}=t.measureSet,{userConfig:s,showConfidenceInt:c}=n,h=s.locale||o,f=null==(e=i[0])?void 0:e.caption,g=l.name,d=null==a?void 0:a.caption,p={confidence:!1,discrete:"x",groupBy:(null==i?void 0:i.length)?i.map((t=>t.caption)):()=>"ALL",x:d,xConfig:{title:a?zL(a,r.locale):void 0},y:g,yConfig:{scale:"auto",tickFormat:t=>u(t,h),title:zL(l,o)},time:d,timeline:!1,total:!1};if(t.isTopTen&&(p.yConfig.title=`Top ${r.membersCount[f]} items, ${p.yConfig.title}`),c&&r.members[f].length<13){const{moe:n,lci:e,uci:i}=t.measureSet;if(e&&i){const t=e.name,n=i.name;p.confidence=[n=>n[t],t=>t[n]]}else if(n){const t=n.name;p.confidence=[n=>n[g]-n[t],n=>n[g]+n[t]]}}return p},pie:(t,n,e)=>sI.donut(t,n,e),stacked(t,n,e){const{levels:i}=t,{measure:r}=t.measureSet,o=sI.lineplot(t,n,e);return o.yConfig={scale:"linear",title:zL(r,t.dg.locale)},i.length>1&&(o.groupBy=i.map((t=>t.caption))),o},treemap(t){const{levels:n,dg:e}=t,{timeDrilldown:i}=e,r=n[0],o=n.slice(1),a=r.hierarchy.levels,u=a.indexOf(r),l={groupBy:a.slice(0,u+1).concat(o).map((t=>t.caption))};return i&&(l.time=i.caption),l.threshold=.005,l.thresholdName=r.caption,l}};function cI(...t){const[n,...e]=t;return Array.isArray(e)&&e.length>0?t=>`${t[n]} (${e.map((n=>t[n])).join(", ")})`:t=>`${t[n]}`}c({defaultLocale:"en",defaultTranslation:{action_close:"Close",action_enlarge:"Enlarge",action_fileissue:"File an issue",action_retry:"Retry",aggregators:{avg:"Average",max:"Max",min:"Min",sum:""},chart_labels:{ci:"Confidence Interval",moe:"Margin of Error",source:"Source",collection:"Collection"},error:{detail:"",message:'Details: "{{message}}".',title:"Error"},sentence_connectors:{and:"and"},title:{nonidealstate:"No results",of_selected_cut_members:"of Selected {{members}} Members",top_drilldowns:"for Top {{drilldowns}}",by_drilldowns:"by {{drilldowns}}",over_time:"Over Time",measure_and_modifier:"{{modifier}} {{measure}}",total:"Total"}}});var hI={barchart:AE,barchartyear:AE,donut:dM,geomap:CL,histogram:AE,lineplot:EL,pie:TL,stacked:PL,treemap:BL};function fI(t,n){const e={...rI,...n.chartLimits},i=n.chartTypes||Object.keys(hI),r={datacap:n.datacap??2e4,getTopojsonConfig:(o=n.topojsonConfig||{},"function"==typeof o?o:t=>o[t.uniqueName]||o[t.fullName]||o[t.name])};var o;return Xl(t,(t=>{const n=iI(t,r);return Xl(i,(t=>function(t,n,e){return eI.hasOwnProperty(n)?eI[n](t,e):nI(n,t)}(n,t,e)))}))}var gI,dI,pI,mI,_I=Object.create,yI=Object.defineProperty,vI=Object.getOwnPropertyDescriptor,bI=Object.getOwnPropertyNames,wI=Object.getOwnPropertySymbols,SI=Object.getPrototypeOf,xI=Object.prototype.hasOwnProperty,kI=Object.prototype.propertyIsEnumerable,CI=Math.pow,AI=(t,n,e)=>n in t?yI(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,EI=(t,n)=>{for(var e in n||(n={}))xI.call(n,e)&&AI(t,e,n[e]);if(wI)for(var e of wI(n))kI.call(n,e)&&AI(t,e,n[e]);return t},MI=(t,n,e)=>new Promise(((i,r)=>{var o=t=>{try{u(e.next(t))}catch(n){r(n)}},a=t=>{try{u(e.throw(t))}catch(n){r(n)}},u=t=>t.done?i(t.value):Promise.resolve(t.value).then(o,a);u((e=e.apply(t,n)).next())})),TI=(gI={"node_modules/tsup/assets/esm_shims.js"(){}},function(){return gI&&(dI=(0,gI[bI(gI)[0]])(gI=0)),dI}),OI=(pI={"../../node_modules/file-saver/FileSaver.js"(t,n){TI();var e=e||function(t){if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var n=t.document,e=function(){return t.URL||t.webkitURL||t},i=n.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in i,o=/constructor/i.test(t.HTMLElement)||t.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(n){(t.setImmediate||t.setTimeout)((function(){throw n}),0)},l=function(t){setTimeout((function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()}),4e4)},s=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},c=function(n,c,h){h||(n=s(n));var f,g=this,d="application/octet-stream"===n.type,p=function(){!function(t,n,e){for(var i=(n=[].concat(n)).length;i--;){var r=t["on"+n[i]];if("function"==typeof r)try{r.call(t,e||t)}catch(o){u(o)}}}(g,"writestart progress write writeend".split(" "))};if(g.readyState=g.INIT,r)return f=e().createObjectURL(n),void setTimeout((function(){var t,n;i.href=f,i.download=c,t=i,n=new MouseEvent("click"),t.dispatchEvent(n),p(),l(f),g.readyState=g.DONE}));!function(){if((a||d&&o)&&t.FileReader){var i=new FileReader;return i.onloadend=function(){var n=a?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(n,"_blank")||(t.location.href=n),n=void 0,g.readyState=g.DONE,p()},i.readAsDataURL(n),void(g.readyState=g.INIT)}f||(f=e().createObjectURL(n)),d?t.location.href=f:t.open(f,"_blank")||(t.location.href=f),g.readyState=g.DONE,p(),l(f)}()},h=c.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,n,e){return n=n||t.name||"download",e||(t=s(t)),navigator.msSaveOrOpenBlob(t,n)}:(h.abort=function(){},h.readyState=h.INIT=0,h.WRITING=1,h.DONE=2,h.error=h.onwritestart=h.onprogress=h.onwrite=h.onabort=h.onerror=h.onwriteend=null,function(t,n,e){return new c(t,n||t.name||"download",e)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||t.content);void 0!==n&&n.exports?n.exports.saveAs=e:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",(function(){return e}))}},function(){return mI||(0,pI[bI(pI)[0]])((mI={exports:{}}).exports,mI),mI.exports});function PI(t){var n,e,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;nt.active)).map(n)}TI(),TI(),TI();var DI={BARCHART_MAX_BARS:20,BARCHART_YEAR_MAX_BARS:20,DONUT_SHAPE_MAX:30,LINEPLOT_LINE_POINT_MIN:2,LINEPLOT_LINE_MAX:20,STACKED_SHAPE_MAX:200,STACKED_TIME_MEMBER_MIN:2,TREE_MAP_SHAPE_MAX:1e3};TI(),TI(),TI(),TI(),TI(),TI(),TI();var zI=(()=>{let t=0;return()=>(t+=1,`u${`0000${(Math.random()*CI(36,4)|0).toString(36)}`.slice(-4)}${t}`)})();function NI(t){const n=[];for(let e=0,i=t.length;e{const i=new Image;i.decode=()=>n(i),i.onload=()=>n(i),i.onerror=e,i.crossOrigin="anonymous",i.decoding="async",i.src=t}))}function HI(t,n,e){return MI(this,null,(function*(){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"foreignObject");return r.setAttribute("width",`${n}`),r.setAttribute("height",`${e}`),r.setAttribute("viewBox",`0 0 ${n} ${e}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),r.appendChild(o),o.appendChild(t),function(t){return MI(this,null,(function*(){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(t))).then(encodeURIComponent).then((t=>`data:image/svg+xml;charset=utf-8,${t}`))}))}(r)}))}var GI=(t,n)=>{if(t instanceof n)return!0;const e=Object.getPrototypeOf(t);return null!==e&&(e.constructor.name===n.name||GI(e,n))};function KI(t,n,e){const i=`.${t}:${n}`,r=e.cssText?function(t){const n=t.getPropertyValue("content");return`${t.cssText} content: '${n.replace(/'|"/g,"")}';`}(e):function(t){return NI(t).map((n=>`${n}: ${t.getPropertyValue(n)}${t.getPropertyPriority(n)?" !important":""};`)).join(" ")}(e);return document.createTextNode(`${i}{${r}}`)}function UI(t,n,e){const i=window.getComputedStyle(t,e),r=i.getPropertyValue("content");if(""===r||"none"===r)return;const o=zI();try{n.className=`${n.className} ${o}`}catch(u){return}const a=document.createElement("style");a.appendChild(KI(o,e,i)),n.appendChild(a)}TI();var qI="application/font-woff",WI="image/jpeg",$I={woff:qI,woff2:qI,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:WI,jpeg:WI,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function YI(t){const n=function(t){const n=/\.([^./]*?)$/g.exec(t);return n?n[1]:""}(t).toLowerCase();return $I[n]||""}function VI(t){return-1!==t.search(/^(data:)/)}function ZI(t,n){return`data:${n};base64,${t}`}function XI(t,n,e){return MI(this,null,(function*(){const i=yield fetch(t,n);if(404===i.status)throw new Error(`Resource "${i.url}" not found`);const r=yield i.blob();return new Promise(((t,n)=>{const o=new FileReader;o.onerror=n,o.onloadend=()=>{try{t(e({res:i,result:o.result}))}catch(r){n(r)}},o.readAsDataURL(r)}))}))}TI();var JI={};function QI(t,n,e){return MI(this,null,(function*(){const i=function(t,n,e){let i=t.replace(/\?.*/,"");return e&&(i=t),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),n?`[${n}]${i}`:i}(t,n,e.includeQueryParams);if(null!=JI[i])return JI[i];let r;e.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());try{const i=yield XI(t,e.fetchRequestInit,(({res:t,result:e})=>(n||(n=t.headers.get("Content-Type")||""),function(t){return t.split(/,/)[1]}(e))));r=ZI(i,n)}catch(o){r=e.imagePlaceholder||"";let n=`Failed to fetch resource: ${t}`;o&&(n="string"==typeof o?o:o.message),n&&console.warn(n)}return JI[i]=r,r}))}function tH(t,n){return MI(this,null,(function*(){return GI(t,HTMLCanvasElement)?function(t){return MI(this,null,(function*(){const n=t.toDataURL();return"data:,"===n?t.cloneNode(!1):II(n)}))}(t):GI(t,HTMLVideoElement)?function(t,n){return MI(this,null,(function*(){if(t.currentSrc){const n=document.createElement("canvas"),e=n.getContext("2d");return n.width=t.clientWidth,n.height=t.clientHeight,null==e||e.drawImage(t,0,0,n.width,n.height),II(n.toDataURL())}const e=t.poster,i=YI(e);return II(yield QI(e,i,n))}))}(t,n):GI(t,HTMLIFrameElement)?function(t){return MI(this,null,(function*(){var n;try{if(null===(n=null==t?void 0:t.contentDocument)||void 0===n?void 0:n.body)return yield iH(t.contentDocument.body,{},!0)}catch(e){}return t.cloneNode(!1)}))}(t):t.cloneNode(!1)}))}var nH=t=>null!=t.tagName&&"SLOT"===t.tagName.toUpperCase();function eH(t,n){return GI(n,Element)&&(function(t,n){const e=n.style;if(!e)return;const i=window.getComputedStyle(t);i.cssText?(e.cssText=i.cssText,e.transformOrigin=i.transformOrigin):NI(i).forEach((r=>{let o=i.getPropertyValue(r);if("font-size"===r&&o.endsWith("px")){const t=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1;o=`${t}px`}GI(t,HTMLIFrameElement)&&"display"===r&&"inline"===o&&(o="block"),"d"===r&&n.getAttribute("d")&&(o=`path(${n.getAttribute("d")})`),e.setProperty(r,o,i.getPropertyPriority(r))}))}(t,n),function(t,n){UI(t,n,":before"),UI(t,n,":after")}(t,n),function(t,n){GI(t,HTMLTextAreaElement)&&(n.innerHTML=t.value),GI(t,HTMLInputElement)&&n.setAttribute("value",t.value)}(t,n),function(t,n){if(GI(t,HTMLSelectElement)){const e=n,i=Array.from(e.children).find((n=>t.value===n.getAttribute("value")));i&&i.setAttribute("selected","")}}(t,n)),n}function iH(t,n,e){return MI(this,null,(function*(){return e||!n.filter||n.filter(t)?Promise.resolve(t).then((t=>tH(t,n))).then((e=>function(t,n,e){return MI(this,null,(function*(){var i,r;let o=[];return o=nH(t)&&t.assignedNodes?NI(t.assignedNodes()):GI(t,HTMLIFrameElement)&&(null===(i=t.contentDocument)||void 0===i?void 0:i.body)?NI(t.contentDocument.body.childNodes):NI((null!==(r=t.shadowRoot)&&void 0!==r?r:t).childNodes),0===o.length||GI(t,HTMLVideoElement)||(yield o.reduce(((t,i)=>t.then((()=>iH(i,e))).then((t=>{t&&n.appendChild(t)}))),Promise.resolve())),n}))}(t,e,n))).then((n=>eH(t,n))).then((t=>function(t,n){return MI(this,null,(function*(){const e=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===e.length)return t;const i={};for(let o=0;o{for(;;){const[e,,i]=oH.exec(t)||[];if(!i)return"";if(i===n)return`src: ${e};`}})):t}(t,e),r=function(t){const n=[];return t.replace(rH,((t,e,i)=>(n.push(i),t))),n.filter((t=>!VI(t)))}(i);return r.reduce(((t,i)=>t.then((t=>uH(t,i,n,e)))),Promise.resolve(i))}))}function cH(t,n,e){return MI(this,null,(function*(){var i;const r=null===(i=n.style)||void 0===i?void 0:i.getPropertyValue(t);if(r){const i=yield sH(r,null,e);return n.style.setProperty(t,i,n.style.getPropertyPriority(t)),!0}return!1}))}function hH(t,n){return MI(this,null,(function*(){GI(t,Element)&&(yield function(t,n){return MI(this,null,(function*(){(yield cH("background",t,n))||(yield cH("background-image",t,n)),(yield cH("mask",t,n))||(yield cH("mask-image",t,n))}))}(t,n),yield function(t,n){return MI(this,null,(function*(){const e=GI(t,HTMLImageElement);if((!e||VI(t.src))&&(!GI(t,SVGImageElement)||VI(t.href.baseVal)))return;const i=e?t.src:t.href.baseVal,r=yield QI(i,YI(i),n);yield new Promise(((n,i)=>{t.onload=n,t.onerror=i;const o=t;o.decode&&(o.decode=n),"lazy"===o.loading&&(o.loading="eager"),e?(t.srcset="",t.src=r):t.href.baseVal=r}))}))}(t,n),yield function(t,n){return MI(this,null,(function*(){const e=NI(t.childNodes).map((t=>hH(t,n)));yield Promise.all(e).then((()=>t))}))}(t,n))}))}TI(),TI();var fH={};function gH(t){return MI(this,null,(function*(){let n=fH[t];if(null!=n)return n;const e=yield fetch(t),i=yield e.text();return n={url:t,cssText:i},fH[t]=n,n}))}function dH(t,n){return MI(this,null,(function*(){let e=t.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,r=(e.match(/url\([^)]+\)/g)||[]).map((r=>MI(this,null,(function*(){let o=r.replace(i,"$1");return o.startsWith("https://")||(o=new URL(o,t.url).href),XI(o,n.fetchRequestInit,(({result:t})=>(e=e.replace(r,`url(${t})`),[r,t])))}))));return Promise.all(r).then((()=>e))}))}function pH(t){if(null==t)return[];const n=[];let e=t.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const t=i.exec(e);if(null===t)break;n.push(t[0])}e=e.replace(i,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=r.exec(e);if(null===t){if(t=o.exec(e),null===t)break;r.lastIndex=o.lastIndex}else o.lastIndex=r.lastIndex;n.push(t[0])}return n}function mH(t,n){return MI(this,null,(function*(){if(null==t.ownerDocument)throw new Error("Provided element is not within a Document");const e=NI(t.ownerDocument.styleSheets),i=yield function(t,n){return MI(this,null,(function*(){const e=[],i=[];return t.forEach((e=>{if("cssRules"in e)try{NI(e.cssRules||[]).forEach(((t,r)=>{if(t.type===CSSRule.IMPORT_RULE){let o=r+1;const a=gH(t.href).then((t=>dH(t,n))).then((t=>pH(t).forEach((t=>{try{e.insertRule(t,t.startsWith("@import")?o+=1:e.cssRules.length)}catch(n){console.error("Error inserting rule from remote css",{rule:t,error:n})}})))).catch((t=>{console.error("Error loading remote css",t.toString())}));i.push(a)}}))}catch(r){const o=t.find((t=>null==t.href))||document.styleSheets[0];null!=e.href&&i.push(gH(e.href).then((t=>dH(t,n))).then((t=>pH(t).forEach((t=>{o.insertRule(t,e.cssRules.length)})))).catch((t=>{console.error("Error loading remote stylesheet",t)}))),console.error("Error inlining remote css file",r)}})),Promise.all(i).then((()=>(t.forEach((t=>{if("cssRules"in t)try{NI(t.cssRules||[]).forEach((t=>{e.push(t)}))}catch(n){console.error(`Error while reading CSS rules from ${t.href}`,n)}})),e)))}))}(e,n);return function(t){return t.filter((t=>t.type===CSSRule.FONT_FACE_RULE)).filter((t=>lH(t.style.getPropertyValue("src"))))}(i)}))}function _H(t,n){return MI(this,null,(function*(){const e=null!=n.fontEmbedCSS?n.fontEmbedCSS:n.skipFonts?null:yield function(t,n){return MI(this,null,(function*(){const e=yield mH(t,n);return(yield Promise.all(e.map((t=>{const e=t.parentStyleSheet?t.parentStyleSheet.href:null;return sH(t.cssText,e,n)})))).join("\n")}))}(t,n);if(e){const n=document.createElement("style"),i=document.createTextNode(e);n.appendChild(i),t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}}))}function yH(t){return MI(this,arguments,(function*(t,n={}){const{width:e,height:i}=FI(t,n),r=yield iH(t,n,!0);return yield _H(r,n),yield hH(r,n),function(t,n){const{style:e}=t;n.backgroundColor&&(e.backgroundColor=n.backgroundColor),n.width&&(e.width=`${n.width}px`),n.height&&(e.height=`${n.height}px`);const i=n.style;null!=i&&Object.keys(i).forEach((t=>{e[t]=i[t]}))}(r,n),yield HI(r,e,i)}))}function vH(t){return MI(this,arguments,(function*(t,n={}){const{width:e,height:i}=FI(t,n),r=yield yH(t,n),o=yield II(r),a=document.createElement("canvas"),u=a.getContext("2d"),l=n.pixelRatio||function(){let t,n;try{n=process}catch(i){}const e=n&&n.env?n.env.devicePixelRatio:null;return e&&(t=parseInt(e,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}(),s=n.canvasWidth||e,c=n.canvasHeight||i;return a.width=s*l,a.height=c*l,n.skipAutoScale||function(t){(t.width>LI||t.height>LI)&&(t.width>LI&&t.height>LI?t.width>t.height?(t.height*=LI/t.width,t.width=LI):(t.width*=LI/t.height,t.height=LI):t.width>LI?(t.height*=LI/t.width,t.width=LI):(t.width*=LI/t.height,t.height=LI))}(a),a.style.width=`${s}`,a.style.height=`${c}`,n.backgroundColor&&(u.fillStyle=n.backgroundColor,u.fillRect(0,0,a.width,a.height)),u.drawImage(o,0,0,a.width,a.height),a}))}function bH(t){return MI(this,arguments,(function*(t,n={}){const e=yield vH(t,n),i=yield function(t,n={}){return t.toBlob?new Promise((e=>{t.toBlob(e,n.type?n.type:"image/png",n.quality?n.quality:1)})):new Promise((e=>{const i=window.atob(t.toDataURL(n.type?n.type:void 0,n.quality?n.quality:void 0).split(",")[1]),r=i.length,o=new Uint8Array(r);for(let t=0;t(e=null!=t?_I(SI(t)):{},((t,n,e,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let r of bI(n))xI.call(t,r)||r===e||yI(t,r,{get:()=>n[r],enumerable:!(i=vI(n,r))||i.enumerable});return t})(!n&&t&&t.__esModule?e:yI(e,"default",{value:t,enumerable:!0}),t)))(OI(),1),SH={filename:"download",type:"png"};TI();var xH=class extends b.Component{constructor(){super(...arguments),this.state={message:"",name:""},this.clearError=()=>this.setState({message:"",name:""})}static getDerivedStateFromError(t){return{message:t.message,name:t.name}}render(){const{message:t,name:n}=this.state;return t?b.createElement(d,null,(({translate:e})=>{const i=e("error.detail");return b.createElement(w,{p:"xl",align:"center",justify:"center",direction:"column",className:"chart-card error"},b.createElement(S,{order:3},e("error.title")),i.length?b.createElement(x,null,i):null,b.createElement(x,null,e("error.message",{message:t})),b.createElement(k,{spacing:"xs",my:"sm"},b.createElement(C,{onClick:this.clearError,size:"xs",variant:"light"},e("action_retry")),b.createElement(C,{error:n,message:t})))})):this.props.children}},kH={barchart:AE,barchartyear:AE,donut:dM,geomap:CL,histogram:AE,lineplot:EL,pie:TL,stacked:PL,treemap:BL},CH={jpg:B,png:B,svg:D};function AH(t){const{chart:e,currentChart:i,isSingleChart:r}=t,o=i===e.key,{translate:a,locale:u}=m(),l=v.useRef(null),s=kH[e.chartType],c=v.useMemo((()=>function(t,n){const{translate:e}=n,{chartType:i,dg:r,measureSet:o,levels:a}=t,{timeDrilldown:u,locale:l}=r,{formatter:s,measure:c}=o,{isSingleChart:h,isUniqueChart:f,userConfig:g}=n,d=g.locale||l,p=a.map((t=>t.caption)),m=c.name,_=n.currentChart===t.key||f||h,y=gh({tooltipConfig:lI(t,n),totalFormat:t=>`${e("title.total")}: ${s(t,d)}`,yConfig:{title:zL(c,l),tickFormat:t=>s(t,d)},label:cI(...p),locale:d,sum:m,value:m},sI[i](t,n,_),g);if(void 0===y.title&&(y.title=oI(t,n)),!$c(["Percentage","Rate"],c.annotations.units_of_measurement)&&$c(["SUM","UNKNOWN"],c.aggregatorType)&&(y.total=!!_&&m),u&&y.time&&t.isTimeline&&(y.timeline=!0),gh(y,n.measureConfig(c)||{}),y.data=r.dataset,!_){const t={barConfig:{stroke:"transparent"},padding:0,tickFormat:()=>!1,tickSize:0,shapeConfig:{fill:"transparent",height:0,label:!1,stroke:"transparent",r:0,width:0},title:!1};gh(y,{colorScalePosition:!1,legend:!1,timeline:!1,timePersist:!1,subtitlePadding:!1,titlePadding:!1,total:!1,xConfig:t,yConfig:t,zoom:!1})}return y}(e,{currentChart:i,isSingleChart:r,isUniqueChart:r,measureConfig:t.measureConfig,showConfidenceInt:Boolean(t.showConfidenceInt),translate:(t,n)=>a(`vizbuilder.${t}`,n),userConfig:t.userConfig||{}})),[e,r,u]),h=v.useMemo((()=>{if(!o&&!r)return[];const n=(c.title instanceof Function?c.title():c.title).replace(/[^\w]/g,"_").replace(/[_]+/g,"_");return(e=t.downloadFormats,[].concat(e).filter((t=>null!=t))).map((t=>{const e=t.toLowerCase(),i=CH[e]||j;return b.createElement(C,{compact:!0,key:t,leftIcon:b.createElement(i,{size:16}),onClick:()=>{const{current:t}=l,i=t&&t.querySelector("svg");i&&function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function i(t){(0,wH.saveAs)(t,"".concat(n.filename,".").concat(n.type)),n.callback&&n.callback()}t&&(n=Object.assign({},SH,n),e=Object.assign({backgroundColor:e.background},e),"svg"===n.type?yH(t,e).then((function(t){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){return i(n.response)},n.send()})):bH(t,e).then(i))}(i,{filename:n,type:e},{background:EH(i)})},size:"sm",variant:"light"},t.toUpperCase())}));var e}),[o,r,t.downloadFormats]),f=v.useMemo((()=>{if(!o&&r)return null;const e=o?P:n;return b.createElement(C,{compact:!0,leftIcon:b.createElement(e,{size:16}),onClick:t.onToggle,size:"sm",variant:o?"filled":"light"},a(o?"vizbuilder.action_close":"vizbuilder.action_enlarge"))}),[o,r,u,t.onToggle]),g=o?"calc(100vh - 3rem)":r?"75vh":300;return b.createElement(T,{h:g,w:"100%",style:{overflow:"hidden"}},b.createElement(xH,null,b.createElement(O,{spacing:0,h:g,style:{position:"relative"},w:"100%"},b.createElement(k,{position:"right",p:"xs",spacing:"xs",align:"center"},h,f),b.createElement(E,{style:{flex:"1 1 auto"},ref:l,pb:"xs",px:"xs"},b.createElement(s,{config:c})))))}var EH=t=>{if(t.nodeType!==Node.ELEMENT_NODE)return"white";const n=window.getComputedStyle(t).getPropertyValue("background-color");return n&&"rgba(0, 0, 0, 0)"!==n&&"transparent"!==n?n:EH(t.parentNode)};function MH(){const{translate:t}=m();return b.createElement(E,{className:"vizbuilder-nonidealstate"},b.createElement(S,{order:1,className:"vizbuilder-nonidealstate-header"},t("nonidealstate_msg")))}t("default",function(t){const{chartTypes:n,datacap:e,defaultLocale:i="en",downloadFormats:r,nonIdealState:o=MH,showConfidenceInt:a=!1,topojsonConfig:u,userConfig:l={}}=t,s="function"==typeof(c=t.measureConfig||{})?c:t=>c[t.name];var c;const h={chartLimits:EI(EI({},DI),t.chartLimits),chartTypes:n,datacap:e,topojsonConfig:u};return f.defaultProps={version:"0.5.0"},f;function f(t){const{cube:n,panelKey:e,params:u,result:c}=t,{actions:f,formatters:g}=p(),[d,m]=v.useMemo((()=>`${e||""}-`.split("-")),[e]),_=v.useCallback((()=>{f.switchPanel(d)}),[d]),y=v.useMemo((()=>fI([{cube:n,dataset:c.data,params:{locale:u.locale||i,booleans:u.booleans,cuts:BI(u.cuts,(t=>({dimension:t.dimension,hierarchy:t.hierarchy,level:t.level,members:t.members}))),drilldowns:BI(u.drilldowns,(t=>({caption:t.captionProperty,dimension:t.dimension,hierarchy:t.hierarchy,level:t.level,properties:t.properties.map((t=>t.name))}))),filters:BI(u.filters,(t=>({constraint1:[t.conditionOne[0],t.conditionOne[2]],constraint2:t.conditionTwo?[t.conditionTwo[0],t.conditionTwo[2]]:void 0,formatter:g[t.measure],joint:t.joint,measure:t.measure}))),measures:BI(u.measures,(t=>({formatter:g[t.name],measure:t.name})))}}],h)),[n,c.data,u]),w=v.useMemo((()=>{const t=1===y.length,n=[...new Map(y.map((t=>[t.key,t]))).values()];return 0===n.length?b.createElement(o,null):b.createElement(A,{breakpoints:[{minWidth:"xs",cols:Math.min(1,n.length)},{minWidth:"md",cols:Math.min(2,n.length)},{minWidth:"lg",cols:Math.min(3,n.length)},{minWidth:"xl",cols:Math.min(4,n.length)}],className:jI({unique:1===n.length})},n.map((n=>b.createElement(AH,{chart:n,currentChart:"",downloadFormats:r,isSingleChart:t,key:n.key,measureConfig:s,onToggle:()=>{f.switchPanel(`${d}-${n.key}`)},showConfidenceInt:a,userConfig:l}))))}),[m,y]),S=v.useMemo((()=>{const t=y.find((t=>m&&t.key===m));return t?b.createElement(AH,{chart:t,currentChart:m,downloadFormats:r,isSingleChart:!0,key:`${t.key}-focus`,measureConfig:s,onToggle:_,showConfidenceInt:a,userConfig:l}):null}),[m,y]);return b.createElement(E,{className:t.className,p:"sm"},w,b.createElement(M,{centered:!0,onClose:_,opened:""!==m,padding:0,size:"calc(100vw - 3rem)",styles:{content:{maxHeight:"none !important"},inner:{padding:"0 !important"}},withCloseButton:!1},S))}}({chartTypes:["barchart","barchartyear","lineplot","stacked","treemap","geomap","donut"],downloadFormats:["svg","png"],showConfidenceInt:!1}))}}})); diff --git a/explorer/index.html b/explorer/index.html index 1370235..c2627ae 100644 --- a/explorer/index.html +++ b/explorer/index.html @@ -6,7 +6,7 @@ - + @@ -14,6 +14,6 @@

If you see this message, it means the root of the server is set incorrectly.
Tell the system administrator to point the root to the dist/ folder.

- + diff --git a/schema/ipeds_completions.xml b/schema/ipeds_completions.xml index 8dad804..a783d8c 100644 --- a/schema/ipeds_completions.xml +++ b/schema/ipeds_completions.xml @@ -59,60 +59,10 @@ Number of awards or degrees conferred - Number of distinct universities aggregated distinct-count Universities - - - - - - - - - - Percentage - The completions in a particular course at a university divided by the total completions in the university across all courses. - true - true - - - 0, - [Measures].[Completions] / [Measures].[All Completions At University], NULL) - ]]> - - - - - - Completions from 1 year ago. - - - - - - - - - Growth - 1-year growth rate in degrees completed. - - - 0 AND [Measures].[Completions] >= 0, - ([Measures].[Completions] - [Measures].[Completions Previous]) / [Measures].[Completions Previous], - NULL - ) - ]]> - - --> \ No newline at end of file diff --git a/schema/ipeds_enrollment.xml b/schema/ipeds_enrollment.xml index c34a531..ee9a209 100644 --- a/schema/ipeds_enrollment.xml +++ b/schema/ipeds_enrollment.xml @@ -76,8 +76,8 @@ People - Universities - --> + \ No newline at end of file