!function(){"use strict";function e(){}function t(e,t){for(const n in t)e[n]=t[n];return e}function n(e){return e()}function r(){return Object.create(null)}function i(e){e.forEach(n)}function o(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function s(e,t,n){const r=t.subscribe(n);e.$$.on_destroy.push(r.unsubscribe?()=>r.unsubscribe():r)}function l(e,t,n){if(e){const r=c(e,t,n);return e[0](r)}}function c(e,n,r){return e[1]?t({},t(n.$$scope.ctx,e[1](r?r(n):{}))):n.$$scope.ctx}function u(e,n,r,i){return e[1]?t({},t(n.$$scope.changed||{},e[1](i?i(r):{}))):n.$$scope.changed||{}}function h(e,t){e.appendChild(t)}function f(e,t,n){e.insertBefore(t,n||null)}function d(e){e.parentNode.removeChild(e)}function p(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function w(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function b(e,t){t=""+t,e.data!==t&&(e.data=t)}function _(e,t,n){e.style.setProperty(t,n)}function $(e,t){for(let n=0;ne(t))}const T=[],S=[],M=[],C=[],O=Promise.resolve();let D=!1;function N(e){M.push(e)}function P(e){C.push(e)}function R(){const e=new Set;do{for(;T.length;){const e=T.shift();E(e),L(e.$$)}for(;S.length;)S.pop()();for(let t=0;t{F.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}}function U(e,n){const r=n.token={};function i(e,i,o,a){if(n.token!==r)return;n.resolved=o&&{[o]:a};const s=t(t({},n.ctx),n.resolved),l=e&&(n.current=e)(s);n.block&&(n.blocks?n.blocks.forEach((e,t)=>{t!==i&&e&&(B(),W(e,1,1,()=>{n.blocks[t]=null}),H())}):n.block.d(1),l.c(),V(l,1),l.m(n.mount(),n.anchor),R()),n.block=l,n.blocks&&(n.blocks[i]=l)}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){if(e.then(e=>{i(n.then,1,n.value,e)},e=>{i(n.catch,2,n.error,e)}),n.current!==n.pending)return i(n.pending,0),!0}else{if(n.current!==n.then)return i(n.then,1,n.value,e),!0;n.resolved={[n.value]:e}}var o}function Y(e,t,n){-1!==e.$$.props.indexOf(t)&&(e.$$.bound[t]=n,n(e.$$.ctx[t]))}function q(e,t,r){const{fragment:a,on_mount:s,on_destroy:l,after_update:c}=e.$$;a.m(t,r),N(()=>{const t=s.map(n).filter(o);l?l.push(...t):i(t),e.$$.on_mount=[]}),c.forEach(N)}function Q(e,t){e.$$.fragment&&(i(e.$$.on_destroy),e.$$.fragment.d(t),e.$$.on_destroy=e.$$.fragment=null,e.$$.ctx={})}function K(e,t){e.$$.dirty||(T.push(e),D||(D=!0,O.then(R)),e.$$.dirty=r()),e.$$.dirty[t]=!0}function J(t,n,o,a,s,l){const c=A;E(t);const u=n.props||{},h=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:s,bound:r(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:[]),callbacks:r(),dirty:null};let f=!1;var d;h.ctx=o?o(t,u,(e,n)=>{h.ctx&&s(h.ctx[e],h.ctx[e]=n)&&(h.bound[e]&&h.bound[e](n),f&&K(t,e))}):u,h.update(),f=!0,i(h.before_update),h.fragment=a(h.ctx),n.target&&(n.hydrate?h.fragment.l((d=n.target,Array.from(d.childNodes))):h.fragment.c(),n.intro&&V(t.$$.fragment),q(t,n.target,n.anchor),R()),E(c)}class G{$destroy(){Q(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(){}}function Z(e){var t,n,r,i;const o=e.$$slots.default,a=l(o,e,null);return{c(){t=g("button"),a&&a.c(),w(t,"class",n=e.color+" "+e.className+" "+e.borderClass+" "+(e.grouped?"grouped":"")+" svelte-7rfkdx"),w(t,"style",e.style),i=x(t,"click",e.click_handler)},l(e){a&&a.l(button_nodes)},m(e,n){f(e,t,n),a&&a.m(t,null),r=!0},p(e,i){a&&a.p&&e.$$scope&&a.p(u(o,i,e,null),c(o,i,null)),(!r||e.color||e.className||e.borderClass||e.grouped)&&n!==(n=i.color+" "+i.className+" "+i.borderClass+" "+(i.grouped?"grouped":"")+" svelte-7rfkdx")&&w(t,"class",n),r&&!e.style||w(t,"style",i.style)},i(e){r||(V(a,e),r=!0)},o(e){W(a,e),r=!1},d(e){e&&d(t),a&&a.d(e),i()}}}function X(e,t,n){let r,{color:i="primary",className:o="",style:a="",groupPosition:s="",grouped:l=!1}=t,{$$slots:c={},$$scope:u}=t;return e.$set=(e=>{"color"in e&&n("color",i=e.color),"className"in e&&n("className",o=e.className),"style"in e&&n("style",a=e.style),"groupPosition"in e&&n("groupPosition",s=e.groupPosition),"grouped"in e&&n("grouped",l=e.grouped),"$$scope"in e&&n("$$scope",u=e.$$scope)}),e.$$.update=((e={grouped:1})=>{e.grouped&&n("borderClass",r=l?"":"border-normal")}),{color:i,className:o,style:a,groupPosition:s,grouped:l,borderClass:r,click_handler:function(t){I(e,t)},$$slots:c,$$scope:u}}class ee extends G{constructor(e){super(),J(this,e,X,Z,a,["color","className","style","groupPosition","grouped"])}}var te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ne(e,t){return e(t={exports:{}},t.exports),t.exports}var re=ne(function(e,t){(function(){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i"']/g,Y=RegExp(W.source),q=RegExp(U.source),Q=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,X=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(ee.source),re=/^\s+|\s+$/g,ie=/^\s+/,oe=/\s+$/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,be="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",_e="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+be,$e=RegExp("['’]","g"),ke=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Ae=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+be,"g"),Ee=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",_e].join("|"),"g"),je=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te="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".split(" "),Se={};Se["[object Float32Array]"]=Se["[object Float64Array]"]=Se["[object Int8Array]"]=Se["[object Int16Array]"]=Se["[object Int32Array]"]=Se["[object Uint8Array]"]=Se["[object Uint8ClampedArray]"]=Se["[object Uint16Array]"]=Se["[object Uint32Array]"]=!0,Se["[object Arguments]"]=Se["[object Array]"]=Se["[object ArrayBuffer]"]=Se["[object Boolean]"]=Se["[object DataView]"]=Se["[object Date]"]=Se["[object Error]"]=Se["[object Function]"]=Se["[object Map]"]=Se["[object Number]"]=Se["[object Object]"]=Se["[object RegExp]"]=Se["[object Set]"]=Se["[object String]"]=Se["[object WeakMap]"]=!1;var Me={};Me["[object Arguments]"]=Me["[object Array]"]=Me["[object ArrayBuffer]"]=Me["[object DataView]"]=Me["[object Boolean]"]=Me["[object Date]"]=Me["[object Float32Array]"]=Me["[object Float64Array]"]=Me["[object Int8Array]"]=Me["[object Int16Array]"]=Me["[object Int32Array]"]=Me["[object Map]"]=Me["[object Number]"]=Me["[object Object]"]=Me["[object RegExp]"]=Me["[object Set]"]=Me["[object String]"]=Me["[object Symbol]"]=Me["[object Uint8Array]"]=Me["[object Uint8ClampedArray]"]=Me["[object Uint16Array]"]=Me["[object Uint32Array]"]=!0,Me["[object Error]"]=Me["[object Function]"]=Me["[object WeakMap]"]=!1;var Ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Oe=parseFloat,De=parseInt,Ne="object"==typeof te&&te&&te.Object===Object&&te,Pe="object"==typeof self&&self&&self.Object===Object&&self,Re=Ne||Pe||Function("return this")(),Le=t&&!t.nodeType&&t,Fe=Le&&e&&!e.nodeType&&e,ze=Fe&&Fe.exports===Le,Be=ze&&Ne.process,He=function(){try{var e=Fe&&Fe.f&&Fe.f("util").types;return e||Be&&Be.binding&&Be.binding("util")}catch(e){}}(),Ve=He&&He.isArrayBuffer,We=He&&He.isDate,Ue=He&&He.isMap,Ye=He&&He.isRegExp,qe=He&&He.isSet,Qe=He&&He.isTypedArray,Ke=w("length"),Je=b({"À":"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"}),Ge=b({"&":"&","<":"<",">":">",'"':""","'":"'"}),Ze=b({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Xe=function e(t){function b(e){if(Vr(e)&&!Ma(e)&&!(e instanceof _e)){if(e instanceof be)return e;if(Mi.call(e,"__wrapped__"))return gr(e)}return new be(e)}function te(){}function be(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=R}function _e(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function at(e,t,n,r,o,a){var s,l=1&t,c=2&t,u=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==R)return s;if(!Hr(e))return e;if(r=Ma(e)){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Mi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return gn(e,s)}else{var h=Bo(e),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Oa(e))return cn(e,l);if("[object Object]"==h||"[object Arguments]"==h||f&&!o){if(s=c||f?{}:Xn(e),!l)return c?function(e,t){return mn(e,zo(e),t)}(e,function(e,t){return e&&mn(t,ii(t),e)}(s,e)):function(e,t){return mn(e,Fo(e),t)}(e,nt(s,e))}else{if(!Me[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return un(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return t=n?un(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return hn(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return(t=new e.constructor(e.source,fe.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return new r;case"[object Symbol]":return jo?$i(jo.call(e)):{}}}(e,h,l)}}if(a||(a=new Le),o=a.get(e))return o;a.set(e,s),Ra(e)?e.forEach(function(r){s.add(at(r,t,n,r,e,a))}):Na(e)&&e.forEach(function(r,i){s.set(i,at(r,t,n,i,e,a))});c=u?c?Un:Wn:c?ii:ri;var d=r?R:c(e);return i(d||e,function(r,i){d&&(r=e[i=r]),Ke(s,i,at(r,t,n,i,e,a))}),s}function st(e,t,n){var r=n.length;if(null==e)return!r;for(e=$i(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===R&&!(i in e)||!o(a))return!1}return!0}function lt(e,t,n){if("function"!=typeof e)throw new Ei("Expected a function");return Wo(function(){e.apply(R,n)},t)}function ct(e,t,n,r){var i=-1,o=s,a=!0,u=e.length,h=[],f=t.length;if(!u)return h;n&&(t=c(t,A(n))),r?(o=l,a=!1):200<=t.length&&(o=j,a=!1,t=new Pe(t));e:for(;++it}function bt(e,t){return null!=e&&Mi.call(e,t)}function _t(e,t){return null!=e&&t in $i(e)}function $t(e,t,n){for(var r=n?l:s,i=e[0].length,o=e.length,a=o,u=yi(o),h=1/0,f=[];a--;){var d=e[a];a&&t&&(d=c(d,A(t))),h=so(d.length,h),u[a]=!n&&(t||120<=i&&120<=d.length)?new Pe(a&&d):R}d=e[0];var p=-1,g=u[0];e:for(;++p(t=sn(t,e)).length?e:vt(e,Ut(t,0,-1)))?e:e[fr(wr(t))])?R:n(t,e,r)}function At(e){return Vr(e)&&"[object Arguments]"==xt(e)}function Et(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Vr(e)&&!Vr(t))t=e!=e&&t!=t;else e:{var o,a,s=Ma(e),l=Ma(t),c="[object Object]"==(o="[object Arguments]"==(o=s?"[object Array]":Bo(e))?"[object Object]":o);l="[object Object]"==(a="[object Arguments]"==(a=l?"[object Array]":Bo(t))?"[object Object]":a);if((a=o==a)&&Oa(e)){if(!Oa(t)){t=!1;break e}s=!0,c=!1}if(a&&!c)i||(i=new Le),t=s||La(e)?Hn(e,t,n,r,Et,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new zi(e),new zi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return Nr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=M;case"[object Set]":if(s||(s=D),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=Hn(s(e),s(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(jo)return jo.call(e)==jo.call(t)}return!1}(e,t,o,n,r,Et,i);else{if(!(1&n)&&(s=c&&Mi.call(e,"__wrapped__"),o=l&&Mi.call(t,"__wrapped__"),s||o)){e=s?e.value():e,t=o?t.value():t,i||(i=new Le),t=Et(e,t,n,r,i);break e}if(a)t:if(i||(i=new Le),s=1&n,o=Wn(e),l=o.length,a=Wn(t).length,l==a||s){for(c=l;c--;){var u=o[c];if(!(s?u in t:Mi.call(t,u))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var h=s;++ct?n:0,n)?e[t]:R}function Rt(e,t,n){var r=-1;return t=c(t.length?t:[hi],A(Qn())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].c;return e}(e=Ct(e,function(e){return{a:c(t,function(t){return t(e)}),b:++r,c:e}}),function(e,t){var r;e:{r=-1;for(var i=e.a,o=t.a,a=i.length,s=n.length;++r=s?l:l*("desc"==n[r]?-1:1);break e}}r=e.b-t.b}return r})}function Lt(e,t,n){for(var r=-1,i=t.length,o={};++rt||9007199254740991t&&(t=-t>i?0:i+t),0>(n=n>i?i:n)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0,n=yi(i);++r=i){for(;r>>1,a=e[o];null!==a&&!qr(a)&&(n?a<=t:a(t=sn(t,e)).length?e:vt(e,Ut(t,0,-1)))||delete e[fr(wr(t))]}function en(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++or)return r?Zt(e[0]):[];for(var i=-1,o=yi(r);++i=r?e:Ut(e,t,n)}function cn(e,t){if(t)return e.slice();var n=e.length;n=Bi?Bi(n):new e.constructor(n);return e.copy(n),n}function un(e){var t=new e.constructor(e.byteLength);return new zi(t).set(new zi(e)),t}function hn(e,t){return new e.constructor(t?un(e.buffer):e.buffer,e.byteOffset,e.length)}function fn(e,t){if(e!==t){var n=e!==R,r=null===e,i=e==e,o=qr(e),a=t!==R,s=null===t,l=t==t,c=qr(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&ei?R:o,i=1),t=$i(t);++ra&&s[0]!==c&&s[a-1]!==c?[]:O(s,c)).length)n?n?Ht(t,e):t:(n=Ht(t,Xi(e/N(t))),je.test(t)?ln(P(n),0,e).join(""):n.slice(0,e))}function Cn(e,t,r,i){var o=1&t,a=$n(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=i.length,h=yi(u+l),f=this&&this!==Re&&this instanceof t?a:e;++ct||r)&&(1&e&&(o[2]=f[2],t|=1&n?0:4),(n=f[3])&&(r=o[3],o[3]=r?dn(r,n,f[4]):n,o[4]=r?O(o[3],"__lodash_placeholder__"):f[4]),(n=f[5])&&(r=o[5],o[5]=r?pn(r,n,f[6]):n,o[6]=r?O(o[5],"__lodash_placeholder__"):f[6]),(n=f[7])&&(o[7]=n),128&e&&(o[8]=null==o[8]?f[8]:so(o[8],f[8])),null==o[9]&&(o[9]=f[9]),o[0]=f[0],o[1]=t),e=o[0],t=o[1],n=o[2],r=o[3],i=o[4],!(s=o[9]=o[9]===R?l?0:e.length:ao(o[9]-c,0))&&24&t&&(t&=-25),cr((f?Do:Vo)(t&&1!=t?8==t||16==t?kn(e,t,s):32!=t&&33!=t||i.length?jn.apply(R,o):Cn(e,t,n,r):function(e,t,n){var r=1&t,i=$n(e);return function t(){return(this&&this!==Re&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n),o),e,t)}function Fn(e,t,n,r){return e===R||Nr(e,Ii[n])&&!Mi.call(r,n)?t:e}function zn(e,t,n,r,i,o){return Hr(e)&&Hr(t)&&(o.set(t,e),Nt(e,t,R,zn,o),o.delete(t)),e}function Bn(e){return Ur(e)?R:e}function Hn(e,t,n,r,i,o){var a=1&n,s=e.length;if(s!=(l=t.length)&&!(a&&l>s))return!1;if((l=o.get(e))&&o.get(t))return l==t;var l=-1,c=!0,u=2&n?new Pe:R;for(o.set(e,t),o.set(t,e);++l(n=null==n?0:Jr(n))&&(n=ao(r+n,0)),g(e,Qn(t,3),n)):-1}function vr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==R&&(i=Jr(n),i=0>n?ao(r+i,0):so(i,r-1)),g(e,Qn(t,3),i,!0)}function yr(e){return null!=e&&e.length?dt(e,1):[]}function xr(e){return e&&e.length?e[0]:R}function wr(e){var t=null==e?0:e.length;return t?e[t-1]:R}function br(e,t){return e&&e.length&&t&&t.length?Ft(e,t):e}function _r(e){return null==e?e:ho.call(e)}function $r(e){if(!e||!e.length)return[];var t=0;return e=a(e,function(e){if(Rr(e))return t=ao(e.length,t),!0}),k(t,function(t){return c(e,w(t))})}function kr(e,t){if(!e||!e.length)return[];var r=$r(e);return null==t?r:c(r,function(e){return n(t,R,e)})}function Ar(e){return(e=b(e)).__chain__=!0,e}function Er(e,t){return t(e)}function jr(e,t){return(Ma(e)?i:So)(e,Qn(t,3))}function Ir(e,t){return(Ma(e)?function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}:Mo)(e,Qn(t,3))}function Tr(e,t){return(Ma(e)?c:Ct)(e,Qn(t,3))}function Sr(e,t,n){return t=n?R:t,t=e&&null==t?e.length:t,Ln(e,128,R,R,R,R,t)}function Mr(e,t){var n;if("function"!=typeof t)throw new Ei("Expected a function");return e=Jr(e),function(){return 0<--e&&(n=t.apply(this,arguments)),1>=e&&(t=R),n}}function Cr(e,t,n){function r(t){var n=l,r=c;return l=c=R,p=t,h=e.apply(r,n)}function i(e){var n=e-d;return e-=p,d===R||n>=t||0>n||m&&e>=u}function o(){var e=xa();if(i(e))return a(e);var n,r=Wo;n=e-p,e=t-(e-d),n=m?so(e,u-n):e,f=r(o,n)}function a(e){return f=R,v&&l?r(e):(l=c=R,h)}function s(){var e=xa(),n=i(e);if(l=arguments,c=this,d=e,n){if(f===R)return p=e=d,f=Wo(o,t),g?r(e):h;if(m)return Po(f),f=Wo(o,t),r(d)}return f===R&&(f=Wo(o,t)),h}var l,c,u,h,f,d,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new Ei("Expected a function");return t=Zr(t)||0,Hr(n)&&(g=!!n.leading,u=(m="maxWait"in n)?ao(Zr(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),s.cancel=function(){f!==R&&Po(f),p=0,l=d=c=f=R},s.flush=function(){return f===R?h:a(xa())},s}function Or(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ei("Expected a function");return n.cache=new(Or.Cache||Ne),n}function Dr(e){if("function"!=typeof e)throw new Ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Nr(e,t){return e===t||e!=e&&t!=t}function Pr(e){return null!=e&&Br(e.length)&&!Fr(e)}function Rr(e){return Vr(e)&&Pr(e)}function Lr(e){if(!Vr(e))return!1;var t=xt(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ur(e)}function Fr(e){return!!Hr(e)&&("[object Function]"==(e=xt(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function zr(e){return"number"==typeof e&&e==Jr(e)}function Br(e){return"number"==typeof e&&-1=e}function Hr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Vr(e){return null!=e&&"object"==typeof e}function Wr(e){return"number"==typeof e||Vr(e)&&"[object Number]"==xt(e)}function Ur(e){return!(!Vr(e)||"[object Object]"!=xt(e))&&(null===(e=Hi(e))||"function"==typeof(e=Mi.call(e,"constructor")&&e.constructor)&&e instanceof e&&Si.call(e)==Ni)}function Yr(e){return"string"==typeof e||!Ma(e)&&Vr(e)&&"[object String]"==xt(e)}function qr(e){return"symbol"==typeof e||Vr(e)&&"[object Symbol]"==xt(e)}function Qr(e){if(!e)return[];if(Pr(e))return Yr(e)?P(e):gn(e);if(qi&&e[qi]){e=e[qi]();for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}return("[object Map]"==(t=Bo(e))?M:"[object Set]"==t?D:ai)(e)}function Kr(e){return e?(e=Zr(e))===L||e===-L?1.7976931348623157e308*(0>e?-1:1):e==e?e:0:0===e?e:0}function Jr(e){var t=(e=Kr(e))%1;return e==e?t?e-t:e:0}function Gr(e){return e?ot(Jr(e),0,4294967295):0}function Zr(e){if("number"==typeof e)return e;if(qr(e))return F;if(Hr(e)&&(e=Hr(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(re,"");var t=pe.test(e);return t||me.test(e)?De(e.slice(2),t?2:8):de.test(e)?F:+e}function Xr(e){return mn(e,ii(e))}function ei(e){return null==e?"":Gt(e)}function ti(e,t,n){return(e=null==e?R:vt(e,t))===R?n:e}function ni(e,t){return null!=e&&Zn(e,t,_t)}function ri(e){return Pr(e)?Fe(e):St(e)}function ii(e){if(Pr(e))e=Fe(e,!0);else if(Hr(e)){var t,n=or(e),r=[];for(t in e)("constructor"!=t||!n&&Mi.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in $i(e))t.push(n);e=t}return e}function oi(e,t){if(null==e)return{};var n=c(Un(e),function(e){return[e]});return t=Qn(t),Lt(e,n,function(e,n){return t(e,n[0])})}function ai(e){return null==e?[]:E(e,ri(e))}function si(e){return us(ei(e).toLowerCase())}function li(e){return(e=ei(e))&&e.replace(ye,Je).replace(ke,"")}function ci(e,t,n){return e=ei(e),(t=n?R:t)===R?Ie.test(e)?e.match(Ee)||[]:e.match(ce)||[]:e.match(t)||[]}function ui(e){return function(){return e}}function hi(e){return e}function fi(e){return Tt("function"==typeof e?e:at(e,1))}function di(e,t,n){var r=ri(t),o=mt(t,r);null!=n||Hr(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=mt(t,ri(t)));var a=!(Hr(n)&&"chain"in n&&!n.chain),s=Fr(e);return i(o,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=gn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,u([this.value()],arguments))})}),e}function pi(){}function gi(e){return rr(e)?w(fr(e)):function(e){return function(t){return vt(t,e)}}(e)}function mi(){return[]}function vi(){return!1}var yi=(t=null==t?Re:Xe.defaults(Re.Object(),t,Xe.pick(Re,Te))).Array,xi=t.Date,wi=t.Error,bi=t.Function,_i=t.Math,$i=t.Object,ki=t.RegExp,Ai=t.String,Ei=t.TypeError,ji=yi.prototype,Ii=$i.prototype,Ti=t["__core-js_shared__"],Si=bi.prototype.toString,Mi=Ii.hasOwnProperty,Ci=0,Oi=function(){var e=/[^.]+$/.exec(Ti&&Ti.keys&&Ti.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Di=Ii.toString,Ni=Si.call($i),Pi=Re._,Ri=ki("^"+Si.call(Mi).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Li=ze?t.Buffer:R,Fi=t.Symbol,zi=t.Uint8Array,Bi=Li?Li.g:R,Hi=C($i.getPrototypeOf,$i),Vi=$i.create,Wi=Ii.propertyIsEnumerable,Ui=ji.splice,Yi=Fi?Fi.isConcatSpreadable:R,qi=Fi?Fi.iterator:R,Qi=Fi?Fi.toStringTag:R,Ki=function(){try{var e=Gn($i,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ji=t.clearTimeout!==Re.clearTimeout&&t.clearTimeout,Gi=xi&&xi.now!==Re.Date.now&&xi.now,Zi=t.setTimeout!==Re.setTimeout&&t.setTimeout,Xi=_i.ceil,eo=_i.floor,to=$i.getOwnPropertySymbols,no=Li?Li.isBuffer:R,ro=t.isFinite,io=ji.join,oo=C($i.keys,$i),ao=_i.max,so=_i.min,lo=xi.now,co=t.parseInt,uo=_i.random,ho=ji.reverse,fo=Gn(t,"DataView"),po=Gn(t,"Map"),go=Gn(t,"Promise"),mo=Gn(t,"Set"),vo=Gn(t,"WeakMap"),yo=Gn($i,"create"),xo=vo&&new vo,wo={},bo=dr(fo),_o=dr(po),$o=dr(go),ko=dr(mo),Ao=dr(vo),Eo=Fi?Fi.prototype:R,jo=Eo?Eo.valueOf:R,Io=Eo?Eo.toString:R,To=function(){function e(){}return function(t){return Hr(t)?Vi?Vi(t):(e.prototype=t,t=new e,e.prototype=R,t):{}}}();b.templateSettings={escape:Q,evaluate:K,interpolate:J,variable:"",imports:{_:b}},b.prototype=te.prototype,b.prototype.constructor=b,be.prototype=To(te.prototype),be.prototype.constructor=be,_e.prototype=To(te.prototype),_e.prototype.constructor=_e,Ae.prototype.clear=function(){this.__data__=yo?yo(null):{},this.size=0},Ae.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Ae.prototype.get=function(e){var t=this.__data__;return yo?"__lodash_hash_undefined__"===(e=t[e])?R:e:Mi.call(t,e)?t[e]:R},Ae.prototype.has=function(e){var t=this.__data__;return yo?t[e]!==R:Mi.call(t,e)},Ae.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yo&&t===R?"__lodash_hash_undefined__":t,this},Ce.prototype.clear=function(){this.__data__=[],this.size=0},Ce.prototype.delete=function(e){var t=this.__data__;return!(0>(e=et(t,e))||(e==t.length-1?t.pop():Ui.call(t,e,1),--this.size,0))},Ce.prototype.get=function(e){var t=this.__data__;return 0>(e=et(t,e))?R:t[e][1]},Ce.prototype.has=function(e){return-1r?(++this.size,n.push([e,t])):n[r][1]=t,this},Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new Ae,map:new(po||Ce),string:new Ae}},Ne.prototype.delete=function(e){return e=Kn(this,e).delete(e),this.size-=e?1:0,e},Ne.prototype.get=function(e){return Kn(this,e).get(e)},Ne.prototype.has=function(e){return Kn(this,e).has(e)},Ne.prototype.set=function(e,t){var n=Kn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Le.prototype.clear=function(){this.__data__=new Ce,this.size=0},Le.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Le.prototype.get=function(e){return this.__data__.get(e)},Le.prototype.has=function(e){return this.__data__.has(e)},Le.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ce){var r=n.__data__;if(!po||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ne(r)}return n.set(e,t),this.size=n.size,this};var So=xn(pt),Mo=xn(gt,!0),Co=wn(),Oo=wn(!0),Do=xo?function(e,t){return xo.set(e,t),e}:hi,No=Ki?function(e,t){return Ki(e,"toString",{configurable:!0,enumerable:!1,value:ui(t),writable:!0})}:hi,Po=Ji||function(e){return Re.clearTimeout(e)},Ro=mo&&1/D(new mo([,-0]))[1]==L?function(e){return new mo(e)}:pi,Lo=xo?function(e){return xo.get(e)}:pi,Fo=to?function(e){return null==e?[]:(e=$i(e),a(to(e),function(t){return Wi.call(e,t)}))}:mi,zo=to?function(e){for(var t=[];e;)u(t,Fo(e)),e=Hi(e);return t}:mi,Bo=xt;(fo&&"[object DataView]"!=Bo(new fo(new ArrayBuffer(1)))||po&&"[object Map]"!=Bo(new po)||go&&"[object Promise]"!=Bo(go.resolve())||mo&&"[object Set]"!=Bo(new mo)||vo&&"[object WeakMap]"!=Bo(new vo))&&(Bo=function(e){var t=xt(e);if(e=(e="[object Object]"==t?e.constructor:R)?dr(e):"")switch(e){case bo:return"[object DataView]";case _o:return"[object Map]";case $o:return"[object Promise]";case ko:return"[object Set]";case Ao:return"[object WeakMap]"}return t});var Ho=Ti?Fr:vi,Vo=ur(Do),Wo=Zi||function(e,t){return Re.setTimeout(e,t)},Uo=ur(No),Yo=function(e){var t=(e=Or(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(X,function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)}),t}),qo=Vt(function(e,t){return Rr(e)?ct(e,dt(t,1,Rr,!0)):[]}),Qo=Vt(function(e,t){var n=wr(t);return Rr(n)&&(n=R),Rr(e)?ct(e,dt(t,1,Rr,!0),Qn(n,2)):[]}),Ko=Vt(function(e,t){var n=wr(t);return Rr(n)&&(n=R),Rr(e)?ct(e,dt(t,1,Rr,!0),R,n):[]}),Jo=Vt(function(e){var t=c(e,on);return t.length&&t[0]===e[0]?$t(t):[]}),Go=Vt(function(e){var t=wr(e),n=c(e,on);return t===wr(n)?t=R:n.pop(),n.length&&n[0]===e[0]?$t(n,Qn(t,2)):[]}),Zo=Vt(function(e){var t=wr(e),n=c(e,on);return(t="function"==typeof t?t:R)&&n.pop(),n.length&&n[0]===e[0]?$t(n,R,t):[]}),Xo=Vt(br),ea=Vn(function(e,t){var n=null==e?0:e.length,r=it(e,t);return zt(e,c(t,function(e){return tr(e,n)?+e:e}).sort(fn)),r}),ta=Vt(function(e){return Zt(dt(e,1,Rr,!0))}),na=Vt(function(e){var t=wr(e);return Rr(t)&&(t=R),Zt(dt(e,1,Rr,!0),Qn(t,2))}),ra=Vt(function(e){var t="function"==typeof(t=wr(e))?t:R;return Zt(dt(e,1,Rr,!0),R,t)}),ia=Vt(function(e,t){return Rr(e)?ct(e,t):[]}),oa=Vt(function(e){return nn(a(e,Rr))}),aa=Vt(function(e){var t=wr(e);return Rr(t)&&(t=R),nn(a(e,Rr),Qn(t,2))}),sa=Vt(function(e){var t="function"==typeof(t=wr(e))?t:R;return nn(a(e,Rr),R,t)}),la=Vt($r),ca=Vt(function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:R)?(e.pop(),t):R;return kr(e,t)}),ua=Vn(function(e){function t(t){return it(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1=t}),Sa=At(function(){return arguments}())?At:function(e){return Vr(e)&&Mi.call(e,"callee")&&!Wi.call(e,"callee")},Ma=yi.isArray,Ca=Ve?A(Ve):function(e){return Vr(e)&&"[object ArrayBuffer]"==xt(e)},Oa=no||vi,Da=We?A(We):function(e){return Vr(e)&&"[object Date]"==xt(e)},Na=Ue?A(Ue):function(e){return Vr(e)&&"[object Map]"==Bo(e)},Pa=Ye?A(Ye):function(e){return Vr(e)&&"[object RegExp]"==xt(e)},Ra=qe?A(qe):function(e){return Vr(e)&&"[object Set]"==Bo(e)},La=Qe?A(Qe):function(e){return Vr(e)&&Br(e.length)&&!!Se[xt(e)]},Fa=Dn(Mt),za=Dn(function(e,t){return e<=t}),Ba=yn(function(e,t){if(or(t)||Pr(t))mn(t,ri(t),e);else for(var n in t)Mi.call(t,n)&&Ke(e,n,t[n])}),Ha=yn(function(e,t){mn(t,ii(t),e)}),Va=yn(function(e,t,n,r){mn(t,ii(t),e,r)}),Wa=yn(function(e,t,n,r){mn(t,ri(t),e,r)}),Ua=Vn(it),Ya=Vt(function(e,t){e=$i(e);var n=-1,r=t.length;for((i=2--e)return t.apply(this,arguments)}},b.ary=Sr,b.assign=Ba,b.assignIn=Ha,b.assignInWith=Va,b.assignWith=Wa,b.at=Ua,b.before=Mr,b.bind=wa,b.bindAll=fs,b.bindKey=ba,b.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ma(e)?e:[e]},b.chain=Ar,b.chunk=function(e,t,n){if(t=(n?nr(e,t,n):t===R)?1:ao(Jr(t),0),!(n=null==e?0:e.length)||1>t)return[];for(var r=0,i=0,o=yi(Xi(n/t));r(t=n||t===R?1:Jr(t))?0:t,r):[]},b.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Ut(e,0,0>(t=r-(t=n||t===R?1:Jr(t)))?0:t):[]},b.dropRightWhile=function(e,t){return e&&e.length?en(e,Qn(t,3),!0,!0):[]},b.dropWhile=function(e,t){return e&&e.length?en(e,Qn(t,3),!0):[]},b.fill=function(e,t,n,r){var i=null==e?0:e.length;if(!i)return[];for(n&&"number"!=typeof n&&nr(e,t,n)&&(n=0,r=i),i=e.length,0>(n=Jr(n))&&(n=-n>i?0:i+n),0>(r=r===R||r>i?i:Jr(r))&&(r+=i),r=n>r?0:Gr(r);n>>0)?(e=ei(e))&&("string"==typeof t||null!=t&&!Pa(t))&&(!(t=Gt(t))&&je.test(e))?ln(P(e),0,n):e.split(t,n):[]},b.spread=function(e,t){if("function"!=typeof e)throw new Ei("Expected a function");return t=null==t?0:ao(Jr(t),0),Vt(function(r){var i=r[t];return r=ln(r,0,t),i&&u(r,i),n(e,this,r)})},b.tail=function(e){var t=null==e?0:e.length;return t?Ut(e,1,t):[]},b.take=function(e,t,n){return e&&e.length?Ut(e,0,0>(t=n||t===R?1:Jr(t))?0:t):[]},b.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Ut(e,0>(t=r-(t=n||t===R?1:Jr(t)))?0:t,r):[]},b.takeRightWhile=function(e,t){return e&&e.length?en(e,Qn(t,3),!1,!0):[]},b.takeWhile=function(e,t){return e&&e.length?en(e,Qn(t,3)):[]},b.tap=function(e,t){return t(e),e},b.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ei("Expected a function");return Hr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Cr(e,t,{leading:r,maxWait:t,trailing:i})},b.thru=Er,b.toArray=Qr,b.toPairs=ts,b.toPairsIn=ns,b.toPath=function(e){return Ma(e)?c(e,fr):qr(e)?[e]:gn(Yo(ei(e)))},b.toPlainObject=Xr,b.transform=function(e,t,n){var r=Ma(e),o=r||Oa(e)||La(e);if(t=Qn(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:Hr(e)&&Fr(a)?To(Hi(e)):{}}return(o?i:pt)(e,function(e,r,i){return t(n,e,r,i)}),n},b.unary=function(e){return Sr(e,1)},b.union=ta,b.unionBy=na,b.unionWith=ra,b.uniq=function(e){return e&&e.length?Zt(e):[]},b.uniqBy=function(e,t){return e&&e.length?Zt(e,Qn(t,2)):[]},b.uniqWith=function(e,t){return t="function"==typeof t?t:R,e&&e.length?Zt(e,R,t):[]},b.unset=function(e,t){return null==e||Xt(e,t)},b.unzip=$r,b.unzipWith=kr,b.update=function(e,t,n){return null==e?e:Wt(e,t,an(n)(vt(e,t)),void 0)},b.updateWith=function(e,t,n,r){return r="function"==typeof r?r:R,null!=e&&(e=Wt(e,t,an(n)(vt(e,t)),r)),e},b.values=ai,b.valuesIn=function(e){return null==e?[]:E(e,ii(e))},b.without=ia,b.words=ci,b.wrap=function(e,t){return Aa(an(t),e)},b.xor=oa,b.xorBy=aa,b.xorWith=sa,b.zip=la,b.zipObject=function(e,t){return rn(e||[],t||[],Ke)},b.zipObjectDeep=function(e,t){return rn(e||[],t||[],Wt)},b.zipWith=ca,b.entries=ts,b.entriesIn=ns,b.extend=Ha,b.extendWith=Va,di(b,b),b.add=_s,b.attempt=hs,b.camelCase=rs,b.capitalize=si,b.ceil=$s,b.clamp=function(e,t,n){return n===R&&(n=t,t=R),n!==R&&(n=(n=Zr(n))==n?n:0),t!==R&&(t=(t=Zr(t))==t?t:0),ot(Zr(e),t,n)},b.clone=function(e){return at(e,4)},b.cloneDeep=function(e){return at(e,5)},b.cloneDeepWith=function(e,t){return at(e,5,t="function"==typeof t?t:R)},b.cloneWith=function(e,t){return at(e,4,t="function"==typeof t?t:R)},b.conformsTo=function(e,t){return null==t||st(e,t,ri(t))},b.deburr=li,b.defaultTo=function(e,t){return null==e||e!=e?t:e},b.divide=ks,b.endsWith=function(e,t,n){e=ei(e),t=Gt(t);var r=e.length;r=n=n===R?r:ot(Jr(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},b.eq=Nr,b.escape=function(e){return(e=ei(e))&&q.test(e)?e.replace(U,Ge):e},b.escapeRegExp=function(e){return(e=ei(e))&&ne.test(e)?e.replace(ee,"\\$&"):e},b.every=function(e,t,n){var r=Ma(e)?o:ut;return n&&nr(e,t,n)&&(t=R),r(e,Qn(t,3))},b.find=fa,b.findIndex=mr,b.findKey=function(e,t){return p(e,Qn(t,3),pt)},b.findLast=da,b.findLastIndex=vr,b.findLastKey=function(e,t){return p(e,Qn(t,3),gt)},b.floor=As,b.forEach=jr,b.forEachRight=Ir,b.forIn=function(e,t){return null==e?e:Co(e,Qn(t,3),ii)},b.forInRight=function(e,t){return null==e?e:Oo(e,Qn(t,3),ii)},b.forOwn=function(e,t){return e&&pt(e,Qn(t,3))},b.forOwnRight=function(e,t){return e&>(e,Qn(t,3))},b.get=ti,b.gt=Ia,b.gte=Ta,b.has=function(e,t){return null!=e&&Zn(e,t,bt)},b.hasIn=ni,b.head=xr,b.identity=hi,b.includes=function(e,t,n,r){return e=Pr(e)?e:ai(e),n=n&&!r?Jr(n):0,r=e.length,0>n&&(n=ao(r+n,0)),Yr(e)?n<=r&&-1(n=null==n?0:Jr(n))&&(n=ao(r+n,0)),m(e,t,n)):-1},b.inRange=function(e,t,n){return t=Kr(t),n===R?(n=t,t=0):n=Kr(n),(e=Zr(e))>=so(t,n)&&e=e},b.isSet=Ra,b.isString=Yr,b.isSymbol=qr,b.isTypedArray=La,b.isUndefined=function(e){return e===R},b.isWeakMap=function(e){return Vr(e)&&"[object WeakMap]"==Bo(e)},b.isWeakSet=function(e){return Vr(e)&&"[object WeakSet]"==xt(e)},b.join=function(e,t){return null==e?"":io.call(e,t)},b.kebabCase=is,b.last=wr,b.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==R&&(i=0>(i=Jr(n))?ao(r+i,0):so(i,r-1)),t==t){for(n=i+1;n--&&e[n]!==t;);e=n}else e=g(e,y,i,!0);return e},b.lowerCase=os,b.lowerFirst=as,b.lt=Fa,b.lte=za,b.max=function(e){return e&&e.length?ht(e,hi,wt):R},b.maxBy=function(e,t){return e&&e.length?ht(e,Qn(t,2),wt):R},b.mean=function(e){return x(e,hi)},b.meanBy=function(e,t){return x(e,Qn(t,2))},b.min=function(e){return e&&e.length?ht(e,hi,Mt):R},b.minBy=function(e,t){return e&&e.length?ht(e,Qn(t,2),Mt):R},b.stubArray=mi,b.stubFalse=vi,b.stubObject=function(){return{}},b.stubString=function(){return""},b.stubTrue=function(){return!0},b.multiply=Es,b.nth=function(e,t){return e&&e.length?Pt(e,Jr(t)):R},b.noConflict=function(){return Re._===this&&(Re._=Pi),this},b.noop=pi,b.now=xa,b.pad=function(e,t,n){e=ei(e);var r=(t=Jr(t))?N(e):0;return!t||r>=t?e:Mn(eo(t=(t-r)/2),n)+e+Mn(Xi(t),n)},b.padEnd=function(e,t,n){e=ei(e);var r=(t=Jr(t))?N(e):0;return t&&rt){var r=e;e=t,t=r}return n||e%1||t%1?(n=uo(),so(e+n*(t-e+Oe("1e-"+((n+"").length-1))),t)):Bt(e,t)},b.reduce=function(e,t,n){var r=Ma(e)?h:_,i=3>arguments.length;return r(e,Qn(t,4),n,i,So)},b.reduceRight=function(e,t,n){var r=Ma(e)?f:_,i=3>arguments.length;return r(e,Qn(t,4),n,i,Mo)},b.repeat=function(e,t,n){return t=(n?nr(e,t,n):t===R)?1:Jr(t),Ht(ei(e),t)},b.replace=function(){var e=arguments,t=ei(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},b.result=function(e,t,n){var r=-1,i=(t=sn(t,e)).length;for(i||(i=1,e=R);++r(e=Jr(e))||9007199254740991=o)return e;if(1>(o=n-N(r)))return r;if(n=a?ln(a,0,o).join(""):e.slice(0,o),i===R)return n+r;if(a&&(o+=n.length-o),Pa(i)){if(e.slice(o).search(i)){var s=n;for(i.global||(i=ki(i.source,ei(fe.exec(i))+"g")),i.lastIndex=0;a=i.exec(s);)var l=a.index;n=n.slice(0,l===R?o:l)}}else e.indexOf(Gt(i),o)!=o&&(-1<(i=n.lastIndexOf(i))&&(n=n.slice(0,i)));return n+r},b.unescape=function(e){return(e=ei(e))&&Y.test(e)?e.replace(W,Ze):e},b.uniqueId=function(e){var t=++Ci;return ei(e)+t},b.upperCase=cs,b.upperFirst=us,b.each=jr,b.eachRight=Ir,b.first=xr,di(b,function(){var e={};return pt(b,function(t,n){Mi.call(b.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),b.VERSION="4.17.14",i("bind bindKey curry curryRight partial partialRight".split(" "),function(e){b[e].placeholder=b}),i(["drop","take"],function(e,t){_e.prototype[e]=function(n){n=n===R?1:ao(Jr(n),0);var r=this.__filtered__&&!t?new _e(this):this.clone();return r.__filtered__?r.__takeCount__=so(n,r.__takeCount__):r.__views__.push({size:so(n,4294967295),type:e+(0>r.__dir__?"Right":"")}),r},_e.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),i(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;_e.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Qn(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),i(["head","last"],function(e,t){var n="take"+(t?"Right":"");_e.prototype[e]=function(){return this[n](1).value()[0]}}),i(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");_e.prototype[e]=function(){return this.__filtered__?new _e(this):this[n](1)}}),_e.prototype.compact=function(){return this.filter(hi)},_e.prototype.find=function(e){return this.filter(e).head()},_e.prototype.findLast=function(e){return this.reverse().find(e)},_e.prototype.invokeMap=Vt(function(e,t){return"function"==typeof e?new _e(this):this.map(function(n){return kt(n,e,t)})}),_e.prototype.reject=function(e){return this.filter(Dr(Qn(e)))},_e.prototype.slice=function(e,t){e=Jr(e);var n=this;return n.__filtered__&&(0t)?new _e(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==R&&(n=0>(t=Jr(t))?n.dropRight(-t):n.take(t-e)),n)},_e.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_e.prototype.toArray=function(){return this.take(4294967295)},pt(_e.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=b[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(b.prototype[t]=function(){function t(e){return e=i.apply(b,u([e],s)),r&&f?e[0]:e}var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof _e,c=s[0],h=l||Ma(a);h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var f=this.__chain__,d=!!this.__actions__.length;c=o&&!f,l=l&&!d;return!o&&h?(a=l?a:new _e(this),(a=e.apply(a,s)).__actions__.push({func:Er,args:[t],thisArg:R}),new be(a,f)):c&&l?e.apply(this,s):(a=this.thru(t),c?r?a.value()[0]:a.value():a)})}),i("pop push shift sort splice unshift".split(" "),function(e){var t=ji[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);b.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ma(i)?i:[],e)}return this[n](function(n){return t.apply(Ma(n)?n:[],e)})}}),pt(_e.prototype,function(e,t){var n=b[t];if(n){var r=n.name+"";Mi.call(wo,r)||(wo[r]=[]),wo[r].push({name:t,func:n})}}),wo[jn(R,2).name]=[{name:"wrapper",func:R}],_e.prototype.clone=function(){var e=new _e(this.__wrapped__);return e.__actions__=gn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gn(this.__views__),e},_e.prototype.reverse=function(){if(this.__filtered__){var e=new _e(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},_e.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=Ma(t),i=0>n,o=r?t.length:0;e=o;for(var a=this.__views__,s=0,l=-1,c=a.length;++l=this.__values__.length;return{done:e,value:e?R:this.__values__[this.__index__++]}},b.prototype.plant=function(e){for(var t,n=this;n instanceof te;){var r=gr(n);r.__index__=0,r.__values__=R,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},b.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof _e?(this.__actions__.length&&(e=new _e(this)),(e=e.reverse()).__actions__.push({func:Er,args:[_r],thisArg:R}),new be(e,this.__chain__)):this.thru(_r)},b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=function(){return tn(this.__wrapped__,this.__actions__)},b.prototype.first=b.prototype.head,qi&&(b.prototype[qi]=function(){return this}),b}();Fe?((Fe.exports=Xe)._=Xe,Le._=Xe):Re._=Xe}).call(te)}),ie=ne(function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,r={};for(var i in n){var o=n[i];e.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}}),oe=(ie.aliasToReal,ie.aryMethod,ie.aryRearg,ie.iterateeAry,ie.iterateeRearg,ie.methodRearg,ie.methodSpread,ie.mutate,ie.realToAlias,ie.remap,ie.skipFixed,ie.skipRearg,{}),ae=Array.prototype.push;function se(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function le(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function ce(e,t){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=t.apply(void 0,r);return e.apply(void 0,r),i}}}var ue=function e(t,n,r,i){var o="function"==typeof n,a=n===Object(n);if(a&&(i=r,r=n,n=void 0),null==r)throw new TypeError;i||(i={});var s={cap:!("cap"in i)||i.cap,curry:!("curry"in i)||i.curry,fixed:!("fixed"in i)||i.fixed,immutable:!("immutable"in i)||i.immutable,rearg:!("rearg"in i)||i.rearg},l=o?r:oe,c="curry"in i&&i.curry,u="fixed"in i&&i.fixed,h="rearg"in i&&i.rearg,f=o?r.runInContext():void 0,d=o?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},p=d.ary,g=d.assign,m=d.clone,v=d.curry,y=d.forEach,x=d.isArray,w=d.isError,b=d.isFunction,_=d.isWeakMap,$=d.keys,k=d.rearg,A=d.toInteger,E=d.toPath,j=$(ie.aryMethod),I={castArray:function(e){return function(){var t=arguments[0];return x(t)?e(le(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],r=e(t,n),i=r.length;return s.cap&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:se(r,n)):r}},mixin:function(e){return function(t){var n=this;if(!b(n))return e(n,Object(t));var r=[];return y($(t),function(e){b(t[e])&&r.push([e,n.prototype[e]])}),e(n,Object(t)),y(r,function(e){var t=e[1];b(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]}),n}},nthArg:function(e){return function(t){var n=t<0?1:A(t)+1;return v(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return v(e(t,n),r)}},runInContext:function(n){return function(r){return e(t,n(r),i)}}};function T(e,t){if(s.cap){var n=ie.iterateeRearg[e];if(n)return function(e,t){return D(e,function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(k(se(e,n),t),n)})}(t,n);var r=!o&&ie.iterateeAry[e];if(r)return function(e,t){return D(e,function(e){return"function"==typeof e?se(e,t):e})}(t,r)}return t}function S(e,t,n){if(s.fixed&&(u||!ie.skipFixed[e])){var r=ie.methodSpread[e],i=r&&r.start;return void 0===i?p(t,n):function(e,t){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var o=i[t],a=i.slice(0,t);return o&&ae.apply(a,o),t!=r&&ae.apply(a,i.slice(t+1)),e.apply(this,a)}}(t,i)}return t}function M(e,t,n){return s.rearg&&n>1&&(h||!ie.skipRearg[e])?k(t,ie.methodRearg[e]||ie.aryRearg[n]):t}function C(e,t){for(var n=-1,r=(t=E(t)).length,i=r-1,o=m(Object(e)),a=o;null!=a&&++n1?v(l,u):l,!1}var l,u}),!r}),r||(r=o),r==t&&(r=c?v(r,1):function(){return t.apply(this,arguments)}),r.convert=O(i,t),r.placeholder=t.placeholder=n,r}if(!a)return N(n,r,l);var P=r,R=[];return y(j,function(e){y(ie.aryMethod[e],function(e){var t=P[ie.remap[e]||e];t&&R.push([e,N(e,t,P)])})}),y($(P),function(e){var t=P[e];if("function"==typeof t){for(var n=R.length;n--;)if(R[n][0]==e)return;t.convert=O(e,t),R.push([e,t])}}),y(R,function(e){P[e[0]]=e[1]}),P.convert=function(e){return P.runInContext.convert(e)(void 0)},P.placeholder=P,y($(P),function(e){y(ie.realToAlias[e]||[],function(t){P[t]=P[e]})}),P},he=re.runInContext(),fe=ue(he,he),de=fe.union,pe=fe.reduce,ge=fe.isUndefined,me=fe.cloneDeep,ve=fe.split,ye=fe.some,xe=fe.map,we=fe.filter,be=fe.isEmpty,_e=fe.countBy,$e=fe.includes,ke=fe.last,Ae=fe.find,Ee=fe.constant,je=fe.take,Ie=fe.first,Te=fe.intersection,Se=fe.mapValues,Me=fe.isNull,Ce=fe.has,Oe=fe.isNumber,De=fe.isString,Ne=fe.isBoolean,Pe=(fe.isDate,fe.isArray,fe.isObject,fe.clone),Re=fe.values,Le=fe.keyBy,Fe=fe.keys,ze=(fe.orderBy,fe.concat),Be=(fe.reverse,fe.difference),He=(fe.merge,fe.flatten),Ve=fe.each,We=(fe.pull,fe.join),Ue=fe.defaultCase,Ye=fe.uniqBy,qe=fe.every,Qe=fe.uniqWith,Ke=(fe.isFunction,fe.groupBy),Je=(fe.differenceBy,fe.intersectionBy,fe.isEqual,fe.max),Ge=fe.sortBy,Ze=fe.assign,Xe=1;var et,tt,nt,rt={nextValue:function(){return(Xe=(9301*Xe+49297)%233280)/233280},seed:function(e){Xe=e}},it="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function ot(){nt=!1}function at(e){if(e){if(e!==et){if(e.length!==it.length)throw new Error("Custom alphabet for shortid must be "+it.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter(function(e,t,n){return t!==n.lastIndexOf(e)});if(t.length)throw new Error("Custom alphabet for shortid must be "+it.length+" unique characters. These characters were not unique: "+t.join(", "));et=e,ot()}}else et!==it&&(et=it,ot())}function st(){return nt||(nt=function(){et||at(it);for(var e,t=et.split(""),n=[],r=rt.nextValue();t.length>0;)r=rt.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}var lt={get:function(){return et||it},characters:function(e){return at(e),et},seed:function(e){rt.seed(e),tt!==e&&(ot(),tt=e)},lookup:function(e){return st()[e]},shuffled:st},ct="object"==typeof window&&(window.crypto||window.msCrypto),ut=ct&&ct.getRandomValues?function(e){return ct.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=pt(ft)),t+=pt(n)};var yt=function(e){return!(!e||"string"!=typeof e||e.length<6||new RegExp("[^"+lt.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e))},xt=ne(function(e){var t=0;function n(){return vt(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return lt.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&<.characters(e),lt.shuffled()},e.exports.isValid=yt}),wt=(xt.generate,xt.seed,xt.worker,xt.characters,xt.isValid,xt.generate),bt=ne(function(e,t){(function(){var n,r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="__lodash_hash_undefined__",s=500,l="__lodash_placeholder__",c=1,u=2,h=4,f=1,d=2,p=1,g=2,m=4,v=8,y=16,x=32,w=64,b=128,_=256,$=512,k=30,A="...",E=800,j=16,I=1,T=2,S=1/0,M=9007199254740991,C=1.7976931348623157e308,O=NaN,D=4294967295,N=D-1,P=D>>>1,R=[["ary",b],["bind",p],["bindKey",g],["curry",v],["curryRight",y],["flip",$],["partial",x],["partialRight",w],["rearg",_]],L="[object Arguments]",F="[object Array]",z="[object AsyncFunction]",B="[object Boolean]",H="[object Date]",V="[object DOMException]",W="[object Error]",U="[object Function]",Y="[object GeneratorFunction]",q="[object Map]",Q="[object Number]",K="[object Null]",J="[object Object]",G="[object Proxy]",Z="[object RegExp]",X="[object Set]",ee="[object String]",ne="[object Symbol]",re="[object Undefined]",ie="[object WeakMap]",oe="[object WeakSet]",ae="[object ArrayBuffer]",se="[object DataView]",le="[object Float32Array]",ce="[object Float64Array]",ue="[object Int8Array]",he="[object Int16Array]",fe="[object Int32Array]",de="[object Uint8Array]",pe="[object Uint8ClampedArray]",ge="[object Uint16Array]",me="[object Uint32Array]",ve=/\b__p \+= '';/g,ye=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,we=/&(?:amp|lt|gt|quot|#39);/g,be=/[&<>"']/g,_e=RegExp(we.source),$e=RegExp(be.source),ke=/<%-([\s\S]+?)%>/g,Ae=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ie=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Se=/[\\^$.*+?()[\]{}|]/g,Me=RegExp(Se.source),Ce=/^\s+|\s+$/g,Oe=/^\s+/,De=/\s+$/,Ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pe=/\{\n\/\* \[wrapped with (.+)\] \*/,Re=/,? & /,Le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/\\(\\)?/g,ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,Ve=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ue=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Ke=/['\n\r\u2028\u2029\\]/g,Je="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ge="\\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",Ze="[\\ud800-\\udfff]",Xe="["+Ge+"]",et="["+Je+"]",tt="\\d+",nt="[\\u2700-\\u27bf]",rt="[a-z\\xdf-\\xf6\\xf8-\\xff]",it="[^\\ud800-\\udfff"+Ge+tt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ot="\\ud83c[\\udffb-\\udfff]",at="[^\\ud800-\\udfff]",st="(?:\\ud83c[\\udde6-\\uddff]){2}",lt="[\\ud800-\\udbff][\\udc00-\\udfff]",ct="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ut="(?:"+rt+"|"+it+")",ht="(?:"+ct+"|"+it+")",ft="(?:"+et+"|"+ot+")"+"?",dt="[\\ufe0e\\ufe0f]?"+ft+("(?:\\u200d(?:"+[at,st,lt].join("|")+")[\\ufe0e\\ufe0f]?"+ft+")*"),pt="(?:"+[nt,st,lt].join("|")+")"+dt,gt="(?:"+[at+et+"?",et,st,lt,Ze].join("|")+")",mt=RegExp("['’]","g"),vt=RegExp(et,"g"),yt=RegExp(ot+"(?="+ot+")|"+gt+dt,"g"),xt=RegExp([ct+"?"+rt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Xe,ct,"$"].join("|")+")",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Xe,ct+ut,"$"].join("|")+")",ct+"?"+ut+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ct+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tt,pt].join("|"),"g"),wt=RegExp("[\\u200d\\ud800-\\udfff"+Je+"\\ufe0e\\ufe0f]"),bt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_t=["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"],$t=-1,kt={};kt[le]=kt[ce]=kt[ue]=kt[he]=kt[fe]=kt[de]=kt[pe]=kt[ge]=kt[me]=!0,kt[L]=kt[F]=kt[ae]=kt[B]=kt[se]=kt[H]=kt[W]=kt[U]=kt[q]=kt[Q]=kt[J]=kt[Z]=kt[X]=kt[ee]=kt[ie]=!1;var At={};At[L]=At[F]=At[ae]=At[se]=At[B]=At[H]=At[le]=At[ce]=At[ue]=At[he]=At[fe]=At[q]=At[Q]=At[J]=At[Z]=At[X]=At[ee]=At[ne]=At[de]=At[pe]=At[ge]=At[me]=!0,At[W]=At[U]=At[ie]=!1;var Et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jt=parseFloat,It=parseInt,Tt="object"==typeof te&&te&&te.Object===Object&&te,St="object"==typeof self&&self&&self.Object===Object&&self,Mt=Tt||St||Function("return this")(),Ct=t&&!t.nodeType&&t,Ot=Ct&&e&&!e.nodeType&&e,Dt=Ot&&Ot.exports===Ct,Nt=Dt&&Tt.process,Pt=function(){try{var e=Ot&&Ot.require&&Ot.require("util").types;return e||Nt&&Nt.binding&&Nt.binding("util")}catch(e){}}(),Rt=Pt&&Pt.isArrayBuffer,Lt=Pt&&Pt.isDate,Ft=Pt&&Pt.isMap,zt=Pt&&Pt.isRegExp,Bt=Pt&&Pt.isSet,Ht=Pt&&Pt.isTypedArray;function Vt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Wt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Jt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function xn(e,t){for(var n=e.length;n--&&an(t,e[n],0)>-1;);return n}var wn=hn({"À":"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"}),bn=hn({"&":"&","<":"<",">":">",'"':""","'":"'"});function _n(e){return"\\"+Et[e]}function $n(e){return wt.test(e)}function kn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function An(e,t){return function(n){return e(t(n))}}function En(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Cn=function e(t){var te,Je=(t=null==t?Mt:Cn.defaults(Mt.Object(),t,Cn.pick(Mt,_t))).Array,Ge=t.Date,Ze=t.Error,Xe=t.Function,et=t.Math,tt=t.Object,nt=t.RegExp,rt=t.String,it=t.TypeError,ot=Je.prototype,at=Xe.prototype,st=tt.prototype,lt=t["__core-js_shared__"],ct=at.toString,ut=st.hasOwnProperty,ht=0,ft=(te=/[^.]+$/.exec(lt&<.keys&<.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"",dt=st.toString,pt=ct.call(tt),gt=Mt._,yt=nt("^"+ct.call(ut).replace(Se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Dt?t.Buffer:n,Et=t.Symbol,Tt=t.Uint8Array,St=wt?wt.allocUnsafe:n,Ct=An(tt.getPrototypeOf,tt),Ot=tt.create,Nt=st.propertyIsEnumerable,Pt=ot.splice,nn=Et?Et.isConcatSpreadable:n,hn=Et?Et.iterator:n,On=Et?Et.toStringTag:n,Dn=function(){try{var e=Fo(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),Nn=t.clearTimeout!==Mt.clearTimeout&&t.clearTimeout,Pn=Ge&&Ge.now!==Mt.Date.now&&Ge.now,Rn=t.setTimeout!==Mt.setTimeout&&t.setTimeout,Ln=et.ceil,Fn=et.floor,zn=tt.getOwnPropertySymbols,Bn=wt?wt.isBuffer:n,Hn=t.isFinite,Vn=ot.join,Wn=An(tt.keys,tt),Un=et.max,Yn=et.min,qn=Ge.now,Qn=t.parseInt,Kn=et.random,Jn=ot.reverse,Gn=Fo(t,"DataView"),Zn=Fo(t,"Map"),Xn=Fo(t,"Promise"),er=Fo(t,"Set"),tr=Fo(t,"WeakMap"),nr=Fo(tt,"create"),rr=tr&&new tr,ir={},or=ha(Gn),ar=ha(Zn),sr=ha(Xn),lr=ha(er),cr=ha(tr),ur=Et?Et.prototype:n,hr=ur?ur.valueOf:n,fr=ur?ur.toString:n;function dr(e){if(Is(e)&&!vs(e)&&!(e instanceof vr)){if(e instanceof mr)return e;if(ut.call(e,"__wrapped__"))return fa(e)}return new mr(e)}var pr=function(){function e(){}return function(t){if(!js(t))return{};if(Ot)return Ot(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function gr(){}function mr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=D,this.__views__=[]}function yr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Nr(e,t,r,i,o,a){var s,l=t&c,f=t&u,d=t&h;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!js(e))return e;var p=vs(e);if(p){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ut.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return no(e,s)}else{var g=Ho(e),m=g==U||g==Y;if(bs(e))return Ji(e,l);if(g==J||g==L||m&&!o){if(s=f||m?{}:Wo(e),!l)return f?function(e,t){return ro(e,Bo(e),t)}(e,function(e,t){return e&&ro(t,ol(t),e)}(s,e)):function(e,t){return ro(e,zo(e),t)}(e,Mr(s,e))}else{if(!At[g])return o?e:{};s=function(e,t,n){var r,i,o,a=e.constructor;switch(t){case ae:return Gi(e);case B:case H:return new a(+e);case se:return function(e,t){var n=t?Gi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case le:case ce:case ue:case he:case fe:case de:case pe:case ge:case me:return Zi(e,n);case q:return new a;case Q:case ee:return new a(e);case Z:return(o=new(i=e).constructor(i.source,Be.exec(i))).lastIndex=i.lastIndex,o;case X:return new a;case ne:return r=e,hr?tt(hr.call(r)):{}}}(e,g,l)}}a||(a=new _r);var v=a.get(e);if(v)return v;a.set(e,s),Os(e)?e.forEach(function(n){s.add(Nr(n,t,r,n,e,a))}):Ts(e)&&e.forEach(function(n,i){s.set(i,Nr(n,t,r,i,e,a))});var y=p?n:(d?f?Co:Mo:f?ol:il)(e);return Ut(y||e,function(n,i){y&&(n=e[i=n]),Ir(s,i,Nr(n,t,r,i,e,a))}),s}function Pr(e,t,r){var i=r.length;if(null==e)return!i;for(e=tt(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function Rr(e,t,r){if("function"!=typeof e)throw new it(o);return ia(function(){e.apply(n,r)},t)}function Lr(e,t,n,i){var o=-1,a=Kt,s=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=Gt(t,gn(n))),i?(a=Jt,s=!1):t.length>=r&&(a=vn,s=!1,t=new br(t));e:for(;++o-1},xr.prototype.set=function(e,t){var n=this.__data__,r=Tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(Zn||xr),string:new yr}},wr.prototype.delete=function(e){var t=Ro(this,e).delete(e);return this.size-=t?1:0,t},wr.prototype.get=function(e){return Ro(this,e).get(e)},wr.prototype.has=function(e){return Ro(this,e).has(e)},wr.prototype.set=function(e,t){var n=Ro(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},br.prototype.add=br.prototype.push=function(e){return this.__data__.set(e,a),this},br.prototype.has=function(e){return this.__data__.has(e)},_r.prototype.clear=function(){this.__data__=new xr,this.size=0},_r.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_r.prototype.get=function(e){return this.__data__.get(e)},_r.prototype.has=function(e){return this.__data__.has(e)},_r.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xr){var i=n.__data__;if(!Zn||i.length0&&n(s)?t>1?Wr(s,t-1,n,r,i):Zt(i,s):r||(i[i.length]=s)}return i}var Ur=so(),Yr=so(!0);function qr(e,t){return e&&Ur(e,t,il)}function Qr(e,t){return e&&Yr(e,t,il)}function Kr(e,t){return Qt(t,function(t){return ks(e[t])})}function Jr(e,t){for(var r=0,i=(t=Yi(t,e)).length;null!=e&&rt}function ei(e,t){return null!=e&&ut.call(e,t)}function ti(e,t){return null!=e&&t in tt(e)}function ni(e,t,r){for(var i=r?Jt:Kt,o=e[0].length,a=e.length,s=a,l=Je(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=Gt(h,gn(t))),c=Yn(h.length,c),l[s]=!r&&(t||o>=120&&h.length>=120)?new br(s&&h):n}h=e[0];var f=-1,d=l[0];e:for(;++f=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)})}function yi(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Pt.call(s,l,1),Pt.call(e,l,1);return e}function wi(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Yo(i)?Pt.call(e,i,1):Li(e,i)}}return e}function bi(e,t){return e+Fn(Kn()*(t-e+1))}function _i(e,t){var n="";if(!e||t<1||t>M)return n;do{t%2&&(n+=e),(t=Fn(t/2))&&(e+=e)}while(t);return n}function $i(e,t){return oa(ea(e,t,Sl),e+"")}function ki(e){return kr(dl(e))}function Ai(e,t){var n=dl(e);return la(n,Dr(t,0,n.length))}function Ei(e,t,r,i){if(!js(e))return e;for(var o=-1,a=(t=Yi(t,e)).length,s=a-1,l=e;null!=l&&++oi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Je(i);++r>>1,a=e[o];null!==a&&!Ns(a)&&(n?a<=t:a=r){var u=t?null:$o(e);if(u)return jn(u);s=!1,o=vn,c=new br}else c=t?[]:l;e:for(;++i=i?e:Si(e,t,r)}var Ki=Nn||function(e){return Mt.clearTimeout(e)};function Ji(e,t){if(t)return e.slice();var n=e.length,r=St?St(n):new e.constructor(n);return e.copy(r),r}function Gi(e){var t=new e.constructor(e.byteLength);return new Tt(t).set(new Tt(e)),t}function Zi(e,t){var n=t?Gi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Xi(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=Ns(e),s=t!==n,l=null===t,c=t==t,u=Ns(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&qo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=tt(t);++i-1?o[a?t[s]:s]:n}}function fo(e){return So(function(t){var r=t.length,i=r,a=mr.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new it(o);if(a&&!l&&"wrapper"==Do(s))var l=new mr([],!0)}for(i=l?i:r;++i1&&v.reverse(),h&&cl))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var h=-1,p=!0,g=r&d?new br:n;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ne,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ut(R,function(n){var r="_."+n[0];t&n[1]&&!Kt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Pe);return t?t[1].split(Re):[]}(r),n)))}function sa(e){var t=0,r=0;return function(){var i=qn(),o=j-(i-r);if(r=i,o>0){if(++t>=E)return arguments[0]}else t=0;return e.apply(n,arguments)}}function la(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,Ca(e,r)});function Fa(e){var t=dr(e);return t.__chain__=!0,t}function za(e,t){return t(e)}var Ba=So(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return Or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof vr&&Yo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:za,args:[o],thisArg:n}),new mr(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)});var Ha=io(function(e,t,n){ut.call(e,n)?++e[n]:Cr(e,n,1)});var Va=ho(ma),Wa=ho(va);function Ua(e,t){return(vs(e)?Ut:Fr)(e,Po(t,3))}function Ya(e,t){return(vs(e)?Yt:zr)(e,Po(t,3))}var qa=io(function(e,t,n){ut.call(e,n)?e[n].push(t):Cr(e,n,[t])});var Qa=$i(function(e,t,n){var r=-1,i="function"==typeof t,o=xs(e)?Je(e.length):[];return Fr(e,function(e){o[++r]=i?Vt(t,e,n):ri(e,t,n)}),o}),Ka=io(function(e,t,n){Cr(e,n,t)});function Ja(e,t){return(vs(e)?Gt:fi)(e,Po(t,3))}var Ga=io(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Za=$i(function(e,t){if(null==e)return[];var n=t.length;return n>1&&qo(e,t[0],t[1])?t=[]:n>2&&qo(t[0],t[1],t[2])&&(t=[t[0]]),vi(e,Wr(t,1),[])}),Xa=Pn||function(){return Mt.Date.now()};function es(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Ao(e,b,n,n,n,n,t)}function ts(e,t){var r;if("function"!=typeof t)throw new it(o);return e=Bs(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var ns=$i(function(e,t,n){var r=p;if(n.length){var i=En(n,No(ns));r|=x}return Ao(e,r,t,n,i)}),rs=$i(function(e,t,n){var r=p|g;if(n.length){var i=En(n,No(rs));r|=x}return Ao(t,r,e,n,i)});function is(e,t,r){var i,a,s,l,c,u,h=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new it(o);function g(t){var r=i,o=a;return i=a=n,h=t,l=e.apply(o,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||d&&e-h>=s}function v(){var e=Xa();if(m(e))return y(e);c=ia(v,function(e){var n=t-(e-u);return d?Yn(n,s-(e-h)):n}(e))}function y(e){return c=n,p&&i?g(e):(i=a=n,l)}function x(){var e=Xa(),r=m(e);if(i=arguments,a=this,u=e,r){if(c===n)return function(e){return h=e,c=ia(v,t),f?g(e):l}(u);if(d)return Ki(c),c=ia(v,t),g(u)}return c===n&&(c=ia(v,t)),l}return t=Vs(t)||0,js(r)&&(f=!!r.leading,s=(d="maxWait"in r)?Un(Vs(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),x.cancel=function(){c!==n&&Ki(c),h=0,i=u=a=c=n},x.flush=function(){return c===n?l:y(Xa())},x}var os=$i(function(e,t){return Rr(e,1,t)}),as=$i(function(e,t,n){return Rr(e,Vs(t)||0,n)});function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||wr),n}function ls(e){if("function"!=typeof e)throw new it(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ss.Cache=wr;var cs=qi(function(e,t){var n=(t=1==t.length&&vs(t[0])?Gt(t[0],gn(Po())):Gt(Wr(t,1),gn(Po()))).length;return $i(function(r){for(var i=-1,o=Yn(r.length,n);++i=t}),ms=ii(function(){return arguments}())?ii:function(e){return Is(e)&&ut.call(e,"callee")&&!Nt.call(e,"callee")},vs=Je.isArray,ys=Rt?gn(Rt):function(e){return Is(e)&&Zr(e)==ae};function xs(e){return null!=e&&Es(e.length)&&!ks(e)}function ws(e){return Is(e)&&xs(e)}var bs=Bn||Vl,_s=Lt?gn(Lt):function(e){return Is(e)&&Zr(e)==H};function $s(e){if(!Is(e))return!1;var t=Zr(e);return t==W||t==V||"string"==typeof e.message&&"string"==typeof e.name&&!Ms(e)}function ks(e){if(!js(e))return!1;var t=Zr(e);return t==U||t==Y||t==z||t==G}function As(e){return"number"==typeof e&&e==Bs(e)}function Es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=M}function js(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Is(e){return null!=e&&"object"==typeof e}var Ts=Ft?gn(Ft):function(e){return Is(e)&&Ho(e)==q};function Ss(e){return"number"==typeof e||Is(e)&&Zr(e)==Q}function Ms(e){if(!Is(e)||Zr(e)!=J)return!1;var t=Ct(e);if(null===t)return!0;var n=ut.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==pt}var Cs=zt?gn(zt):function(e){return Is(e)&&Zr(e)==Z};var Os=Bt?gn(Bt):function(e){return Is(e)&&Ho(e)==X};function Ds(e){return"string"==typeof e||!vs(e)&&Is(e)&&Zr(e)==ee}function Ns(e){return"symbol"==typeof e||Is(e)&&Zr(e)==ne}var Ps=Ht?gn(Ht):function(e){return Is(e)&&Es(e.length)&&!!kt[Zr(e)]};var Rs=wo(hi),Ls=wo(function(e,t){return e<=t});function Fs(e){if(!e)return[];if(xs(e))return Ds(e)?Sn(e):no(e);if(hn&&e[hn])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[hn]());var t=Ho(e);return(t==q?kn:t==X?jn:dl)(e)}function zs(e){return e?(e=Vs(e))===S||e===-S?(e<0?-1:1)*C:e==e?e:0:0===e?e:0}function Bs(e){var t=zs(e),n=t%1;return t==t?n?t-n:t:0}function Hs(e){return e?Dr(Bs(e),0,D):0}function Vs(e){if("number"==typeof e)return e;if(Ns(e))return O;if(js(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=js(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ce,"");var n=Ve.test(e);return n||Ue.test(e)?It(e.slice(2),n?2:8):He.test(e)?O:+e}function Ws(e){return ro(e,ol(e))}function Us(e){return null==e?"":Pi(e)}var Ys=oo(function(e,t){if(Go(t)||xs(t))ro(t,il(t),e);else for(var n in t)ut.call(t,n)&&Ir(e,n,t[n])}),qs=oo(function(e,t){ro(t,ol(t),e)}),Qs=oo(function(e,t,n,r){ro(t,ol(t),e,r)}),Ks=oo(function(e,t,n,r){ro(t,il(t),e,r)}),Js=So(Or);var Gs=$i(function(e,t){e=tt(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&qo(t[0],t[1],o)&&(i=1);++r1),t}),ro(e,Co(e),n),r&&(n=Nr(n,c|u|h,Io));for(var i=t.length;i--;)Li(n,t[i]);return n});var cl=So(function(e,t){return null==e?{}:function(e,t){return yi(e,t,function(t,n){return el(e,n)})}(e,t)});function ul(e,t){if(null==e)return{};var n=Gt(Co(e),function(e){return[e]});return t=Po(t),yi(e,n,function(e,n){return t(e,n[0])})}var hl=ko(il),fl=ko(ol);function dl(e){return null==e?[]:mn(e,il(e))}var pl=co(function(e,t,n){return t=t.toLowerCase(),e+(n?gl(t):t)});function gl(e){return $l(Us(e).toLowerCase())}function ml(e){return(e=Us(e))&&e.replace(qe,wn).replace(vt,"")}var vl=co(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),yl=co(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),xl=lo("toLowerCase");var wl=co(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var bl=co(function(e,t,n){return e+(n?" ":"")+$l(t)});var _l=co(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),$l=lo("toUpperCase");function kl(e,t,r){return e=Us(e),(t=r?n:t)===n?function(e){return bt.test(e)}(e)?function(e){return e.match(xt)||[]}(e):function(e){return e.match(Le)||[]}(e):e.match(t)||[]}var Al=$i(function(e,t){try{return Vt(e,n,t)}catch(e){return $s(e)?e:new Ze(e)}}),El=So(function(e,t){return Ut(t,function(t){t=ua(t),Cr(e,t,ns(e[t],e))}),e});function jl(e){return function(){return e}}var Il=fo(),Tl=fo(!0);function Sl(e){return e}function Ml(e){return li("function"==typeof e?e:Nr(e,c))}var Cl=$i(function(e,t){return function(n){return ri(n,e,t)}}),Ol=$i(function(e,t){return function(n){return ri(e,n,t)}});function Dl(e,t,n){var r=il(t),i=Kr(t,r);null!=n||js(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Kr(t,il(t)));var o=!(js(n)&&"chain"in n&&!n.chain),a=ks(e);return Ut(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=no(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Zt([this.value()],arguments))})}),e}function Nl(){}var Pl=vo(Gt),Rl=vo(qt),Ll=vo(tn);function Fl(e){return Qo(e)?un(ua(e)):function(e){return function(t){return Jr(t,e)}}(e)}var zl=xo(),Bl=xo(!0);function Hl(){return[]}function Vl(){return!1}var Wl=mo(function(e,t){return e+t},0),Ul=_o("ceil"),Yl=mo(function(e,t){return e/t},1),ql=_o("floor");var Ql,Kl=mo(function(e,t){return e*t},1),Jl=_o("round"),Gl=mo(function(e,t){return e-t},0);return dr.after=function(e,t){if("function"!=typeof t)throw new it(o);return e=Bs(e),function(){if(--e<1)return t.apply(this,arguments)}},dr.ary=es,dr.assign=Ys,dr.assignIn=qs,dr.assignInWith=Qs,dr.assignWith=Ks,dr.at=Js,dr.before=ts,dr.bind=ns,dr.bindAll=El,dr.bindKey=rs,dr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return vs(e)?e:[e]},dr.chain=Fa,dr.chunk=function(e,t,r){t=(r?qo(e,t,r):t===n)?1:Un(Bs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=Je(Ln(i/t));oo?0:o+r),(i=i===n||i>o?o:Bs(i))<0&&(i+=o),i=r>i?0:Hs(i);r>>0)?(e=Us(e))&&("string"==typeof t||null!=t&&!Cs(t))&&!(t=Pi(t))&&$n(e)?Qi(Sn(e),0,r):e.split(t,r):[]},dr.spread=function(e,t){if("function"!=typeof e)throw new it(o);return t=null==t?0:Un(Bs(t),0),$i(function(n){var r=n[t],i=Qi(n,0,t);return r&&Zt(i,r),Vt(e,this,i)})},dr.tail=function(e){var t=null==e?0:e.length;return t?Si(e,1,t):[]},dr.take=function(e,t,r){return e&&e.length?Si(e,0,(t=r||t===n?1:Bs(t))<0?0:t):[]},dr.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?Si(e,(t=i-(t=r||t===n?1:Bs(t)))<0?0:t,i):[]},dr.takeRightWhile=function(e,t){return e&&e.length?zi(e,Po(t,3),!1,!0):[]},dr.takeWhile=function(e,t){return e&&e.length?zi(e,Po(t,3)):[]},dr.tap=function(e,t){return t(e),e},dr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new it(o);return js(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(e,t,{leading:r,maxWait:t,trailing:i})},dr.thru=za,dr.toArray=Fs,dr.toPairs=hl,dr.toPairsIn=fl,dr.toPath=function(e){return vs(e)?Gt(e,ua):Ns(e)?[e]:no(ca(Us(e)))},dr.toPlainObject=Ws,dr.transform=function(e,t,n){var r=vs(e),i=r||bs(e)||Ps(e);if(t=Po(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:js(e)&&ks(o)?pr(Ct(e)):{}}return(i?Ut:qr)(e,function(e,r,i){return t(n,e,r,i)}),n},dr.unary=function(e){return es(e,1)},dr.union=Ia,dr.unionBy=Ta,dr.unionWith=Sa,dr.uniq=function(e){return e&&e.length?Ri(e):[]},dr.uniqBy=function(e,t){return e&&e.length?Ri(e,Po(t,2)):[]},dr.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?Ri(e,n,t):[]},dr.unset=function(e,t){return null==e||Li(e,t)},dr.unzip=Ma,dr.unzipWith=Ca,dr.update=function(e,t,n){return null==e?e:Fi(e,t,Ui(n))},dr.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Fi(e,t,Ui(r),i)},dr.values=dl,dr.valuesIn=function(e){return null==e?[]:mn(e,ol(e))},dr.without=Oa,dr.words=kl,dr.wrap=function(e,t){return us(Ui(t),e)},dr.xor=Da,dr.xorBy=Na,dr.xorWith=Pa,dr.zip=Ra,dr.zipObject=function(e,t){return Vi(e||[],t||[],Ir)},dr.zipObjectDeep=function(e,t){return Vi(e||[],t||[],Ei)},dr.zipWith=La,dr.entries=hl,dr.entriesIn=fl,dr.extend=qs,dr.extendWith=Qs,Dl(dr,dr),dr.add=Wl,dr.attempt=Al,dr.camelCase=pl,dr.capitalize=gl,dr.ceil=Ul,dr.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=Vs(r))==r?r:0),t!==n&&(t=(t=Vs(t))==t?t:0),Dr(Vs(e),t,r)},dr.clone=function(e){return Nr(e,h)},dr.cloneDeep=function(e){return Nr(e,c|h)},dr.cloneDeepWith=function(e,t){return Nr(e,c|h,t="function"==typeof t?t:n)},dr.cloneWith=function(e,t){return Nr(e,h,t="function"==typeof t?t:n)},dr.conformsTo=function(e,t){return null==t||Pr(e,t,il(t))},dr.deburr=ml,dr.defaultTo=function(e,t){return null==e||e!=e?t:e},dr.divide=Yl,dr.endsWith=function(e,t,r){e=Us(e),t=Pi(t);var i=e.length,o=r=r===n?i:Dr(Bs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},dr.eq=ds,dr.escape=function(e){return(e=Us(e))&&$e.test(e)?e.replace(be,bn):e},dr.escapeRegExp=function(e){return(e=Us(e))&&Me.test(e)?e.replace(Se,"\\$&"):e},dr.every=function(e,t,r){var i=vs(e)?qt:Br;return r&&qo(e,t,r)&&(t=n),i(e,Po(t,3))},dr.find=Va,dr.findIndex=ma,dr.findKey=function(e,t){return rn(e,Po(t,3),qr)},dr.findLast=Wa,dr.findLastIndex=va,dr.findLastKey=function(e,t){return rn(e,Po(t,3),Qr)},dr.floor=ql,dr.forEach=Ua,dr.forEachRight=Ya,dr.forIn=function(e,t){return null==e?e:Ur(e,Po(t,3),ol)},dr.forInRight=function(e,t){return null==e?e:Yr(e,Po(t,3),ol)},dr.forOwn=function(e,t){return e&&qr(e,Po(t,3))},dr.forOwnRight=function(e,t){return e&&Qr(e,Po(t,3))},dr.get=Xs,dr.gt=ps,dr.gte=gs,dr.has=function(e,t){return null!=e&&Vo(e,t,ei)},dr.hasIn=el,dr.head=xa,dr.identity=Sl,dr.includes=function(e,t,n,r){e=xs(e)?e:dl(e),n=n&&!r?Bs(n):0;var i=e.length;return n<0&&(n=Un(i+n,0)),Ds(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&an(e,t,n)>-1},dr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Bs(n);return i<0&&(i=Un(r+i,0)),an(e,t,i)},dr.inRange=function(e,t,r){return t=zs(t),r===n?(r=t,t=0):r=zs(r),function(e,t,n){return e>=Yn(t,n)&&e=-M&&e<=M},dr.isSet=Os,dr.isString=Ds,dr.isSymbol=Ns,dr.isTypedArray=Ps,dr.isUndefined=function(e){return e===n},dr.isWeakMap=function(e){return Is(e)&&Ho(e)==ie},dr.isWeakSet=function(e){return Is(e)&&Zr(e)==oe},dr.join=function(e,t){return null==e?"":Vn.call(e,t)},dr.kebabCase=vl,dr.last=$a,dr.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=Bs(r))<0?Un(i+o,0):Yn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):on(e,ln,o,!0)},dr.lowerCase=yl,dr.lowerFirst=xl,dr.lt=Rs,dr.lte=Ls,dr.max=function(e){return e&&e.length?Hr(e,Sl,Xr):n},dr.maxBy=function(e,t){return e&&e.length?Hr(e,Po(t,2),Xr):n},dr.mean=function(e){return cn(e,Sl)},dr.meanBy=function(e,t){return cn(e,Po(t,2))},dr.min=function(e){return e&&e.length?Hr(e,Sl,hi):n},dr.minBy=function(e,t){return e&&e.length?Hr(e,Po(t,2),hi):n},dr.stubArray=Hl,dr.stubFalse=Vl,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=Kl,dr.nth=function(e,t){return e&&e.length?mi(e,Bs(t)):n},dr.noConflict=function(){return Mt._===this&&(Mt._=gt),this},dr.noop=Nl,dr.now=Xa,dr.pad=function(e,t,n){e=Us(e);var r=(t=Bs(t))?Tn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return yo(Fn(i),n)+e+yo(Ln(i),n)},dr.padEnd=function(e,t,n){e=Us(e);var r=(t=Bs(t))?Tn(e):0;return t&&rt){var i=e;e=t,t=i}if(r||e%1||t%1){var o=Kn();return Yn(e+o*(t-e+jt("1e-"+((o+"").length-1))),t)}return bi(e,t)},dr.reduce=function(e,t,n){var r=vs(e)?Xt:fn,i=arguments.length<3;return r(e,Po(t,4),n,i,Fr)},dr.reduceRight=function(e,t,n){var r=vs(e)?en:fn,i=arguments.length<3;return r(e,Po(t,4),n,i,zr)},dr.repeat=function(e,t,r){return t=(r?qo(e,t,r):t===n)?1:Bs(t),_i(Us(e),t)},dr.replace=function(){var e=arguments,t=Us(e[0]);return e.length<3?t:t.replace(e[1],e[2])},dr.result=function(e,t,r){var i=-1,o=(t=Yi(t,e)).length;for(o||(o=1,e=n);++iM)return[];var n=D,r=Yn(e,D);t=Po(t),e-=D;for(var i=pn(r,t);++n=a)return e;var l=r-Tn(i);if(l<1)return i;var c=s?Qi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),Cs(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=nt(o.source,Us(Be.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var f=u.index;c=c.slice(0,f===n?l:f)}}else if(e.indexOf(Pi(o),l)!=l){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},dr.unescape=function(e){return(e=Us(e))&&_e.test(e)?e.replace(we,Mn):e},dr.uniqueId=function(e){var t=++ht;return Us(e)+t},dr.upperCase=_l,dr.upperFirst=$l,dr.each=Ua,dr.eachRight=Ya,dr.first=xa,Dl(dr,(Ql={},qr(dr,function(e,t){ut.call(dr.prototype,t)||(Ql[t]=e)}),Ql),{chain:!1}),dr.VERSION="4.17.14",Ut(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){dr[e].placeholder=dr}),Ut(["drop","take"],function(e,t){vr.prototype[e]=function(r){r=r===n?1:Un(Bs(r),0);var i=this.__filtered__&&!t?new vr(this):this.clone();return i.__filtered__?i.__takeCount__=Yn(r,i.__takeCount__):i.__views__.push({size:Yn(r,D),type:e+(i.__dir__<0?"Right":"")}),i},vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ut(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==I||3==n;vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Po(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ut(["head","last"],function(e,t){var n="take"+(t?"Right":"");vr.prototype[e]=function(){return this[n](1).value()[0]}}),Ut(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");vr.prototype[e]=function(){return this.__filtered__?new vr(this):this[n](1)}}),vr.prototype.compact=function(){return this.filter(Sl)},vr.prototype.find=function(e){return this.filter(e).head()},vr.prototype.findLast=function(e){return this.reverse().find(e)},vr.prototype.invokeMap=$i(function(e,t){return"function"==typeof e?new vr(this):this.map(function(n){return ri(n,e,t)})}),vr.prototype.reject=function(e){return this.filter(ls(Po(e)))},vr.prototype.slice=function(e,t){e=Bs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=Bs(t))<0?r.dropRight(-t):r.take(t-e)),r)},vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},vr.prototype.toArray=function(){return this.take(D)},qr(vr.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=dr[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(dr.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof vr,c=s[0],u=l||vs(t),h=function(e){var t=o.apply(dr,Zt([e],s));return i&&f?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=a&&!f,g=l&&!d;if(!a&&u){t=g?t:new vr(this);var m=e.apply(t,s);return m.__actions__.push({func:za,args:[h],thisArg:n}),new mr(m,f)}return p&&g?e.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})}),Ut(["pop","push","shift","sort","splice","unshift"],function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);dr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(vs(i)?i:[],e)}return this[n](function(n){return t.apply(vs(n)?n:[],e)})}}),qr(vr.prototype,function(e,t){var n=dr[t];if(n){var r=n.name+"";ut.call(ir,r)||(ir[r]=[]),ir[r].push({name:t,func:n})}}),ir[po(n,g).name]=[{name:"wrapper",func:n}],vr.prototype.clone=function(){var e=new vr(this.__wrapped__);return e.__actions__=no(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=no(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=no(this.__views__),e},vr.prototype.reverse=function(){if(this.__filtered__){var e=new vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=vs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},dr.prototype.plant=function(e){for(var t,r=this;r instanceof gr;){var i=fa(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},dr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof vr){var t=e;return this.__actions__.length&&(t=new vr(this)),(t=t.reverse()).__actions__.push({func:za,args:[ja],thisArg:n}),new mr(t,this.__chain__)}return this.thru(ja)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return Bi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,hn&&(dr.prototype[hn]=function(){return this}),dr}();Ot?((Ot.exports=Cn)._=Cn,Ct._=Cn):Mt._=Cn}).call(te)}),_t=bt.toNumber,$t=bt.flow,kt=bt.isArray,At=bt.join,Et=bt.replace,jt=bt.trim,It=bt.dropRight,Tt=bt.takeRight,St=bt.head,Mt=bt.isUndefined,Ct=bt.isNull,Ot=bt.isNaN,Dt=bt.reduce,Nt=bt.isEmpty,Pt=bt.constant,Rt=bt.tail,Lt=bt.includes,Ft=bt.startsWith,zt=bt.findIndex,Bt=bt.isInteger,Ht=bt.isDate,Vt=bt.isString,Wt=bt.split,Ut=(bt.clone,bt.keys),Yt=(bt.isFunction,bt.merge),qt=bt.has,Qt=bt.isBoolean,Kt=bt.isNumber,Jt=bt.isObjectLike,Gt=bt.assign,Zt=(bt.some,bt.each),Xt=bt.find,en=(bt.orderBy,bt.union,bt.cloneDeep,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),tn=new Map,nn=new Map;function rn(e){return new Function("context","tempVars","const sandbox = $nxCompileToSandbox(context, tempVars)\n try { with (sandbox) { return "+e+" } } catch (err) {\n if (!(err instanceof TypeError)) throw err\n }\n $nxClearSandbox()")}function on(e){return new Function("context","tempVars","const sandbox = $nxCompileToSandbox(context, tempVars)\n with (sandbox) { "+e+" }\n $nxClearSandbox()")}var an=/(?:[^\|]|\|\|)+/g,sn=/(?:[^&]|&&)+/g,ln=/\S+/g;var cn=new Map,un=new Map;function hn(e){if("string"!=typeof e)throw new TypeError("First argument must be a string.");var t=cn.get(e);return t||(t=function(e){var t=e.match(an);if(1===t.length)return rn(t[0]);for(var n={exec:rn(t[0]),filters:[]},r=1;r0){var l=j.utils.clone(t)||{};l.position=[a,s],l.index=i.length,i.push(new j.Token(n.slice(a,o),l))}a=o+1}}return i},j.tokenizer.separator=/[\s\-]+/,j.Pipeline=function(){this._stack=[]},j.Pipeline.registeredFunctions=Object.create(null),j.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&j.utils.warn("Overwriting existing registered function: "+t),e.label=t,j.Pipeline.registeredFunctions[e.label]=e},j.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||j.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},j.Pipeline.load=function(e){var t=new j.Pipeline;return e.forEach(function(e){var n=j.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)}),t},j.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){j.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},j.Pipeline.prototype.after=function(e,t){j.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},j.Pipeline.prototype.before=function(e,t){j.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},j.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},j.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=i),o!=e);)r=n-t,i=t+Math.floor(r/2),o=this.elements[2*i];return o==e?2*i:o>e?2*i:os?c+=2:a==s&&(t+=n[l+1]*r[c+1],l+=2,c+=2);return t},j.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},j.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,a=i.str.charAt(0);a in i.node.edges?o=i.node.edges[a]:(o=new j.TokenSet,i.node.edges[a]=o),1==i.str.length&&(o.final=!0),r.push({node:o,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var s=i.node.edges["*"];else{s=new j.TokenSet;i.node.edges["*"]=s}if(0==i.str.length&&(s.final=!0),r.push({node:s,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&r.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var l=i.node.edges["*"];else{l=new j.TokenSet;i.node.edges["*"]=l}1==i.str.length&&(l.final=!0),r.push({node:l,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var c,u=i.str.charAt(0),h=i.str.charAt(1);h in i.node.edges?c=i.node.edges[h]:(c=new j.TokenSet,i.node.edges[h]=c),1==i.str.length&&(c.final=!0),r.push({node:c,editsRemaining:i.editsRemaining-1,str:u+i.str.slice(2)})}}}return n},j.TokenSet.fromString=function(e){for(var t=new j.TokenSet,n=t,r=0,i=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},j.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},j.Index.prototype.search=function(e){return this.query(function(t){new j.QueryParser(e,t).parse()})},j.Index.prototype.query=function(e){for(var t=new j.Query(this.fields),n=Object.create(null),r=Object.create(null),i=Object.create(null),o=Object.create(null),a=Object.create(null),s=0;s1?1:e},j.Builder.prototype.k1=function(e){this._k1=e},j.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return j.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},j.QueryLexer.prototype.width=function(){return this.pos-this.start},j.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},j.QueryLexer.prototype.backup=function(){this.pos-=1},j.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=j.QueryLexer.EOS&&this.backup()},j.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(j.QueryLexer.TERM)),e.ignore(),e.more())return j.QueryLexer.lexText},j.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.EDIT_DISTANCE),j.QueryLexer.lexText},j.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.BOOST),j.QueryLexer.lexText},j.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(j.QueryLexer.TERM)},j.QueryLexer.termSeparator=j.tokenizer.separator,j.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==j.QueryLexer.EOS)return j.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return j.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if(t.match(j.QueryLexer.termSeparator))return j.QueryLexer.lexTerm}else e.escapeCharacter()}},j.QueryParser=function(e,t){this.lexer=new j.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},j.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=j.QueryParser.parseClause;e;)e=e(this);return this.query},j.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},j.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},j.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},j.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case j.QueryLexer.PRESENCE:return j.QueryParser.parsePresence;case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new j.QueryParseError(n,t.start,t.end)}},j.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=j.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=j.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new j.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new j.QueryParseError(n,t.start,t.end)}switch(r.type){case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new j.QueryParseError(n,r.start,r.end)}}},j.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new j.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i){r="expecting term, found nothing";throw new j.QueryParseError(r,t.start,t.end)}switch(i.type){case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:r="expecting term, found '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}}},j.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new j.QueryParseError(r,n.start,n.end)}else e.nextClause()}},j.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new j.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}else e.nextClause()}},j.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new j.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}else e.nextClause()}},e.exports=j}()});var wn=[],bn=[],_n="undefined"!=typeof Uint8Array?Uint8Array:Array,$n=!1;function kn(){$n=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t>18&63]+wn[i>>12&63]+wn[i>>6&63]+wn[63&i]);return o.join("")}function En(e){var t;$n||kn();for(var n=e.length,r=n%3,i="",o=[],a=0,s=n-r;as?s:a+16383));return 1===r?(t=e[n-1],i+=wn[t>>2],i+=wn[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=wn[t>>10],i+=wn[t>>4&63],i+=wn[t<<2&63],i+="="),o.push(i),o.join("")}function jn(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,f=n?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)}function In(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*g}var Tn={}.toString,Sn=Array.isArray||function(e){return"[object Array]"==Tn.call(e)};Dn.TYPED_ARRAY_SUPPORT=void 0===en.TYPED_ARRAY_SUPPORT||en.TYPED_ARRAY_SUPPORT;var Mn=Cn();function Cn(){return Dn.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function On(e,t){if(Cn()=Cn())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Cn().toString(16)+" bytes");return 0|e}function zn(e){return!(null==e||!e._isBuffer)}function Bn(e,t){if(zn(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return dr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return pr(e).length;default:if(r)return dr(e).length;t=(""+t).toLowerCase(),r=!0}}function Hn(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Vn(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=Dn.from(t,r)),zn(t))return 0===t.length?-1:Wn(e,t,n,r,i);if("number"==typeof t)return t&=255,Dn.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Wn(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Wn(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function Gn(e,t,n){return 0===t&&n===e.length?En(e):En(e.slice(t,n))}function Zn(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=Xn)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return nr(this,t,n);case"utf8":case"utf-8":return Zn(this,t,n);case"ascii":return er(this,t,n);case"latin1":case"binary":return tr(this,t,n);case"base64":return Gn(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rr(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},Dn.prototype.equals=function(e){if(!zn(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Dn.compare(this,e)},Dn.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Dn.prototype.compare=function(e,t,n,r,i){if(!zn(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),u=0;ui)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Un(this,e,t,n);case"utf8":case"utf-8":return Yn(this,e,t,n);case"ascii":return qn(this,e,t,n);case"latin1":case"binary":return Qn(this,e,t,n);case"base64":return Kn(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Jn(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},Dn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Xn=4096;function er(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function or(e,t,n,r,i,o){if(!zn(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function ar(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function sr(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function lr(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function cr(e,t,n,r,i){return i||lr(e,0,n,4),In(e,t,n,r,23,4),n+4}function ur(e,t,n,r,i){return i||lr(e,0,n,8),In(e,t,n,r,52,8),n+8}Dn.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},Dn.prototype.readUInt8=function(e,t){return t||ir(e,1,this.length),this[e]},Dn.prototype.readUInt16LE=function(e,t){return t||ir(e,2,this.length),this[e]|this[e+1]<<8},Dn.prototype.readUInt16BE=function(e,t){return t||ir(e,2,this.length),this[e]<<8|this[e+1]},Dn.prototype.readUInt32LE=function(e,t){return t||ir(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Dn.prototype.readUInt32BE=function(e,t){return t||ir(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Dn.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||ir(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},Dn.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||ir(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},Dn.prototype.readInt8=function(e,t){return t||ir(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Dn.prototype.readInt16LE=function(e,t){t||ir(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Dn.prototype.readInt16BE=function(e,t){t||ir(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Dn.prototype.readInt32LE=function(e,t){return t||ir(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Dn.prototype.readInt32BE=function(e,t){return t||ir(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Dn.prototype.readFloatLE=function(e,t){return t||ir(e,4,this.length),jn(this,e,!0,23,4)},Dn.prototype.readFloatBE=function(e,t){return t||ir(e,4,this.length),jn(this,e,!1,23,4)},Dn.prototype.readDoubleLE=function(e,t){return t||ir(e,8,this.length),jn(this,e,!0,52,8)},Dn.prototype.readDoubleBE=function(e,t){return t||ir(e,8,this.length),jn(this,e,!1,52,8)},Dn.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||or(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},Dn.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,1,255,0),Dn.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Dn.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,2,65535,0),Dn.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ar(this,e,t,!0),t+2},Dn.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,2,65535,0),Dn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ar(this,e,t,!1),t+2},Dn.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,4,4294967295,0),Dn.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):sr(this,e,t,!0),t+4},Dn.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,4,4294967295,0),Dn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):sr(this,e,t,!1),t+4},Dn.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);or(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},Dn.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);or(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},Dn.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,1,127,-128),Dn.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Dn.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,2,32767,-32768),Dn.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ar(this,e,t,!0),t+2},Dn.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,2,32767,-32768),Dn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ar(this,e,t,!1),t+2},Dn.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,4,2147483647,-2147483648),Dn.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):sr(this,e,t,!0),t+4},Dn.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||or(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Dn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):sr(this,e,t,!1),t+4},Dn.prototype.writeFloatLE=function(e,t,n){return cr(this,e,t,!0,n)},Dn.prototype.writeFloatBE=function(e,t,n){return cr(this,e,t,!1,n)},Dn.prototype.writeDoubleLE=function(e,t,n){return ur(this,e,t,!0,n)},Dn.prototype.writeDoubleBE=function(e,t,n){return ur(this,e,t,!1,n)},Dn.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!Dn.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function pr(e){return function(e){var t,n,r,i,o,a;$n||kn();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new _n(3*s/4-o),r=o>0?s-4:s;var l=0;for(t=0,n=0;t>16&255,a[l++]=i>>8&255,a[l++]=255&i;return 2===o?(i=bn[e.charCodeAt(t)]<<2|bn[e.charCodeAt(t+1)]>>4,a[l++]=255&i):1===o&&(i=bn[e.charCodeAt(t)]<<10|bn[e.charCodeAt(t+1)]<<4|bn[e.charCodeAt(t+2)]>>2,a[l++]=i>>8&255,a[l++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(hr,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function gr(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function mr(e){return null!=e&&(!!e._isBuffer||vr(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&vr(e.slice(0,0))}(e))}function vr(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var yr=Object.freeze({INSPECT_MAX_BYTES:50,kMaxLength:Mn,Buffer:Dn,SlowBuffer:function(e){return+e!=e&&(e=0),Dn.alloc(+e)},isBuffer:mr});ne(function(e,t){var n=yr.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function i(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=yr:(r(yr,t),t.Buffer=i),i.prototype=Object.create(n.prototype),r(n,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return yr.SlowBuffer(e)}}).Buffer;const xr=e=>de(["onBegin","onComplete","onError"])(e),wr=()=>xr([]),br={recordApi:{save:xr(["onInvalid","onRecordUpdated","onRecordCreated"]),delete:wr(),getContext:wr(),getNew:wr(),load:wr(),validate:wr(),uploadFile:wr(),downloadFile:wr()},indexApi:{buildIndex:wr(),listItems:wr(),delete:wr(),aggregates:wr()},collectionApi:{getAllowedRecordTypes:wr(),initialise:wr(),delete:wr()},authApi:{authenticate:wr(),authenticateTemporaryAccess:wr(),createTemporaryAccess:wr(),createUser:wr(),enableUser:wr(),disableUser:wr(),loadAccessLevels:wr(),getNewAccessLevel:wr(),getNewUser:wr(),getNewUserAuth:wr(),getUsers:wr(),saveAccessLevels:wr(),isAuthorized:wr(),changeMyPassword:wr(),setPasswordFromTemporaryCode:wr(),scorePassword:wr(),isValidPassword:wr(),validateUser:wr(),validateAccessLevels:wr(),setUserAccessLevels:wr()},templateApi:{saveApplicationHierarchy:wr(),saveActionsAndTriggers:wr()},actionsApi:{execute:wr()}},_r=[],$r=(e,t,n)=>`${e}:${t}:${n}`;for(const e in br)for(const t in br[e])br[e][t]=pe((n,r)=>(n[r]=$r(e,t,r),n),{})(br[e][t]);for(const e in br)for(const t in br[e])for(const n in br[e][t])_r.push(br[e][t][n]);const kr=br,Ar=_r;class Er extends Error{constructor(e){super(e),this.httpStatusCode=400}}class jr extends Error{constructor(e){super(e),this.httpStatusCode=401}}class Ir extends Error{constructor(e){super(e),this.httpStatusCode=404}}const Tr=async(e,t,n,r,i,...o)=>{if(Cr(e,t),!n(e))return void Mr(e,r,t);const a=Date.now(),s=()=>Date.now()-a;try{await e.publish(t.onBegin,r);const n=await i(...o);return await Nr(e,r,t,s,n),n}catch(n){throw await Dr(e,r,t,s,n),n}},Sr=(e,t,n,r,i,...o)=>{if(Cr(e,t),!n(e))return void Mr(e,r,t);const a=Date.now(),s=()=>Date.now()-a;try{e.publish(t.onBegin,r);const n=i(...o);return Nr(e,r,t,s,n),n}catch(n){throw Dr(e,r,t,s,n),n}},Mr=(e,t,n)=>{const r=new jr(`Unauthorized: ${n}`);throw Dr(e,t,n,()=>0,r),r},Cr=(e,t,n)=>{const r=wt();ge(e.calls)&&(e.calls=(()=>({seedCallId:ge(n)?r:n,threadCallId:r,stack:[]}))()),e.calls.stack.push({namespace:t,callId:r})},Or=e=>{e.calls.stack.pop(),0===e.calls.stack.length&&delete e.calls},Dr=async(e,t,n,r,i)=>{const o=me(t);o.error=i,o.elapsed=r(),await e.publish(n.onError,o),Or(e)},Nr=async(e,t,n,r,i)=>{const o=me(t);return o.result=i,o.elapsed=r(),await e.publish(n.onComplete,o),Or(e),i},Pr=async(e,t,n,r,i=0)=>{try{const o={timeout:await e.getEpochTime()+n,key:t,totalTimeout:n};return await e.datastore.createFile(t,Rr(o.totalTimeout,o.timeout)),o}catch(o){if(i==r)return zr;const a=Lr(t,await e.datastore.loadFile(t));if(await e.getEpochTime()`${e}:${t.toString()}`,Lr=(e,t)=>Wr(t,[ve(":"),t=>({totalTimeout:new Number(t[0]),timeout:new Number(t[1]),key:e})]),Fr=async(e,t)=>{if(await e.getEpochTime()e===zr,Hr=()=>new Promise(e=>setTimeout(e,10)),Vr=(...e)=>t=>$t(e)(t),Wr=(e,t)=>Vr(...t)(e),Ur=e=>jt(e,"/"),Yr=(...e)=>{const t=1===e.length&kt(e[0])?e[0]:e;return(e=>Et(`/${Ur(e)}`,"//","/"))(At(t,"/"))},qr=Vr(Ur,e=>Wt(e,"/")),Qr=Vr(qr,It,e=>Yr(...e)),Kr=Vr(qr,Tt,St),Jr=Yr("/.config","fields.json"),Gr=Yr("/.config","templates.json"),Zr=Yr("/.config","appDefinition.json"),Xr=e=>Yr("/.config","dir",...qr(e),"dir.idx"),ei=Vr(Qr,Xr),ti=(e,t,n)=>Mt(e)?Mt(n)?void 0:n():t(),ni=e=>t=>!e(t),ri=ni(Mt),ii=ni(Ct),oi=ni(Ot),ai=(...e)=>t=>Dt(e,(e,n)=>(Ct(e)||1==e)&&n(t),null),si=(...e)=>t=>Dt(e,(e,n)=>1==e||n(t),null),li=(e,t)=>e.trim().toLowerCase()===t.trim().toLowerCase(),ci=ai(ri,ii,oi),ui=ni(ci),hi=e=>ui(e)||Nt(e),fi=e=>t=>ci(t)?t:e(),di=(e,t)=>n=>ci(n)?e(n):t,pi=e=>t=>!ye(e)(t),gi=e=>t=>pi(t=>!e(t))(t),mi=e=>!Nt(e),vi=ai(kt,mi),yi=ai(Vt,mi),xi=e=>(t,...n)=>{try{return t.apply(null,...n)}catch(t){return e()}},wi=e=>async(t,...n)=>{try{return await t.apply(null,...n)}catch(t){return await e()}},bi=xi(()=>{}),_i=wi(async()=>{}),$i=e=>{try{return e(),!1}catch(e){return!0}},ki=e=>!$i(e),Ai=e=>xi(Pt(e)),Ei=Ai(void 0),ji=(...e)=>t=>{if(!Nt(e))return!0===(()=>St(e)[0](t))()?(()=>St(e)[1](t))():ji(...Rt(e))(t)},Ii=(...e)=>t=>Lt(e,t),Ti=Pt(!0),Si=e=>{let t,n,r,i=0;if(0==e.length)return i;for(t=0,r=e.length;tBt(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=0-Number.MAX_SAFE_INTEGER,Ci=e=>Ct(e)?null:Ht(e)?e:new Date(e),Oi=e=>Ct(e)?null:"true"===e||!0===e,Di=e=>Ct(e)?null:_t(e),Ni=e=>kt(e)&&gi(Vt)(e),Pi=async e=>new Promise(t=>setTimeout(t,e)),Ri=async(e,t,n,...r)=>{try{return await e(...r)}catch(i){if(t>1)return await Pi(n).then(async()=>await Ri(e,t-1,n,...r));throw i}};var Li={ifExists:ti,getOrDefault:(e,t)=>ti(e,()=>e,()=>t),isDefined:ri,isNonNull:ii,isNotNaN:oi,allTrue:ai,isSomething:ci,mapIfSomethingOrDefault:di,mapIfSomethingOrBlank:e=>di(e,""),configFolder:"/.config",fieldDefinitions:Jr,isNothing:ui,not:ni,switchCase:ji,defaultCase:Ti,StartsWith:e=>t=>Ft(t,e),contains:e=>t=>zt(t,t=>t===e)>-1,templateDefinitions:Gr,handleErrorWith:Ai,handleErrorWithUndefined:Ei,tryOr:xi,tryOrIgnore:bi,tryAwaitOr:wi,tryAwaitOrIgnore:_i,dirIndex:Xr,keySep:"/",$:Wr,$$:Vr,getDirFomKey:Qr,getFileFromKey:Kr,splitKey:qr,somethingOrDefault:(e,t)=>fi(Pt(t))(e),getIndexKeyFromFileKey:ei,joinKey:Yr,somethingOrGetDefault:fi,appDefinitionFile:Zr,isValue:e=>t=>e===t,all:gi,isOneOf:Ii,memberMatches:(e,t)=>n=>t(n[e]),defineError:(e,t)=>{try{return e()}catch(e){throw e.message=`${t} : ${e.message}`,e}},anyTrue:si,isNonEmptyArray:vi,causesException:$i,executesWithoutException:ki,none:pi,getHashCode:Si,awEx:async e=>{try{return[void 0,await e]}catch(e){return[e,void 0]}},apiWrapper:Tr,events:kr,eventsList:Ar,isNothingOrEmpty:hi,isSafeInteger:Mi,toNumber:_t,toDate:Ci,toBool:Oi,isArrayOfString:Ni,getLock:Pr,NO_LOCK:zr,isNolock:Br,insensitiveEquals:li,pause:Pi,retry:Ri};const Fi=(e,t,n)=>({field:e,error:t,isValid:n}),zi=(e,t)=>({...e,item:t}),Bi=e=>t=>Wr(e,[xe(Hi(t)),we(ci)]),Hi=e=>t=>t.isValid(e)?null:zi(t,e),Vi={reference:"reference",ancestor:"ancestor"},Wi=[Fi("map","index has no map function",e=>yi(e.map)),Fi("map","index's map function does not compile",e=>!yi(e.map)||ki(()=>(e=>fn(e.map))(e))),Fi("filter","index's filter function does not compile",e=>!yi(e.filter)||ki(()=>(e=>hn(e.filter))(e))),Fi("name","must declare a name for index",e=>yi(e.name)),Fi("name","there is a duplicate named index on this node",e=>be(e.name)||1===_e("name")(e.parent().indexes)[e.name]),Fi("indexType","reference index may only exist on a record node",e=>ro(e.parent())||e.indexType!==Vi.reference),Fi("indexType",`index type must be one of: ${At(", ",Ut(Vi))}`,e=>$e(e.indexType)(Ut(Vi)))],Ui=(e,t=!0)=>{if(ci(e.getFlattenedHierarchy)&&t)return e.getFlattenedHierarchy();const n=(e,t)=>{if(t.push(e),!(e.children&&0!==e.children.length||e.indexes&&0!==e.indexes.length||e.aggregateGroups&&0!==e.aggregateGroups.length))return t;const r=e=>t=>de(t)(e||[]),i=Wr([],[r(e.children),r(e.indexes),r(e.aggregateGroups)]);for(const e of i)n(e,t);return t};return e.getFlattenedHierarchy=(()=>n(e,[])),e.getFlattenedHierarchy()},Yi=e=>t=>Wr(e,[Ui,Ae(e=>new RegExp(`${e.pathRegx()}$`).test(t))]),qi=e=>t=>ji([e=>ui(e.parent()),Ee(!1)],[t=>e(t.parent()),Ee(!0)],[Ti,t=>qi(e)(t.parent())])(t),Qi=(e,t)=>Wr(e,[Ui,Ae(e=>e.nodeKey()===t||io(e)&&e.collectionNodeKey()===t)]),Ki=(e,t)=>{const n=Yi(e)(t);return ui(n)?Qi(e,t):n},Ji=(e,t)=>ci(Yi(e)(t)),Gi=e=>t=>qi(t=>t.nodeKey()===e)(t),Zi=e=>t=>Gi(t.nodeKey())(e),Xi=e=>t=>Zi(t)(e),eo=e=>Wr(e,[ve("-"),Ie,parseInt]),to=e=>t=>0===e.allowedRecordNodeIds.length||$e(t)(e.allowedRecordNodeIds),no=e=>t=>to(e)(t.nodeId),ro=e=>ci(e)&&"record"===e.type,io=e=>ro(e)&&!e.isSingle,oo=e=>ci(e)&&"index"===e.type,ao=e=>ci(e)&&"aggregateGroup"===e.type,so=e=>ci(e)&&e.isRoot(),lo=qi(ro),co=e=>oo(e)&&so(e.parent()),uo=e=>oo(e)&&e.indexType===Vi.reference,ho=e=>oo(e)&&e.indexType===Vi.ancestor,fo=e=>t=>"reference"===t.type&&Te(t.typeOptions.reverseIndexNodeKeys)([e.nodeKey()]).length>0;var po={getLastPartInKey:e=>ke(qr(e)),getNodesInPath:e=>t=>Wr(e,[Ui,we(e=>new RegExp(`${e.pathRegx()}`).test(t))]),getExactNodeForPath:Yi,hasMatchingAncestor:qi,getNode:Qi,getNodeByKeyOrNodeKey:Ki,isNode:Ji,getActualKeyOfParent:(e,t)=>Wr(t,[qr,je(qr(e).length),e=>Yr(...e)]),getParentKey:e=>Wr(e,[qr,je(qr(e).length-1),Yr]),isKeyAncestorOf:Gi,hasNoMatchingAncestors:e=>t=>!qi(e)(t),findField:(e,t)=>Ae(e=>e.name==t)(e.fields),isAncestor:Zi,isDecendant:Xi,getRecordNodeId:e=>Wr(e,[qr,ke,eo]),getRecordNodeIdFromId:eo,getRecordNodeById:(e,t)=>Wr(e,[Ui,Ae(e=>ro(e)&&e.nodeId===eo(t))]),recordNodeIdIsAllowed:to,recordNodeIsAllowed:no,getAllowedRecordNodesForIndex:(e,t)=>{const n=Wr(e,[Ui,we(ro)]);return co(t)?Wr(n,[we(no(t))]):ho(t)?Wr(n,[we(Xi(t.parent())),we(no(t))]):uo(t)?Wr(n,[we(e=>ye(fo(t))(e.fields))]):void 0},getNodeFromNodeKeyHash:e=>t=>Wr(e,[Ui,Ae(e=>Si(e.nodeKey())===t)]),isRecord:ro,isCollectionRecord:io,isIndex:oo,isaggregateGroup:ao,isShardedIndex:e=>oo(e)&&yi(e.getShardName),isRoot:so,isDecendantOfARecord:lo,isGlobalIndex:co,isReferenceIndex:uo,isAncestorIndex:ho,fieldReversesReferenceToNode:e=>t=>"reference"===t.type&&Te(t.typeOptions.reverseIndexNodeKeys)(xe(e=>e.nodeKey())(e.indexes)).length>0,fieldReversesReferenceToIndex:fo,getFlattenedHierarchy:Ui};const go=(e,t)=>(n,r)=>qt(r,n.name)?mo(e,t)(r[n.name]):t[n.getUndefinedValue](),mo=(e,t)=>n=>{const r=e(n);return r.success?r.value:t.default()},vo=(e,t)=>n=>{const r=ge(n)||ge(n.getInitialValue)?"default":n.getInitialValue;return qt(t,r)?t[r]():mo(e,t)(r)},yo=e=>Yt({value:Ee,null:Ee(null)},e),xo=e=>async(t,n,r)=>{const i=n[t.name],o=async e=>await e.isValid(i,t.typeOptions,r)?"":e.getMessage(i,t.typeOptions),a=[];for(const t of e){const e=await o(t);mi(e)&&a.push(e)}return a},wo=Se(e=>e.defaultValue),bo=(e,t)=>({isValid:e,getMessage:t}),_o=e=>({success:!1,value:e}),$o=e=>({success:!0,value:e}),ko=(e,t,n,r,i,o,a)=>({getNew:vo(t,n),safeParseField:go(t,n),safeParseValue:mo(t,n),tryParse:t,name:e,getDefaultOptions:()=>wo(me(r)),optionDefinitions:r,validateTypeConstraints:xo(i),sampleValue:o,stringify:e=>null==e?"":a(e),getDefaultValue:n.default}),Ao=yo({default:Pt(null)}),Eo=ji([Vt,$o],[Ct,$o],[Ti,e=>$o(e.toString())]),jo={maxLength:{defaultValue:null,isValid:e=>null===e||Mi(e)&&e>0,requirementDescription:"max length must be null (no limit) or a greater than zero integer",parse:Di},values:{defaultValue:null,isValid:e=>null===e||Ni(e)&&e.length>0&&e.length<1e4,requirementDescription:"'values' must be null (no values) or an arry of at least one string",parse:e=>e},allowDeclaredValuesOnly:{defaultValue:!1,isValid:Qt,requirementDescription:"allowDeclaredValuesOnly must be true or false",parse:Oi}},Io=[bo(async(e,t)=>null===e||null===t.maxLength||e.length<=t.maxLength,(e,t)=>`value exceeds maximum length of ${t.maxLength}`),bo(async(e,t)=>null===e||!1===t.allowDeclaredValuesOnly||Lt(t.values,e),e=>`"${e}" does not exist in the list of allowed values`)];var To=ko("string",Eo,Ao,jo,Io,"abcde",e=>e);const So=yo({default:Pt(null)}),Mo=ji([Qt,$o],[Ct,$o],[Ii("true","1","yes","on"),()=>$o(!0)],[Ii("false","0","no","off"),()=>$o(!1)],[Ti,_o]),Co={allowNulls:{defaultValue:!0,isValid:Qt,requirementDescription:"must be a true or false",parse:Oi}},Oo=[bo(async(e,t)=>!0===t.allowNulls||null!==e,()=>"field cannot be null")];var Do=ko("bool",Mo,So,Co,Oo,!0,JSON.stringify);const No=yo({default:Pt(null)}),Po=ji([Kt,$o],[Vt,e=>{const t=Number(e);return isNaN(t)?_o(e):$o(t)}],[Ct,$o],[Ti,_o]),Ro={maxValue:{defaultValue:Number.MAX_SAFE_INTEGER,isValid:Mi,requirementDescription:"must be a valid integer",parse:Di},minValue:{defaultValue:0-Number.MAX_SAFE_INTEGER,isValid:Mi,requirementDescription:"must be a valid integer",parse:Di},decimalPlaces:{defaultValue:0,isValid:e=>Mi(e)&&e>=0,requirementDescription:"must be a positive integer",parse:Di}},Lo=[bo(async(e,t)=>null===e||null===t.minValue||e>=t.minValue,(e,t)=>`value (${e.toString()}) must be greater than or equal to ${t.minValue}`),bo(async(e,t)=>null===e||null===t.maxValue||e<=t.maxValue,(e,t)=>`value (${e.toString()}) must be less than or equal to ${t.minValue} options`),bo(async(e,t)=>null===e||t.decimalPlaces>=(e=>{const t=e.toString().split(".");return 1===t.length?0:t[1].length})(e),(e,t)=>`value (${e.toString()}) must have ${t.decimalPlaces} decimal places or less`)];var Fo=ko("number",Po,No,Ro,Lo,1,e=>e.toString());const zo=yo({default:Pt(null),now:()=>new Date}),Bo=e=>e instanceof Date&&!isNaN(e),Ho=ji([Ht,$o],[Vt,e=>ji([Bo,$o],[Ti,_o])(new Date(e))],[Ct,$o],[Ti,_o]),Vo={maxValue:{defaultValue:new Date(3250368e7),isValid:Ht,requirementDescription:"must be a valid date",parse:Ci},minValue:{defaultValue:new Date(-8520336e6),isValid:Ht,requirementDescription:"must be a valid date",parse:Ci}},Wo=[bo(async(e,t)=>null===e||null===t.minValue||e>=t.minValue,(e,t)=>`value (${e.toString()}) must be greater than or equal to ${t.minValue}`),bo(async(e,t)=>null===e||null===t.maxValue||e<=t.maxValue,(e,t)=>`value (${e.toString()}) must be less than or equal to ${t.minValue} options`)];var Uo=ko("datetime",Ho,zo,Vo,Wo,new Date(1984,4,1),e=>JSON.stringify(e).replace(new RegExp('"',"g"),""));const Yo=e=>Vr(xe(t=>e.safeParseValue(t)),$o),qo={maxLength:{defaultValue:1e4,isValid:Mi,requirementDescription:"must be a positive integer",parse:Di},minLength:{defaultValue:0,isValid:e=>Mi(e)&&e>=0,requirementDescription:"must be a positive integer",parse:Di}},Qo=[bo(async(e,t)=>null===e||e.length>=t.minLength,(e,t)=>`must choose ${t.minLength} or more options`),bo(async(e,t)=>null===e||e.length<=t.maxLength,(e,t)=>`cannot choose more than ${t.maxLength} options`)];var Ko=e=>ko((e=>`array<${e}>`)(e.name),(e=>ji([kt,Yo(e)],[Ti,_o]))(e),(()=>yo({default:Pt([])}))(),qo,Qo,[e.sampleValue],JSON.stringify);const Jo=()=>({key:""}),Go=yo({default:Jo}),Zo=e=>Jt(e)&&((e,t)=>qt(e,t)&&Vt(e[t]))(e,"key"),Xo={indexNodeKey:{defaultValue:null,isValid:yi,requirementDescription:"must be a non-empty string",parse:e=>e},displayValue:{defaultValue:"",isValid:yi,requirementDescription:"must be a non-empty string",parse:e=>e},reverseIndexNodeKeys:{defaultValue:null,isValid:e=>Ni(e)&&e.length>0,requirementDescription:"must be a non-empty array of strings",parse:e=>e}},ea=[bo(async(e,t,n)=>(e=>Vt(e)&&Nt(e))(e.key)||await n.referenceExists(t,e.key),(e,t)=>`"${e[t.displayValue]}" does not exist in options list (key: ${e.key})`)];var ta=ko("reference",e=>ji([Zo,$o],[Ct,()=>$o({key:""})],[Ti,_o])(e),Go,Xo,ea,{key:"key",value:"value"},JSON.stringify);const na=()=>({relativePath:"",size:0}),ra=yo({default:na}),ia=e=>Wr(e,[qr,ke]),oa=e=>!Me(e)&&Ce("relativePath")(e)&&Ce("size")(e)&&Oe(e.size)&&De(e.relativePath)&&(e=>{const t=ia(e);return t.length<=255&&0===Te(t.split(""))("*?\\/:<>|\0\b\f\v".split("")).length&&pi(e=>".."===e)(qr(e))})(e.relativePath);var aa=ko("file",e=>ji([oa,$o],[Me,()=>$o({relativePath:"",size:0})],[Ti,_o])(e),ra,{},[],{relativePath:"some_file.jpg",size:1e3},JSON.stringify);const sa=(()=>{const e={string:To,number:Fo,datetime:Uo,bool:Do,reference:ta,file:aa},t=Wr(e,[Ut,xe(t=>{const n={},r=Ko(e[t]);return n[r.name]=r,n}),e=>Gt({},...e)]);return Yt({},e,t)})(),la=e=>(e=>{if(!qt(sa,e))throw new Er(`Do not recognise type ${e}`);return sa[e]})(e).getDefaultOptions(),ca=Yr("/.auth","users.json"),ua=e=>Yr("/.auth",`auth_${e}.json`),ha=Yr("/.auth","users_lock"),fa=Yr("/.auth","access_levels.json"),da=Yr("/.auth","access_levels_lock"),pa={CREATE_RECORD:"create record",UPDATE_RECORD:"update record",READ_RECORD:"read record",DELETE_RECORD:"delete record",READ_INDEX:"read index",MANAGE_INDEX:"manage index",MANAGE_COLLECTION:"manage collection",WRITE_TEMPLATES:"write templates",CREATE_USER:"create user",SET_PASSWORD:"set password",CREATE_TEMPORARY_ACCESS:"create temporary access",ENABLE_DISABLE_USER:"enable or disable user",WRITE_ACCESS_LEVELS:"write access levels",LIST_USERS:"list users",LIST_ACCESS_LEVELS:"list access levels",EXECUTE_ACTION:"execute action",SET_USER_ACCESS_LEVELS:"set user access levels"},ga=(e,t)=>Wr(e,[Ae(e=>e.name.toLowerCase()===t.toLowerCase())]),ma=e=>{const t=Pe(e);return delete t.tempCode,t},va=e=>Wr(e,[ve(":"),e=>({id:e[1],code:e[2]})]),ya=e=>(t,n)=>Sr(e,kr.authApi.isAuthorized,Fa,{resourceKey:n,permissionType:t},xa,e,t,n),xa=(e,t,n)=>{if(!e.user)return!1;if(!Wr(pa,[Re,$e(t)]))return!1;return Wr(e.user.permissions,[ye(r=>{const i=ui(n)?null:Ji(e.hierarchy,n)?Ki(e.hierarchy,n).nodeKey():n;return r.type===t&&(ui(n)||i===r.nodeKey)})])},wa=e=>({add:(t,n)=>n.permissions.push({type:e,nodeKey:t}),isAuthorized:t=>n=>ya(n)(e,t),isNode:!0,get:t=>({type:e,nodeKey:t})}),ba=e=>({add:t=>t.permissions.push({type:e}),isAuthorized:t=>ya(t)(e),isNode:!1,get:()=>({type:e})}),_a=wa(pa.CREATE_RECORD),$a=wa(pa.UPDATE_RECORD),ka=wa(pa.DELETE_RECORD),Aa=wa(pa.READ_RECORD),Ea=ba(pa.WRITE_TEMPLATES),ja=ba(pa.CREATE_USER),Ia=ba(pa.SET_PASSWORD),Ta=wa(pa.READ_INDEX),Sa=ba(pa.MANAGE_INDEX),Ma=ba(pa.MANAGE_COLLECTION),Ca=ba(pa.CREATE_TEMPORARY_ACCESS),Oa=ba(pa.ENABLE_DISABLE_USER),Da=ba(pa.WRITE_ACCESS_LEVELS),Na=ba(pa.LIST_USERS),Pa=ba(pa.LIST_ACCESS_LEVELS),Ra=ba(pa.SET_USER_ACCESS_LEVELS),La=wa(pa.EXECUTE_ACTION),Fa=()=>!0,za={createRecord:_a,updateRecord:$a,deleteRecord:ka,readRecord:Aa,writeTemplates:Ea,createUser:ja,setPassword:Ia,readIndex:Ta,createTemporaryAccess:Ca,enableDisableUser:Oa,writeAccessLevels:Da,listUsers:Na,listAccessLevels:Pa,manageIndex:Sa,manageCollection:Ma,executeAction:La,setUserAccessLevels:Ra};var Ba="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ha=[],Va=[],Wa="undefined"!=typeof Uint8Array?Uint8Array:Array,Ua=!1;function Ya(){Ua=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t>18&63]+Ha[i>>12&63]+Ha[i>>6&63]+Ha[63&i]);return o.join("")}function Qa(e){var t;Ua||Ya();for(var n=e.length,r=n%3,i="",o=[],a=0,s=n-r;as?s:a+16383));return 1===r?(t=e[n-1],i+=Ha[t>>2],i+=Ha[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=Ha[t>>10],i+=Ha[t>>4&63],i+=Ha[t<<2&63],i+="="),o.push(i),o.join("")}function Ka(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,f=n?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)}function Ja(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*g}var Ga={}.toString,Za=Array.isArray||function(e){return"[object Array]"==Ga.call(e)};function Xa(){return ts.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function es(e,t){if(Xa()=Xa())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Xa().toString(16)+" bytes");return 0|e}function ss(e){return!(null==e||!e._isBuffer)}function ls(e,t){if(ss(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Ds(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ns(e).length;default:if(r)return Ds(e).length;t=(""+t).toLowerCase(),r=!0}}function cs(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function us(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=ts.from(t,r)),ss(t))return 0===t.length?-1:hs(e,t,n,r,i);if("number"==typeof t)return t&=255,ts.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):hs(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function hs(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function ys(e,t,n){return 0===t&&n===e.length?Qa(e):Qa(e.slice(t,n))}function xs(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=ws)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $s(this,t,n);case"utf8":case"utf-8":return xs(this,t,n);case"ascii":return bs(this,t,n);case"latin1":case"binary":return _s(this,t,n);case"base64":return ys(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ks(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},ts.prototype.equals=function(e){if(!ss(e))throw new TypeError("Argument must be a Buffer");return this===e||0===ts.compare(this,e)},ts.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},ts.prototype.compare=function(e,t,n,r,i){if(!ss(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),u=0;ui)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return fs(this,e,t,n);case"utf8":case"utf-8":return ds(this,e,t,n);case"ascii":return ps(this,e,t,n);case"latin1":case"binary":return gs(this,e,t,n);case"base64":return ms(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vs(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},ts.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ws=4096;function bs(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function Es(e,t,n,r,i,o){if(!ss(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function js(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function Is(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function Ts(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Ss(e,t,n,r,i){return i||Ts(e,0,n,4),Ja(e,t,n,r,23,4),n+4}function Ms(e,t,n,r,i){return i||Ts(e,0,n,8),Ja(e,t,n,r,52,8),n+8}ts.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},ts.prototype.readUInt8=function(e,t){return t||As(e,1,this.length),this[e]},ts.prototype.readUInt16LE=function(e,t){return t||As(e,2,this.length),this[e]|this[e+1]<<8},ts.prototype.readUInt16BE=function(e,t){return t||As(e,2,this.length),this[e]<<8|this[e+1]},ts.prototype.readUInt32LE=function(e,t){return t||As(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ts.prototype.readUInt32BE=function(e,t){return t||As(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ts.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||As(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},ts.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||As(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},ts.prototype.readInt8=function(e,t){return t||As(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ts.prototype.readInt16LE=function(e,t){t||As(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},ts.prototype.readInt16BE=function(e,t){t||As(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},ts.prototype.readInt32LE=function(e,t){return t||As(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ts.prototype.readInt32BE=function(e,t){return t||As(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ts.prototype.readFloatLE=function(e,t){return t||As(e,4,this.length),Ka(this,e,!0,23,4)},ts.prototype.readFloatBE=function(e,t){return t||As(e,4,this.length),Ka(this,e,!1,23,4)},ts.prototype.readDoubleLE=function(e,t){return t||As(e,8,this.length),Ka(this,e,!0,52,8)},ts.prototype.readDoubleBE=function(e,t){return t||As(e,8,this.length),Ka(this,e,!1,52,8)},ts.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Es(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},ts.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,1,255,0),ts.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ts.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,2,65535,0),ts.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):js(this,e,t,!0),t+2},ts.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,2,65535,0),ts.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):js(this,e,t,!1),t+2},ts.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,4,4294967295,0),ts.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Is(this,e,t,!0),t+4},ts.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,4,4294967295,0),ts.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Is(this,e,t,!1),t+4},ts.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Es(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},ts.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Es(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},ts.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,1,127,-128),ts.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ts.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,2,32767,-32768),ts.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):js(this,e,t,!0),t+2},ts.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,2,32767,-32768),ts.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):js(this,e,t,!1),t+2},ts.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,4,2147483647,-2147483648),ts.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Is(this,e,t,!0),t+4},ts.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Es(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ts.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Is(this,e,t,!1),t+4},ts.prototype.writeFloatLE=function(e,t,n){return Ss(this,e,t,!0,n)},ts.prototype.writeFloatBE=function(e,t,n){return Ss(this,e,t,!1,n)},ts.prototype.writeDoubleLE=function(e,t,n){return Ms(this,e,t,!0,n)},ts.prototype.writeDoubleBE=function(e,t,n){return Ms(this,e,t,!1,n)},ts.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!ts.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Ns(e){return function(e){var t,n,r,i,o,a;Ua||Ya();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Wa(3*s/4-o),r=o>0?s-4:s;var l=0;for(t=0,n=0;t>16&255,a[l++]=i>>8&255,a[l++]=255&i;return 2===o?(i=Va[e.charCodeAt(t)]<<2|Va[e.charCodeAt(t+1)]>>4,a[l++]=255&i):1===o&&(i=Va[e.charCodeAt(t)]<<10|Va[e.charCodeAt(t+1)]<<4|Va[e.charCodeAt(t+2)]>>2,a[l++]=i>>8&255,a[l++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Cs,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Ps(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Rs(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}Yr("/.transactions","lock");const Ls="Only the root node may have no parent",Fs="An index may only have a record or root as a parent",zs="aggregateGroup parent must be an index",Bs=e=>()=>ji([e=>ro(e)&&!(e=>ro(e)&&e.isSingle)(e),t=>Yr(e.parent().nodeKey(),e.collectionName,`${t.nodeId}-{id}`)],[so,Pt("/")],[Ti,t=>Yr(e.parent().nodeKey(),t.name)])(e),Hs=e=>t=>{if(oo(t)&&ci(e)&&!so(e)&&!ro(e))throw new Er(Fs);if(ao(t)&&ci(e)&&!oo(e))throw new Er(zs);if(ui(e)&&!so(t))throw new Er(Ls);return t},Vs=e=>t=>(t.nodeKey=Bs(t),t.pathRegx=(e=>()=>e.nodeKey().replace(/{id}/g,"[a-zA-Z0-9_-]+"))(t),t.parent=Pt(e),t.isRoot=(()=>ui(e)&&"root"===t.name&&"root"===t.type),io(t)&&(t.collectionNodeKey=(()=>Yr(e.nodeKey(),t.collectionName)),t.collectionPathRegx=(()=>Yr(e.pathRegx(),t.collectionName))),t),Ws=e=>{const t=e.parent();if(ci(t)&&(oo(e)?t.indexes.push(e):ao(e)?t.aggregateGroups.push(e):t.children.push(e),ro(e))){const n=Xt(t.indexes,e=>e.name===`${t.name}_index`);n&&n.allowedRecordNodeIds.push(e.nodeId)}return e},Us=(e,t)=>Wr(t,[Vs(e),Hs(e),Ws]),Ys=e=>{if(!e)return null;const t=e=>so(e)?e:t(e.parent()),n=t(e);return Wr(n,[Ui,xe(e=>e.nodeId),Je])+1},qs=(e,t)=>(Vs(t)(e),e.indexes&&Zt(e.indexes,t=>qs(t,e)),e.aggregateGroups&&Zt(e.aggregateGroups,t=>qs(t,e)),e.children&&e.children.length>0&&Zt(e.children,t=>qs(t,e)),e.fields&&Zt(e.fields,e=>Zt(e.typeOptions,(t,n)=>{const r=sa[e.type].optionDefinitions[n];r?e.typeOptions[n]=r.parse(t):delete e.typeOptions[n]})),e),Qs=()=>Vs()({name:"root",type:"root",children:[],pathMaps:[],indexes:[],nodeId:0}),Ks=(e,t,n,r)=>{const i=Us(e,{name:t,type:"record",fields:[],children:[],validationRules:[],nodeId:Ys(e),indexes:[],allidsShardFactor:ro(e)?1:64,collectionName:"",isSingle:r});if(n){const n=Zs(e);n.name=`${t}_index`,n.allowedRecordNodeIds.push(i.nodeId)}return i},Js=(e,t="",n=!0)=>Ks(e,t,n,!1),Gs=e=>Ks(e,"",!1,!0),Zs=(e,t="ancestor")=>Us(e,{name:"",type:"index",map:"return {...record};",filter:"",indexType:t,getShardName:"",getSortKey:"record.id",aggregateGroups:[],allowedRecordNodeIds:[],nodeId:Ys(e)}),Xs=e=>Us(e,{name:"",type:"aggregateGroup",groupBy:"",aggregates:[],condition:"",nodeId:Ys(e)}),el=e=>{const t={name:"",aggregatedValue:""};return e.aggregates.push(t),t},tl={AddFieldValidationFailed:"Add field validation: "},nl=e=>({name:"",type:e,typeOptions:la(e),label:"",getInitialValue:"default",getUndefinedValue:"default"}),rl=e=>[Fi("name","field name is not set",e=>yi(e.name)),Fi("type","field type is not set",e=>yi(e.type)),Fi("label","field label is not set",e=>yi(e.label)),Fi("getInitialValue","getInitialValue function is not set",e=>yi(e.getInitialValue)),Fi("getUndefinedValue","getUndefinedValue function is not set",e=>yi(e.getUndefinedValue)),Fi("name","field name is duplicated",t=>hi(t.name)||1===_e("name")(e)[t.name]),Fi("type","type is unknown",e=>hi(e.type)||ye(t=>e.type===t)((()=>Fe(sa))()))],il=e=>{const t=sa[e.type];if(ui(t))return[];const n=e=>t.optionDefinitions[e];return Wr(e.typeOptions,[Fe,we(e=>ci(n(e))&&ci(n(e).isValid)),xe(e=>Fi(`typeOptions.${e}`,`${n(e).requirementDescription}`,t=>n(e).isValid(t.typeOptions[e])))])},ol=e=>t=>{const n=$e(t)(e)?e:[...e,t];return Bi([...rl(n),...il(t)])(t)},al=e=>Wr(e.fields,[xe(ol(e.fields)),He]),sl=(e,t)=>{hi(t.label)&&(t.label=t.name);const n=ol([...e.fields,t])(t);if(n.length>0){const e=xe(e=>e.error)(n);throw new Er(`${tl.AddFieldValidationFailed} ${e.join(", ")}`)}e.fields.push(t)},ll=(e,t,n)=>({invalidFields:e,messageWhenInvalid:t,expressionWhenValid:n}),cl=ji([Oe,e=>e.toString()],[Ne,e=>e.toString()],[Ue,e=>`'${e}'`]),ul={fieldNotEmpty:e=>ll([e],`${e} is empty`,`!_.isEmpty(record['${e}'])`),fieldBetween:(e,t,n)=>ll([e],`${e} must be between ${t.toString()} and ${n.toString()}`,`record['${e}'] >= ${cl(t)} && record['${e}'] <= ${cl(n)} `),fieldGreaterThan:(e,t,n)=>ll([e],`${e} must be greater than ${t.toString()} and ${n.toString()}`,`record['${e}'] >= ${cl(t)} `)},hl=e=>t=>e.validationRules.push(t),fl=()=>({actionName:"",eventName:"",optionsCreator:"",condition:""}),dl=()=>({name:"",behaviourSource:"",behaviourName:"",initialOptions:{}}),pl=[Fi("name","choose a name for the aggregate",e=>yi(e.name)),Fi("aggregatedValue","aggregatedValue does not compile",e=>Nt(e.aggregatedValue)||ki(()=>fn(e.aggregatedValue)))],gl=e=>Bi(pl)(e),ml=(...e)=>Ee(He([...e])),vl=[Fi("name","node name is not set",e=>(e=>ci(e)&&e.trim().length>0)(e.name)),Fi("type","node type not recognised",si(ro,so,oo,ao))],yl=[Fi("fields","no fields have been added to the record",e=>vi(e.fields)),Fi("validationRules","validation rule is missing a 'messageWhenValid' member",e=>qe(e=>qt(e,"messageWhenInvalid"))(e.validationRules)),Fi("validationRules","validation rule is missing a 'expressionWhenValid' member",e=>qe(e=>qt(e,"expressionWhenValid"))(e.validationRules))],xl=[Fi("condition","condition does not compile",e=>be(e.condition)||ki(()=>hn(e.condition)))],wl=e=>Bi((e=>ji([ro,ml(vl,yl)],[oo,ml(vl,Wi)],[ao,ml(vl,xl)],[Ti,ml(vl,[])])(e))(e))(e),bl=e=>{const t=Ui(e),n=Fi("name","node names must be unique under shared parent",e=>1===we(t=>t.parent()===e.parent()&&t.name===e.name)(t).length),r=Wr(t,[xe(e=>Bi([n])(e)),we(ci),He]),i=Wr(t,[we(ro),xe(al),He]),o=Wr(t,[we(ao),xe(e=>(e=>Wr(e,[xe(gl),He]))(e.aggregates)),He]);return Wr(t,[xe(wl),He,de(r),de(i),de(o)])},_l=[Fi("name","action must have a name",e=>yi(e.name)),Fi("behaviourName","must supply a behaviour name to the action",e=>yi(e.behaviourName)),Fi("behaviourSource","must supply a behaviour source for the action",e=>yi(e.behaviourSource))],$l=Fi("","action name must be unique",()=>{}),kl=e=>Bi(_l)(e),Al=e=>{const t=Wr(e,[we(t=>we(e=>e.name===t.name)(e).length>1),xe(e=>zi($l,e))]);return Wr(e,[xe(kl),He,de(t),Ye("name")])},El=(e,t)=>{return Bi((e=>[Fi("actionName","must specify an action",e=>yi(e.actionName)),Fi("eventName","must specify and event",e=>yi(e.eventName)),Fi("actionName","specified action not supplied",t=>!t.actionName||ye(e=>e.name===t.actionName)(e)),Fi("eventName","invalid Event Name",e=>!e.eventName||$e(e.eventName)(Ar)),Fi("optionsCreator","Options Creator does not compile - check your expression",e=>{if(!e.optionsCreator)return!0;try{return fn(e.optionsCreator),!0}catch(e){return!1}}),Fi("condition","Trigger condition does not compile - check your expression",e=>{if(!e.condition)return!0;try{return hn(e.condition),!0}catch(e){return!1}})])(t))(e)},jl=(e,t)=>Wr(e,[xe(e=>El(e,t)),He]),Il=e=>async()=>{if(!await e.exists(Zr))throw new Error("Application definition does not exist");const t=await e.loadJson(Zr);return t.hierarchy=qs(t.hierarchy),t},Tl=e=>async t=>Tr(e,kr.templateApi.saveApplicationHierarchy,za.writeTemplates.isAuthorized,{hierarchy:t},Sl,e.datastore,t),Sl=async(e,t)=>{const n=await bl(t);if(n.length>0)throw new Error(`Hierarchy is invalid: ${At(n.map(e=>`${e.item.nodeKey?e.item.nodeKey():""} : ${e.error}`),",")}`);if(await e.exists(Zr)){const n=await e.loadJson(Zr);n.hierarchy=t,await e.updateJson(Zr,n)}else{await e.createFolder("/.config");const n={actions:[],triggers:[],hierarchy:t};await e.createJson(Zr,n)}},Ml=e=>async(t,n)=>Tr(e,kr.templateApi.saveActionsAndTriggers,za.writeTemplates.isAuthorized,{actions:t,triggers:n},Cl,e.datastore,t,n),Cl=async(e,t,n)=>{if(!await e.exists(Zr))throw new Er("Cannot save actions: Application definition does not exist");{const r=await e.loadJson(Zr);r.actions=t,r.triggers=n;const i=xe(e=>e.error)(Al(t));if(i.length>0)throw new Er(`Actions are invalid: ${At(i,", ")}`);const o=xe(e=>e.error)(jl(n,t));if(o.length>0)throw new Er(`Triggers are invalid: ${At(o,", ")}`);await e.updateJson(Zr,r)}},Ol=e=>(e=>({getApplicationDefinition:Il(e.datastore),saveApplicationHierarchy:Tl(e),saveActionsAndTriggers:Ml(e),getBehaviourSources:()=>(async e=>{await e.loadFile("/.config/behaviourSources.js")})(e.datastore),getNewRootLevel:Qs,constructNode:Us,getNewIndexTemplate:Zs,getNewRecordTemplate:Js,getNewField:nl,validateField:ol,addField:sl,fieldErrors:tl,getNewRecordValidationRule:ll,commonRecordValidationRules:ul,addRecordValidationRule:hl,createAction:dl,createTrigger:fl,validateActions:Al,validateTrigger:El,getNewAggregateGroupTemplate:Xs,getNewAggregateTemplate:el,constructHierarchy:qs,getNewSingleRecordTemplate:Gs,allTypes:sa,validateNode:wl,validateAll:bl,validateTriggers:jl}))(e),Dl=e=>async()=>Tr(e,kr.authApi.getUsers,za.listUsers.isAuthorized,{},Nl,e),Nl=async e=>Wr(await e.datastore.loadJson(ca),[xe(ma)]),Pl=e=>async()=>Tr(e,kr.authApi.loadAccessLevels,za.listAccessLevels.isAuthorized,{},Rl,e),Rl=async e=>await e.datastore.loadJson(fa),Ll="$argon2i$v=19$m=4096,t=3,p=1$UZRo409UYBGjHJS3CV6Uxw$rU84qUqPeORFzKYmYY0ceBLDaPO+JWSH4PfNiKXfIKk",Fl=e=>async(t,n)=>Tr(e,kr.authApi.authenticate,Fa,{username:t,password:n},zl,e,t,n),zl=async(e,t,n)=>{if(hi(t)||hi(n))return null;const r=await Nl(e);let i=ga(r,t);let o;i&&i.enabled||(i="not-a-user");try{o=await e.datastore.loadJson(ua(t))}catch(e){o={accessLevels:[],passwordHash:Ll}}const a=await Hl(e,i.accessLevels),s=await e.crypto.verify(o.passwordHash,n);return"not-a-user"===i?null:s?{...i,permissions:a,temp:!1,isUser:!0}:null},Bl=e=>async t=>{if(hi(t))return null;const n=va(t);let r=Wr(await Nl(e),[Ae(e=>e.temporaryAccessId===n.id)]);let i;r&&r.enabled||(r="not-a-user");try{i=await e.datastore.loadJson(ua(r.name))}catch(t){i={temporaryAccessHash:Ll,temporaryAccessExpiryEpoch:await e.getEpochTime()+1e4}}i.temporaryAccessExpiryEpoch{const n=await Rl(e);return Wr(n.levels,[we(e=>ye(t=>e.name===t)(t)),xe(e=>e.permissions),He])},Vl=e=>async t=>Tr(e,kr.authApi.createTemporaryAccess,Fa,{userName:t},Wl,e,t),Wl=async(e,t)=>{const n=await Ul(e),r=await Pr(e,ha,1e3,2);if(Br(r))throw new Error("Unable to create temporary access, could not get lock - try again");try{const i=await e.datastore.loadJson(ca);ga(i,t).temporaryAccessId=n.temporaryAccessId,await e.datastore.updateJson(ca,i)}finally{await Fr(e,r)}const i=await e.datastore.loadJson(ua(t));return i.temporaryAccessHash=n.temporaryAccessHash,i.temporaryAccessExpiryEpoch=n.temporaryAccessExpiryEpoch,await e.datastore.updateJson(ua(t),i),n.tempCode},Ul=async e=>{const t=wt()+wt()+wt()+wt(),n=wt();return{temporaryAccessHash:await e.crypto.hash(t),temporaryAccessExpiryEpoch:await e.getEpochTime()+3e5,tempCode:`tmp:${n}:${t}`,temporaryAccessId:n}},Yl=()=>(e,t)=>Bi((e=>[Fi("name","username must be set",e=>yi(e.name)),Fi("accessLevels","user must have at least one access level",e=>e.accessLevels.length>0),Fi("name","username must be unique",t=>1===we(e=>li(e.name,t.name))(e).length),Fi("accessLevels","access levels must only contain stings",e=>gi(yi)(e.accessLevels))])(e))(t),ql=e=>()=>Sr(e,kr.authApi.getNewUser,za.createUser.isAuthorized,{},Ql,e),Ql=()=>({name:"",accessLevels:[],enabled:!0,temporaryAccessId:""}),Kl=e=>()=>Sr(e,kr.authApi.getNewUserAuth,za.createUser.isAuthorized,{},Jl,e),Jl=()=>({passwordHash:"",temporaryAccessHash:"",temporaryAccessExpiryEpoch:0}),Gl=e=>t=>Sr(e,kr.authApi.isValidPassword,Fa,{password:t},Zl,e,t),Zl=(e,t)=>ic(t).score>30,Xl=e=>async(t,n)=>Tr(e,kr.authApi.changeMyPassword,Fa,{currentPw:t,newpassword:n},ec,e,t,n),ec=async(e,t,n)=>{const r=await e.datastore.loadJson(ua(e.user.name));if(ci(r.passwordHash)){if(await e.crypto.verify(r.passwordHash,t))return await(await rc(e,r,e.user.name,n)),!0}return!1},tc=e=>async(t,n)=>Tr(e,kr.authApi.setPasswordFromTemporaryCode,Fa,{tempCode:t,newpassword:n},nc,e,t,n),nc=async(e,t,n)=>{const r=await e.getEpochTime(),i=va(t),o=Wr(await Nl(e),[Ae(e=>e.temporaryAccessId===i.id)]);if(!o)return!1;const a=await e.datastore.loadJson(ua(o.name));if(ci(a.temporaryAccessHash)&&a.temporaryAccessExpiryEpoch>r){if(await e.crypto.verify(a.temporaryAccessHash,i.code))return await rc(e,a,o.name,n),!0}return!1},rc=async(e,t,n,r)=>{t.temporaryAccessHash="",t.temporaryAccessExpiryEpoch=0,t.passwordHash=await e.crypto.hash(r),await e.datastore.updateJson(ua(n),t)},ic=e=>t=>Sr(e,kr.authApi.scorePassword,Fa,{password:t},oc,t),oc=e=>{let t=0;if(!e)return t;const n=new Object;for(let r=0;r80?"strong":t>60?"good":t>=30?"weak":"very weak";return{score:parseInt(t),strengthText:o}},ac=e=>async(t,n=null)=>Tr(e,kr.authApi.createUser,za.createUser.isAuthorized,{user:t,password:n},sc,e,t,n),sc=async(e,t,n=null)=>{const r=await Pr(e,ha,1e3,2);if(Br(r))throw new Error("Unable to create user, could not get lock - try again");const i=await e.datastore.loadJson(ca),o=Yl()([...i,t],t);if(o.length>0)throw new Er(`User is invalid. ${We("; ")(o)}`);const{auth:a,tempCode:s,temporaryAccessId:l}=await lc(e,n);if(t.tempCode=s,t.temporaryAccessId=l,ye(e=>li(e.name,t.name))(i))throw new Er("User already exists");i.push(ma(t)),await e.datastore.updateJson(ca,i);try{await e.datastore.createJson(ua(t.name),a)}catch(n){await e.datastore.updateJson(ua(t.name),a)}return await Fr(e,r),t},lc=async(e,t)=>{const n=Kl(e)();if(yi(t)){if(Gl(t))return n.passwordHash=await e.crypto.hash(t),n.temporaryAccessHash="",n.temporaryAccessId="",n.temporaryAccessExpiryEpoch=0,{auth:n};throw new Er("Password does not meet requirements")}{const t=await Ul(e);return n.temporaryAccessHash=t.temporaryAccessHash,n.temporaryAccessExpiryEpoch=t.temporaryAccessExpiryEpoch,n.passwordHash="",{auth:n,tempCode:t.tempCode,temporaryAccessId:t.temporaryAccessId}}},cc=e=>async t=>Tr(e,kr.authApi.enableUser,za.enableDisableUser.isAuthorized,{username:t},hc,e,t),uc=e=>async t=>Tr(e,kr.authApi.disableUser,za.enableDisableUser.isAuthorized,{username:t},fc,e,t),hc=async(e,t)=>await dc(e,t,!0),fc=async(e,t)=>await dc(e,t,!1),dc=async(e,t,n)=>{const r=await Pr(e,ha,1e3,1,0),i=n?"enable":"disable";if(Br(r))throw new Error(`Could not ${i} user - cannot get lock`);try{const o=await e.datastore.loadJson(ca),a=ga(o,t);if(!a)throw new Ir(`Could not find user to ${i}`);a.enabled===!n&&(a.enabled=n,await e.datastore.updateJson(ca,o))}finally{Fr(e,r)}},pc=e=>[Fi("type","type must be one of allowed types",e=>(e=>Wr(pa,[Re,$e(e)]))(e.type)),Fi("nodeKey","record and index permissions must include a valid nodeKey",t=>!(e=>ye(t=>t===e)([pa.CREATE_RECORD,pa.UPDATE_RECORD,pa.DELETE_RECORD,pa.READ_RECORD,pa.READ_INDEX,pa.EXECUTE_ACTION]))(t.type)||ci(Qi(e.hierarchy,t.nodeKey)))],gc=e=>Bi(pc(e)),mc=e=>Bi((e=>[Fi("name","name must be set",e=>yi(e.name)),Fi("name","access level names must be unique",t=>be(t.name)||1===we(e=>li(t.name,e.name))(e).length)])(e)),vc=e=>t=>Sr(e,kr.authApi.validateAccessLevels,Fa,{allLevels:t},yc,e,t),yc=(e,t)=>Wr(t,[xe(n=>(e=>(t,n)=>Wr(n.permissions,[xe(gc(e)),He,ze(mc(t)(n))]))(e)(t,n)),He,Qe((e,t)=>e.field===t.field&&e.item===t.item&&e.error===t.error)]),xc=e=>async t=>Tr(e,kr.authApi.saveAccessLevels,za.writeAccessLevels.isAuthorized,{accessLevels:t},wc,e,t),wc=async(e,t)=>{const n=vc(e)(t.levels);if(n.length>0){const e=Wr(n,[xe(e=>e.error),We(", ")]);throw new Error(`Access Levels Invalid: ${e}`)}const r=await Pr(e,da,2e3,2);if(Br(r))throw new Error("Could not get lock to save access levels");try{if((await e.datastore.loadJson(fa)).version!==t.version)throw new Error("Access levels have already been updated, since you loaded");t.version++,e.datastore.updateJson(fa,t)}finally{await Fr(e,r)}},bc=e=>async(t,n)=>Tr(e,kr.authApi.setUserAccessLevels,za.setUserAccessLevels.isAuthorized,{userName:t,accessLevels:n},_c,e,t,n),_c=async(e,t,n)=>{const r=await Pr(e,ha,1e3,1,0),i=Wr(await e.datastore.loadJson(fa),[e=>e.levels,xe(e=>e.name)]),o=Be(n)(i);if(o.length>0)throw new Error(`Invalid access levels supplied: ${We(", ",o)}`);if(Br(r))throw new Error("Could set user access levels cannot get lock");try{const i=await e.datastore.loadJson(ca),o=ga(i,t);if(!o)throw new Ir(`Could not find user with ${t}`);o.accessLevels=n,await e.datastore.updateJson(ca,i)}finally{Fr(e,r)}},$c=e=>({authenticate:Fl(e),authenticateTemporaryAccess:Bl(e),createTemporaryAccess:Vl(e),createUser:ac(e),loadAccessLevels:Pl(e),enableUser:cc(e),disableUser:uc(e),getNewAccessLevel:()=>({name:"",permissions:[],default:!1}),getNewUser:ql(e),getNewUserAuth:Kl(e),getUsers:Dl(e),saveAccessLevels:xc(e),isAuthorized:ya(e),changeMyPassword:Xl(e),setPasswordFromTemporaryCode:tc(e),scorePassword:ic,isValidPassword:Gl(e),validateUser:Yl(),validateAccessLevels:vc(e),generateFullPermissions:()=>(e=>{const t=Ui(e.hierarchy),n={permissions:[]},r=Wr(t,[we(ro)]);for(const e of r)za.createRecord.add(e.nodeKey(),n),za.updateRecord.add(e.nodeKey(),n),za.deleteRecord.add(e.nodeKey(),n),za.readRecord.add(e.nodeKey(),n);const i=Wr(t,[we(oo)]);for(const e of i)za.readIndex.add(e.nodeKey(),n);for(const t of Fe(e.actions))za.executeAction.add(t,n);return Wr(za,[Re,we(e=>!e.isNode),Ve(e=>e.add(n))]),n.permissions})(e),setUserAccessLevels:bc(e)}),kc=Li.$,Ac=Li.eventsList,Ec=(e,t)=>kc(e,[po.getFlattenedHierarchy,Ae(e=>e.nodeId===t||e.nodeKey()===t)]),jc=e=>e?Ic(e).constructHierarchy(e):e,Ic=e=>Ol({hierarchy:e}),Tc=(e,t)=>$c({hierarchy:e,actions:Le("name")(t),publish:()=>{}}),Sc=Ic({}).allTypes,Mc={all:Ic({}).validateAll,node:Ic({}).validateNode,field:Ic({}).validateField},Cc=(e,t)=>{return kc(e,[po.getFlattenedHierarchy,we(e=>po.isAncestor(t)(e)||po.isAncestor(t)(e.parent())),xe(e=>e.indexes),He,we(po.isReferenceIndex)])},Oc=(e,t)=>kc(e,[po.getFlattenedHierarchy,we(po.isAncestorIndex),we(e=>po.isAncestor(t)(e.parent())||e.parent().nodeId===t.parent().nodeId||po.isRoot(e.parent()))]),Dc=e=>e?Sc[e].getDefaultOptions():{},Nc=()=>Ic({}).createAction(),Pc=()=>Ic({}).createTrigger(),Rc=e=>Ic({}).validateActions(e),Lc=(e,t)=>Ic({}).validateTriggers(e,t),Fc=(e,t)=>Tc(e,t).generateFullPermissions(),zc=()=>Tc().getNewAccessLevel(),Bc=(e,t,n)=>Tc(e,t).validateAccessLevels(n);const Hc=(e,t)=>async()=>{const n=window.location.hash?ke(window.location.hash.substr(1).split("/")):"";if(!n)return t.apps=await fetch("/_builder/api/apps").then(e=>e.json()),t.hasAppPackage=!1,e.set(t),t;const r=await fetch(`/_builder/api/${n}/appPackage`).then(e=>e.json());if(t.appname=n,t.hasAppPackage=!0,t.hierarchy=r.appDefinition.hierarchy,t.accessLevels=r.accessLevels,t.actions=pe((e,t)=>(e.push(t),e))(r.appDefinition.actions,[]),t.triggers=r.appDefinition.triggers,t.hierarchy&&!be(t.hierarchy)){t.hierarchy=jc(t.hierarchy);const e=iu(t.hierarchy);null!==t.currentNode&&(t.currentNode=Ec(e,t.currentNode.nodeId))}return e.set(t),t},Vc=(e,t)=>()=>{e.update(e=>{e.currentNodeIsNew=!0;const n=iu(e.hierarchy);return parent=t?n:Ec(n,e.currentNode.nodeId),e.errors=[],e.currentNode=Ic(n).getNewRecordTemplate(parent,"",!0),e})},Wc=e=>t=>{e.update(e=>{const n=iu(e.hierarchy);return e.currentNode=Ec(n,t),e.currentNodeIsNew=!1,e.errors=[],e})},Uc=(e,t)=>()=>{e.update(e=>{e.currentNodeIsNew=!0,e.errors=[];const n=iu(e.hierarchy);return parent=t?n:Ec(n,e.currentNode.nodeId),e.currentNode=Ic(n).getNewIndexTemplate(parent),e})},Yc=e=>()=>{e.update(t=>{const n=Mc.node(t.currentNode);if(t.errors=n,n.length>0)return t;const r=Ec(t.hierarchy,t.currentNode.parent().nodeId),i=Ec(t.hierarchy,t.currentNode.nodeId);let o=r.children.length;i&&(o=i.parent().children.indexOf(i),i.parent().children=kc(i.parent().children,[we(e=>e.nodeId!==i.nodeId)]));const a=me(t.currentNode);Ic(t.hierarchy).constructNode(r,a);return r.children=kc(r.children,[Ge(e=>{if(e===a)return o;const t=r.children.indexOf(e);return t>=o?t+1:t})]),t.currentNodeIsNew=!1,ou(e,t),t})},qc=e=>t=>{e.update(e=>(e.hierarchy=t.hierarchy,e.currentNode=t.hierarchy.children.length>0?t.hierarchy.children[0]:null,e.actions=t.actions,e.triggers=t.triggers,e.currentNodeIsNew=!1,e))},Qc=e=>()=>{e.update(t=>{const n=Ec(t.hierarchy,t.currentNode.nodeId);return t.currentNode=po.isRoot(n.parent())?Ae(e=>e!=t.currentNode)(t.hierarchy.children):n.parent(),po.isRecord(n)?n.parent().children=we(e=>e.nodeId!==n.nodeId)(n.parent().children):n.parent().indexes=we(e=>e.nodeId!==n.nodeId)(n.parent().indexes),t.errors=[],ou(e,t),t})},Kc=e=>t=>{e.update(e=>(e.currentNode.fields=we(e=>e.name!==t.name)(e.currentNode.fields),Ic(e.hierarchy).addField(e.currentNode,t),e))},Jc=e=>t=>{e.update(e=>(e.currentNode.fields=we(e=>e.name!==t.name)(e.currentNode.fields),e))},Gc=e=>(t,n,r=null)=>{e.update(i=>{const o=n?null:Ae(e=>e.name===r.name)(i.actions);return o?i.actions=kc(i.actions,[xe(e=>e===o?t:e)]):i.actions.push(t),ou(e,i),i})},Zc=e=>t=>{e.update(n=>(n.actions=we(e=>e.name!==t.name)(n.actions),ou(e,n),n))},Xc=e=>(t,n,r=null)=>{e.update(i=>{const o=n?null:Ae(e=>e.name===r.name)(i.triggers);return o?i.triggers=kc(i.triggers,[xe(e=>e===o?t:e)]):i.triggers.push(t),ou(e,i),i})},eu=e=>t=>{e.update(e=>(e.triggers=we(e=>e.name!==t.name)(e.triggers),e))},tu=e=>(t,n,r=null)=>{e.update(i=>{const o=n?null:Ae(e=>e.name===r.name)(i.accessLevels);return o?i.accessLevels=kc(i.accessLevels,[xe(e=>e===o?t:e)]):i.accessLevels.push(t),ou(e,i),i})},nu=e=>t=>{e.update(n=>(n.accessLevels=we(e=>e.name!==t.name)(n.accessLevels),ou(e,n),n))},ru=e=>t=>{e.update(e=>(e.activeNav=t,e))},iu=e=>jc(JSON.parse(JSON.stringify(e))),ou=(e,t)=>{const n={appDefinition:{hierarchy:t.hierarchy,triggers:t.triggers,actions:Ke("name")(t.actions)},accessLevels:t.accessLevels};fetch(`/_builder/api/${t.appname}/appPackage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},au=(()=>{const t={apps:[],appname:"",hierarchy:{},actions:[],triggers:[],currentNodeIsNew:!1,errors:[],activeNav:"database",hasAppPackage:!1,accessLevels:[],currentNode:null},n=function(t,n=e){let r;const i=[];function o(e){if(a(t,e)){if(t=e,!r)return;i.forEach(e=>e[1]()),i.forEach(e=>e[0](t))}}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=e){const l=[a,s];return i.push(l),1===i.length&&(r=n(o)||e),a(t),()=>{const e=i.indexOf(l);-1!==e&&i.splice(e,1),0===i.length&&(r(),r=null)}}}}(t);return n.initialise=Hc(n,t),n.newChildRecord=Vc(n,!1),n.newRootRecord=Vc(n,!0),n.selectExistingNode=Wc(n),n.newChildIndex=Uc(n,!1),n.newRootIndex=Uc(n,!0),n.saveCurrentNode=Yc(n),n.importAppDefinition=qc(n),n.deleteCurrentNode=Qc(n),n.saveField=Kc(n),n.deleteField=Jc(n),n.saveAction=Gc(n),n.deleteAction=Zc(n),n.saveTrigger=Xc(n),n.deleteTrigger=eu(n),n.saveLevel=tu(n),n.deleteLevel=nu(n),n.setActiveNav=ru(n),n})(),su=async()=>{try{lu(au),await au.initialise()}catch(e){console.log(e)}},lu=e=>{const t=history.pushState;history.pushState=(()=>{t.apply(history,arguments),e.initialise()}),window.addEventListener("hashchange",()=>{e.initialise()})};function cu(e,t,n){const r=Object.create(e);return r.app=t[n],r}function uu(e){var t,n,r,i=e.app;return{c(){t=g("a"),n=m(i),w(t,"href",r=`#/${e.app}`),w(t,"class","app-link svelte-jymnqv")},m(e,r){f(e,t,r),h(t,n)},p(e,o){e.$database&&i!==(i=o.app)&&b(n,i),e.$database&&r!==(r=`#/${o.app}`)&&w(t,"href",r)},d(e){e&&d(t)}}}function hu(t){for(var n,r,i,o,a,s,l,c,u=t.$database.apps,m=[],y=0;y{n("$database",r=e)}),{$database:r}}class du extends G{constructor(e){super(),J(this,e,fu,hu,a,[])}}var pu,gu=ne(function(e,t){var n;"undefined"!=typeof self&&self,n=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"./dist/icons.json":function(e){e.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"dollar-sign":'',"download-cloud":'',download:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(e,t,n){var r,i;i=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r1?arguments[1]:void 0,m=void 0!==g,v=0,y=c(f);if(m&&(g=r(g,p>2?arguments[2]:void 0,2)),null==y||d==Array&&a(y))for(n=new d(t=s(f.length));t>v;v++)l(n,v,m?g(f[v],v):f[v]);else for(h=y.call(f),n=new d;!(u=h.next()).done;v++)l(n,v,m?o(h,g,[u.value,v],!0):u.value);return n.length=v,n}},"./node_modules/core-js/internals/array-includes.js":function(e,t,n){var r=n("./node_modules/core-js/internals/to-indexed-object.js"),i=n("./node_modules/core-js/internals/to-length.js"),o=n("./node_modules/core-js/internals/to-absolute-index.js");e.exports=function(e){return function(t,n,a){var s,l=r(t),c=i(l.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(e,t,n){var r=n("./node_modules/core-js/internals/a-function.js");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(e,t,n){var r=n("./node_modules/core-js/internals/an-object.js");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(e,t,n){var r=n("./node_modules/core-js/internals/well-known-symbol.js")("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},"./node_modules/core-js/internals/classof-raw.js":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(e,t,n){var r=n("./node_modules/core-js/internals/classof-raw.js"),i=n("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,n){var r=n("./node_modules/core-js/internals/has.js"),i=n("./node_modules/core-js/internals/own-keys.js"),o=n("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),a=n("./node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,c=0;cdocument.F=Object<\/script>"),e.close(),h=e.F;n--;)delete h.prototype[o[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[c]=e):n=h(),void 0===t?n:i(n,t)},a[c]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(e,t,n){var r=n("./node_modules/core-js/internals/descriptors.js"),i=n("./node_modules/core-js/internals/object-define-property.js"),o=n("./node_modules/core-js/internals/an-object.js"),a=n("./node_modules/core-js/internals/object-keys.js");e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},"./node_modules/core-js/internals/object-define-property.js":function(e,t,n){var r=n("./node_modules/core-js/internals/descriptors.js"),i=n("./node_modules/core-js/internals/ie8-dom-define.js"),o=n("./node_modules/core-js/internals/an-object.js"),a=n("./node_modules/core-js/internals/to-primitive.js"),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,n){var r=n("./node_modules/core-js/internals/descriptors.js"),i=n("./node_modules/core-js/internals/object-property-is-enumerable.js"),o=n("./node_modules/core-js/internals/create-property-descriptor.js"),a=n("./node_modules/core-js/internals/to-indexed-object.js"),s=n("./node_modules/core-js/internals/to-primitive.js"),l=n("./node_modules/core-js/internals/has.js"),c=n("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return o(!i.f.call(e,t),e[t])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,n){var r=n("./node_modules/core-js/internals/object-keys-internal.js"),i=n("./node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(e,t,n){var r=n("./node_modules/core-js/internals/has.js"),i=n("./node_modules/core-js/internals/to-object.js"),o=n("./node_modules/core-js/internals/shared-key.js"),a=n("./node_modules/core-js/internals/correct-prototype-getter.js"),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(e,t,n){var r=n("./node_modules/core-js/internals/has.js"),i=n("./node_modules/core-js/internals/to-indexed-object.js"),o=n("./node_modules/core-js/internals/array-includes.js"),a=n("./node_modules/core-js/internals/hidden-keys.js"),s=o(!1);e.exports=function(e,t){var n,o=i(e),l=0,c=[];for(n in o)!r(a,n)&&r(o,n)&&c.push(n);for(;t.length>l;)r(o,n=t[l++])&&(~s(c,n)||c.push(n));return c}},"./node_modules/core-js/internals/object-keys.js":function(e,t,n){var r=n("./node_modules/core-js/internals/object-keys-internal.js"),i=n("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return r(e,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t,n){var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},"./node_modules/core-js/internals/object-set-prototype-of.js":function(e,t,n){var r=n("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n,i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),i=n("./node_modules/core-js/internals/object-get-own-property-names.js"),o=n("./node_modules/core-js/internals/object-get-own-property-symbols.js"),a=n("./node_modules/core-js/internals/an-object.js"),s=r.Reflect;e.exports=s&&s.ownKeys||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},"./node_modules/core-js/internals/path.js":function(e,t,n){e.exports=n("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),i=n("./node_modules/core-js/internals/shared.js"),o=n("./node_modules/core-js/internals/hide.js"),a=n("./node_modules/core-js/internals/has.js"),s=n("./node_modules/core-js/internals/set-global.js"),l=n("./node_modules/core-js/internals/function-to-string.js"),c=n("./node_modules/core-js/internals/internal-state.js"),u=c.get,h=c.enforce,f=String(l).split("toString");i("inspectSource",function(e){return l.call(e)}),(e.exports=function(e,t,n,i){var l=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),h(n).source=f.join("string"==typeof t?t:"")),e!==r?(l?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=n:o(e,t,n)):c?e[t]=n:s(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||l.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"./node_modules/core-js/internals/set-global.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),i=n("./node_modules/core-js/internals/hide.js");e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},"./node_modules/core-js/internals/set-to-string-tag.js":function(e,t,n){var r=n("./node_modules/core-js/internals/object-define-property.js").f,i=n("./node_modules/core-js/internals/has.js"),o=n("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},"./node_modules/core-js/internals/shared-key.js":function(e,t,n){var r=n("./node_modules/core-js/internals/shared.js"),i=n("./node_modules/core-js/internals/uid.js"),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},"./node_modules/core-js/internals/shared.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),i=n("./node_modules/core-js/internals/set-global.js"),o=n("./node_modules/core-js/internals/is-pure.js"),a=r["__core-js_shared__"]||i("__core-js_shared__",{});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.1.3",mode:o?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(e,t,n){var r=n("./node_modules/core-js/internals/to-integer.js"),i=n("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e,t,n){var o,a,s=String(i(e)),l=r(t),c=s.length;return l<0||l>=c?n?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?n?s.charAt(l):o:n?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}},"./node_modules/core-js/internals/to-absolute-index.js":function(e,t,n){var r=n("./node_modules/core-js/internals/to-integer.js"),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},"./node_modules/core-js/internals/to-indexed-object.js":function(e,t,n){var r=n("./node_modules/core-js/internals/indexed-object.js"),i=n("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return r(i(e))}},"./node_modules/core-js/internals/to-integer.js":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"./node_modules/core-js/internals/to-length.js":function(e,t,n){var r=n("./node_modules/core-js/internals/to-integer.js"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(e,t,n){var r=n("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return Object(r(e))}},"./node_modules/core-js/internals/to-primitive.js":function(e,t,n){var r=n("./node_modules/core-js/internals/is-object.js");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(e,t,n){var r=n("./node_modules/core-js/internals/is-object.js"),i=n("./node_modules/core-js/internals/an-object.js");e.exports=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),i=n("./node_modules/core-js/internals/shared.js"),o=n("./node_modules/core-js/internals/uid.js"),a=n("./node_modules/core-js/internals/native-symbol.js"),s=r.Symbol,l=i("wks");e.exports=function(e){return l[e]||(l[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},"./node_modules/core-js/modules/es.array.from.js":function(e,t,n){var r=n("./node_modules/core-js/internals/export.js"),i=n("./node_modules/core-js/internals/array-from.js");r({target:"Array",stat:!0,forced:!n("./node_modules/core-js/internals/check-correctness-of-iteration.js")(function(e){})},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(e,t,n){var r=n("./node_modules/core-js/internals/string-at.js"),i=n("./node_modules/core-js/internals/internal-state.js"),o=n("./node_modules/core-js/internals/define-iterator.js"),a=i.set,s=i.getterFor("String Iterator");o(String,"String",function(e){a(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i,!0),t.index+=e.length,{value:e,done:!1})})},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./src/default-attrs.json":function(e){e.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.contents=n,this.tags=i,this.attrs=r({},a.default,{class:"feather feather-"+t})}return i(e,[{key:"toSvg",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),e}();t.default=l},"./src/icons.js":function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("./src/icon.js")),i=a(n("./dist/icons.json")),o=a(n("./src/tags.json"));function a(e){return e&&e.__esModule?e:{default:e}}t.default=Object.keys(i.default).map(function(e){return new r.default(e,i.default[e],o.default[e])}).reduce(function(e,t){return e[t.name]=t,e},{})},"./src/index.js":function(e,t,n){var r=a(n("./src/icons.js")),i=a(n("./src/to-svg.js")),o=a(n("./src/replace.js"));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={icons:r.default,toSvg:i.default,replace:o.default}},"./src/replace.js":function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof document)throw new Error("`feather.replace()` only works in a browser environment.");var t=document.querySelectorAll("[data-feather]");Array.from(t).forEach(function(t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(e){return Array.from(e.attributes).reduce(function(e,t){return e[t.name]=t.value,e},{})}(e),a=n["data-feather"];delete n["data-feather"];var s=o.default[a].toSvg(r({},t,n,{class:(0,i.default)(t.class,n.class)})),l=(new DOMParser).parseFromString(s,"image/svg+xml").querySelector("svg");e.parentNode.replaceChild(l,e)}(t,e)})}},"./src/tags.json":function(e){e.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning"],"alert-octagon":["warning"],"alert-triangle":["warning"],"at-sign":["mention"],award:["achievement","badge"],aperture:["camera","photo"],bell:["alarm","notification"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read"],book:["read","dictionary","booklet","magazine"],bookmark:["read","clip","marker","tag"],briefcase:["work","bag","baggage","folder"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],command:["keyboard","cmd"],compass:["navigation","safari","travel"],copy:["clone","duplicate"],"corner-down-left":["arrow"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch"],"external-link":["outbound"],facebook:["logo"],"fast-forward":["music"],figma:["logo","design","tool"],film:["movie","video"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],global:["world","browser","language","translate"],"hard-drive":["computer","server"],hash:["hashtag","number","pound"],headphones:["music","audio"],heart:["like","love"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication"],"life-bouy":["help","life ring","support"],linkedin:["logo"],lock:["security","password"],"log-in":["sign in","arrow"],"log-out":["sign out","arrow"],mail:["email"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record"],mic:["record"],minimize:["exit fullscreen"],"minimize-2":["exit fullscreen","arrows"],monitor:["tv"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","stop"],"pen-tool":["vector","drawing"],play:["music","start"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],radio:["signal"],rewind:["music"],rss:["feed","subscribe"],save:["floppy disk"],search:["find","magnifier","magnifying glass"],send:["message","mail","paper airplane"],settings:["cog","edit","gear","preferences"],shield:["security"],"shield-off":["security"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slash:["ban","no"],sliders:["settings","controls"],smile:["emoji","face","happy","good","emotion"],speaker:["music"],star:["bookmark","favorite","like"],sun:["brightness","weather","light"],sunrise:["weather"],sunset:["weather"],tag:["label"],target:["bullseye"],terminal:["code","command line"],"thumbs-down":["dislike","bad"],"thumbs-up":["like","good"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],trash:["garbage","delete","remove"],"trash-2":["garbage","delete","remove"],triangle:["delta"],truck:["delivery","van","shipping"],twitter:["logo"],umbrella:["rain","weather"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times"],"x-octagon":["delete","stop","alert","warning","times"],"x-square":["cancel","close","delete","remove","times"],x:["cancel","close","delete","remove","times"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"]}},"./src/to-svg.js":function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=n("./src/icons.js"),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!e)throw new Error("The required `key` (icon name) parameter is missing.");if(!o.default[e])throw new Error("No icon matching '"+e+"'. See the complete list of icons at https://feathericons.com");return o.default[e].toSvg(t)}},0:function(e,t,n){n("./node_modules/core-js/es/array/from.js"),e.exports=n("./src/index.js")}})},e.exports=n()}),mu=(pu=gu)&&pu.__esModule&&Object.prototype.hasOwnProperty.call(pu,"default")?pu.default:pu,vu=e=>mu.toSvg(e);function yu(t){var n,r,i,o,a,s=vu(t.icon);return{c(){n=g("div"),r=g("div"),i=g("div"),w(o=g("div"),"class","icon svelte-td9xyr"),w(i,"class","inner svelte-td9xyr"),w(r,"class","nav-item svelte-td9xyr"),w(n,"class",t.navActive+" svelte-td9xyr"),a=x(r,"click",t.setActive)},m(e,t){f(e,n,t),h(n,r),h(r,i),h(i,o),o.innerHTML=s},p(e,t){e.icon&&s!==(s=vu(t.icon))&&(o.innerHTML=s),e.navActive&&w(n,"class",t.navActive+" svelte-td9xyr")},i:e,o:e,d(e){e&&d(n),a()}}}function xu(e,t,n){let{name:r="",label:i="",icon:o=""}=t,a="";au.subscribe(e=>{n("navActive",a=e.activeNav===r?"active":"")});return e.$set=(e=>{"name"in e&&n("name",r=e.name),"label"in e&&n("label",i=e.label),"icon"in e&&n("icon",o=e.icon)}),{name:r,label:i,icon:o,navActive:a,setActive:()=>au.setActiveNav(r)}}class wu extends G{constructor(e){super(),J(this,e,xu,yu,a,["name","label","icon"])}}function bu(e){var t,n,r,i,o,a,s,l,c=new wu({props:{name:"database",label:"Database",icon:"database"}}),u=new wu({props:{name:"actions",label:"Actions",icon:"zap"}}),p=new wu({props:{name:"access levels",label:"Access Levels",icon:"user"}}),m=new wu({props:{name:"user interface",label:"User Interface",icon:"monitor"}}),y=new wu({props:{name:"package",label:"Package",icon:"package"}});return{c(){t=g("nav"),n=g("img"),r=v(),c.$$.fragment.c(),i=v(),u.$$.fragment.c(),o=v(),p.$$.fragment.c(),a=v(),m.$$.fragment.c(),s=v(),y.$$.fragment.c(),w(n,"src","/_builder/assets/budibase-logo-only.png"),w(n,"class","logo svelte-n1ql72"),w(n,"alt","budibase logo"),w(t,"class","nav svelte-n1ql72"),_(t,"width",e.width)},m(e,d){f(e,t,d),h(t,n),h(t,r),q(c,t,null),h(t,i),q(u,t,null),h(t,o),q(p,t,null),h(t,a),q(m,t,null),h(t,s),q(y,t,null),l=!0},p(e,n){l&&!e.width||_(t,"width",n.width)},i(e){l||(V(c.$$.fragment,e),V(u.$$.fragment,e),V(p.$$.fragment,e),V(m.$$.fragment,e),V(y.$$.fragment,e),l=!0)},o(e){W(c.$$.fragment,e),W(u.$$.fragment,e),W(p.$$.fragment,e),W(m.$$.fragment,e),W(y.$$.fragment,e),l=!1},d(e){e&&d(t),Q(c),Q(u),Q(p),Q(m),Q(y)}}}function _u(e,t,n){let{width:r=50}=t;return e.$set=(e=>{"width"in e&&n("width",r=e.width)}),{width:r}}class $u extends G{constructor(e){super(),J(this,e,_u,bu,a,["width"])}}function ku(e,t,n){const r=Object.create(e);return r.child=t[n],r}function Au(e){for(var t,n,r=e.node.children,i=[],o=0;oW(i[e],1,1,()=>{i[e]=null});return{c(){for(var e=0;e{l=null}),H())},i(e){o||(V(l),o=!0)},o(e){W(l),o=!1},d(e){e&&d(t),l&&l.d(),a()}}}function Iu(e,t,n){let{level:r=0,node:i}=t;return e.$set=(e=>{"level"in e&&n("level",r=e.level),"node"in e&&n("node",i=e.node)}),{level:r,node:i,click_handler:function(){return au.selectExistingNode(i.nodeId)}}}class Tu extends G{constructor(e){super(),J(this,e,Iu,ju,a,["level","node"])}}function Su(t){var n,r,i,o,a,s;return{c(){n=g("div"),r=g("div"),i=m(t.label),o=v(),a=g("input"),w(r,"class","label svelte-umifqh"),w(a,"class","control uk-input svelte-umifqh"),w(n,"class","container svelte-umifqh"),s=x(a,"input",t.input_input_handler)},m(e,s){f(e,n,s),h(n,r),h(r,i),h(n,o),h(n,a),a.value=t.text},p(e,t){e.label&&b(i,t.label),e.text&&a.value!==t.text&&(a.value=t.text)},i:e,o:e,d(e){e&&d(n),s()}}}function Mu(e,t,n){let{text:r="",label:i=""}=t;return e.$set=(e=>{"text"in e&&n("text",r=e.text),"label"in e&&n("label",i=e.label)}),{text:r,label:i,input_input_handler:function(){r=this.value,n("text",r)}}}class Cu extends G{constructor(e){super(),J(this,e,Mu,Su,a,["text","label"])}}function Ou(e,t,n){const r=Object.create(e);return r.option=t[n],r}function Du(e,t,n){const r=Object.create(e);return r.option=t[n],r}function Nu(e){for(var t,n,r=e.options,o=[],a=0;ae.select_change_handler_1.call(t)),w(t,"class","control uk-select svelte-bm0783"),n=[x(t,"change",e.select_change_handler_1),x(t,"change",e.change_handler_1)]},m(n,r){f(n,t,r);for(var i=0;ie.select_change_handler.call(t)),w(t,"class","control uk-select svelte-bm0783"),t.multiple=!0,n=[x(t,"change",e.select_change_handler),x(t,"change",e.change_handler)]},m(n,r){f(n,t,r);for(var i=0;i{"selected"in e&&n("selected",r=e.selected),"label"in e&&n("label",i=e.label),"options"in e&&n("options",o=e.options),"valueMember"in e&&n("valueMember",a=e.valueMember),"textMember"in e&&n("textMember",s=e.textMember),"multiple"in e&&n("multiple",l=e.multiple)}),{selected:r,label:i,options:o,valueMember:a,textMember:s,multiple:l,change_handler:function(t){I(e,t)},change_handler_1:function(t){I(e,t)},select_change_handler:function(){var e;e=this,r=[].map.call(e.querySelectorAll(":checked"),e=>e.__value),n("selected",r),n("valueMember",a),n("options",o)},select_change_handler_1:function(){r=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n("selected",r),n("valueMember",a),n("options",o)}}}class Bu extends G{constructor(e){super(),J(this,e,zu,Fu,a,["selected","label","options","valueMember","textMember","multiple"])}}function Hu(e){var t,n;const r=e.$$slots.default,i=l(r,e,null);return{c(){t=g("div"),i&&i.c(),w(t,"class","root svelte-d6wwkb"),w(t,"style",e.style)},l(e){i&&i.l(div_nodes)},m(e,r){f(e,t,r),i&&i.m(t,null),n=!0},p(e,o){i&&i.p&&e.$$scope&&i.p(u(r,o,e,null),c(r,o,null)),n&&!e.style||w(t,"style",o.style)},i(e){n||(V(i,e),n=!0)},o(e){W(i,e),n=!1},d(e){e&&d(t),i&&i.d(e)}}}function Vu(e,t,n){let{style:r=""}=t,{$$slots:i={},$$scope:o}=t;return e.$set=(e=>{"style"in e&&n("style",r=e.style),"$$scope"in e&&n("$$scope",o=e.$$scope)}),{style:r,$$slots:i,$$scope:o}}class Wu extends G{constructor(e){super(),J(this,e,Vu,Hu,a,["style"])}}function Uu(t){var n,r,i,o,a,s;return{c(){n=g("div"),r=g("div"),i=m(t.label),o=v(),a=g("input"),w(r,"class","label svelte-umifqh"),w(a,"class","control svelte-umifqh"),w(a,"type","text"),a.value=t.value,w(n,"class","container svelte-umifqh"),s=x(a,"change",t.inputChanged)},m(e,t){f(e,n,t),h(n,r),h(r,i),h(n,o),h(n,a)},p(e,t){e.label&&b(i,t.label),e.value&&(a.value=t.value)},i:e,o:e,d(e){e&&d(n),s()}}}function Yu(e,t,n){let{value:r,label:i}=t;null==r||r.toString();return e.$set=(e=>{"value"in e&&n("value",r=e.value),"label"in e&&n("label",i=e.label)}),{value:r,label:i,inputChanged:e=>{try{n("value",r=Number(e.target.value))}catch(e){n("value",r=null)}}}}class qu extends G{constructor(e){super(),J(this,e,Yu,Uu,a,["value","label"])}}function Qu(t){var n,r,i,o,a,s;return{c(){n=g("div"),r=g("div"),i=m(t.label),o=v(),a=g("textarea"),w(r,"class","label svelte-85b8gk"),w(a,"class","control svelte-85b8gk"),a.value=t.valuesText,w(n,"class","container svelte-85b8gk"),s=x(a,"change",t.inputChanged)},m(e,t){f(e,n,t),h(n,r),h(r,i),h(n,o),h(n,a)},p(e,t){e.label&&b(i,t.label),e.valuesText&&(a.value=t.valuesText)},i:e,o:e,d(e){e&&d(n),s()}}}function Ku(e,t,n){let{values:r,label:i}=t;let o;return e.$set=(e=>{"values"in e&&n("values",r=e.values),"label"in e&&n("label",i=e.label)}),e.$$.update=((e={values:1})=>{e.values&&n("valuesText",o=We("\n")(r))}),{values:r,label:i,inputChanged:e=>{try{n("values",r=e.target.value.split("\n"))}catch(e){n("values",r=[])}},valuesText:o}}class Ju extends G{constructor(e){super(),J(this,e,Ku,Qu,a,["values","label"])}}function Gu(e,t,n){const r=Object.create(e);return r.error=t[n],r}function Zu(e){for(var t,n=e.errors,r=[],i=0;i{"errors"in e&&n("errors",i=e.errors)}),e.$$.update=((e={errors:1})=>{e.errors&&n("hasErrors",r=i.length>0)}),{errors:i,hasErrors:r}}class nh extends G{constructor(e){super(),J(this,e,th,eh,a,["errors"])}}function rh(t){var n,r,o;return{c(){n=g("input"),r=m(t.label),w(n,"class","uk-checkbox svelte-66516k"),w(n,"type","checkbox"),o=[x(n,"change",t.input_change_handler),x(n,"change",t.change_handler)]},m(e,i){f(e,n,i),n.checked=t.checked,f(e,r,i)},p(e,t){e.checked&&(n.checked=t.checked),e.label&&b(r,t.label)},i:e,o:e,d(e){e&&(d(n),d(r)),i(o)}}}function ih(e,t,n){let{checked:r=!1,label:i=""}=t;return e.$set=(e=>{"checked"in e&&n("checked",r=e.checked),"label"in e&&n("label",i=e.label)}),{checked:r,label:i,change_handler:function(t){I(e,t)},input_change_handler:function(){r=this.checked,n("checked",r)}}}class oh extends G{constructor(e){super(),J(this,e,ih,rh,a,["checked","label"])}}var ah=ne(function(e,t){e.exports=function(){var e=function(){return(e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},r={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",time_24hr:!1},i=function(e){return("0"+e).slice(-2)},o=function(e){return!0===e?1:0};function a(e,t,n){var r;return void 0===n&&(n=!1),function(){var i=this,o=arguments;null!==r&&clearTimeout(r),r=window.setTimeout(function(){r=null,n||e.apply(i,o)},t),n&&!r&&e.apply(i,o)}}var s=function(e){return e instanceof Array?e:[e]};function l(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function c(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function h(e,t){var n=c("div","numInputWrapper"),r=c("input","numInput "+e),i=c("span","arrowUp"),o=c("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==t)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}var f=function(){},d=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},p={D:f,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*o(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+7*(r-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:f,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:f,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},g={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},m={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[m.w(e,t,n)]},F:function(e,t,n){return d(m.n(e,t,n)-1,!1,t)},G:function(e,t,n){return i(m.h(e,t,n))},H:function(e){return i(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[o(e.getHours()>11)]},M:function(e,t){return d(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},v=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,a=void 0===o?r:o;return function(e,t,n){var r=n||a;return void 0!==i.formatDate?i.formatDate(e,t,r):t.split("").map(function(t,n,o){return m[t]&&"\\"!==o[n-1]?m[t](e,r,i):"\\"!==t?t:""}).join("")}},y=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,a=void 0===o?r:o;return function(e,t,r,o){if(0===e||e){var s,l=o||a,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var u=t||(i||n).dateFormat,h=String(e).trim();if("today"===h)s=new Date,r=!0;else if(/Z$/.test(h)||/GMT$/.test(h))s=new Date(e);else if(i&&i.parseDate)s=i.parseDate(e,u);else{s=i&&i.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,d=[],m=0,v=0,y="";mMath.min(t,n)&&ea&&(u=n===m.hourElement?u-a-o(!m.amPM):r,f&&L(void 0,1,m.hourElement)),m.amPM&&h&&(1===s?u+l===23:Math.abs(u-l)>s)&&(m.amPM.textContent=m.l10n.amPM[o(m.amPM.textContent===m.l10n.amPM[0])]),n.value=i(u)}}(e);var t=m._input.value;j(),be(),m._input.value!==t&&m._debouncedChange()}function j(){if(void 0!==m.hourElement&&void 0!==m.minuteElement){var e,t,n=(parseInt(m.hourElement.value.slice(-2),10)||0)%24,r=(parseInt(m.minuteElement.value,10)||0)%60,i=void 0!==m.secondElement?(parseInt(m.secondElement.value,10)||0)%60:0;void 0!==m.amPM&&(e=n,t=m.amPM.textContent,n=e%12+12*o(t===m.l10n.amPM[1]));var a=void 0!==m.config.minTime||m.config.minDate&&m.minDateHasTime&&m.latestSelectedDateObj&&0===x(m.latestSelectedDateObj,m.config.minDate,!0),s=void 0!==m.config.maxTime||m.config.maxDate&&m.maxDateHasTime&&m.latestSelectedDateObj&&0===x(m.latestSelectedDateObj,m.config.maxDate,!0);if(s){var l=void 0!==m.config.maxTime?m.config.maxTime:m.config.maxDate;(n=Math.min(n,l.getHours()))===l.getHours()&&(r=Math.min(r,l.getMinutes())),r===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(a){var c=void 0!==m.config.minTime?m.config.minTime:m.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(r=Math.max(r,c.getMinutes())),r===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}S(n,r,i)}}function I(e){var t=e||m.latestSelectedDateObj;t&&S(t.getHours(),t.getMinutes(),t.getSeconds())}function T(){var e=m.config.defaultHour,t=m.config.defaultMinute,n=m.config.defaultSeconds;if(void 0!==m.config.minDate){var r=m.config.minDate.getHours(),i=m.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(i,t)),e===r&&t===i&&(n=m.config.minDate.getSeconds())}if(void 0!==m.config.maxDate){var o=m.config.maxDate.getHours(),a=m.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(a,t)),e===o&&t===a&&(n=m.config.maxDate.getSeconds())}S(e,t,n)}function S(e,t,n){void 0!==m.latestSelectedDateObj&&m.latestSelectedDateObj.setHours(e%24,t,n||0,0),m.hourElement&&m.minuteElement&&!m.isMobile&&(m.hourElement.value=i(m.config.time_24hr?e:(12+e)%12+12*o(e%12==0)),m.minuteElement.value=i(t),void 0!==m.amPM&&(m.amPM.textContent=m.l10n.amPM[o(e>=12)]),void 0!==m.secondElement&&(m.secondElement.value=i(n)))}function M(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&ee(t)}function C(e,t,n,r){return t instanceof Array?t.forEach(function(t){return C(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return C(e,t,n,r)}):(e.addEventListener(t,n,r),void m._handlers.push({element:e,event:t,handler:n,options:r}))}function O(e){return function(t){1===t.which&&e(t)}}function D(){me("onChange")}function N(){if(m.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(m.element.querySelectorAll("[data-"+e+"]"),function(t){return C(t,"click",m[e])})}),m.isMobile)!function(){var e=m.config.enableTime?m.config.noCalendar?"time":"datetime-local":"date";m.mobileInput=c("input",m.input.className+" flatpickr-mobile"),m.mobileInput.step=m.input.getAttribute("step")||"any",m.mobileInput.tabIndex=1,m.mobileInput.type=e,m.mobileInput.disabled=m.input.disabled,m.mobileInput.required=m.input.required,m.mobileInput.placeholder=m.input.placeholder,m.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",m.selectedDates.length>0&&(m.mobileInput.defaultValue=m.mobileInput.value=m.formatDate(m.selectedDates[0],m.mobileFormatStr)),m.config.minDate&&(m.mobileInput.min=m.formatDate(m.config.minDate,"Y-m-d")),m.config.maxDate&&(m.mobileInput.max=m.formatDate(m.config.maxDate,"Y-m-d")),m.input.type="hidden",void 0!==m.altInput&&(m.altInput.type="hidden");try{m.input.parentNode&&m.input.parentNode.insertBefore(m.mobileInput,m.input.nextSibling)}catch(e){}C(m.mobileInput,"change",function(e){m.setDate(e.target.value,!1,m.mobileFormatStr),me("onChange"),me("onClose")})}();else{var e=a(oe,50);m._debouncedChange=a(D,_),m.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&C(m.daysContainer,"mouseover",function(e){"range"===m.config.mode&&ie(e.target)}),C(window.document.body,"keydown",re),m.config.inline||m.config.static||C(window,"resize",e),void 0!==window.ontouchstart?C(window.document,"touchstart",X):C(window.document,"mousedown",O(X)),C(window.document,"focus",X,{capture:!0}),!0===m.config.clickOpens&&(C(m._input,"focus",m.open),C(m._input,"mousedown",O(m.open))),void 0!==m.daysContainer&&(C(m.monthNav,"mousedown",O(_e)),C(m.monthNav,["keyup","increment"],M),C(m.daysContainer,"mousedown",O(fe))),void 0!==m.timeContainer&&void 0!==m.minuteElement&&void 0!==m.hourElement&&(C(m.timeContainer,["increment"],E),C(m.timeContainer,"blur",E,{capture:!0}),C(m.timeContainer,"mousedown",O(R)),C([m.hourElement,m.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==m.secondElement&&C(m.secondElement,"focus",function(){return m.secondElement&&m.secondElement.select()}),void 0!==m.amPM&&C(m.amPM,"mousedown",O(function(e){E(e),D()})))}}function P(e,t){var n=void 0!==e?m.parseDate(e):m.latestSelectedDateObj||(m.config.minDate&&m.config.minDate>m.now?m.config.minDate:m.config.maxDate&&m.config.maxDate11)]),m.amPM.title=m.l10n.toggleTitle,m.amPM.tabIndex=-1,m.timeContainer.appendChild(m.amPM)),m.timeContainer}()),l(m.calendarContainer,"rangeMode","range"===m.config.mode),l(m.calendarContainer,"animate",!0===m.config.animate),l(m.calendarContainer,"multiMonth",m.config.showMonths>1),m.calendarContainer.appendChild(e);var a=void 0!==m.config.appendTo&&void 0!==m.config.appendTo.nodeType;if((m.config.inline||m.config.static)&&(m.calendarContainer.classList.add(m.config.inline?"inline":"static"),m.config.inline&&(!a&&m.element.parentNode?m.element.parentNode.insertBefore(m.calendarContainer,m._input.nextSibling):void 0!==m.config.appendTo&&m.config.appendTo.appendChild(m.calendarContainer)),m.config.static)){var s=c("div","flatpickr-wrapper");m.element.parentNode&&m.element.parentNode.insertBefore(s,m.element),s.appendChild(m.element),m.altInput&&s.appendChild(m.altInput),s.appendChild(m.calendarContainer)}m.config.static||m.config.inline||(void 0!==m.config.appendTo?m.config.appendTo:window.document.body).appendChild(m.calendarContainer)}function z(e,t,n,r){var i=te(t,!0),o=c("span","flatpickr-day "+e,t.getDate().toString());return o.dateObj=t,o.$i=r,o.setAttribute("aria-label",m.formatDate(t,m.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===x(t,m.now)&&(m.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?(o.tabIndex=-1,ye(t)&&(o.classList.add("selected"),m.selectedDateElem=o,"range"===m.config.mode&&(l(o,"startRange",m.selectedDates[0]&&0===x(t,m.selectedDates[0],!0)),l(o,"endRange",m.selectedDates[1]&&0===x(t,m.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===m.config.mode&&function(e){return!("range"!==m.config.mode||m.selectedDates.length<2)&&x(e,m.selectedDates[0])>=0&&x(e,m.selectedDates[1])<=0}(t)&&!ye(t)&&o.classList.add("inRange"),m.weekNumbers&&1===m.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&m.weekNumbers.insertAdjacentHTML("beforeend",""+m.config.getWeek(t)+""),me("onDayCreate",o),o}function B(e){e.focus(),"range"===m.config.mode&&ie(e)}function H(e){for(var t=e>0?0:m.config.showMonths-1,n=e>0?m.config.showMonths:-1,r=t;r!=n;r+=e)for(var i=m.daysContainer.children[r],o=e>0?0:i.children.length-1,a=e>0?i.children.length:-1,s=o;s!=a;s+=e){var l=i.children[s];if(-1===l.className.indexOf("hidden")&&te(l.dateObj))return l}}function V(e,t){var n=ne(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==m.selectedDateElem&&ne(m.selectedDateElem)?m.selectedDateElem:void 0!==m.todayDateElem&&ne(m.todayDateElem)?m.todayDateElem:H(t>0?1:-1);return void 0===r?m._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():m.currentMonth,r=t>0?m.config.showMonths:-1,i=t>0?1:-1,o=n-m.currentMonth;o!=r;o+=i)for(var a=m.daysContainer.children[o],s=n-m.currentMonth===o?e.$i+t:t<0?a.children.length-1:0,l=a.children.length,c=s;c>=0&&c0?l:-1);c+=i){var u=a.children[c];if(-1===u.className.indexOf("hidden")&&te(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return B(u)}m.changeMonth(i),V(H(i),0)}(r,t):B(r)}function W(e,t){for(var n=(new Date(e,t,1).getDay()-m.l10n.firstDayOfWeek+7)%7,r=m.utils.getDaysInMonth((t-1+12)%12),i=m.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),a=m.config.showMonths>1,s=a?"prevMonthDay hidden":"prevMonthDay",l=a?"nextMonthDay hidden":"nextMonthDay",u=r+1-n,h=0;u<=r;u++,h++)o.appendChild(z(s,new Date(e,t-1,u),u,h));for(u=1;u<=i;u++,h++)o.appendChild(z("",new Date(e,t,u),u,h));for(var f=i+1;f<=42-n&&(1===m.config.showMonths||h%7!=0);f++,h++)o.appendChild(z(l,new Date(e,t+1,f%i),f,h));var d=c("div","dayContainer");return d.appendChild(o),d}function U(){if(void 0!==m.daysContainer){u(m.daysContainer),m.weekNumbers&&u(m.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1)){var e=function(e){return!(void 0!==m.config.minDate&&m.currentYear===m.config.minDate.getFullYear()&&em.config.maxDate.getMonth())};m.monthsDropdownContainer.tabIndex=-1,m.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=c("option","flatpickr-monthDropdown-month");n.value=new Date(m.currentYear,t).getMonth().toString(),n.textContent=d(t,!1,m.l10n),n.tabIndex=-1,m.currentMonth===t&&(n.selected=!0),m.monthsDropdownContainer.appendChild(n)}}}function q(){var e,t=c("div","flatpickr-month"),n=window.document.createDocumentFragment();m.config.showMonths>1?e=c("span","cur-month"):(m.monthsDropdownContainer=c("select","flatpickr-monthDropdown-months"),C(m.monthsDropdownContainer,"change",function(e){var t=e.target,n=parseInt(t.value,10);m.changeMonth(n-m.currentMonth),me("onMonthChange")}),Y(),e=m.monthsDropdownContainer);var r=h("cur-year",{tabindex:"-1"}),i=r.getElementsByTagName("input")[0];i.setAttribute("aria-label",m.l10n.yearAriaLabel),m.config.minDate&&i.setAttribute("min",m.config.minDate.getFullYear().toString()),m.config.maxDate&&(i.setAttribute("max",m.config.maxDate.getFullYear().toString()),i.disabled=!!m.config.minDate&&m.config.minDate.getFullYear()===m.config.maxDate.getFullYear());var o=c("div","flatpickr-current-month");return o.appendChild(e),o.appendChild(r),n.appendChild(o),t.appendChild(n),{container:t,yearElement:i,monthElement:e}}function Q(){u(m.monthNav),m.monthNav.appendChild(m.prevMonthNav),m.config.showMonths&&(m.yearElements=[],m.monthElements=[]);for(var e=m.config.showMonths;e--;){var t=q();m.yearElements.push(t.yearElement),m.monthElements.push(t.monthElement),m.monthNav.appendChild(t.container)}m.monthNav.appendChild(m.nextMonthNav)}function K(){m.weekdayContainer?u(m.weekdayContainer):m.weekdayContainer=c("div","flatpickr-weekdays");for(var e=m.config.showMonths;e--;){var t=c("div","flatpickr-weekdaycontainer");m.weekdayContainer.appendChild(t)}return J(),m.weekdayContainer}function J(){var e=m.l10n.firstDayOfWeek,t=m.l10n.weekdays.shorthand.slice();e>0&&e\n "+t.join("")+"\n \n "}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-m.currentMonth;n<0&&!0===m._hidePrevMonthArrow||n>0&&!0===m._hideNextMonthArrow||(m.currentMonth+=n,(m.currentMonth<0||m.currentMonth>11)&&(m.currentYear+=m.currentMonth>11?1:-1,m.currentMonth=(m.currentMonth+12)%12,me("onYearChange"),Y()),U(),me("onMonthChange"),xe())}function Z(e){return!(!m.config.appendTo||!m.config.appendTo.contains(e))||m.calendarContainer.contains(e)}function X(e){if(m.isOpen&&!m.config.inline){var t=function(e){if("function"==typeof e.composedPath){var t=e.composedPath();return t[0]}return e.target}(e),n=Z(t),r=t===m.input||t===m.altInput||m.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(m.input)||~e.path.indexOf(m.altInput)),i="blur"===e.type?r&&e.relatedTarget&&!Z(e.relatedTarget):!r&&!n&&!Z(e.relatedTarget),o=!m.config.ignoredFocusElements.some(function(e){return e.contains(t)});i&&o&&(m.close(),"range"===m.config.mode&&1===m.selectedDates.length&&(m.clear(!1),m.redraw()))}}function ee(e){if(!(!e||m.config.minDate&&em.config.maxDate.getFullYear())){var t=e,n=m.currentYear!==t;m.currentYear=t||m.currentYear,m.config.maxDate&&m.currentYear===m.config.maxDate.getFullYear()?m.currentMonth=Math.min(m.config.maxDate.getMonth(),m.currentMonth):m.config.minDate&&m.currentYear===m.config.minDate.getFullYear()&&(m.currentMonth=Math.max(m.config.minDate.getMonth(),m.currentMonth)),n&&(m.redraw(),me("onYearChange"),Y())}}function te(e,t){void 0===t&&(t=!0);var n=m.parseDate(e,void 0,t);if(m.config.minDate&&n&&x(n,m.config.minDate,void 0!==t?t:!m.minDateHasTime)<0||m.config.maxDate&&n&&x(n,m.config.maxDate,void 0!==t?t:!m.maxDateHasTime)>0)return!1;if(0===m.config.enable.length&&0===m.config.disable.length)return!0;if(void 0===n)return!1;for(var r=m.config.enable.length>0,i=r?m.config.enable:m.config.disable,o=0,a=void 0;o=a.from.getTime()&&n.getTime()<=a.to.getTime())return r}return!r}function ne(e){return void 0!==m.daysContainer&&-1===e.className.indexOf("hidden")&&m.daysContainer.contains(e)}function re(e){var t=e.target===m._input,n=m.config.allowInput,r=m.isOpen&&(!n||!t),i=m.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return m.setDate(m._input.value,!0,e.target===m.altInput?m.config.altFormat:m.config.dateFormat),e.target.blur();m.open()}else if(Z(e.target)||r||i){var o=!!m.timeContainer&&m.timeContainer.contains(e.target);switch(e.keyCode){case 13:o?(e.preventDefault(),E(),he()):fe(e);break;case 27:e.preventDefault(),he();break;case 8:case 46:t&&!m.config.allowInput&&(e.preventDefault(),m.clear());break;case 37:case 39:if(o||t)m.hourElement&&m.hourElement.focus();else if(e.preventDefault(),void 0!==m.daysContainer&&(!1===n||document.activeElement&&ne(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(a),V(H(1),0)):V(void 0,a)}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;m.daysContainer&&void 0!==e.target.$i||e.target===m.input?e.ctrlKey?(e.stopPropagation(),ee(m.currentYear-s),V(H(1),0)):o||V(void 0,7*s):e.target===m.currentYearElement?ee(m.currentYear-s):m.config.enableTime&&(!o&&m.hourElement&&m.hourElement.focus(),E(e),m._debouncedChange());break;case 9:if(o){var l=[m.hourElement,m.minuteElement,m.secondElement,m.amPM].concat(m.pluginElements).filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var u=l[c+(e.shiftKey?-1:1)];e.preventDefault(),(u||m._input).focus()}}else!m.config.noCalendar&&m.daysContainer&&m.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),m._input.focus())}}if(void 0!==m.amPM&&e.target===m.amPM)switch(e.key){case m.l10n.amPM[0].charAt(0):case m.l10n.amPM[0].charAt(0).toLowerCase():m.amPM.textContent=m.l10n.amPM[0],j(),be();break;case m.l10n.amPM[1].charAt(0):case m.l10n.amPM[1].charAt(0).toLowerCase():m.amPM.textContent=m.l10n.amPM[1],j(),be()}(t||Z(e.target))&&me("onKeyDown",e)}function ie(e){if(1===m.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():m.days.firstElementChild.dateObj.getTime(),n=m.parseDate(m.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,m.selectedDates[0].getTime()),i=Math.max(t,m.selectedDates[0].getTime()),o=!1,a=0,s=0,l=r;lr&&la)?a=l:l>n&&(!s||l0&&h0&&h>s;return f?(l.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){l.classList.remove(e)}),"continue"):o&&!f?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){l.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t<=m.selectedDates[0].getTime()?"startRange":"endRange"),nt&&h===n&&l.classList.add("endRange"),h>=a&&(0===s||h<=s)&&w(h,n,t)&&l.classList.add("inRange"))))},f=0,d=u.children.length;f0||n.getMinutes()>0||n.getSeconds()>0),m.selectedDates&&(m.selectedDates=m.selectedDates.filter(function(e){return te(e)}),m.selectedDates.length||"min"!==e||I(n),be()),m.daysContainer&&(ue(),void 0!==n?m.currentYearElement[e]=n.getFullYear().toString():m.currentYearElement.removeAttribute(e),m.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function le(){"object"!=typeof m.config.locale&&void 0===A.l10ns[m.config.locale]&&m.config.errorHandler(new Error("flatpickr: invalid locale "+m.config.locale)),m.l10n=e({},A.l10ns.default,"object"==typeof m.config.locale?m.config.locale:"default"!==m.config.locale?A.l10ns[m.config.locale]:void 0),g.K="("+m.l10n.amPM[0]+"|"+m.l10n.amPM[1]+"|"+m.l10n.amPM[0].toLowerCase()+"|"+m.l10n.amPM[1].toLowerCase()+")";var t=e({},p,JSON.parse(JSON.stringify(f.dataset||{})));void 0===t.time_24hr&&void 0===A.defaultConfig.time_24hr&&(m.config.time_24hr=m.l10n.time_24hr),m.formatDate=v(m),m.parseDate=y({config:m.config,l10n:m.l10n})}function ce(e){if(void 0!==m.calendarContainer){me("onPreCalendarPosition");var t=e||m._positionElement,n=Array.prototype.reduce.call(m.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=m.calendarContainer.offsetWidth,i=m.config.position.split(" "),o=i[0],a=i.length>1?i[1]:null,s=t.getBoundingClientRect(),c=window.innerHeight-s.bottom,u="above"===o||"below"!==o&&cn,h=window.pageYOffset+s.top+(u?-n-2:t.offsetHeight+2);if(l(m.calendarContainer,"arrowTop",!u),l(m.calendarContainer,"arrowBottom",u),!m.config.inline){var f=window.pageXOffset+s.left-(null!=a&&"center"===a?(r-s.width)/2:0),d=window.document.body.offsetWidth-s.right,p=f+r>window.document.body.offsetWidth,g=d+r>window.document.body.offsetWidth;if(l(m.calendarContainer,"rightMost",p),!m.config.static)if(m.calendarContainer.style.top=h+"px",p)if(g){var v=document.styleSheets[0];if(void 0===v)return;var y=window.document.body.offsetWidth,x=Math.max(0,y/2-r/2),w=v.cssRules.length,b="{left:"+s.left+"px;right:auto;}";l(m.calendarContainer,"rightMost",!1),l(m.calendarContainer,"centerMost",!0),v.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+b,w),m.calendarContainer.style.left=x+"px",m.calendarContainer.style.right="auto"}else m.calendarContainer.style.left="auto",m.calendarContainer.style.right=d+"px";else m.calendarContainer.style.left=f+"px",m.calendarContainer.style.right="auto"}}}function ue(){m.config.noCalendar||m.isMobile||(xe(),U())}function he(){m._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(m.close,0):m.close()}function fe(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=m.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(r.getMonth()m.currentMonth+m.config.showMonths-1)&&"range"!==m.config.mode;if(m.selectedDateElem=n,"single"===m.config.mode)m.selectedDates=[r];else if("multiple"===m.config.mode){var o=ye(r);o?m.selectedDates.splice(parseInt(o),1):m.selectedDates.push(r)}else"range"===m.config.mode&&(2===m.selectedDates.length&&m.clear(!1,!1),m.latestSelectedDateObj=r,m.selectedDates.push(r),0!==x(r,m.selectedDates[0],!0)&&m.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(j(),i){var a=m.currentYear!==r.getFullYear();m.currentYear=r.getFullYear(),m.currentMonth=r.getMonth(),a&&(me("onYearChange"),Y()),me("onMonthChange")}if(xe(),U(),be(),m.config.enableTime&&setTimeout(function(){return m.showTimeInput=!0},50),i||"range"===m.config.mode||1!==m.config.showMonths?void 0!==m.selectedDateElem&&void 0===m.hourElement&&m.selectedDateElem&&m.selectedDateElem.focus():B(n),void 0!==m.hourElement&&void 0!==m.hourElement&&m.hourElement.focus(),m.config.closeOnSelect){var s="single"===m.config.mode&&!m.config.enableTime,l="range"===m.config.mode&&2===m.selectedDates.length&&!m.config.enableTime;(s||l)&&he()}D()}}m.parseDate=y({config:m.config,l10n:m.l10n}),m._handlers=[],m.pluginElements=[],m.loadedPlugins=[],m._bind=C,m._setHoursFromDate=I,m._positionCalendar=ce,m.changeMonth=G,m.changeYear=ee,m.clear=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),m.input.value="",void 0!==m.altInput&&(m.altInput.value=""),void 0!==m.mobileInput&&(m.mobileInput.value=""),m.selectedDates=[],m.latestSelectedDateObj=void 0,!0===t&&(m.currentYear=m._initialDate.getFullYear(),m.currentMonth=m._initialDate.getMonth()),m.showTimeInput=!1,!0===m.config.enableTime&&T(),m.redraw(),e&&me("onChange")},m.close=function(){m.isOpen=!1,m.isMobile||(void 0!==m.calendarContainer&&m.calendarContainer.classList.remove("open"),void 0!==m._input&&m._input.classList.remove("active")),me("onClose")},m._createElement=c,m.destroy=function(){void 0!==m.config&&me("onDestroy");for(var e=m._handlers.length;e--;){var t=m._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(m._handlers=[],m.mobileInput)m.mobileInput.parentNode&&m.mobileInput.parentNode.removeChild(m.mobileInput),m.mobileInput=void 0;else if(m.calendarContainer&&m.calendarContainer.parentNode)if(m.config.static&&m.calendarContainer.parentNode){var n=m.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else m.calendarContainer.parentNode.removeChild(m.calendarContainer);m.altInput&&(m.input.type="text",m.altInput.parentNode&&m.altInput.parentNode.removeChild(m.altInput),delete m.altInput),m.input&&(m.input.type=m.input._type,m.input.classList.remove("flatpickr-input"),m.input.removeAttribute("readonly"),m.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete m[e]}catch(e){}})},m.isEnabled=te,m.jumpToDate=P,m.open=function(e,t){if(void 0===t&&(t=m._positionElement),!0===m.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==m.mobileInput&&(m.mobileInput.focus(),m.mobileInput.click()),void me("onOpen");if(!m._input.disabled&&!m.config.inline){var n=m.isOpen;m.isOpen=!0,n||(m.calendarContainer.classList.add("open"),m._input.classList.add("active"),me("onOpen"),ce(t)),!0===m.config.enableTime&&!0===m.config.noCalendar&&(0===m.selectedDates.length&&ae(),!1!==m.config.allowInput||void 0!==e&&m.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return m.hourElement.select()},50))}},m.redraw=ue,m.set=function(e,n){if(null!==e&&"object"==typeof e)for(var r in Object.assign(m.config,e),e)void 0!==de[r]&&de[r].forEach(function(e){return e()});else m.config[e]=n,void 0!==de[e]?de[e].forEach(function(e){return e()}):t.indexOf(e)>-1&&(m.config[e]=s(n));m.redraw(),be(!1)},m.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=m.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return m.clear(t);pe(e,n),m.showTimeInput=m.selectedDates.length>0,m.latestSelectedDateObj=m.selectedDates[m.selectedDates.length-1],m.redraw(),P(),I(),0===m.selectedDates.length&&m.clear(!1),be(t),t&&me("onChange")},m.toggle=function(e){if(!0===m.isOpen)return m.close();m.open(e)};var de={locale:[le,J],showMonths:[Q,k,K],minDate:[P],maxDate:[P]};function pe(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return m.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[m.parseDate(e,t)];else if("string"==typeof e)switch(m.config.mode){case"single":case"time":n=[m.parseDate(e,t)];break;case"multiple":n=e.split(m.config.conjunction).map(function(e){return m.parseDate(e,t)});break;case"range":n=e.split(m.l10n.rangeSeparator).map(function(e){return m.parseDate(e,t)})}else m.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));m.selectedDates=n.filter(function(e){return e instanceof Date&&te(e,!1)}),"range"===m.config.mode&&m.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ge(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?m.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:m.parseDate(e.from,void 0),to:m.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function me(e,t){if(void 0!==m.config){var n=m.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&r1?m.monthElements[t].textContent=d(n.getMonth(),m.config.shorthandCurrentMonth,m.l10n)+" ":m.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),m._hidePrevMonthArrow=void 0!==m.config.minDate&&(m.currentYear===m.config.minDate.getFullYear()?m.currentMonth<=m.config.minDate.getMonth():m.currentYearm.config.maxDate.getMonth():m.currentYear>m.config.maxDate.getFullYear()))}function we(e){return m.selectedDates.map(function(t){return m.formatDate(t,e)}).filter(function(e,t,n){return"range"!==m.config.mode||m.config.enableTime||n.indexOf(e)===t}).join("range"!==m.config.mode?m.config.conjunction:m.l10n.rangeSeparator)}function be(e){void 0===e&&(e=!0),void 0!==m.mobileInput&&m.mobileFormatStr&&(m.mobileInput.value=void 0!==m.latestSelectedDateObj?m.formatDate(m.latestSelectedDateObj,m.mobileFormatStr):""),m.input.value=we(m.config.dateFormat),void 0!==m.altInput&&(m.altInput.value=we(m.config.altFormat)),!1!==e&&me("onValueUpdate")}function _e(e){var t=m.prevMonthNav.contains(e.target),n=m.nextMonthNav.contains(e.target);t||n?G(t?-1:1):m.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?m.changeYear(m.currentYear+1):e.target.classList.contains("arrowDown")&&m.changeYear(m.currentYear-1)}return function(){m.element=m.input=f,m.isOpen=!1,function(){var r=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=e({},p,JSON.parse(JSON.stringify(f.dataset||{}))),o={};m.config.parseDate=i.parseDate,m.config.formatDate=i.formatDate,Object.defineProperty(m.config,"enable",{get:function(){return m.config._enable},set:function(e){m.config._enable=ge(e)}}),Object.defineProperty(m.config,"disable",{get:function(){return m.config._disable},set:function(e){m.config._disable=ge(e)}});var a="time"===i.mode;if(!i.dateFormat&&(i.enableTime||a)){var l=A.defaultConfig.dateFormat||n.dateFormat;o.dateFormat=i.noCalendar||a?"H:i"+(i.enableSeconds?":S":""):l+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||a)&&!i.altFormat){var c=A.defaultConfig.altFormat||n.altFormat;o.altFormat=i.noCalendar||a?"h:i"+(i.enableSeconds?":S K":" K"):c+" h:i"+(i.enableSeconds?":S":"")+" K"}i.altInputClass||(m.config.altInputClass=m.input.className+" "+m.config.altInputClass),Object.defineProperty(m.config,"minDate",{get:function(){return m.config._minDate},set:se("min")}),Object.defineProperty(m.config,"maxDate",{get:function(){return m.config._maxDate},set:se("max")});var u=function(e){return function(t){m.config["min"===e?"_minTime":"_maxTime"]=m.parseDate(t,"H:i")}};Object.defineProperty(m.config,"minTime",{get:function(){return m.config._minTime},set:u("min")}),Object.defineProperty(m.config,"maxTime",{get:function(){return m.config._maxTime},set:u("max")}),"time"===i.mode&&(m.config.noCalendar=!0,m.config.enableTime=!0),Object.assign(m.config,o,i);for(var h=0;h-1?m.config[g]=s(d[g]).map($).concat(m.config[g]):void 0===i[g]&&(m.config[g]=d[g])}me("onParseConfig")}(),le(),m.input=m.config.wrap?f.querySelector("[data-input]"):f,m.input?(m.input._type=m.input.type,m.input.type="text",m.input.classList.add("flatpickr-input"),m._input=m.input,m.config.altInput&&(m.altInput=c(m.input.nodeName,m.config.altInputClass),m._input=m.altInput,m.altInput.placeholder=m.input.placeholder,m.altInput.disabled=m.input.disabled,m.altInput.required=m.input.required,m.altInput.tabIndex=m.input.tabIndex,m.altInput.type="text",m.input.setAttribute("type","hidden"),!m.config.static&&m.input.parentNode&&m.input.parentNode.insertBefore(m.altInput,m.input.nextSibling)),m.config.allowInput||m._input.setAttribute("readonly","readonly"),m._positionElement=m.config.positionElement||m._input):m.config.errorHandler(new Error("Invalid input element specified")),function(){m.selectedDates=[],m.now=m.parseDate(m.config.now)||new Date;var e=m.config.defaultDate||("INPUT"!==m.input.nodeName&&"TEXTAREA"!==m.input.nodeName||!m.input.placeholder||m.input.value!==m.input.placeholder?m.input.value:null);e&&pe(e,m.config.dateFormat),m._initialDate=m.selectedDates.length>0?m.selectedDates[0]:m.config.minDate&&m.config.minDate.getTime()>m.now.getTime()?m.config.minDate:m.config.maxDate&&m.config.maxDate.getTime()0&&(m.latestSelectedDateObj=m.selectedDates[0]),void 0!==m.config.minTime&&(m.config.minTime=m.parseDate(m.config.minTime,"H:i")),void 0!==m.config.maxTime&&(m.config.maxTime=m.parseDate(m.config.maxTime,"H:i")),m.minDateHasTime=!!m.config.minDate&&(m.config.minDate.getHours()>0||m.config.minDate.getMinutes()>0||m.config.minDate.getSeconds()>0),m.maxDateHasTime=!!m.config.maxDate&&(m.config.maxDate.getHours()>0||m.config.maxDate.getMinutes()>0||m.config.maxDate.getSeconds()>0),Object.defineProperty(m,"showTimeInput",{get:function(){return m._showTimeInput},set:function(e){m._showTimeInput=e,m.calendarContainer&&l(m.calendarContainer,"showTimeInput",e),m.isOpen&&ce()}})}(),m.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=m.currentMonth),void 0===t&&(t=m.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:m.l10n.daysInMonth[e]}},m.isMobile||F(),N(),(m.selectedDates.length||m.config.noCalendar)&&(m.config.enableTime&&I(m.config.noCalendar?m.latestSelectedDateObj||m.config.minDate:void 0),be(!1)),k(),m.showTimeInput=m.selectedDates.length>0||m.config.noCalendar;var r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!m.isMobile&&r&&ce(),me("onReady")}(),m}function k(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),r=[],i=0;i(n("fpInstance",i=ah(r,{})),i.config.onChange.push(e=>{e.length>0&&n("value",o=new Date(e[0]))}),i)),e.$set=(e=>{"value"in e&&n("value",o=e.value),"label"in e&&n("label",a=e.label)}),e.$$.update=((e={fpInstance:1,value:1})=>{(e.fpInstance||e.value)&&i&&i.setDate(o)}),{value:o,label:a,input:r,input_1_binding:function(e){S[e?"unshift":"push"](()=>{n("input",r=e)})}}}class ch extends G{constructor(e){super(),J(this,e,lh,sh,a,["value","label"])}}function uh(t){var n,r,i=t.clonedField.name;return{c(){n=g("div"),r=m(i),_(n,"font-weight","bold")},m(e,t){f(e,n,t),h(n,r)},p(e,t){e.clonedField&&i!==(i=t.clonedField.name)&&b(r,i)},i:e,o:e,d(e){e&&d(n)}}}function hh(e){var t,n;function r(n){e.textbox_text_binding.call(null,n),t=!0,P(()=>t=!1)}let i={label:"Field Name"};void 0!==e.clonedField.name&&(i.text=e.clonedField.name);var o=new Cu({props:i});return S.push(()=>Y(o,"text",r)),{c(){o.$$.fragment.c()},m(e,t){q(o,e,t),n=!0},p(e,n){var r={};!t&&e.clonedField&&(r.text=n.clonedField.name),o.$set(r)},i(e){n||(V(o.$$.fragment,e),n=!0)},o(e){W(o.$$.fragment,e),n=!1},d(e){Q(o,e)}}}function fh(e){var t,n,r,i;function o(n){e.numberbox0_value_binding_1.call(null,n),t=!0,P(()=>t=!1)}let a={label:"Min Length"};void 0!==e.clonedField.typeOptions.minLength&&(a.value=e.clonedField.typeOptions.minLength);var s=new qu({props:a});function l(t){e.numberbox1_value_binding_1.call(null,t),r=!0,P(()=>r=!1)}S.push(()=>Y(s,"value",o));let c={label:"Max Length"};void 0!==e.clonedField.typeOptions.maxLength&&(c.value=e.clonedField.typeOptions.maxLength);var u=new qu({props:c});return S.push(()=>Y(u,"value",l)),{c(){s.$$.fragment.c(),n=v(),u.$$.fragment.c()},m(e,t){q(s,e,t),f(e,n,t),q(u,e,t),i=!0},p(e,n){var i={};!t&&e.clonedField&&(i.value=n.clonedField.typeOptions.minLength),s.$set(i);var o={};!r&&e.clonedField&&(o.value=n.clonedField.typeOptions.maxLength),u.$set(o)},i(e){i||(V(s.$$.fragment,e),V(u.$$.fragment,e),i=!0)},o(e){W(s.$$.fragment,e),W(u.$$.fragment,e),i=!1},d(e){Q(s,e),e&&d(n),Q(u,e)}}}function dh(e){var t,n,r,i,o,a;function s(n){e.dropdown0_selected_binding.call(null,n),t=!0,P(()=>t=!1)}let l={label:"Lookup Index",options:e.possibleReferenceIndexes,valueMember:_h,textMember:$h};void 0!==e.clonedField.typeOptions.indexNodeKey&&(l.selected=e.clonedField.typeOptions.indexNodeKey);var c=new Bu({props:l});function u(t){e.dropdown1_selected_binding.call(null,t),r=!0,P(()=>r=!1)}S.push(()=>Y(c,"selected",s));let h={label:"Reverse Reference Index",options:e.possibleReverseReferenceIndexes,multiple:"true",valueMember:kh,textMember:Ah};void 0!==e.clonedField.typeOptions.reverseIndexNodeKeys&&(h.selected=e.clonedField.typeOptions.reverseIndexNodeKeys);var p=new Bu({props:h});function g(t){e.textbox_text_binding_2.call(null,t),o=!0,P(()=>o=!1)}S.push(()=>Y(p,"selected",u));let m={label:"Display Value"};void 0!==e.clonedField.typeOptions.displayValue&&(m.text=e.clonedField.typeOptions.displayValue);var y=new Cu({props:m});return S.push(()=>Y(y,"text",g)),{c(){c.$$.fragment.c(),n=v(),p.$$.fragment.c(),i=v(),y.$$.fragment.c()},m(e,t){q(c,e,t),f(e,n,t),q(p,e,t),f(e,i,t),q(y,e,t),a=!0},p(e,n){var i={};e.possibleReferenceIndexes&&(i.options=n.possibleReferenceIndexes),!t&&e.clonedField&&(i.selected=n.clonedField.typeOptions.indexNodeKey),c.$set(i);var a={};e.possibleReverseReferenceIndexes&&(a.options=n.possibleReverseReferenceIndexes),!r&&e.clonedField&&(a.selected=n.clonedField.typeOptions.reverseIndexNodeKeys),p.$set(a);var s={};!o&&e.clonedField&&(s.text=n.clonedField.typeOptions.displayValue),y.$set(s)},i(e){a||(V(c.$$.fragment,e),V(p.$$.fragment,e),V(y.$$.fragment,e),a=!0)},o(e){W(c.$$.fragment,e),W(p.$$.fragment,e),W(y.$$.fragment,e),a=!1},d(e){Q(c,e),e&&d(n),Q(p,e),e&&d(i),Q(y,e)}}}function ph(e){var t,n,r,i,o,a;function s(n){e.numberbox0_value_binding.call(null,n),t=!0,P(()=>t=!1)}let l={label:"Min Value"};void 0!==e.clonedField.typeOptions.minValue&&(l.value=e.clonedField.typeOptions.minValue);var c=new qu({props:l});function u(t){e.numberbox1_value_binding.call(null,t),r=!0,P(()=>r=!1)}S.push(()=>Y(c,"value",s));let h={label:"Max Value"};void 0!==e.clonedField.typeOptions.maxValue&&(h.value=e.clonedField.typeOptions.maxValue);var p=new qu({props:h});function g(t){e.numberbox2_value_binding.call(null,t),o=!0,P(()=>o=!1)}S.push(()=>Y(p,"value",u));let m={label:"Decimal Places"};void 0!==e.clonedField.typeOptions.decimalPlaces&&(m.value=e.clonedField.typeOptions.decimalPlaces);var y=new qu({props:m});return S.push(()=>Y(y,"value",g)),{c(){c.$$.fragment.c(),n=v(),p.$$.fragment.c(),i=v(),y.$$.fragment.c()},m(e,t){q(c,e,t),f(e,n,t),q(p,e,t),f(e,i,t),q(y,e,t),a=!0},p(e,n){var i={};!t&&e.clonedField&&(i.value=n.clonedField.typeOptions.minValue),c.$set(i);var a={};!r&&e.clonedField&&(a.value=n.clonedField.typeOptions.maxValue),p.$set(a);var s={};!o&&e.clonedField&&(s.value=n.clonedField.typeOptions.decimalPlaces),y.$set(s)},i(e){a||(V(c.$$.fragment,e),V(p.$$.fragment,e),V(y.$$.fragment,e),a=!0)},o(e){W(c.$$.fragment,e),W(p.$$.fragment,e),W(y.$$.fragment,e),a=!1},d(e){Q(c,e),e&&d(n),Q(p,e),e&&d(i),Q(y,e)}}}function gh(e){var t,n,r,i;function o(n){e.datepicker0_value_binding.call(null,n),t=!0,P(()=>t=!1)}let a={label:"Min Value"};void 0!==e.clonedField.typeOptions.minValue&&(a.value=e.clonedField.typeOptions.minValue);var s=new ch({props:a});function l(t){e.datepicker1_value_binding.call(null,t),r=!0,P(()=>r=!1)}S.push(()=>Y(s,"value",o));let c={label:"Max Value"};void 0!==e.clonedField.typeOptions.maxValue&&(c.value=e.clonedField.typeOptions.maxValue);var u=new ch({props:c});return S.push(()=>Y(u,"value",l)),{c(){s.$$.fragment.c(),n=v(),u.$$.fragment.c()},m(e,t){q(s,e,t),f(e,n,t),q(u,e,t),i=!0},p(e,n){var i={};!t&&e.clonedField&&(i.value=n.clonedField.typeOptions.minValue),s.$set(i);var o={};!r&&e.clonedField&&(o.value=n.clonedField.typeOptions.maxValue),u.$set(o)},i(e){i||(V(s.$$.fragment,e),V(u.$$.fragment,e),i=!0)},o(e){W(s.$$.fragment,e),W(u.$$.fragment,e),i=!1},d(e){Q(s,e),e&&d(n),Q(u,e)}}}function mh(e){var t,n;function r(n){e.checkbox_checked_binding_1.call(null,n),t=!0,P(()=>t=!1)}let i={label:"Allow Null"};void 0!==e.clonedField.typeOptions.allowNulls&&(i.checked=e.clonedField.typeOptions.allowNulls);var o=new oh({props:i});return S.push(()=>Y(o,"checked",r)),{c(){o.$$.fragment.c()},m(e,t){q(o,e,t),n=!0},p(e,n){var r={};!t&&e.clonedField&&(r.checked=n.clonedField.typeOptions.allowNulls),o.$set(r)},i(e){n||(V(o.$$.fragment,e),n=!0)},o(e){W(o.$$.fragment,e),n=!1},d(e){Q(o,e)}}}function vh(e){var t,n,r,i,o,a;function s(n){e.numberbox_value_binding.call(null,n),t=!0,P(()=>t=!1)}let l={label:"Max Length"};void 0!==e.clonedField.typeOptions.maxLength&&(l.value=e.clonedField.typeOptions.maxLength);var c=new qu({props:l});function u(t){e.valueslist_values_binding.call(null,t),r=!0,P(()=>r=!1)}S.push(()=>Y(c,"value",s));let h={label:"Values (options)"};void 0!==e.clonedField.typeOptions.values&&(h.values=e.clonedField.typeOptions.values);var p=new Ju({props:h});function g(t){e.checkbox_checked_binding.call(null,t),o=!0,P(()=>o=!1)}S.push(()=>Y(p,"values",u));let m={label:"Declared Values Only"};void 0!==e.clonedField.typeOptions.allowDeclaredValuesOnly&&(m.checked=e.clonedField.typeOptions.allowDeclaredValuesOnly);var y=new oh({props:m});return S.push(()=>Y(y,"checked",g)),{c(){c.$$.fragment.c(),n=v(),p.$$.fragment.c(),i=v(),y.$$.fragment.c()},m(e,t){q(c,e,t),f(e,n,t),q(p,e,t),f(e,i,t),q(y,e,t),a=!0},p(e,n){var i={};!t&&e.clonedField&&(i.value=n.clonedField.typeOptions.maxLength),c.$set(i);var a={};!r&&e.clonedField&&(a.values=n.clonedField.typeOptions.values),p.$set(a);var s={};!o&&e.clonedField&&(s.checked=n.clonedField.typeOptions.allowDeclaredValuesOnly),y.$set(s)},i(e){a||(V(c.$$.fragment,e),V(p.$$.fragment,e),V(y.$$.fragment,e),a=!0)},o(e){W(c.$$.fragment,e),W(p.$$.fragment,e),W(y.$$.fragment,e),a=!1},d(e){Q(c,e),e&&d(n),Q(p,e),e&&d(i),Q(y,e)}}}function yh(e){var t;return{c(){t=m("Save")},m(e,n){f(e,t,n)},d(e){e&&d(t)}}}function xh(e){var t;return{c(){t=m("Cancel")},m(e,n){f(e,t,n)},d(e){e&&d(t)}}}function wh(e){var t,n,r=new ee({props:{color:"primary",grouped:!0,$$slots:{default:[yh]},$$scope:{ctx:e}}});r.$on("click",e.save);var i=new ee({props:{color:"secondary",grouped:!0,$$slots:{default:[xh]},$$scope:{ctx:e}}});return i.$on("click",e.click_handler),{c(){r.$$.fragment.c(),t=v(),i.$$.fragment.c()},m(e,o){q(r,e,o),f(e,t,o),q(i,e,o),n=!0},p(e,t){var n={};e.$$scope&&(n.$$scope={changed:e,ctx:t}),r.$set(n);var o={};e.$$scope&&(o.$$scope={changed:e,ctx:t}),i.$set(o)},i(e){n||(V(r.$$.fragment,e),V(i.$$.fragment,e),n=!0)},o(e){W(r.$$.fragment,e),W(i.$$.fragment,e),n=!1},d(e){Q(r,e),e&&d(t),Q(i,e)}}}function bh(e){var t,n,r,i,o,a,s,l,c,u,p,m,y,x=new nh({props:{errors:e.errors}});function b(t){e.dropdown_selected_binding.call(null,t),r=!0,P(()=>r=!1)}let _={label:"Type",options:Fe(Sc)};void 0!==e.clonedField.type&&(_.selected=e.clonedField.type);var $=new Bu({props:_});S.push(()=>Y($,"selected",b)),$.$on("change",e.typeChanged);var k=[hh,uh],A=[];function E(e){return e.isNew?0:1}function j(t){e.textbox_text_binding_1.call(null,t),l=!0,P(()=>l=!1)}o=E(e),a=A[o]=k[o](e);let I={label:"Label"};void 0!==e.clonedField.label&&(I.text=e.clonedField.label);var T=new Cu({props:I});S.push(()=>Y(T,"text",j));var M=[vh,mh,gh,ph,dh,fh],C=[];function O(e){return"string"===e.clonedField.type?0:"bool"===e.clonedField.type?1:"datetime"===e.clonedField.type?2:"number"===e.clonedField.type?3:"reference"===e.clonedField.type?4:e.clonedField.type.startsWith("array")?5:-1}~(u=O(e))&&(p=C[u]=M[u](e));var D=new Wu({props:{style:"float: right;",$$slots:{default:[wh]},$$scope:{ctx:e}}});return{c(){t=g("div"),x.$$.fragment.c(),n=v(),$.$$.fragment.c(),i=v(),a.c(),s=v(),T.$$.fragment.c(),c=v(),p&&p.c(),m=v(),D.$$.fragment.c(),w(t,"class","root")},m(e,r){f(e,t,r),q(x,t,null),h(t,n),q($,t,null),h(t,i),A[o].m(t,null),h(t,s),q(T,t,null),h(t,c),~u&&C[u].m(t,null),h(t,m),q(D,t,null),y=!0},p(e,n){var i={};e.errors&&(i.errors=n.errors),x.$set(i);var c={};(e.keys||e.allTypes)&&(c.options=Fe(Sc)),!r&&e.clonedField&&(c.selected=n.clonedField.type),$.$set(c);var h=o;(o=E(n))===h?A[o].p(e,n):(B(),W(A[h],1,1,()=>{A[h]=null}),H(),(a=A[o])||(a=A[o]=k[o](n)).c(),V(a,1),a.m(t,s));var f={};!l&&e.clonedField&&(f.text=n.clonedField.label),T.$set(f);var d=u;(u=O(n))===d?~u&&C[u].p(e,n):(p&&(B(),W(C[d],1,1,()=>{C[d]=null}),H()),~u?((p=C[u])||(p=C[u]=M[u](n)).c(),V(p,1),p.m(t,m)):p=null);var g={};e.$$scope&&(g.$$scope={changed:e,ctx:n}),D.$set(g)},i(e){y||(V(x.$$.fragment,e),V($.$$.fragment,e),V(a),V(T.$$.fragment,e),V(p),V(D.$$.fragment,e),y=!0)},o(e){W(x.$$.fragment,e),W($.$$.fragment,e),W(a),W(T.$$.fragment,e),W(p),W(D.$$.fragment,e),y=!1},d(e){e&&d(t),Q(x),Q($),A[o].d(),Q(T),~u&&C[u].d(),Q(D)}}}function _h(e){return e.nodeKey()}function $h(e){return e.name}function kh(e){return e.nodeKey()}function Ah(e){return e.name}function Eh(e,t,n){let{field:r,allFields:i,onFinished:o=(()=>{})}=t,{database:a}=t,s=[],l=me(r);let c,u,h,f;return e.$set=(e=>{"field"in e&&n("field",r=e.field),"allFields"in e&&n("allFields",i=e.allFields),"onFinished"in e&&n("onFinished",o=e.onFinished),"database"in e&&n("database",a=e.database)}),e.$$.update=((e={field:1,database:1,clonedField:1,selectedReverseRefIndex:1})=>{e.field&&n("isNew",c=!!r&&0===r.name.length),e.database&&n("possibleReferenceIndexes",u=Oc(a.hierarchy,a.currentNode)),(e.clonedField||e.database)&&n("selectedReverseRefIndex",h=l.typeOptions.indexNodeKey?Ec(a.hierarchy,l.typeOptions.indexNodeKey):""),(e.selectedReverseRefIndex||e.database)&&n("possibleReverseReferenceIndexes",f=h?Cc(a.hierarchy,h):[])}),{field:r,allFields:i,onFinished:o,database:a,errors:s,clonedField:l,typeChanged:e=>{const t=l.typeOptions=Dc(e.detail);return n("clonedField",l),t},save:()=>{n("errors",s=Mc.field(i)(l)),s.length>0||(r.typeOptions=me(l.typeOptions),n("field",r),o(Ze(r)(l)))},isNew:c,possibleReferenceIndexes:u,possibleReverseReferenceIndexes:f,dropdown_selected_binding:function(e){l.type=e,n("clonedField",l)},textbox_text_binding:function(e){l.name=e,n("clonedField",l)},textbox_text_binding_1:function(e){l.label=e,n("clonedField",l)},numberbox_value_binding:function(e){l.typeOptions.maxLength=e,n("clonedField",l)},valueslist_values_binding:function(e){l.typeOptions.values=e,n("clonedField",l)},checkbox_checked_binding:function(e){l.typeOptions.allowDeclaredValuesOnly=e,n("clonedField",l)},checkbox_checked_binding_1:function(e){l.typeOptions.allowNulls=e,n("clonedField",l)},datepicker0_value_binding:function(e){l.typeOptions.minValue=e,n("clonedField",l)},datepicker1_value_binding:function(e){l.typeOptions.maxValue=e,n("clonedField",l)},numberbox0_value_binding:function(e){l.typeOptions.minValue=e,n("clonedField",l)},numberbox1_value_binding:function(e){l.typeOptions.maxValue=e,n("clonedField",l)},numberbox2_value_binding:function(e){l.typeOptions.decimalPlaces=e,n("clonedField",l)},dropdown0_selected_binding:function(e){l.typeOptions.indexNodeKey=e,n("clonedField",l)},dropdown1_selected_binding:function(e){l.typeOptions.reverseIndexNodeKeys=e,n("clonedField",l)},textbox_text_binding_2:function(e){l.typeOptions.displayValue=e,n("clonedField",l)},numberbox0_value_binding_1:function(e){l.typeOptions.minLength=e,n("clonedField",l)},numberbox1_value_binding_1:function(e){l.typeOptions.maxLength=e,n("clonedField",l)},click_handler:function(){return o(!1)}}}class jh extends G{constructor(e){super(),J(this,e,Eh,bh,a,["field","allFields","onFinished","database"])}}var Ih=ne(function(e,t){e.exports=function(){function e(e,t){return function(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}var t=Object.prototype,n=t.hasOwnProperty;function r(e,t){return n.call(e,t)}var i={},o=/([a-z\d])([A-Z])/g;function a(e){return e in i||(i[e]=e.replace(o,"$1-$2").toLowerCase()),i[e]}var s=/-(\w)/g;function l(e){return e.replace(s,c)}function c(e,t){return t?t.toUpperCase():""}function u(e){return e.length?c(0,e.charAt(0))+e.slice(1):""}var h=String.prototype,f=h.startsWith||function(e){return 0===this.lastIndexOf(e,0)};function d(e,t){return f.call(e,t)}var p=h.endsWith||function(e){return this.substr(-e.length)===e};function g(e,t){return p.call(e,t)}var m=Array.prototype,v=function(e,t){return~this.indexOf(e,t)},y=h.includes||v,x=m.includes||v;function w(e,t){return e&&(D(e)?y:x).call(e,t)}var b=m.findIndex||function(e){for(var t=arguments,n=0;n=1}var M=t.toString;function C(e){return M.call(e).match(/^\[object (NodeList|HTMLCollection)\]$/)}function O(e){return"boolean"==typeof e}function D(e){return"string"==typeof e}function N(e){return"number"==typeof e}function P(e){return N(e)||D(e)&&!isNaN(e-parseFloat(e))}function R(e){return!($(e)?e.length:A(e)&&Object.keys(e).length)}function L(e){return void 0===e}function F(e){return O(e)?e:"true"===e||"1"===e||""===e||"false"!==e&&"0"!==e&&e}function z(e){var t=Number(e);return!isNaN(t)&&t}function B(e){return parseFloat(e)||0}function H(e){return S(e)||j(e)||I(e)?e:C(e)||T(e)?e[0]:$(e)?H(e[0]):null}function V(e){return S(e)?[e]:C(e)?m.slice.call(e):$(e)?e.map(H).filter(Boolean):T(e)?e.toArray():[]}function W(e){return $(e)?e:D(e)?e.split(/,(?![^(]*\))/).map(function(e){return P(e)?z(e):F(e.trim())}):[e]}function U(e){return e?g(e,"ms")?B(e):1e3*B(e):0}function Y(e,t){return e===t||A(e)&&A(t)&&Object.keys(e).length===Object.keys(t).length&&K(e,function(e,n){return e===t[n]})}function q(e,t,n){return e.replace(new RegExp(t+"|"+n,"mg"),function(e){return e===t?n:t})}var Q=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];e=Object(e);for(var i=0;ii?1:i>r?-1:0})}function G(e,t){var n=new Set;return e.filter(function(e){var r=e[t];return!n.has(r)&&(n.add(r)||!0)})}function Z(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),Math.min(Math.max(z(e)||0,t),n)}function X(){}function ee(e,t){return e.leftt.left&&e.topt.top}function te(e,t){return e.x<=t.right&&e.x>=t.left&&e.y<=t.bottom&&e.y>=t.top}var ne={ratio:function(e,t,n){var r,i="width"===t?"height":"width";return(r={})[i]=e[t]?Math.round(n*e[i]/e[t]):e[i],r[t]=n,r},contain:function(e,t){var n=this;return K(e=Q({},e),function(r,i){return e=e[i]>t[i]?n.ratio(e,i,t[i]):e}),e},cover:function(e,t){var n=this;return K(e=this.contain(e,t),function(r,i){return e=e[i]+~-]/,pe=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g;function ge(e){return D(e)&&e.match(de)}var me=/.*?[^\\](?:,|$)/g,ve=Element.prototype,ye=ve.matches||ve.webkitMatchesSelector||ve.msMatchesSelector;function xe(e,t){return V(e).some(function(e){return ye.call(e,t)})}var we=ve.closest||function(e){var t=this;do{if(xe(t,e))return t;t=t.parentNode}while(t&&1===t.nodeType)};function be(e,t){return d(t,">")&&(t=t.slice(1)),S(e)?e.parentNode&&we.call(e,t):V(e).map(function(e){return be(e,t)}).filter(Boolean)}function _e(e,t){for(var n=[],r=H(e).parentNode;r&&1===r.nodeType;)xe(r,t)&&n.push(r),r=r.parentNode;return n}var $e=window.CSS&&CSS.escape||function(e){return e.replace(/([^\x7f-\uFFFF\w-])/g,function(e){return"\\"+e})};function ke(e){return D(e)?$e.call(null,e):""}var Ae={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function Ee(e){return V(e).some(function(e){return Ae[e.tagName.toLowerCase()]})}function je(e){return V(e).some(function(e){return e.offsetWidth||e.offsetHeight||e.getClientRects().length})}var Ie="input,select,textarea,button";function Te(e){return V(e).some(function(e){return xe(e,Ie)})}function Se(e,t){return V(e).filter(function(e){return xe(e,t)})}function Me(e,t){return D(t)?xe(e,t)||be(e,t):e===t||(I(t)?t.documentElement:H(t)).contains(H(e))}function Ce(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Re(e),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4];return r=ze(r),o&&(a=function(e,t,n){var r=this;return function(i){e.forEach(function(e){var o=">"===t[0]?he(t,e).reverse().filter(function(e){return Me(i.target,e)})[0]:be(i.target,t);o&&(i.delegate=e,i.current=o,n.call(r,i))})}}(r,o,a)),a.length>1&&(a=function(e){return function(t){return $(t.detail)?e.apply(void 0,[t].concat(t.detail)):e(t)}}(a)),i.split(" ").forEach(function(e){return r.forEach(function(t){return t.addEventListener(e,a,s)})}),function(){return Oe(r,i,a,s)}}function Oe(e,t,n,r){void 0===r&&(r=!1),e=ze(e),t.split(" ").forEach(function(t){return e.forEach(function(e){return e.removeEventListener(t,n,r)})})}function De(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Re(e),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=Ce(r,i,o,function(e){var t=!l||l(e);t&&(c(),a(e,t))},s);return c}function Ne(e,t,n){return ze(e).reduce(function(e,r){return e&&r.dispatchEvent(Pe(t,!0,!0,n))},!0)}function Pe(e,t,n,r){if(void 0===t&&(t=!0),void 0===n&&(n=!1),D(e)){var i=document.createEvent("CustomEvent");i.initCustomEvent(e,t,n,r),e=i}return e}function Re(e){return k(e[2])&&e.splice(2,0,!1),e}function Le(e){return e&&"addEventListener"in e}function Fe(e){return Le(e)?e:H(e)}function ze(e){return $(e)?e.map(Fe).filter(Boolean):D(e)?he(e):Le(e)?[e]:V(e)}function Be(e){return"touch"===e.pointerType||e.touches}function He(e,t){void 0===t&&(t="client");var n=e.touches,r=e.changedTouches,i=n&&n[0]||r&&r[0]||e,o=i[t+"X"],a=i[t+"Y"];return{x:o,y:a}}var Ve="Promise"in window?window.Promise:qe,We=function(){var e=this;this.promise=new Ve(function(t,n){e.reject=n,e.resolve=t})},Ue=2,Ye="setImmediate"in window?setImmediate:setTimeout;function qe(e){this.state=Ue,this.value=void 0,this.deferred=[];var t=this;try{e(function(e){t.resolve(e)},function(e){t.reject(e)})}catch(e){t.reject(e)}}qe.reject=function(e){return new qe(function(t,n){n(e)})},qe.resolve=function(e){return new qe(function(t,n){t(e)})},qe.all=function(e){return new qe(function(t,n){var r=[],i=0;function o(n){return function(o){r[n]=o,(i+=1)===e.length&&t(r)}}0===e.length&&t(r);for(var a=0;a=200&&o.status<300||304===o.status?n(o):r(Q(Error(o.statusText),{xhr:o,status:o.status}))}),Ce(o,"error",function(){return r(Q(Error("Network Error"),{xhr:o}))}),Ce(o,"timeout",function(){return r(Q(Error("Network Timeout"),{xhr:o}))}),o.send(i.data)})}function Je(e,t,n){return new Ve(function(r,i){var o=new Image;o.onerror=i,o.onload=function(){return r(o)},n&&(o.sizes=n),t&&(o.srcset=t),o.src=e})}Qe.resolve=function(e){var t=this;if(t.state===Ue){if(e===t)throw new TypeError("Promise settled with itself.");var n=!1;try{var r=e&&e.then;if(null!==e&&A(e)&&k(r))return void r.call(e,function(e){n||t.resolve(e),n=!0},function(e){n||t.reject(e),n=!0})}catch(e){return void(n||t.reject(e))}t.state=0,t.value=e,t.notify()}},Qe.reject=function(e){if(this.state===Ue){if(e===this)throw new TypeError("Promise settled with itself.");this.state=1,this.value=e,this.notify()}},Qe.notify=function(){var e=this;Ye(function(){if(e.state!==Ue)for(;e.deferred.length;){var t=e.deferred.shift(),n=t[0],r=t[1],i=t[2],o=t[3];try{0===e.state?k(n)?i(n.call(void 0,e.value)):i(e.value):1===e.state&&(k(r)?i(r.call(void 0,e.value)):o(e.value))}catch(e){o(e)}}})},Qe.then=function(e,t){var n=this;return new qe(function(r,i){n.deferred.push([e,t,r,i]),n.notify()})},Qe.catch=function(e){return this.then(void 0,e)};var Ge=/msie|trident/i.test(window.navigator.userAgent),Ze="rtl"===re(document.documentElement,"dir"),Xe="ontouchstart"in window,et=window.PointerEvent,tt=Xe||window.DocumentTouch&&document instanceof DocumentTouch||navigator.maxTouchPoints,nt=et?"pointerdown":Xe?"touchstart":"mousedown",rt=et?"pointermove":Xe?"touchmove":"mousemove",it=et?"pointerup":Xe?"touchend":"mouseup",ot=et?"pointerenter":Xe?"":"mouseenter",at=et?"pointerleave":Xe?"":"mouseleave",st=et?"pointercancel":"touchcancel";function lt(e){if("loading"===document.readyState)var t=Ce(document,"DOMContentLoaded",function(){t(),e()});else e()}function ct(e,t){return t?V(e).indexOf(H(t)):V((e=H(e))&&e.parentNode.children).indexOf(e)}function ut(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=!1);var i=(t=V(t)).length;return e=P(e)?z(e):"next"===e?n+1:"previous"===e?n-1:ct(t,e),r?Z(e,0,i-1):(e%=i)<0?e+i:e}function ht(e){return(e=At(e)).innerHTML="",e}function ft(e,t){return e=At(e),L(t)?e.innerHTML:dt(e.hasChildNodes()?ht(e):e,t)}function dt(e,t){return e=At(e),mt(t,function(t){return e.appendChild(t)})}function pt(e,t){return e=At(e),mt(t,function(t){return e.parentNode.insertBefore(t,e)})}function gt(e,t){return e=At(e),mt(t,function(t){return e.nextSibling?pt(e.nextSibling,t):dt(e.parentNode,t)})}function mt(e,t){return(e=D(e)?$t(e):e)?"length"in e?V(e).map(t):t(e):null}function vt(e){V(e).map(function(e){return e.parentNode&&e.parentNode.removeChild(e)})}function yt(e,t){for(t=H(pt(e,t));t.firstChild;)t=t.firstChild;return dt(t,e),t}function xt(e,t){return V(V(e).map(function(e){return e.hasChildNodes?yt(V(e.childNodes),t):dt(e,t)}))}function wt(e){V(e).map(function(e){return e.parentNode}).filter(function(e,t,n){return n.indexOf(e)===t}).forEach(function(e){pt(e,e.childNodes),vt(e)})}var bt=/^\s*<(\w+|!)[^>]*>/,_t=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function $t(e){var t=_t.exec(e);if(t)return document.createElement(t[1]);var n=document.createElement("div");return bt.test(e)?n.insertAdjacentHTML("beforeend",e.trim()):n.textContent=e,n.childNodes.length>1?V(n.childNodes):n.firstChild}function kt(e,t){if(e&&1===e.nodeType)for(t(e),e=e.firstElementChild;e;)kt(e,t),e=e.nextElementSibling}function At(e,t){return D(e)?jt(e)?H($t(e)):ue(e,t):H(e)}function Et(e,t){return D(e)?jt(e)?V($t(e)):he(e,t):V(e)}function jt(e){return"<"===e[0]||e.match(/^\s*0;)t[n]=arguments[n+1];Dt(e,t,"add")}function Tt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];Dt(e,t,"remove")}function St(e,t){re(e,"class",function(e){return(e||"").replace(new RegExp("\\b"+t+"\\b","g"),"")})}function Mt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];t[0]&&Tt(e,t[0]),t[1]&&It(e,t[1])}function Ct(e,t){return t&&V(e).some(function(e){return e.classList.contains(t.split(" ")[0])})}function Ot(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(t.length){var r=D((t=Nt(t))[t.length-1])?[]:t.pop();t=t.filter(Boolean),V(e).forEach(function(e){for(var n=e.classList,i=0;ie[d]){var p=c[t]/2,g="center"===r[o]?-u[t]/2:0;return"center"===n[o]&&(m(p,g)||m(-p,-g))||m(a,f)}function m(n,r){var a=h[s]+n+r-2*i[o];if(a>=e[s]&&a+c[t]<=e[d])return h[s]=a,["element","target"].forEach(function(e){l[e][o]=n?l[e][o]===Xt[t][1]?Xt[t][2]:Xt[t][1]:l[e][o]}),!0}})})}return tn(e,h),l}function tn(e,t){if(e=H(e),!t)return nn(e);var n=tn(e),r=Lt(e,"position");["left","top"].forEach(function(i){if(i in t){var o=Lt(e,i);Lt(e,i,t[i]-n[i]+B("absolute"===r&&"auto"===o?rn(e)[i]:o))}})}function nn(e){var t,n,r=xn(e=H(e)),i=r.pageYOffset,o=r.pageXOffset;if(j(e)){var a=e.innerHeight,s=e.innerWidth;return{top:i,left:o,height:a,width:s,bottom:i+a,right:o+s}}je(e)||"none"!==Lt(e,"display")||(t=re(e,"style"),n=re(e,"hidden"),re(e,{style:(t||"")+";display:block !important;",hidden:null}));var l=e.getBoundingClientRect();return L(t)||re(e,{style:t,hidden:n}),{height:l.height,width:l.width,top:l.top+i,left:l.left+o,bottom:l.bottom+i,right:l.right+o}}function rn(e){var t=(e=H(e)).offsetParent||function(e){return wn(e).documentElement}(e),n=tn(t),r=["top","left"].reduce(function(r,i){var o=u(i);return r[i]-=n[i]+B(Lt(e,"margin"+o))+B(Lt(t,"border"+o+"Width")),r},tn(e)),i=r.top,o=r.left;return{top:i,left:o}}var on=sn("height"),an=sn("width");function sn(e){var t=u(e);return function(n,r){if(n=H(n),L(r)){if(j(n))return n["inner"+t];if(I(n)){var i=n.documentElement;return Math.max(i["offset"+t],i["scroll"+t])}return(r="auto"===(r=Lt(n,e))?n["offset"+t]:B(r)||0)-ln(e,n)}Lt(n,e,r||0===r?+r+ln(e,n)+"px":"")}}function ln(e,t,n){return void 0===n&&(n="border-box"),Lt(t,"boxSizing")===n?Xt[e].slice(1).map(u).reduce(function(e,n){return e+B(Lt(t,"padding"+n))+B(Lt(t,"border"+n+"Width"))},0):0}function cn(e,t,n,r){K(Xt,function(i,o){var a=i[0],s=i[1],l=i[2];t[a]===l?e[s]+=n[o]*r:"center"===t[a]&&(e[s]+=n[o]*r/2)})}function un(e){var t=/left|center|right/,n=/top|center|bottom/;return 1===(e=(e||"").split(" ")).length&&(e=t.test(e[0])?e.concat(["center"]):n.test(e[0])?["center"].concat(e):["center","center"]),{x:t.test(e[0])?e[0]:"center",y:n.test(e[1])?e[1]:"center"}}function hn(e,t,n){var r=(e||"").split(" "),i=r[0],o=r[1];return{x:i?B(i)*(g(i,"%")?t/100:1):0,y:o?B(o)*(g(o,"%")?n/100:1):0}}function fn(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return e}}function dn(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),!je(e))return!1;var r=xn(e=H(e)),i=e.getBoundingClientRect(),o={top:-t,left:-n,bottom:t+on(r),right:n+an(r)};return ee(i,o)||te({x:i.left,y:i.top},o)}function pn(e,t){if(void 0===t&&(t=0),!je(e))return 0;var n=xn(e=H(e)),r=wn(e),i=e.offsetHeight+t,o=mn(e),a=o[0],s=on(n),l=s+Math.min(0,a-s),c=Math.max(0,s-(on(r)+t-(a+i)));return Z((l+n.pageYOffset-a)/((l+(i-(c100&&e.positions.splice(0,o),e.positions.push({time:r,x:n.pageX,y:n.pageY}),e.positions.length>5&&e.positions.shift(),t=!1},5),t=!0)})},cancel:function(){this.unbind&&this.unbind()},movesTo:function(e){if(this.positions.length<2)return!1;var t=tn(e),n=this.positions[this.positions.length-1],r=this.positions,i=r[0];if(t.left<=n.x&&n.x<=t.right&&t.top<=n.y&&n.y<=t.bottom)return!1;var o=[[{x:t.left,y:t.top},{x:t.right,y:t.bottom}],[{x:t.right,y:t.top},{x:t.left,y:t.bottom}]];return t.right<=n.x||(t.left>=n.x?(o[0].reverse(),o[1].reverse()):t.bottom<=n.y?o[0].reverse():t.top>=n.y&&o[1].reverse()),!!o.reduce(function(e,t){return e+(jn(i,t[0])jn(n,t[1]))},0)}};var In={};function Tn(e,t,n){return In.computed(k(e)?e.call(n,n):e,k(t)?t.call(n,n):t)}function Sn(e,t){return e=e&&!$(e)?[e]:e,t?e?e.concat(t):$(t)?t:[t]:e}function Mn(e,t,n){var i={};if(k(t)&&(t=t.options),t.extends&&(e=Mn(e,t.extends,n)),t.mixins)for(var o=0,a=t.mixins.length;o *",active:!1,animation:[!0],collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",transition:"ease"},computed:{items:function(e,t){var n=e.targets;return Et(n,t)}},events:[{name:"click",delegate:function(){return this.targets+" "+this.$props.toggle},handler:function(e){e.preventDefault(),this.toggle(ct(Et(this.targets+" "+this.$props.toggle,this.$el),e.current))}}],connected:function(){if(!1!==this.active){var e=this.items[Number(this.active)];e&&!Ct(e,this.clsOpen)&&this.toggle(e,!1)}},update:function(){var e=this;this.items.forEach(function(t){return e._toggle(At(e.content,t),Ct(t,e.clsOpen))});var t=!this.collapsible&&!Ct(this.items,this.clsOpen)&&this.items[0];t&&this.toggle(t,!1)},methods:{toggle:function(e,t){var n=this,r=ut(e,this.items),i=Se(this.items,"."+this.clsOpen);(e=this.items[r])&&[e].concat(!this.multiple&&!w(i,e)&&i||[]).forEach(function(r){var o=r===e,a=o&&!Ct(r,n.clsOpen);if(a||!o||n.collapsible||!(i.length<2)){Ot(r,n.clsOpen,a);var s=r._wrapper?r._wrapper.firstElementChild:At(n.content,r);r._wrapper||(r._wrapper=yt(s,"
"),re(r._wrapper,"hidden",a?"":null)),n._toggle(s,!0),n.toggleElement(r._wrapper,a,t).then(function(){Ct(r,n.clsOpen)===a&&(a||n._toggle(s,!1),r._wrapper=null,wt(s))})}})}}},Hn={mixins:[Fn,zn],args:"animation",props:{close:String},data:{animation:[!0],selClose:".uk-alert-close",duration:150,hideProps:Q({opacity:0},zn.data.hideProps)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.close()}}],methods:{close:function(){var e=this;this.toggleElement(this.$el).then(function(){return e.$destroy(!0)})}}};function Vn(e){lt(function(){var t;e.update(),Ce(window,"load resize",function(){return e.update(null,"resize")}),Ce(document,"loadedmetadata load",function(t){var n=t.target;return e.update(n,"resize")},!0),Ce(window,"scroll",function(n){if(!t){t=!0,bn.write(function(){return t=!1});var r=n.target;e.update(1!==r.nodeType?document.body:r,n.type)}},{passive:!0,capture:!0});var n,r=0;Ce(document,"animationstart",function(e){var t=e.target;(Lt(t,"animationName")||"").match(/^uk-.*(left|right)/)&&(r++,Lt(document.body,"overflowX","hidden"),setTimeout(function(){--r||Lt(document.body,"overflowX","")},U(Lt(t,"animationDuration"))+100))},!0),Ce(document,nt,function(e){if(n&&n(),Be(e)){var t=He(e),r="tagName"in e.target?e.target:e.target.parentNode;n=De(document,it,function(e){var n=He(e),i=n.x,o=n.y;(r&&i&&Math.abs(t.x-i)>100||o&&Math.abs(t.y-o)>100)&&setTimeout(function(){var e,n,a,s;Ne(r,"swipe"),Ne(r,"swipe"+(e=t.x,n=t.y,a=i,s=o,Math.abs(e-a)>=Math.abs(n-s)?e-a>0?"Left":"Right":n-s>0?"Up":"Down"))})})}},{passive:!0})})}var Wn,Un,Yn={args:"autoplay",props:{automute:Boolean,autoplay:Boolean},data:{automute:!1,autoplay:!0},computed:{inView:function(e){var t=e.autoplay;return"inview"===t}},connected:function(){this.inView&&!ie(this.$el,"preload")&&(this.$el.preload="none"),this.player=new Dn(this.$el),this.automute&&this.player.mute()},update:{read:function(){return!!this.player&&{visible:je(this.$el)&&"hidden"!==Lt(this.$el,"visibility"),inView:this.inView&&dn(this.$el)}},write:function(e){var t=e.visible,n=e.inView;!t||this.inView&&!n?this.player.pause():(!0===this.autoplay||this.inView&&n)&&this.player.play()},events:["resize","scroll"]}},qn={mixins:[Fn,Yn],props:{width:Number,height:Number},data:{automute:!0},update:{read:function(){var e=this.$el;if(!je(e))return!1;var t=e.parentNode,n=t.offsetHeight,r=t.offsetWidth;return{height:n,width:r}},write:function(e){var t=e.height,n=e.width,r=this.$el,i=this.width||r.naturalWidth||r.videoWidth||r.clientWidth,o=this.height||r.naturalHeight||r.videoHeight||r.clientHeight;i&&o&&Lt(r,ne.cover({width:i,height:o},{width:n+(n%2?1:0),height:t+(t%2?1:0)}))},events:["resize"]}},Qn={props:{pos:String,offset:null,flip:Boolean,clsPos:String},data:{pos:"bottom-"+(Ze?"right":"left"),flip:!0,offset:!1,clsPos:""},computed:{pos:function(e){var t=e.pos;return(t+(w(t,"-")?"":"-center")).split("-")},dir:function(){return this.pos[0]},align:function(){return this.pos[1]}},methods:{positionAt:function(e,t,n){var r;St(e,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?"),Lt(e,{top:"",left:""});var i=this.offset,o=this.getAxis();P(i)||(r=At(i),i=r?tn(r)["x"===o?"left":"top"]-tn(t)["x"===o?"right":"bottom"]:0);var a=en(e,t,"x"===o?fn(this.dir)+" "+this.align:this.align+" "+fn(this.dir),"x"===o?this.dir+" "+this.align:this.align+" "+this.dir,"x"===o?""+("left"===this.dir?-i:i):" "+("top"===this.dir?-i:i),null,this.flip,n).target,s=a.x,l=a.y;this.dir="x"===o?s:l,this.align="x"===o?l:s,Ot(e,this.clsPos+"-"+this.dir+"-"+this.align,!1===this.offset)},getAxis:function(){return"top"===this.dir||"bottom"===this.dir?"y":"x"}}},Kn={mixins:[Qn,zn],args:"pos",props:{mode:"list",toggle:Boolean,boundary:Boolean,boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},data:{mode:["click","hover"],toggle:"- *",boundary:window,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,hoverIdle:200,animation:["uk-animation-fade"],cls:"uk-open"},computed:{boundary:function(e,t){var n=e.boundary;return se(n,t)},clsDrop:function(e){var t=e.clsDrop;return t||"uk-"+this.$options.name},clsPos:function(){return this.clsDrop}},created:function(){this.tracker=new En},connected:function(){It(this.$el,this.clsDrop);var e=this.$props,t=e.toggle;this.toggle=t&&this.$create("toggle",se(t,this.$el),{target:this.$el,mode:this.mode}),!this.toggle&&Ne(this.$el,"updatearia")},events:[{name:"click",delegate:function(){return"."+this.clsDrop+"-close"},handler:function(e){e.preventDefault(),this.hide(!1)}},{name:"click",delegate:function(){return'a[href^="#"]'},handler:function(e){var t=e.target.hash;t||e.preventDefault(),t&&Me(t,this.$el)||this.hide(!1)}},{name:"beforescroll",handler:function(){this.hide(!1)}},{name:"toggle",self:!0,handler:function(e,t){e.preventDefault(),this.isToggled()?this.hide(!1):this.show(t,!1)}},{name:ot,filter:function(){return w(this.mode,"hover")},handler:function(e){Be(e)||(Wn&&Wn!==this&&Wn.toggle&&w(Wn.toggle.mode,"hover")&&!Me(e.target,Wn.toggle.$el)&&!te({x:e.pageX,y:e.pageY},tn(Wn.$el))&&Wn.hide(!1),e.preventDefault(),this.show(this.toggle))}},{name:"toggleshow",handler:function(e,t){t&&!w(t.target,this.$el)||(e.preventDefault(),this.show(t||this.toggle))}},{name:"togglehide "+at,handler:function(e,t){Be(e)||t&&!w(t.target,this.$el)||(e.preventDefault(),this.toggle&&w(this.toggle.mode,"hover")&&this.hide())}},{name:"beforeshow",self:!0,handler:function(){this.clearTimers(),Zt.cancel(this.$el),this.position()}},{name:"show",self:!0,handler:function(){this.tracker.init(),Ne(this.$el,"updatearia"),Un||(Un=!0,Ce(document,it,function(e){var t,n=e.target,r=e.defaultPrevented;if(!r)for(;Wn&&Wn!==t&&!Me(n,Wn.$el)&&(!Wn.toggle||!Me(n,Wn.toggle.$el));)t=Wn,Wn.hide(!1)}))}},{name:"beforehide",self:!0,handler:function(){this.clearTimers()}},{name:"hide",handler:function(e){var t=e.target;this.$el===t?(Wn=this.isActive()?null:Wn,Ne(this.$el,"updatearia"),this.tracker.cancel()):Wn=null===Wn&&Me(t,this.$el)&&this.isToggled()?this:Wn}},{name:"updatearia",self:!0,handler:function(e,t){e.preventDefault(),this.updateAria(this.$el),(t||this.toggle)&&(re((t||this.toggle).$el,"aria-expanded",this.isToggled()?"true":"false"),Ot(this.toggle.$el,this.cls,this.isToggled()))}}],update:{write:function(){this.isToggled()&&!Zt.inProgress(this.$el)&&this.position()},events:["resize"]},methods:{show:function(e,t){var n=this;void 0===t&&(t=!0);var r=function(){return!n.isToggled()&&n.toggleElement(n.$el,!0)},i=function(){if(n.toggle=e||n.toggle,n.clearTimers(),!n.isActive())if(t&&Wn&&Wn!==n&&Wn.isDelaying)n.showTimer=setTimeout(n.show,10);else{if(n.isParentOf(Wn)){if(!Wn.hideTimer)return;Wn.hide(!1)}else if(Wn&&n.isChildOf(Wn))Wn.clearTimers();else if(Wn&&!n.isChildOf(Wn)&&!n.isParentOf(Wn))for(var i;Wn&&Wn!==i&&!n.isChildOf(Wn);)i=Wn,Wn.hide(!1);t&&n.delayShow?n.showTimer=setTimeout(r,n.delayShow):r(),Wn=n}};e&&this.toggle&&e.$el!==this.toggle.$el?(De(this.$el,"hide",i),this.hide(!1)):i()},hide:function(e){var t=this;void 0===e&&(e=!0);var n=function(){return t.toggleNow(t.$el,!1)};this.clearTimers(),this.isDelaying=this.tracker.movesTo(this.$el),e&&this.isDelaying?this.hideTimer=setTimeout(this.hide,this.hoverIdle):e&&this.delayHide?this.hideTimer=setTimeout(n,this.delayHide):n()},clearTimers:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive:function(){return Wn===this},isChildOf:function(e){return e&&e!==this&&Me(this.$el,e.$el)},isParentOf:function(e){return e&&e!==this&&Me(e.$el,this.$el)},position:function(){St(this.$el,this.clsDrop+"-(stack|boundary)"),Lt(this.$el,{top:"",left:"",display:"block"}),Ot(this.$el,this.clsDrop+"-boundary",this.boundaryAlign);var e=tn(this.boundary),t=this.boundaryAlign?e:tn(this.toggle.$el);if("justify"===this.align){var n="y"===this.getAxis()?"width":"height";Lt(this.$el,n,t[n])}else this.$el.offsetWidth>Math.max(e.right-t.left,t.right-e.left)&&It(this.$el,this.clsDrop+"-stack");this.positionAt(this.$el,this.boundaryAlign?this.boundary:this.toggle.$el,this.boundary),Lt(this.$el,"display","")}}},Jn={extends:Kn},Gn={mixins:[Fn],args:"target",props:{target:Boolean},data:{target:!1},computed:{input:function(e,t){return At(Ie,t)},state:function(){return this.input.nextElementSibling},target:function(e,t){var n=e.target;return n&&(!0===n&&this.input.parentNode===t&&this.input.nextElementSibling||se(n,t))}},update:function(){var e=this.target,t=this.input;if(e){var n,r=Te(e)?"value":"textContent",i=e[r],o=t.files&&t.files[0]?t.files[0].name:xe(t,"select")&&(n=Et("option",t).filter(function(e){return e.selected})[0])?n.textContent:t.value;i!==o&&(e[r]=o)}},events:[{name:"change",handler:function(){this.$emit()}},{name:"reset",el:function(){return be(this.$el,"form")},handler:function(){this.$emit()}}]},Zn={update:{read:function(e){var t=dn(this.$el);if(!t||e.isInView===t)return!1;e.isInView=t},write:function(){this.$el.src=this.$el.src},events:["scroll","resize"]}},Xn={props:{margin:String,firstColumn:Boolean},data:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},update:{read:function(e){var t=this.$el.children;if(!t.length||!je(this.$el))return e.rows=[[]];e.rows=er(t),e.stacks=!e.rows.some(function(e){return e.length>1})},write:function(e){var t=this,n=e.rows;n.forEach(function(e,n){return e.forEach(function(e,r){Ot(e,t.margin,0!==n),Ot(e,t.firstColumn,0===r)})})},events:["resize"]}};function er(e){for(var t=[[]],n=0;n=0;o--){var a=t[o];if(!a[0]){a.push(r);break}var s=void 0;if(a[0].offsetParent===r.offsetParent?s=tr(a[0]):(i=tr(r,!0),s=tr(a[0],!0)),i.top>=s.bottom-1){t.push([r]);break}if(i.bottom>s.top){if(i.left=t.offsetHeight)&&Lt(t,"height",n)})},order:5,events:["resize"]}]}:{},ir={mixins:[rr],args:"target",props:{target:String,row:Boolean},data:{target:"> *",row:!0,forceHeight:!0},computed:{elements:function(e,t){var n=e.target;return Et(n,t)}},update:{read:function(){return{rows:(this.row?er(this.elements):[this.elements]).map(or)}},write:function(e){var t=e.rows;t.forEach(function(e){var t=e.heights,n=e.elements;return n.forEach(function(e,n){return Lt(e,"minHeight",t[n])})})},events:["resize"]}};function or(e){var t;if(e.length<2)return{heights:[""],elements:e};var n=ar(e),r=n.heights,i=n.max,o=e.some(function(e){return e.style.minHeight}),a=e.some(function(e,t){return!e.style.minHeight&&r[t]1&&(e=n,this.src=e[0],this.icon=e[1])}this.svg=this.getSvg().then(function(e){return t.applyAttributes(e),t.svgEl=function(e,t){if(Ee(t)||"CANVAS"===t.tagName){re(t,"hidden",!0);var n=t.nextElementSibling;return pr(e,n)?n:gt(t,e)}var r=t.lastElementChild;return pr(e,r)?r:dt(t,e)}(e,t.$el)},X)},disconnected:function(){var e=this;Ee(this.$el)&&re(this.$el,"hidden",null),this.svg&&this.svg.then(function(t){return(!e._connected||t!==e.svgEl)&&vt(t)},X),this.svg=this.svgEl=null},update:{read:function(){return!!(this.strokeAnimation&&this.svgEl&&je(this.svgEl))},write:function(){var e,t;e=this.svgEl,(t=dr(e))&&e.style.setProperty("--uk-animation-stroke",t)},type:["resize"]},methods:{getSvg:function(){var e,t=this;return(e=this.src,ur[e]?ur[e]:ur[e]=new Ve(function(t,n){e?d(e,"data:")?t(decodeURIComponent(e.split(",")[1])):Ke(e).then(function(e){return t(e.response)},function(){return n("SVG not found.")}):n()})).then(function(e){return function(e,t){return t&&w(e,"";hr.lastIndex=0}return fr[e][t]}(e,t)||e),(e=At(e.substr(e.indexOf("/g,fr={};function dr(e){return Math.ceil(Math.max.apply(Math,Et("[stroke]",e).map(function(e){return e.getTotalLength&&e.getTotalLength()||0}).concat([0])))}function pr(e,t){return re(e,"data-svg")===re(t,"data-svg")}var gr={},mr={spinner:'',totop:'',marker:'',"close-icon":'',"close-large":'',"navbar-toggle-icon":'',"overlay-icon":'',"pagination-next":'',"pagination-previous":'',"search-icon":'',"search-large":'',"search-navbar":'',"slidenav-next":'',"slidenav-next-large":'',"slidenav-previous":'',"slidenav-previous-large":''},vr={install:function(e){e.icon.add=function(t,n){var r,i=D(t)?((r={})[t]=n,r):t;K(i,function(e,t){mr[t]=e,delete gr[t]}),e._initialized&&kt(document.body,function(t){return K(e.getComponents(t),function(e){e.$options.isIcon&&e.icon in i&&e.$reset()})})}},extends:cr,args:"icon",props:["icon"],data:{include:[]},isIcon:!0,beforeConnect:function(){It(this.$el,"uk-icon")},methods:{getSvg:function(){var e=function(e){return mr[e]?(gr[e]||(gr[e]=At(mr[e].trim())),gr[e].cloneNode(!0)):null}(function(e){return Ze?q(q(e,"left","right"),"previous","next"):e}(this.icon));return e?Ve.resolve(e):Ve.reject("Icon not found.")}}},yr={args:!1,extends:vr,data:function(e){return{icon:a(e.constructor.options.name)}},beforeConnect:function(){It(this.$el,this.$name)}},xr={extends:yr,beforeConnect:function(){It(this.$el,"uk-slidenav")},computed:{icon:function(e,t){var n=e.icon;return Ct(t,"uk-slidenav-large")?n+"-large":n}}},wr={extends:yr,computed:{icon:function(e,t){var n=e.icon;return Ct(t,"uk-search-icon")&&_e(t,".uk-search-large").length?"search-large":_e(t,".uk-search-navbar").length?"search-navbar":n}}},br={extends:yr,computed:{icon:function(){return"close-"+(Ct(this.$el,"uk-close-large")?"large":"icon")}}},_r={extends:yr,connected:function(){var e=this;this.svg.then(function(t){return 1!==e.ratio&&Lt(At("circle",t),"strokeWidth",1/e.ratio)},X)}},$r={args:"dataSrc",props:{dataSrc:String,dataSrcset:Boolean,sizes:String,width:Number,height:Number,offsetTop:String,offsetLeft:String,target:String},data:{dataSrc:"",dataSrcset:!1,sizes:!1,width:!1,height:!1,offsetTop:"50vh",offsetLeft:0,target:!1},computed:{cacheKey:function(e){var t=e.dataSrc;return this.$name+"."+t},width:function(e){var t=e.width,n=e.dataWidth;return t||n},height:function(e){var t=e.height,n=e.dataHeight;return t||n},sizes:function(e){var t=e.sizes,n=e.dataSizes;return t||n},isImg:function(e,t){return Mr(t)},target:{get:function(e){var t=e.target;return[this.$el].concat(le(t,this.$el))},watch:function(){this.observe()}},offsetTop:function(e){var t=e.offsetTop;return vn(t,"height")},offsetLeft:function(e){var t=e.offsetLeft;return vn(t,"width")}},connected:function(){var e,t,n,r;jr[this.cacheKey]?kr(this.$el,jr[this.cacheKey]||this.dataSrc,this.dataSrcset,this.sizes):this.isImg&&this.width&&this.height&&kr(this.$el,(e=this.width,t=this.height,(n=this.sizes)&&(r=ne.ratio({width:e,height:t},"width",vn(Er(n))),e=r.width,t=r.height),'data:image/svg+xml;utf8,')),this.observer=new Pn(this.load,{rootMargin:this.offsetTop+"px "+this.offsetLeft+"px"}),requestAnimationFrame(this.observe)},disconnected:function(){this.observer.disconnect()},update:{read:function(e){var t=this,n=e.image;if(n||"complete"!==document.readyState||this.load(this.observer.takeRecords()),this.isImg)return!1;n&&n.then(function(e){return e&&""!==e.currentSrc&&kr(t.$el,Cr(e))})},write:function(e){if(this.dataSrcset&&1!==window.devicePixelRatio){var t=Lt(this.$el,"backgroundSize");(t.match(/^(auto\s?)+$/)||B(t)===e.bgSize)&&(e.bgSize=(n=this.dataSrcset,r=this.sizes,i=vn(Er(r)),(o=(n.match(Sr)||[]).map(B).sort(function(e,t){return e-t})).filter(function(e){return e>=i})[0]||o.pop()||""),Lt(this.$el,"backgroundSize",e.bgSize+"px"))}var n,r,i,o},events:["resize"]},methods:{load:function(e){var t=this;e.some(function(e){return e.isIntersecting})&&(this._data.image=Je(this.dataSrc,this.dataSrcset,this.sizes).then(function(e){return kr(t.$el,Cr(e),e.srcset,e.sizes),jr[t.cacheKey]=Cr(e),e},X),this.observer.disconnect())},observe:function(){var e=this;!this._data.image&&this._connected&&this.target.forEach(function(t){return e.observer.observe(t)})}}};function kr(e,t,n,r){if(Mr(e))r&&(e.sizes=r),n&&(e.srcset=n),t&&(e.src=t);else if(t){var i=!w(e.style.backgroundImage,t);i&&(Lt(e,"backgroundImage","url("+ke(t)+")"),Ne(e,Pe("load",!1)))}}var Ar=/\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;function Er(e){var t,n;for(Ar.lastIndex=0;t=Ar.exec(e);)if(!t[1]||window.matchMedia(t[1]).matches){n=t[2],t=d(n,"calc")?n.substring(5,n.length-1).replace(Ir,function(e){return vn(e)}).replace(/ /g,"").match(Tr).reduce(function(e,t){return e+ +t},0):n;break}return t||"100vw"}var jr,Ir=/\d+(?:\w+|%)/g,Tr=/[+-]?(\d+)/g,Sr=/\s+\d+w\s*(?:,|$)/g;function Mr(e){return"IMG"===e.tagName}function Cr(e){return e.currentSrc||e.src}try{(jr=window.sessionStorage||{}).__test__=1,delete jr.__test__}catch(e){jr={}}var Or,Dr,Nr={props:{media:Boolean},data:{media:!1},computed:{matchMedia:function(){var e=function(e){if(D(e))if("@"===e[0]){var t="breakpoint-"+e.substr(1);e=B(Ht(t))}else if(isNaN(e))return e;return!(!e||isNaN(e))&&"(min-width: "+e+"px)"}(this.media);return!e||window.matchMedia(e).matches}}},Pr={mixins:[Fn,Nr],props:{fill:String},data:{fill:"",clsWrapper:"uk-leader-fill",clsHide:"uk-leader-hide",attrFill:"data-fill"},computed:{fill:function(e){var t=e.fill;return t||Ht("leader-fill-content")}},connected:function(){var e;e=xt(this.$el,''),this.wrapper=e[0]},disconnected:function(){wt(this.wrapper.childNodes)},update:{read:function(e){var t=e.changed,n=e.width,r=n;return{width:n=Math.floor(this.$el.offsetWidth/2),fill:this.fill,changed:t||r!==n,hide:!this.matchMedia}},write:function(e){Ot(this.wrapper,this.clsHide,e.hide),e.changed&&(e.changed=!1,re(this.wrapper,this.attrFill,new Array(e.width).join(e.fill)))},events:["resize"]}},Rr={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var t=e.container;return!0===t&&this.$container||t&&At(t)}}},Lr={mixins:[Fn,Rr,zn],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel:function(e,t){var n=e.selPanel;return At(n,t)},transitionElement:function(){return this.panel},bgClose:function(e){var t=e.bgClose;return t&&this.panel}},beforeDisconnect:function(){this.isToggled()&&this.toggleNow(this.$el,!1)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler:function(e){e.defaultPrevented||(e.preventDefault(),this.toggle())}},{name:"beforeshow",self:!0,handler:function(e){var t=Or&&Or!==this&⩔Or=this,t?this.stack?this.prev=t:(Or=t,t.isToggled()?t.hide().then(this.show):De(t.$el,"beforeshow hidden",this.show,!1,function(e){var n=e.target,r=e.type;return"hidden"===r&&n===t.$el}),e.preventDefault()):Dr||(Dr=[Ce(document,it,function(e){var t=e.target,n=e.defaultPrevented;!Or||!Or.bgClose||n||Or.overlay&&!Me(t,Or.$el)||Me(t,Or.panel)||Or.hide()}),Ce(document,"keydown",function(e){27===e.keyCode&&Or&&Or.escClose&&(e.preventDefault(),Or.hide())})])}},{name:"show",self:!0,handler:function(){Ct(document.documentElement,this.clsPage)||(this.scrollbarWidth=an(window)-an(document),Lt(document.body,"overflowY",this.scrollbarWidth&&this.overlay?"scroll":"")),It(document.documentElement,this.clsPage)}},{name:"hide",self:!0,handler:function(){Or&&(Or!==this||this.prev)||(Dr&&Dr.forEach(function(e){return e()}),Dr=null)}},{name:"hidden",self:!0,handler:function(){var e,t=this.prev;if(Or=Or&&Or!==this&&Or||t)for(;t;){if(t.clsPage===this.clsPage){e=!0;break}t=t.prev}else Lt(document.body,"overflowY","");e||Tt(document.documentElement,this.clsPage)}}],methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var e=this;return this.isToggled()?Ve.resolve():this.container&&this.$el.parentNode!==this.container?(dt(this.container,this.$el),new Ve(function(t){return requestAnimationFrame(function(){return e.show().then(t)})})):this.toggleElement(this.$el,!0,Fr(this))},hide:function(){return this.isToggled()?this.toggleElement(this.$el,!1,Fr(this)):Ve.resolve()},getActive:function(){return Or}}};function Fr(e){var t=e.transitionElement,n=e._toggle;return function(e,r){return new Ve(function(i,o){return De(e,"show hide",function(){e._reject&&e._reject(),e._reject=o,n(e,r),U(Lt(t,"transitionDuration"))?De(t,"transitionend",i,!1,function(e){return e.target===t}):i()})})}}var zr={install:function(e){e.modal.dialog=function(t,n){var r=e.modal('
'+t+"
",n);return r.show(),Ce(r.$el,"hidden",function(e){var t=e.target,n=e.currentTarget;t===n&&Ve.resolve(function(){return r.$destroy(!0)})}),r},e.modal.alert=function(t,n){return n=Q({bgClose:!1,escClose:!1,labels:e.modal.labels},n),new Ve(function(r){return Ce(e.modal.dialog('
'+(D(t)?t:ft(t))+'
",n).$el,"hide",r)})},e.modal.confirm=function(t,n){return n=Q({bgClose:!1,escClose:!0,labels:e.modal.labels},n),new Ve(function(r,i){var o=e.modal.dialog('
'+(D(t)?t:ft(t))+'
",n),a=!1;Ce(o.$el,"submit","form",function(e){e.preventDefault(),r(),a=!0,o.hide()}),Ce(o.$el,"hide",function(){a||i()})})},e.modal.prompt=function(t,n,r){return r=Q({bgClose:!1,escClose:!0,labels:e.modal.labels},r),new Ve(function(i){var o=e.modal.dialog('
",r),a=At("input",o.$el);a.value=n;var s=!1;Ce(o.$el,"submit","form",function(e){e.preventDefault(),i(a.value),s=!0,o.hide()}),Ce(o.$el,"hide",function(){s||i(null)})})},e.modal.labels={ok:"Ok",cancel:"Cancel"}},mixins:[Lr],data:{clsPage:"uk-modal-page",selPanel:".uk-modal-dialog",selClose:".uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full"},events:[{name:"show",self:!0,handler:function(){Ct(this.panel,"uk-margin-auto-vertical")?It(this.$el,"uk-flex"):Lt(this.$el,"display","block"),on(this.$el)}},{name:"hidden",self:!0,handler:function(){Lt(this.$el,"display",""),Tt(this.$el,"uk-flex")}}]},Br={extends:Bn,data:{targets:"> .uk-parent",toggle:"> a",content:"> ul"}},Hr={mixins:[Fn,rr],props:{dropdown:String,mode:"list",align:String,offset:Number,boundary:Boolean,boundaryAlign:Boolean,clsDrop:String,delayShow:Number,delayHide:Number,dropbar:Boolean,dropbarMode:String,dropbarAnchor:Boolean,duration:Number},data:{dropdown:".uk-navbar-nav > li",align:Ze?"right":"left",clsDrop:"uk-navbar-dropdown",mode:void 0,offset:void 0,delayShow:void 0,delayHide:void 0,boundaryAlign:void 0,flip:"x",boundary:!0,dropbar:!1,dropbarMode:"slide",dropbarAnchor:!1,duration:200,forceHeight:!0,selMinHeight:".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle"},computed:{boundary:function(e,t){var n=e.boundary,r=e.boundaryAlign;return!0===n||r?t:n},dropbarAnchor:function(e,t){var n=e.dropbarAnchor;return se(n,t)},pos:function(e){var t=e.align;return"bottom-"+t},dropdowns:function(e,t){var n=e.dropdown,r=e.clsDrop;return Et(n+" ."+r,t)}},beforeConnect:function(){var e=this.$props,t=e.dropbar;this.dropbar=t&&(se(t,this.$el)||At("+ .uk-navbar-dropbar",this.$el)||At("
")),this.dropbar&&(It(this.dropbar,"uk-navbar-dropbar"),"slide"===this.dropbarMode&&It(this.dropbar,"uk-navbar-dropbar-slide"))},disconnected:function(){this.dropbar&&vt(this.dropbar)},update:function(){var e=this;this.$create("drop",this.dropdowns.filter(function(t){return!e.getDropdown(t)}),Q({},this.$props,{boundary:this.boundary,pos:this.pos,offset:this.dropbar||this.offset}))},events:[{name:"mouseover",delegate:function(){return this.dropdown},handler:function(e){var t=e.current,n=this.getActive();n&&n.toggle&&!Me(n.toggle.$el,t)&&!n.tracker.movesTo(n.$el)&&n.hide(!1)}},{name:"mouseleave",el:function(){return this.dropbar},handler:function(){var e=this.getActive();e&&!this.dropdowns.some(function(e){return xe(e,":hover")})&&e.hide()}},{name:"beforeshow",capture:!0,filter:function(){return this.dropbar},handler:function(){this.dropbar.parentNode||gt(this.dropbarAnchor||this.$el,this.dropbar)}},{name:"show",capture:!0,filter:function(){return this.dropbar},handler:function(e,t){var n=t.$el,r=t.dir;this.clsDrop&&It(n,this.clsDrop+"-dropbar"),"bottom"===r&&this.transitionTo(n.offsetHeight+B(Lt(n,"marginTop"))+B(Lt(n,"marginBottom")),n)}},{name:"beforehide",filter:function(){return this.dropbar},handler:function(e,t){var n=t.$el,r=this.getActive();xe(this.dropbar,":hover")&&r&&r.$el===n&&e.preventDefault()}},{name:"hide",filter:function(){return this.dropbar},handler:function(e,t){var n=t.$el,r=this.getActive();(!r||r&&r.$el===n)&&this.transitionTo(0)}}],methods:{getActive:function(){var e=this.dropdowns.map(this.getDropdown).filter(function(e){return e&&e.isActive()}),t=e[0];return t&&w(t.mode,"hover")&&Me(t.toggle.$el,this.$el)&&t},transitionTo:function(e,t){var n=this,r=this.dropbar,i=je(r)?on(r):0;return Lt(t=i=i||0===r&&t>0||i-r<=o&&t<0)&&e.cancelable&&e.preventDefault()}}},{name:"show",self:!0,handler:function(){"reveal"!==this.mode||Ct(this.panel.parentNode,this.clsMode)||(yt(this.panel,"
"),It(this.panel.parentNode,this.clsMode)),Lt(document.documentElement,"overflowY",this.overlay?"hidden":""),It(document.body,this.clsContainer,this.clsFlip),Lt(this.$el,"display","block"),It(this.$el,this.clsOverlay),It(this.panel,this.clsSidebarAnimation,"reveal"!==this.mode?this.clsMode:""),on(document.body),It(document.body,this.clsContainerAnimation),this.clsContainerAnimation&&(Wr().content+=",user-scalable=0")}},{name:"hide",self:!0,handler:function(){Tt(document.body,this.clsContainerAnimation);var e=this.getActive();("none"===this.mode||e&&e!==this&&e!==this.prev)&&Ne(this.panel,"transitionend")}},{name:"hidden",self:!0,handler:function(){var e;this.clsContainerAnimation&&((e=Wr()).content=e.content.replace(/,user-scalable=0$/,"")),"reveal"===this.mode&&wt(this.panel),Tt(this.panel,this.clsSidebarAnimation,this.clsMode),Tt(this.$el,this.clsOverlay),Lt(this.$el,"display",""),Tt(document.body,this.clsContainer,this.clsFlip),Lt(document.documentElement,"overflowY","")}},{name:"swipeLeft swipeRight",handler:function(e){this.isToggled()&&g(e.type,"Left")^this.flip&&this.hide()}}]};function Wr(){return At('meta[name="viewport"]',document.head)||dt(document.head,'')}var Ur={mixins:[Fn],props:{selContainer:String,selContent:String},data:{selContainer:".uk-modal",selContent:".uk-modal-dialog"},computed:{container:function(e,t){var n=e.selContainer;return be(t,n)},content:function(e,t){var n=e.selContent;return be(t,n)}},connected:function(){Lt(this.$el,"minHeight",150)},update:{read:function(){return!(!this.content||!this.container)&&{current:B(Lt(this.$el,"maxHeight")),max:Math.max(150,on(this.container)-(tn(this.content).height-on(this.$el)))}},write:function(e){var t=e.current,n=e.max;Lt(this.$el,"maxHeight",n),Math.round(t)!==Math.round(n)&&Ne(this.$el,"resize")},events:["resize"]}},Yr={props:["width","height"],connected:function(){It(this.$el,"uk-responsive-width")},update:{read:function(){return!!(je(this.$el)&&this.width&&this.height)&&{width:an(this.$el.parentNode),height:this.height}},write:function(e){on(this.$el,ne.contain({height:this.height,width:this.width},e).height)},events:["resize"]}},qr={props:{duration:Number,offset:Number},data:{duration:1e3,offset:0},methods:{scrollTo:function(e){var t=this;e=e&&At(e)||document.body;var n=on(document),r=on(window),i=tn(e).top-this.offset;if(i+r>n&&(i=n-r),Ne(this.$el,"beforescroll",[this,e])){var o=Date.now(),a=window.pageYOffset,s=function(){var n,r=a+(i-a)*(n=Z((Date.now()-o)/t.duration),.5*(1-Math.cos(Math.PI*n)));gn(window,r),r!==i?requestAnimationFrame(s):Ne(t.$el,"scrolled",[t,e])};s()}}},events:{click:function(e){e.defaultPrevented||(e.preventDefault(),this.scrollTo(ke(decodeURIComponent(this.$el.hash)).substr(1)))}}},Qr={args:"cls",props:{cls:String,target:String,hidden:Boolean,offsetTop:Number,offsetLeft:Number,repeat:Boolean,delay:Number},data:function(){return{cls:!1,target:!1,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0,inViewClass:"uk-scrollspy-inview"}},computed:{elements:function(e,t){var n=e.target;return n?Et(n,t):[t]}},update:[{write:function(){this.hidden&&Lt(Se(this.elements,":not(."+this.inViewClass+")"),"visibility","hidden")}},{read:function(e){var t=this,n=e.update;n&&this.elements.forEach(function(e){var n=e._ukScrollspyState;n||(n={cls:ae(e,"uk-scrollspy-class")||t.cls}),n.show=dn(e,t.offsetTop,t.offsetLeft),e._ukScrollspyState=n})},write:function(e){var t=this;if(!e.update)return this.$emit(),e.update=!0;this.elements.forEach(function(n){var r=n._ukScrollspyState,i=r.cls;if(!r.show||r.inview||r.queued){if(!r.show&&(r.inview||r.queued)&&t.repeat){if(r.abort&&r.abort(),!r.inview)return;Lt(n,"visibility",t.hidden?"hidden":""),Tt(n,t.inViewClass),Ot(n,i),Ne(n,"outview"),t.$update(n),r.inview=!1}}else{var o=function(){Lt(n,"visibility",""),It(n,t.inViewClass),Ot(n,i),Ne(n,"inview"),t.$update(n),r.inview=!0,r.abort&&r.abort()};t.delay?(r.queued=!0,e.promise=(e.promise||Ve.resolve()).then(function(){return!r.inview&&new Ve(function(n){var i=setTimeout(function(){o(),n()},e.promise||1===t.elements.length?t.delay:0);r.abort=function(){clearTimeout(i),n(),r.queued=!1}})})):o()}})},events:["scroll","resize"]}]},Kr={props:{cls:String,closest:String,scroll:Boolean,overflow:Boolean,offset:Number},data:{cls:"uk-active",closest:!1,scroll:!1,overflow:!0,offset:0},computed:{links:function(e,t){return Et('a[href^="#"]',t).filter(function(e){return e.hash})},elements:function(e){var t=e.closest;return be(this.links,t||"*")},targets:function(){return Et(this.links.map(function(e){return ke(e.hash).substr(1)}).join(","))}},update:[{read:function(){this.scroll&&this.$create("scroll",this.links,{offset:this.offset||0})}},{read:function(e){var t=this,n=window.pageYOffset+this.offset+1,r=on(document)-on(window)+this.offset;e.active=!1,this.targets.every(function(i,o){var a=tn(i),s=a.top,l=o+1===t.targets.length;if(!t.overflow&&(0===o&&s>n||l&&s+i.offsetTop=r)for(var c=t.targets.length-1;c>o;c--)if(dn(t.targets[c])){i=t.targets[c];break}return!(e.active=At(Se(t.links,'[href="#'+i.id+'"]')))})},write:function(e){var t=e.active;this.links.forEach(function(e){return e.blur()}),Tt(this.elements,this.cls),t&&Ne(this.$el,"active",[t,It(this.closest?be(t,this.closest):t,this.cls)])},events:["scroll","resize"]}]},Jr={mixins:[Fn,Nr],props:{top:null,bottom:Boolean,offset:Number,animation:String,clsActive:String,clsInactive:String,clsFixed:String,clsBelow:String,selTarget:String,widthElement:Boolean,showOnUp:Boolean,targetOffset:Number},data:{top:0,bottom:!1,offset:0,animation:"",clsActive:"uk-active",clsInactive:"",clsFixed:"uk-sticky-fixed",clsBelow:"uk-sticky-below",selTarget:"",widthElement:!1,showOnUp:!1,targetOffset:!1},computed:{selTarget:function(e,t){var n=e.selTarget;return n&&At(n,t)||t},widthElement:function(e,t){var n=e.widthElement;return se(n,t)||this.placeholder},isActive:{get:function(){return Ct(this.selTarget,this.clsActive)},set:function(e){e&&!this.isActive?(Mt(this.selTarget,this.clsInactive,this.clsActive),Ne(this.$el,"active")):e||Ct(this.selTarget,this.clsInactive)||(Mt(this.selTarget,this.clsActive,this.clsInactive),Ne(this.$el,"inactive"))}}},connected:function(){this.placeholder=At("+ .uk-sticky-placeholder",this.$el)||At('
'),this.isFixed=!1,this.isActive=!1},disconnected:function(){this.isFixed&&(this.hide(),Tt(this.selTarget,this.clsInactive)),vt(this.placeholder),this.placeholder=null,this.widthElement=null},events:[{name:"load hashchange popstate",el:window,handler:function(){var e=this;if(!1!==this.targetOffset&&location.hash&&window.pageYOffset>0){var t=At(location.hash);t&&bn.read(function(){var n=tn(t),r=n.top,i=tn(e.$el).top,o=e.$el.offsetHeight;e.isFixed&&i+o>=r&&i<=r+t.offsetHeight&&gn(window,r-o-(P(e.targetOffset)?e.targetOffset:0)-e.offset)})}}}],update:[{read:function(e,t){var n=e.height;this.isActive&&"update"!==t&&(this.hide(),n=this.$el.offsetHeight,this.show()),n=this.isActive?n:this.$el.offsetHeight,this.topOffset=tn(this.isFixed?this.placeholder:this.$el).top,this.bottomOffset=this.topOffset+n;var r=Gr("bottom",this);return this.top=Math.max(B(Gr("top",this)),this.topOffset)-this.offset,this.bottom=r&&r-n,this.inactive=!this.matchMedia,{lastScroll:!1,height:n,margins:Lt(this.$el,["marginTop","marginBottom","marginLeft","marginRight"])}},write:function(e){var t=e.height,n=e.margins,r=this.placeholder;Lt(r,Q({height:t},n)),Me(r,document)||(gt(this.$el,r),re(r,"hidden","")),this.isActive=this.isActive},events:["resize"]},{read:function(e){var t=e.scroll;return void 0===t&&(t=0),this.width=(je(this.widthElement)?this.widthElement:this.$el).offsetWidth,this.scroll=window.pageYOffset,{dir:t<=this.scroll?"down":"up",scroll:this.scroll,visible:je(this.$el),top:mn(this.placeholder)[0]}},write:function(e,t){var n=this,r=e.initTimestamp;void 0===r&&(r=0);var i=e.dir,o=e.lastDir,a=e.lastScroll,s=e.scroll,l=e.top,c=e.visible,u=performance.now();if(e.lastScroll=s,!(s<0||s===a||!c||this.disabled||this.showOnUp&&"scroll"!==t||((u-r>300||i!==o)&&(e.initScroll=s,e.initTimestamp=u),e.lastDir=i,this.showOnUp&&Math.abs(e.initScroll-s)<=30&&Math.abs(a-s)<=10)))if(this.inactive||ss&&(Zt.cancel(this.$el),this.hide()));this.isFixed=!1,this.animation&&s>this.topOffset?(Zt.cancel(this.$el),Zt.out(this.$el,this.animation).then(function(){return n.hide()},X)):this.hide()}else this.isFixed?this.update():this.animation?(Zt.cancel(this.$el),this.show(),Zt.in(this.$el,this.animation).catch(X)):this.show()},events:["resize","scroll"]}],methods:{show:function(){this.isFixed=!0,this.update(),re(this.placeholder,"hidden",null)},hide:function(){this.isActive=!1,Tt(this.$el,this.clsFixed,this.clsBelow),Lt(this.$el,{position:"",top:"",width:""}),re(this.placeholder,"hidden","")},update:function(){var e=0!==this.top||this.scroll>this.top,t=Math.max(0,this.offset);this.bottom&&this.scroll>this.bottom-this.offset&&(t=this.bottom-this.scroll),Lt(this.$el,{position:"fixed",top:t+"px",width:this.width}),this.isActive=e,Ot(this.$el,this.clsBelow,this.scroll>this.bottomOffset),It(this.$el,this.clsFixed)}}};function Gr(e,t){var n=t.$props,r=t.$el,i=t[e+"Offset"],o=n[e];if(o){if(P(o))return i+B(o);if(D(o)&&o.match(/^-?\d+vh$/))return on(window)*B(o)/100;var a=!0===o?r.parentNode:se(o,r);return a?tn(a).top+a.offsetHeight:void 0}}var Zr={mixins:[zn],args:"connect",props:{connect:String,toggle:String,active:Number,swiping:Boolean},data:{connect:"~.uk-switcher",toggle:"> * > :first-child",active:0,swiping:!0,cls:"uk-active",clsContainer:"uk-switcher",attrItem:"uk-switcher-item",queued:!0},computed:{connects:function(e,t){var n=e.connect;return le(n,t)},toggles:function(e,t){var n=e.toggle;return Et(n,t)}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(e){e.preventDefault(),this.show(V(this.$el.children).filter(function(t){return Me(e.current,t)})[0])}},{name:"click",el:function(){return this.connects},delegate:function(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler:function(e){e.preventDefault(),this.show(ae(e.current,this.attrItem))}},{name:"swipeRight swipeLeft",filter:function(){return this.swiping},el:function(){return this.connects},handler:function(e){var t=e.type;this.show(g(t,"Left")?"next":"previous")}}],update:function(){var e=this;this.connects.forEach(function(t){return e.updateAria(t.children)});var t=this.$el,n=t.children;this.show(Se(n,"."+this.cls)[0]||n[this.active]||n[0])},methods:{index:function(){return!R(this.connects)&&ct(Se(this.connects[0].children,"."+this.cls)[0])},show:function(e){for(var t,n,r=this,i=this.$el,o=i.children,a=o.length,s=this.index(),l=s>=0,c="previous"===e?-1:1,u=ut(e,o,s),h=0;h=0&&Ct(n,this.cls)||s===u||(Tt(o,this.cls),It(n,this.cls),re(this.toggles,"aria-expanded",!1),re(t,"aria-expanded",!0),this.connects.forEach(function(e){l?r.toggleElement([e.children[s],e.children[u]]):r.toggleNow(e.children[u])}))}}},Xr={mixins:[Fn],extends:Zr,props:{media:Boolean},data:{media:960,attrItem:"uk-tab-item"},connected:function(){var e=Ct(this.$el,"uk-tab-left")?"uk-tab-left":!!Ct(this.$el,"uk-tab-right")&&"uk-tab-right";e&&this.$create("toggle",this.$el,{cls:e,mode:"media",media:this.media})}},ei={mixins:[Nr,zn],args:"target",props:{href:String,target:null,mode:"list"},data:{href:!1,target:!1,mode:"click",queued:!0},computed:{target:function(e,t){var n=e.href,r=e.target;return(r=le(r||n,t)).length&&r||[t]}},connected:function(){Ne(this.target,"updatearia",[this])},events:[{name:ot+" "+at,filter:function(){return w(this.mode,"hover")},handler:function(e){Be(e)||this.toggle("toggle"+(e.type===ot?"show":"hide"))}},{name:"click",filter:function(){return w(this.mode,"click")||tt&&w(this.mode,"hover")},handler:function(e){var t;(be(e.target,'a[href="#"], a[href=""]')||(t=be(e.target,"a[href]"))&&(this.cls||!je(this.target)||t.hash&&xe(this.target,t.hash)))&&e.preventDefault(),this.toggle()}}],update:{read:function(){return!(!w(this.mode,"media")||!this.media)&&{match:this.matchMedia}},write:function(e){var t=e.match,n=this.isToggled(this.target);(t?!n:n)&&this.toggle()},events:["resize"]},methods:{toggle:function(e){Ne(this.target,e||"toggle",[this])&&this.toggleElement(this.target)}}};Ln.version="3.1.6",function(e){e.component("accordion",Bn),e.component("alert",Hn),e.component("cover",qn),e.component("drop",Kn),e.component("dropdown",Jn),e.component("formCustom",Gn),e.component("gif",Zn),e.component("grid",nr),e.component("heightMatch",ir),e.component("heightViewport",sr),e.component("icon",vr),e.component("img",$r),e.component("leader",Pr),e.component("margin",Xn),e.component("modal",zr),e.component("nav",Br),e.component("navbar",Hr),e.component("offcanvas",Vr),e.component("overflowAuto",Ur),e.component("responsive",Yr),e.component("scroll",qr),e.component("scrollspy",Qr),e.component("scrollspyNav",Kr),e.component("sticky",Jr),e.component("svg",cr),e.component("switcher",Zr),e.component("tab",Xr),e.component("toggle",ei),e.component("video",Yn),e.component("close",br),e.component("marker",yr),e.component("navbarToggleIcon",yr),e.component("overlayIcon",yr),e.component("paginationNext",yr),e.component("paginationPrevious",yr),e.component("searchIcon",wr),e.component("slidenavNext",xr),e.component("slidenavPrevious",xr),e.component("spinner",_r),e.component("totop",yr),e.use(Vn)}(Ln);var ti,ni={mixins:[Fn],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(e){var t=e.date;return Date.parse(t)},days:function(e,t){var n=e.clsWrapper;return At(n.replace("%unit%","days"),t)},hours:function(e,t){var n=e.clsWrapper;return At(n.replace("%unit%","hours"),t)},minutes:function(e,t){var n=e.clsWrapper;return At(n.replace("%unit%","minutes"),t)},seconds:function(e,t){var n=e.clsWrapper;return At(n.replace("%unit%","seconds"),t)},units:function(){var e=this;return["days","hours","minutes","seconds"].filter(function(t){return e[t]})}},connected:function(){this.start()},disconnected:function(){var e=this;this.stop(),this.units.forEach(function(t){return ht(e[t])})},events:[{name:"visibilitychange",el:document,handler:function(){document.hidden?this.stop():this.start()}}],update:{write:function(){var e,t,n=this,r=(e=this.date,{total:t=e-Date.now(),seconds:t/1e3%60,minutes:t/1e3/60%60,hours:t/1e3/60/60%24,days:t/1e3/60/60/24});r.total<=0&&(this.stop(),r.days=r.hours=r.minutes=r.seconds=0),this.units.forEach(function(e){var t=String(Math.floor(r[e]));t=t.length<2?"0"+t:t;var i=n[e];i.textContent!==t&&((t=t.split("")).length!==i.children.length&&ft(i,t.map(function(){return""}).join("")),t.forEach(function(e,t){return i.children[t].textContent=e}))})}},methods:{start:function(){var e=this;this.stop(),this.date&&this.units.length&&(this.$emit(),this.timer=setInterval(function(){return e.$emit()},1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}},ri="uk-animation-target",ii={props:{animation:Number},data:{animation:150},computed:{target:function(){return this.$el}},methods:{animate:function(e){var t=this;ti||(ti=dt(document.head,"