@kizmann/pico-js 2.0.12 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pi=e():t.pi=e()}(self,()=>(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};function r(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.r(e),t.d(e,{Any:()=>re,Arr:()=>b,Cookie:()=>B,Data:()=>Vt,Dom:()=>Ft,Event:()=>ie,For:()=>Kt,Hash:()=>A,Locale:()=>C,Mix:()=>$,Now:()=>ct,Num:()=>p,Obj:()=>w,Route:()=>ee,Run:()=>n,Signal:()=>E,Str:()=>u,UUID:()=>ne,browser:()=>U,device:()=>J,go:()=>G,trait:()=>z});class i{static interval(t,e=0){const r=setInterval(()=>{t()},e);return()=>clearInterval(r)}static clear(t){return $.isArr(t)?b.each(t,t=>this.clear(t),this):$.isFunc(t)?(t(),this):(clearTimeout(t),clearInterval(t),this)}static tryin(t){try{t()}catch(t){}return this}static wait(t,e=0,r=500){let i,n;return n=setTimeout(()=>{this.clear([i,n])},e*r),i=setInterval(()=>{t()&&this.clear([n,i])},e),()=>clearInterval(i)}static frame(t){const e=requestAnimationFrame(()=>{t()});return()=>cancelAnimationFrame(e)}static async(t){const e=setTimeout(()=>{t()});return()=>clearTimeout(e)}static delay(t,e=0){let r=setTimeout(()=>{t()},e);return()=>clearTimeout(r)}static debounce(t,e=100){let r=null;return(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{this.frame(()=>t(...i))},e)}}static throttle(t,e=100){let r,i=null;return(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{r=!1},e),r||(this.frame(()=>t(...n)),r=!0)}}static framerate(t,e=30,r=!0){let i,n=0,s=1e3/e;const o=(...e)=>{if(clearTimeout(i),Date.now()-n<=s)return r&&(i=setTimeout(o,s+1));this.frame(()=>t(...e)),n=Date.now()};return o}static framebuffer(t,e,r=1e3){const i={key:e,cb:t,priority:r,args:[],active:!1};return b.add(this.$buffer,i),(t,...e)=>{/^drag/.test(t.type)&&t.preventDefault(),w.assign(i,{args:[t,...e],active:!0}),this.runFramebuffer()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{this.runFramebuffer()},50),Date.now()-this.$timer<50)return;this.$idler&&clearTimeout(this.$idler),this.$timer=Date.now();let t=b.filter(this.$buffer,{active:!0});0!==t.length&&(t=b.sort(t,"priority"),b.each(t.reverse(),t=>{t.cb(...t.args),t.active=!1}))}}r(i,"$idler",null),r(i,"$timer",0),r(i,"$buffer",[]);const n=i;var s;function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function l(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class a{static get(t,e){return $.isStr(t)||(t=$.str(t)),$.isInt(e)&&(e=$.int(e)),t.charAt(e)}static set(t,e,r=""){return $.isStr(t)||(t=$.str(t)),$.isInt(e)&&(e=$.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){$.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){$.isNull(r)&&(r=t);let i=this.range(r,e);return null===i?null:this.slice(t,...i)}static match(t,e,r=null){let i=$.str(t).match(e);return $.isEmpty(i)?[]:$.isFunc(r)?r(i):i}static regex(t){return $.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return $.str(t).toUpperCase()}static ucfirst(t){return $.str(t).charAt(0).toUpperCase()+t.slice(1)}static lc(t){return $.str(t).toLowerCase()}static lcfirst(t){return $.str(t).charAt(0).toLowerCase()+t.slice(1)}static cc(t){return b.each(Kt.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return Kt.slugify(t)}static sc(t){return Kt.slugify(t).replace("-","_")}static pc(t){return b.each(Kt.slugify(t).split("-"),t=>this.ucfirst(t)).join("")}static has(t,e){return-1!==this.lc(t).indexOf(this.lc(e))}static range(t,e,r=null){let i=$.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return $.str(t).slice(e,r)}static string(t,e="-",r=!1){return $.isEmpty(t)?e:(t=$.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return $.isEmpty(t)?i:$.bool(t)?e:r}static number(t,e=null,r=null,i={}){return $.isNum(t)?(null==r&&(r=C.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({maximumFractionDigits:12},i),null!=e&&(i.minimumFractionDigits=e,i.maximumFractionDigits=e),$.num(t).toLocaleString(r,i)):$.str(t)}static integer(t,e=0,r="0"){return $.isNum(t)?($.isInt(t)||(t=$.int(t)),t=$.int(t),e?$.str(t).padStart(e,r):$.str(t)):$.str(t)}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return $.isDate(t)||(t=ct.make(t)),t.valid()?t.format(e):r}static date(t,e="YYYY-MM-DD",r="-"){return this.datetime(t,e,r)}static time(t,e="HH:mm:ss",r="-"){return this.datetime(t,e,r)}static objectify(t,e="options",r=!1){return $.isRef(t)?t:("params"===e&&(t=Kt.parseParams(t)),"options"===e&&(t=Kt.parseOptions(t)),$.isRef(t)||(t=JSON.parse(t)),r?$.vals(t):t)}static stringify(t,e="options"){return $.isStr(t)?t:"params"===e?Kt.castParams(t):"options"===e?Kt.castOptions(t):JSON.stringify(t)}}l(a,"upper",(s=a).uc),l(a,"lower",s.lc),l(a,"camelcase",s.cc),l(a,"kebabcase",s.kc),l(a,"snakecase",s.sc),l(a,"pascalcase",s.pc),a.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),u.regex(...t)),a.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),u.pc(...t)),a.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),Kt.slugify(...t)),a.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),Kt.castOptions(...t)),a.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),Kt.parseOptions(...t)),a.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),Kt.castParams(...t)),a.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),Kt.parseParams(...t)),a.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),Kt.filesize(...t)),a.real=()=>{console.error("Str.real() is not implemented anymore.")},a.array=()=>{console.error("Str.array() is not implemented anymore.")};const u=a;function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class f{static fixed(t,e=2){return $.isNum(t)||(t=$.num(t)),t.toFixed(e)}static float(t){return $.isNum(t)||(t=$.num(t)),parseFloat(t)}static int(t){return $.isNum(t)||(t=$.num(t)),parseInt(t)}static ceil(t){return $.isNum(t)||(t=$.num(t)),Math.ceil(t)}static floor(t){return $.isNum(t)||(t=$.num(t)),Math.floor(t)}static round(t){return $.isNum(t)||(t=$.num(t)),Math.round(t)}static minmax(t,e=0,r=Number.MAX_SAFE_INTEGER){return(t=$.num(t))<e&&(t=r),t>r&&(t=e),$.num(t)}static combine(t){return b.reduce(t,(t,e)=>t+e,0)}static subtract(t){return b.reduce(t,(t,e)=>t-e,0)}static decade(t){return $.isNum(t)||(t=$.num(t)),10*Math.floor(t/10)}static matrix(t,e=[]){$.isNum(t)||(t=$.num(t));let r=0;for(let i=20;i>=0;i--)t>=(r=Math.pow(2,i))&&(e.push(r),t-=r);return e}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[h(h({},i),t),h(h({},i),e)];let n=Math.PI*this.float(t.lat)/180,s=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(n)*Math.sin(s),Math.cos(n)*Math.cos(s)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}f.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),u.number(t,e[2]||null)),f.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),A.number(...t));const p=f;var m;function g(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class y{static all(t){return $.isArr(t)?t:[t]}static get(t,e,r=null){return $.isArr(t)?t&&t[e]?t[e]:r:t}static set(t,e,r){return this.splice(t,e,1,r)}static unset(t,e){return this.splice(t,e,1)}static prev(t,e){return $.isEmpty(t)||!$.isArr(t)?0:e-1<0?t.length-1:e-1}static next(t,e){return $.isEmpty(t)||!$.isArr(t)||e+1>t.length?0:e+1}static make(t,e=null){let r=new Array(t);null==e&&(e=t=>t);for(let i=0;i<t;i++)r[i]="function"==typeof e?e(i):e;return r}static has(t,e){if(!$.isPrim(e))return-1!==this.findIndex(t,e);return $.isRef(t)||(t=[t]),$.isArr(t)||(t=$.vals(t)),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return $.keys(e)}static lengths(t,...e){let r=t.length;for(let t=0;t<e.length;t++)if(e[t].length!==r)return!1;return!0}static first(t,e=null){return this.get(t,0,e)}static second(t,e=null){return this.get(t,2,e)}static third(t,e=null){return this.get(t,2,e)}static last(t,e=null){return this.get(t,t.length-1,e)}static each(t,e,r=null){if($.isObj(t))return this.eachObj(t,e,r);null==t&&(t=[]);let i=new Array(t.length);for(let r=0;r<t.length;r++)i[r]=e(t[r],r);return null!=r?r:i}static eachObj(t,e,r=null){if($.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=$.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[$.isArr(t),$.keys(t)],n=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],n(r));return t}static recursive(t,e,r,i=[]){let n=t=>i=>this.recursive(i,e,r,t);return $.isArr(t)?this.map(t,n(i)):($.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],null==t||($.isObj(t[e])&&(t[e]=n(i)(t[e])),$.isArr(t[e])&&(t[e]=this.map(t[e],n(i)))),t)}static cascade(t,e,r,i=[],n=[]){let s=t=>i=>this.cascade(i,e,r,t,n);return $.isArr(t)?(this.each(t,s(i)),n):($.isObj(t)&&n.push(r(t,i)),i=[...this.clone(i),t],null==t||($.isObj(t[e])&&n.push(s(i)(t[e])),$.isArr(t[e])&&this.each(t[e],s(i))),n)}static cascadeFind(t,e,r){if(null==t)return null;let i=null;return this.cascade(t,e,(t,e)=>{null==i&&(i=((t,e)=>r(t,e)?[...e,t]:null)(t,e))}),i}static cascadeMap(t,e,r){let i={};return null==t?i:(i=this.cascade(t,e,(t,e)=>({[t[r]]:[...this.extract(e,r),t[r]]})),w.assign(...i))}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!$.isEmpty(t)),$.keys(t).filter(r=>$.isFunc(e)?e.call({},t[r],r):$.isRef(e)?this.includes(t[r],e):e===t[r]))}static filterRemove(t,e=null){if(null==t)return t;let r=this.filterIndex(t,e);return 0===r.length?t:this.splices(t,r)}static filter(t,e=null){return null==t?[]:(null==e&&(e=t=>!$.isEmpty(t)),$.vals(t).filter((r,i)=>$.isFunc(e)?e.call({},r,i):$.isRef(e)?this.includes(r,e):e===t[i]))}static findIndex(t,e=null,r=-1){if(null==t)return r;null==e&&(e=t=>!$.isEmpty(t));for(let r=0;r<t.length;r++){if($.isFunc(e)&&e.call({},t[r],r))return r;if($.isRef(e)&&this.includes(t[r],e))return r;if(e===t[r])return r}return r}static find(t,e=null,r=null){let i=this.findIndex(t,e);return-1===i?r:t[i]}static sort(t,e=null){return $.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=$.keys(t).sort((r,i)=>e.call({},t[r],t[i])),i=[];for(const e of r)i.push(t[e]);return i}static sortDeep(t,e){let r=t=>w.get(t,e),i=$.keys(t).sort((e,i)=>$.compare(r(t[e]),r(t[i]))),n=[];for(const e of i)n.push(t[e]);return n}static sortPrim(t){let e=$.keys(t).sort((t,e)=>$.compare(t,e)),r=[];for(const i of e)r.push(t[i]);return r}static merge(t,...e){return t.concat(...e)}static prepend(t,...e){return t.unshift(...e),t}static append(t,...e){return t.push(...e),t}static add(t,e,r=null){return null==r&&(r=e),-1!==this.findIndex(t,r)||t.push(e),t}static replace(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1!==i&&this.splice(t,i,1),t.push(e),t}static remove(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i||this.splice(t,i,1),t}static toggle(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i?(t.push(e),t):(this.splice(t,i,1),t)}static insert(t,e,r){return this.splice(t,e,0,r),t}static slice(t,e,r=1){return t.slice($.num(e),r)}static splice(t,e,r=1,...i){return t.splice($.num(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if($.isPrim(t))return t;if($.isObj(t))return w.clone(t);if(!$.isArr(t))return t;let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.clone(t[r]);return e}static diff(...t){return t.reduce((t,e)=>t.filter(t=>!e.includes(t)))}static isect(...t){return t.reduce((t,e)=>t.filter(t=>e.includes(t)))}static extract(t,e){let r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=w.get(t[i],e);return r}static reduce(t,e,r){return $.vals(t).reduce(e,r)}static chunk(t,e=10){let r=[];for(let i=0;i<t.length;i+=e)r.push(t.slice(i,i+e));return r}static includes(t,e){if($.isObj(e))return w.includes(t,e);if(!$.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let n=0;!1===r&&n<i;n++)r||=this.has(t,e[n]);return r}static contains(t,e){let r=!0;for(let i of $.vals(e))r&&=-1!==$.vals(t).indexOf(i);return r}static matches(t,e){if($.isObj(e))return w.matches(t,e);if(!$.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let n=0;!0===r&&n<i;n++)r&&=this.has(t,e[n]);return r}}g(y,"diffrence",(m=y).diff),g(y,"intersect",m.isect),y.removeIndex=(...t)=>(console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),y.unset(...t)),y.sortString=(...t)=>(console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),y.sortPrim(...t)),y.push=(...t)=>(console.warn("Arr.push() is deprecated, use Arr.append() instead."),y.append(...t)),y.concat=(...t)=>(console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),y.merge(...t)),y.equal=(...t)=>(console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),y.matches(...t));const b=y;class v{static keyoptim(t,e=!1,r=null){return null===r&&(r=$.isStr(t)),!r&&e&&(t=t.join(".")),r||e?t.split("."):t}static has(t,e,r=!1){if(null==t||null==e)return!1;"number"==typeof e&&(e=$.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return void 0!==t[e];e=this.keyoptim(e,r,i);let[n,s,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[n];for(;null!=t&&s<o;)t=t[e[s++]];return null!=t&&void 0!==t[n]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=$.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e];let s=0,o=(e=this.keyoptim(e,i,n)).length;if(0===o)return r;for(;null!=t&&s<o;)t=t[e[s++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=$.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,n)).length)return t;let s=t;for(let t,i,n=0;n<e.length;n++)t=i=String(e[n]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==s[t]&&(s[t]=t===i?{}:[]),t!==i&&b.insert(e,n+1,s[t].length),e.length-1===n&&(s[t]=r),s=s[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=$.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return delete t[e],t;e=this.keyoptim(e,r,i);let[n,s,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&s<o;)l=l[e[s++]];return null==l||delete l[n],t}static empty(t,e){return $.isEmpty(this.get(t,e))}static remove(t,e){if(!$.isArr(e))return t;for(let r of e)this.unset(t,r);return t}static each(t,e,r=null){let i={};for(let r of $.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of $.keys(t))t[r]=e(t[r],r);return t}static filterIndex(t,e=null){return b.filterIndex(t,e)}static filter(t,e=null){let r={};for(let i of this.filterIndex(t,e))r[i]=t[i];return r}static flatten(t,e="",r={}){if("object"!=typeof t)return r[e]=t;""!==e&&(e+=".");for(let i of $.keys(t))this.flatten(t[i],e+i,r);return r}static flattenForm(t,e="",r={}){if("object"!=typeof t)return r[e]=t;let i=t=>e?`${e}[${t}]`:t;for(let e of $.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return b.each($.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if($.isPrim(t))return t;if($.isArr(t))return b.clone(t);if(!$.isObj(t))return t;let r={};for(let e of $.keys(t))r[e]=this.clone(t[e]);return null!=e?this.assign(r,e):r}static pluck(t,e,r=null){let i=this.get(t,e,r);return this.unset(t,e),i}static only(t,e,r=null){let i={};return this.each(t,(t,r)=>{b.has(e,r)&&(i[r]=t)}),null==r?i:this.assign(i,r)}static except(t,e,r=null){let i={};return this.each(t,(t,r)=>{b.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if($.isArr(e))return b.includes(t,e);if(!$.isObj(e))return t===e;let r=$.keys(e),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i=this.includes(t[r[s]],e[r[s]]);return i}static matches(t,e){if($.isArr(e))return b.matches(t,e);if(!$.isObj(t))return t===e;let r=b.unique([...$.keys(e),...$.keys(t)]),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i&&=this.matches(t[r[s]],e[r[s]]);return i}static sort(t,e){let r=b.sort(t,e);return b.each(r,(e,r)=>{t[r]._key=r}),r}}v.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Obj.sort() instead."),v.sort(...t)),v.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),$.vals(...t)),v.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),b.find(...t)),v.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),b.findIndex(...t));const w=v;var O;function D(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const j={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class P{static isEmpty(t){return null==t||("string"==typeof t?""===t:"number"!=typeof t&&("boolean"!=typeof t&&(this.isArr(t)?0===t.length:0===this.len(t))))}static isNull(t){return null===t}static isUndef(t){return void 0===t}static isNix(t){return null==t}static isPrim(t){return"string"==typeof t||"number"==typeof t}static isStr(t){return"string"==typeof t}static isNum(t){return"number"==typeof t||!!this.isStr(t)&&/^-?[0-9]+(\.[0-9]+)?$/.test(t)}static isInt(t){return!!this.isNum(t)&&(this.isStr(t)?/^-?[0-9]+$/.test(t):parseInt(t)===parseFloat(t))}static isBool(t){return"boolean"==typeof t||!!this.isStr(t)&&/^(true|false)$/.test(t)}static isFunc(t){return"function"==typeof t}static isRef(t){return null!=t&&"object"==typeof t}static isObj(t){return null!=t&&("object"==typeof t&&t.constructor===Object)}static isArr(t){return null!=t&&("object"==typeof t&&t.constructor===Array)}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||j.iso.test(t)}static isDate(t){return t instanceof Date||/^\d{4}-\d{2}-\d{2}$/.test(t)}static isTime(t){return t instanceof Date||/^\d{2}:\d{2}:\d{2}$/.test(t)}static isEqual(t,e){return t instanceof Node?t.isEqualNode(e):this.isRef(t)?Object.is(t,e):t===e}static iter(t){if(null==t)return{};let e={};for(const[r,i]of t.entries())e[r]=i;return e}static keys(t){return null==t?[]:(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!G().chrome)return Object.values(t);let e=this.keys(t);for(let r=0;r<e.length;r++)e[r]=t[e[r]];return e}static nodes(t){return Array.prototype.slice.call(t)}static props(t,e=[]){let r={};for(const i of Object.getOwnPropertyNames(t))e.length&&!b.has(e,i)&&(r[i]=t[i]);return r}static extend(t,e,r=["constructor"]){if(null==e)return{};let i=Object.getPrototypeOf(e);for(const n of Object.getOwnPropertyNames(e)){if(!r.length||b.has(r,n))continue;let s=Object.getOwnPropertyDescriptor(i,n);s||(s=Object.getOwnPropertyDescriptor(e,n)),s||s.get||s.set||(t[n]=e[n]),s&&(s.get||s.set)&&Object.defineProperty(t,n,s)}return t}static class(t,e=[]){return e=b.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=b.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return w.each(w.flattenForm(t),(t,r)=>{e.append(r,t)}),e}static each(t,e){if(!this.isRef(t))throw new Error("Iterate non object");for(let r of $.keys(t))e(t[r],r);return this}static len(t){return this.isArr(t)?t.length:this.isRef(t)?this.keys(t).length:this.string(t).length}static compare(t,e){return C.collator().compare(t,e)}static null(t,e=null){return"null"===t||this.isEmpty(t)?null:e}static arr(t){return this.isArr(t)?t:this.isStr(t)?(t=t.replace(/^@?\[?(.*?)]$/g,"$1"),b.each(t.split(","),t=>t.replace(/(^"|^'|'$|"$)/g,""))):[t]}static str(t){return this.isNix(t)||void 0===t.toString?String(t):t.toString()}static num(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),t):e}static int(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),Math.round(t)):e}static bool(t){return this.isRef(t)?!!this.vals(t).length:this.isNum(t)?0!==this.num(t):/^(true|yes)$/i.test(t)}}D(P,"isPrimitive",(O=P).isPrim),D(P,"isString",O.isStr),D(P,"isNumber",O.isNum),D(P,"isInteger",O.isInt),D(P,"isBoolean",O.isBool),D(P,"isFunction",O.isFunc),D(P,"isReference",O.isRef),D(P,"isObject",O.isObj),D(P,"isArray",O.isArr),D(P,"isIterable",O.isIter),D(P,"length",O.len),D(P,"array",O.arr),D(P,"string",O.str),D(P,"number",O.num),D(P,"integer",O.int),D(P,"boolean",O.bool),P.global=(...t)=>(console.warn("Mix.global() is deprecated, use go() instead."),G(...t)),P.isPlain=(...t)=>(console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),$.isObj(...t)),P.float=(...t)=>(console.warn("Mix.float() is deprecated, use Mix.num() instead."),$.num(...t)),P.delay=(...t)=>(console.warn("Mix.delay() is deprecated, use Run.delay() instead."),n.delay(...t)),P.async=(...t)=>(console.warn("Mix.async() is deprecated, use Run.async() instead."),n.async(...t)),P.debounce=(...t)=>(console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),n.debounce(...t)),P.throttle=(...t)=>(console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),n.throttle(...t)),P.framerate=(...t)=>(console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),n.framerate(...t)),P.convertString=(...t)=>(console.warn("Mix.convertString() is deprecated, use Str.string() instead."),u.string(...t)),P.convertDatetime=(...t)=>(console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),u.date(...t)),P.convertBool=(...t)=>(console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),u.boolean(...t)),P.convertBoolean=(...t)=>(console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),u.boolean(...t));const $=P;const x=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],M=["8","9","a","b"],N=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class S{static radix(t=60,e=null){return(e||this.RADIX)[this.number(t-1)]}static number(t=1024,e=0){return Math.floor(Math.random()*(t-e+1))+e}static make(t=6,e=62,r={}){let i="";for(let r=0;r<t;r++)i+=this.radix(e);for(const t of Object.keys(r))i=u.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?this.radix(M.length,M):this.radix(x.length,x);return e.substring(0,8)+"-"+e.substring(8,12)+"-"+t+e.substring(12,15)+"-"+e.substring(15,19)+"-"+e.substring(19,31)}static password(t=24,e=null){let r=[...this.RADIX,...e||N],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var Y,k,T;Y=S,T=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],(k=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(k="RADIX"))in Y?Object.defineProperty(Y,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):Y[k]=T;const A=S;class H{static bind(t,e,r={},i=!1){const n=[e,r,i];return $.isArr(t)?b.each(t,t=>this.bind(t,...n),this):($.isPrim(r)&&(r={id:r}),this.$events=b.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){const r=[e];return $.isArr(t)?b.each(t,t=>this.unbind(t,...r),this):($.isPrim(e)&&(e={id:e}),b.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return b.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){const r=[e];if($.isArr(t))return b.each(t,t=>this.pause(t,...r),this);let i=b.find(this.$events,{event:t,options:e});return null!=i&&(i.paused=!0),this}static unpause(t,e={}){if($.isArr(t))return b.each(t,t=>this.pause(t,...arguments),this);let r=b.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!1),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(H,"$events",[]);const E=H;function I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class F{static has(t=void 0){return void 0===t||w.has(F.$text,t)}static get(t=void 0,e=null){return void 0===t?F.$text:w.get(F.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?F.$text=t:w.set(F.$text,t,e)}static code(t=null){return $.isNull(t)?$.isNull(C.$code)?(C.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),C.$code):C.$code:C.$code=t}static collator(){return null!=C.$sort||(C.$sort=new Intl.Collator(C.code(),{numeric:!0,sensitivity:"base"})),C.$sort}static replace(t,e=null){return null==e||w.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=w.get(F.$text,t,t),C.replace(t,e)}static choice(t,e=0,r={}){return t=w.get(F.$text,t,t),void 0===r.count&&(r.count=e),t=C.countpick(t.split("|"),e),C.replace(t,r)}static countpick(t,e=0){let r=t.length;return 3===r&&0===e?t[0]:3===r&&1===e?t[1]:3===r&&e>=2?t[2]:2===r&&1===e?t[0]:2===r&&1!==e?t[1]:t[0]}}I(F,"$text",{}),I(F,"$sort",null),I(F,"$code","en");const C=F;function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach(function(e){W(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function W(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const X={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class q{static global(){return null==globalThis.document?"":globalThis.document.cookie||""}static parse(t=!1){if(!t&&this.$cookie)return this.$cookie;this.$cookie={};let e=this.global().matchAll(X.entry);if(null==e)return this.$cookie;return b.each(Array.from(e),({groups:t})=>{this.$cookie[t.key]=t.value.replaceAll("{:}",";")}),this.$cookie}static get(t,e=null,r="string"){return this.$cookie||this.parse(),null==this.$cookie[t]?e:/^bool(ean)?$/.test(r)||/^num(ber)?$/.test(r)||/^int(eger)?$/.test(r)?$.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?Kt.parseOptions(this.$cookie[t]):$.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof ct||(r=ct.make(r||"+7 days")),i=L({expires:r.toUTC(),path:"/"},i),$.isRef(e)&&(e=Kt.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let n=t+"="+$.str(e).replaceAll(";","{:}");return b.each(i,(t,e)=>{n+=`;${e}=${t}`}),globalThis.document.cookie=n,this}static forget(t,e={}){e=L({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return b.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}W(q,"$cookie",void 0);const B=q;function G(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function U(){const t=G();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.safari&&(r.safari=/Safari\//.test(e)),null==r.firefox&&(r.firefox=/Firefox\//.test(e)),null==r.edge&&(r.edge=/Edge\//.test(e)),null==r.chrome&&(r.chrome=/Chrome\//.test(e)),t.piuag=r}function J(){const t=G();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.win&&(r.win=/Windows/.test(e)),null==r.osx&&(r.osx=/Macintosh|Mac OS X/.test(e)),null==r.gnu&&(r.gnu=/Linux/.test(e)),null==r.ios&&(r.ios=/iPhone|iPad|iPod/.test(e)),null==r.oid&&(r.oid=/Android/.test(e)),t.piudv=r}function z(t){const e=t[0];return b.each(t.slice(1),t=>{b.each($.class(t),(t,r)=>{e[r]=t}),b.each($.proto(t),(t,r)=>{e.prototype[r]=t})}),e}const _={second:/([+-])([0-9]+)\s?seconds?/i,minute:/([+-])([0-9]+)\s?minutes?/i,hour:/([+-])([0-9]+)\s?hours?/i,date:/([+-])([0-9]+)\s?days?/i,month:/([+-])([0-9]+)\s?months?/i,year:/([+-])([0-9]+)\s?years?/i};class Z{static test(t){return t instanceof Date}get(t){return"time"===t?this.value.getTime():/^seconds?$/i.test(t)?this.value.getSeconds():/^minutes?$/i.test(t)?this.value.getMinutes():/^hours?$/i.test(t)?this.value.getHours():/^days?$/i.test(t)?this.value.getDay():/^dates?$/i.test(t)?this.value.getDate():/^months?$/i.test(t)?this.value.getMonth()+1:/^years?$/i.test(t)?this.value.getFullYear():this}set(t,e){$.isNum(t)||(t=$.int(t));let r=this.value.getDay();return"day"===e&&(t=t+1-(r||7)),"time"===e&&this.value.setTime(t),/^seconds?$/i.test(e)&&this.value.setSeconds(t),/^minutes?$/i.test(e)&&this.value.setMinutes(t),/^hours?$/i.test(e)&&this.value.setHours(t),/^days?$/i.test(e)&&this.add(t,"date"),/^dates?$/i.test(e)&&this.value.setDate(t),/^months?$/i.test(e)&&this.value.setMonth(t-1),/^years?$/i.test(e)&&this.value.setFullYear(t),this}time(t=null){return null==t?this.get("time"):this.set(t,"time")}second(t=null){return null==t?this.get("second"):this.set(t,"second")}minute(t=null){return null==t?this.get("minute"):this.set(t,"minute")}hour(t=null){return null==t?this.get("hour"):this.set(t,"hour")}day(t=null){return null==t?this.get("day"):this.set(t,"day")}date(t=null){return null==t?this.get("date"):this.set(t,"date")}month(t=null){return null==t?this.get("month"):this.set(t,"month")}year(t=null){return null==t?this.get("year"):this.set(t,"year")}shortyear(){return this.get("year").toString().slice(-2)}add(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)+$.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-$.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return $.isEmpty(t)||w.each(_,(e,r)=>{u.match(t,e,([t,e,i])=>{"+"===e?this.add(i,r):this.sub(i,r)})}),this}apply(t,e="YYYY-MM-DD HH:mm:ss",r=[]){t=ct.make(t,e);for(const e of r)this.set(t.get(e),e);return this}applyDate(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["date","month","year"])}applyTime(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["hour","minute","second"])}}Z.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},Z.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},Z.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},Z.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},Z.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},Z.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},Z.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},Z.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},Z.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},Z.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},Z.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},Z.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},Z.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},Z.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},Z.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},Z.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const K={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm",LT:"HH:mm",LTS:"HH:mm:ss",LTSD:"DD/MM/YYYY HH:mm:ss"},Q={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class V{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in Q)t=u.replace(t,Q[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return $.isTime(t)&&(e="HH:mm:ss"),$.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):$.isIsoDate(t)?(this.value=new Date(t),this):this.parseFormat(t,e)}parseFormat(t,e){if(!this.isParsable(t,e))return this.value=new Date(NaN),this;for(const r in Q)this.set(u.extract(t,Q[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return w.has(K,t)&&(t=C.$text[t]??K[t]),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("dddd",()=>this.human("day"))).replace("ddd",()=>this.human("day",3))).replace("dd",()=>this.human("day",2))).replace("MMMM",()=>this.human("month"))).replace("MMM",()=>this.human("month",3))).replace("YYYY",()=>u.integer(this.year(),4))).replace("MM",()=>u.integer(this.month(),2))).replace("DD",()=>u.integer(this.date(),2))).replace("HH",()=>u.integer(this.hour(),2))).replace("mm",()=>u.integer(this.minute(),2))).replace("ss",()=>u.integer(this.second(),2))).replace("YY",()=>u.integer(this.shortyear(),2))).replace("X",()=>u.integer(this.time()))).replace("x",()=>u.integer(this.time()/1e3))}code(t="X"){return $.int(this.format(t))}}class tt{before(t=null,e="x"){return this.code(e)<ct.make(t).code(e)}beforeDate(t=null,e="YYYYMMDD"){return this.before(t,e)}beforeTime(t=null,e="HHmmss"){return this.before(t,e)}after(t=null,e="x"){return this.code(e)>ct.make(t).code(e)}afterDate(t=null,e="YYYYMMDD"){return this.after(t,e)}afterTime(t=null,e="HHmmss"){return this.after(t,e)}equal(t=null,e="x"){return t instanceof ct||(t=ct.make(t)),this.code(e)===t.clone().code(e)}equalDate(t=null,e="YYYYMMDD"){return this.equal(t,e)}equalTime(t=null,e="HHmmss"){return this.equal(t,e)}between(t=null,e=null,r="YYYYMMDD"){let i=[ct.make(t),ct.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class et{grid(t="day"){if(/^seconds?$/i.test(t))return this.getSecondsGrid();if(/^minutes?$/i.test(t))return this.getMinutesGrid();if(/^hours?$/i.test(t))return this.getHoursGrid();if(/^days?$/i.test(t))return this.getDaysGrid();if(/^dates?$/i.test(t))return this.getDatesGrid();if(/^months?$/i.test(t))return this.getMonthsGrid();if(/^years?$/i.test(t))return this.getYearsGrid();if(/^decades?$/i.test(t))return this.getDecadesGrid();throw new Error(`Invalid grid scope type "${t}".`)}getSecondsGrid(t=1){return null==t&&(t=1),b.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),b.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),b.make(24/t,e=>this.clone().hour(e*t))}getDaysGrid(){let t=[this.first("date").first("day"),this.last("date").last("day")];return t[0].range(t[1],"date")}getDatesGrid(){let t=[this.first("date"),this.last("date")];return t[0].range(t[1],"date")}getMonthsGrid(){let t=[this.first("month"),this.last("month")];return t[0].range(t[1],"month")}getYearsGrid(){let t=[this.first("year"),this.clone().last("year")];return t[0].range(t[1],"year")}getDecadesGrid(){let t=[this.first("decade"),this.clone().last("decade")];return t[0].range(t[1],"decade")}}et.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},et.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},et.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},et.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},et.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},et.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class rt{prev(t="date"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().sub(10,"year"):this.clone().sub(1,t)}next(t="day"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().add(10,"year"):this.clone().add(1,t)}prevSecond(){return this.prev("second")}nextSecond(){return this.next("second")}prevMinute(){return this.prev("minute")}nextMinute(){return this.next("minute")}prevHour(){return this.prev("hour")}nextHour(){return this.next("hour")}prevDate(){return this.prev("date")}nextDate(){return this.next("date")}prevMonth(){return this.prev("month")}nextMonth(){return this.next("month")}prevYear(){return this.prev("year")}nextYear(){return this.next("year")}prevDecade(){return this.prev("decade")}nextDecade(){return this.next("decade")}first(t="date"){if(/^seconds?$/i.test(t))return this.firstSecond();if(/^minutes?$/i.test(t))return this.firstMinute();if(/^hours?$/i.test(t))return this.firstHour();if(/^days?$/i.test(t))return this.firstDay();if(/^dates?$/i.test(t))return this.firstDate();if(/^months?$/i.test(t))return this.firstMonth();if(/^years?$/i.test(t))return this.firstYear();if(/^decades?$/i.test(t))return this.firstDecade();throw new Error(`Invalid first scope type "${t}".`)}last(t="date"){if(/^seconds?$/i.test(t))return this.lastSecond();if(/^minutes?$/i.test(t))return this.lastMinute();if(/^hours?$/i.test(t))return this.lastHour();if(/^days?$/i.test(t))return this.lastDay();if(/^dates?$/i.test(t))return this.lastDate();if(/^months?$/i.test(t))return this.lastMonth();if(/^years?$/i.test(t))return this.lastYear();if(/^decades?$/i.test(t))return this.lastDecade();throw new Error(`Invalid last scope type "${t}".`)}firstSecond(){return this.clone().set(0,"second")}lastSecond(){return this.clone().set(59,"second")}firstMinute(){return this.clone().set(0,"minute")}lastMinute(){return this.clone().set(59,"minute")}firstHour(){return this.clone().set(0,"hour")}lastHour(){return this.clone().set(23,"hour")}firstDay(){return this.clone().set(0,"day")}lastDay(){return this.clone().set(6,"day")}firstDate(){return this.clone().set(1,"date")}lastDate(){return this.clone().next("month").set(0,"date")}firstMonth(){return this.clone().set(1,"month")}lastMonth(){return this.clone().set(12,"month")}nthYear(t=0){let e=10*Math.floor(this.year()/10);return this.clone().set(e+t,"year")}firstYear(){return this.nthYear(0)}lastYear(){return this.nthYear(9)}nthDecade(t=0){let e=100*Math.floor(this.year()/100);return this.clone().set(e+10*t,"year")}firstDecade(){return this.nthDecade(0)}lastDecade(){return this.nthDecade(9)}}class it{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],n=[this.clone(),ct.make(t)];n[0].afterDate(n[1])&&(n=n.reverse()),n[1].add(1,e);for(let t=n[0];!t.equal(n[1],r);t=t.next(e))b.append(i,t);return i}}it.prototype.getDatesRange=function(...t){return console.warn("Now.getDatesRange() is deprecated, use Now.range() instead."),this.range(...t)};const nt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],st=["January","February","March","April","May","June","July","August","September","October","November","December"];class ot{human(t="day",e=null){return/^days?$/i.test(t)?this.getHumanDay(e):/^months?$/i.test(t)?this.getHumanMonth(e):this.get(t)}getHumanDay(t=null){let e=this.day()-1;if(!nt[e])throw new Error(`Invalid day number "${e}".`);let r=C.trans(nt[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!st[e])throw new Error(`Invalid month number "${e}".`);let r=C.trans(st[e]);return null!=t&&(r=r.substring(0,t)),r}}function lt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const at=[Z,V,tt,et,rt,it,ot];class ut extends(z(at)){constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){super(),lt(this,"input",null),lt(this,"value",null),"now"===t&&(t=null);let r=t;return t&&t.toDate&&(t=t.toDate()),t instanceof Date||(t=new Date),this.input=t,$.isNix(r)&&(this.input=r),this.value=t,$.isStr(r)&&this.parse(r,e),b.each(ct.init,t=>{t.call(this,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new ct(t,e)}reset(t=null){return null==t&&(t={month:!0,day:!0,time:!0}),t.month&&this.value.setMonth(0),t.day&&this.value.setDate(1),t.time&&this.value.setHours(0,0,0),this}clone(){return new ct(new Date(this.value),null)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}lt(ut,"init",[]),ut.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const ct=ut;class ht{static filterNodes(t,e=1){return b.filter($.nodes(t),t=>t.nodeType===e)}static getNodePoint(t){t.touches?.[0]&&(t=t.touches[0]);let[e,r]=[null,[t.clientX,t.clientY]];return null!=Ft.doc().elementsFromPoint&&(e=document.elementsFromPoint(r[0],r[1])),null!=Ft.doc().msElementsFromPoint&&(e=document.msElementsFromPoint(r[0],r[1])),e}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=Ft.getNodePoint(e)),$.isArr(r)&&(r=b.first(r)),null==r&&(r=e.target),r.closest(t)}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?Ft.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?Ft.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?Ft.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=$.nodes(this.el.childNodes);return-1===t?r:b.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=Ft.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>Ft.find(e).is(t)),b.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!Ft.find(e).is(t)),b.filter(this.els,t)}find(t){if(null==this.el)return Ft.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return $.isStr(r)&&(r=e.querySelectorAll(t)),Ft.find(r)}get(t=-1){let e=this.els;return-1===t?e:b.get(e,t)}first(t=0){return this.get(t)}last(t=1){return b.get(this.els,this.els.length-t)}each(t){return b.each(this.els,t)}loopParent(t,e=null){null==e&&(e=Ft.win());for(let r=this.el;r&&r!==e;r=r.parentNode)t.call({},r);return this}parent(){let t=this.getNodeParent();return null==t?Ft.find(null):t}child(t=null,e=1){for(let r of this.childs(t,e))return Ft.find(r);return Ft.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:b.filter(r,e=>Ft.find(e).is(t))}closest(t){if(this.el===t)return this.el;for(let e=this;null!=e.el;e=e.getNodeParent())if(e.is(t))return e.el;return null}upnode(t){return Ft.find(this.closest(t))}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return Ft.find(e);return Ft.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return Ft.find(e);return Ft.find(null)}length(){return this.els.length}is(t,e=!1){if(this.el===t)return!0;if(null==this.el)return e;for(let e of this.parent().find(t).get())if(e===this.el)return!0;return!1}matches(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.find(t).get())if(e===this.el)return!0;return!1}empty(){return this.length()<1||null==this.el}visible(){return null!=this.el&&this.el.is(":visible")}above(t){return this.parent().is(t)}inside(t){return null!=this.closest(t)}contains(t){return this.el.contains(t)}}ht.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},ht.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},ht.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},ht.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},ht.prototype.getNot=function(){console.error("Dom.getNot() is not implemented anymore.")};class dt{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class ft{bind(t,e,r,i=null,n=!1,s={}){return $.isPrim(s)&&(s={id:s}),Ft.$events=b.append(Ft.$events,{el:t,event:e,cb:r,selector:i,pause:n,options:s}),t.addEventListener(e,r,s),this}unbind(t,e,r=null,i={}){$.isPrim(i)&&(i={id:i});let n=b.filterIndex(Ft.$events,{el:t,event:e,selector:r,options:i});if(0===n.length)return this;return b.each(n.reverse(),r=>{var i;t.removeEventListener(...(i=Ft.$events[r],[e,i.cb,i.options]))}),b.splices(Ft.$events,n),this}on(t,e,r={},i=!1,n=null){$.isPrim(r)&&(r={id:r});const s=[e,r,i,n];if($.isArr(t))return b.each(t,t=>this.on(t,...s)),this;let o=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,o,n,i,r)}),this}off(t,e=null,r={}){$.isPrim(r)&&(r={id:r});const i=[e,r];return $.isArr(t)?(b.each(t,t=>this.off(t,...i)),this):($.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}optoff(t={}){return n.async(()=>{b.filterRemove(Ft.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),this}once(t,e,r={}){return r.id=A.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},n=!1){return this.on(t,function(t){let i=Ft.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,n,e),this}fire(t,e={}){let r=new CustomEvent(t,{detail:e});return this.each(t=>{t.dispatchEvent(r)}),this}pointerdown(t=1){const e=this.rect(),[r,i]=[e.left+e.width/2,e.top+e.height/2],n=new PointerEvent("pointerdown",{view:window,bubbles:!0,cancelable:!0,buttons:1,clientX:r,clientY:i});return this.each(t=>{t.dispatchEvent(n)}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ft,"$events",[]),ft.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},ft.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},ft.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},ft.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class pt{static make(t,e={}){t instanceof Ft&&(t=t.el),$.isStr(t)&&(t=document.createElement(t)),t=w.assign(t,e);let r=new Ft(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return Ft.find(t).each(t=>{null!=t.prepend&&t.prepend(this.el)}),this}append(t){return this.each(e=>{null!=e.append&&e.append(t)}),this}appendTo(t){return Ft.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class mt{static getDomState(){return document.readyState}static isDomReady(){return"complete"===Ft.getDomState()}static isDomComplete(){let t=Ft.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,s,o]=[A.make(),Ft.find(document),"DOMContentLoaded"],l=()=>{n.delay(t,e),s.off(o,null,{id:i})},a=Ft.isDomReady;return a()?(n.wait(()=>{if(a())return l(),!0},10,r),this):(s.on(o,l,{id:i}),this)}static complete(t,e=0,r=6e3){let i=()=>{n.delay(t,e)},[s,o]=[Ft.find(document),"load"],l=Ft.isDomComplete;return l()?(n.wait(()=>{l()&&i()},10,r),this):(s.on(o,i),this)}isNodeComplete(){return null!=this.el&&(!!this.el.naturalWidth||(!!this.el.naturalHeight||!!this.el.complete))}loaded(t,e=6e3){if(!this.el)return this;let r=this.isNodeComplete;return n.wait(()=>{if(r.call(this))return t(),!0},10,e),this}static required(){console.error("Dom.required() is not implemented anymore.")}}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function yt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(e){bt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function bt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class vt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),$.num(t,0)}rect(t={left:0,top:0,width:0,height:0}){if(!this.el.getBoundingClientRect)return t;const e=this.el.getBoundingClientRect();return null==e?t:e.toJSON()}margin(t=null,e=0){let r=this.computed(),i={top:Ft.num(r.marginTop),right:Ft.num(r.marginRight),bottom:Ft.num(r.marginBottom),left:Ft.num(r.marginLeft)};return null==t?i:w.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:Ft.num(r.paddingTop),right:Ft.num(r.paddingRight),bottom:Ft.num(r.paddingBottom),left:Ft.num(r.paddingLeft)};return null==t?i:w.get(i,t,e)}height(){return null==this.el?0:this.el instanceof Window?this.el.innerHeight:this.el.offsetHeight}clientHeight(){return null==this.el?0:Ft.num(this.computed("height",0))}scrollHeight(){return null==this.el?0:this.el.scrollHeight}innerHeight(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerHeight;let t=this.padding();return this.el.offsetHeight-t.top-t.bottom}realHeight(t={}){let e="auto";return this.actual(()=>e=this.height(),t),e}evaluateHeight(t=null,e=!0){null===(t=Ft.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerHeight()},{display:"none"}),!0===e&&this.style({height:r+"px"}),r}width(){return null==this.el?0:this.el instanceof Window?this.el.innerWidth:this.el.offsetWidth}clientWidth(){return null==this.el?0:Ft.num(this.computed("width",0))}scrollWidth(){return null==this.el?0:this.el.scrollWidth}innerWidth(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerWidth;let t=this.padding();return this.el.offsetWidth-t.left-t.right}realWidth(t={}){let e="auto";return this.actual(()=>e=this.width(),t),e}evaluateWidth(t=null,e=!0){null===(t=Ft.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerWidth()},{display:"none"}),!0===e&&this.style({width:r+"px"}),r}offset(t=null,e=null){let r=this.getOffset(e);return null==t?r:w.get(r,t,0)}offsetTop(t=null){return this.offset("top",t)}offsetBottom(t=null){return this.offset("bottom",t)}offsetLeft(t=null){return this.offset("left",t)}offsetRight(t=null){return this.offset("right",t)}loopOffset(t,e=null){null==e&&(e=Ft.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:Ft.body().scrollWidth-t.left-e,bottom:Ft.body().scrollHeight-t.top-r};return yt(yt({},t),i)}getOffset(t=null){null==t&&(t=Ft.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=Ft.num(t.offsetTop,0),r.left+=Ft.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=Ft.find(t),n={top:0,left:0,bottom:0,right:0};return e=t=>{n.top+=Ft.num(t.offsetTop,0),n.left+=Ft.num(t.offsetLeft,0)},i.loopOffset(e),n=this.calcOffset(n,i.scrollWidth(),i.scrollHeight()),{top:r.top-n.top,bottom:r.bottom-n.bottom,left:r.left-n.left,right:r.right-n.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:w.get(r,t,0)}scrollTop(t=null,e=null){return null==t?this.scroll("top",e):(this.each(e=>{e.scrollTop=t}),this)}scrollLeft(t=null,e=null){return null==t||this.each(e=>{e.scrollLeft=t}),this.scroll("left",e)}getScroll(t=null){null==t&&(t=Ft.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=Ft.num(t.scrollTop||t.pageYOffset||0),r.left+=Ft.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=Ft.num(t.scrollTop||t.pageYOffset||0),i.left+=Ft.num(t.scrollLeft||t.pageXOffset||0)},Ft.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}vt.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},vt.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},vt.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function wt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(r),!0).forEach(function(e){Dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Dt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class jt{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return $.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):($.isArr(e)&&(e=e.join(" ")),$.isObj(e)&&(e=Kt.castOptions(e)),this.el.setAttribute(t,e),this)}data(t,e=void 0,r=null){return this.attr("data-"+t,e,r)}computed(t=null,e=null){if(null==this.el)return e;if(1!==this.getNodeType())return e;let r=getComputedStyle(this.el);return null==t?r:w.get(r,t,e)}style(t=void 0,e=!0){if(null==this.el)return this;if(null===t)return this.attr("style",null);let r=this.attr("style",void 0,{});return $.isStr(r)&&(r=Kt.parseOptions(r)),$.isUndef(t)?r:(e&&(t=Ot(Ot({},r),t)),t.translate&&(t.transform=`translate3d(${t.translate.join(",")}, 0)`),delete t.translate,$.isNum(t.top)&&(t.top+="px"),$.isNum(t.left)&&(t.left+="px"),$.isNum(t.width)&&(t.width+="px"),$.isNum(t.height)&&(t.height+="px"),this.attr("style",t),this)}class(t=void 0,e=!1){if(null==this.el)return this;if(null===t)return this.attr("class","");let r=this.attr("class",void 0,[]);return $.isStr(r)&&(r=r.split(" ")),$.isUndef(t)?r:(e&&(t=[...r,...t]),this.attr("class",t),this)}html(t=void 0){return void 0===t?this.el.innerHTML:(this.each(e=>{e.innerHTML=t}),this)}actual(t,e=null){let r=this.attr("style");this.style(e);let i=t(this.el,this.el);return this.attr("style",r),i}hasClass(t){return $.isArr(t)||(t=[t]),b.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Ft.find(e).addClass(t));let e=this.el.className.split(" ");return $.isStr(t)&&(t=t.split(" ")),e=b.append(e,...t),this.el.className=b.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Ft.find(e).remClass(t));let e=this.el.className.split(" ");return $.isStr(t)&&(t=t.split(" ")),e=b.diff(e,t),this.el.className=b.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>Ft.find(e).toggleClass(t)):this.hasClass(t)?this.remClass(t):this.addClass(t)}stateClass(t,e=!0){return this.els.length>1?this.each(e=>Ft.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}jt.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},jt.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function $t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(e){xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function xt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Mt{static inviewMaxY(t,e=null){if($.isString(t)&&(t={el:t}),!(t=$t($t({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewY() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Ft.find(t.el).each(t=>{(t=>Ft.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:b.first(i)}static inviewMaxX(t,e=null){if($.isString(t)&&(t={el:t}),!(t=$t($t({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewX() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Ft.find(t.el).each(t=>{(t=>Ft.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:b.first(i)}viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[Ft.win().innerWidth,this.width()],[r,i]=[this.offset("left"),this.parent().scroll("left")];return{left:Math.max(0,r-i),right:Math.max(0,t-(r+e-i))}}inviewX(t=null){let{left:e,right:r}=Ft.find(t).viewoffY(),[i,n]=[Ft.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.max(0,l)}inratioX(t=null){return 1/this.width()*this.inviewX(t)}isInviewX(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewX(r)>t:this.inratioX(r)>t}viewoffY(){if(null==this.el)return{top:0,bottom:0};let[t,e]=[Ft.win().innerHeight,this.height()],[r,i]=[this.offset("top"),this.parent().scroll("top")];return{top:Math.max(0,r-i),bottom:Math.max(0,t-(r+e-i))}}inviewY(t=null){let{top:e,bottom:r}=Ft.find(t).viewoffY(),[i,n]=[Ft.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.min(Math.max(0,l),i)}inratioY(t=null){return 1/this.height()*this.inviewY(t)}isInviewY(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewY(r)>t:this.inratioY(r)>t}}Mt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},Mt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class Nt{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=Ft.doc().title),document.title=C.replace(e,{value:t,title:this.$meta.title}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Nt,"$meta",{}),Nt.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),Ft.setMetaTitle(t));class St{}function Yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(r),!0).forEach(function(e){Tt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Tt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class At{popover(t,e="botttom-center",r={}){return/^(top|bottom)-/.test(e)?this.popoverY(t,e,r):/^(left|right)-/.test(e)?this.popoverX(t,e,r):void 0}popoverY(t,e="bottom-center",r={}){t=Ft.find(t);let[i,n]=[t.rect(),this.rect()];r.x&&(i=kt(kt({},i),{},{left:r.x,width:1})),r.y&&(i=kt(kt({},i),{},{top:r.y,height:1})),r.width;let[s,o]=[{x:0,y:0},i.width-n.width];/^top-/.test(e)&&(s.y=i.top-n.height),/^bottom-/.test(e)&&(s.y=i.top+i.height),/-start$/.test(e)&&(s.x=i.left),/-center$/.test(e)&&(s.x=i.left+.5*o),/-end$/.test(e)&&(s.x=i.left+o);let l=e;/^top-/.test(e)&&(l=l.replace(/^top-/,"bottom-")),/^bottom-/.test(e)&&(l=l.replace(/^bottom-/,"top-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y||s.y<0;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverY(t,l,c);return u&&r.offset&&(s=r.offset),s.y<0&&(s.y=0),s.y+n.height>a.height&&(s.y=a.height-n.height),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverX(t,e="left-center",r={}){t=Ft.find(t);let[i,n]=[t.rect(),this.rect()];r.height;let[s,o]=[{x:0,y:0},i.height-n.height];/^left-/.test(e)&&(s.x=i.left-n.width),/^right-/.test(e)&&(s.x=i.left+i.width),/-start$/.test(e)&&(s.y=i.top),/-center/.test(e)&&(s.y=i.top+.5*o),/-end/.test(e)&&(s.y=i.top+o);let l=e;/^left-/.test(e)&&(l=l.replace(/^left-/,"right-")),/^right-/.test(e)&&(l=l.replace(/^right-/,"left-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverX(t,l,c);return u&&r.offset&&(s=r.offset),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverNormalize(t,e,r,i){const n=Ft.find(document.body).scroll();t.y<0&&(t.y=0),t.y+e.height>i.y&&(t.y=i.y-e.height),t.x<0&&(t.x=0);const s=document.body.clientWidth;return t.x+e.width>i.x&&(t.x=i.x-e.width-(i.x-s)),t={x:t.x+n.left,y:t.y+n.top},w.each(t,(e,r)=>{t[r]=Math.round(e)}),t.self={width:e.width,height:e.height},t.rect={width:r.width,height:r.height},t}}function Ht(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Et=[ht,mt,dt,ft,pt,vt,jt,Mt,Nt,St,At];class It extends(z(Et)){constructor(t,...e){return super(t,...e),Ht(this,"el",null),Ht(this,"els",[]),"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=$.nodes(t)),t instanceof Ft&&(t=t.el),$.isArr(t)||(t=[t]),this.el=t[0],this.els=t,this}static find(t,...e){return new Ft(t,...e)}static extend(t){t.call({},this)}static win(){return null==globalThis.window?{}:window}static doc(){return null==globalThis.document?{}:document}static body(){return this.doc().body?this.doc().body:{}}}Ht(It,"init",[]);const Ft=It,Ct=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>$.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>$.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>$.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>$.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Rt=[{match:t=>$.isArr(t),parse:t=>JSON.stringify(t)}];class Lt{static keyed(t,e=null){return $.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!$.isStr(t))return e;t=t.replace(/(^"|^'|'$|"$)/g,"");for(let e of r)if(e.match(t))return e.parse(t);for(let e of Ct)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),$.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Rt)if(e.match(t))return e.parse(t);return $.str(t)}}const Wt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Xt{static castParams(t={}){if($.isEmpty(t))return"";return b.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!$.isRef(e))return $.str(t)+"="+Kt.casted(e,!0);return b.each(e,(r,i)=>this.castParam($.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if($.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Wt.entry);if(null==e)return{};const[r,i]=[Kt.keyed,Kt.parsed];return b.reduce(Array.from(e),(t,{groups:e})=>w.set(t,r(e.key),i(e.val)),{})}}const qt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Bt{static castOptions(t={},e=!0){if($.isEmpty(t))return"";return b.each(t,(t,r)=>this.castOption(r,t,null,e)).join(e?"; ":";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let n=i?": ":":";return $.isObj(e)?b.map(e,(e,r)=>this.castOption(r,e,t,i)).join(i?"; ":";"):$.str(t)+n+Kt.casted(e,!1)}static parseOptions(t){if($.isEmpty(t))return{};let e=t.matchAll(qt.entry);if(null==e)return{};const[r,i]=[Kt.keyed,Kt.parsed];return b.reduce(Array.from(e),(t,{groups:e})=>w.set(t,r(e.key),i(e.val)),{})}}const Gt=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Ut{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),b.each(Gt,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const Jt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class zt{static filesize(t,e=1){$.isNum(t)||(t=$.num(t,0));let r=r=>p.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<Jt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+Jt[e];return r(Jt.length)}}const _t=[Lt,Xt,Bt,Ut,zt];class Zt extends(z(_t)){static extend(t){t.call({},this)}}const Kt=Zt;class Qt{static has(t){return w.has(this.$data,b.first(t))}static set(t,e){let[r,i]=[null,b.first(t)];w.has(this.$data,i)&&(r=w.get(this.$data,i)),$.isEqual(r,e)||(w.set(this.$data,i,e),E.fire("store:"+i,e,i))}static unset(t){w.unset(this.$data,[...b.first(t)])}static get(t,e=null,r=!1){let i=b.first(t);if(!w.has(this.$data,i)&&!r)return e;w.has(this.$data,i)&&r&&w.set(this.$data,i,e);let n=w.get(this.$data,i,e);return $.isObj(n)?w.clone(n):n}static find(t,e,r=null){let i=b.first(t);if(!1===w.has(this.$data,i))return r;if(!1===w.has(e,"id"))return r;let n=b.findIndex(this.get(i),{id:e.id});return-1===n?r:this.get(i+"."+n)}static replace(t,e){let r=b.first(t);if(!1===w.has(this.$data,r))return;if(!1===w.has(e,"id"))return;let i=b.findIndex(this.get(r),{id:p.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,b.merge(this.get(t,[]),e))}static remove(t,...e){this.set(t,b.diff(this.get(t,[]),e))}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Qt,"$data",{});const Vt=Qt;class te{static set(t,e){this.$routes[t]=e}static get(t,e=null,r=null){let i=t;return/^https?:\/\//.test(i)||(i=this.$routes[t]||t),w.each(e,(t,e)=>{i=i.replace(new RegExp("{"+e+"}","g"),t)}),$.isEmpty(r)||(i+="?"+Kt.castParams(r)),i}static goto(t,e=null,r=null){window.location.href=this.get(t,e,r)}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(te,"$routes",{});const ee=te,re=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>$[e](...t)}}),ie=new Proxy({},{get:function(t,e){return console.warn(`Event.${e} is deprecated, use Signal.${e}() instead.`),(...t)=>E[e](...t)}}),ne=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),A.make()};return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pi=e():t.pi=e()}(self,()=>(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};function r(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.r(e),t.d(e,{Any:()=>re,Arr:()=>b,Cookie:()=>B,Data:()=>Vt,Dom:()=>Ft,Event:()=>ie,For:()=>Kt,Hash:()=>A,Locale:()=>C,Mix:()=>$,Now:()=>ct,Num:()=>p,Obj:()=>w,Route:()=>ee,Run:()=>n,Signal:()=>E,Str:()=>u,UUID:()=>ne,browser:()=>U,device:()=>J,go:()=>G,trait:()=>z});class i{static interval(t,e=0){const r=setInterval(()=>{t()},e);return()=>clearInterval(r)}static clear(t){return $.isArr(t)?b.each(t,t=>this.clear(t),this):$.isFunc(t)?(t(),this):(clearTimeout(t),clearInterval(t),this)}static tryin(t){try{t()}catch(t){}return this}static wait(t,e=0,r=500){let i,n;return n=setTimeout(()=>{this.clear([i,n])},e*r),i=setInterval(()=>{t()&&this.clear([n,i])},e),()=>clearInterval(i)}static frame(t){const e=requestAnimationFrame(()=>{t()});return()=>cancelAnimationFrame(e)}static async(t){const e=setTimeout(()=>{t()});return()=>clearTimeout(e)}static delay(t,e=0){let r=setTimeout(()=>{t()},e);return()=>clearTimeout(r)}static debounce(t,e=100){let r=null;return(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{this.frame(()=>t(...i))},e)}}static throttle(t,e=100){let r,i=null;return(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{r=!1},e),r||(this.frame(()=>t(...n)),r=!0)}}static framerate(t,e=30,r=!0){let i,n=0,s=1e3/e;const o=(...e)=>{if(clearTimeout(i),Date.now()-n<=s)return r&&(i=setTimeout(o,s+1));this.frame(()=>t(...e)),n=Date.now()};return o}static framebuffer(t,e,r=1e3){const i={key:e,cb:t,priority:r,args:[],active:!1};return b.add(this.$buffer,i),(t,...e)=>{/^drag/.test(t.type)&&t.preventDefault(),w.assign(i,{args:[t,...e],active:!0}),this.runFramebuffer()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{this.runFramebuffer()},50),Date.now()-this.$timer<50)return;this.$idler&&clearTimeout(this.$idler),this.$timer=Date.now();let t=b.filter(this.$buffer,{active:!0});0!==t.length&&(t=b.sort(t,"priority"),b.each(t.reverse(),t=>{t.cb(...t.args),t.active=!1}))}}r(i,"$idler",null),r(i,"$timer",0),r(i,"$buffer",[]);const n=i;var s;function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function l(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class a{static get(t,e){return $.isStr(t)||(t=$.str(t)),$.isInt(e)&&(e=$.int(e)),t.charAt(e)}static set(t,e,r=""){return $.isStr(t)||(t=$.str(t)),$.isInt(e)&&(e=$.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){$.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){$.isNull(r)&&(r=t);let i=this.range(r,e);return null===i?null:this.slice(t,...i)}static match(t,e,r=null){let i=$.str(t).match(e);return $.isEmpty(i)?[]:$.isFunc(r)?r(i):i}static regex(t){return $.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return $.str(t).toUpperCase()}static ucfirst(t){return $.str(t).charAt(0).toUpperCase()+t.slice(1)}static lc(t){return $.str(t).toLowerCase()}static lcfirst(t){return $.str(t).charAt(0).toLowerCase()+t.slice(1)}static cc(t){return b.each(Kt.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return Kt.slugify(t)}static sc(t){return Kt.slugify(t).replace("-","_")}static pc(t){return b.each(Kt.slugify(t).split("-"),t=>this.ucfirst(t)).join("")}static has(t,e){return-1!==this.lc(t).indexOf(this.lc(e))}static range(t,e,r=null){let i=$.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return $.str(t).slice(e,r)}static string(t,e="-",r=!1){return $.isEmpty(t)?e:(t=$.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return $.isEmpty(t)?i:$.bool(t)?e:r}static number(t,e=null,r=null,i={}){return $.isNum(t)?(null==r&&(r=C.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({maximumFractionDigits:12},i),null!=e&&(i.minimumFractionDigits=e,i.maximumFractionDigits=e),$.num(t).toLocaleString(r,i)):$.str(t)}static integer(t,e=0,r="0"){return $.isNum(t)?($.isInt(t)||(t=$.int(t)),t=$.int(t),e?$.str(t).padStart(e,r):$.str(t)):$.str(t)}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return $.isDate(t)||(t=ct.make(t)),t.valid()?t.format(e):r}static date(t,e="YYYY-MM-DD",r="-"){return this.datetime(t,e,r)}static time(t,e="HH:mm:ss",r="-"){return this.datetime(t,e,r)}static objectify(t,e="options",r=!1){return $.isRef(t)?t:("params"===e&&(t=Kt.parseParams(t)),"options"===e&&(t=Kt.parseOptions(t)),$.isRef(t)||(t=JSON.parse(t)),r?$.vals(t):t)}static stringify(t,e="options"){return $.isStr(t)?t:"params"===e?Kt.castParams(t):"options"===e?Kt.castOptions(t):JSON.stringify(t)}}l(a,"upper",(s=a).uc),l(a,"lower",s.lc),l(a,"camelcase",s.cc),l(a,"kebabcase",s.kc),l(a,"snakecase",s.sc),l(a,"pascalcase",s.pc),a.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),u.regex(...t)),a.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),u.pc(...t)),a.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),Kt.slugify(...t)),a.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),Kt.castOptions(...t)),a.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),Kt.parseOptions(...t)),a.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),Kt.castParams(...t)),a.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),Kt.parseParams(...t)),a.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),Kt.filesize(...t)),a.real=()=>{console.error("Str.real() is not implemented anymore.")},a.array=()=>{console.error("Str.array() is not implemented anymore.")};const u=a;function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class f{static fixed(t,e=2){return $.isNum(t)||(t=$.num(t)),t.toFixed(e)}static float(t){return $.isNum(t)||(t=$.num(t)),parseFloat(t)}static int(t){return $.isNum(t)||(t=$.num(t)),parseInt(t)}static ceil(t){return $.isNum(t)||(t=$.num(t)),Math.ceil(t)}static floor(t){return $.isNum(t)||(t=$.num(t)),Math.floor(t)}static round(t){return $.isNum(t)||(t=$.num(t)),Math.round(t)}static minmax(t,e=0,r=Number.MAX_SAFE_INTEGER){return(t=$.num(t))<e&&(t=r),t>r&&(t=e),$.num(t)}static combine(t){return b.reduce(t,(t,e)=>t+e,0)}static subtract(t){return b.reduce(t,(t,e)=>t-e,0)}static decade(t){return $.isNum(t)||(t=$.num(t)),10*Math.floor(t/10)}static matrix(t,e=[]){$.isNum(t)||(t=$.num(t));let r=0;for(let i=20;i>=0;i--)t>=(r=Math.pow(2,i))&&(e.push(r),t-=r);return e}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[h(h({},i),t),h(h({},i),e)];let n=Math.PI*this.float(t.lat)/180,s=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(n)*Math.sin(s),Math.cos(n)*Math.cos(s)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}f.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),u.number(t,e[2]||null)),f.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),A.number(...t));const p=f;var m;function g(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class y{static all(t){return $.isArr(t)?t:[t]}static get(t,e,r=null){return $.isArr(t)?t&&t[e]?t[e]:r:t}static set(t,e,r){return this.splice(t,e,1,r)}static unset(t,e){return this.splice(t,e,1)}static prev(t,e){return $.isEmpty(t)||!$.isArr(t)?0:e-1<0?t.length-1:e-1}static next(t,e){return $.isEmpty(t)||!$.isArr(t)||e+1>t.length?0:e+1}static make(t,e=null){let r=new Array(t);null==e&&(e=t=>t);for(let i=0;i<t;i++)r[i]="function"==typeof e?e(i):e;return r}static has(t,e){if(!$.isPrim(e))return-1!==this.findIndex(t,e);return $.isRef(t)||(t=[t]),$.isArr(t)||(t=$.vals(t)),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return $.keys(e)}static lengths(t,...e){let r=t.length;for(let t=0;t<e.length;t++)if(e[t].length!==r)return!1;return!0}static first(t,e=null){return this.get(t,0,e)}static second(t,e=null){return this.get(t,2,e)}static third(t,e=null){return this.get(t,2,e)}static last(t,e=null){return this.get(t,t.length-1,e)}static each(t,e,r=null){if($.isObj(t))return this.eachObj(t,e,r);null==t&&(t=[]);let i=new Array(t.length);for(let r=0;r<t.length;r++)i[r]=e(t[r],r);return null!=r?r:i}static eachObj(t,e,r=null){if($.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=$.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[$.isArr(t),$.keys(t)],n=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],n(r));return t}static recursive(t,e,r,i=[]){let n=t=>i=>this.recursive(i,e,r,t);return $.isArr(t)?this.map(t,n(i)):($.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],null==t||($.isObj(t[e])&&(t[e]=n(i)(t[e])),$.isArr(t[e])&&(t[e]=this.map(t[e],n(i)))),t)}static cascade(t,e,r,i=[],n=[]){let s=t=>i=>this.cascade(i,e,r,t,n);return $.isArr(t)?(this.each(t,s(i)),n):($.isObj(t)&&n.push(r(t,i)),i=[...this.clone(i),t],null==t||($.isObj(t[e])&&n.push(s(i)(t[e])),$.isArr(t[e])&&this.each(t[e],s(i))),n)}static cascadeFind(t,e,r){if(null==t)return null;let i=null;return this.cascade(t,e,(t,e)=>{null==i&&(i=((t,e)=>r(t,e)?[...e,t]:null)(t,e))}),i}static cascadeMap(t,e,r){let i={};return null==t?i:(i=this.cascade(t,e,(t,e)=>({[t[r]]:[...this.extract(e,r),t[r]]})),w.assign(...i))}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!$.isEmpty(t)),$.keys(t).filter(r=>$.isFunc(e)?e.call({},t[r],r):$.isRef(e)?this.includes(t[r],e):e===t[r]))}static filterRemove(t,e=null){if(null==t)return t;let r=this.filterIndex(t,e);return 0===r.length?t:this.splices(t,r)}static filter(t,e=null){return null==t?[]:(null==e&&(e=t=>!$.isEmpty(t)),$.vals(t).filter((r,i)=>$.isFunc(e)?e.call({},r,i):$.isRef(e)?this.includes(r,e):e===t[i]))}static findIndex(t,e=null,r=-1){if(null==t)return r;null==e&&(e=t=>!$.isEmpty(t));for(let r=0;r<t.length;r++){if($.isFunc(e)&&e.call({},t[r],r))return r;if($.isRef(e)&&this.includes(t[r],e))return r;if(e===t[r])return r}return r}static find(t,e=null,r=null){let i=this.findIndex(t,e);return-1===i?r:t[i]}static sort(t,e=null){return $.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=$.keys(t).sort((r,i)=>e.call({},t[r],t[i])),i=[];for(const e of r)i.push(t[e]);return i}static sortDeep(t,e){let r=t=>w.get(t,e),i=$.keys(t).sort((e,i)=>$.compare(r(t[e]),r(t[i]))),n=[];for(const e of i)n.push(t[e]);return n}static sortPrim(t){let e=$.keys(t).sort((t,e)=>$.compare(t,e)),r=[];for(const i of e)r.push(t[i]);return r}static merge(t,...e){return t.concat(...e)}static prepend(t,...e){return t.unshift(...e),t}static append(t,...e){return t.push(...e),t}static add(t,e,r=null){return null==r&&(r=e),-1!==this.findIndex(t,r)||t.push(e),t}static replace(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1!==i&&this.splice(t,i,1),t.push(e),t}static remove(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i||this.splice(t,i,1),t}static toggle(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i?(t.push(e),t):(this.splice(t,i,1),t)}static insert(t,e,r){return this.splice(t,e,0,r),t}static slice(t,e,r=1){return t.slice($.num(e),r)}static splice(t,e,r=1,...i){return t.splice($.num(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if($.isPrim(t))return t;if($.isObj(t))return w.clone(t);if(!$.isArr(t))return t;let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.clone(t[r]);return e}static diff(...t){return t.reduce((t,e)=>t.filter(t=>!e.includes(t)))}static isect(...t){return t.reduce((t,e)=>t.filter(t=>e.includes(t)))}static extract(t,e){let r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=w.get(t[i],e);return r}static reduce(t,e,r){return $.vals(t).reduce(e,r)}static chunk(t,e=10){let r=[];for(let i=0;i<t.length;i+=e)r.push(t.slice(i,i+e));return r}static includes(t,e){if($.isObj(e))return w.includes(t,e);if(!$.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let n=0;!1===r&&n<i;n++)r||=this.has(t,e[n]);return r}static contains(t,e){let r=!0;for(let i of $.vals(e))r&&=-1!==$.vals(t).indexOf(i);return r}static matches(t,e){if($.isObj(e))return w.matches(t,e);if(!$.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let n=0;!0===r&&n<i;n++)r&&=this.has(t,e[n]);return r}}g(y,"diffrence",(m=y).diff),g(y,"intersect",m.isect),y.removeIndex=(...t)=>(console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),y.unset(...t)),y.sortString=(...t)=>(console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),y.sortPrim(...t)),y.push=(...t)=>(console.warn("Arr.push() is deprecated, use Arr.append() instead."),y.append(...t)),y.concat=(...t)=>(console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),y.merge(...t)),y.equal=(...t)=>(console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),y.matches(...t));const b=y;class v{static keyoptim(t,e=!1,r=null){return null===r&&(r=$.isStr(t)),!r&&e&&(t=t.join(".")),r||e?t.split("."):t}static has(t,e,r=!1){if(null==t||null==e)return!1;"number"==typeof e&&(e=$.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return void 0!==t[e];e=this.keyoptim(e,r,i);let[n,s,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[n];for(;null!=t&&s<o;)t=t[e[s++]];return null!=t&&void 0!==t[n]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=$.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e];let s=0,o=(e=this.keyoptim(e,i,n)).length;if(0===o)return r;for(;null!=t&&s<o;)t=t[e[s++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=$.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,n)).length)return t;let s=t;for(let t,i,n=0;n<e.length;n++)t=i=String(e[n]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==s[t]&&(s[t]=t===i?{}:[]),t!==i&&b.insert(e,n+1,s[t].length),e.length-1===n&&(s[t]=r),s=s[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=$.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return delete t[e],t;e=this.keyoptim(e,r,i);let[n,s,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&s<o;)l=l[e[s++]];return null==l||delete l[n],t}static empty(t,e){return $.isEmpty(this.get(t,e))}static remove(t,e){if(!$.isArr(e))return t;for(let r of e)this.unset(t,r);return t}static each(t,e,r=null){let i={};for(let r of $.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of $.keys(t))t[r]=e(t[r],r);return t}static filterIndex(t,e=null){return b.filterIndex(t,e)}static filter(t,e=null){let r={};for(let i of this.filterIndex(t,e))r[i]=t[i];return r}static flatten(t,e="",r={}){if("object"!=typeof t)return r[e]=t;""!==e&&(e+=".");for(let i of $.keys(t))this.flatten(t[i],e+i,r);return r}static flattenForm(t,e="",r={}){if("object"!=typeof t)return r[e]=t;let i=t=>e?`${e}[${t}]`:t;for(let e of $.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return b.each($.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if($.isPrim(t))return t;if($.isArr(t))return b.clone(t);if(!$.isObj(t))return t;let r={};for(let e of $.keys(t))r[e]=this.clone(t[e]);return null!=e?this.assign(r,e):r}static pluck(t,e,r=null){let i=this.get(t,e,r);return this.unset(t,e),i}static only(t,e,r=null){let i={};return this.each(t,(t,r)=>{b.has(e,r)&&(i[r]=t)}),null==r?i:this.assign(i,r)}static except(t,e,r=null){let i={};return this.each(t,(t,r)=>{b.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if($.isArr(e))return b.includes(t,e);if(!$.isObj(e))return t===e;let r=$.keys(e),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i=this.includes(t[r[s]],e[r[s]]);return i}static matches(t,e){if($.isArr(e))return b.matches(t,e);if(!$.isObj(t))return t===e;let r=b.unique([...$.keys(e),...$.keys(t)]),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i&&=this.matches(t[r[s]],e[r[s]]);return i}static sort(t,e){let r=b.sort(t,e);return b.each(r,(e,r)=>{t[r]._key=r}),r}}v.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Obj.sort() instead."),v.sort(...t)),v.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),$.vals(...t)),v.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),b.find(...t)),v.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),b.findIndex(...t));const w=v;var O;function D(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const j={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class P{static isEmpty(t){return null==t||("string"==typeof t?""===t:"number"!=typeof t&&("boolean"!=typeof t&&(this.isArr(t)?0===t.length:0===this.len(t))))}static isNull(t){return null===t}static isUndef(t){return void 0===t}static isNix(t){return null==t}static isPrim(t){return"string"==typeof t||"number"==typeof t}static isStr(t){return"string"==typeof t}static isNum(t){return"number"==typeof t||!!this.isStr(t)&&/^-?[0-9]+(\.[0-9]+)?$/.test(t)}static isInt(t){return!!this.isNum(t)&&(this.isStr(t)?/^-?[0-9]+$/.test(t):parseInt(t)===parseFloat(t))}static isBool(t){return"boolean"==typeof t||!!this.isStr(t)&&/^(true|false)$/.test(t)}static isFunc(t){return"function"==typeof t}static isRef(t){return null!=t&&"object"==typeof t}static isObj(t){return null!=t&&("object"==typeof t&&t.constructor===Object)}static isArr(t){return null!=t&&("object"==typeof t&&t.constructor===Array)}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||j.iso.test(t)}static isDate(t){return t instanceof Date||/^\d{4}-\d{2}-\d{2}$/.test(t)}static isTime(t){return t instanceof Date||/^\d{2}:\d{2}:\d{2}$/.test(t)}static isEqual(t,e){return t instanceof Node?t.isEqualNode(e):this.isRef(t)?Object.is(t,e):t===e}static iter(t){if(null==t)return{};let e={};for(const[r,i]of t.entries())e[r]=i;return e}static keys(t){return null==t?[]:(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!G().chrome)return Object.values(t);let e=this.keys(t);for(let r=0;r<e.length;r++)e[r]=t[e[r]];return e}static nodes(t){return Array.prototype.slice.call(t)}static props(t,e=[]){let r={};for(const i of Object.getOwnPropertyNames(t))e.length&&!b.has(e,i)&&(r[i]=t[i]);return r}static extend(t,e,r=["constructor"]){if(null==e)return{};let i=Object.getPrototypeOf(e);for(const n of Object.getOwnPropertyNames(e)){if(!r.length||b.has(r,n))continue;let s=Object.getOwnPropertyDescriptor(i,n);s||(s=Object.getOwnPropertyDescriptor(e,n)),s||s.get||s.set||(t[n]=e[n]),s&&(s.get||s.set)&&Object.defineProperty(t,n,s)}return t}static class(t,e=[]){return e=b.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=b.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return w.each(w.flattenForm(t),(t,r)=>{e.append(r,t)}),e}static each(t,e){if(!this.isRef(t))throw new Error("Iterate non object");for(let r of $.keys(t))e(t[r],r);return this}static len(t){return this.isArr(t)?t.length:this.isRef(t)?this.keys(t).length:this.string(t).length}static compare(t,e){return C.collator().compare(t,e)}static null(t,e=null){return"null"===t||this.isEmpty(t)?null:e}static arr(t){return this.isArr(t)?t:this.isStr(t)?(t=t.replace(/^@?\[?(.*?)]$/g,"$1"),b.each(t.split(","),t=>t.replace(/(^"|^'|'$|"$)/g,""))):[t]}static str(t){return this.isNix(t)||void 0===t.toString?String(t):t.toString()}static num(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),t):e}static int(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),Math.round(t)):e}static bool(t){return this.isRef(t)?!!this.vals(t).length:this.isNum(t)?0!==this.num(t):/^(true|yes)$/i.test(t)}}D(P,"isPrimitive",(O=P).isPrim),D(P,"isString",O.isStr),D(P,"isNumber",O.isNum),D(P,"isInteger",O.isInt),D(P,"isBoolean",O.isBool),D(P,"isFunction",O.isFunc),D(P,"isReference",O.isRef),D(P,"isObject",O.isObj),D(P,"isArray",O.isArr),D(P,"isIterable",O.isIter),D(P,"length",O.len),D(P,"array",O.arr),D(P,"string",O.str),D(P,"number",O.num),D(P,"integer",O.int),D(P,"boolean",O.bool),P.global=(...t)=>(console.warn("Mix.global() is deprecated, use go() instead."),G(...t)),P.isPlain=(...t)=>(console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),$.isObj(...t)),P.float=(...t)=>(console.warn("Mix.float() is deprecated, use Mix.num() instead."),$.num(...t)),P.delay=(...t)=>(console.warn("Mix.delay() is deprecated, use Run.delay() instead."),n.delay(...t)),P.async=(...t)=>(console.warn("Mix.async() is deprecated, use Run.async() instead."),n.async(...t)),P.debounce=(...t)=>(console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),n.debounce(...t)),P.throttle=(...t)=>(console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),n.throttle(...t)),P.framerate=(...t)=>(console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),n.framerate(...t)),P.convertString=(...t)=>(console.warn("Mix.convertString() is deprecated, use Str.string() instead."),u.string(...t)),P.convertDatetime=(...t)=>(console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),u.date(...t)),P.convertBool=(...t)=>(console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),u.boolean(...t)),P.convertBoolean=(...t)=>(console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),u.boolean(...t));const $=P;const x=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],M=["8","9","a","b"],N=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class S{static radix(t=60,e=null){return(e||this.RADIX)[this.number(t-1)]}static number(t=1024,e=0){return Math.floor(Math.random()*(t-e+1))+e}static make(t=6,e=62,r={}){let i="";for(let r=0;r<t;r++)i+=this.radix(e);for(const t of Object.keys(r))i=u.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?this.radix(M.length,M):this.radix(x.length,x);return e.substring(0,8)+"-"+e.substring(8,12)+"-"+t+e.substring(12,15)+"-"+e.substring(15,19)+"-"+e.substring(19,31)}static password(t=24,e=null){let r=[...this.RADIX,...e||N],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var Y,k,T;Y=S,T=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],(k=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(k="RADIX"))in Y?Object.defineProperty(Y,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):Y[k]=T;const A=S;class H{static bind(t,e,r={},i=!1){const n=[e,r,i];return $.isArr(t)?b.each(t,t=>this.bind(t,...n),this):($.isPrim(r)&&(r={id:r}),this.$events=b.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){const r=[e];return $.isArr(t)?b.each(t,t=>this.unbind(t,...r),this):($.isPrim(e)&&(e={id:e}),b.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return b.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){const r=[e];if($.isArr(t))return b.each(t,t=>this.pause(t,...r),this);let i=b.find(this.$events,{event:t,options:e});return null!=i&&(i.paused=!0),this}static unpause(t,e={}){if($.isArr(t))return b.each(t,t=>this.pause(t,...arguments),this);let r=b.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!1),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(H,"$events",[]);const E=H;function I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class F{static has(t=void 0){return void 0===t||w.has(F.$text,t)}static get(t=void 0,e=null){return void 0===t?F.$text:w.get(F.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?F.$text=t:w.set(F.$text,t,e)}static code(t=null){return $.isNull(t)?$.isNull(C.$code)?(C.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),C.$code):C.$code:C.$code=t}static collator(){return null!=C.$sort||(C.$sort=new Intl.Collator(C.code(),{numeric:!0,sensitivity:"base"})),C.$sort}static replace(t,e=null){return null==e||w.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=w.get(F.$text,t,t),C.replace(t,e)}static choice(t,e=0,r={}){return t=w.get(F.$text,t,t),void 0===r.count&&(r.count=e),t=C.countpick(t.split("|"),e),C.replace(t,r)}static countpick(t,e=0){let r=t.length;return 3===r&&0===e?t[0]:3===r&&1===e?t[1]:3===r&&e>=2?t[2]:2===r&&1===e?t[0]:2===r&&1!==e?t[1]:t[0]}}I(F,"$text",{}),I(F,"$sort",null),I(F,"$code","en");const C=F;function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach(function(e){W(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function W(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const X={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class q{static global(){return null==globalThis.document?"":globalThis.document.cookie||""}static parse(t=!1){if(!t&&this.$cookie)return this.$cookie;this.$cookie={};let e=this.global().matchAll(X.entry);if(null==e)return this.$cookie;return b.each(Array.from(e),({groups:t})=>{this.$cookie[t.key]=t.value.replaceAll("{:}",";")}),this.$cookie}static get(t,e=null,r="string"){return this.$cookie||this.parse(),null==this.$cookie[t]?e:/^bool(ean)?$/.test(r)||/^num(ber)?$/.test(r)||/^int(eger)?$/.test(r)?$.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?Kt.parseOptions(this.$cookie[t]):$.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof ct||(r=ct.make(r||"+7 days")),i=L({expires:r.toUTC(),path:"/"},i),$.isRef(e)&&(e=Kt.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let n=t+"="+$.str(e).replaceAll(";","{:}");return b.each(i,(t,e)=>{n+=`;${e}=${t}`}),globalThis.document.cookie=n,this}static forget(t,e={}){e=L({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return b.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}W(q,"$cookie",void 0);const B=q;function G(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function U(){const t=G();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.safari&&(r.safari=/Safari\//.test(e)),null==r.firefox&&(r.firefox=/Firefox\//.test(e)),null==r.edge&&(r.edge=/Edge\//.test(e)),null==r.chrome&&(r.chrome=/Chrome\//.test(e)),t.piuag=r}function J(){const t=G();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.win&&(r.win=/Windows/.test(e)),null==r.osx&&(r.osx=/Macintosh|Mac OS X/.test(e)),null==r.gnu&&(r.gnu=/Linux/.test(e)),null==r.ios&&(r.ios=/iPhone|iPad|iPod/.test(e)),null==r.oid&&(r.oid=/Android/.test(e)),t.piudv=r}function z(t){const e=t[0];return b.each(t.slice(1),t=>{b.each($.class(t),(t,r)=>{e[r]=t}),b.each($.proto(t),(t,r)=>{e.prototype[r]=t})}),e}const _={second:/([+-])([0-9]+)\s?seconds?/i,minute:/([+-])([0-9]+)\s?minutes?/i,hour:/([+-])([0-9]+)\s?hours?/i,date:/([+-])([0-9]+)\s?days?/i,month:/([+-])([0-9]+)\s?months?/i,year:/([+-])([0-9]+)\s?years?/i};class Z{static test(t){return t instanceof Date}get(t){return"time"===t?this.value.getTime():/^seconds?$/i.test(t)?this.value.getSeconds():/^minutes?$/i.test(t)?this.value.getMinutes():/^hours?$/i.test(t)?this.value.getHours():/^days?$/i.test(t)?this.value.getDay():/^dates?$/i.test(t)?this.value.getDate():/^months?$/i.test(t)?this.value.getMonth()+1:/^years?$/i.test(t)?this.value.getFullYear():this}set(t,e){if(null==t)return this;$.isNum(t)||(t=$.int(t));let r=this.value.getDay();return"day"===e&&(t=t+1-(r||7)),"time"===e&&this.value.setTime(t),/^seconds?$/i.test(e)&&this.value.setSeconds(t),/^minutes?$/i.test(e)&&this.value.setMinutes(t),/^hours?$/i.test(e)&&this.value.setHours(t),/^days?$/i.test(e)&&this.add(t,"date"),/^dates?$/i.test(e)&&this.value.setDate(t),/^months?$/i.test(e)&&this.value.setMonth(t-1),/^years?$/i.test(e)&&this.value.setFullYear(t),this}time(t=null){return null==t?this.get("time"):this.set(t,"time")}second(t=null){return null==t?this.get("second"):this.set(t,"second")}minute(t=null){return null==t?this.get("minute"):this.set(t,"minute")}hour(t=null){return null==t?this.get("hour"):this.set(t,"hour")}day(t=null){return null==t?this.get("day"):this.set(t,"day")}date(t=null){return null==t?this.get("date"):this.set(t,"date")}month(t=null){return null==t?this.get("month"):this.set(t,"month")}year(t=null){return null==t?this.get("year"):this.set(t,"year")}shortyear(){return this.get("year").toString().slice(-2)}add(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)+$.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-$.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return $.isEmpty(t)||w.each(_,(e,r)=>{u.match(t,e,([t,e,i])=>{"+"===e?this.add(i,r):this.sub(i,r)})}),this}apply(t,e="YYYY-MM-DD HH:mm:ss",r=[]){t=ct.make(t,e);for(const e of r)this.set(t.get(e),e);return this}applyDate(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["date","month","year"])}applyTime(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["hour","minute","second"])}}Z.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},Z.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},Z.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},Z.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},Z.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},Z.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},Z.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},Z.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},Z.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},Z.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},Z.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},Z.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},Z.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},Z.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},Z.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},Z.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const K={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm",LT:"HH:mm",LTS:"HH:mm:ss",LTSD:"DD/MM/YYYY HH:mm:ss"},Q={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class V{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in Q)t=u.replace(t,Q[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return $.isTime(t)&&(e="HH:mm:ss"),$.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):$.isIsoDate(t)?(this.value=new Date(t),this):this.parseFormat(t,e)}parseFormat(t,e){if(!this.isParsable(t,e))return this.value=new Date(NaN),this;for(const r in Q)this.set(u.extract(t,Q[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return w.has(K,t)&&(t=C.$text[t]??K[t]),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("dddd",()=>this.human("day"))).replace("ddd",()=>this.human("day",3))).replace("dd",()=>this.human("day",2))).replace("MMMM",()=>this.human("month"))).replace("MMM",()=>this.human("month",3))).replace("YYYY",()=>u.integer(this.year(),4))).replace("MM",()=>u.integer(this.month(),2))).replace("DD",()=>u.integer(this.date(),2))).replace("HH",()=>u.integer(this.hour(),2))).replace("mm",()=>u.integer(this.minute(),2))).replace("ss",()=>u.integer(this.second(),2))).replace("YY",()=>u.integer(this.shortyear(),2))).replace("X",()=>u.integer(this.time()))).replace("x",()=>u.integer(this.time()/1e3))}code(t="X"){return $.int(this.format(t))}}class tt{before(t=null,e="x"){return this.code(e)<ct.make(t).code(e)}beforeDate(t=null,e="YYYYMMDD"){return this.before(t,e)}beforeTime(t=null,e="HHmmss"){return this.before(t,e)}after(t=null,e="x"){return this.code(e)>ct.make(t).code(e)}afterDate(t=null,e="YYYYMMDD"){return this.after(t,e)}afterTime(t=null,e="HHmmss"){return this.after(t,e)}equal(t=null,e="x"){return t instanceof ct||(t=ct.make(t)),this.code(e)===t.clone().code(e)}equalDate(t=null,e="YYYYMMDD"){return this.equal(t,e)}equalTime(t=null,e="HHmmss"){return this.equal(t,e)}between(t=null,e=null,r="YYYYMMDD"){let i=[ct.make(t),ct.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class et{grid(t="day"){if(/^seconds?$/i.test(t))return this.getSecondsGrid();if(/^minutes?$/i.test(t))return this.getMinutesGrid();if(/^hours?$/i.test(t))return this.getHoursGrid();if(/^days?$/i.test(t))return this.getDaysGrid();if(/^dates?$/i.test(t))return this.getDatesGrid();if(/^months?$/i.test(t))return this.getMonthsGrid();if(/^years?$/i.test(t))return this.getYearsGrid();if(/^decades?$/i.test(t))return this.getDecadesGrid();throw new Error(`Invalid grid scope type "${t}".`)}getSecondsGrid(t=1){return null==t&&(t=1),b.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),b.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),b.make(24/t,e=>this.clone().hour(e*t))}getDaysGrid(){let t=[this.first("date").first("day"),this.last("date").last("day")];return t[0].range(t[1],"date")}getDatesGrid(){let t=[this.first("date"),this.last("date")];return t[0].range(t[1],"date")}getMonthsGrid(){let t=[this.first("month"),this.last("month")];return t[0].range(t[1],"month")}getYearsGrid(){let t=[this.first("year"),this.clone().last("year")];return t[0].range(t[1],"year")}getDecadesGrid(){let t=[this.first("decade"),this.clone().last("decade")];return t[0].range(t[1],"decade")}}et.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},et.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},et.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},et.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},et.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},et.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class rt{prev(t="date"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().sub(10,"year"):this.clone().sub(1,t)}next(t="day"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().add(10,"year"):this.clone().add(1,t)}prevSecond(){return this.prev("second")}nextSecond(){return this.next("second")}prevMinute(){return this.prev("minute")}nextMinute(){return this.next("minute")}prevHour(){return this.prev("hour")}nextHour(){return this.next("hour")}prevDate(){return this.prev("date")}nextDate(){return this.next("date")}prevMonth(){return this.prev("month")}nextMonth(){return this.next("month")}prevYear(){return this.prev("year")}nextYear(){return this.next("year")}prevDecade(){return this.prev("decade")}nextDecade(){return this.next("decade")}first(t="date"){if(/^seconds?$/i.test(t))return this.firstSecond();if(/^minutes?$/i.test(t))return this.firstMinute();if(/^hours?$/i.test(t))return this.firstHour();if(/^days?$/i.test(t))return this.firstDay();if(/^dates?$/i.test(t))return this.firstDate();if(/^months?$/i.test(t))return this.firstMonth();if(/^years?$/i.test(t))return this.firstYear();if(/^decades?$/i.test(t))return this.firstDecade();throw new Error(`Invalid first scope type "${t}".`)}last(t="date"){if(/^seconds?$/i.test(t))return this.lastSecond();if(/^minutes?$/i.test(t))return this.lastMinute();if(/^hours?$/i.test(t))return this.lastHour();if(/^days?$/i.test(t))return this.lastDay();if(/^dates?$/i.test(t))return this.lastDate();if(/^months?$/i.test(t))return this.lastMonth();if(/^years?$/i.test(t))return this.lastYear();if(/^decades?$/i.test(t))return this.lastDecade();throw new Error(`Invalid last scope type "${t}".`)}firstSecond(){return this.clone().set(0,"second")}lastSecond(){return this.clone().set(59,"second")}firstMinute(){return this.clone().set(0,"minute")}lastMinute(){return this.clone().set(59,"minute")}firstHour(){return this.clone().set(0,"hour")}lastHour(){return this.clone().set(23,"hour")}firstDay(){return this.clone().set(0,"day")}lastDay(){return this.clone().set(6,"day")}firstDate(){return this.clone().set(1,"date")}lastDate(){return this.clone().next("month").set(0,"date")}firstMonth(){return this.clone().set(1,"month")}lastMonth(){return this.clone().set(12,"month")}nthYear(t=0){let e=10*Math.floor(this.year()/10);return this.clone().set(e+t,"year")}firstYear(){return this.nthYear(0)}lastYear(){return this.nthYear(9)}nthDecade(t=0){let e=100*Math.floor(this.year()/100);return this.clone().set(e+10*t,"year")}firstDecade(){return this.nthDecade(0)}lastDecade(){return this.nthDecade(9)}}class it{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],n=[this.clone(),ct.make(t)];n[0].afterDate(n[1])&&(n=n.reverse()),n[1].add(1,e);for(let t=n[0];!t.equal(n[1],r);t=t.next(e))b.append(i,t);return i}}it.prototype.getDatesRange=function(...t){return console.warn("Now.getDatesRange() is deprecated, use Now.range() instead."),this.range(...t)};const nt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],st=["January","February","March","April","May","June","July","August","September","October","November","December"];class ot{human(t="day",e=null){return/^days?$/i.test(t)?this.getHumanDay(e):/^months?$/i.test(t)?this.getHumanMonth(e):this.get(t)}getHumanDay(t=null){let e=this.day();if(!nt[e])throw new Error(`Invalid day number "${e}".`);let r=C.trans(nt[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.month()-1;if(!st[e])throw new Error(`Invalid month number "${e}".`);let r=C.trans(st[e]);return null!=t&&(r=r.substring(0,t)),r}}function lt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const at=[Z,V,tt,et,rt,it,ot];class ut extends(z(at)){constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){super(),lt(this,"input",null),lt(this,"value",null),"now"===t&&(t=null);let r=t;return t&&t.toDate&&(t=t.toDate()),t instanceof Date||(t=new Date),this.input=t,$.isNix(r)&&(this.input=r),this.value=t,$.isStr(r)&&this.parse(r,e),b.each(ct.init,t=>{t.call(this,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new ct(t,e)}reset(t=null){return null==t&&(t={month:!0,day:!0,time:!0}),t.month&&this.value.setMonth(0),t.day&&this.value.setDate(1),t.time&&this.value.setHours(0,0,0),this}clone(){return new ct(new Date(this.value),null)}valid(){return!isNaN(this.input)&&!isNaN(this.value)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}lt(ut,"init",[]),ut.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const ct=ut;class ht{static filterNodes(t,e=1){return b.filter($.nodes(t),t=>t.nodeType===e)}static getNodePoint(t){t.touches?.[0]&&(t=t.touches[0]);let[e,r]=[null,[t.clientX,t.clientY]];return null!=Ft.doc().elementsFromPoint&&(e=document.elementsFromPoint(r[0],r[1])),null!=Ft.doc().msElementsFromPoint&&(e=document.msElementsFromPoint(r[0],r[1])),e}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=Ft.getNodePoint(e)),$.isArr(r)&&(r=b.first(r)),null==r&&(r=e.target),r.closest(t)}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?Ft.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?Ft.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?Ft.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=$.nodes(this.el.childNodes);return-1===t?r:b.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=Ft.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>Ft.find(e).is(t)),b.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!Ft.find(e).is(t)),b.filter(this.els,t)}find(t){if(null==this.el)return Ft.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return $.isStr(r)&&(r=e.querySelectorAll(t)),Ft.find(r)}get(t=-1){let e=this.els;return-1===t?e:b.get(e,t)}first(t=0){return this.get(t)}last(t=1){return b.get(this.els,this.els.length-t)}each(t){return b.each(this.els,t)}loopParent(t,e=null){null==e&&(e=Ft.win());for(let r=this.el;r&&r!==e;r=r.parentNode)t.call({},r);return this}parent(){let t=this.getNodeParent();return null==t?Ft.find(null):t}child(t=null,e=1){for(let r of this.childs(t,e))return Ft.find(r);return Ft.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:b.filter(r,e=>Ft.find(e).is(t))}closest(t){if(this.el===t)return this.el;for(let e=this;null!=e.el;e=e.getNodeParent())if(e.is(t))return e.el;return null}upnode(t){return Ft.find(this.closest(t))}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return Ft.find(e);return Ft.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return Ft.find(e);return Ft.find(null)}length(){return this.els.length}is(t,e=!1){if(this.el===t)return!0;if(null==this.el)return e;for(let e of this.parent().find(t).get())if(e===this.el)return!0;return!1}matches(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.find(t).get())if(e===this.el)return!0;return!1}empty(){return this.length()<1||null==this.el}visible(){return null!=this.el&&this.el.is(":visible")}above(t){return this.parent().is(t)}inside(t){return null!=this.closest(t)}contains(t){return this.el.contains(t)}}ht.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},ht.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},ht.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},ht.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},ht.prototype.getNot=function(){console.error("Dom.getNot() is not implemented anymore.")};class dt{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class ft{bind(t,e,r,i=null,n=!1,s={}){return $.isPrim(s)&&(s={id:s}),Ft.$events=b.append(Ft.$events,{el:t,event:e,cb:r,selector:i,pause:n,options:s}),t.addEventListener(e,r,s),this}unbind(t,e,r=null,i={}){$.isPrim(i)&&(i={id:i});let n=b.filterIndex(Ft.$events,{el:t,event:e,selector:r,options:i});if(0===n.length)return this;return b.each(n.reverse(),r=>{var i;t.removeEventListener(...(i=Ft.$events[r],[e,i.cb,i.options]))}),b.splices(Ft.$events,n),this}on(t,e,r={},i=!1,n=null){$.isPrim(r)&&(r={id:r});const s=[e,r,i,n];if($.isArr(t))return b.each(t,t=>this.on(t,...s)),this;let o=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,o,n,i,r)}),this}off(t,e=null,r={}){$.isPrim(r)&&(r={id:r});const i=[e,r];return $.isArr(t)?(b.each(t,t=>this.off(t,...i)),this):($.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}optoff(t={}){return n.async(()=>{b.filterRemove(Ft.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),this}once(t,e,r={}){return r.id=A.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},n=!1){return this.on(t,function(t){let i=Ft.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,n,e),this}fire(t,e={}){let r=new CustomEvent(t,{detail:e});return this.each(t=>{t.dispatchEvent(r)}),this}pointerdown(t=1){const e=this.rect(),[r,i]=[e.left+e.width/2,e.top+e.height/2],n=new PointerEvent("pointerdown",{view:window,bubbles:!0,cancelable:!0,buttons:1,clientX:r,clientY:i});return this.each(t=>{t.dispatchEvent(n)}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ft,"$events",[]),ft.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},ft.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},ft.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},ft.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class pt{static make(t,e={}){t instanceof Ft&&(t=t.el),$.isStr(t)&&(t=document.createElement(t)),t=w.assign(t,e);let r=new Ft(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return Ft.find(t).each(t=>{null!=t.prepend&&t.prepend(this.el)}),this}append(t){return this.each(e=>{null!=e.append&&e.append(t)}),this}appendTo(t){return Ft.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class mt{static getDomState(){return document.readyState}static isDomReady(){return"complete"===Ft.getDomState()}static isDomComplete(){let t=Ft.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,s,o]=[A.make(),Ft.find(document),"DOMContentLoaded"],l=()=>{n.delay(t,e),s.off(o,null,{id:i})},a=Ft.isDomReady;return a()?(n.wait(()=>{if(a())return l(),!0},10,r),this):(s.on(o,l,{id:i}),this)}static complete(t,e=0,r=6e3){let i=()=>{n.delay(t,e)},[s,o]=[Ft.find(document),"load"],l=Ft.isDomComplete;return l()?(n.wait(()=>{l()&&i()},10,r),this):(s.on(o,i),this)}isNodeComplete(){return null!=this.el&&(!!this.el.naturalWidth||(!!this.el.naturalHeight||!!this.el.complete))}loaded(t,e=6e3){if(!this.el)return this;let r=this.isNodeComplete;return n.wait(()=>{if(r.call(this))return t(),!0},10,e),this}static required(){console.error("Dom.required() is not implemented anymore.")}}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function yt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(e){bt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function bt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class vt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),$.num(t,0)}rect(t={left:0,top:0,width:0,height:0}){if(!this.el.getBoundingClientRect)return t;const e=this.el.getBoundingClientRect();return null==e?t:e.toJSON()}margin(t=null,e=0){let r=this.computed(),i={top:Ft.num(r.marginTop),right:Ft.num(r.marginRight),bottom:Ft.num(r.marginBottom),left:Ft.num(r.marginLeft)};return null==t?i:w.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:Ft.num(r.paddingTop),right:Ft.num(r.paddingRight),bottom:Ft.num(r.paddingBottom),left:Ft.num(r.paddingLeft)};return null==t?i:w.get(i,t,e)}height(){return null==this.el?0:this.el instanceof Window?this.el.innerHeight:this.el.offsetHeight}clientHeight(){return null==this.el?0:Ft.num(this.computed("height",0))}scrollHeight(){return null==this.el?0:this.el.scrollHeight}innerHeight(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerHeight;let t=this.padding();return this.el.offsetHeight-t.top-t.bottom}realHeight(t={}){let e="auto";return this.actual(()=>e=this.height(),t),e}evaluateHeight(t=null,e=!0){null===(t=Ft.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerHeight()},{display:"none"}),!0===e&&this.style({height:r+"px"}),r}width(){return null==this.el?0:this.el instanceof Window?this.el.innerWidth:this.el.offsetWidth}clientWidth(){return null==this.el?0:Ft.num(this.computed("width",0))}scrollWidth(){return null==this.el?0:this.el.scrollWidth}innerWidth(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerWidth;let t=this.padding();return this.el.offsetWidth-t.left-t.right}realWidth(t={}){let e="auto";return this.actual(()=>e=this.width(),t),e}evaluateWidth(t=null,e=!0){null===(t=Ft.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerWidth()},{display:"none"}),!0===e&&this.style({width:r+"px"}),r}offset(t=null,e=null){let r=this.getOffset(e);return null==t?r:w.get(r,t,0)}offsetTop(t=null){return this.offset("top",t)}offsetBottom(t=null){return this.offset("bottom",t)}offsetLeft(t=null){return this.offset("left",t)}offsetRight(t=null){return this.offset("right",t)}loopOffset(t,e=null){null==e&&(e=Ft.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:Ft.body().scrollWidth-t.left-e,bottom:Ft.body().scrollHeight-t.top-r};return yt(yt({},t),i)}getOffset(t=null){null==t&&(t=Ft.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=Ft.num(t.offsetTop,0),r.left+=Ft.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=Ft.find(t),n={top:0,left:0,bottom:0,right:0};return e=t=>{n.top+=Ft.num(t.offsetTop,0),n.left+=Ft.num(t.offsetLeft,0)},i.loopOffset(e),n=this.calcOffset(n,i.scrollWidth(),i.scrollHeight()),{top:r.top-n.top,bottom:r.bottom-n.bottom,left:r.left-n.left,right:r.right-n.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:w.get(r,t,0)}scrollTop(t=null,e=null){return null==t?this.scroll("top",e):(this.each(e=>{e.scrollTop=t}),this)}scrollLeft(t=null,e=null){return null==t||this.each(e=>{e.scrollLeft=t}),this.scroll("left",e)}getScroll(t=null){null==t&&(t=Ft.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=Ft.num(t.scrollTop||t.pageYOffset||0),r.left+=Ft.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=Ft.num(t.scrollTop||t.pageYOffset||0),i.left+=Ft.num(t.scrollLeft||t.pageXOffset||0)},Ft.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}vt.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},vt.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},vt.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function wt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(r),!0).forEach(function(e){Dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Dt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class jt{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return $.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):($.isArr(e)&&(e=e.join(" ")),$.isObj(e)&&(e=Kt.castOptions(e)),this.el.setAttribute(t,e),this)}data(t,e=void 0,r=null){return this.attr("data-"+t,e,r)}computed(t=null,e=null){if(null==this.el)return e;if(1!==this.getNodeType())return e;let r=getComputedStyle(this.el);return null==t?r:w.get(r,t,e)}style(t=void 0,e=!0){if(null==this.el)return this;if(null===t)return this.attr("style",null);let r=this.attr("style",void 0,{});return $.isStr(r)&&(r=Kt.parseOptions(r)),$.isUndef(t)?r:(e&&(t=Ot(Ot({},r),t)),t.translate&&(t.transform=`translate3d(${t.translate.join(",")}, 0)`),delete t.translate,$.isNum(t.top)&&(t.top+="px"),$.isNum(t.left)&&(t.left+="px"),$.isNum(t.width)&&(t.width+="px"),$.isNum(t.height)&&(t.height+="px"),this.attr("style",t),this)}class(t=void 0,e=!1){if(null==this.el)return this;if(null===t)return this.attr("class","");let r=this.attr("class",void 0,[]);return $.isStr(r)&&(r=r.split(" ")),$.isUndef(t)?r:(e&&(t=[...r,...t]),this.attr("class",t),this)}html(t=void 0){return void 0===t?this.el.innerHTML:(this.each(e=>{e.innerHTML=t}),this)}actual(t,e=null){let r=this.attr("style");this.style(e);let i=t(this.el,this.el);return this.attr("style",r),i}hasClass(t){return $.isArr(t)||(t=[t]),b.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Ft.find(e).addClass(t));let e=this.el.className.split(" ");return $.isStr(t)&&(t=t.split(" ")),e=b.append(e,...t),this.el.className=b.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Ft.find(e).remClass(t));let e=this.el.className.split(" ");return $.isStr(t)&&(t=t.split(" ")),e=b.diff(e,t),this.el.className=b.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>Ft.find(e).toggleClass(t)):this.hasClass(t)?this.remClass(t):this.addClass(t)}stateClass(t,e=!0){return this.els.length>1?this.each(e=>Ft.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}jt.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},jt.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function $t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(e){xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function xt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Mt{static inviewMaxY(t,e=null){if($.isString(t)&&(t={el:t}),!(t=$t($t({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewY() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Ft.find(t.el).each(t=>{(t=>Ft.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:b.first(i)}static inviewMaxX(t,e=null){if($.isString(t)&&(t={el:t}),!(t=$t($t({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewX() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Ft.find(t.el).each(t=>{(t=>Ft.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:b.first(i)}viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[Ft.win().innerWidth,this.width()],[r,i]=[this.offset("left"),this.parent().scroll("left")];return{left:Math.max(0,r-i),right:Math.max(0,t-(r+e-i))}}inviewX(t=null){let{left:e,right:r}=Ft.find(t).viewoffY(),[i,n]=[Ft.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.max(0,l)}inratioX(t=null){return 1/this.width()*this.inviewX(t)}isInviewX(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewX(r)>t:this.inratioX(r)>t}viewoffY(){if(null==this.el)return{top:0,bottom:0};let[t,e]=[Ft.win().innerHeight,this.height()],[r,i]=[this.offset("top"),this.parent().scroll("top")];return{top:Math.max(0,r-i),bottom:Math.max(0,t-(r+e-i))}}inviewY(t=null){let{top:e,bottom:r}=Ft.find(t).viewoffY(),[i,n]=[Ft.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.min(Math.max(0,l),i)}inratioY(t=null){return 1/this.height()*this.inviewY(t)}isInviewY(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewY(r)>t:this.inratioY(r)>t}}Mt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},Mt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class Nt{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=Ft.doc().title),document.title=C.replace(e,{value:t,title:this.$meta.title}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Nt,"$meta",{}),Nt.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),Ft.setMetaTitle(t));class St{}function Yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(r),!0).forEach(function(e){Tt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Tt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class At{popover(t,e="botttom-center",r={}){return/^(top|bottom)-/.test(e)?this.popoverY(t,e,r):/^(left|right)-/.test(e)?this.popoverX(t,e,r):void 0}popoverY(t,e="bottom-center",r={}){t=Ft.find(t);let[i,n]=[t.rect(),this.rect()];r.x&&(i=kt(kt({},i),{},{left:r.x,width:1})),r.y&&(i=kt(kt({},i),{},{top:r.y,height:1})),r.width;let[s,o]=[{x:0,y:0},i.width-n.width];/^top-/.test(e)&&(s.y=i.top-n.height),/^bottom-/.test(e)&&(s.y=i.top+i.height),/-start$/.test(e)&&(s.x=i.left),/-center$/.test(e)&&(s.x=i.left+.5*o),/-end$/.test(e)&&(s.x=i.left+o);let l=e;/^top-/.test(e)&&(l=l.replace(/^top-/,"bottom-")),/^bottom-/.test(e)&&(l=l.replace(/^bottom-/,"top-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y||s.y<0;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverY(t,l,c);return u&&r.offset&&(s=r.offset),s.y<0&&(s.y=0),s.y+n.height>a.height&&(s.y=a.height-n.height),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverX(t,e="left-center",r={}){t=Ft.find(t);let[i,n]=[t.rect(),this.rect()];r.height;let[s,o]=[{x:0,y:0},i.height-n.height];/^left-/.test(e)&&(s.x=i.left-n.width),/^right-/.test(e)&&(s.x=i.left+i.width),/-start$/.test(e)&&(s.y=i.top),/-center/.test(e)&&(s.y=i.top+.5*o),/-end/.test(e)&&(s.y=i.top+o);let l=e;/^left-/.test(e)&&(l=l.replace(/^left-/,"right-")),/^right-/.test(e)&&(l=l.replace(/^right-/,"left-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverX(t,l,c);return u&&r.offset&&(s=r.offset),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverNormalize(t,e,r,i){const n=Ft.find(document.body).scroll();t.y<0&&(t.y=0),t.y+e.height>i.y&&(t.y=i.y-e.height),t.x<0&&(t.x=0);const s=document.body.clientWidth;return t.x+e.width>i.x&&(t.x=i.x-e.width-(i.x-s)),t={x:t.x+n.left,y:t.y+n.top},w.each(t,(e,r)=>{t[r]=Math.round(e)}),t.self={width:e.width,height:e.height},t.rect={width:r.width,height:r.height},t}}function Ht(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Et=[ht,mt,dt,ft,pt,vt,jt,Mt,Nt,St,At];class It extends(z(Et)){constructor(t,...e){return super(t,...e),Ht(this,"el",null),Ht(this,"els",[]),"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=$.nodes(t)),t instanceof Ft&&(t=t.el),$.isArr(t)||(t=[t]),this.el=t[0],this.els=t,this}static find(t,...e){return new Ft(t,...e)}static extend(t){t.call({},this)}static win(){return null==globalThis.window?{}:window}static doc(){return null==globalThis.document?{}:document}static body(){return this.doc().body?this.doc().body:{}}}Ht(It,"init",[]);const Ft=It,Ct=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>$.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>$.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>$.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>$.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Rt=[{match:t=>$.isArr(t),parse:t=>JSON.stringify(t)}];class Lt{static keyed(t,e=null){return $.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!$.isStr(t))return e;t=t.replace(/(^"|^'|'$|"$)/g,"");for(let e of r)if(e.match(t))return e.parse(t);for(let e of Ct)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),$.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Rt)if(e.match(t))return e.parse(t);return $.str(t)}}const Wt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Xt{static castParams(t={}){if($.isEmpty(t))return"";return b.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!$.isRef(e))return $.str(t)+"="+Kt.casted(e,!0);return b.each(e,(r,i)=>this.castParam($.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if($.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Wt.entry);if(null==e)return{};const[r,i]=[Kt.keyed,Kt.parsed];return b.reduce(Array.from(e),(t,{groups:e})=>w.set(t,r(e.key),i(e.val)),{})}}const qt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Bt{static castOptions(t={},e=!0){if($.isEmpty(t))return"";return b.each(t,(t,r)=>this.castOption(r,t,null,e)).join(e?"; ":";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let n=i?": ":":";return $.isObj(e)?b.map(e,(e,r)=>this.castOption(r,e,t,i)).join(i?"; ":";"):$.str(t)+n+Kt.casted(e,!1)}static parseOptions(t){if($.isEmpty(t))return{};let e=t.matchAll(qt.entry);if(null==e)return{};const[r,i]=[Kt.keyed,Kt.parsed];return b.reduce(Array.from(e),(t,{groups:e})=>w.set(t,r(e.key),i(e.val)),{})}}const Gt=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Ut{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),b.each(Gt,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const Jt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class zt{static filesize(t,e=1){$.isNum(t)||(t=$.num(t,0));let r=r=>p.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<Jt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+Jt[e];return r(Jt.length)}}const _t=[Lt,Xt,Bt,Ut,zt];class Zt extends(z(_t)){static extend(t){t.call({},this)}}const Kt=Zt;class Qt{static has(t){return w.has(this.$data,b.first(t))}static set(t,e){let[r,i]=[null,b.first(t)];w.has(this.$data,i)&&(r=w.get(this.$data,i)),$.isEqual(r,e)||(w.set(this.$data,i,e),E.fire("store:"+i,e,i))}static unset(t){w.unset(this.$data,[...b.first(t)])}static get(t,e=null,r=!1){let i=b.first(t);if(!w.has(this.$data,i)&&!r)return e;w.has(this.$data,i)&&r&&w.set(this.$data,i,e);let n=w.get(this.$data,i,e);return $.isObj(n)?w.clone(n):n}static find(t,e,r=null){let i=b.first(t);if(!1===w.has(this.$data,i))return r;if(!1===w.has(e,"id"))return r;let n=b.findIndex(this.get(i),{id:e.id});return-1===n?r:this.get(i+"."+n)}static replace(t,e){let r=b.first(t);if(!1===w.has(this.$data,r))return;if(!1===w.has(e,"id"))return;let i=b.findIndex(this.get(r),{id:p.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,b.merge(this.get(t,[]),e))}static remove(t,...e){this.set(t,b.diff(this.get(t,[]),e))}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Qt,"$data",{});const Vt=Qt;class te{static set(t,e){this.$routes[t]=e}static get(t,e=null,r=null){let i=t;return/^https?:\/\//.test(i)||(i=this.$routes[t]||t),w.each(e,(t,e)=>{i=i.replace(new RegExp("{"+e+"}","g"),t)}),$.isEmpty(r)||(i+="?"+Kt.castParams(r)),i}static goto(t,e=null,r=null){window.location.href=this.get(t,e,r)}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(te,"$routes",{});const ee=te,re=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>$[e](...t)}}),ie=new Proxy({},{get:function(t,e){return console.warn(`Event.${e} is deprecated, use Signal.${e}() instead.`),(...t)=>E[e](...t)}}),ne=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),A.make()};return e})());
2
2
  //# sourceMappingURL=pico-js.esm.js.map