reneco-hierarchized-picker 0.4.3-beta.2 → 0.4.3-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/reneco-hierarchized-picker.cjs.js +1 -1
- package/dist/cjs/reneco-hierarchized-picker_2.cjs.entry.js +452 -246
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.css +42 -19
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +324 -108
- package/dist/collection/components/search-input/search-input.css +13 -17
- package/dist/collection/components/search-input/search-input.js +2 -2
- package/dist/collection/components/treejs/index.js +50 -50
- package/dist/collection/core/options-manager.js +2 -0
- package/dist/collection/core/raw-data-manager.js +4 -0
- package/dist/collection/features/events/focus-handlers.js +15 -11
- package/dist/collection/features/keyboard-navigation/keyboard-navigation.js +93 -60
- package/dist/collection/features/tree/tree-utils.js +12 -3
- package/dist/collection/utils/conf-helper.js +4 -0
- package/dist/collection/utils/constants.js +11 -3
- package/dist/collection/utils/theme-utils.js +5 -1
- package/dist/custom-elements/index.js +452 -246
- package/dist/esm/loader.js +1 -1
- package/dist/esm/reneco-hierarchized-picker.js +1 -1
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +452 -246
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/reneco-hierarchized-picker.js +1 -1
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +2 -2
- package/dist/reneco-hierarchized-picker/p-0df46cca.system.entry.js +3 -0
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/p-cc9ee330.entry.js +1 -0
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/dist/types/components/hierarchized-picker/hierarchized-picker.d.ts +19 -2
- package/dist/types/components.d.ts +10 -0
- package/dist/types/core/options-manager.d.ts +1 -1
- package/dist/types/features/keyboard-navigation/keyboard-navigation.d.ts +3 -1
- package/dist/types/features/tree/tree-utils.d.ts +1 -1
- package/dist/types/utils/constants.d.ts +7 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/reneco-hierarchized-picker/p-170e1b20.system.entry.js +0 -3
- package/dist/reneco-hierarchized-picker/p-763a27e0.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as r,g as n}from"./p-9bcf4c87.js";var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t,e,r){return t(r={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var u=a((function(t){var e;e=()=>(()=>{var t={550:(t,e,r)=>{r.d(e,{Z:()=>u});var n=r(81),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([t.id,'.PJsSKU2kCXjeIsVSdFoI{font-family:"Open Sans",sans-serif;position:fixed;z-index:10000;width:150px;transform:scale(0);transition-property:transform;transition-timing-function:ease-in-out}.novl09c_yWe4MBqKpWyN{background:#1b1a1a}.novl09c_yWe4MBqKpWyN hr{background-color:#555}.novl09c_yWe4MBqKpWyN>*:not(hr){color:#eee}.novl09c_yWe4MBqKpWyN>*:not(hr):hover{background:#555}.F5LtzLqHVYZuI1H_SR9q{background:#fff}.F5LtzLqHVYZuI1H_SR9q hr{background-color:#e4e4e4}.F5LtzLqHVYZuI1H_SR9q>*:not(hr){color:#262626}.F5LtzLqHVYZuI1H_SR9q>*:not(hr):hover{background:#e4e4e4}.PJsSKU2kCXjeIsVSdFoI.ibAEWR3dINCWDsWq1G2P{transform:scale(1)}.PJsSKU2kCXjeIsVSdFoI hr{margin:2px 0;height:1px;border:0}.PJsSKU2kCXjeIsVSdFoI>*:not(hr){padding:8px 10px;font-size:15px;cursor:pointer;display:flex;align-items:center;gap:5px}.PJsSKU2kCXjeIsVSdFoI .gfl6YXq1tuGnYKHXwDHP{display:flex;align-items:center;justify-content:center}.PJsSKU2kCXjeIsVSdFoI .gfl6YXq1tuGnYKHXwDHP>*{margin:0;padding:0;font-size:16px}.PJsSKU2kCXjeIsVSdFoI .QkRci5U3hKz5RODdOkco{line-height:21px;font-size:26px;position:relative;margin-left:auto}',""]),a.locals={"context-menu":"PJsSKU2kCXjeIsVSdFoI","context-menu--black-theme":"novl09c_yWe4MBqKpWyN","context-menu--white-theme":"F5LtzLqHVYZuI1H_SR9q",visible:"ibAEWR3dINCWDsWq1G2P","menu-item-icon":"gfl6YXq1tuGnYKHXwDHP","nested-menu-arrow":"QkRci5U3hKz5RODdOkco"};const u=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var u=0;u<this.length;u++){var c=this[u][0];null!=c&&(a[c]=!0)}for(var s=0;s<t.length;s++){var f=[].concat(t[s]);n&&a[f[0]]||(void 0!==o&&(void 0===f[5]||(f[1]="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=o),r&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=r):f[2]=r),i&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=i):f[4]="".concat(i)),e.push(f))}},e}},81:t=>{t.exports=function(t){return t[1]}},856:function(t){t.exports=function(){function t(e){return(t="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})(e)}function e(t,r){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,r)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function n(t,i,o){return n=r()?Reflect.construct:function(t,r,n){var i=[null];i.push.apply(i,r);var o=new(Function.bind.apply(t,i));return n&&e(o,n.prototype),o},n.apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var a=Object.hasOwnProperty,u=Object.setPrototypeOf,c=Object.isFrozen,s=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,l=Object.freeze,h=Object.seal,d=Object.create,p="undefined"!=typeof Reflect&&Reflect,v=p.apply,m=p.construct;v||(v=function(t,e,r){return t.apply(e,r)}),l||(l=function(t){return t}),h||(h=function(t){return t}),m||(m=function(t,e){return n(t,i(e))});var b,g=S(Array.prototype.forEach),y=S(Array.prototype.pop),k=S(Array.prototype.push),w=S(String.prototype.toLowerCase),x=S(String.prototype.match),j=S(String.prototype.replace),z=S(String.prototype.indexOf),_=S(String.prototype.trim),I=S(RegExp.prototype.test),O=(b=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return m(b,e)});function S(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return v(t,e,n)}}function A(t,e,r){r=r||w,u&&u(t,null);for(var n=e.length;n--;){var i=e[n];if("string"==typeof i){var o=r(i);o!==i&&(c(e)||(e[n]=o),i=o)}t[i]=!0}return t}function T(t){var e,r=d(null);for(e in t)v(a,t,[e])&&(r[e]=t[e]);return r}function F(t,e){for(;null!==t;){var r=f(t,e);if(r){if(r.get)return S(r.get);if("function"==typeof r.value)return S(r.value)}t=s(t)}return function(t){return console.warn("fallback value for",t),null}}var R=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=l(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),E=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),$=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=l(["#text"]),M=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=l(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),W=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=h(/<%[\w\W]*|[\w\W]*%>/gm),B=h(/^data-[\-\w.\u00B7-\uFFFF]/),H=h(/^aria-[\-\w]+$/),J=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=h(/^(?:\w+script|data):/i),Y=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=h(/^html$/i),K=function(){return"undefined"==typeof window?null:window},Z=function(e,r){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),n=function(t){return e(t)};if(n.version="2.4.0",n.removed=[],!r||!r.document||9!==r.document.nodeType)return n.isSupported=!1,n;var o=r.document,a=r.document,u=r.DocumentFragment,c=r.HTMLTemplateElement,s=r.Node,f=r.Element,h=r.NodeFilter,d=r.NamedNodeMap,p=void 0===d?r.NamedNodeMap||r.MozNamedAttrMap:d,v=r.HTMLFormElement,m=r.DOMParser,b=r.trustedTypes,S=f.prototype,Q=F(S,"cloneNode"),tt=F(S,"nextSibling"),et=F(S,"childNodes"),rt=F(S,"parentNode");if("function"==typeof c){var nt=a.createElement("template");nt.content&&nt.content.ownerDocument&&(a=nt.content.ownerDocument)}var it=Z(b,o),ot=it?it.createHTML(""):"",at=a,ut=at.implementation,ct=at.createNodeIterator,st=at.createDocumentFragment,ft=at.getElementsByTagName,lt=o.importNode,ht={};try{ht=T(a).documentMode?a.documentMode:{}}catch(t){}var dt={};n.isSupported="function"==typeof rt&&ut&&void 0!==ut.createHTMLDocument&&9!==ht;var pt,vt,mt=U,bt=V,gt=B,yt=H,kt=X,wt=Y,xt=J,jt=null,zt=A({},[].concat(i(R),i(N),i(C),i(E),i(q))),_t=null,It=A({},[].concat(i(M),i(L),i(W),i(P))),Ot=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),St=null,At=null,Tt=!0,Ft=!0,Rt=!1,Nt=!1,Ct=!1,Dt=!1,Et=!1,$t=!1,qt=!1,Mt=!1,Lt=!0,Wt=!1,Pt="user-content-",Ut=!0,Vt=!1,Bt={},Ht=null,Jt=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Xt=null,Yt=A({},["audio","video","img","source","image","track"]),Gt=null,Kt=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml",ee=te,re=!1,ne=["application/xhtml+xml","text/html"],ie="text/html",oe=null,ae=a.createElement("form"),ue=function(t){return t instanceof RegExp||t instanceof Function},ce=function(e){oe&&oe===e||(e&&"object"===t(e)||(e={}),e=T(e),pt=pt=-1===ne.indexOf(e.PARSER_MEDIA_TYPE)?ie:e.PARSER_MEDIA_TYPE,vt="application/xhtml+xml"===pt?function(t){return t}:w,jt="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS,vt):zt,_t="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR,vt):It,Gt="ADD_URI_SAFE_ATTR"in e?A(T(Kt),e.ADD_URI_SAFE_ATTR,vt):Kt,Xt="ADD_DATA_URI_TAGS"in e?A(T(Yt),e.ADD_DATA_URI_TAGS,vt):Yt,Ht="FORBID_CONTENTS"in e?A({},e.FORBID_CONTENTS,vt):Jt,St="FORBID_TAGS"in e?A({},e.FORBID_TAGS,vt):{},At="FORBID_ATTR"in e?A({},e.FORBID_ATTR,vt):{},Bt="USE_PROFILES"in e&&e.USE_PROFILES,Tt=!1!==e.ALLOW_ARIA_ATTR,Ft=!1!==e.ALLOW_DATA_ATTR,Rt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=e.SAFE_FOR_TEMPLATES||!1,Ct=e.WHOLE_DOCUMENT||!1,$t=e.RETURN_DOM||!1,qt=e.RETURN_DOM_FRAGMENT||!1,Mt=e.RETURN_TRUSTED_TYPE||!1,Et=e.FORCE_BODY||!1,Lt=!1!==e.SANITIZE_DOM,Wt=e.SANITIZE_NAMED_PROPS||!1,Ut=!1!==e.KEEP_CONTENT,Vt=e.IN_PLACE||!1,xt=e.ALLOWED_URI_REGEXP||xt,ee=e.NAMESPACE||te,e.CUSTOM_ELEMENT_HANDLING&&ue(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ot.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ue(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ot.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ot.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Nt&&(Ft=!1),qt&&($t=!0),Bt&&(jt=A({},i(q)),_t=[],!0===Bt.html&&(A(jt,R),A(_t,M)),!0===Bt.svg&&(A(jt,N),A(_t,L),A(_t,P)),!0===Bt.svgFilters&&(A(jt,C),A(_t,L),A(_t,P)),!0===Bt.mathMl&&(A(jt,E),A(_t,W),A(_t,P))),e.ADD_TAGS&&(jt===zt&&(jt=T(jt)),A(jt,e.ADD_TAGS,vt)),e.ADD_ATTR&&(_t===It&&(_t=T(_t)),A(_t,e.ADD_ATTR,vt)),e.ADD_URI_SAFE_ATTR&&A(Gt,e.ADD_URI_SAFE_ATTR,vt),e.FORBID_CONTENTS&&(Ht===Jt&&(Ht=T(Ht)),A(Ht,e.FORBID_CONTENTS,vt)),Ut&&(jt["#text"]=!0),Ct&&A(jt,["html","head","body"]),jt.table&&(A(jt,["tbody"]),delete St.tbody),l&&l(e),oe=e)},se=A({},["mi","mo","mn","ms","mtext"]),fe=A({},["foreignobject","desc","title","annotation-xml"]),le=A({},["title","style","font","a","script"]),he=A({},N);A(he,C),A(he,D);var de=A({},E);A(de,$);var pe=function(t){var e=rt(t);e&&e.tagName||(e={namespaceURI:te,tagName:"template"});var r=w(t.tagName),n=w(e.tagName);return t.namespaceURI===Qt?e.namespaceURI===te?"svg"===r:e.namespaceURI===Zt?"svg"===r&&("annotation-xml"===n||se[n]):Boolean(he[r]):t.namespaceURI===Zt?e.namespaceURI===te?"math"===r:e.namespaceURI===Qt?"math"===r&&fe[n]:Boolean(de[r]):t.namespaceURI===te&&!(e.namespaceURI===Qt&&!fe[n])&&!(e.namespaceURI===Zt&&!se[n])&&!de[r]&&(le[r]||!he[r])},ve=function(t){k(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=ot}catch(e){t.remove()}}},me=function(t,e){try{k(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){k(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!_t[t])if($t||qt)try{ve(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},be=function(t){var e,r;if(Et)t="<remove></remove>"+t;else{var n=x(t,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===pt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var i=it?it.createHTML(t):t;if(ee===te)try{e=(new m).parseFromString(i,pt)}catch(t){}if(!e||!e.documentElement){e=ut.createDocument(ee,"template",null);try{e.documentElement.innerHTML=re?"":i}catch(t){}}var o=e.body||e.documentElement;return t&&r&&o.insertBefore(a.createTextNode(r),o.childNodes[0]||null),ee===te?ft.call(e,Ct?"html":"body")[0]:Ct?e.documentElement:o},ge=function(t){return ct.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},ye=function(t){return t instanceof v&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof p)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},ke=function(e){return"object"===t(s)?e instanceof s:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},we=function(t,e,r){dt[t]&&g(dt[t],(function(t){t.call(n,e,r,oe)}))},xe=function(t){var e;if(we("beforeSanitizeElements",t,null),ye(t))return ve(t),!0;if(I(/[\u0080-\uFFFF]/,t.nodeName))return ve(t),!0;var r=vt(t.nodeName);if(we("uponSanitizeElement",t,{tagName:r,allowedTags:jt}),t.hasChildNodes()&&!ke(t.firstElementChild)&&(!ke(t.content)||!ke(t.content.firstElementChild))&&I(/<[/\w]/g,t.innerHTML)&&I(/<[/\w]/g,t.textContent))return ve(t),!0;if("select"===r&&I(/<template/i,t.innerHTML))return ve(t),!0;if(!jt[r]||St[r]){if(!St[r]&&ze(r)){if(Ot.tagNameCheck instanceof RegExp&&I(Ot.tagNameCheck,r))return!1;if(Ot.tagNameCheck instanceof Function&&Ot.tagNameCheck(r))return!1}if(Ut&&!Ht[r]){var i=rt(t)||t.parentNode,o=et(t)||t.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Q(o[a],!0),tt(t))}return ve(t),!0}return t instanceof f&&!pe(t)?(ve(t),!0):"noscript"!==r&&"noembed"!==r||!I(/<\/no(script|embed)/i,t.innerHTML)?(Nt&&3===t.nodeType&&(e=j(e=t.textContent,mt," "),e=j(e,bt," "),t.textContent!==e&&(k(n.removed,{element:t.cloneNode()}),t.textContent=e)),we("afterSanitizeElements",t,null),!1):(ve(t),!0)},je=function(t,e,r){if(Lt&&("id"===e||"name"===e)&&(r in a||r in ae))return!1;if(Ft&&!At[e]&&I(gt,e));else if(Tt&&I(yt,e));else if(!_t[e]||At[e]){if(!(ze(t)&&(Ot.tagNameCheck instanceof RegExp&&I(Ot.tagNameCheck,t)||Ot.tagNameCheck instanceof Function&&Ot.tagNameCheck(t))&&(Ot.attributeNameCheck instanceof RegExp&&I(Ot.attributeNameCheck,e)||Ot.attributeNameCheck instanceof Function&&Ot.attributeNameCheck(e))||"is"===e&&Ot.allowCustomizedBuiltInElements&&(Ot.tagNameCheck instanceof RegExp&&I(Ot.tagNameCheck,r)||Ot.tagNameCheck instanceof Function&&Ot.tagNameCheck(r))))return!1}else if(Gt[e]);else if(I(xt,j(r,wt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==z(r,"data:")||!Xt[t])if(Rt&&!I(kt,j(r,wt,"")));else if(r)return!1;return!0},ze=function(t){return t.indexOf("-")>0},_e=function(e){var r,i,o,a;we("beforeSanitizeAttributes",e,null);var u=e.attributes;if(u){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_t};for(a=u.length;a--;){var s=r=u[a],f=s.name,l=s.namespaceURI;if(i="value"===f?r.value:_(r.value),o=vt(f),c.attrName=o,c.attrValue=i,c.keepAttr=!0,c.forceKeepAttr=void 0,we("uponSanitizeAttribute",e,c),i=c.attrValue,!c.forceKeepAttr&&(me(f,e),c.keepAttr))if(I(/\/>/i,i))me(f,e);else{Nt&&(i=j(i,mt," "),i=j(i,bt," "));var h=vt(e.nodeName);if(je(h,o,i)){if(!Wt||"id"!==o&&"name"!==o||(me(f,e),i=Pt+i),it&&"object"===t(b)&&"function"==typeof b.getAttributeType)if(l);else switch(b.getAttributeType(h,o)){case"TrustedHTML":i=it.createHTML(i);break;case"TrustedScriptURL":i=it.createScriptURL(i)}try{l?e.setAttributeNS(l,f,i):e.setAttribute(f,i),y(n.removed)}catch(t){}}}}we("afterSanitizeAttributes",e,null)}},Ie=function t(e){var r,n=ge(e);for(we("beforeSanitizeShadowDOM",e,null);r=n.nextNode();)we("uponSanitizeShadowNode",r,null),xe(r)||(r.content instanceof u&&t(r.content),_e(r));we("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(e){var i,a,c,f,l,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((re=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ke(e)){if("function"!=typeof e.toString)throw O("toString is not a function");if("string"!=typeof(e=e.toString()))throw O("dirty is not a string, aborting")}if(!n.isSupported){if("object"===t(r.toStaticHTML)||"function"==typeof r.toStaticHTML){if("string"==typeof e)return r.toStaticHTML(e);if(ke(e))return r.toStaticHTML(e.outerHTML)}return e}if(Dt||ce(h),n.removed=[],"string"==typeof e&&(Vt=!1),Vt){if(e.nodeName){var d=vt(e.nodeName);if(!jt[d]||St[d])throw O("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)1===(a=(i=be("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!$t&&!Nt&&!Ct&&-1===e.indexOf("<"))return it&&Mt?it.createHTML(e):e;if(!(i=be(e)))return $t?null:Mt?ot:""}i&&Et&&ve(i.firstChild);for(var p=ge(Vt?e:i);c=p.nextNode();)3===c.nodeType&&c===f||xe(c)||(c.content instanceof u&&Ie(c.content),_e(c),f=c);if(f=null,Vt)return e;if($t){if(qt)for(l=st.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return _t.shadowroot&&(l=lt.call(o,l,!0)),l}var v=Ct?i.outerHTML:i.innerHTML;return Ct&&jt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&I(G,i.ownerDocument.doctype.name)&&(v="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+v),Nt&&(v=j(v,mt," "),v=j(v,bt," ")),it&&Mt?it.createHTML(v):v},n.setConfig=function(t){ce(t),Dt=!0},n.clearConfig=function(){oe=null,Dt=!1},n.isValidAttribute=function(t,e,r){oe||ce({});var n=vt(t),i=vt(e);return je(n,i,r)},n.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],k(dt[t],e))},n.removeHook=function(t){if(dt[t])return y(dt[t])},n.removeHooks=function(t){dt[t]&&(dt[t]=[])},n.removeAllHooks=function(){dt={}},n}()}()},138:(t,e,r)=>{var n=r(55);t.exports=function(t){var e,r="",i=t||{};return function(t,i){r=r+"<div"+n.attr("class",n.classes([`${i["context-menu"]}`],[!0]),!1,!0)+"> ",function(){var o=t;if("number"==typeof o.length)for(var a=0,u=o.length;a<u;a++)"hr"===(c=o[a])?r+="<hr>":(r=r+"<div"+n.attr("id",`context-menu-item-${c._id}`,!0,!0)+"> ",(c.iconClass||c.iconHTML)&&(r=r+"<span"+n.attr("class",n.classes([`${i["menu-item-icon"]}`],[!0]),!1,!0)+">",c.iconClass&&(r=r+"<i"+n.attr("class",n.classes([`${c.iconClass}`],[!0]),!1,!0)+"></i>"),c.iconHTML&&(r+=null==(e=c.iconHTML)?"":e),r+="</span>"),r=r+"<span>"+n.escape(null==(e=c.label)?"":e)+"</span>",c.nestedMenu&&(r=r+"<span"+n.attr("class",n.classes([`${i["nested-menu-arrow"]}`],[!0]),!1,!0)+">›</span>"),r+="</div>");else for(var a in u=0,o){var c;u++,"hr"===(c=o[a])?r+="<hr>":(r=r+"<div"+n.attr("id",`context-menu-item-${c._id}`,!0,!0)+"> ",(c.iconClass||c.iconHTML)&&(r=r+"<span"+n.attr("class",n.classes([`${i["menu-item-icon"]}`],[!0]),!1,!0)+">",c.iconClass&&(r=r+"<i"+n.attr("class",n.classes([`${c.iconClass}`],[!0]),!1,!0)+"></i>"),c.iconHTML&&(r+=null==(e=c.iconHTML)?"":e),r+="</span>"),r=r+"<span>"+n.escape(null==(e=c.label)?"":e)+"</span>",c.nestedMenu&&(r=r+"<span"+n.attr("class",n.classes([`${i["nested-menu-arrow"]}`],[!0]),!1,!0)+">›</span>"),r+="</div>")}}.call(this),r+="</div>"}.call(this,"menuItems"in i?i.menuItems:"undefined"!=typeof menuItems?menuItems:void 0,"style"in i?i.style:"undefined"!=typeof style?style:void 0),r}},55:(t,e,r)=>{var n=Object.prototype.hasOwnProperty;function i(t,e){return Array.isArray(t)?function(t,e){for(var r,n="",o="",a=Array.isArray(e),u=0;u<t.length;u++)(r=i(t[u]))&&(a&&e[u]&&(r=c(r)),n=n+o+r,o=" ");return n}(t,e):t&&"object"==typeof t?function(t){var e="",r="";for(var i in t)i&&t[i]&&n.call(t,i)&&(e=e+r+i,r=" ");return e}(t):t||""}function o(t){if(!t)return"";if("object"==typeof t){var e="";for(var r in t)n.call(t,r)&&(e=e+r+":"+t[r]+";");return e}return t+""}function a(t,e,r,n){if(!1===e||null==e||!e&&("class"===t||"style"===t))return"";if(!0===e)return" "+(n?t:t+'="'+t+'"');var i=typeof e;return"object"!==i&&"function"!==i||"function"!=typeof e.toJSON||(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),r||-1===e.indexOf('"'))?(r&&(e=c(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"}e.merge=function t(e,r){if(1===arguments.length){for(var n=e[0],i=1;i<e.length;i++)n=t(n,e[i]);return n}for(var a in r)if("class"===a){var u=e[a]||[];e[a]=(Array.isArray(u)?u:[u]).concat(r[a]||[])}else if("style"===a){u=(u=o(e[a]))&&";"!==u[u.length-1]?u+";":u;var c=o(r[a]);e[a]=u+(c=c&&";"!==c[c.length-1]?c+";":c)}else e[a]=r[a];return e},e.classes=i,e.style=o,e.attr=a,e.attrs=function(t,e){var r="";for(var u in t)if(n.call(t,u)){var c=t[u];if("class"===u){r=a(u,c=i(c),!1,e)+r;continue}"style"===u&&(c=o(c)),r+=a(u,c,!1,e)}return r};var u=/["&<>]/;function c(t){var e=""+t,r=u.exec(e);if(!r)return t;var n,i,o,a="";for(n=r.index,i=0;n<e.length;n++){switch(e.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;case 62:o=">";break;default:continue}i!==n&&(a+=e.substring(i,n)),i=n+1,a+=o}return i!==n?a+e.substring(i,n):a}e.escape=c,e.rethrow=function t(e,n,i,o){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||o))throw e.message+=" on line "+i,e;var a,u,c,s;try{o=o||r(835).readFileSync(n,{encoding:"utf8"}),a=3,u=o.split("\n"),c=Math.max(i-a,0),s=Math.min(u.length,i+a)}catch(r){return e.message+=" - could not read from "+n+" ("+r.message+")",void t(e,null,i)}a=u.slice(c,s).map((function(t,e){var r=e+c+1;return(r==i?" > ":" ")+r+"| "+t})).join("\n"),e.path=n;try{e.message=(n||"Pug")+":"+i+"\n"+a+"\n\n"+e.message}catch(t){}throw e}},379:t=>{var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var o={},a=[],u=0;u<t.length;u++){var c=t[u],s=n.base?c[0]+n.base:c[0],f=o[s]||0,l="".concat(s," ").concat(f);o[s]=f+1;var h=r(l),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)e[h].references++,e[h].updater(d);else{var p=i(d,n);n.byIndex=u,e.splice(u,0,{identifier:l,updater:p,references:1})}a.push(l)}return a}function i(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var o=n(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var u=r(o[a]);e[u].references--}for(var c=n(t,i),s=0;s<o.length;s++){var f=r(o[s]);0===e[f].references&&(e[f].updater(),e.splice(f,1))}o=c}}},569:t=>{var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,r)=>{t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},835:()=>{}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nc=void 0;var n={};return(()=>{r.d(n,{default:()=>L});var t=r(856),e=r(379),i=r.n(e),o=r(795),a=r.n(o),u=r(569),c=r.n(u),s=r(565),f=r.n(s),l=r(216),h=r.n(l),d=r(589),p=r.n(d),v=r(550),m={};m.styleTagTransform=p(),m.setAttributes=f(),m.insert=c().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=h(),i()(v.Z,m);const b=v.Z&&v.Z.locals?v.Z.locals:void 0;var g=r(138),y=r.n(g);function k(t,e,r){const{x:n,y:i}=t,{left:o,top:a}=r.getBoundingClientRect();let u=n,c=i;return n-o+e.clientWidth>r.clientWidth&&(u=o+r.clientWidth-e.clientWidth),i-a+e.clientHeight>r.clientHeight&&(c=a+r.clientHeight-e.clientHeight),{normalizedX:u,normalizedY:c}}var w,x,j,z,_,I,O,S,A,T,F,R,N,C,D,E,$=function(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)};class q{constructor(){w.add(this),x.set(this,{style:b,menuItems:[]}),j.set(this,{transformOrigin:["top","left"]}),z.set(this,{theme:"black",transitionDuration:200}),this.options={},_.set(this,(e=>e.map((e=>("object"==typeof e&&e.hasOwnProperty("iconHTML")&&(e.iconHTML=(0,t.sanitize)(e.iconHTML)),e))))),this.applyStyleOnContextMenu=(t,e,r)=>{t.style.transitionDuration=`${this.options.transitionDuration}ms`;const n=Array.from(this.options.transformOrigin);e&&(n[1]="right"),r&&(n[0]="bottom"),t.style.transformOrigin=n.join(" "),t.classList.add(this.options.customThemeClass?this.options.customThemeClass:b[`context-menu--${this.options.theme}-theme`]),this.options.customClass&&t.classList.add(this.options.customClass)},this.buildContextMenu=()=>{const t=document.createElement("div");return t.innerHTML=y()($(this,x,"f")),t.children[0]}}updateOptions(t){const e=$(this,_,"f").call(this,t.menuItems),r=$(this,w,"m",I).call(this,e);$(this,w,"m",O).call(this,r),Object.assign(this.options,$(this,z,"f")),Object.assign(this.options,Object.assign(Object.assign({},t),{menuItems:r})),Object.assign(this.options,$(this,j,"f")),$(this,x,"f").menuItems=this.options.menuItems}}x=new WeakMap,j=new WeakMap,z=new WeakMap,_=new WeakMap,w=new WeakSet,I=function(t){return t.filter((t=>"object"==typeof t&&t.hasOwnProperty("nestedMenu"))).map((t=>{const e=t.callback;t.callback=r=>{e&&e(r),new M(Object.assign(Object.assign({},this.options),{menuItems:t.nestedMenu}),r,document.getElementById(`context-menu-item-${t._id}`))}})),t},O=function t(e){e.filter((t=>"object"==typeof t)).forEach(((e,r)=>{e._id=Date.now()+r,e.nestedMenu&&$(this,w,"m",t).call(this,e.nestedMenu)}))};class M extends q{constructor(t,e,r){super(),S.add(this),A.set(this,(()=>{var t;null===(t=document.querySelector(`.${b["context-menu"]}.nested-context-menu`))||void 0===t||t.remove()})),T.set(this,(t=>{this.options.menuItems.forEach(((e,r)=>{"hr"!==e&&e.callback&&(t.children[r].onclick=()=>{var t,r,n;e.callback(this.initialContextMenuEvent),null!==(r=null!==(t=e.preventCloseOnClick)&&void 0!==t?t:this.options.preventCloseOnClick)&&void 0!==r&&r||($(this,A,"f").call(this),null===(n=document.querySelector(`.${b["context-menu"]}`))||void 0===n||n.remove())})}))})),this.updateOptions(t),$(this,S,"m",F).call(this,e,r)}}A=new WeakMap,T=new WeakMap,S=new WeakSet,F=function(t,e){this.initialContextMenuEvent=t,$(this,A,"f").call(this);const r=this.buildContextMenu();r.classList.add("nested-context-menu"),document.querySelector("body").append(r),this.applyStyleOnContextMenu(r,!1,!1);const{x:n,y:i}=e.getBoundingClientRect();let{normalizedX:o,normalizedY:a}=k({x:n,y:i},r,this.options.scope);o+=r.clientWidth,r.style.top=`${a}px`,r.style.left=`${o}px`,r.oncontextmenu=t=>t.preventDefault(),$(this,T,"f").call(this,r),setTimeout((()=>{r.classList.add(b.visible)}))};class L extends q{constructor(t){super(),R.set(this,(()=>{var t;$(this,N,"f").call(this),null===(t=document.querySelector(`.${b["context-menu"]}`))||void 0===t||t.remove()})),N.set(this,(()=>{document.querySelectorAll(`.${b["context-menu"]}.nested-context-menu`).forEach((t=>t.remove()))})),C.set(this,(t=>{this.options.menuItems.forEach(((e,r)=>{"hr"!==e&&e.callback&&(t.children[r].onclick=()=>{var t,r;e.callback(this.initialContextMenuEvent),null!==(r=null!==(t=e.preventCloseOnClick)&&void 0!==t?t:this.options.preventCloseOnClick)&&void 0!==r&&r||$(this,R,"f").call(this)})}))})),D.set(this,(t=>{t.preventDefault(),t.stopPropagation(),this.initialContextMenuEvent=t,$(this,R,"f").call(this);const e=this.buildContextMenu();document.querySelector("body").append(e);const{clientX:r,clientY:n}=t,{normalizedX:i,normalizedY:o}=k({x:r,y:n},e,this.options.scope);e.style.top=`${o}px`,e.style.left=`${i}px`,this.applyStyleOnContextMenu(e,r!==i,n!==o),e.oncontextmenu=t=>t.preventDefault(),$(this,C,"f").call(this,e),setTimeout((()=>{e.classList.add(b.visible)}))})),E.set(this,(t=>{t.target.closest(`.${b["context-menu"]}`)||$(this,R,"f").call(this)})),this.updateOptions(t),this.options.scope.oncontextmenu=$(this,D,"f"),document.addEventListener("click",$(this,E,"f"))}off(){document.removeEventListener("click",$(this,E,"f")),this.options.scope.oncontextmenu=null}}R=new WeakMap,N=new WeakMap,C=new WeakMap,D=new WeakMap,E=new WeakMap})(),n.default})(),t.exports=e()}));const c=o(u);let s=null,f=null,l=(new Date).getTime(),h=(new Date).getTime();function d(t,e){const r=t.offsetHeight,n=r/4,i=e.offsetY;return i<=n?"before":i>=r-n?"after":"over"}function p(t){t&&Array.from(t.classList).filter((t=>t.startsWith("dragover-"))).forEach((e=>t.classList.remove(e)))}function v(t){const e={};return t.reduce(((t,r)=>(e[r]||(e[r]=!0,t.push(r)),t)),[])}function m(t,e){requestAnimationFrame((()=>{e.enter(),requestAnimationFrame((()=>{e.active(),setTimeout((()=>{e.leave()}),t)}))}))}function b(t,e){this.treeNodes=[],this.nodesById={},this.leafNodesById={},this.liElementsById={},this.willUpdateNodesById={},this.container=t,this.options=Object.assign({selectMode:"checkbox",values:[],disables:[],beforeLoad:null,loaded:null,url:null,method:"GET",closeDepth:null},e),Object.defineProperties(this,{values:{get(){return this.getValues()},set(t){return this.setValues(v(t))}},disables:{get(){return this.getDisables()},set(t){return this.setDisables(v(t))}},selectedNodes:{get(){let t=[],e=this.nodesById;for(let r in e)if(e.hasOwnProperty(r)&&(1===e[r].status||2===e[r].status)){const n=Object.assign({},e[r]);delete n.parent,delete n.children,t.push(n)}return t}},disabledNodes:{get(){let t=[],e=this.nodesById;for(let r in e)if(e.hasOwnProperty(r)&&e[r].disabled){let n=Object.assign({},e[r]);delete n.parent,t.push(n)}return t}}}),this.init(this.options.data)}b.prototype.init=function(t){let{treeNodes:e,nodesById:r,leafNodesById:n,defaultValues:i,defaultDisables:o}=b.parseTreeData(t);this.treeNodes=e,this.nodesById=r,this.leafNodesById=n,this.render(this.treeNodes);const{values:a,disables:u,loaded:c}=this.options;a&&a.length&&(i=a),i.length&&this.setValues(i),u&&u.length&&(o=u),o.length&&this.setDisables(o),c&&c.call(this)},b.prototype.render=function(t){const e=b.createRootEle();e.appendChild(this.buildTree(t,0)),this.bindEvent(e);let r=null;try{r=document.querySelector(this.container)}catch(t){r=this.container}r&&(function(t){if(t&&t.firstChild)for(;t.firstChild;)t.removeChild(t.firstChild)}(r),r.appendChild(e))},b.prototype.buildTree=function(t,e){const r=this.createUlEle();return t&&t.length&&t.forEach((t=>{const n=this.createLiEle(t,e===this.options.closeDepth-1);this.liElementsById[t.id]=n;let i=null;t.children&&t.children.length&&(i=this.buildTree(t.children,e+1)),i&&n.appendChild(i),r.appendChild(n)})),r},b.prototype.bindEvent=function(t){var e;if(!this.options.parentApi.isDisabled){const r=this.options.parentApi.theOptions.contextMenu;(null===(e=null==r?void 0:r.items)||void 0===e?void 0:e.length)&&new c(Object.assign(Object.assign({},r),{scope:t,menuItems:r.items.map((t=>"string"==typeof t?t:Object.assign(Object.assign({},t),{callback:async e=>{const r=await this.options.parentApi.getValue(),n=Object.assign({},this.options.parentApi.loadedTreeJs.nodesById[r.nodeid]);let i=Object.assign(Object.assign({},n),{hasChildren:n.children.length>0});delete i.children,this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({},e),{target:i,contextMenuItem:t}))}})))}))}t.addEventListener("mousedown",(t=>{if(0!=t.button&&2!=t.button)return;const{target:e}=t;"SPAN"===e.nodeName&&(e.classList.contains("treejs-checkbox")||e.classList.contains("treejs-label"))?this.onItemClick(e.parentNode.nodeId,2==t.button):"LI"===e.nodeName&&e.classList.contains("treejs-node")?this.onItemClick(e.nodeId,2==t.button):"SPAN"===e.nodeName&&e.classList.contains("treejs-switcher")&&this.onSwitcherClick(e);const r=t.target.parentNode.querySelectorAll(".treejs-switcher").length>0&&0==t.target.parentNode.querySelectorAll("ul").length,n=Array.prototype.slice.call(t.target.parentNode.querySelectorAll("ul > li > span.treejs-label")).filter((e=>e.parentNode.parentNode.parentNode===t.target.parentNode));let i=[];if(i=n.filter((t=>"undefined"===t.textContent)),"SPAN"===e.nodeName&&e.classList.contains("treejs-switcher")&&(i.length>0||r)){if(i.length>0&&(t.target.parentNode.querySelector("ul").innerHTML=""),"webservice"==this.options.parentApi.theOptions.source)if("classification"==this.options.parentApi.theOptions.origin){const t=this.options.parentApi.getContextualApiParams(Object.assign(Object.assign({},this.options.parentApi.theOptions.options),{startNode:e.parentNode.nodeId})),r=this.options.parentApi.getContextualApiURL();this.options.rawDataManager.getFromClassification(r,t,document.querySelector("#hierarchized-picker-"+this.options.parentApi.componentID+" .loader")).then((t=>{this.options.completeCurrentTreeWithTree(this,t,this.options.parentApi.theOptions)}))}else this.options.rawDataManager.getFromSource(this.options.parentApi.theOptions.url,{StartNodeID:e.parentNode.nodeId,lng:this.options.parentApi.theOptions.options.lng,IsDeprecated:this.options.parentApi.theOptions.options.IsDeprecated},document.querySelector("#hierarchized-picker-"+this.options.parentApi.componentID+" .loader")).then((t=>{this.options.completeCurrentTreeWithTree(this,t,this.options.parentApi.theOptions)}));this.onSwitcherClick(e)}}),!1)},b.prototype.onItemClick=async function(t,e=!1){if(this.options.parentApi.isDisabled&&"tree"!=this.options.parentApi.optionsManager.getOptions().mode)return;const r=await this.options.parentApi.getValue();e&&r&&r.nodeid==t||(this.options.parentApi.theOptions.multiple||this.emptyNodesCheckStatus(),this.options.parentApi.setNodeAsSelected(t,this,!0))},b.prototype.unCheckElement=function(t){this.setValue(t),this.updateLiElements()},b.prototype.setValue=function(t){const e=this.nodesById[t];if(!e)return;const r=function(t){if(t.children&&t.children.length)return t.children.reduce(((t,e)=>isNaN(e.status)?t:t+e.status),0)}(e),n=e.status;let i=null;i=r?1===n?2:1:1===n||2===n?0:2,e.status=i,this.markWillUpdateNode(e),this.walkUp(e,"status"),this.walkDown(e,"status")},b.prototype.getValues=function(){const t=[];for(let e in this.leafNodesById)this.leafNodesById.hasOwnProperty(e)&&(1!==this.leafNodesById[e].status&&2!==this.leafNodesById[e].status||t.push(e));return t},b.prototype.setValues=function(t){this.emptyNodesCheckStatus(),t.forEach((t=>{this.setValue(t)})),this.updateLiElements();const{onChange:e}=this.options;e&&e.call(this)},b.prototype.setDisable=function(t){const e=this.nodesById[t];e&&(e.disabled||(e.disabled=!0,this.markWillUpdateNode(e),this.walkUp(e,"disabled"),this.walkDown(e,"disabled")))},b.prototype.getDisables=function(){const t=[];for(let e in this.leafNodesById)this.leafNodesById.hasOwnProperty(e)&&this.leafNodesById[e].disabled&&t.push(e);return t},b.prototype.setDisables=function(t){this.emptyNodesDisable(),t.forEach((t=>{this.setDisable(t)})),this.updateLiElements()},b.prototype.emptyNodesCheckStatus=function(){this.willUpdateNodesById=this.getSelectedNodesById(),Object.values(this.willUpdateNodesById).forEach((t=>{t.disabled||(t.status=0)}))},b.prototype.emptyNodesDisable=function(){this.willUpdateNodesById=this.getDisabledNodesById(),Object.values(this.willUpdateNodesById).forEach((t=>{t.disabled=!1}))},b.prototype.getSelectedNodesById=function(){return Object.entries(this.nodesById).reduce(((t,[e,r])=>(1!==r.status&&2!==r.status||(t[e]=r),t)),{})},b.prototype.getDisabledNodesById=function(){return Object.entries(this.nodesById).reduce(((t,[e,r])=>(r.disabled&&(t[e]=r),t)),{})},b.prototype.updateLiElements=function(){Object.values(this.willUpdateNodesById).forEach((t=>{this.updateLiElement(t)})),this.willUpdateNodesById={}},b.prototype.markWillUpdateNode=function(t){this.willUpdateNodesById[t.id]=t},b.prototype.onSwitcherClick=function(t){const e=t.parentNode,r=e.lastChild,n=r.scrollHeight;e.classList.contains("treejs-node__close")?m(150,{enter(){r.style.height=0,r.style.opacity=0},active(){r.style.height=`${n}px`,r.style.opacity=1},leave(){r.style.height="",r.style.opacity="",e.classList.remove("treejs-node__close")}}):m(150,{enter(){r.style.height=`${n}px`,r.style.opacity=1},active(){r.style.height=0,r.style.opacity=0},leave(){r.style.height="",r.style.opacity="",e.classList.add("treejs-node__close")}})},b.prototype.walkUp=function(t,e){const{parent:r}=t;if(r){if("status"===e){let t=null;const e=r.children.reduce(((t,e)=>isNaN(e.status)?t:t+e.status),0);if(t=e?e>=2&&2===r.status?2:1:0,r.status===t||2===r.status)return;if(r.status=t,r.parent){let e=r.parent.children.find((t=>t.id===r.id));e&&(e.status=t)}}else{const t=r.children.reduce(((t,e)=>t&&e.disabled),!0);if(r.disabled===t)return;r.disabled=t}this.markWillUpdateNode(r),this.walkUp(r,e)}},b.prototype.walkDown=function(){},b.prototype.updateLiElement=function(t){const{classList:e}=this.liElementsById[t.id];switch(t.status){case 0:e.remove("treejs-node__halfchecked","treejs-node__checked");break;case 1:e.remove("treejs-node__checked"),e.add("treejs-node__halfchecked");break;case 2:e.remove("treejs-node__halfchecked"),e.add("treejs-node__checked")}switch(t.disabled){case!0:e.contains("treejs-node__disabled")||e.add("treejs-node__disabled");break;case!1:e.contains("treejs-node__disabled")&&e.remove("treejs-node__disabled")}},b.parseTreeData=function(t){const e=JSON.parse(JSON.stringify(t)),r={},n={},i=[],o=[],a=function(t,e){t.forEach((t=>{r[t.id]=t,t.checked&&i.push(t.id),t.disabled&&o.push(t.id),e&&(t.parent=e),t.children&&t.children.length?a(t.children,t):n[t.id]=t}))};return a(Array.isArray(e)?e:[e],null),{treeNodes:e,nodesById:r,leafNodesById:n,defaultValues:i,defaultDisables:o}},b.createRootEle=function(){const t=document.createElement("div");return t.classList.add("treejs"),t},b.prototype.createUlEle=function(){const t=document.createElement("ul");return t.classList.add("treejs-nodes"),t},b.prototype.createLiEle=function(t,e){const r=document.createElement("li");if(r.classList.add("treejs-node"),(t.deprecated||t.Is_Deprecated)&&r.classList.add("treejs-node__deprecated"),t.isDesaturated&&r.classList.add("treejs-node__desaturated"),t.searchMatch&&r.classList.add("treejs-node__searchmatch"),e&&r.classList.add("treejs-node__close"),t.children&&t.children.length){const t=document.createElement("span");t.classList.add("treejs-switcher"),r.appendChild(t)}else r.classList.add("treejs-placeholder");if(!this.options.parentApi||this.options.parentApi&&this.options.parentApi.theOptions.multiple){const t=document.createElement("span");t.classList.add("treejs-checkbox"),r.appendChild(t)}const n=document.createElement("span");n.classList.add("treejs-label");const i=document.createTextNode(t.text);return n.appendChild(i),r.appendChild(n),r.nodeId=t.id,this.options.parentApi.theOptions.dragAndDropEnabled&&(r.setAttribute("draggable","true"),r.addEventListener("dragstart",(t=>{!function(t,e,r=!0){r&&(s=t,t.classList.add("dragging"),e.stopPropagation())}(r,t,this.options.parentApi.activatedDragAndDrop)})),r.addEventListener("dragend",(t=>{!function(t,e,r=!0){r&&(t.classList.remove("dragging"),e.stopPropagation(),p(t.parentElement))}(r,t,this.options.parentApi.activatedDragAndDrop)})),r.addEventListener("dragover",(t=>{!function(t,e,r=!0){if(!r)return;const n=(new Date).getTime();if(n-l<50&&t.dataset.nodeId!==f)return;if(l=n,t.dataset.nodeId===f){if(n-h<300)return;h=n}else f=t.dataset.nodeId;if(p(t),t===s)return void t.classList.remove("dragover");const i=d(t,e);t.classList.add(`dragover-${i}`),t.classList.add("dragover"),e.stopPropagation(),e.preventDefault()}(r,t,this.options.parentApi.activatedDragAndDrop)})),r.addEventListener("dragleave",(t=>{!function(t,e,r=!0){r&&(p(t),t.classList.remove("dragover"),e.stopPropagation())}(r,t,this.options.parentApi.activatedDragAndDrop)})),r.addEventListener("drop",(t=>{!function(t,e,r=!0,n){if(r&&(p(t),t.classList.remove("dragover"),e.stopPropagation(),s)){const r=d(t,e);n(s,t,r)}}(r,t,this.options.parentApi.activatedDragAndDrop,((t,e,r)=>{this.options.parentApi.itemDropped.emit({dragEl:t,dropEl:e,position:r})}))}))),r};var g=a((function(t,e){(function(){var r,n="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,s=1/0,f=9007199254740991,l=NaN,h=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],p="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",y="[object Function]",k="[object GeneratorFunction]",w="[object Map]",x="[object Number]",j="[object Object]",z="[object Promise]",_="[object RegExp]",I="[object Set]",O="[object String]",S="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",F="[object DataView]",R="[object Float32Array]",N="[object Float64Array]",C="[object Int8Array]",D="[object Int16Array]",E="[object Int32Array]",$="[object Uint8Array]",q="[object Uint8ClampedArray]",M="[object Uint16Array]",L="[object Uint32Array]",W=/\b__p \+= '';/g,P=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,H=RegExp(V.source),J=RegExp(B.source),X=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,G=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(tt.source),rt=/^\s+/,nt=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,st=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lt=/\w*$/,ht=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,mt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,yt=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",zt="A-Z\\xc0-\\xd6\\xd8-\\xde",_t="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+kt+"]",St="["+It+"]",At="["+wt+"]",Tt="\\d+",Ft="["+xt+"]",Rt="["+jt+"]",Nt="[^"+kt+It+Tt+xt+jt+zt+"]",Ct="\\ud83c[\\udffb-\\udfff]",Dt="[^"+kt+"]",Et="(?:\\ud83c[\\udde6-\\uddff]){2}",$t="[\\ud800-\\udbff][\\udc00-\\udfff]",qt="["+zt+"]",Mt="\\u200d",Lt="(?:"+Rt+"|"+Nt+")",Wt="(?:"+qt+"|"+Nt+")",Pt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",Vt="(?:"+At+"|"+Ct+")?",Bt="["+_t+"]?",Ht=Bt+Vt+"(?:"+Mt+"(?:"+[Dt,Et,$t].join("|")+")"+Bt+Vt+")*",Jt="(?:"+[Ft,Et,$t].join("|")+")"+Ht,Xt="(?:"+[Dt+At+"?",At,Et,$t,Ot].join("|")+")",Yt=RegExp("['’]","g"),Gt=RegExp(At,"g"),Kt=RegExp(Ct+"(?="+Ct+")|"+Xt+Ht,"g"),Zt=RegExp([qt+"?"+Rt+"+"+Pt+"(?="+[St,qt,"$"].join("|")+")",Wt+"+"+Ut+"(?="+[St,qt+Lt,"$"].join("|")+")",qt+"?"+Lt+"+"+Pt,qt+"+"+Ut,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Tt,Jt].join("|"),"g"),Qt=RegExp("["+Mt+kt+wt+_t+"]"),te=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ne={};ne[R]=ne[N]=ne[C]=ne[D]=ne[E]=ne[$]=ne[q]=ne[M]=ne[L]=!0,ne[p]=ne[v]=ne[T]=ne[m]=ne[F]=ne[b]=ne[g]=ne[y]=ne[w]=ne[x]=ne[j]=ne[_]=ne[I]=ne[O]=ne[A]=!1;var ie={};ie[p]=ie[v]=ie[T]=ie[F]=ie[m]=ie[b]=ie[R]=ie[N]=ie[C]=ie[D]=ie[E]=ie[w]=ie[x]=ie[j]=ie[_]=ie[I]=ie[O]=ie[S]=ie[$]=ie[q]=ie[M]=ie[L]=!0,ie[g]=ie[y]=ie[A]=!1;var oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof i&&i&&i.Object===Object&&i,se="object"==typeof self&&self&&self.Object===Object&&self,fe=ce||se||Function("return this")(),le=e&&!e.nodeType&&e,he=le&&t&&!t.nodeType&&t,de=he&&he.exports===le,pe=de&&ce.process,ve=function(){try{return he&&he.require&&he.require("util").types||pe&&pe.binding&&pe.binding("util")}catch(t){}}(),me=ve&&ve.isArrayBuffer,be=ve&&ve.isDate,ge=ve&&ve.isMap,ye=ve&&ve.isRegExp,ke=ve&&ve.isSet,we=ve&&ve.isTypedArray;function xe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function je(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function ze(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function _e(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Ie(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Oe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function Se(t,e){return!(null==t||!t.length)&&qe(t,e,0)>-1}function Ae(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Te(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Fe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Re(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Ne(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Ce(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var De=Pe("length");function Ee(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function $e(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function qe(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):$e(t,Le,r)}function Me(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Le(t){return t!=t}function We(t,e){var r=null==t?0:t.length;return r?Be(t,e)/r:l}function Pe(t){return function(e){return null==e?r:e[t]}}function Ue(t){return function(e){return null==t?r:t[e]}}function Ve(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Be(t,e){for(var n,i=-1,o=t.length;++i<o;){var a=e(t[i]);a!==r&&(n=n===r?a:n+a)}return n}function He(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Je(t){return t?t.slice(0,lr(t)+1).replace(rt,""):t}function Xe(t){return function(e){return t(e)}}function Ye(t,e){return Te(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function Ke(t,e){for(var r=-1,n=t.length;++r<n&&qe(e,t[r],0)>-1;);return r}function Ze(t,e){for(var r=t.length;r--&&qe(e,t[r],0)>-1;);return r}function Qe(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var tr=Ue({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"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",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),er=Ue({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(t){return"\\"+oe[t]}function nr(t){return Qt.test(t)}function ir(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function or(t,e){return function(r){return t(e(r))}}function ar(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var u=t[r];u!==e&&u!==a||(t[r]=a,o[i++]=r)}return o}function ur(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function cr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function sr(t){return nr(t)?function(t){for(var e=Kt.lastIndex=0;Kt.test(t);)++e;return e}(t):De(t)}function fr(t){return nr(t)?function(t){return t.match(Kt)||[]}(t):function(t){return t.split("")}(t)}function lr(t){for(var e=t.length;e--&&nt.test(t.charAt(e)););return e}var hr=Ue({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dr=function t(e){var i,nt=(e=null==e?fe:dr.defaults(fe.Object(),e,dr.pick(fe,ee))).Array,kt=e.Date,wt=e.Error,xt=e.Function,jt=e.Math,zt=e.Object,_t=e.RegExp,It=e.String,Ot=e.TypeError,St=nt.prototype,At=zt.prototype,Tt=e["__core-js_shared__"],Ft=xt.prototype.toString,Rt=At.hasOwnProperty,Nt=0,Ct=(i=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",Dt=At.toString,Et=Ft.call(zt),$t=fe._,qt=_t("^"+Ft.call(Rt).replace(tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mt=de?e.Buffer:r,Lt=e.Symbol,Wt=e.Uint8Array,Pt=Mt?Mt.allocUnsafe:r,Ut=or(zt.getPrototypeOf,zt),Vt=zt.create,Bt=At.propertyIsEnumerable,Ht=St.splice,Jt=Lt?Lt.isConcatSpreadable:r,Xt=Lt?Lt.iterator:r,Kt=Lt?Lt.toStringTag:r,Qt=function(){try{var t=co(zt,"defineProperty");return t({},"",{}),t}catch(t){}}(),oe=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,ce=kt&&kt.now!==fe.Date.now&&kt.now,se=e.setTimeout!==fe.setTimeout&&e.setTimeout,le=jt.ceil,he=jt.floor,pe=zt.getOwnPropertySymbols,ve=Mt?Mt.isBuffer:r,De=e.isFinite,Ue=St.join,pr=or(zt.keys,zt),vr=jt.max,mr=jt.min,br=kt.now,gr=e.parseInt,yr=jt.random,kr=St.reverse,wr=co(e,"DataView"),xr=co(e,"Map"),jr=co(e,"Promise"),zr=co(e,"Set"),_r=co(e,"WeakMap"),Ir=co(zt,"create"),Or=_r&&new _r,Sr={},Ar=qo(wr),Tr=qo(xr),Fr=qo(jr),Rr=qo(zr),Nr=qo(_r),Cr=Lt?Lt.prototype:r,Dr=Cr?Cr.valueOf:r,Er=Cr?Cr.toString:r;function $r(t){if(eu(t)&&!Va(t)&&!(t instanceof Wr)){if(t instanceof Lr)return t;if(Rt.call(t,"__wrapped__"))return Mo(t)}return new Lr(t)}var qr=function(){function t(){}return function(e){if(!tu(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function Mr(){}function Lr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function Wr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Pr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ur(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Vr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Br(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Vr;++e<r;)this.add(t[e])}function Hr(t){var e=this.__data__=new Ur(t);this.size=e.size}function Jr(t,e){var r=Va(t),n=!r&&Ua(t),i=!r&&!n&&Xa(t),o=!r&&!n&&!i&&su(t),a=r||n||i||o,u=a?He(t.length,It):[],c=u.length;for(var s in t)!e&&!Rt.call(t,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||mo(s,c))||u.push(s);return u}function Xr(t){var e=t.length;return e?t[Bn(0,e-1)]:r}function Yr(t,e){return No(Ii(t),on(e,0,t.length))}function Gr(t){return No(Ii(t))}function Kr(t,e,n){(n!==r&&!La(t[e],n)||n===r&&!(e in t))&&rn(t,e,n)}function Zr(t,e,n){var i=t[e];Rt.call(t,e)&&La(i,n)&&(n!==r||e in t)||rn(t,e,n)}function Qr(t,e){for(var r=t.length;r--;)if(La(t[r][0],e))return r;return-1}function tn(t,e,r,n){return fn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function en(t,e){return t&&Oi(e,Fu(e),t)}function rn(t,e,r){"__proto__"==e&&Qt?Qt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function nn(t,e){for(var n=-1,i=e.length,o=nt(i),a=null==t;++n<i;)o[n]=a?r:Iu(t,e[n]);return o}function on(t,e,n){return t==t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function an(t,e,n,i,o,a){var u,c=1&e,s=2&e,f=4&e;if(n&&(u=o?n(t,i,o,a):n(t)),u!==r)return u;if(!tu(t))return t;var l=Va(t);if(l){if(u=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!c)return Ii(t,u)}else{var h=lo(t),d=h==y||h==k;if(Xa(t))return ki(t,c);if(h==j||h==p||d&&!o){if(u=s||d?{}:po(t),!c)return s?function(t,e){return Oi(t,fo(t),e)}(t,function(t,e){return t&&Oi(e,Ru(e),t)}(u,t)):function(t,e){return Oi(t,so(t),e)}(t,en(u,t))}else{if(!ie[h])return o?t:{};u=function(t,e,r){var n=t.constructor;switch(e){case T:return wi(t);case m:case b:return new n(+t);case F:return function(t,e){var r=e?wi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case R:case N:case C:case D:case E:case $:case q:case M:case L:return xi(t,r);case w:return new n;case x:case O:return new n(t);case _:return function(t){var e=new t.constructor(t.source,lt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new n;case S:return Dr?zt(Dr.call(t)):{}}}(t,h,c)}}a||(a=new Hr);var v=a.get(t);if(v)return v;a.set(t,u),au(t)?t.forEach((function(r){u.add(an(r,e,n,r,t,a))})):ru(t)&&t.forEach((function(r,i){u.set(i,an(r,e,n,i,t,a))}));var g=l?r:(f?s?eo:to:s?Ru:Fu)(t);return ze(g||t,(function(r,i){g&&(r=t[i=r]),Zr(u,i,an(r,e,n,i,t,a))})),u}function un(t,e,n){var i=n.length;if(null==t)return!i;for(t=zt(t);i--;){var o=n[i],a=t[o];if(a===r&&!(o in t)||!(0,e[o])(a))return!1}return!0}function cn(t,e,i){if("function"!=typeof t)throw new Ot(n);return Ao((function(){t.apply(r,i)}),e)}function sn(t,e,r,n){var i=-1,o=Se,a=!0,u=t.length,c=[],s=e.length;if(!u)return c;r&&(e=Te(e,Xe(r))),n?(o=Ae,a=!1):e.length>=200&&(o=Ge,a=!1,e=new Br(e));t:for(;++i<u;){var f=t[i],l=null==r?f:r(f);if(f=n||0!==f?f:0,a&&l==l){for(var h=s;h--;)if(e[h]===l)continue t;c.push(f)}else o(e,l,n)||c.push(f)}return c}$r.templateSettings={escape:X,evaluate:Y,interpolate:G,variable:"",imports:{_:$r}},($r.prototype=Mr.prototype).constructor=$r,(Lr.prototype=qr(Mr.prototype)).constructor=Lr,(Wr.prototype=qr(Mr.prototype)).constructor=Wr,Pr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Pr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Pr.prototype.get=function(t){var e=this.__data__;if(Ir){var n=e[t];return n===o?r:n}return Rt.call(e,t)?e[t]:r},Pr.prototype.has=function(t){var e=this.__data__;return Ir?e[t]!==r:Rt.call(e,t)},Pr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ir&&e===r?o:e,this},Ur.prototype.clear=function(){this.__data__=[],this.size=0},Ur.prototype.delete=function(t){var e=this.__data__,r=Qr(e,t);return!(r<0||(r==e.length-1?e.pop():Ht.call(e,r,1),--this.size,0))},Ur.prototype.get=function(t){var e=this.__data__,n=Qr(e,t);return n<0?r:e[n][1]},Ur.prototype.has=function(t){return Qr(this.__data__,t)>-1},Ur.prototype.set=function(t,e){var r=this.__data__,n=Qr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Vr.prototype.clear=function(){this.size=0,this.__data__={hash:new Pr,map:new(xr||Ur),string:new Pr}},Vr.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},Vr.prototype.get=function(t){return ao(this,t).get(t)},Vr.prototype.has=function(t){return ao(this,t).has(t)},Vr.prototype.set=function(t,e){var r=ao(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Br.prototype.add=Br.prototype.push=function(t){return this.__data__.set(t,o),this},Br.prototype.has=function(t){return this.__data__.has(t)},Hr.prototype.clear=function(){this.__data__=new Ur,this.size=0},Hr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Hr.prototype.get=function(t){return this.__data__.get(t)},Hr.prototype.has=function(t){return this.__data__.has(t)},Hr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Ur){var n=r.__data__;if(!xr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Vr(n)}return r.set(t,e),this.size=r.size,this};var fn=Ti(gn),ln=Ti(yn,!0);function hn(t,e){var r=!0;return fn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function dn(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],u=e(a);if(null!=u&&(c===r?u==u&&!cu(u):n(u,c)))var c=u,s=a}return s}function pn(t,e){var r=[];return fn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function vn(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=vo),i||(i=[]);++o<a;){var u=t[o];e>0&&r(u)?e>1?vn(u,e-1,r,n,i):Fe(i,u):n||(i[i.length]=u)}return i}var mn=Fi(),bn=Fi(!0);function gn(t,e){return t&&mn(t,e,Fu)}function yn(t,e){return t&&bn(t,e,Fu)}function kn(t,e){return Oe(e,(function(e){return Ka(t[e])}))}function wn(t,e){for(var n=0,i=(e=mi(e,t)).length;null!=t&&n<i;)t=t[$o(e[n++])];return n&&n==i?t:r}function xn(t,e,r){var n=e(t);return Va(t)?n:Fe(n,r(t))}function jn(t){return null==t?t===r?"[object Undefined]":"[object Null]":Kt&&Kt in zt(t)?function(t){var e=Rt.call(t,Kt),n=t[Kt];try{t[Kt]=r;var i=!0}catch(t){}var o=Dt.call(t);return i&&(e?t[Kt]=n:delete t[Kt]),o}(t):function(t){return Dt.call(t)}(t)}function zn(t,e){return t>e}function _n(t,e){return null!=t&&Rt.call(t,e)}function In(t,e){return null!=t&&e in zt(t)}function On(t,e,n){for(var i=n?Ae:Se,o=t[0].length,a=t.length,u=a,c=nt(a),s=1/0,f=[];u--;){var l=t[u];u&&e&&(l=Te(l,Xe(e))),s=mr(l.length,s),c[u]=!n&&(e||o>=120&&l.length>=120)?new Br(u&&l):r}l=t[0];var h=-1,d=c[0];t:for(;++h<o&&f.length<s;){var p=l[h],v=e?e(p):p;if(p=n||0!==p?p:0,!(d?Ge(d,v):i(f,v,n))){for(u=a;--u;){var m=c[u];if(!(m?Ge(m,v):i(t[u],v,n)))continue t}d&&d.push(v),f.push(p)}}return f}function Sn(t,e,n){var i=null==(t=_o(t,e=mi(e,t)))?t:t[$o(Go(e))];return null==i?r:xe(i,t,n)}function An(t){return eu(t)&&jn(t)==p}function Tn(t,e,n,i,o){return t===e||(null==t||null==e||!eu(t)&&!eu(e)?t!=t&&e!=e:function(t,e,n,i,o,a){var u=Va(t),c=Va(e),s=u?v:lo(t),f=c?v:lo(e),l=(s=s==p?j:s)==j,h=(f=f==p?j:f)==j,d=s==f;if(d&&Xa(t)){if(!Xa(e))return!1;u=!0,l=!1}if(d&&!l)return a||(a=new Hr),u||su(t)?Zi(t,e,n,i,o,a):function(t,e,r,n,i,o,a){switch(r){case F:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T:return!(t.byteLength!=e.byteLength||!o(new Wt(t),new Wt(e)));case m:case b:case x:return La(+t,+e);case g:return t.name==e.name&&t.message==e.message;case _:case O:return t==e+"";case w:var u=ir;case I:if(u||(u=ur),t.size!=e.size&&!(1&n))return!1;var c=a.get(t);if(c)return c==e;n|=2,a.set(t,e);var s=Zi(u(t),u(e),n,i,o,a);return a.delete(t),s;case S:if(Dr)return Dr.call(t)==Dr.call(e)}return!1}(t,e,s,n,i,o,a);if(!(1&n)){var y=l&&Rt.call(t,"__wrapped__"),k=h&&Rt.call(e,"__wrapped__");if(y||k){var z=y?t.value():t,A=k?e.value():e;return a||(a=new Hr),o(z,A,n,i,a)}}return!!d&&(a||(a=new Hr),function(t,e,n,i,o,a){var u=1&n,c=to(t),s=c.length;if(s!=to(e).length&&!u)return!1;for(var f=s;f--;){var l=c[f];if(!(u?l in e:Rt.call(e,l)))return!1}var h=a.get(t),d=a.get(e);if(h&&d)return h==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var v=u;++f<s;){var m=t[l=c[f]],b=e[l];if(i)var g=u?i(b,m,l,e,t,a):i(m,b,l,t,e,a);if(!(g===r?m===b||o(m,b,n,i,a):g)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var y=t.constructor,k=e.constructor;y==k||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof k&&k instanceof k||(p=!1)}return a.delete(t),a.delete(e),p}(t,e,n,i,o,a))}(t,e,n,i,Tn,o))}function Fn(t,e,n,i){var o=n.length,a=o,u=!i;if(null==t)return!a;for(t=zt(t);o--;){var c=n[o];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<a;){var s=(c=n[o])[0],f=t[s],l=c[1];if(u&&c[2]){if(f===r&&!(s in t))return!1}else{var h=new Hr;if(i)var d=i(f,l,s,t,e,h);if(!(d===r?Tn(l,f,3,i,h):d))return!1}}return!0}function Rn(t){return!(!tu(t)||(e=t,Ct&&Ct in e))&&(Ka(t)?qt:pt).test(qo(t));var e}function Nn(t){return"function"==typeof t?t:null==t?nc:"object"==typeof t?Va(t)?qn(t[0],t[1]):$n(t):hc(t)}function Cn(t){if(!wo(t))return pr(t);var e=[];for(var r in zt(t))Rt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Dn(t,e){return t<e}function En(t,e){var r=-1,n=Ha(t)?nt(t.length):[];return fn(t,(function(t,i,o){n[++r]=e(t,i,o)})),n}function $n(t){var e=uo(t);return 1==e.length&&e[0][2]?jo(e[0][0],e[0][1]):function(r){return r===t||Fn(r,t,e)}}function qn(t,e){return go(t)&&xo(e)?jo($o(t),e):function(n){var i=Iu(n,t);return i===r&&i===e?Ou(n,t):Tn(e,i,3)}}function Mn(t,e,n,i,o){t!==e&&mn(e,(function(a,u){if(o||(o=new Hr),tu(a))!function(t,e,n,i,o,a,u){var c=Oo(t,n),s=Oo(e,n),f=u.get(s);if(f)Kr(t,n,f);else{var l=a?a(c,s,n+"",t,e,u):r,h=l===r;if(h){var d=Va(s),p=!d&&Xa(s),v=!d&&!p&&su(s);l=s,d||p||v?Va(c)?l=c:Ja(c)?l=Ii(c):p?(h=!1,l=ki(s,!0)):v?(h=!1,l=xi(s,!0)):l=[]:iu(s)||Ua(s)?(l=c,Ua(c)?l=bu(c):tu(c)&&!Ka(c)||(l=po(s))):h=!1}h&&(u.set(s,l),o(l,s,i,a,u),u.delete(s)),Kr(t,n,l)}}(t,e,u,n,Mn,i,o);else{var c=i?i(Oo(t,u),a,u+"",t,e,o):r;c===r&&(c=a),Kr(t,u,c)}}),Ru)}function Ln(t,e){var n=t.length;if(n)return mo(e+=e<0?n:0,n)?t[e]:r}function Wn(t,e,r){e=e.length?Te(e,(function(t){return Va(t)?function(e){return wn(e,1===t.length?t[0]:t)}:t})):[nc];var n=-1;e=Te(e,Xe(oo()));var i=En(t,(function(t){var r=Te(e,(function(e){return e(t)}));return{criteria:r,index:++n,value:t}}));return function(t){var e=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,u=r.length;++n<a;){var c=ji(i[n],o[n]);if(c)return n>=u?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));e--;)t[e]=t[e].value;return t}(i)}function Pn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],u=wn(t,a);r(u,a)&&Gn(o,mi(a,t),u)}return o}function Un(t,e,r,n){var i=n?Me:qe,o=-1,a=e.length,u=t;for(t===e&&(e=Ii(e)),r&&(u=Te(t,Xe(r)));++o<a;)for(var c=0,s=e[o],f=r?r(s):s;(c=i(u,f,c,n))>-1;)u!==t&&Ht.call(u,c,1),Ht.call(t,c,1);return t}function Vn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;mo(i)?Ht.call(t,i,1):ci(t,i)}}return t}function Bn(t,e){return t+he(yr()*(e-t+1))}function Hn(t,e){var r="";if(!t||e<1||e>f)return r;do{e%2&&(r+=t),(e=he(e/2))&&(t+=t)}while(e);return r}function Jn(t,e){return To(zo(t,e,nc),t+"")}function Xn(t){return Xr(Lu(t))}function Yn(t,e){var r=Lu(t);return No(r,on(e,0,r.length))}function Gn(t,e,n,i){if(!tu(t))return t;for(var o=-1,a=(e=mi(e,t)).length,u=a-1,c=t;null!=c&&++o<a;){var s=$o(e[o]),f=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=u){var l=c[s];(f=i?i(l,s,c):r)===r&&(f=tu(l)?l:mo(e[o+1])?[]:{})}Zr(c,s,f),c=c[s]}return t}var Kn=Or?function(t,e){return Or.set(t,e),t}:nc,Zn=Qt?function(t,e){return Qt(t,"toString",{configurable:!0,enumerable:!1,value:tc(e),writable:!0})}:nc;function Qn(t){return No(Lu(t))}function ti(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=nt(i);++n<i;)o[n]=t[n+e];return o}function ei(t,e){var r;return fn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ri(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!cu(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return ni(t,e,nc,r)}function ni(t,e,n,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var u=(e=n(e))!=e,c=null===e,s=cu(e),f=e===r;o<a;){var l=he((o+a)/2),h=n(t[l]),d=h!==r,p=null===h,v=h==h,m=cu(h);if(u)var b=i||v;else b=f?v&&(i||d):c?v&&d&&(i||!p):s?v&&d&&!p&&(i||!m):!p&&!m&&(i?h<=e:h<e);b?o=l+1:a=l}return mr(a,4294967294)}function ii(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],u=e?e(a):a;if(!r||!La(u,c)){var c=u;o[i++]=0===a?0:a}}return o}function oi(t){return"number"==typeof t?t:cu(t)?l:+t}function ai(t){if("string"==typeof t)return t;if(Va(t))return Te(t,ai)+"";if(cu(t))return Er?Er.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,r){var n=-1,i=Se,o=t.length,a=!0,u=[],c=u;if(r)a=!1,i=Ae;else if(o>=200){var s=e?null:Hi(t);if(s)return ur(s);a=!1,i=Ge,c=new Br}else c=e?[]:u;t:for(;++n<o;){var f=t[n],l=e?e(f):f;if(f=r||0!==f?f:0,a&&l==l){for(var h=c.length;h--;)if(c[h]===l)continue t;e&&c.push(l),u.push(f)}else i(c,l,r)||(c!==u&&c.push(l),u.push(f))}return u}function ci(t,e){return null==(t=_o(t,e=mi(e,t)))||delete t[$o(Go(e))]}function si(t,e,r,n){return Gn(t,e,r(wn(t,e)),n)}function fi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ti(t,n?0:o,n?o+1:i):ti(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof Wr&&(r=r.value()),Re(e,(function(t,e){return e.func.apply(e.thisArg,Fe([t],e.args))}),r)}function hi(t,e,r){var n=t.length;if(n<2)return n?ui(t[0]):[];for(var i=-1,o=nt(n);++i<n;)for(var a=t[i],u=-1;++u<n;)u!=i&&(o[i]=sn(o[i]||a,t[u],e,r));return ui(vn(o,1),e,r)}function di(t,e,n){for(var i=-1,o=t.length,a=e.length,u={};++i<o;)n(u,t[i],i<a?e[i]:r);return u}function pi(t){return Ja(t)?t:[]}function vi(t){return"function"==typeof t?t:nc}function mi(t,e){return Va(t)?t:go(t,e)?[t]:Eo(gu(t))}var bi=Jn;function gi(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:ti(t,e,n)}var yi=oe||function(t){return fe.clearTimeout(t)};function ki(t,e){if(e)return t.slice();var r=t.length,n=Pt?Pt(r):new t.constructor(r);return t.copy(n),n}function wi(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function xi(t,e){var r=e?wi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ji(t,e){if(t!==e){var n=t!==r,i=null===t,o=t==t,a=cu(t),u=e!==r,c=null===e,s=e==e,f=cu(e);if(!c&&!f&&!a&&t>e||a&&u&&s&&!c&&!f||i&&u&&s||!n&&s||!o)return 1;if(!i&&!a&&!f&&t<e||f&&n&&o&&!i&&!a||c&&n&&o||!u&&o||!s)return-1}return 0}function zi(t,e,r,n){for(var i=-1,o=t.length,a=r.length,u=-1,c=e.length,s=vr(o-a,0),f=nt(c+s),l=!n;++u<c;)f[u]=e[u];for(;++i<a;)(l||i<o)&&(f[r[i]]=t[i]);for(;s--;)f[u++]=t[i++];return f}function _i(t,e,r,n){for(var i=-1,o=t.length,a=-1,u=r.length,c=-1,s=e.length,f=vr(o-u,0),l=nt(f+s),h=!n;++i<f;)l[i]=t[i];for(var d=i;++c<s;)l[d+c]=e[c];for(;++a<u;)(h||i<o)&&(l[d+r[a]]=t[i++]);return l}function Ii(t,e){var r=-1,n=t.length;for(e||(e=nt(n));++r<n;)e[r]=t[r];return e}function Oi(t,e,n,i){var o=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var c=e[a],s=i?i(n[c],t[c],c,n,t):r;s===r&&(s=t[c]),o?rn(n,c,s):Zr(n,c,s)}return n}function Si(t,e){return function(r,n){var i=Va(r)?je:tn,o=e?e():{};return i(r,t,oo(n,2),o)}}function Ai(t){return Jn((function(e,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,u=o>2?n[2]:r;for(a=t.length>3&&"function"==typeof a?(o--,a):r,u&&bo(n[0],n[1],u)&&(a=o<3?r:a,o=1),e=zt(e);++i<o;){var c=n[i];c&&t(e,c,i,a)}return e}))}function Ti(t,e){return function(r,n){if(null==r)return r;if(!Ha(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=zt(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Fi(t){return function(e,r,n){for(var i=-1,o=zt(e),a=n(e),u=a.length;u--;){var c=a[t?u:++i];if(!1===r(o[c],c,o))break}return e}}function Ri(t){return function(e){var n=nr(e=gu(e))?fr(e):r,i=n?n[0]:e.charAt(0),o=n?gi(n,1).join(""):e.slice(1);return i[t]()+o}}function Ni(t){return function(e){return Re(Ku(Uu(e).replace(Yt,"")),t,"")}}function Ci(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=qr(t.prototype),n=t.apply(r,e);return tu(n)?n:r}}function Di(t){return function(e,n,i){var o=zt(e);if(!Ha(e)){var a=oo(n,3);e=Fu(e),n=function(t){return a(o[t],t,o)}}var u=t(e,n,i);return u>-1?o[a?e[u]:u]:r}}function Ei(t){return Qi((function(e){var i=e.length,o=i,a=Lr.prototype.thru;for(t&&e.reverse();o--;){var u=e[o];if("function"!=typeof u)throw new Ot(n);if(a&&!c&&"wrapper"==no(u))var c=new Lr([],!0)}for(o=c?o:i;++o<i;){var s=no(u=e[o]),f="wrapper"==s?ro(u):r;c=f&&yo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?c[no(f[0])].apply(c,f[3]):1==u.length&&yo(u)?c[s]():c.thru(u)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Va(r))return c.plant(r).value();for(var n=0,o=i?e[n].apply(this,t):r;++n<i;)o=e[n].call(this,o);return o}}))}function $i(t,e,n,i,o,a,u,s,f,l){var h=e&c,d=1&e,p=2&e,v=24&e,m=512&e,b=p?r:Ci(t);return function r(){for(var c=arguments.length,g=nt(c),y=c;y--;)g[y]=arguments[y];if(v)var k=io(r),w=Qe(g,k);if(i&&(g=zi(g,i,o,v)),a&&(g=_i(g,a,u,v)),c-=w,v&&c<l){var x=ar(g,k);return Vi(t,e,$i,r.placeholder,n,g,x,s,f,l-c)}var j=d?n:this,z=p?j[t]:t;return c=g.length,s?g=Io(g,s):m&&c>1&&g.reverse(),h&&f<c&&(g.length=f),this&&this!==fe&&this instanceof r&&(z=b||Ci(z)),z.apply(j,g)}}function qi(t,e){return function(r,n){return function(t,e,r,n){return gn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Mi(t,e){return function(n,i){var o;if(n===r&&i===r)return e;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ai(n),i=ai(i)):(n=oi(n),i=oi(i)),o=t(n,i)}return o}}function Li(t){return Qi((function(e){return e=Te(e,Xe(oo())),Jn((function(r){var n=this;return t(e,(function(t){return xe(t,n,r)}))}))}))}function Wi(t,e){var n=(e=e===r?" ":ai(e)).length;if(n<2)return n?Hn(e,t):e;var i=Hn(e,le(t/sr(e)));return nr(e)?gi(fr(i),0,t).join(""):i.slice(0,t)}function Pi(t){return function(e,n,i){return i&&"number"!=typeof i&&bo(e,n,i)&&(n=i=r),e=du(e),n===r?(n=e,e=0):n=du(n),function(t,e,r,n){for(var i=-1,o=vr(le((e-t)/(r||1)),0),a=nt(o);o--;)a[n?o:++i]=t,t+=r;return a}(e,n,i=i===r?e<n?1:-1:du(i),t)}}function Ui(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=mu(e),r=mu(r)),t(e,r)}}function Vi(t,e,n,i,o,a,c,s,f,l){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var d=[t,e,o,h?a:r,h?c:r,h?r:a,h?r:c,s,f,l],p=n.apply(r,d);return yo(t)&&So(p,d),p.placeholder=i,Fo(p,t,e)}function Bi(t){var e=jt[t];return function(t,r){if(t=mu(t),(r=null==r?0:mr(pu(r),292))&&De(t)){var n=(gu(t)+"e").split("e");return+((n=(gu(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Hi=zr&&1/ur(new zr([,-0]))[1]==s?function(t){return new zr(t)}:cc;function Ji(t){return function(e){var r=lo(e);return r==w?ir(e):r==I?cr(e):function(t,e){return Te(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xi(t,e,i,o,s,f,l,h){var d=2&e;if(!d&&"function"!=typeof t)throw new Ot(n);var p=o?o.length:0;if(p||(e&=-97,o=s=r),l=l===r?l:vr(pu(l),0),h=h===r?h:pu(h),p-=s?s.length:0,64&e){var v=o,m=s;o=s=r}var b=d?r:ro(t),g=[t,e,i,o,s,v,m,f,l,h];if(b&&function(t,e){var r=t[1],n=e[1],i=r|n;if(!(i<131||(n==c&&8==r||n==c&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r)))return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var o=e[3];if(o){var u=t[3];t[3]=u?zi(u,o,e[4]):o,t[4]=u?ar(t[3],a):e[4]}(o=e[5])&&(t[5]=(u=t[5])?_i(u,o,e[6]):o,t[6]=u?ar(t[5],a):e[6]),(o=e[7])&&(t[7]=o),n&c&&(t[8]=null==t[8]?e[8]:mr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(g,b),t=g[0],e=g[1],i=g[2],o=g[3],s=g[4],!(h=g[9]=g[9]===r?d?0:t.length:vr(g[9]-p,0))&&24&e&&(e&=-25),e&&1!=e)y=8==e||16==e?function(t,e,n){var i=Ci(t);return function o(){for(var a=arguments.length,u=nt(a),c=a,s=io(o);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==s&&u[a-1]!==s?[]:ar(u,s);return(a-=f.length)<n?Vi(t,e,$i,o.placeholder,r,u,f,r,r,n-a):xe(this&&this!==fe&&this instanceof o?i:t,this,u)}}(t,e,h):e!=u&&33!=e||s.length?$i.apply(r,g):function(t,e,r,n){var i=1&e,o=Ci(t);return function e(){for(var a=-1,u=arguments.length,c=-1,s=n.length,f=nt(s+u),l=this&&this!==fe&&this instanceof e?o:t;++c<s;)f[c]=n[c];for(;u--;)f[c++]=arguments[++a];return xe(l,i?r:this,f)}}(t,e,i,o);else var y=function(t,e,r){var n=1&e,i=Ci(t);return function e(){return(this&&this!==fe&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,i);return Fo((b?Kn:So)(y,g),t,e)}function Yi(t,e,n,i){return t===r||La(t,At[n])&&!Rt.call(i,n)?e:t}function Gi(t,e,n,i,o,a){return tu(t)&&tu(e)&&(a.set(e,t),Mn(t,e,r,Gi,a),a.delete(e)),t}function Ki(t){return iu(t)?r:t}function Zi(t,e,n,i,o,a){var u=1&n,c=t.length,s=e.length;if(c!=s&&!(u&&s>c))return!1;var f=a.get(t),l=a.get(e);if(f&&l)return f==e&&l==t;var h=-1,d=!0,p=2&n?new Br:r;for(a.set(t,e),a.set(e,t);++h<c;){var v=t[h],m=e[h];if(i)var b=u?i(m,v,h,e,t,a):i(v,m,h,t,e,a);if(b!==r){if(b)continue;d=!1;break}if(p){if(!Ce(e,(function(t,e){if(!Ge(p,e)&&(v===t||o(v,t,n,i,a)))return p.push(e)}))){d=!1;break}}else if(v!==m&&!o(v,m,n,i,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function Qi(t){return To(zo(t,r,Bo),t+"")}function to(t){return xn(t,Fu,so)}function eo(t){return xn(t,Ru,fo)}var ro=Or?function(t){return Or.get(t)}:cc;function no(t){for(var e=t.name+"",r=Sr[e],n=Rt.call(Sr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Rt.call($r,"placeholder")?$r:t).placeholder}function oo(){var t=$r.iteratee||ic;return t=t===ic?Nn:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function uo(t){for(var e=Fu(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,xo(i)]}return e}function co(t,e){var n=function(t,e){return null==t?r:t[e]}(t,e);return Rn(n)?n:r}var so=pe?function(t){return null==t?[]:(t=zt(t),Oe(pe(t),(function(e){return Bt.call(t,e)})))}:vc,fo=pe?function(t){for(var e=[];t;)Fe(e,so(t)),t=Ut(t);return e}:vc,lo=jn;function ho(t,e,r){for(var n=-1,i=(e=mi(e,t)).length,o=!1;++n<i;){var a=$o(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Qa(i)&&mo(a,i)&&(Va(t)||Ua(t))}function po(t){return"function"!=typeof t.constructor||wo(t)?{}:qr(Ut(t))}function vo(t){return Va(t)||Ua(t)||!!(Jt&&t&&t[Jt])}function mo(t,e){var r=typeof t;return!!(e=null==e?f:e)&&("number"==r||"symbol"!=r&&mt.test(t))&&t>-1&&t%1==0&&t<e}function bo(t,e,r){if(!tu(r))return!1;var n=typeof e;return!!("number"==n?Ha(r)&&mo(e,r.length):"string"==n&&e in r)&&La(r[e],t)}function go(t,e){if(Va(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!cu(t))||Z.test(t)||!K.test(t)||null!=e&&t in zt(e)}function yo(t){var e=no(t),r=$r[e];if("function"!=typeof r||!(e in Wr.prototype))return!1;if(t===r)return!0;var n=ro(r);return!!n&&t===n[0]}(wr&&lo(new wr(new ArrayBuffer(1)))!=F||xr&&lo(new xr)!=w||jr&&lo(jr.resolve())!=z||zr&&lo(new zr)!=I||_r&&lo(new _r)!=A)&&(lo=function(t){var e=jn(t),n=e==j?t.constructor:r,i=n?qo(n):"";if(i)switch(i){case Ar:return F;case Tr:return w;case Fr:return z;case Rr:return I;case Nr:return A}return e});var ko=Tt?Ka:mc;function wo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||At)}function xo(t){return t==t&&!tu(t)}function jo(t,e){return function(n){return null!=n&&n[t]===e&&(e!==r||t in zt(n))}}function zo(t,e,n){return e=vr(e===r?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=vr(r.length-e,0),a=nt(o);++i<o;)a[i]=r[e+i];i=-1;for(var u=nt(e+1);++i<e;)u[i]=r[i];return u[e]=n(a),xe(t,this,u)}}function _o(t,e){return e.length<2?t:wn(t,ti(e,0,-1))}function Io(t,e){for(var n=t.length,i=mr(e.length,n),o=Ii(t);i--;){var a=e[i];t[i]=mo(a,n)?o[a]:r}return t}function Oo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var So=Ro(Kn),Ao=se||function(t,e){return fe.setTimeout(t,e)},To=Ro(Zn);function Fo(t,e,r){var n=e+"";return To(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return ze(d,(function(r){var n="_."+r[0];e&r[1]&&!Se(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(ot);return e?e[1].split(at):[]}(n),r)))}function Ro(t){var e=0,n=0;return function(){var i=br(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(r,arguments)}}function No(t,e){var n=-1,i=t.length,o=i-1;for(e=e===r?i:e;++n<e;){var a=Bn(n,o),u=t[a];t[a]=t[n],t[n]=u}return t.length=e,t}var Co,Do,Eo=(Co=Ca((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Q,(function(t,r,n,i){e.push(n?i.replace(st,"$1"):r||t)})),e}),(function(t){return 500===Do.size&&Do.clear(),t})),Do=Co.cache,Co);function $o(t){if("string"==typeof t||cu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function qo(t){if(null!=t){try{return Ft.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Mo(t){if(t instanceof Wr)return t.clone();var e=new Lr(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Lo=Jn((function(t,e){return Ja(t)?sn(t,vn(e,1,Ja,!0)):[]})),Wo=Jn((function(t,e){var n=Go(e);return Ja(n)&&(n=r),Ja(t)?sn(t,vn(e,1,Ja,!0),oo(n,2)):[]})),Po=Jn((function(t,e){var n=Go(e);return Ja(n)&&(n=r),Ja(t)?sn(t,vn(e,1,Ja,!0),r,n):[]}));function Uo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=vr(n+i,0)),$e(t,oo(e,3),i)}function Vo(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==r&&(o=pu(n),o=n<0?vr(i+o,0):mr(o,i-1)),$e(t,oo(e,3),o,!0)}function Bo(t){return null!=t&&t.length?vn(t,1):[]}function Ho(t){return t&&t.length?t[0]:r}var Jo=Jn((function(t){var e=Te(t,pi);return e.length&&e[0]===t[0]?On(e):[]})),Xo=Jn((function(t){var e=Go(t),n=Te(t,pi);return e===Go(n)?e=r:n.pop(),n.length&&n[0]===t[0]?On(n,oo(e,2)):[]})),Yo=Jn((function(t){var e=Go(t),n=Te(t,pi);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?On(n,r,e):[]}));function Go(t){var e=null==t?0:t.length;return e?t[e-1]:r}var Ko=Jn(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?Un(t,e):t}var Qo=Qi((function(t,e){var r=null==t?0:t.length,n=nn(t,e);return Vn(t,Te(e,(function(t){return mo(t,r)?+t:t})).sort(ji)),n}));function ta(t){return null==t?t:kr.call(t)}var ea=Jn((function(t){return ui(vn(t,1,Ja,!0))})),ra=Jn((function(t){var e=Go(t);return Ja(e)&&(e=r),ui(vn(t,1,Ja,!0),oo(e,2))})),na=Jn((function(t){var e=Go(t);return e="function"==typeof e?e:r,ui(vn(t,1,Ja,!0),r,e)}));function ia(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Ja(t))return e=vr(t.length,e),!0})),He(e,(function(e){return Te(t,Pe(e))}))}function oa(t,e){if(!t||!t.length)return[];var n=ia(t);return null==e?n:Te(n,(function(t){return xe(e,r,t)}))}var aa=Jn((function(t,e){return Ja(t)?sn(t,e):[]})),ua=Jn((function(t){return hi(Oe(t,Ja))})),ca=Jn((function(t){var e=Go(t);return Ja(e)&&(e=r),hi(Oe(t,Ja),oo(e,2))})),sa=Jn((function(t){var e=Go(t);return e="function"==typeof e?e:r,hi(Oe(t,Ja),r,e)})),fa=Jn(ia),la=Jn((function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,oa(t,n)}));function ha(t){var e=$r(t);return e.__chain__=!0,e}function da(t,e){return e(t)}var pa=Qi((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,o=function(e){return nn(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Wr&&mo(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:da,args:[o],thisArg:r}),new Lr(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(r),t}))):this.thru(o)})),va=Si((function(t,e,r){Rt.call(t,r)?++t[r]:rn(t,r,1)})),ma=Di(Uo),ba=Di(Vo);function ga(t,e){return(Va(t)?ze:fn)(t,oo(e,3))}function ya(t,e){return(Va(t)?_e:ln)(t,oo(e,3))}var ka=Si((function(t,e,r){Rt.call(t,r)?t[r].push(e):rn(t,r,[e])})),wa=Jn((function(t,e,r){var n=-1,i="function"==typeof e,o=Ha(t)?nt(t.length):[];return fn(t,(function(t){o[++n]=i?xe(e,t,r):Sn(t,e,r)})),o})),xa=Si((function(t,e,r){rn(t,r,e)}));function ja(t,e){return(Va(t)?Te:En)(t,oo(e,3))}var za=Si((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),_a=Jn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&bo(t,e[0],e[1])?e=[]:r>2&&bo(e[0],e[1],e[2])&&(e=[e[0]]),Wn(t,vn(e,1),[])})),Ia=ce||function(){return fe.Date.now()};function Oa(t,e,n){return e=n?r:e,Xi(t,c,r,r,r,r,e=t&&null==e?t.length:e)}function Sa(t,e){var i;if("function"!=typeof e)throw new Ot(n);return t=pu(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=r),i}}var Aa=Jn((function(t,e,r){var n=1;if(r.length){var i=ar(r,io(Aa));n|=u}return Xi(t,n,e,r,i)})),Ta=Jn((function(t,e,r){var n=3;if(r.length){var i=ar(r,io(Ta));n|=u}return Xi(e,n,t,r,i)}));function Fa(t,e,i){var o,a,u,c,s,f,l=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Ot(n);function v(e){var n=o,i=a;return o=a=r,l=e,c=t.apply(i,n)}function m(t){return l=t,s=Ao(g,e),h?v(t):c}function b(t){var n=t-f;return f===r||n>=e||n<0||d&&t-l>=u}function g(){var t=Ia();if(b(t))return y(t);s=Ao(g,function(t){var r=e-(t-f);return d?mr(r,u-(t-l)):r}(t))}function y(t){return s=r,p&&o?v(t):(o=a=r,c)}function k(){var t=Ia(),n=b(t);if(o=arguments,a=this,f=t,n){if(s===r)return m(f);if(d)return yi(s),s=Ao(g,e),v(f)}return s===r&&(s=Ao(g,e)),c}return e=mu(e)||0,tu(i)&&(h=!!i.leading,u=(d="maxWait"in i)?vr(mu(i.maxWait)||0,e):u,p="trailing"in i?!!i.trailing:p),k.cancel=function(){s!==r&&yi(s),l=0,o=f=a=s=r},k.flush=function(){return s===r?c:y(Ia())},k}var Ra=Jn((function(t,e){return cn(t,1,e)})),Na=Jn((function(t,e,r){return cn(t,mu(e)||0,r)}));function Ca(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ot(n);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ca.Cache||Vr),r}function Da(t){if("function"!=typeof t)throw new Ot(n);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ca.Cache=Vr;var Ea=bi((function(t,e){var r=(e=1==e.length&&Va(e[0])?Te(e[0],Xe(oo())):Te(vn(e,1),Xe(oo()))).length;return Jn((function(n){for(var i=-1,o=mr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return xe(t,this,n)}))})),$a=Jn((function(t,e){var n=ar(e,io($a));return Xi(t,u,r,e,n)})),qa=Jn((function(t,e){var n=ar(e,io(qa));return Xi(t,64,r,e,n)})),Ma=Qi((function(t,e){return Xi(t,256,r,r,r,e)}));function La(t,e){return t===e||t!=t&&e!=e}var Wa=Ui(zn),Pa=Ui((function(t,e){return t>=e})),Ua=An(function(){return arguments}())?An:function(t){return eu(t)&&Rt.call(t,"callee")&&!Bt.call(t,"callee")},Va=nt.isArray,Ba=me?Xe(me):function(t){return eu(t)&&jn(t)==T};function Ha(t){return null!=t&&Qa(t.length)&&!Ka(t)}function Ja(t){return eu(t)&&Ha(t)}var Xa=ve||mc,Ya=be?Xe(be):function(t){return eu(t)&&jn(t)==b};function Ga(t){if(!eu(t))return!1;var e=jn(t);return e==g||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!iu(t)}function Ka(t){if(!tu(t))return!1;var e=jn(t);return e==y||e==k||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Za(t){return"number"==typeof t&&t==pu(t)}function Qa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function tu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eu(t){return null!=t&&"object"==typeof t}var ru=ge?Xe(ge):function(t){return eu(t)&&lo(t)==w};function nu(t){return"number"==typeof t||eu(t)&&jn(t)==x}function iu(t){if(!eu(t)||jn(t)!=j)return!1;var e=Ut(t);if(null===e)return!0;var r=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ft.call(r)==Et}var ou=ye?Xe(ye):function(t){return eu(t)&&jn(t)==_},au=ke?Xe(ke):function(t){return eu(t)&&lo(t)==I};function uu(t){return"string"==typeof t||!Va(t)&&eu(t)&&jn(t)==O}function cu(t){return"symbol"==typeof t||eu(t)&&jn(t)==S}var su=we?Xe(we):function(t){return eu(t)&&Qa(t.length)&&!!ne[jn(t)]},fu=Ui(Dn),lu=Ui((function(t,e){return t<=e}));function hu(t){if(!t)return[];if(Ha(t))return uu(t)?fr(t):Ii(t);if(Xt&&t[Xt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Xt]());var e=lo(t);return(e==w?ir:e==I?ur:Lu)(t)}function du(t){return t?(t=mu(t))===s||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pu(t){var e=du(t),r=e%1;return e==e?r?e-r:e:0}function vu(t){return t?on(pu(t),0,h):0}function mu(t){if("number"==typeof t)return t;if(cu(t))return l;if(tu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Je(t);var r=dt.test(t);return r||vt.test(t)?ue(t.slice(2),r?2:8):ht.test(t)?l:+t}function bu(t){return Oi(t,Ru(t))}function gu(t){return null==t?"":ai(t)}var yu=Ai((function(t,e){if(wo(e)||Ha(e))Oi(e,Fu(e),t);else for(var r in e)Rt.call(e,r)&&Zr(t,r,e[r])})),ku=Ai((function(t,e){Oi(e,Ru(e),t)})),wu=Ai((function(t,e,r,n){Oi(e,Ru(e),t,n)})),xu=Ai((function(t,e,r,n){Oi(e,Fu(e),t,n)})),ju=Qi(nn),zu=Jn((function(t,e){t=zt(t);var n=-1,i=e.length,o=i>2?e[2]:r;for(o&&bo(e[0],e[1],o)&&(i=1);++n<i;)for(var a=e[n],u=Ru(a),c=-1,s=u.length;++c<s;){var f=u[c],l=t[f];(l===r||La(l,At[f])&&!Rt.call(t,f))&&(t[f]=a[f])}return t})),_u=Jn((function(t){return t.push(r,Gi),xe(Cu,r,t)}));function Iu(t,e,n){var i=null==t?r:wn(t,e);return i===r?n:i}function Ou(t,e){return null!=t&&ho(t,e,In)}var Su=qi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Dt.call(e)),t[e]=r}),tc(nc)),Au=qi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Dt.call(e)),Rt.call(t,e)?t[e].push(r):t[e]=[r]}),oo),Tu=Jn(Sn);function Fu(t){return Ha(t)?Jr(t):Cn(t)}function Ru(t){return Ha(t)?Jr(t,!0):function(t){if(!tu(t))return function(t){var e=[];if(null!=t)for(var r in zt(t))e.push(r);return e}(t);var e=wo(t),r=[];for(var n in t)("constructor"!=n||!e&&Rt.call(t,n))&&r.push(n);return r}(t)}var Nu=Ai((function(t,e,r){Mn(t,e,r)})),Cu=Ai((function(t,e,r,n){Mn(t,e,r,n)})),Du=Qi((function(t,e){var r={};if(null==t)return r;var n=!1;e=Te(e,(function(e){return e=mi(e,t),n||(n=e.length>1),e})),Oi(t,eo(t),r),n&&(r=an(r,7,Ki));for(var i=e.length;i--;)ci(r,e[i]);return r})),Eu=Qi((function(t,e){return null==t?{}:function(t,e){return Pn(t,e,(function(e,r){return Ou(t,r)}))}(t,e)}));function $u(t,e){if(null==t)return{};var r=Te(eo(t),(function(t){return[t]}));return e=oo(e),Pn(t,r,(function(t,r){return e(t,r[0])}))}var qu=Ji(Fu),Mu=Ji(Ru);function Lu(t){return null==t?[]:Ye(t,Fu(t))}var Wu=Ni((function(t,e,r){return e=e.toLowerCase(),t+(r?Pu(e):e)}));function Pu(t){return Gu(gu(t).toLowerCase())}function Uu(t){return(t=gu(t))&&t.replace(bt,tr).replace(Gt,"")}var Vu=Ni((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Bu=Ni((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Hu=Ri("toLowerCase"),Ju=Ni((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Xu=Ni((function(t,e,r){return t+(r?" ":"")+Gu(e)})),Yu=Ni((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Gu=Ri("toUpperCase");function Ku(t,e,n){return t=gu(t),(e=n?r:e)===r?function(t){return te.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Zu=Jn((function(t,e){try{return xe(t,r,e)}catch(t){return Ga(t)?t:new wt(t)}})),Qu=Qi((function(t,e){return ze(e,(function(e){e=$o(e),rn(t,e,Aa(t[e],t))})),t}));function tc(t){return function(){return t}}var ec=Ei(),rc=Ei(!0);function nc(t){return t}function ic(t){return Nn("function"==typeof t?t:an(t,1))}var oc=Jn((function(t,e){return function(r){return Sn(r,t,e)}})),ac=Jn((function(t,e){return function(r){return Sn(t,r,e)}}));function uc(t,e,r){var n=Fu(e),i=kn(e,n);null!=r||tu(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=kn(e,Fu(e)));var o=!(tu(r)&&"chain"in r&&!r.chain),a=Ka(t);return ze(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=Ii(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Fe([this.value()],arguments))})})),t}function cc(){}var sc=Li(Te),fc=Li(Ie),lc=Li(Ce);function hc(t){return go(t)?Pe($o(t)):function(t){return function(e){return wn(e,t)}}(t)}var dc=Pi(),pc=Pi(!0);function vc(){return[]}function mc(){return!1}var bc,gc=Mi((function(t,e){return t+e}),0),yc=Bi("ceil"),kc=Mi((function(t,e){return t/e}),1),wc=Bi("floor"),xc=Mi((function(t,e){return t*e}),1),jc=Bi("round"),zc=Mi((function(t,e){return t-e}),0);return $r.after=function(t,e){if("function"!=typeof e)throw new Ot(n);return t=pu(t),function(){if(--t<1)return e.apply(this,arguments)}},$r.ary=Oa,$r.assign=yu,$r.assignIn=ku,$r.assignInWith=wu,$r.assignWith=xu,$r.at=ju,$r.before=Sa,$r.bind=Aa,$r.bindAll=Qu,$r.bindKey=Ta,$r.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Va(t)?t:[t]},$r.chain=ha,$r.chunk=function(t,e,n){e=(n?bo(t,e,n):e===r)?1:vr(pu(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,u=nt(le(i/e));o<i;)u[a++]=ti(t,o,o+=e);return u},$r.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},$r.concat=function(){var t=arguments.length;if(!t)return[];for(var e=nt(t-1),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return Fe(Va(r)?Ii(r):[r],vn(e,1))},$r.cond=function(t){var e=null==t?0:t.length,r=oo();return t=e?Te(t,(function(t){if("function"!=typeof t[1])throw new Ot(n);return[r(t[0]),t[1]]})):[],Jn((function(r){for(var n=-1;++n<e;){var i=t[n];if(xe(i[0],this,r))return xe(i[1],this,r)}}))},$r.conforms=function(t){return function(t){var e=Fu(t);return function(r){return un(r,t,e)}}(an(t,1))},$r.constant=tc,$r.countBy=va,$r.create=function(t,e){var r=qr(t);return null==e?r:en(r,e)},$r.curry=function t(e,n,i){var o=Xi(e,8,r,r,r,r,r,n=i?r:n);return o.placeholder=t.placeholder,o},$r.curryRight=function t(e,n,i){var o=Xi(e,16,r,r,r,r,r,n=i?r:n);return o.placeholder=t.placeholder,o},$r.debounce=Fa,$r.defaults=zu,$r.defaultsDeep=_u,$r.defer=Ra,$r.delay=Na,$r.difference=Lo,$r.differenceBy=Wo,$r.differenceWith=Po,$r.drop=function(t,e,n){var i=null==t?0:t.length;return i?ti(t,(e=n||e===r?1:pu(e))<0?0:e,i):[]},$r.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?ti(t,0,(e=i-(e=n||e===r?1:pu(e)))<0?0:e):[]},$r.dropRightWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!0,!0):[]},$r.dropWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!0):[]},$r.fill=function(t,e,n,i){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&bo(t,e,n)&&(n=0,i=o),function(t,e,n,i){var o=t.length;for((n=pu(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:pu(i))<0&&(i+=o),i=n>i?0:vu(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},$r.filter=function(t,e){return(Va(t)?Oe:pn)(t,oo(e,3))},$r.flatMap=function(t,e){return vn(ja(t,e),1)},$r.flatMapDeep=function(t,e){return vn(ja(t,e),s)},$r.flatMapDepth=function(t,e,n){return n=n===r?1:pu(n),vn(ja(t,e),n)},$r.flatten=Bo,$r.flattenDeep=function(t){return null!=t&&t.length?vn(t,s):[]},$r.flattenDepth=function(t,e){return null!=t&&t.length?vn(t,e=e===r?1:pu(e)):[]},$r.flip=function(t){return Xi(t,512)},$r.flow=ec,$r.flowRight=rc,$r.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},$r.functions=function(t){return null==t?[]:kn(t,Fu(t))},$r.functionsIn=function(t){return null==t?[]:kn(t,Ru(t))},$r.groupBy=ka,$r.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},$r.intersection=Jo,$r.intersectionBy=Xo,$r.intersectionWith=Yo,$r.invert=Su,$r.invertBy=Au,$r.invokeMap=wa,$r.iteratee=ic,$r.keyBy=xa,$r.keys=Fu,$r.keysIn=Ru,$r.map=ja,$r.mapKeys=function(t,e){var r={};return e=oo(e,3),gn(t,(function(t,n,i){rn(r,e(t,n,i),t)})),r},$r.mapValues=function(t,e){var r={};return e=oo(e,3),gn(t,(function(t,n,i){rn(r,n,e(t,n,i))})),r},$r.matches=function(t){return $n(an(t,1))},$r.matchesProperty=function(t,e){return qn(t,an(e,1))},$r.memoize=Ca,$r.merge=Nu,$r.mergeWith=Cu,$r.method=oc,$r.methodOf=ac,$r.mixin=uc,$r.negate=Da,$r.nthArg=function(t){return t=pu(t),Jn((function(e){return Ln(e,t)}))},$r.omit=Du,$r.omitBy=function(t,e){return $u(t,Da(oo(e)))},$r.once=function(t){return Sa(2,t)},$r.orderBy=function(t,e,n,i){return null==t?[]:(Va(e)||(e=null==e?[]:[e]),Va(n=i?r:n)||(n=null==n?[]:[n]),Wn(t,e,n))},$r.over=sc,$r.overArgs=Ea,$r.overEvery=fc,$r.overSome=lc,$r.partial=$a,$r.partialRight=qa,$r.partition=za,$r.pick=Eu,$r.pickBy=$u,$r.property=hc,$r.propertyOf=function(t){return function(e){return null==t?r:wn(t,e)}},$r.pull=Ko,$r.pullAll=Zo,$r.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Un(t,e,oo(r,2)):t},$r.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Un(t,e,r,n):t},$r.pullAt=Qo,$r.range=dc,$r.rangeRight=pc,$r.rearg=Ma,$r.reject=function(t,e){return(Va(t)?Oe:pn)(t,Da(oo(e,3)))},$r.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=oo(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return Vn(t,i),r},$r.rest=function(t,e){if("function"!=typeof t)throw new Ot(n);return Jn(t,e=e===r?e:pu(e))},$r.reverse=ta,$r.sampleSize=function(t,e,n){return e=(n?bo(t,e,n):e===r)?1:pu(e),(Va(t)?Yr:Yn)(t,e)},$r.set=function(t,e,r){return null==t?t:Gn(t,e,r)},$r.setWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Gn(t,e,n,i)},$r.shuffle=function(t){return(Va(t)?Gr:Qn)(t)},$r.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&bo(t,e,n)?(e=0,n=i):(e=null==e?0:pu(e),n=n===r?i:pu(n)),ti(t,e,n)):[]},$r.sortBy=_a,$r.sortedUniq=function(t){return t&&t.length?ii(t):[]},$r.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},$r.split=function(t,e,n){return n&&"number"!=typeof n&&bo(t,e,n)&&(e=n=r),(n=n===r?h:n>>>0)?(t=gu(t))&&("string"==typeof e||null!=e&&!ou(e))&&!(e=ai(e))&&nr(t)?gi(fr(t),0,n):t.split(e,n):[]},$r.spread=function(t,e){if("function"!=typeof t)throw new Ot(n);return e=null==e?0:vr(pu(e),0),Jn((function(r){var n=r[e],i=gi(r,0,e);return n&&Fe(i,n),xe(t,this,i)}))},$r.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},$r.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===r?1:pu(e))<0?0:e):[]},$r.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?ti(t,(e=i-(e=n||e===r?1:pu(e)))<0?0:e,i):[]},$r.takeRightWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!1,!0):[]},$r.takeWhile=function(t,e){return t&&t.length?fi(t,oo(e,3)):[]},$r.tap=function(t,e){return e(t),t},$r.throttle=function(t,e,r){var i=!0,o=!0;if("function"!=typeof t)throw new Ot(n);return tu(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Fa(t,e,{leading:i,maxWait:e,trailing:o})},$r.thru=da,$r.toArray=hu,$r.toPairs=qu,$r.toPairsIn=Mu,$r.toPath=function(t){return Va(t)?Te(t,$o):cu(t)?[t]:Ii(Eo(gu(t)))},$r.toPlainObject=bu,$r.transform=function(t,e,r){var n=Va(t),i=n||Xa(t)||su(t);if(e=oo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:tu(t)&&Ka(o)?qr(Ut(t)):{}}return(i?ze:gn)(t,(function(t,n,i){return e(r,t,n,i)})),r},$r.unary=function(t){return Oa(t,1)},$r.union=ea,$r.unionBy=ra,$r.unionWith=na,$r.uniq=function(t){return t&&t.length?ui(t):[]},$r.uniqBy=function(t,e){return t&&t.length?ui(t,oo(e,2)):[]},$r.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?ui(t,r,e):[]},$r.unset=function(t,e){return null==t||ci(t,e)},$r.unzip=ia,$r.unzipWith=oa,$r.update=function(t,e,r){return null==t?t:si(t,e,vi(r))},$r.updateWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:si(t,e,vi(n),i)},$r.values=Lu,$r.valuesIn=function(t){return null==t?[]:Ye(t,Ru(t))},$r.without=aa,$r.words=Ku,$r.wrap=function(t,e){return $a(vi(e),t)},$r.xor=ua,$r.xorBy=ca,$r.xorWith=sa,$r.zip=fa,$r.zipObject=function(t,e){return di(t||[],e||[],Zr)},$r.zipObjectDeep=function(t,e){return di(t||[],e||[],Gn)},$r.zipWith=la,$r.entries=qu,$r.entriesIn=Mu,$r.extend=ku,$r.extendWith=wu,uc($r,$r),$r.add=gc,$r.attempt=Zu,$r.camelCase=Wu,$r.capitalize=Pu,$r.ceil=yc,$r.clamp=function(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=(n=mu(n))==n?n:0),e!==r&&(e=(e=mu(e))==e?e:0),on(mu(t),e,n)},$r.clone=function(t){return an(t,4)},$r.cloneDeep=function(t){return an(t,5)},$r.cloneDeepWith=function(t,e){return an(t,5,e="function"==typeof e?e:r)},$r.cloneWith=function(t,e){return an(t,4,e="function"==typeof e?e:r)},$r.conformsTo=function(t,e){return null==e||un(t,e,Fu(e))},$r.deburr=Uu,$r.defaultTo=function(t,e){return null==t||t!=t?e:t},$r.divide=kc,$r.endsWith=function(t,e,n){t=gu(t),e=ai(e);var i=t.length,o=n=n===r?i:on(pu(n),0,i);return(n-=e.length)>=0&&t.slice(n,o)==e},$r.eq=La,$r.escape=function(t){return(t=gu(t))&&J.test(t)?t.replace(B,er):t},$r.escapeRegExp=function(t){return(t=gu(t))&&et.test(t)?t.replace(tt,"\\$&"):t},$r.every=function(t,e,n){var i=Va(t)?Ie:hn;return n&&bo(t,e,n)&&(e=r),i(t,oo(e,3))},$r.find=ma,$r.findIndex=Uo,$r.findKey=function(t,e){return Ee(t,oo(e,3),gn)},$r.findLast=ba,$r.findLastIndex=Vo,$r.findLastKey=function(t,e){return Ee(t,oo(e,3),yn)},$r.floor=wc,$r.forEach=ga,$r.forEachRight=ya,$r.forIn=function(t,e){return null==t?t:mn(t,oo(e,3),Ru)},$r.forInRight=function(t,e){return null==t?t:bn(t,oo(e,3),Ru)},$r.forOwn=function(t,e){return t&&gn(t,oo(e,3))},$r.forOwnRight=function(t,e){return t&&yn(t,oo(e,3))},$r.get=Iu,$r.gt=Wa,$r.gte=Pa,$r.has=function(t,e){return null!=t&&ho(t,e,_n)},$r.hasIn=Ou,$r.head=Ho,$r.identity=nc,$r.includes=function(t,e,r,n){t=Ha(t)?t:Lu(t),r=r&&!n?pu(r):0;var i=t.length;return r<0&&(r=vr(i+r,0)),uu(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&qe(t,e,r)>-1},$r.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=vr(n+i,0)),qe(t,e,i)},$r.inRange=function(t,e,n){return e=du(e),n===r?(n=e,e=0):n=du(n),function(t,e,r){return t>=mr(e,r)&&t<vr(e,r)}(t=mu(t),e,n)},$r.invoke=Tu,$r.isArguments=Ua,$r.isArray=Va,$r.isArrayBuffer=Ba,$r.isArrayLike=Ha,$r.isArrayLikeObject=Ja,$r.isBoolean=function(t){return!0===t||!1===t||eu(t)&&jn(t)==m},$r.isBuffer=Xa,$r.isDate=Ya,$r.isElement=function(t){return eu(t)&&1===t.nodeType&&!iu(t)},$r.isEmpty=function(t){if(null==t)return!0;if(Ha(t)&&(Va(t)||"string"==typeof t||"function"==typeof t.splice||Xa(t)||su(t)||Ua(t)))return!t.length;var e=lo(t);if(e==w||e==I)return!t.size;if(wo(t))return!Cn(t).length;for(var r in t)if(Rt.call(t,r))return!1;return!0},$r.isEqual=function(t,e){return Tn(t,e)},$r.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:r)?n(t,e):r;return i===r?Tn(t,e,r,n):!!i},$r.isError=Ga,$r.isFinite=function(t){return"number"==typeof t&&De(t)},$r.isFunction=Ka,$r.isInteger=Za,$r.isLength=Qa,$r.isMap=ru,$r.isMatch=function(t,e){return t===e||Fn(t,e,uo(e))},$r.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,Fn(t,e,uo(e),n)},$r.isNaN=function(t){return nu(t)&&t!=+t},$r.isNative=function(t){if(ko(t))throw new wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rn(t)},$r.isNil=function(t){return null==t},$r.isNull=function(t){return null===t},$r.isNumber=nu,$r.isObject=tu,$r.isObjectLike=eu,$r.isPlainObject=iu,$r.isRegExp=ou,$r.isSafeInteger=function(t){return Za(t)&&t>=-9007199254740991&&t<=f},$r.isSet=au,$r.isString=uu,$r.isSymbol=cu,$r.isTypedArray=su,$r.isUndefined=function(t){return t===r},$r.isWeakMap=function(t){return eu(t)&&lo(t)==A},$r.isWeakSet=function(t){return eu(t)&&"[object WeakSet]"==jn(t)},$r.join=function(t,e){return null==t?"":Ue.call(t,e)},$r.kebabCase=Vu,$r.last=Go,$r.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=pu(n))<0?vr(i+o,0):mr(o,i-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):$e(t,Le,o,!0)},$r.lowerCase=Bu,$r.lowerFirst=Hu,$r.lt=fu,$r.lte=lu,$r.max=function(t){return t&&t.length?dn(t,nc,zn):r},$r.maxBy=function(t,e){return t&&t.length?dn(t,oo(e,2),zn):r},$r.mean=function(t){return We(t,nc)},$r.meanBy=function(t,e){return We(t,oo(e,2))},$r.min=function(t){return t&&t.length?dn(t,nc,Dn):r},$r.minBy=function(t,e){return t&&t.length?dn(t,oo(e,2),Dn):r},$r.stubArray=vc,$r.stubFalse=mc,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=xc,$r.nth=function(t,e){return t&&t.length?Ln(t,pu(e)):r},$r.noConflict=function(){return fe._===this&&(fe._=$t),this},$r.noop=cc,$r.now=Ia,$r.pad=function(t,e,r){t=gu(t);var n=(e=pu(e))?sr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Wi(he(i),r)+t+Wi(le(i),r)},$r.padEnd=function(t,e,r){t=gu(t);var n=(e=pu(e))?sr(t):0;return e&&n<e?t+Wi(e-n,r):t},$r.padStart=function(t,e,r){t=gu(t);var n=(e=pu(e))?sr(t):0;return e&&n<e?Wi(e-n,r)+t:t},$r.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),gr(gu(t).replace(rt,""),e||0)},$r.random=function(t,e,n){if(n&&"boolean"!=typeof n&&bo(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=du(t),e===r?(e=t,t=0):e=du(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var o=yr();return mr(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Bn(t,e)},$r.reduce=function(t,e,r){var n=Va(t)?Re:Ve,i=arguments.length<3;return n(t,oo(e,4),r,i,fn)},$r.reduceRight=function(t,e,r){var n=Va(t)?Ne:Ve,i=arguments.length<3;return n(t,oo(e,4),r,i,ln)},$r.repeat=function(t,e,n){return e=(n?bo(t,e,n):e===r)?1:pu(e),Hn(gu(t),e)},$r.replace=function(){var t=arguments,e=gu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$r.result=function(t,e,n){var i=-1,o=(e=mi(e,t)).length;for(o||(o=1,t=r);++i<o;){var a=null==t?r:t[$o(e[i])];a===r&&(i=o,a=n),t=Ka(a)?a.call(t):a}return t},$r.round=jc,$r.runInContext=t,$r.sample=function(t){return(Va(t)?Xr:Xn)(t)},$r.size=function(t){if(null==t)return 0;if(Ha(t))return uu(t)?sr(t):t.length;var e=lo(t);return e==w||e==I?t.size:Cn(t).length},$r.snakeCase=Ju,$r.some=function(t,e,n){var i=Va(t)?Ce:ei;return n&&bo(t,e,n)&&(e=r),i(t,oo(e,3))},$r.sortedIndex=function(t,e){return ri(t,e)},$r.sortedIndexBy=function(t,e,r){return ni(t,e,oo(r,2))},$r.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ri(t,e);if(n<r&&La(t[n],e))return n}return-1},$r.sortedLastIndex=function(t,e){return ri(t,e,!0)},$r.sortedLastIndexBy=function(t,e,r){return ni(t,e,oo(r,2),!0)},$r.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ri(t,e,!0)-1;if(La(t[r],e))return r}return-1},$r.startCase=Xu,$r.startsWith=function(t,e,r){return t=gu(t),r=null==r?0:on(pu(r),0,t.length),e=ai(e),t.slice(r,r+e.length)==e},$r.subtract=zc,$r.sum=function(t){return t&&t.length?Be(t,nc):0},$r.sumBy=function(t,e){return t&&t.length?Be(t,oo(e,2)):0},$r.template=function(t,e,n){var i=$r.templateSettings;n&&bo(t,e,n)&&(e=r),t=gu(t),e=wu({},e,i,Yi);var o,a,u=wu({},e.imports,i.imports,Yi),c=Fu(u),s=Ye(u,c),f=0,l=e.interpolate||gt,h="__p += '",d=_t((e.escape||gt).source+"|"+l.source+"|"+(l===G?ft:gt).source+"|"+(e.evaluate||gt).source+"|$","g"),p="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,(function(e,r,n,i,u,c){return n||(n=i),h+=t.slice(f,c).replace(yt,rr),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),u&&(a=!0,h+="';\n"+u+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=c+e.length,e})),h+="';\n";var v=Rt.call(e,"variable")&&e.variable;if(v){if(ct.test(v))throw new wt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(W,""):h).replace(P,"$1").replace(U,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Zu((function(){return xt(c,p+"return "+h).apply(r,s)}));if(m.source=h,Ga(m))throw m;return m},$r.times=function(t,e){if((t=pu(t))<1||t>f)return[];var r=h,n=mr(t,h);e=oo(e),t-=h;for(var i=He(n,e);++r<t;)e(r);return i},$r.toFinite=du,$r.toInteger=pu,$r.toLength=vu,$r.toLower=function(t){return gu(t).toLowerCase()},$r.toNumber=mu,$r.toSafeInteger=function(t){return t?on(pu(t),-9007199254740991,f):0===t?t:0},$r.toString=gu,$r.toUpper=function(t){return gu(t).toUpperCase()},$r.trim=function(t,e,n){if((t=gu(t))&&(n||e===r))return Je(t);if(!t||!(e=ai(e)))return t;var i=fr(t),o=fr(e);return gi(i,Ke(i,o),Ze(i,o)+1).join("")},$r.trimEnd=function(t,e,n){if((t=gu(t))&&(n||e===r))return t.slice(0,lr(t)+1);if(!t||!(e=ai(e)))return t;var i=fr(t);return gi(i,0,Ze(i,fr(e))+1).join("")},$r.trimStart=function(t,e,n){if((t=gu(t))&&(n||e===r))return t.replace(rt,"");if(!t||!(e=ai(e)))return t;var i=fr(t);return gi(i,Ke(i,fr(e))).join("")},$r.truncate=function(t,e){var n=30,i="...";if(tu(e)){var o="separator"in e?e.separator:o;n="length"in e?pu(e.length):n,i="omission"in e?ai(e.omission):i}var a=(t=gu(t)).length;if(nr(t)){var u=fr(t);a=u.length}if(n>=a)return t;var c=n-sr(i);if(c<1)return i;var s=u?gi(u,0,c).join(""):t.slice(0,c);if(o===r)return s+i;if(u&&(c+=s.length-c),ou(o)){if(t.slice(c).search(o)){var f,l=s;for(o.global||(o=_t(o.source,gu(lt.exec(o))+"g")),o.lastIndex=0;f=o.exec(l);)var h=f.index;s=s.slice(0,h===r?c:h)}}else if(t.indexOf(ai(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+i},$r.unescape=function(t){return(t=gu(t))&&H.test(t)?t.replace(V,hr):t},$r.uniqueId=function(t){var e=++Nt;return gu(t)+e},$r.upperCase=Yu,$r.upperFirst=Gu,$r.each=ga,$r.eachRight=ya,$r.first=Ho,uc($r,(bc={},gn($r,(function(t,e){Rt.call($r.prototype,e)||(bc[e]=t)})),bc),{chain:!1}),$r.VERSION="4.17.21",ze(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$r[t].placeholder=$r})),ze(["drop","take"],(function(t,e){Wr.prototype[t]=function(n){n=n===r?1:vr(pu(n),0);var i=this.__filtered__&&!e?new Wr(this):this.clone();return i.__filtered__?i.__takeCount__=mr(n,i.__takeCount__):i.__views__.push({size:mr(n,h),type:t+(i.__dir__<0?"Right":"")}),i},Wr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ze(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Wr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),ze(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Wr.prototype[t]=function(){return this[r](1).value()[0]}})),ze(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Wr.prototype[t]=function(){return this.__filtered__?new Wr(this):this[r](1)}})),Wr.prototype.compact=function(){return this.filter(nc)},Wr.prototype.find=function(t){return this.filter(t).head()},Wr.prototype.findLast=function(t){return this.reverse().find(t)},Wr.prototype.invokeMap=Jn((function(t,e){return"function"==typeof t?new Wr(this):this.map((function(r){return Sn(r,t,e)}))})),Wr.prototype.reject=function(t){return this.filter(Da(oo(t)))},Wr.prototype.slice=function(t,e){t=pu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Wr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=pu(e))<0?n.dropRight(-e):n.take(e-t)),n)},Wr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Wr.prototype.toArray=function(){return this.take(h)},gn(Wr.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=$r[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&($r.prototype[e]=function(){var e=this.__wrapped__,u=i?[1]:arguments,c=e instanceof Wr,s=u[0],f=c||Va(e),l=function(t){var e=o.apply($r,Fe([t],u));return i&&h?e[0]:e};f&&n&&"function"==typeof s&&1!=s.length&&(c=f=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=c&&!d;if(!a&&f){e=v?e:new Wr(this);var m=t.apply(e,u);return m.__actions__.push({func:da,args:[l],thisArg:r}),new Lr(m,h)}return p&&v?t.apply(this,u):(m=this.thru(l),p?i?m.value()[0]:m.value():m)})})),ze(["pop","push","shift","sort","splice","unshift"],(function(t){var e=St[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);$r.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Va(i)?i:[],t)}return this[r]((function(r){return e.apply(Va(r)?r:[],t)}))}})),gn(Wr.prototype,(function(t,e){var r=$r[e];if(r){var n=r.name+"";Rt.call(Sr,n)||(Sr[n]=[]),Sr[n].push({name:e,func:r})}})),Sr[$i(r,2).name]=[{name:"wrapper",func:r}],Wr.prototype.clone=function(){var t=new Wr(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},Wr.prototype.reverse=function(){if(this.__filtered__){var t=new Wr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Wr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Va(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=mr(e,t+a);break;case"takeRight":t=vr(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,c=u-a,s=n?u:a-1,f=this.__iteratees__,l=f.length,h=0,d=mr(c,this.__takeCount__);if(!r||!n&&i==c&&d==c)return li(t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var v=-1,m=t[s+=e];++v<l;){var b=f[v],g=b.type,y=(0,b.iteratee)(m);if(2==g)m=y;else if(!y){if(1==g)continue t;break t}}p[h++]=m}return p},$r.prototype.at=pa,$r.prototype.chain=function(){return ha(this)},$r.prototype.commit=function(){return new Lr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===r&&(this.__values__=hu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},$r.prototype.plant=function(t){for(var e,n=this;n instanceof Mr;){var i=Mo(n);i.__index__=0,i.__values__=r,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e},$r.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wr){var e=t;return this.__actions__.length&&(e=new Wr(this)),(e=e.reverse()).__actions__.push({func:da,args:[ta],thisArg:r}),new Lr(e,this.__chain__)}return this.thru(ta)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,Xt&&($r.prototype[Xt]=function(){return this}),$r}();he?((he.exports=dr)._=dr,le._=dr):fe._=dr}).call(i)}));function y(t){let e="",r=!0;var n;return"string"==typeof t.source&&["data","webservice","file"].indexOf(t.source)>-1?("webservice"!=t.source||"webservice"==t.source&&t.url&&"string"==typeof t.url||(r=!1,e="options.url value '"+t.url+"' doesn't meet interface IConf requirements, is wrongly formated or doesn't match option.source value"),"webservice"!=t.source&&!t.token||"webservice"==t.source&&t.token&&("string"==typeof t.token||"function"==typeof t.token)||(r=!1,e="options.token value doesn't meet interface IConf requirements or doesn't match option.source value :: typeof object.token == "+typeof t.token),"webservice"!=t.source&&!t.options||"webservice"==t.source&&t.options&&"object"==typeof t.options||(r=!1,e="options.options value doesn't meet interface IConf requirements or doesn't match option.source value"),"data"!=t.source&&!t.data||"data"==t.source&&t.data&&("object"==typeof t.data||"string"==typeof t.data)||(r=!1,e="options.data value doesn't meet interface IConf requirements or doesn't match option.source value"),"file"!=t.source||"file"==t.source&&t.url&&"string"==typeof t.url||(r=!1,e="options.url value '"+t.url+"' doesn't meet interface IConf requirements or doesn't match option.source value")):(r=!1,e="options.source value '"+t.source+"' doesn't meet interface IConf requirements"),"string"==typeof t.origin&&["thesaurus","position","classification"].indexOf(t.origin)>-1||(r=!1,e="options.origin value '"+t.origin+"' doesn't meet interface IConf requirements"),!t.output&&"boolean"!=typeof t.output||"string"==typeof t.output&&["fullpath","nodeid"].indexOf(t.output)>-1||(r=!1,e="options.output value '"+t.output+"' doesn't meet interface IConf requirements"),!t.multiple&&"boolean"!=typeof t.multiple||"boolean"==typeof t.multiple||(r=!1,e="options.multiple value '"+t.multiple+"' doesn't meet interface IConf requirements"),!t.mode&&"boolean"!=typeof t.mode||"string"==typeof t.mode&&["tree","input"].indexOf(t.mode)>-1||(e="options.mode value '"+t.mode+"' doesn't meet interface IConf requirements"),!t.label&&"boolean"!=typeof t.label||"string"==typeof t.label||"object"==typeof t.label||(r=!1,e="options.label value '"+t.label+"' doesn't meet interface IConf requirements"),!t.searchPlaceholder&&"boolean"!=typeof t.searchPlaceholder||"string"==typeof t.searchPlaceholder||"object"==typeof t.searchPlaceholder||(r=!1,e="options.searchPlaceholder value '"+t.searchPlaceholder+"' doesn't meet interface IConf requirements"),!t.defaultValue&&"boolean"!=typeof t.defaultValue||"object"==typeof t.defaultValue&&(1==t.multiple||t.defaultValue.length<=1)||"string"==typeof t.defaultValue||"number"==typeof t.defaultValue||(r=!1,e="options.defaultValue value '"+t.defaultValue+"' doesn't meet interface IConf requirements or doesn't match option.multiple value"),!t.readonly&&"boolean"!=typeof t.readonly||"boolean"==typeof t.readonly||(r=!1,e="readonly value '"+t.readonly+"' doesn't meet interface IConf requirements"),!t.loading&&"boolean"!=typeof t.loading||"string"==typeof t.loading&&["display","click"].indexOf(t.loading)>-1||(r=!1,e="options.loading value '"+t.loading+"' doesn't meet interface IConf requirements"),!t.displayTree&&"boolean"!=typeof t.displayTree||"boolean"==typeof t.displayTree||(r=!1,e="options.displayTree value '"+t.displayTree+"' doesn't meet interface IConf requirements"),((t.minDepth||"number"==typeof t.minDepth)&&"number"!=typeof t.minDepth||t.maxDepth&&t.maxDepth<t.minDepth)&&(r=!1,e="options.minDepth value '"+t.minDepth+"' doesn't meet interface IConf requirements or mismatches with maxDepth value"),((t.maxDepth||"number"==typeof t.maxDepth)&&"number"!=typeof t.maxDepth||t.minDepth&&t.minDepth>t.maxDepth)&&(r=!1,e="options.maxDepth value '"+t.maxDepth+"' doesn't meet interface IConf requirements or mismatches with minDepth value"),!t.isFullpath&&"boolean"!=typeof t.isFullpath||"boolean"==typeof t.isFullpath||(r=!1,e="options.isFullpath value '"+t.isFullpath+"' doesn't meet interface IConf requirements"),!t.defaultValueIsFullpath&&"boolean"!=typeof t.defaultValueIsFullpath||"boolean"==typeof t.defaultValueIsFullpath||(r=!1,e="options.defaultValueIsFullpath value '"+t.defaultValueIsFullpath+"' doesn't meet interface IConf requirements"),!t.showAutocomplete&&"boolean"!=typeof t.showAutocomplete||"boolean"==typeof t.showAutocomplete||(r=!1,e="options.showAutocomplete value '"+t.showAutocomplete+"' doesn't meet interface IConf requirements"),!t.openTreeWhenLoaded&&"boolean"!=typeof t.openTreeWhenLoaded||"boolean"==typeof t.openTreeWhenLoaded||(r=!1,e="options.openTreeWhenLoaded value '"+t.openTreeWhenLoaded+"' doesn't meet interface IConf requirements"),!t.displayRootNode&&"boolean"!=typeof t.displayRootNode||"boolean"==typeof t.displayRootNode||(r=!1,e="options.displayRootNode value '"+t.displayRootNode+"' doesn't meet interface IConf requirements"),!t.dragAndDropEnabled&&"boolean"!=typeof t.dragAndDropEnabled||"boolean"==typeof t.dragAndDropEnabled||(r=!1,e="options.dragAndDropEnabled value '"+t.dragAndDropEnabled+"' doesn't meet interface IConf requirements"),!t.contextMenu&&"object"!=typeof t.contextMenu||"object"==typeof t.contextMenu||(r=!1,e="options.contextMenu value doesn't meet interface IConf requirements"),!t.searchResultPresentsUnMatched&&"boolean"!=typeof t.searchResultPresentsUnMatched||"boolean"==typeof t.searchResultPresentsUnMatched||(r=!1,e="options.searchResultPresentsUnMatched value '"+t.searchResultPresentsUnMatched+"' doesn't meet interface IConf requirements"),!t.theme&&"object"!=typeof t.theme||"object"==typeof t.theme||(r=!1,e="options.theme value doesn't meet interface IConf requirements"),!t.language&&"string"!=typeof t.language||"string"==typeof t.language&&("fr"===(n=t.language)||"en"===n)||(r=!1,e="options.language value '"+t.language+"' doesn't meet interface IConf requirements ('fr' or 'en')"),{toret:r,errorToLog:e}}function k(t){return!isNaN(parseFloat(t))&&isFinite(t)}function w(t,e){return"object"==typeof e&&null!==e&&e instanceof XMLHttpRequest?"[XMLHttpRequest object]":e}function x(t,e,r){let n=!1;return t.text.toLowerCase().indexOf(r.toLowerCase())>-1?n=!0:!e&&t.children.length>0&&0!=Object.keys(t.children[0]).length&&t.children.forEach((t=>{x(t,e,r)&&(n=!0)})),n}function j(t,e,r){if(t)switch(typeof t){case"string":return t;case"object":if(e)return t.filter((t=>t.language==e))[0].value;{const e=t.filter((t=>t.language==r));if(e[0])return e[0].value;console.error("Missing language value in component configuration! It happened when requesting item text.")}}return""}const z={palette:{primary:{main:"#888",light:"#888",contrastText:"#000"},background:{default:"#ccc",light:"#eee",main:"#000",dark:"#fff"},text:{primary:"#000"}},typography:{body:{fontSize:"14px",fontWeight:"400"}}};class _{getToken(){var t;if("string"==typeof this.token)return this.token.length>200?this.token:null!==(t=window.localStorage.getItem(this.token))&&void 0!==t?t:null;if("function"==typeof this.token){const t=this.token();return"string"==typeof t?t:null}return null}constructor(t,e){this.rawData=null,this.token=t,this.optionsManager=e,this.baseUrl=e.getOptions().url}async makeRequest(t,e,r,n){n&&n.classList.add("loading");const i=this.getToken();if(!i)throw new Error("No token available.");return new Promise(((o,a)=>{const u=new XMLHttpRequest;u.open(t,`${e}`,!0),u.setRequestHeader("Authorization",`Bearer ${i}`),"POST"===t&&u.setRequestHeader("Content-Type","application/json;charset=UTF-8"),u.onload=()=>{n&&n.classList.remove("loading"),u.status>=200&&u.status<300?o(JSON.parse(u.responseText)):a(new Error(`HTTP ${u.status}: ${u.statusText}`))},u.onerror=()=>{n&&n.classList.remove("loading"),a(new Error("Network error"))},u.send(r?JSON.stringify(r):null)}))}async getFromClassification(t,e,r){let n="";const i=[];for(const t in e){if(!e.hasOwnProperty(t))continue;const r=e[t];"startnode"!==t.toLowerCase()||n?i.push(`${encodeURIComponent(t)}=${encodeURIComponent(r)}`):n=encodeURIComponent(r)}const o=i.length>0?`?${i.join("&")}`:"",a=n?`${t}/${n}/${o}`:`${t}/${o}`;return await this.makeRequest("GET",a,null,r)}async getFromSource(t,e,r){return this.makeRequest("POST",t,e,r)}async loadDataFromFile(t){return this.makeRequest("GET",t,null)}async fetchNodeIdFromFullpath(t,e){let r;switch(e.origin){case"thesaurus":r={iStartNode:this.optionsManager.getOptions().options.StartNodeID,sValue:t,sTypeField:"fullpath"};break;case"position":r={value:t,startNodeId:this.optionsManager.getOptions().options.StartNodeID};break;default:throw new Error(`Invalid origin: ${e.origin}, only 'thesaurus' and 'position' implemented for now...`)}const n=this.getApiNodeFromFullpathURL(e);let i=0;return await this.makeRequest("POST",n,r).then((t=>{t.exist&&("thesaurus"===e.origin&&(i=t.topic.TTop_PK_ID),"position"===e.origin&&(i=t.position.ID),"classification"===e.origin&&(i=t.node.ID))})),i}getApiNodeFromFullpathURL(t){const e=this.baseUrl.substring(0,this.baseUrl.lastIndexOf("/"));switch(t.origin){case"thesaurus":return`${e}/existBy`;case"position":return`${e}/PositionExistByFp`;case"classification":return`${e}/exists`;default:throw new Error(`Invalid origin: ${t.origin}`)}}loadData(t){this.rawData=t}getData(){return this.rawData}mergeData(t,e){this.rawData=this.rawData?this.genericMerge(this.rawData,t,e,"children"):t}reorderItems(t,e,r){const n=new Map(e.map((t=>[t[r],t])));return t.map((t=>n.get(t[r]))).filter(Boolean)}genericMerge(t,e,r,n){var i,o;return t?e&&(null===(i=e[n])||void 0===i?void 0:i.length)?(t[n]&&t[n].length>0&&e[n]&&e[n].length>0&&(e[n]=this.reorderItems(t[n],e[n],r)),t[n]=(null===(o=t[n])||void 0===o?void 0:o.length)?t[n].map(((t,i)=>this.genericMerge(t,e[n].filter((e=>e.key==t.key))[i],r,n))):e[n],t):t:e}searchAndMergeData(t,e){return this.genericMerge(t,e,"key","children")}searchAndMergeDataClassification(t,e){return this.genericMerge(t,e,"ID","children")}}class I{constructor(t){this.options=this.initializeOptions(t)}initializeOptions(t){const e=Object.assign(Object.assign({},{multiple:!1,mode:"input",loading:"display",showAutocomplete:!1,openTreeWhenLoaded:!1,displayRootNode:!1,dragAndDropEnabled:!1,errorsInInput:!0,isFullpath:!0,defaultValue:[]}),t);return"object"!=typeof e.defaultValue&&(e.defaultValue=[e.defaultValue]),e}get data(){return"object"==typeof this.getOptions().data?this.options.data:JSON.parse(this.options.data)}getOptions(){return this.options}updateOptions(t){this.options=Object.assign(Object.assign({},this.options),t)}validateNewOptions(t){return this.initializeOptions(Object.assign(Object.assign({},this.options),t))}updateDefaultValue(){null!=this.options.defaultValue&&0===this.options.defaultValue.length&&delete this.options.defaultValue}dropReach(){this.options.options&&this.options.options.Reach&&delete this.options.options.Reach}}function O(t,e,r=!0){return e=e.trim(),t&&e?t[e]||0===t[e]?t[e]:t.data&&(t.data[e]||0===t.data[e])?t.data[e]:(r&&console.error(`Property '${e}' not found in node:`,t),null):""}function S(t,e,r,n,i=0){const o=n.searchResultPresentsUnMatched;return e&&e.length&&e.forEach((e=>{var a,u,c,s;let f=null,l=null,h=null,d=null;"classification"==n.origin?(f=O(e,"ID"),l=null===(a=O(e,"Translations")[n.language])||void 0===a?void 0:a.translated_name,h=null===(u=O(e,"Properties"))||void 0===u?void 0:u.System_Fullpath,d=null===(c=O(e,"Translations")[n.language])||void 0===c?void 0:c.translated_fullpath,h||(h=null===(s=O(e,"Properties"))||void 0===s?void 0:s.System_FullPath),d||(d=O(e,"fullpathTranslated"))):(f=O(e,"key"),l=O(e,"valueTranslated"),h=O(e,"fullpath"),d=O(e,"fullpathTranslated"));const p=O(e,"children",!1);let v=O(e,"deprecated",null);null===v&&(v=O(e,"Is_Deprecated",!1));const m={id:f,nodeId:f,depth:i,text:l,fullpath:h,fullpathTranslated:d,children:O(e,"hasChildren",!1)&&p&&0===p.length?[{}]:[],deprecated:v,isDesaturated:!1,searchMatch:!1},b=S(m.children,p,r,n,i+1);let g=!1;if(r){const t=x(m,!1,r);m.isDesaturated=!t,m.searchMatch=x(m,!0,r),g=t||o}else g=!0;g&&(m.children=b,t.push(m))})),t}function A(t,e,r){var n;const i=e.key||e.id||e.ID,o=t.nodesById[i]||null;if(o){o.children=[];let a=null===(n=t.liElementsById[i])||void 0===n?void 0:n.querySelector("ul");a||(a=t.createUlEle(),t.liElementsById[i].appendChild(a));const u=S([],e.children,null,r);a.innerHTML="",u.forEach((e=>{const r=t.createLiEle(e,!0);a.appendChild(r),o.children.push(e),t.nodesById[e.id]=e,t.liElementsById[e.id]=r}))}}function T(t,e,r,n,i){var o;if(t&&r.getOptions().showAutocomplete){let r=(null===(o=t.children)||void 0===o?void 0:o.filter((t=>{var r;return null===(r=t.text)||void 0===r?void 0:r.toLowerCase().includes(e.toLowerCase())})))||[];r=r.sort(((t,e)=>t.text.localeCompare(e.text)));const a=document.getElementById("autocomplete-results-area");a.innerHTML="",e.length>0&&(r.forEach((t=>{const e=document.createElement("li");e.title=t.text,e.textContent=t.text,e.setAttribute("nodeid",t.id),e.addEventListener("click",(()=>{n(t.id),i("hide")})),a.appendChild(e)})),function(){const t=document.getElementById("autocomplete-results-area");t&&(t.style.display="block")}())}}function F(t,e){return null!==e&&t.el.contains(e)}async function R(t){const e=t.el.querySelector("search-input input");e&&document.activeElement!==e&&await e.focus()}async function N(){var t;const e=Array.from(document.querySelectorAll("input, button, textarea, select, [tabindex]")).filter((t=>t.tabIndex>=0)),r=e.indexOf(document.activeElement),n=null!==(t=e[r+1])&&void 0!==t?t:e[0];n&&n.focus()}function C(t,e){"search"===e?(R(t),t.showTree("search")):"modale"===e?t.showTree("modale"):"hide"===e&&t.showTree("hide")}function D(t){"fieldError"===t.pickerClass?t.showTree("hide"):t.shownTree?t.showTree("modale"):t.mylog("Ignored modal click")}const E=class{getValue(){var t,e,r,n;return this.optionsManager.getOptions().output?this.optionsManager.getOptions().multiple?Promise.resolve(null===(e=this.value)||void 0===e?void 0:e.map((t=>t[this.optionsManager.getOptions().output]))):Promise.resolve(null===(n=null===(r=this.value)||void 0===r?void 0:r[0])||void 0===n?void 0:n[this.optionsManager.getOptions().output]):this.optionsManager.getOptions().multiple?Promise.resolve(this.value):Promise.resolve(null===(t=this.value)||void 0===t?void 0:t[0])}async refreshPicker(t=!1){t&&this.optionsManager.updateOptions({defaultValue:[]}),this.setNewOption(this.optionsManager.getOptions())}async setOptions(t){this.setNewOption(t)}getOptionsAsIConf(t){return"string"==typeof t?JSON.parse(t):t}setSearchResults(t){let e=0;const r=[...t];for(;r.length>0;){const t=r.shift();e+=t.searchMatch?1:0,t.children&&r.push(...t.children)}this.lastSearchMatchCounter=e,this.searchResultData=t}getSearchResultWithCounter(t){return{data:t,matches:this.lastSearchMatchCounter}}searchResultDataChange(t,e){t&&t!=e&&t.length>0&&this.searchResult.emit(this.getSearchResultWithCounter(t))}getSearchResult(){return Promise.resolve(this.getSearchResultWithCounter(this.searchResultData))}logError(t){try{console.error("--- Hierarchized picker "+this.componentID+" ERROR ---",t)}catch(t){console.error("--- Hierarchized picker generic ERROR ---")}}get theOptions(){return this.optionsManager.getOptions()}async setNewOption(t,e=null){if(this.ready=!1,e&&JSON.stringify(t.options)==JSON.stringify(e.options))return void(this.ready=!0);"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e)),this.optionsManager.updateOptions(t),this.setDisplayedValue(this.value);const r=!e||t.origin!=e.origin||t.options.StartNodeID!=e.options.StartNodeID;"file"!=this.optionsManager.getOptions().source&&(!e||e&&r)&&(this.rawData=null),this.ready=!1;const n=y(this.optionsManager.getOptions());this.canload=n.toret,this.errorToLog=n.errorToLog,this.canload?(e&&JSON.stringify(t.options)!=JSON.stringify(e.options)&&(this.value=[]),"display"==(null==t?void 0:t.loading)&&(e&&this.isChangeInOptions(t,e)||!e?(this.rawDataManager=new _(this.getOptionsAsIConf(this.optionsManager.getOptions()).token,this.optionsManager),await this.loadHierarchizedPicker(!0),this.displayWhenLoaded()):this.ready=!0)):this.displayPickerError("Error(s) in the picker configuration!")}setNewOptions(t){"string"==typeof t&&(t=JSON.parse(t)),this.setOptions(t)}setNewFilter(t){this.filterTree(t)}optionsChange(t,e){this.optionsManager&&this.optionsManager.getOptions()&&this.ready&&!this.ignoreOptionsChanges&&("string"==typeof t&&(t=JSON.parse(t)),this.setNewOption(t,e))}isChangeInOptions(t,e){const r=g.isEqual(t,e);if(!t.defaultValue&&!e.defaultValue)return;const n=Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue],i=Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue],o=n.length!==i.length||!n.every((t=>i.includes(t)));return!r&&o?o:!r}rawDataWatcher(t){this.ready||(this.rawDataManager.loadData(t),this.translateDataForTree(t),this.optionsManager.getOptions().openTreeWhenLoaded&&(this.showTree("modale"),setTimeout((()=>R(this)),100)))}async filterTree(t){this.search(t)}constructor(r){t(this,r),this.valueChange=e(this,"valueChange",7),this.itemDropped=e(this,"itemDropped",7),this.itemContextMenuItemClick=e(this,"itemContextMenuItemClick",7),this.searchResult=e(this,"searchResult",7),this.canload=!0,this.ready=!1,this.searchToDisplay=0,this.ignoreOptionsChanges=!0,this.lastSearchMatchCounter=0,this.setValueOnClick=!0,this.mylog=console.log,this.getShortenedFullpath=t=>{var e,r,n,i;let o=t;try{const a="classification"==this.optionsManager.getOptions().origin?"startNode":"StartNodeID",u=this.optionsManager.getOptions().options[a];if(u in["0",0])return o;if(k(u))if("classification"==this.optionsManager.getOptions().origin){const{Translations:a,Properties:u}=this.rawDataManager.getData(),c=this.optionsManager.getOptions().language;o=(null!==(r=null===(e=a[c])||void 0===e?void 0:e.translated_name)&&void 0!==r?r:null==u?void 0:u.System_Name)+t.replace(null!==(i=null===(n=a[c])||void 0===n?void 0:n.translated_fullpath)&&void 0!==i?i:null==u?void 0:u.System_Fullpath,"")}else{const{fullpath:e,fullpathTranslated:r,title:n,valueTranslated:i}=this.rawDataManager.getData();o=(null!=i?i:n)+t.replace(null!=r?r:e,"")}else this.errorToLog="Error in getFullpath : startnode is not number"}catch(t){this.errorToLog="Error in getFullpath "+t.toString()}return o},this.options=void 0,this.valueChangeCallback=void 0,this.disabled=void 0,this.isDisabled=void 0,this.newoptions=void 0,this.newfilter=void 0,this.componentID=void 0,this.rawData=void 0,this.pickerClass="",this.displayedValue=void 0,this.value=[],this.shownTree=!1,this.searchResultData=[],this.activatedDragAndDrop=!0,this.hasFocus=void 0,this.errorToLog="",this.checkFields=this.checkFields.bind(this),this.setNodeAsSelected=this.setNodeAsSelected.bind(this),this.displayTree=this.displayTree.bind(this)}async componentWillLoad(){this.isDisabled=this.disabled,this.options=this.getOptionsAsIConf(this.options),this.optionsManager=new I(this.getOptionsAsIConf(this.options)),this.rawDataManager=new _(this.getOptionsAsIConf(this.options).token,this.optionsManager),await this.loadHierarchizedPicker(),this.setDisplayedValueFromDefault(),setTimeout((()=>{this.displayWhenLoaded()}),0)}setDisplayedValueFromDefault(){var t;const e=null!==(t=this.optionsManager.getOptions().defaultValue)&&void 0!==t?t:[];this.value=e.map((t=>({nodeid:t,shortpathTranslated:`Node ${t}`}))),this.setDisplayedValue(this.value)}componentWillRender(){this.mylog("----- componentWillRender beginning -----")}componentDidRender(){this.mylog("----- componentDidRender beginning -----")}componentDidLoad(){this.mylog("----- componentDidLoad beginning -----"),function(t){const e=t.el.querySelector(".hierarchized-picker-tree-area");if(!e)return;let r=0;const n=Array.from(e.querySelectorAll(".treejs-node"));function i(t){n.forEach((t=>t.classList.remove("treejs-node__checked")));const e=n[t];e&&(e.classList.add("treejs-node__checked"),e.scrollIntoView({block:"nearest"}))}t.el.addEventListener("keydown",(e=>{var o,a,u;if(e.stopPropagation(),t.loadedTreeJs&&n.length)switch(e.key){case"Tab":e.preventDefault(),t.showTree("hide"),setTimeout((()=>N()),10);break;case"ArrowUp":e.preventDefault(),r=Math.max(r-1,0),i(r);break;case"ArrowDown":e.preventDefault(),r=Math.min(r+1,n.length-1),i(r);break;case"ArrowLeft":e.preventDefault();const c=null===(o=n[r])||void 0===o?void 0:o.querySelector(".treejs-switcher");c&&(null===(a=t.loadedTreeJs)||void 0===a||a.onSwitcherClick(c),t.showTree("hide"));break;case"ArrowRight":e.preventDefault();const s=n[r],f=null==s?void 0:s.querySelector(".treejs-switcher");f&&(null===(u=t.loadedTreeJs)||void 0===u||u.onSwitcherClick(f));break;case"0":e.preventDefault();const l=n[r];(null==l?void 0:l.nodeId)&&(t.setNodeAsSelected(l.nodeId,t.loadedTreeJs,!0),t.showTree("hide"),setTimeout((()=>N()),10))}})),i(r)}(this),N()}displayWhenLoaded(){var t;this.canload?"display"==(null===(t=this.optionsManager.getOptions())||void 0===t?void 0:t.loading)&&this.loadDataForTree(!0,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")):this.displayPickerError("Error(s) in the picker configuration!")}async initComponent(){this.optionsManager.getOptions().multiple||this.optionsManager.updateOptions({multiple:!1}),this.optionsManager.getOptions().mode||(this.optionsManager.getOptions().mode="input"),this.optionsManager.getOptions().defaultValue?"object"!=typeof this.optionsManager.getOptions().defaultValue&&this.optionsManager.updateOptions({defaultValue:[this.optionsManager.getOptions().defaultValue]}):this.optionsManager.updateOptions({defaultValue:[]});let t,e=!0;this.isDisabled||(this.isDisabled=!1),void 0!==this.optionsManager.getOptions().readonly&&(this.isDisabled=this.optionsManager.getOptions().readonly),this.optionsManager.getOptions().loading||this.optionsManager.updateOptions({loading:"display"}),this.optionsManager.getOptions().displayTree||0==this.optionsManager.getOptions().displayTree||this.optionsManager.updateOptions({displayTree:!0}),this.optionsManager.getOptions().isFullpath||0==this.optionsManager.getOptions().isFullpath||this.optionsManager.updateOptions({isFullpath:!0}),this.optionsManager.getOptions().showAutocomplete||(this.optionsManager.getOptions().showAutocomplete=!1),this.optionsManager.getOptions().openTreeWhenLoaded||(this.optionsManager.getOptions().openTreeWhenLoaded=!1),this.optionsManager.getOptions().displayRootNode||(this.optionsManager.getOptions().displayRootNode=!1),this.optionsManager.getOptions().dragAndDropEnabled||(this.optionsManager.getOptions().dragAndDropEnabled=!1),this.optionsManager.getOptions().defaultValueIsFullpath||(this.optionsManager.getOptions().defaultValueIsFullpath=!1),this.optionsManager.getOptions()||!1===this.optionsManager.getOptions().errorsInInput||this.optionsManager.updateOptions({errorsInInput:!0}),this.hasFocus||(this.hasFocus=[]);try{this.optionsManager.getOptions().defaultValue.map((()=>{}))}catch(t){return void(this.errorToLog="There's an issue with your defaultValue format: "+this.optionsManager.getOptions().defaultValue.toString())}await Promise.all(this.optionsManager.getOptions().defaultValue.map((async r=>{if(this.optionsManager.getOptions().defaultValueIsFullpath||"number"!=typeof r&&("string"!=typeof(n=r)||!k(n))){if("webservice"!==this.optionsManager.getOptions().source){let t="The loading of nodes based on fullpath is only available on webservice mode for now!";return this.displayPickerError(t),this.errorToLog=t,void(e=!1)}{t||(t=[]);const e=await this.rawDataManager.fetchNodeIdFromFullpath(r,this.optionsManager.getOptions()).catch((t=>{this.displayPickerError(t)}));e&&t.push(e)}}var n}))),t&&(this.optionsManager.getOptions().defaultValue=t),this.optionsManager.getOptions().options&&!this.optionsManager.getOptions().options.Reach&&this.optionsManager.getOptions().defaultValue.length>0&&(e?this.optionsManager.getOptions().options.Reach=this.optionsManager.getOptions().defaultValue.map((t=>Number(t))):this.errorToLog="theOptions.options.Reach is undefined and can't be auto-assigned: either specify a 'Reach' option in your webservice call options or make sure the defaultValue property contains node IDs and not fullpath values.")}async loadHierarchizedPicker(t=!1){if(t||this.el.getAttribute("options")&&"string"==typeof this.el.getAttribute("options")&&this.optionsManager.updateOptions(JSON.parse(this.el.getAttribute("options"))),this.mylog=function(){},console.time=function(){},console.timeEnd=function(){},this.optionsManager.getOptions().id?this.componentID=this.optionsManager.getOptions().id:this.componentID||(this.componentID=(Array.from(document.querySelectorAll("reneco-hierarchized-picker")).indexOf(this.el)+1).toString()),!this.optionsManager.getOptions())return;this.optionsManager.updateDefaultValue();const e=y(this.optionsManager.getOptions());this.canload=e.toret,this.errorToLog=e.errorToLog,await this.initComponent(),function(t,e){const r=document.documentElement.style;r.setProperty("--hpicker-theme-palette-primary-main",(null==t?void 0:t.palette.primary.main)||e.palette.primary.main),r.setProperty("--hpicker-theme-palette-primary-light",(null==t?void 0:t.palette.primary.light)||e.palette.primary.light),r.setProperty("--hpicker-theme-palette-primary-contrastText",(null==t?void 0:t.palette.primary.contrastText)||e.palette.primary.contrastText),r.setProperty("--hpicker-theme-palette-background-default",(null==t?void 0:t.palette.background.default)||e.palette.background.default),r.setProperty("--hpicker-theme-palette-background-light",(null==t?void 0:t.palette.background.light)||e.palette.background.light),r.setProperty("--hpicker-theme-palette-background-dark",(null==t?void 0:t.palette.background.dark)||e.palette.background.dark),r.setProperty("--hpicker-theme-typography-body-font-size",(null==t?void 0:t.typography.body.fontSize)||e.typography.body.fontSize),r.setProperty("--hpicker-theme-typography-body-font-weight",(null==t?void 0:t.typography.body.fontWeight)||e.typography.body.fontWeight),r.setProperty("--hpicker-theme-palette-font-color",(null==t?void 0:t.palette.text.primary)||e.palette.text.primary)}(this.optionsManager.getOptions().theme,z),this.mylog(this.optionsManager.getOptions()),window.addEventListener("click",(t=>{const e=function(t,e){let r=!1;return t.composedPath().forEach((t=>{t.id=="hierarchized-picker-"+e&&(r=!0)})),r}(t,this.componentID);e||"tree"==this.optionsManager.getOptions().mode||this.showTree("hide")})),this.el.addEventListener("dragover",(t=>{t.preventDefault()})),this.el.addEventListener("dragenter",(t=>{t.preventDefault()})),this.translateDataForTree(this.rawDataManager.getData())}async clearPicker(){let t=await this.getValue();for(let t of this.value)this.loadedTreeJs.setValue(t.nodeid),this.loadedTreeJs.updateLiElements();this.value=[],this.setDisplayedValue([]),this.loadedTreeJs.options.onChange();let e=await this.getValue();this.valueChange.emit({oldValue:t,newValue:e,value:e})}errorLoadingXHR(){var t;this.displayPickerError("Error loading webservice data!");try{document.querySelector("#tree-area-"+this.componentID).innerHTML="Error loading webservice data!",null===(t=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input"))||void 0===t||t.remove(),this.canload=!1,this.showTree("hide"),this.ready=!0,this.ignoreOptionsChanges=!1}catch(t){console.error("Error loading webservice data!")}}displayPickerError(t=""){try{document.querySelector("#hierarchized-picker-"+this.componentID).classList.add("fieldError"),this.optionsManager.getOptions().errorsInInput&&(""==t&&(t="There has been an error ... > [Generic error]"),this.displayedValue=t,this.isDisabled=!0,t=this.errorToLog)}catch(e){console.error(t)}}getApiSearchURL(){if("classification"==this.optionsManager.getOptions().origin){const t=this.optionsManager.getOptions().url;if(t.indexOf("getTree")>-1)return t.replace("/getTree/","/search/");{let t=this.optionsManager.getOptions().url.substring(0,this.optionsManager.getOptions().url.lastIndexOf("/")),e=t.substring(t.lastIndexOf("/"),t.length);return t.substring(0,t.lastIndexOf("/"))+"/search"+e}}return this.optionsManager.getOptions().url.substring(0,this.optionsManager.getOptions().url.lastIndexOf("/"))+"/GetTreeFromSearch"}getContextualApiURL(t=!1){const{options:e,url:r}=this.optionsManager.getOptions();if(t&&e.Reach){const t=window.location.origin,n=new URL(r,t),i=n.pathname.split("/");let o=i[i.length-2];return-1==["thesaurus","position"].indexOf(o)&&(o=i[i.length-1]),`${n.origin}/api/v1/classification/reach/${o}/${e.Reach}`}return r}getContextualApiParams(t=null,e=null,r=!1){t||(t=this.optionsManager.getOptions().options);let n=Object.assign({},t);return r||delete n.Reach,n.Reach?(delete n.Reach,"startNode"in n?(n.startingnode=n.startNode,delete n.startNode):"StartNodeID"in n&&(n.startingnode=n.StartNodeID,delete n.StartNodeID)):e&&(n.searchedValue=e,"startNode"in n&&(n.StartNodeID=n.startNode,delete n.startNode)),n}translateDataForTree(t,e=null,r=null){r&&""!=r?this.loadSearchDataInCurrentTree(e,r):this.triggerTreeDisplay(t,r)}loadSearchDataInCurrentTree(t,e){let r=t=>{this.searchToDisplay>-1&&(this.rawDataManager.mergeData(t,"classification"==this.theOptions.origin?"ID":"key"),t.children.forEach((t=>{A(this.loadedTreeJs,t,this.optionsManager.getOptions())})),this.triggerTreeDisplay(this.rawDataManager.getData(),e),T(this.rawDataManager.getData(),e,this.optionsManager,this.editValue.bind(this),this.showTree.bind(this)),document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-node").forEach((t=>{var e;0==Array.prototype.slice.call(t.querySelectorAll("ul > li > span")).filter((t=>"undefined"===t.textContent)).length&&!(null===(e=this.loadedTreeJs.nodesById[t.nodeId])||void 0===e?void 0:e.isDesaturated)&&this.loadedTreeJs.nodesById[t.nodeId].children.length>0&&t.classList.remove("treejs-node__close")})))};if("webservice"==this.theOptions.source)"classification"==this.theOptions.origin?this.rawDataManager.getFromClassification(this.getApiSearchURL(),Object.assign({},this.getContextualApiParams(null,e)),document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((t=>{r(t),e||this.setSearchResults([])})).catch((t=>{console.error("err",t)})):this.rawDataManager.getFromSource(this.getApiSearchURL(),{StartNodeID:this.theOptions.options.StartNodeID,lng:this.theOptions.options.lng,searchedValue:e,searchNameOnly:!0,deprecated:!1},document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((t=>{r(t),e||this.setSearchResults([])})).catch((t=>{console.error("---- MY ERROR ---- ",t);try{this.errorToLog="getDataFromSource 1 rejected:"+JSON.stringify(t,w,2)}catch(e){console.error("getDataFromSource 2 rejected:",JSON.stringify(t,w,2))}}));else{this.searchToDisplay>-1&&t==this.searchToDisplay&&(this.rawDataManager.getData().children.forEach((t=>{A(this.loadedTreeJs,t,this.optionsManager.getOptions())})),T(this.rawDataManager.getData(),e,this.optionsManager,this.editValue.bind(this),this.showTree.bind(this)));const r=S([],this.optionsManager.getOptions().displayRootNode?[this.rawDataManager.getData()]:this.rawDataManager.getData().children,e,this.optionsManager.getOptions());e&&this.setSearchResults(r),this.displayTree(r)}}async triggerTreeDisplay(t,e){if(!t)return;this.mylog(`Translate from ${this.optionsManager.getOptions().origin} ! (${this.optionsManager.getOptions().source})`,t);const r=S([],this.optionsManager.getOptions().displayRootNode?[t]:t.children,e,this.optionsManager.getOptions());e&&this.setSearchResults(r),this.displayTree(r,null!=e)}deactivateNodesOutOfDepthSettings(){if(null!=this.optionsManager.getOptions().maxDepth||null!=this.optionsManager.getOptions().minDepth)for(let t in this.loadedTreeJs.nodesById){let e=this.loadedTreeJs.nodesById[t];(e.depth<this.optionsManager.getOptions().minDepth||e.depth>this.optionsManager.getOptions().maxDepth)&&this.loadedTreeJs.liElementsById[e.id].classList.add("readonly_node")}}async displayTree(t,e=!1){if(!this.optionsManager.getOptions().displayTree&&this.ready)return;if(0==t.length)return void(this.el.querySelector(".hierarchized-picker-tree").innerHTML="No search results ...");const r=new b("#tree-area-"+this.componentID,{parentApi:this,rawDataManager:this.rawDataManager,completeCurrentTreeWithTree:A,data:!this.loadedTreeJs||e?t:S([],this.rawDataManager.getData().children,null,this.optionsManager.getOptions()),onChange:async()=>{let t;try{t=await this.getValue()}catch(e){t=null}(async()=>{let e=await this.getValue();this.valueChangeCallback&&this.ready&&!this.shownTree&&this.valueChangeCallback(e),this.valueChange.emit({oldValue:t,newValue:e,value:e})})()},loaded:()=>{this.mylog("loaded"),this.ready=!0,this.ignoreOptionsChanges=!1}});Object.values(r.liElementsById).forEach((t=>{t.classList.remove("treejs-node__searchmatch")})),this.loadedTreeJs=r,this.collapseAllNodes(),-1==this.hasFocus.indexOf("hide")&&this.checkFields(this.value,!1),this.setDisplayedValue(this.value),this.showSelectedNodes(),this.deactivateNodesOutOfDepthSettings(),this.optionsManager.getOptions().multiple||document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-checkbox").forEach((t=>t.style.display="none"))}onItemContextMenuItemClick(t){this.itemContextMenuItemClick.emit(t)}setNodeAsSelected(t,e,r){if(this.isDisabled&&"tree"!=this.optionsManager.getOptions().mode&&this.shownTree&&this.setValueOnClick||this.loadedTreeJs.liElementsById[t]&&this.loadedTreeJs.liElementsById[t].classList.value&&-1!=this.loadedTreeJs.liElementsById[t].classList.value.indexOf("readonly_node"))return;if(-1!=e.getValues().indexOf(t.toString()))return;this.ignoreOptionsChanges=!0;let n=e.nodesById[t],i=e.options.onChange;n?(n.disabled||(e.setValue(t),e.updateLiElements()),r&&i&&i.call(e),this.setValueOnClick&&(this.editValue(n,r),this.shownTree&&r&&(this.optionsManager.getOptions().multiple||this.showTree("hide")))):this.logError("The current selected value is not part of the loaded tree!"),this.ignoreOptionsChanges=!1}collapseAllNodes(){document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-node").forEach((t=>t.classList.add("treejs-node__close")))}async showSelectedNodes(t=!1){if(this.optionsManager.getOptions().multiple)return void console.warn("You are not allowed to scroll to selected nodes in multiple mode");const e=()=>{let t=0,e=r=>{var n,i,o,a;const u=null==r?void 0:r.nodeId;if(!r||!u)return;const c=this.loadedTreeJs.nodesById[u];(null===(i=null===(n=null==c?void 0:c.children)||void 0===n?void 0:n[0])||void 0===i?void 0:i.id)&&(null===(o=r.classList)||void 0===o||o.remove("treejs-node__close")),t+=r.offsetTop;const s=null===(a=r.parentNode)||void 0===a?void 0:a.closest(".treejs-node");s&&e(s)};try{document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-node__checked").forEach((t=>e(t)))}catch(t){}t&&this.scrollable&&(this.scrollable.scrollTop=t)};t?setTimeout((()=>{e()}),200):e()}showTree(t){if(this.hasFocus||(this.hasFocus=[]),function(t=!1){const e=document.getElementById("autocomplete-results-area");e&&(e.style.display="none",t&&(e.innerHTML=""))}(),!this.canload||!this.optionsManager.getOptions().displayTree)return;const e=F(this,document.activeElement);if("hide"!==t&&!this.isDisabled||e)-1===this.hasFocus.indexOf(t)&&-1===this.hasFocus.indexOf("hide")&&this.hasFocus.push(t);else{this.hasFocus=["hide"];const t=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input");t&&(t.value=""),this.search("")}this.hasFocus.indexOf("hide")>-1&&!e?this.hasFocus=[]:this.shownTree||"click"!=this.theOptions.loading||this.ready||this.loadDataForTree(!0,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader"));const r=this.shownTree;this.shownTree=this.hasFocus.length>0,this.shownTree&&!r&&R(this)}editValue(t,e=!1){this.value||(this.value=[]);let r=this.value.findIndex((e=>e.nodeid==t.id));e&&r>-1?this.value.splice(r,1):this.optionsManager.getOptions().multiple?this.value=[...this.value,{nodeid:t.id,fullpath:t.fullpath,fullpathTranslated:t.fullpathTranslated,shortpathTranslated:t.text,hasChildren:t.children&&t.children.length>0}]:this.value[0]={nodeid:t.id,fullpath:t.fullpath,fullpathTranslated:t.fullpathTranslated,shortpathTranslated:t.text,hasChildren:t.children&&t.children.length>0},this.setDisplayedValue(this.value)}setDisplayedValue(t=null){t||(t=this.value),this.displayedValue=t.map((t=>{var e,r;return null!==(r=this.optionsManager.getOptions().isFullpath?this.getShortenedFullpath(null!==(e=t.fullpathTranslated)&&void 0!==e?e:t.fullpath):t.shortpathTranslated)&&void 0!==r?r:`Node ${t.nodeid}`})).join(";")}search(t){this.loader.classList.add("loading");let e=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input");if("input"==this.optionsManager.getOptions().mode&&e&&e.classList.remove("fieldError"),t.length>2){this.searchToDisplay+=1;let e=this.searchToDisplay;setTimeout((()=>{this.searchToDisplay==e&&(this.triggerSearch(t),this.checkFields(this.value,!1))}),1e3)}else this.searchToDisplay=-1,"webservice"==this.optionsManager.getOptions().source?(this.optionsManager.getOptions(),this.optionsManager.getOptions(),this.translateDataForTree(this.rawDataManager.getData(),null)):this.translateDataForTree(this.rawData,null),T(null,"",this.optionsManager,this.editValue.bind(this),this.showTree.bind(this)),this.setSearchResults([]);this.loader.classList.remove("loading")}triggerSearch(t){this.translateDataForTree(this.rawDataManager.getData(),null,t)}async setRawDataFromFile(t){try{await this.rawDataManager.loadDataFromFile(t),this.formatDefaultValue(),this.showSelectedNodes()}catch(e){this.displayPickerError(`Error loading data from path "${t}": ${e.message}`)}}loadDataForTree(t,e){if("webservice"==this.optionsManager.getOptions().source)if("classification"==this.optionsManager.getOptions().origin){const r=this.getContextualApiParams(null,null,!0),n=this.getContextualApiURL(!0);this.rawDataManager.getFromClassification(n,r,e).then((e=>{this.rawData=e,t&&(this.formatDefaultValue(),this.showSelectedNodes())})).catch((t=>{console.error("getDataFromSource 3 classification rejected:",t)}))}else this.rawDataManager.getFromSource(this.optionsManager.getOptions().url,this.optionsManager.getOptions().options,e).then((e=>{this.rawData=e,t&&(this.formatDefaultValue(),this.showSelectedNodes())})).catch((t=>{console.error("getDataFromSource 3 legacy rejected:",t)}));"data"==this.optionsManager.getOptions().source&&(this.rawData=this.optionsManager.data,this.formatDefaultValue()),"file"==this.optionsManager.getOptions().source&&this.setRawDataFromFile(this.optionsManager.getOptions().url),this.translateDataForTree(this.rawDataManager.getData())}checkFields(t,e=!0){if(!this.loadedTreeJs)return;this.setValueOnClick=e;let r=[];t&&t.forEach((t=>{var e,n;let i=t.nodeid||t.ID||t.key||void 0;"string"==typeof i&&k(i)&&(i=parseInt(i));const o=this.loadedTreeJs.nodesById[i];o?(r.push({nodeid:i,shortpathTranslated:null!==(e=o.text)&&void 0!==e?e:`Node ${i}`,fullpathTranslated:null!==(n=o.fullpath)&&void 0!==n?n:null,hasChildren:o.children&&o.children.length>0}),this.setNodeAsSelected(i,this.loadedTreeJs,!1)):(this.setNodeAsSelected(i,this.loadedTreeJs,!1),console.warn("Node not found in Tree for:",i))})),this.setDisplayedValue(r),this.value=r,this.setValueOnClick=!0}formatDefaultValue(){let t=0,e=this,r=function(n){n.forEach((n=>{e.theOptions.defaultValue.forEach((r=>{"string"==typeof r&&k(r)&&(r=parseInt(r)),"classification"==e.theOptions.origin?("string"==typeof r&&O(n,"Properties").FullPath==r||"number"==typeof r&&O(n,"ID")==r)&&(n.nodeid=n.id,e.checkFields([n]),t++):("string"==typeof r&&O(n,"fullpathTranslated")==r||"number"==typeof r&&O(n,"key")==r)&&(n.nodeid=n.key,e.checkFields([n]),t++)})),n.children&&r(n.children)}))};if(this.rawDataManager.getData()&&r([this.rawDataManager.getData()]),this.theOptions.defaultValue.length!=t){if(0==t)try{this.errorToLog="The loaded tree doesn't contain the nodes passed to options.defaultValue : "+this.theOptions.defaultValue.map((t=>t)).join(",")}catch(t){this.errorToLog="The loaded tree doesn't contain the nodes passed to options.defaultValue : there's an issue with your defaultValue > "+this.theOptions.defaultValue.toString()}else this.errorToLog="The loaded tree contains multiple nodes of what has been passed to options.defaultValue : "+this.theOptions.defaultValue.map((t=>t)).join(",");this.displayPickerError("Error(s) when loading tree default value(s)!")}}getFullpathTooltip(){return this.value&&0!==this.value.length?this.value.map((t=>{var e,r;return null!==(r=null!==(e=this.getShortenedFullpath(t.fullpathTranslated))&&void 0!==e?e:t.fullpath)&&void 0!==r?r:`Node ${t.nodeid}`})).join("; "):"No selection"}render(){return this.optionsManager.getOptions()?r("div",{id:"hierarchized-picker-"+this.componentID,class:"hierarchized-picker "+(this.isDisabled?"readonly-mode":"")},"input"==this.optionsManager.getOptions().mode?r("div",{class:"hierarchized-picker-container"},r("div",{style:{display:"none"},ref:t=>{this.loader=t}}),r("div",{class:"hierarchized-picker-input-area"},this.optionsManager.getOptions().label?r("label",{class:"hierarchized-picker-label"},j(this.optionsManager.getOptions().label,this.optionsManager.getOptions().language,"en")):"",r("span",{class:"hierarchized-picker-input "+(this.optionsManager.getOptions().icon&&this.optionsManager.getOptions().icon.length>0?"hierarchized-picker-icon":"")+" reneco "+(this.optionsManager.getOptions().icon?this.optionsManager.getOptions().icon:"")+(this.isDisabled?" readonly ":"")+" sc-ion-input-md-h sc-ion-input-md-s md ",id:"hierarchized-picker-input-"+this.componentID,onClick:()=>{this.showTree("picker")},onFocusin:()=>{this.showTree("modale")}},r("input",{class:"native-input sc-ion-input-md","aria-labelledby":"ion-input-13-lbl",autocapitalize:"off",autocomplete:"off",autocorrect:"off",name:"ion-input-13",placeholder:"",readonly:"",spellcheck:"false",type:"text",value:this.displayedValue,title:this.getFullpathTooltip()})),this.displayedValue&&!this.isDisabled&&this.canload?r("span",{class:"reneco reneco-close",onClick:()=>this.clearPicker()}):""),r("div",{ref:t=>{this.scrollable=t},class:"hierarchized-picker-modal-area "+(this.shownTree?"":" hidden "),onClick:()=>{D(this)}},r("div",{class:"loader",ref:t=>{this.loader=t}},r("div",{class:"loader-inner"},"Loading...")),r("div",{class:"hierarchized-picker-modal "+(this.ready?"":"hidden")},r("search-input",{placeholder:j(this.optionsManager.getOptions().searchPlaceholder,this.optionsManager.getOptions().language,"en"),onInputFocus:()=>{C(this,"search")},onInputBlur:()=>function(t,e){!function(t,e){F(t,e.relatedTarget)?C(t,"search"):setTimeout((()=>{F(t,document.activeElement)||C(t,"hide")}),100)}(t,e)}(this,event),onSearch:t=>this.search(t.detail)}),r("ul",{id:"autocomplete-results-area"}),r("div",{id:"tree-area-"+this.componentID,class:"hierarchized-picker-tree hierarchized-picker-tree-area "+this.pickerClass})))):r("div",{class:"hierarchized-picker-raw-tree-area"+(this.isDisabled?" readonly":""),onClick:()=>{D(this)}},r("div",{class:"loader",ref:t=>{this.loader=t}},r("div",{class:"loader-inner"},"Loading...")),r("div",{ref:t=>{this.scrollable=t},id:"tree-area-"+this.componentID,class:"hierarchized-picker-tree scrollable hierarchized-picker-raw-tree "+this.pickerClass}))):r("div",{class:"fieldError"},"Generic loading issue...")}get el(){return n(this)}static get watchers(){return{searchResultData:["searchResultDataChange"],errorToLog:["logError"],newoptions:["setNewOptions"],newfilter:["setNewFilter"],options:["optionsChange"],rawData:["rawDataWatcher"]}}};E.style='reneco-hierarchized-picker .hierarchized-picker-raw-tree-area{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader{position:absolute;z-index:1;min-width:100%;min-height:100%;background:#FFFFFF99;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader .loader-inner{background:#FFF;padding:20px;-webkit-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader:not(.loading){display:none}reneco-hierarchized-picker .scrollable{overflow-y:auto;position:relative}reneco-hierarchized-picker .treejs{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--hpicker-theme-typography-tree-font-size, 14px) !important;font-weight:var(--hpicker-theme-typography-tree-font-weight, 400) !important}reneco-hierarchized-picker .treejs *:after,reneco-hierarchized-picker .treejs *:before{-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .treejs>.treejs-node{padding-left:0}reneco-hierarchized-picker .treejs .treejs-nodes{list-style:none;padding-left:20px;overflow:hidden;-webkit-transition:height 150ms ease-out, opacity 150ms ease-out;-o-transition:height 150ms ease-out, opacity 150ms ease-out;transition:height 150ms ease-out, opacity 150ms ease-out}reneco-hierarchized-picker .treejs .treejs-node{cursor:pointer;overflow:hidden;position:relative}reneco-hierarchized-picker .treejs .treejs-node.treejs-placeholder{padding-left:20px}reneco-hierarchized-picker .treejs .treejs-switcher{display:inline-block;vertical-align:middle;width:20px;height:20px;cursor:pointer;position:relative;-webkit-transition:-webkit-transform 150ms ease-out;transition:-webkit-transform 150ms ease-out;-o-transition:transform 150ms ease-out;transition:transform 150ms ease-out;transition:transform 150ms ease-out, -webkit-transform 150ms ease-out}reneco-hierarchized-picker .treejs .treejs-switcher:before{position:absolute;top:8px;left:6px;display:block;content:\' \';border:4px solid transparent;border-top:4px solid rgba(0, 0, 0, 0.4);-webkit-transition:border-color 150ms;-o-transition:border-color 150ms;transition:border-color 150ms}reneco-hierarchized-picker .treejs .treejs-switcher:hover:before{border-top:4px solid var(--hpicker-theme-palette-font-color)}reneco-hierarchized-picker .treejs-node__checked>.treejs-switcher:before{border-top:4px solid var(--hpicker-theme-palette-primary-contrastText) !important}reneco-hierarchized-picker .treejs .treejs-node__close>.treejs-switcher{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}reneco-hierarchized-picker .treejs .treejs-node__close>.treejs-nodes{height:0}reneco-hierarchized-picker .treejs .treejs-checkbox{display:inline-block;vertical-align:middle;width:20px;height:20px;cursor:pointer;position:relative}reneco-hierarchized-picker .treejs .treejs-checkbox:before{-webkit-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s;cursor:pointer;position:absolute;top:2px;content:\' \';display:block;width:16px;height:16px;border:1px solid #d9d9d9;border-radius:2px}reneco-hierarchized-picker .treejs .treejs-checkbox:hover:before{-webkit-box-shadow:0 0 2px 1px #1890ff;box-shadow:0 0 2px 1px #1890ff}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:before{background-color:#1890ff;border-color:#1890ff}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:after{position:absolute;content:\' \';display:block;top:4px;left:5px;width:5px;height:9px;border:2px solid #fff;border-top:none;border-left:none;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}reneco-hierarchized-picker .treejs .treejs-node__halfchecked{background-color:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, #e8a86c))}reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:before{background-color:#1890ff;border-color:#1890ff}reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:after{position:absolute;content:\' \';display:block;top:9px;left:3px;width:10px;height:2px;background-color:#fff}reneco-hierarchized-picker .treejs .treejs-node__disabled{cursor:not-allowed;color:rgba(0, 0, 0, 0.25)}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox{cursor:not-allowed}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox:before{cursor:not-allowed;border-color:#d9d9d9 !important;background-color:#f5f5f5 !important}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox:hover:before{-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-node__checked>.treejs-checkbox:after{border-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-node__halfchecked>.treejs-checkbox:after{background-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled.treejs-node__checked>.treejs-checkbox:after{border-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled.treejs-node__halfchecked>.treejs-checkbox:after{background-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-label{vertical-align:middle}reneco-hierarchized-picker .treejs .treejs-node__deprecated>.treejs-label{text-decoration:line-through}reneco-hierarchized-picker .treejs .treejs-node__desaturated>.treejs-label{opacity:.5}reneco-hierarchized-picker .treejs .treejs-node__searchmatch>.treejs-label{font-weight:bolder}reneco-hierarchized-picker .treejs .dragging{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, #e8a86c));display:inline;opacity:.9;padding:11px 0px;display:block}reneco-hierarchized-picker .treejs .dragover{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, #e8a86c))}reneco-hierarchized-picker .treejs .dragover-over::after{content:"";display:block;width:2px;height:100%;position:absolute;top:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .treejs .dragover-before::after{content:"";display:block;height:2px;width:100%;position:absolute;top:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .treejs .dragover-after::after{content:"";display:block;height:2px;width:100%;position:absolute;bottom:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .fieldError{color:red !important}reneco-hierarchized-picker .hidden{display:none;opacity:0}reneco-hierarchized-picker ul.treejs-nodes:first-child{padding-left:0px !important;margin-top:0px !important;margin-left:0px !important;background-color:var(--hpicker-theme-palette-background-dark)}reneco-hierarchized-picker ul.treejs-nodes:not(:first-child){margin:0 !important;padding-left:15px !important;background-color:var(--hpicker-theme-palette-background-dark, var(--mui-palette-background-dark, var(--ion-color-light-tint, #FFF)))}reneco-hierarchized-picker ul.treejs-nodes{margin-left:15px !important;padding-left:0px !important}reneco-hierarchized-picker .hierarchized-picker-raw-tree li.treejs-node ul.treejs-nodes{margin:11px 0 0 0 !important}reneco-hierarchized-picker .hierarchized-picker-raw-tree li.treejs-node__close ul.treejs-nodes{margin:0 !important}reneco-hierarchized-picker li.treejs-node__close{background-color:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, var(--ion-color-light, #FAFAFA)))}reneco-hierarchized-picker li:not(.treejs-node__close){background-color:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, #e8a86c));padding-bottom:0px !important}reneco-hierarchized-picker li:not(.treejs-node__close) ul.treejs-nodes li{margin-top:2px !important}reneco-hierarchized-picker ul li:last-child{margin-bottom:0px !important}reneco-hierarchized-picker li.treejs-node__checked{background-color:var(--hpicker-theme-palette-primary-light) !important;color:var(--hpicker-theme-palette-primary-ContrastText, var(--mui-palette-primary-ContrastText, var(--ion-color-primary-contrast, #000)))!important}reneco-hierarchized-picker li.treejs-node{padding:2px 0px;margin-bottom:2px}reneco-hierarchized-picker .treejs-node.readonly_node{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:darkgrey}reneco-hierarchized-picker .treejs-node:not(.readonly_node){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black))}reneco-hierarchized-picker .hierarchized-picker-container{position:relative;width:100%}reneco-hierarchized-picker .hierarchized-picker-input-area{background-color:transparent !important;display:inline;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}reneco-hierarchized-picker .hierarchized-picker-input-area .input-wrapper{padding-left:10px !important}reneco-hierarchized-picker .hierarchized-picker-input{-ms-flex:2;flex:2}reneco-hierarchized-picker .hierarchized-picker-input.readonly{pointer-events:none;cursor:initial}reneco-hierarchized-picker .hierarchized-picker-input.hierarchized-picker-icon{margin-left:8px}reneco-hierarchized-picker .hierarchized-picker-label{position:stacked;margin-left:5px}reneco-hierarchized-picker .hierarchized-picker-tree-area{width:333px !important;padding-top:48px}reneco-hierarchized-picker .hierarchized-picker-modal-area{background-color:var(--hpicker-theme-palette-background-dark, var(--mui-palette-background-dark, var(--ion-color-light-tint, #FFF))) !important;position:absolute;z-index:10;padding-left:15px;overflow:scroll;top:20px;min-height:100px;max-height:200px;-webkit-box-shadow:0 0px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0px 15px 0 rgba(0, 0, 0, 0.2);border-radius:4px;margin-right:0px !important}reneco-hierarchized-picker .hierarchized-picker-modal{display:inline-block;width:357px}reneco-hierarchized-picker .hierarchized-picker{display:-ms-flexbox;display:flex;width:100%;font-family:\'Roboto\', sans-serif}reneco-hierarchized-picker .hierarchized-picker-spinner{margin:35px 0px 0px 145px}reneco-hierarchized-picker .reneco:before{position:relative;top:1px}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco{padding:10px 15px}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco:hover{cursor:pointer}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco-close{-webkit-transform:translate(5px, -8px);transform:translate(5px, -8px);color:var(--ion-color-danger, red) !important}reneco-hierarchized-picker .treejs .treejs-switcher:before{border-top:4px solid var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, var(--ion-color-dark-shade, #121212)))}reneco-hierarchized-picker .treejs .treejs-checkbox:before{-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:before,reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:before{background-color:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433))) !important;border-color:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433))) !important;-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker #autocomplete-results-area{position:absolute;margin-top:48px;background-color:white;left:15px;z-index:10;padding:0px 5px;max-width:340px;max-height:110px;overflow:auto}reneco-hierarchized-picker #autocomplete-results-area li{list-style-type:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;margin:1px}reneco-hierarchized-picker .hierarchized-picker-raw-tree-area li.treejs-node{padding:11px 0px;display:block}reneco-hierarchized-picker input[title]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.hierarchized-picker-raw-tree-area.readonly li.treejs-node .treejs-switcher{pointer-events:all}::-webkit-scrollbar-thumb{background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433)));width:8px;margin:5px;border-radius:5px}::-webkit-scrollbar{background:var(--ion-color-medium-tint, #E0E0E0);width:8px;height:8px;margin:5px;cursor:pointer;border-radius:5px}::-webkit-scrollbar-corner{background-color:var(--ion-color-light-tint, #FFF)}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__close{background-color:var(--ion-color-dark-tint, #424242);color:var(--ion-color-dark-contrast, #fff)}[class$="-dark"] reneco-hierarchized-picker li:not(.treejs-node__close){background-color:var(--ion-color-dark, #212121);color:var(--ion-color-dark-contrast, #fff)}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__checked{background-color:var(--ion-color-background, var(--hpicker-theme-palette-background-default, rgba(221, 169, 37, 0.18)));color:var(--ion-color-primary-contrast, #fff) !important}[class$="-dark"] reneco-hierarchized-picker .treejs-switcher:before{border-top-color:var(--ion-color-dark-contrast, #fff) !important}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__checked .treejs-switcher:before{color:var(--ion-color-light-contrast, #111111) !important}[class$="-dark"] reneco-hierarchized-picker ul.treejs-nodes:not(:first-child){background-color:var(--ion-color-light-contrast, #111111) !important}';const $=class{constructor(r){t(this,r),this.inputFocus=e(this,"inputFocus",7),this.inputBlur=e(this,"inputBlur",7),this.search=e(this,"search",7),this.placeholder=void 0}async setFocus(){var t;null===(t=this.inputElement)||void 0===t||t.focus()}handleFocus(){this.inputFocus.emit()}handleBlur(t){const e=t.relatedTarget;setTimeout((()=>{document.activeElement===this.inputElement||e&&this.rootElement.contains(e)||this.inputBlur.emit()}),100)}handleInput(t){const e=t.target.value;e!==this.previousValue&&(this.previousValue=e,this.search.emit(e))}render(){return r("div",{id:"hierarchized-picker-input-search-",class:"search-input-container reneco reneco-search",ref:t=>this.rootElement=t},r("input",{ref:t=>this.inputElement=t,type:"text",class:"native-input search-input hierarchized-picker-search reneco reneco-search sc-ion-input-md-h sc-ion-input-md-s md",placeholder:this.placeholder,onFocus:()=>this.handleFocus(),onBlur:t=>this.handleBlur(t),onInput:t=>this.handleInput(t)}))}};$.style=".search-input-container{width:100%;margin:0}.search-input{width:100%;border:none}.search-input:focus{border:none !important;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .hierarchized-picker-input-area .input-wrapper{padding-left:10px !important}reneco-hierarchized-picker .hierarchized-picker-input input,reneco-hierarchized-picker .hierarchized-picker-search input{padding-left:5px !important;text-overflow:ellipsis !important;border:0;background:transparent;outline:none;font-size:var(--hpicker-theme-typography-body-font-size, var(--mui-typography-body-font-size, 14px)) !important;font-weight:var(--hpicker-theme-typography-body-font-weight, var(--mui-typography-body-font-weight, 400)) !important}reneco-hierarchized-picker .hierarchized-picker-search input{width:90%;color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, var(--ion-color-light-tint, #fff))) !important}reneco-hierarchized-picker .hierarchized-picker-search{background-color:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, var(--ion-color-medium-tint, #E0E0E0)));position:absolute !important;width:333px !important;margin-top:10px;border-radius:4px;padding:8.5px}reneco-hierarchized-picker #searchInTree{padding:8.5px 8px;background:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, var(--ion-color-background, rgba(221, 169, 37, 0.18))));border:none !important;border-radius:4px}reneco-hierarchized-picker #searchInTree:focus{border:none !important;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}";export{E as reneco_hierarchized_picker,$ as search_input}
|