diff --git a/server/API/resolvers/uptime.js b/server/API/resolvers/uptime.js index 20755eb..c0f1cf1 100644 --- a/server/API/resolvers/uptime.js +++ b/server/API/resolvers/uptime.js @@ -2,7 +2,7 @@ import {api_registerCache} from "../helpers/cache.js"; import error from "../helpers/error.js"; import api from "../helpers/header.js"; import {INTERVALS} from "../../Modules/consts.js"; -import {db_get_address_uptime_position} from "../../Modules/db.js"; +import {db_get_account_uptime_position} from "../../Modules/db.js"; const cache = api_registerCache("uptime") @@ -13,7 +13,7 @@ export default async (req, res) => { if (cache.has(publicKey)) { result = cache.get(publicKey) } else { - const uptime = await db_get_address_uptime_position(publicKey) + const uptime = await db_get_account_uptime_position(publicKey) result = { ...uptime, publicKey, diff --git a/server/Modules/cache.js b/server/Modules/cache.js index b8f8d97..826931f 100644 --- a/server/Modules/cache.js +++ b/server/Modules/cache.js @@ -1,5 +1,5 @@ import { - db_get_block_stats, + db_get_blocks_stats, db_get_block_stats_avg, db_get_blocks_crt, db_get_blocks_short, @@ -43,7 +43,7 @@ export const cache_last_canonical_block = async () => { } export const cache_block_stats = async () => { - cache.block_stats = await db_get_block_stats() + cache.block_stats = await db_get_blocks_stats() } export const cache_blocks_crt = async () => { diff --git a/server/Modules/db.js b/server/Modules/db.js index 1a67a0a..546a0c1 100644 --- a/server/Modules/db.js +++ b/server/Modules/db.js @@ -86,7 +86,7 @@ export const db_get_blocks_short = async ({chainStatus = 'canonical', limit = 20 return (await query(sql, [chainStatus, limit, offset])).rows } -export const db_get_block_stats = async () => { +export const db_get_blocks_stats = async () => { const sql = ` select * from v_block_stats ` @@ -388,7 +388,7 @@ export const db_get_transactions_count_for_account = async ({ return (await query(sql, [Array.isArray(type) ? type : [type], Array.isArray(status) ? status : [status], account])).rows[0].length } -export const db_get_trans_info = async hash => { +export const db_get_transaction_info = async hash => { const sql = ` select t.*, b.height, @@ -643,7 +643,7 @@ export const db_get_blocks_count_for_account = async ({ return (await query(sql, [Array.isArray(type) ? type : [type], account])).rows[0].length } -export const db_get_zkapps = async ({ +export const db_get_zkapp = async ({ limit = 50, offset = 0, search = null, @@ -678,7 +678,7 @@ export const db_get_zkapps = async ({ return result } -export const db_get_zkapps_count = async ({ +export const db_get_zkapp_count = async ({ search = null, status = [TRANS_STATUS.APPLIED, TRANS_STATUS.FAILED] }) => { @@ -864,7 +864,7 @@ export const db_get_producers_count = async ({search, filter}) => { return (await query(sql)).rows[0].length } -export const db_get_block_analytics = async ({distance = 100}) => { +export const db_get_blocks_analytics = async ({distance = 100}) => { const sql = ` select * from v_block_stats bs limit $1 @@ -879,7 +879,7 @@ export const db_get_hard_fork_block = async () => { return (await query(sql)).rows[0] } -export const db_get_zkapp_tx_total = async () => { +export const db_get_zkapp_transactions_total = async () => { const sql = ` select count(*) as count from v_zkapp_commands_canonical @@ -887,7 +887,7 @@ export const db_get_zkapp_tx_total = async () => { return (await query(sql)).rows[0]["count"] } -export const db_get_zkapp_tx_count = async (status = 'applied', interval = '30 days') => { +export const db_get_zkapp_transactions_count = async (status = 'applied', interval = '30 days') => { const _status = status === 'all' ? "1=1" : `zk.status = '${status}'` const sql = ` select date_trunc('day', to_timestamp(zk.timestamp::bigint / 1000)::timestamp) as day, count(*) as cnt @@ -900,7 +900,7 @@ export const db_get_zkapp_tx_count = async (status = 'applied', interval = '30 d return (await query(sql)).rows } -export const db_get_zkapp_tx_payments = async (status = 'applied', interval = '30 days') => { +export const db_get_zkapp_transactions_payments = async (status = 'applied', interval = '30 days') => { const _status = status === 'all' ? "1=1" : `zk.status = '${status}'` const sql = ` select date_trunc('day', to_timestamp(zk.timestamp::bigint / 1000)::timestamp) as day, sum(fee::bigint) as cnt @@ -962,7 +962,7 @@ export const db_get_zkapp_updates_count_by_accounts = async (limit = 100) => { return (await query(sql)).rows } -export const db_get_zk_apps_grouped = async (includeNull = false) => { +export const db_get_zkapp_grouped = async (includeNull = false) => { const filter = includeNull ? "1=1" : "zk.zkapp_uri_id is not null" const sql = ` select coalesce(nullif(value, ''), 'No Name') as name, count(*) @@ -1015,7 +1015,7 @@ export const db_get_account_id = async (pk, create = false) => { return account_id } -export const db_get_address_uptime_position = async (publicKey) => { +export const db_get_account_uptime_position = async (publicKey) => { const id = isNaN(publicKey) ? await db_get_account_id(publicKey) : publicKey const sql = ` select * @@ -1029,7 +1029,7 @@ export const db_get_address_uptime_position = async (publicKey) => { return result.rows.length ? result.rows[0] : null } -export const db_get_address_uptime_line = async (publicKey, interval = 'hour', func = 'avg', limit = 48) => { +export const db_get_account_uptime_line = async (publicKey, interval = 'hour', func = 'avg', limit = 48) => { const id = isNaN(publicKey) ? await db_get_account_id(publicKey) : publicKey const sql = ` select @@ -1254,7 +1254,7 @@ export const db_get_user_tx_per_epoch = async (limit = 100) => { return (await query(sql, [limit])).rows } -export const db_get_zkapps_tx_per_epoch = async (limit = 100) => { +export const db_get_zkapp_transactions_per_epoch = async (limit = 100) => { const sql = ` select calc_epoch_since_genesis(b.global_slot_since_genesis::integer) as epoch, count(*) as tx_zkapps_count @@ -1284,7 +1284,7 @@ export const db_get_snarky_per_epoch = async (limit = 100) => { return (await query(sql, [limit])).rows } -export const db_get_tx_status_per_epoch = async (limit = 100) => { +export const db_get_transactions_status_per_epoch = async (limit = 100) => { const sql = ` with failed_transactions as diff --git a/server/Modules/websocket.js b/server/Modules/websocket.js index b9aea0d..958fa2e 100644 --- a/server/Modules/websocket.js +++ b/server/Modules/websocket.js @@ -1,4 +1,4 @@ -import WebSocket, {WebSocketServer} from "ws"; +import WebSocket from "ws"; import { db_get_account_balance_history, db_get_account_delegators, @@ -11,7 +11,7 @@ import { db_get_account_transactions_history, db_get_accounts, db_get_accounts_count, - db_get_block_analytics, + db_get_blocks_analytics, db_get_block_info, db_get_block_internal_commands, db_get_block_trans, @@ -32,25 +32,25 @@ import { db_get_price_minutes, db_get_producers, db_get_producers_count, db_get_snarky_per_epoch, - db_get_trans_info, + db_get_transaction_info, db_get_transactions, db_get_transactions_count, db_get_transactions_count_for_account, db_get_transactions_for_account, - db_get_tx_status_per_epoch, + db_get_transactions_status_per_epoch, db_get_user_tx_per_epoch, - db_get_zk_apps_grouped, + db_get_zkapp_grouped, db_get_zkapp_account_updates, db_get_zkapp_account_updates_interval, db_get_zkapp_account_updates_total, db_get_zkapp_apps_count, - db_get_zkapp_tx_count, - db_get_zkapp_tx_payments, - db_get_zkapp_tx_total, + db_get_zkapp_transactions_count, + db_get_zkapp_transactions_payments, + db_get_zkapp_transactions_total, db_get_zkapp_updates_count_by_accounts, - db_get_zkapps, - db_get_zkapps_count, - db_get_zkapps_tx_per_epoch, + db_get_zkapp, + db_get_zkapp_count, + db_get_zkapp_transactions_per_epoch, db_save_ip } from "./db.js"; import {ql_get_account_info, ql_get_pool, ql_get_snark_jobs} from "./graphql.js"; @@ -183,7 +183,7 @@ export const websocket = () => { break } case "trans_info": { - response(ws, channel, await db_get_trans_info(data.hash)) + response(ws, channel, await db_get_transaction_info(data.hash)) break } case "accounts": { @@ -248,8 +248,8 @@ export const websocket = () => { break } case "zkapps": { - const rows = await db_get_zkapps({...data}) - const length = await db_get_zkapps_count({...data}) + const rows = await db_get_zkapp({...data}) + const length = await db_get_zkapp_count({...data}) response(ws, channel, {rows, length}) break } @@ -279,20 +279,20 @@ export const websocket = () => { break } case "block_analytics" : { - const rows = await db_get_block_analytics({...data}) + const rows = await db_get_blocks_analytics({...data}) response(ws, channel, {rows}) break } case "zkapp-transactions": { - const total = await db_get_zkapp_tx_total() - const applied = await db_get_zkapp_tx_count('applied', data.interval) - const failed = await db_get_zkapp_tx_count('failed', data.interval) + const total = await db_get_zkapp_transactions_total() + const applied = await db_get_zkapp_transactions_count('applied', data.interval) + const failed = await db_get_zkapp_transactions_count('failed', data.interval) response(ws, channel, {applied, failed, total}) break } case "zkapp-payments": { - const applied = await db_get_zkapp_tx_payments('applied', data.interval) - const failed = await db_get_zkapp_tx_payments('failed', data.interval) + const applied = await db_get_zkapp_transactions_payments('applied', data.interval) + const failed = await db_get_zkapp_transactions_payments('failed', data.interval) response(ws, channel, {applied, failed}) break } @@ -308,7 +308,7 @@ export const websocket = () => { } case "zkapp-apps": { const app_count = await db_get_zkapp_apps_count() - const app_grouped = await db_get_zk_apps_grouped() + const app_grouped = await db_get_zkapp_grouped() response(ws, channel, {app_count, app_grouped}) break } @@ -352,11 +352,11 @@ export const websocket = () => { break } case "user-tx-status-per-epoch": { - response(ws, channel, await db_get_tx_status_per_epoch()) + response(ws, channel, await db_get_transactions_status_per_epoch()) break } case "zkapps-tx-per-epoch": { - response(ws, channel, await db_get_zkapps_tx_per_epoch()) + response(ws, channel, await db_get_zkapp_transactions_per_epoch()) break } case "snarky-per-epoch": { diff --git a/server/Views/vendor/metro/metro.js b/server/Views/vendor/metro/metro.js index e7944a4..5429104 100644 --- a/server/Views/vendor/metro/metro.js +++ b/server/Views/vendor/metro/metro.js @@ -3,9 +3,9 @@ * Copyright 2024 Serhii Pimenov * Licensed under MIT * - * Build time: 16.07.2024 14:06:31 + * Build time: 17.07.2024 10:32:15 */ -!function(){"use strict";void 0===globalThis.METRO_DISABLE_BANNER&&console.info("%c\n███╗ ███╗███████╗████████╗██████╗ ██████╗ ██╗ ██╗██╗\n████╗ ████║██╔════╝╚══██╔══╝██╔══██╗██╔═══██╗ ██║ ██║██║\n██╔████╔██║█████╗ ██║ ██████╔╝██║ ██║ ██║ ██║██║\n██║╚██╔╝██║██╔══╝ ██║ ██╔══██╗██║ ██║ ██║ ██║██║\n██║ ╚═╝ ██║███████╗ ██║ ██║ ██║╚██████╔╝ ╚██████╔╝██║\n╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ \n","color: #0080fe");const e="YYYY-MM-DDTHH:mm:ss.sss",t="Invalid date",n=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|m{1,2}|s{1,3}/g,i=/(%[a-z])/gi,a={months:"January February March April May June July August September October November December".split(" "),monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekStart:0},s={ms:"Milliseconds",s:"Seconds",m:"Minutes",h:"Hours",D:"Date",d:"Day",M:"Month",Y:"FullYear",y:"Year",t:"Time"},o="ms",r="second",l="minute",c="hour",d="day",u="week",h="month",p="year",required=(e="")=>{throw new Error("This argument is required!")},isset=(e,t=!0)=>{try{return t?void 0!==e:null!=e}catch(e){return!1}},not$1=e=>null==e,lpad$1=function(e,t,n){let i=""+e;return n&&i.length>=n?i:Array(n+1-i.length).join(t)+i};let f=class Datetime{constructor(){const e=[].slice.call(arguments);if(this.value=new(Function.prototype.bind.apply(Date,[this].concat(e))),this.locale="en",this.weekStart=Datetime.locales.en.weekStart,this.utcMode=!1,this.mutable=!0,n=this.value.getTime(),isNaN(n))throw new Error(t);var n}static locales={en:a};static isDatetime(e){return e instanceof Datetime}static now(e=!1){return datetime$1()[e?"val":"time"]()}static parse(e=required()){return datetime$1(Date.parse(e))}static setLocale(e=required(),t=required()){Datetime.locales[e]=t}static getLocale(e="en"){return isset(Datetime.locales[e],!1)?Datetime.locales[e]:Datetime.locales.en}static align(e,t){let n,i,a=datetime$1(e);switch(t){case r:n=a.ms(0);break;case l:n=Datetime.align(a,r)[r](0);break;case c:n=Datetime.align(a,l)[l](0);break;case d:n=Datetime.align(a,c)[c](0);break;case h:n=Datetime.align(a,d)[d](1);break;case p:n=Datetime.align(a,h)[h](0);break;case u:i=a.weekDay(),n=Datetime.align(e,d).addDay(-i);break;default:n=a}return n}static alignEnd(e,t){let n,i,a=datetime$1(e);switch(t){case o:n=a.ms(999);break;case r:n=Datetime.alignEnd(a,o);break;case l:n=Datetime.alignEnd(a,r)[r](59);break;case c:n=Datetime.alignEnd(a,l)[l](59);break;case d:n=Datetime.alignEnd(a,c)[c](23);break;case h:n=Datetime.alignEnd(a,d)[d](1).add(1,h).add(-1,d);break;case p:n=Datetime.alignEnd(a,d)[h](11)[d](31);break;case u:i=a.weekDay(),n=Datetime.alignEnd(a,"day").addDay(6-i);break;default:n=e}return n}immutable(e){return this.mutable=!(not$1(e)||e),this}utc(){return this.utcMode=!0,this}local(){return this.utcMode=!1,this}useLocale(e,t){return this.locale=t||isset(Datetime.locales[e],!1)?e:"en",this.weekStart=Datetime.getLocale(this.locale).weekStart,this}clone(){const e=datetime$1(this.value);return e.locale=this.locale,e.weekStart=this.weekStart,e.mutable=this.mutable,e}align(e){return this.mutable?(this.value=Datetime.align(this,e).val(),this):this.clone().immutable(!1).align(e).immutable(!this.mutable)}alignEnd(e){return this.mutable?(this.value=Datetime.alignEnd(this,e).val(),this):this.clone().immutable(!1).alignEnd(e).immutable(!this.mutable)}val(e){return e instanceof Date?this.mutable?(this.value=e,this):datetime$1(e):this.value}year2(){return+(""+this.year()).substr(-2)}_set(e,t){const n="set"+(this.utcMode&&"t"!==e?"UTC":"")+s[e];if(this.mutable)return this.value[n](t),this;const i=this.clone();return i.value[n](t),i}_get(e){const t="get"+(this.utcMode&&"t"!==e?"UTC":"")+s[e];return this.value[t]()}_work(e,t){return arguments.length&&null!=t?this._set(e,t):this._get(e)}ms(e){return this._work("ms",e)}second(e){return this._work("s",e)}minute(e){return this._work("m",e)}hour(e){return this._work("h",e)}day(e){return this._work("D",e)}month(e){return this._work("M",e)}year(e){return this._work("Y",e)}time(e){return this._work("t",e)}weekDay(e){if(!arguments.length||not$1(e))return this.utcMode?this.value.getUTCDay():this.value.getDay();const t=e-this.weekDay();return this.day(this.day()+t),this}get(e){return"function"!=typeof this[e]?this:this[e]()}set(e,t){return"function"!=typeof this[e]?this:this[e](t)}add(e,t){switch(t){case c:return this.time(this.time()+60*e*60*1e3);case l:return this.time(this.time()+60*e*1e3);case r:return this.time(this.time()+1e3*e);case o:return this.time(this.time()+e);case d:return this.day(this.day()+e);case u:return this.day(this.day()+7*e);case h:return this.month(this.month()+e);case p:return this.year(this.year()+e)}}addHour(e){return this.add(e,c)}addMinute(e){return this.add(e,l)}addSecond(e){return this.add(e,r)}addMs(e){return this.add(e,o)}addDay(e){return this.add(e,d)}addWeek(e){return this.add(e,u)}addMonth(e){return this.add(e,h)}addYear(e){return this.add(e,p)}format(t,i){const a=t||e,s=Datetime.getLocale(i||this.locale),o=this.year(),r=this.year2(),l=this.month(),c=this.day(),d=this.weekDay(),u=this.hour(),h=this.minute(),p=this.second(),f=this.ms(),m={YY:r,YYYY:o,M:l+1,MM:lpad$1(l+1,0,2),MMM:s.monthsShort[l],MMMM:s.months[l],D:c,DD:lpad$1(c,0,2),d:d,dd:s.weekdaysMin[d],ddd:s.weekdaysShort[d],dddd:s.weekdays[d],H:u,HH:lpad$1(u,0,2),m:h,mm:lpad$1(h,0,2),s:p,ss:lpad$1(p,0,2),sss:lpad$1(f,0,3)};return a.replace(n,((e,t)=>t||m[e]))}valueOf(){return this.value.valueOf()}toString(){return this.value.toString()}};const datetime$1=(...e)=>e&&e[0]instanceof f?e[0]:new f(...e),m=f.prototype.format,v={buddhist(){return this.year()+543},format(t,n){t=t||e;const i={BB:(this.buddhist()+"").slice(-2),BBBB:this.buddhist()};let a=t.replace(/(\[[^\]]+])|B{4}|B{2}/g,((e,t)=>t||i[e]));return m.bind(this)(a,n)}};Object.assign(f.prototype,v);Object.assign(f.prototype,{calendar(e){return((e,t)=>{let n,i=e instanceof f?e.clone().align("month"):datetime$1(e),a=0===t||t?t:e.weekStart,s=a?i.isoWeekDay():i.weekDay(),o=f.getLocale(i.locale),r=datetime$1();const l={month:o.months[i.month()],days:[],weekstart:t?1:0,weekdays:((e,t)=>{if(0===t)return e;let n=e[0];return e.slice(1).concat([n])})(o.weekdaysMin,a),today:r.format("YYYY-MM-DD"),weekends:[],week:[]};for(i.addDay(a?1-s:-s),n=0;n<42;n++)l.days.push(i.format("YYYY-MM-DD")),i.add(1,"day");for(l.weekends=l.days.filter((function(e,t){return 0===a?[0,6,7,13,14,20,21,27,28,34,35,41].includes(t):[5,6,12,13,19,20,26,27,33,34,40,41].includes(t)})),i=r.clone(),s=a?i.isoWeekDay():i.weekDay(),i.addDay(a?1-s:-s),n=0;n<7;n++)l.week.push(i.format("YYYY-MM-DD")),i.add(1,"day");return l})(this,e)}});const g=f.prototype.format;Object.assign(f.prototype,{century(){return Math.ceil(this.year()/100)},format(t,n){t=t||e;const i={C:this.century()};let a=t.replace(/(\[[^\]]+])|C/g,((e,t)=>t||i[e]));return g.bind(this)(a,n)}}),Object.assign(f.prototype,{same(e){return this.time()===datetime$1(e).time()},compare(e,t,n="="){const i=datetime$1(e),a=datetime$1(this.value);let s,o;switch(!1===["<",">",">=","<=","=","!="].includes(n=n||"=")&&(n="="),t=(t||"ms").toLowerCase(),s=a.align(t).time(),o=i.align(t).time(),n){case"<":return s":return s>o;case"<=":return s<=o;case">=":return s>=o;case"=":return s===o;case"!=":return s!==o}},between(e,t){return this.younger(e)&&this.older(t)},older(e,t){return this.compare(e,t,"<")},olderOrEqual(e,t){return this.compare(e,t,"<=")},younger(e,t){return this.compare(e,t,">")},youngerOrEqual(e,t){return this.compare(e,t,">=")},equal(e,t){return this.compare(e,t,"=")},notEqual(e,t){return this.compare(e,t,"!=")},diff(e){const t=datetime$1(e),n=Math.abs(this.time()-t.time()),i=Math.abs(this.month()-t.month()+12*(this.year()-t.year()));return{ms:n,second:Math.ceil(n/1e3),minute:Math.ceil(n/6e4),hour:Math.ceil(n/36e5),day:Math.ceil(n/864e5),month:i,year:Math.floor(i/12)}},distance(e,t){return this.diff(e)[t]}}),Object.assign(f.prototype,{isLeapYear(){const e=this.year();return e%4==0&&e%100!=0||e%400==0}}),Object.assign(f.prototype,{dayOfYear(){const e=this.month(),t=this.day();return[0,31,59,90,120,151,181,212,243,273,304,334][e]+t+(e>1&&this.isLeapYear()?1:0)}}),Object.assign(f.prototype,{daysInMonth(){return datetime$1(this.value).add(1,"month").day(1).add(-1,"day").day()},daysInYear(){return this.isLeapYear()?366:365},daysInYearMap(){const e=[],t=datetime$1(this.value);t.month(0).day(1);for(let n=0;n<12;n++)t.add(1,"month").add(-1,"day"),e.push(t.day()),t.day(1).add(1,"month");return e},daysInYearObj(e,t){const n=this.daysInYearMap(),i={},a=f.getLocale(e||this.locale);return n.forEach(((e,n)=>i[a[t?"monthsShort":"months"][n]]=e)),i}}),Object.assign(f.prototype,{decade(){return 10*Math.floor(this.year()/10)},decadeStart(){const e=this.decade();return(this.mutable?this:this.clone()).year(e).month(0).day(1)},decadeEnd(){const e=this.decade()+9;return(this.mutable?this:this.clone()).year(e).month(11).day(31)},decadeOfMonth(){const e=this.clone().add(1,"month").day(1).add(-1,"day").day()/3,t=this.day();return t<=e?1:t<=2*e?2:3}}),Object.assign(f,{from(e,n,i){let a,s,o,r,l,c,d,u,h,p,m,v,g,b,C,w,y,_,S;const getIndex=function(e,t){return e.map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase())},getPartIndex=function(e){const t={month:["M","mm","%m"],day:["D","dd","%d"],year:["YY","YYYY","yy","yyyy","%y"],hour:["h","hh","%h"],minute:["m","mi","i","ii","%i"],second:["s","ss","%s"],ms:["sss"]};let n,i,a=-1;for(let s=0;s-1&&r[l]?isNaN(parseInt(r[l]))?(r[l]=function(e){let t=-1;const n=f.getLocale(i||"en");return not$1(e)?-1:(t=getIndex(n.months,e),-1===t&&void 0!==n.monthsParental&&(t=getIndex(n.monthsParental,e)),-1===t&&(e=e.substr(0,3),t=getIndex(n.monthsShort,e)),-1===t?-1:t+1)}(r[l]),-1===r[l]&&(l=-1)):(S=parseInt(r[l]),(S<1||S>12)&&(l=-1)):l=-1,v=d>-1&&r[d]?r[d]:0,g=l>-1&&r[l]?r[l]:1,b=c>-1&&r[c]?r[c]:1,C=u>-1&&r[u]?r[u]:0,w=h>-1&&r[h]?r[h]:0,y=p>-1&&r[p]?r[p]:0,_=m>-1&&r[m]?r[m]:0,datetime$1(v,g-1,b,C,w,y,_)}});const b=f.prototype.format;Object.assign(f.prototype,{ampm(e){let t=this.hour()<12?"AM":"PM";return e?t.toLowerCase():t},hour12:function(e,t){let n=e;return 0===arguments.length?this.hour()%12:("pm"===(t=t||"am").toLowerCase()&&(n+=12),this.hour(n))},format:function(t,n){let i,a,s=this.hour12();return t=t||e,i={a:"["+this.ampm(!0)+"]",A:"["+this.ampm(!1)+"]",h:s,hh:lpad$1(s,0,2)},a=t.replace(/(\[[^\]]+])|a|A|h{1,2}/g,((e,t)=>t||i[e])),b.bind(this)(a,n)}});const C=f.prototype.format,w=f.align,y=f.alignEnd;Object.assign(f,{align(e,t){let n,i,a=datetime$1(e);if("isoWeek"===t)i=a.isoWeekDay(),n=w(a,"day").addDay(1-i);else n=w.apply(void 0,[a,t]);return n},alignEnd(e,t){let n,i,a=datetime$1(e);if("isoWeek"===t)i=a.isoWeekDay(),n=y(a,"day").addDay(7-i);else n=y.apply(void 0,[a,t]);return n}}),Object.assign(f.prototype,{isoWeekDay(e){let t=(this.weekDay()+6)%7+1;return!arguments.length||not$1(e)?t:this.addDay(e-t)},format(t,n){t=t||e;const i={I:this.isoWeekDay()};let a=t.replace(/(\[[^\]]+])|I{1,2}/g,((e,t)=>t||i[e]));return C.bind(this)(a,n)}}),Object.assign(f,{max(){return[].slice.call(arguments).map((e=>datetime$1(e))).sort(((e,t)=>t.time()-e.time()))[0]}}),Object.assign(f.prototype,{max(){return f.max.apply(this,[this].concat([].slice.call(arguments)))}}),Object.assign(f,{min(){return[].slice.call(arguments).map((e=>datetime$1(e))).sort(((e,t)=>e.time()-t.time()))[0]}}),Object.assign(f.prototype,{min(){return f.min.apply(this,[this].concat([].slice.call(arguments)))}});const _=f.align,S=f.alignEnd,T=f.prototype.add;Object.assign(f,{align(e,t){let n,i=datetime$1(e);if("quarter"===t)n=f.align(i,"day").day(1).month(3*i.quarter()-3);else n=_.apply(this,[i,t]);return n},alignEnd(e,t){let n,i=datetime$1(e);if("quarter"===t)n=f.align(i,"quarter").add(3,"month").add(-1,"ms");else n=S.apply(this,[i,t]);return n}}),Object.assign(f.prototype,{quarter(){const e=this.month();return e<=2?1:e<=5?2:e<=8?3:4},add(e,t){return"quarter"===t?this.month(this.month()+3*e):T.bind(this)(e,t)},addQuarter(e){return this.add(e,"quarter")}}),Object.assign(f,{sort(t,n){let i,a;const s={};switch("string"==typeof n||"object"!=typeof n||not$1(n)?(s.format=e,s.dir=n&&"DESC"===n.toUpperCase()?"DESC":"ASC",s.returnAs="datetime"):(s.format=n.format||e,s.dir=(n.dir||"ASC").toUpperCase(),s.returnAs=n.format?"string":n.returnAs||"datetime"),a=t.map((e=>datetime$1(e))).sort(((e,t)=>e.valueOf()-t.valueOf())),"DESC"===s.dir&&a.reverse(),s.returnAs){case"string":i=a.map((e=>e.format(s.format)));break;case"date":i=a.map((e=>e.val()));break;default:i=a}return i}});const k=f.prototype.format;Object.assign(f.prototype,{utcOffset(){return this.value.getTimezoneOffset()},timezone(){return this.toTimeString().replace(/.+GMT([+-])(\d{2})(\d{2}).+/,"$1$2:$3")},timezoneName(){return this.toTimeString().replace(/.+\((.+?)\)$/,"$1")},format(t,n){t=t||e;const i={Z:this.utcMode?"Z":this.timezone(),ZZ:this.timezone().replace(":",""),ZZZ:"[GMT]"+this.timezone(),z:this.timezoneName()};let a=t.replace(/(\[[^\]]+])|Z{1,3}|z/g,((e,t)=>t||i[e]));return k.bind(this)(a,n)}});const x=f.prototype.format;Object.assign(f.prototype,{weekNumber(e){let t,n,i,a,s,o;return e=+e||0,i=datetime$1(this.year(),0,1),a=i.weekDay()-e,a=a>=0?a:a+7,s=Math.floor((this.time()-i.time()-6e4*(this.utcOffset()-i.utcOffset()))/864e5)+1,a<4?(o=Math.floor((s+a-1)/7)+1,o>52&&(t=datetime$1(this.year()+1,0,1),n=t.weekDay()-e,n=n>=0?n:n+7,o=n<4?1:53)):o=Math.floor((s+a-1)/7),o},isoWeekNumber(){return this.weekNumber(1)},weeksInYear(e){return datetime$1(this.value).month(11).day(31).weekNumber(e)},format:function(t,n){let i,a,s=this.weekNumber(),o=this.isoWeekNumber();return t=t||e,i={W:s,WW:lpad$1(s,0,2),WWW:o,WWWW:lpad$1(o,0,2)},a=t.replace(/(\[[^\]]+])|W{1,4}/g,((e,t)=>t||i[e])),x.bind(this)(a,n)}}),Object.assign(f.prototype,{strftime(e,t){const n=e||"%Y-%m-%dT%H:%M:%S.%Q%t",a=f.getLocale(t||this.locale),s=this.year(),o=this.year2(),r=this.month(),l=this.day(),c=this.weekDay(),d=this.hour(),u=this.hour12(),h=this.minute(),p=this.second(),m=this.ms(),v=this.time(),g=lpad$1(l,0,2),b=lpad$1(r+1,0,2),C=lpad$1(d,0,2),w=lpad$1(u,0,2),y=lpad$1(h,0,2),_=lpad$1(p,0,2),S=lpad$1(m,0,3),T=this,thursday=function(){return datetime$1(T.value).day(T.day()-(T.weekDay()+6)%7+3)},k={"%a":a.weekdaysShort[c],"%A":a.weekdays[c],"%b":a.monthsShort[r],"%h":a.monthsShort[r],"%B":a.months[r],"%c":this.toString().substring(0,this.toString().indexOf(" (")),"%C":this.century(),"%d":g,"%D":[g,b,s].join("/"),"%e":l,"%F":[s,b,g].join("-"),"%G":thursday().year(),"%g":(""+thursday().year()).slice(2),"%H":C,"%I":w,"%j":lpad$1(this.dayOfYear(),0,3),"%k":C,"%l":w,"%m":b,"%n":r+1,"%M":y,"%p":this.ampm(),"%P":this.ampm(!0),"%s":Math.round(v/1e3),"%S":_,"%u":this.isoWeekDay(),"%V":this.isoWeekNumber(),"%w":c,"%x":this.toLocaleDateString(),"%X":this.toLocaleTimeString(),"%y":o,"%Y":s,"%z":this.timezone().replace(":",""),"%Z":this.timezoneName(),"%r":[w,y,_].join(":")+" "+this.ampm(),"%R":[C,y].join(":"),"%T":[C,y,_].join(":"),"%Q":S,"%q":m,"%t":this.timezone()};return n.replace(i,(e=>0===k[e]||k[e]?k[e]:e))}}),Object.assign(f,{isToday(e){const t=datetime$1(e).align("day"),n=datetime$1().align("day");return t.time()===n.time()}}),Object.assign(f.prototype,{isToday(){return f.isToday(this)},today(){const e=datetime$1();return this.mutable?this.val(e.val()):e}}),Object.assign(f,{isTomorrow(e){const t=datetime$1(e).align("day"),n=datetime$1().align("day").add(1,"day");return t.time()===n.time()}}),Object.assign(f.prototype,{isTomorrow(){return f.isTomorrow(this)},tomorrow(){return this.mutable?this.add(1,"day"):this.clone().immutable(!1).add(1,"day").immutable(!this.mutable)}}),Object.assign(f.prototype,{toDateString(){return this.value.toDateString()},toISOString(){return this.value.toISOString()},toJSON(){return this.value.toJSON()},toGMTString(){return this.value.toGMTString()},toLocaleDateString(){return this.value.toLocaleDateString()},toLocaleString(){return this.value.toLocaleString()},toLocaleTimeString(){return this.value.toLocaleTimeString()},toTimeString(){return this.value.toTimeString()},toUTCString(){return this.value.toUTCString()},toDate(){return new Date(this.value)}}),Object.assign(f,{timestamp:()=>(new Date).getTime()/1e3}),Object.assign(f.prototype,{unix(e){let t;return!arguments.length||not$1(e)?Math.floor(this.valueOf()/1e3):(t=1e3*e,this.mutable?this.time(t):datetime$1(this.value).time(t))},timestamp(){return this.unix()}}),Object.assign(f,{isYesterday(e){const t=datetime$1(e).align("day"),n=datetime$1().align("day").add(-1,"day");return t.time()===n.time()}}),Object.assign(f.prototype,{isYesterday(){return f.isYesterday(this)},yesterday(){return this.mutable?this.add(-1,"day"):this.clone().immutable(!1).add(-1,"day").immutable(!this.mutable)}});const getResult=e=>{let t,n=Math.floor(e/1e3),i=Math.floor(n/60),a=Math.floor(i/60),s=Math.floor(a/24),o=Math.floor(s/30),r=Math.floor(o/12);return r>=1&&(t=`${r} year`),o>=1&&r<1&&(t=`${o} mon`),s>=1&&s<=30&&(t=`${s} days`),a&&a<24&&(t=`${a} hour`),i&&i>=40&&i<60&&(t="less a hour"),i&&i<40&&(t=`${i} min`),n&&n>=30&&n<60&&(t=`${n} sec`),n<30&&(t="few sec"),t};Object.assign(f,{timeLapse(e){let t=datetime$1(e),n=datetime$1();return getResult(n-t)}}),Object.assign(f.prototype,{timeLapse(){let e=datetime$1()-+this;return getResult(e)}});const E={parseTime(e){if(!isNaN(e))return Math.abs(+e);return e.match(/([0-9]+d)|([0-9]{1,2}h)|([0-9]{1,2}m)|([0-9]{1,2}s)/gm).reduce(((e,t)=>{let n;return t.includes("d")?n=864e5*parseInt(t):t.includes("h")?n=36e5*parseInt(t):t.includes("m")?n=6e4*parseInt(t):t.includes("s")&&(n=1e3*parseInt(t)),e+n}),0)}};Object.assign(f,E);var A;f.info=()=>{console.info("%c Datetime Library %c v3.0.5 %c 08.06.2024, 20:43:59 ","color: #ffffff; font-weight: bold; background: #003152","color: white; background: darkgreen","color: white; background: #0080fe;")},globalThis.Datetime=f,globalThis.datetime=datetime$1,A=f.getLocale,f.getLocale=function(e){var t;return Metro?(Metro.locales[e]||(e="en-US"),{months:(t=Metro.locales[e].calendar).months.filter((function(e,t){return t<12})),monthsShort:t.months.filter((function(e,t){return t>11})),weekdays:t.days.filter((function(e,t){return t<7})),weekdaysShort:t.days.filter((function(e,t){return t>13})),weekdaysMin:t.days.filter((function(e,t){return t>6&&t<14})),weekStart:t.weekStart}):(e="en",A.call(this,e))}; +!function(){"use strict";void 0===globalThis.METRO_DISABLE_BANNER&&console.info("%c\n███╗ ███╗███████╗████████╗██████╗ ██████╗ ██╗ ██╗██╗\n████╗ ████║██╔════╝╚══██╔══╝██╔══██╗██╔═══██╗ ██║ ██║██║\n██╔████╔██║█████╗ ██║ ██████╔╝██║ ██║ ██║ ██║██║\n██║╚██╔╝██║██╔══╝ ██║ ██╔══██╗██║ ██║ ██║ ██║██║\n██║ ╚═╝ ██║███████╗ ██║ ██║ ██║╚██████╔╝ ╚██████╔╝██║\n╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ \n","color: #0080fe");const e="YYYY-MM-DDTHH:mm:ss.sss",t="Invalid date",n=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|m{1,2}|s{1,3}/g,i=/(%[a-z])/gi,a={months:"January February March April May June July August September October November December".split(" "),monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekStart:0},s={ms:"Milliseconds",s:"Seconds",m:"Minutes",h:"Hours",D:"Date",d:"Day",M:"Month",Y:"FullYear",y:"Year",t:"Time"},o="ms",r="second",l="minute",c="hour",d="day",u="week",h="month",p="year",required=(e="")=>{throw new Error("This argument is required!")},isset=(e,t=!0)=>{try{return t?void 0!==e:null!=e}catch(e){return!1}},not$1=e=>null==e,lpad$1=function(e,t,n){let i=""+e;return n&&i.length>=n?i:Array(n+1-i.length).join(t)+i};let f=class Datetime{constructor(){const e=[].slice.call(arguments);if(this.value=new(Function.prototype.bind.apply(Date,[this].concat(e))),this.locale="en",this.weekStart=Datetime.locales.en.weekStart,this.utcMode=!1,this.mutable=!0,n=this.value.getTime(),isNaN(n))throw new Error(t);var n}static locales={en:a};static isDatetime(e){return e instanceof Datetime}static now(e=!1){return datetime$1()[e?"val":"time"]()}static parse(e=required()){return datetime$1(Date.parse(e))}static setLocale(e=required(),t=required()){Datetime.locales[e]=t}static getLocale(e="en"){return isset(Datetime.locales[e],!1)?Datetime.locales[e]:Datetime.locales.en}static align(e,t){let n,i,a=datetime$1(e);switch(t){case r:n=a.ms(0);break;case l:n=Datetime.align(a,r)[r](0);break;case c:n=Datetime.align(a,l)[l](0);break;case d:n=Datetime.align(a,c)[c](0);break;case h:n=Datetime.align(a,d)[d](1);break;case p:n=Datetime.align(a,h)[h](0);break;case u:i=a.weekDay(),n=Datetime.align(e,d).addDay(-i);break;default:n=a}return n}static alignEnd(e,t){let n,i,a=datetime$1(e);switch(t){case o:n=a.ms(999);break;case r:n=Datetime.alignEnd(a,o);break;case l:n=Datetime.alignEnd(a,r)[r](59);break;case c:n=Datetime.alignEnd(a,l)[l](59);break;case d:n=Datetime.alignEnd(a,c)[c](23);break;case h:n=Datetime.alignEnd(a,d)[d](1).add(1,h).add(-1,d);break;case p:n=Datetime.alignEnd(a,d)[h](11)[d](31);break;case u:i=a.weekDay(),n=Datetime.alignEnd(a,"day").addDay(6-i);break;default:n=e}return n}immutable(e){return this.mutable=!(not$1(e)||e),this}utc(){return this.utcMode=!0,this}local(){return this.utcMode=!1,this}useLocale(e,t){return this.locale=t||isset(Datetime.locales[e],!1)?e:"en",this.weekStart=Datetime.getLocale(this.locale).weekStart,this}clone(){const e=datetime$1(this.value);return e.locale=this.locale,e.weekStart=this.weekStart,e.mutable=this.mutable,e}align(e){return this.mutable?(this.value=Datetime.align(this,e).val(),this):this.clone().immutable(!1).align(e).immutable(!this.mutable)}alignEnd(e){return this.mutable?(this.value=Datetime.alignEnd(this,e).val(),this):this.clone().immutable(!1).alignEnd(e).immutable(!this.mutable)}val(e){return e instanceof Date?this.mutable?(this.value=e,this):datetime$1(e):this.value}year2(){return+(""+this.year()).substr(-2)}_set(e,t){const n="set"+(this.utcMode&&"t"!==e?"UTC":"")+s[e];if(this.mutable)return this.value[n](t),this;const i=this.clone();return i.value[n](t),i}_get(e){const t="get"+(this.utcMode&&"t"!==e?"UTC":"")+s[e];return this.value[t]()}_work(e,t){return arguments.length&&null!=t?this._set(e,t):this._get(e)}ms(e){return this._work("ms",e)}second(e){return this._work("s",e)}minute(e){return this._work("m",e)}hour(e){return this._work("h",e)}day(e){return this._work("D",e)}month(e){return this._work("M",e)}year(e){return this._work("Y",e)}time(e){return this._work("t",e)}weekDay(e){if(!arguments.length||not$1(e))return this.utcMode?this.value.getUTCDay():this.value.getDay();const t=e-this.weekDay();return this.day(this.day()+t),this}get(e){return"function"!=typeof this[e]?this:this[e]()}set(e,t){return"function"!=typeof this[e]?this:this[e](t)}add(e,t){switch(t){case c:return this.time(this.time()+60*e*60*1e3);case l:return this.time(this.time()+60*e*1e3);case r:return this.time(this.time()+1e3*e);case o:return this.time(this.time()+e);case d:return this.day(this.day()+e);case u:return this.day(this.day()+7*e);case h:return this.month(this.month()+e);case p:return this.year(this.year()+e)}}addHour(e){return this.add(e,c)}addMinute(e){return this.add(e,l)}addSecond(e){return this.add(e,r)}addMs(e){return this.add(e,o)}addDay(e){return this.add(e,d)}addWeek(e){return this.add(e,u)}addMonth(e){return this.add(e,h)}addYear(e){return this.add(e,p)}format(t,i){const a=t||e,s=Datetime.getLocale(i||this.locale),o=this.year(),r=this.year2(),l=this.month(),c=this.day(),d=this.weekDay(),u=this.hour(),h=this.minute(),p=this.second(),f=this.ms(),m={YY:r,YYYY:o,M:l+1,MM:lpad$1(l+1,0,2),MMM:s.monthsShort[l],MMMM:s.months[l],D:c,DD:lpad$1(c,0,2),d:d,dd:s.weekdaysMin[d],ddd:s.weekdaysShort[d],dddd:s.weekdays[d],H:u,HH:lpad$1(u,0,2),m:h,mm:lpad$1(h,0,2),s:p,ss:lpad$1(p,0,2),sss:lpad$1(f,0,3)};return a.replace(n,((e,t)=>t||m[e]))}valueOf(){return this.value.valueOf()}toString(){return this.value.toString()}};const datetime$1=(...e)=>e&&e[0]instanceof f?e[0]:new f(...e),m=f.prototype.format,v={buddhist(){return this.year()+543},format(t,n){t=t||e;const i={BB:(this.buddhist()+"").slice(-2),BBBB:this.buddhist()};let a=t.replace(/(\[[^\]]+])|B{4}|B{2}/g,((e,t)=>t||i[e]));return m.bind(this)(a,n)}};Object.assign(f.prototype,v);Object.assign(f.prototype,{calendar(e){return((e,t)=>{let n,i=e instanceof f?e.clone().align("month"):datetime$1(e),a=0===t||t?t:e.weekStart,s=a?i.isoWeekDay():i.weekDay(),o=f.getLocale(i.locale),r=datetime$1();const l={month:o.months[i.month()],days:[],weekstart:t?1:0,weekdays:((e,t)=>{if(0===t)return e;let n=e[0];return e.slice(1).concat([n])})(o.weekdaysMin,a),today:r.format("YYYY-MM-DD"),weekends:[],week:[]};for(i.addDay(a?1-s:-s),n=0;n<42;n++)l.days.push(i.format("YYYY-MM-DD")),i.add(1,"day");for(l.weekends=l.days.filter((function(e,t){return 0===a?[0,6,7,13,14,20,21,27,28,34,35,41].includes(t):[5,6,12,13,19,20,26,27,33,34,40,41].includes(t)})),i=r.clone(),s=a?i.isoWeekDay():i.weekDay(),i.addDay(a?1-s:-s),n=0;n<7;n++)l.week.push(i.format("YYYY-MM-DD")),i.add(1,"day");return l})(this,e)}});const g=f.prototype.format;Object.assign(f.prototype,{century(){return Math.ceil(this.year()/100)},format(t,n){t=t||e;const i={C:this.century()};let a=t.replace(/(\[[^\]]+])|C/g,((e,t)=>t||i[e]));return g.bind(this)(a,n)}}),Object.assign(f.prototype,{same(e){return this.time()===datetime$1(e).time()},compare(e,t,n="="){const i=datetime$1(e),a=datetime$1(this.value);let s,o;switch(!1===["<",">",">=","<=","=","!="].includes(n=n||"=")&&(n="="),t=(t||"ms").toLowerCase(),s=a.align(t).time(),o=i.align(t).time(),n){case"<":return s":return s>o;case"<=":return s<=o;case">=":return s>=o;case"=":return s===o;case"!=":return s!==o}},between(e,t){return this.younger(e)&&this.older(t)},older(e,t){return this.compare(e,t,"<")},olderOrEqual(e,t){return this.compare(e,t,"<=")},younger(e,t){return this.compare(e,t,">")},youngerOrEqual(e,t){return this.compare(e,t,">=")},equal(e,t){return this.compare(e,t,"=")},notEqual(e,t){return this.compare(e,t,"!=")},diff(e){const t=datetime$1(e),n=Math.abs(this.time()-t.time()),i=Math.abs(this.month()-t.month()+12*(this.year()-t.year()));return{ms:n,second:Math.ceil(n/1e3),minute:Math.ceil(n/6e4),hour:Math.ceil(n/36e5),day:Math.ceil(n/864e5),month:i,year:Math.floor(i/12)}},distance(e,t){return this.diff(e)[t]}}),Object.assign(f.prototype,{isLeapYear(){const e=this.year();return e%4==0&&e%100!=0||e%400==0}}),Object.assign(f.prototype,{dayOfYear(){const e=this.month(),t=this.day();return[0,31,59,90,120,151,181,212,243,273,304,334][e]+t+(e>1&&this.isLeapYear()?1:0)}}),Object.assign(f.prototype,{daysInMonth(){return datetime$1(this.value).add(1,"month").day(1).add(-1,"day").day()},daysInYear(){return this.isLeapYear()?366:365},daysInYearMap(){const e=[],t=datetime$1(this.value);t.month(0).day(1);for(let n=0;n<12;n++)t.add(1,"month").add(-1,"day"),e.push(t.day()),t.day(1).add(1,"month");return e},daysInYearObj(e,t){const n=this.daysInYearMap(),i={},a=f.getLocale(e||this.locale);return n.forEach(((e,n)=>i[a[t?"monthsShort":"months"][n]]=e)),i}}),Object.assign(f.prototype,{decade(){return 10*Math.floor(this.year()/10)},decadeStart(){const e=this.decade();return(this.mutable?this:this.clone()).year(e).month(0).day(1)},decadeEnd(){const e=this.decade()+9;return(this.mutable?this:this.clone()).year(e).month(11).day(31)},decadeOfMonth(){const e=this.clone().add(1,"month").day(1).add(-1,"day").day()/3,t=this.day();return t<=e?1:t<=2*e?2:3}}),Object.assign(f,{from(e,n,i){let a,s,o,r,l,c,d,u,h,p,m,v,g,b,C,w,y,_,S;const getIndex=function(e,t){return e.map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase())},getPartIndex=function(e){const t={month:["M","mm","%m"],day:["D","dd","%d"],year:["YY","YYYY","yy","yyyy","%y"],hour:["h","hh","%h"],minute:["m","mi","i","ii","%i"],second:["s","ss","%s"],ms:["sss"]};let n,i,a=-1;for(let s=0;s-1&&r[l]?isNaN(parseInt(r[l]))?(r[l]=function(e){let t=-1;const n=f.getLocale(i||"en");return not$1(e)?-1:(t=getIndex(n.months,e),-1===t&&void 0!==n.monthsParental&&(t=getIndex(n.monthsParental,e)),-1===t&&(e=e.substr(0,3),t=getIndex(n.monthsShort,e)),-1===t?-1:t+1)}(r[l]),-1===r[l]&&(l=-1)):(S=parseInt(r[l]),(S<1||S>12)&&(l=-1)):l=-1,v=d>-1&&r[d]?r[d]:0,g=l>-1&&r[l]?r[l]:1,b=c>-1&&r[c]?r[c]:1,C=u>-1&&r[u]?r[u]:0,w=h>-1&&r[h]?r[h]:0,y=p>-1&&r[p]?r[p]:0,_=m>-1&&r[m]?r[m]:0,datetime$1(v,g-1,b,C,w,y,_)}});const b=f.prototype.format;Object.assign(f.prototype,{ampm(e){let t=this.hour()<12?"AM":"PM";return e?t.toLowerCase():t},hour12:function(e,t){let n=e;return 0===arguments.length?this.hour()%12:("pm"===(t=t||"am").toLowerCase()&&(n+=12),this.hour(n))},format:function(t,n){let i,a,s=this.hour12();return t=t||e,i={a:"["+this.ampm(!0)+"]",A:"["+this.ampm(!1)+"]",h:s,hh:lpad$1(s,0,2)},a=t.replace(/(\[[^\]]+])|a|A|h{1,2}/g,((e,t)=>t||i[e])),b.bind(this)(a,n)}});const C=f.prototype.format,w=f.align,y=f.alignEnd;Object.assign(f,{align(e,t){let n,i,a=datetime$1(e);if("isoWeek"===t)i=a.isoWeekDay(),n=w(a,"day").addDay(1-i);else n=w.apply(void 0,[a,t]);return n},alignEnd(e,t){let n,i,a=datetime$1(e);if("isoWeek"===t)i=a.isoWeekDay(),n=y(a,"day").addDay(7-i);else n=y.apply(void 0,[a,t]);return n}}),Object.assign(f.prototype,{isoWeekDay(e){let t=(this.weekDay()+6)%7+1;return!arguments.length||not$1(e)?t:this.addDay(e-t)},format(t,n){t=t||e;const i={I:this.isoWeekDay()};let a=t.replace(/(\[[^\]]+])|I{1,2}/g,((e,t)=>t||i[e]));return C.bind(this)(a,n)}}),Object.assign(f,{max(){return[].slice.call(arguments).map((e=>datetime$1(e))).sort(((e,t)=>t.time()-e.time()))[0]}}),Object.assign(f.prototype,{max(){return f.max.apply(this,[this].concat([].slice.call(arguments)))}}),Object.assign(f,{min(){return[].slice.call(arguments).map((e=>datetime$1(e))).sort(((e,t)=>e.time()-t.time()))[0]}}),Object.assign(f.prototype,{min(){return f.min.apply(this,[this].concat([].slice.call(arguments)))}});const _=f.align,S=f.alignEnd,k=f.prototype.add;Object.assign(f,{align(e,t){let n,i=datetime$1(e);if("quarter"===t)n=f.align(i,"day").day(1).month(3*i.quarter()-3);else n=_.apply(this,[i,t]);return n},alignEnd(e,t){let n,i=datetime$1(e);if("quarter"===t)n=f.align(i,"quarter").add(3,"month").add(-1,"ms");else n=S.apply(this,[i,t]);return n}}),Object.assign(f.prototype,{quarter(){const e=this.month();return e<=2?1:e<=5?2:e<=8?3:4},add(e,t){return"quarter"===t?this.month(this.month()+3*e):k.bind(this)(e,t)},addQuarter(e){return this.add(e,"quarter")}}),Object.assign(f,{sort(t,n){let i,a;const s={};switch("string"==typeof n||"object"!=typeof n||not$1(n)?(s.format=e,s.dir=n&&"DESC"===n.toUpperCase()?"DESC":"ASC",s.returnAs="datetime"):(s.format=n.format||e,s.dir=(n.dir||"ASC").toUpperCase(),s.returnAs=n.format?"string":n.returnAs||"datetime"),a=t.map((e=>datetime$1(e))).sort(((e,t)=>e.valueOf()-t.valueOf())),"DESC"===s.dir&&a.reverse(),s.returnAs){case"string":i=a.map((e=>e.format(s.format)));break;case"date":i=a.map((e=>e.val()));break;default:i=a}return i}});const T=f.prototype.format;Object.assign(f.prototype,{utcOffset(){return this.value.getTimezoneOffset()},timezone(){return this.toTimeString().replace(/.+GMT([+-])(\d{2})(\d{2}).+/,"$1$2:$3")},timezoneName(){return this.toTimeString().replace(/.+\((.+?)\)$/,"$1")},format(t,n){t=t||e;const i={Z:this.utcMode?"Z":this.timezone(),ZZ:this.timezone().replace(":",""),ZZZ:"[GMT]"+this.timezone(),z:this.timezoneName()};let a=t.replace(/(\[[^\]]+])|Z{1,3}|z/g,((e,t)=>t||i[e]));return T.bind(this)(a,n)}});const x=f.prototype.format;Object.assign(f.prototype,{weekNumber(e){let t,n,i,a,s,o;return e=+e||0,i=datetime$1(this.year(),0,1),a=i.weekDay()-e,a=a>=0?a:a+7,s=Math.floor((this.time()-i.time()-6e4*(this.utcOffset()-i.utcOffset()))/864e5)+1,a<4?(o=Math.floor((s+a-1)/7)+1,o>52&&(t=datetime$1(this.year()+1,0,1),n=t.weekDay()-e,n=n>=0?n:n+7,o=n<4?1:53)):o=Math.floor((s+a-1)/7),o},isoWeekNumber(){return this.weekNumber(1)},weeksInYear(e){return datetime$1(this.value).month(11).day(31).weekNumber(e)},format:function(t,n){let i,a,s=this.weekNumber(),o=this.isoWeekNumber();return t=t||e,i={W:s,WW:lpad$1(s,0,2),WWW:o,WWWW:lpad$1(o,0,2)},a=t.replace(/(\[[^\]]+])|W{1,4}/g,((e,t)=>t||i[e])),x.bind(this)(a,n)}}),Object.assign(f.prototype,{strftime(e,t){const n=e||"%Y-%m-%dT%H:%M:%S.%Q%t",a=f.getLocale(t||this.locale),s=this.year(),o=this.year2(),r=this.month(),l=this.day(),c=this.weekDay(),d=this.hour(),u=this.hour12(),h=this.minute(),p=this.second(),m=this.ms(),v=this.time(),g=lpad$1(l,0,2),b=lpad$1(r+1,0,2),C=lpad$1(d,0,2),w=lpad$1(u,0,2),y=lpad$1(h,0,2),_=lpad$1(p,0,2),S=lpad$1(m,0,3),k=this,thursday=function(){return datetime$1(k.value).day(k.day()-(k.weekDay()+6)%7+3)},T={"%a":a.weekdaysShort[c],"%A":a.weekdays[c],"%b":a.monthsShort[r],"%h":a.monthsShort[r],"%B":a.months[r],"%c":this.toString().substring(0,this.toString().indexOf(" (")),"%C":this.century(),"%d":g,"%D":[g,b,s].join("/"),"%e":l,"%F":[s,b,g].join("-"),"%G":thursday().year(),"%g":(""+thursday().year()).slice(2),"%H":C,"%I":w,"%j":lpad$1(this.dayOfYear(),0,3),"%k":C,"%l":w,"%m":b,"%n":r+1,"%M":y,"%p":this.ampm(),"%P":this.ampm(!0),"%s":Math.round(v/1e3),"%S":_,"%u":this.isoWeekDay(),"%V":this.isoWeekNumber(),"%w":c,"%x":this.toLocaleDateString(),"%X":this.toLocaleTimeString(),"%y":o,"%Y":s,"%z":this.timezone().replace(":",""),"%Z":this.timezoneName(),"%r":[w,y,_].join(":")+" "+this.ampm(),"%R":[C,y].join(":"),"%T":[C,y,_].join(":"),"%Q":S,"%q":m,"%t":this.timezone()};return n.replace(i,(e=>0===T[e]||T[e]?T[e]:e))}}),Object.assign(f,{isToday(e){const t=datetime$1(e).align("day"),n=datetime$1().align("day");return t.time()===n.time()}}),Object.assign(f.prototype,{isToday(){return f.isToday(this)},today(){const e=datetime$1();return this.mutable?this.val(e.val()):e}}),Object.assign(f,{isTomorrow(e){const t=datetime$1(e).align("day"),n=datetime$1().align("day").add(1,"day");return t.time()===n.time()}}),Object.assign(f.prototype,{isTomorrow(){return f.isTomorrow(this)},tomorrow(){return this.mutable?this.add(1,"day"):this.clone().immutable(!1).add(1,"day").immutable(!this.mutable)}}),Object.assign(f.prototype,{toDateString(){return this.value.toDateString()},toISOString(){return this.value.toISOString()},toJSON(){return this.value.toJSON()},toGMTString(){return this.value.toGMTString()},toLocaleDateString(){return this.value.toLocaleDateString()},toLocaleString(){return this.value.toLocaleString()},toLocaleTimeString(){return this.value.toLocaleTimeString()},toTimeString(){return this.value.toTimeString()},toUTCString(){return this.value.toUTCString()},toDate(){return new Date(this.value)}}),Object.assign(f,{timestamp:()=>(new Date).getTime()/1e3}),Object.assign(f.prototype,{unix(e){let t;return!arguments.length||not$1(e)?Math.floor(this.valueOf()/1e3):(t=1e3*e,this.mutable?this.time(t):datetime$1(this.value).time(t))},timestamp(){return this.unix()}}),Object.assign(f,{isYesterday(e){const t=datetime$1(e).align("day"),n=datetime$1().align("day").add(-1,"day");return t.time()===n.time()}}),Object.assign(f.prototype,{isYesterday(){return f.isYesterday(this)},yesterday(){return this.mutable?this.add(-1,"day"):this.clone().immutable(!1).add(-1,"day").immutable(!this.mutable)}});const getResult=e=>{let t,n=Math.floor(e/1e3),i=Math.floor(n/60),a=Math.floor(i/60),s=Math.floor(a/24),o=Math.floor(s/30),r=Math.floor(o/12);return r>=1&&(t=`${r} year`),o>=1&&r<1&&(t=`${o} mon`),s>=1&&s<=30&&(t=`${s} days`),a&&a<24&&(t=`${a} hour`),i&&i>=40&&i<60&&(t="less a hour"),i&&i<40&&(t=`${i} min`),n&&n>=30&&n<60&&(t=`${n} sec`),n<30&&(t="few sec"),t};Object.assign(f,{timeLapse(e){let t=datetime$1(e),n=datetime$1();return getResult(n-t)}}),Object.assign(f.prototype,{timeLapse(){let e=datetime$1()-+this;return getResult(e)}});const E={parseTime(e){if(!isNaN(e))return Math.abs(+e);return e.match(/([0-9]+d)|([0-9]{1,2}h)|([0-9]{1,2}m)|([0-9]{1,2}s)/gm).reduce(((e,t)=>{let n;return t.includes("d")?n=864e5*parseInt(t):t.includes("h")?n=36e5*parseInt(t):t.includes("m")?n=6e4*parseInt(t):t.includes("s")&&(n=1e3*parseInt(t)),e+n}),0)}};Object.assign(f,E);var A;f.info=()=>{console.info("%c Datetime Library %c v3.0.5 %c 08.06.2024, 20:43:59 ","color: #ffffff; font-weight: bold; background: #003152","color: white; background: darkgreen","color: white; background: #0080fe;")},globalThis.Datetime=f,globalThis.datetime=datetime$1,A=f.getLocale,f.getLocale=function(e){var t;return Metro?(Metro.locales[e]||(e="en-US"),{months:(t=Metro.locales[e].calendar).months.filter((function(e,t){return t<12})),monthsShort:t.months.filter((function(e,t){return t>11})),weekdays:t.days.filter((function(e,t){return t<7})),weekdaysShort:t.days.filter((function(e,t){return t>13})),weekdaysMin:t.days.filter((function(e,t){return t>6&&t<14})),weekStart:t.weekStart}):(e="en",A.call(this,e))}; /*! * String - String routines * Copyright 2024 by Serhii Pimenov @@ -17,7 +17,7 @@ const M="\\s\\uFEFF\\xA0",D="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D * Copyright 2012-2024 by Serhii Pimenov * Licensed under MIT !*/ -const ae=["opacity","zIndex"];function isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function not(e){return null==e}function camelCase$1(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function isPlainObject(e){let t;return!(!e||"[object Object]"!==Object.prototype.toString.call(e))&&(t=void 0!==e.prototype,!t||t.constructor&&"function"==typeof t.constructor)}function isEmptyObject(e){for(const t in e)if(hasProp(e,t))return!1;return!0}function isArrayLike$1(e){return e instanceof Object&&"length"in e}function str2arr(e,t){return t=t||" ",e.split(t).map((function(e){return(""+e).trim()})).filter((function(e){return""!==e}))}function parseUnit$1(e,t){return t||(t=[0,""]),e=String(e),t[0]=parseFloat(e),t[1]=e.match(/[\d.\-+]*\s*(.*)/)[1]||"",t}function getUnit$1(e,t){const n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);return void 0!==n[1]?n[1]:t}function setStyleProp(e,t,n){t=camelCase$1(t),["scrollLeft","scrollTop"].indexOf(t)>-1?e[t]=parseInt(n):e.style[t]=isNaN(n)||ae.indexOf(""+t)>-1?n:n+"px"}function acceptData(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function dataAttr(e,t,n){let i;return not(n)&&1===e.nodeType&&(i="data-"+t.replace(/[A-Z]/g,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))?(n=function getData(e){try{return JSON.parse(e)}catch(t){return e}}(n),oe.set(e,t,n)):n=void 0),n}function normName(e){return"string"!=typeof e?void 0:e.replace(/-/g,"").toLowerCase()}function hasProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function isLocalhost(e){const t=e||globalThis.location.hostname;return"localhost"===t||"127.0.0.1"===t||"[::1]"===t||""===t||null!==t.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)}const se=Element.prototype.matches,$=(e,t)=>new $.init(e,t);function createScript(e){const t=document.createElement("script");if(t.type="text/javascript",not(e))return $(t);const n=$(e)[0];return n.src?t.src=n.src:t.textContent=n.innerText,document.body.appendChild(t),n.parentNode&&n.parentNode.removeChild(n),t}$.fn=$.prototype=Object.create(Array.prototype),$.prototype.constructor=$,$.prototype.uid="",$.extend=$.fn.extend=function(){let e,t,n=arguments[0]||{},i=1,a=arguments.length;for("object"!=typeof n&&"function"!=typeof n&&(n={}),i===a&&(n=this,i--);i0?e[0]:"string"==typeof e?$(e)[0]:void 0,not(t)||t&&t.parentNode&&$.each(t.parentNode.children,(function(e){this===t&&(n=e)})),n)},indexOf:function(e){let t,n=-1;return 0===this.length?n:(t=not(e)?this[0]:e instanceof $&&e.length>0?e[0]:"string"==typeof e?$(e)[0]:void 0,not(t)||this.each((function(e){this===t&&(n=e)})),n)},get:function(e){return void 0===e?this.items():e<0?this[e+this.length]:this[e]},eq:function(e){return!not(e)&&this.length>0?$.extend($(this.get(e)),{_prevObj:this}):this},is:function(e){let t=!1;return 0!==this.length&&(e instanceof $?this.same(e):(":selected"===e?this.each((function(){this.selected&&(t=!0)})):":checked"===e?this.each((function(){this.checked&&(t=!0)})):":visible"===e?this.each((function(){isVisible(this)&&(t=!0)})):":hidden"===e?this.each((function(){const e=getComputedStyle(this);("hidden"===this.getAttribute("type")||this.hidden||"none"===e.display||"hidden"===e.visibility||0===parseInt(e.opacity))&&(t=!0)})):"string"==typeof e&&-1===[":selected"].indexOf(e)?this.each((function(){se.call(this,e)&&(t=!0)})):isArrayLike$1(e)?this.each((function(){const n=this;$.each(e,(function(){n===this&&(t=!0)}))})):"object"==typeof e&&1===e.nodeType&&this.each((function(){this===e&&(t=!0)})),t))},same:function(e){let t=!0;return e instanceof $||(e=$(e)),this.length===e.length&&(this.each((function(){-1===e.items().indexOf(this)&&(t=!1)})),t)},last:function(){return this.eq(this.length-1)},first:function(){return this.eq(0)},odd:function(){const e=this.filter((function(e,t){return t%2==0}));return $.extend(e,{_prevObj:this})},even:function(){const e=this.filter((function(e,t){return t%2!=0}));return $.extend(e,{_prevObj:this})},filter:function(e){if("string"==typeof e){const t=e;e=function(e){return se.call(e,t)}}return $.extend($.merge($(),[].filter.call(this,e)),{_prevObj:this})},find:function(e){let t,n=[];return e instanceof $?e:(0===this.length?t=this:(this.each((function(){void 0!==this.querySelectorAll&&(n=n.concat([].slice.call(this.querySelectorAll(e))))})),t=$.merge($(),n)),$.extend(t,{_prevObj:this}))},contains:function(e){return this.find(e).length>0},children:function(e){let t,n=[];return e instanceof $?e:(this.each((function(){const e=this;for(t=0;t0&&t.push(this)})),$.extend($.merge($(),t),{_prevObj:this})},back:function(e){let t;if(!0===e)for(t=this._prevObj;t&&t._prevObj;)t=t._prevObj;else t=this._prevObj?this._prevObj:this;return t}}),$.extend({script:function(e){if(not(e))return createScript();const t=$(e)[0];t.tagName&&"SCRIPT"===t.tagName?createScript(t):$.each($(t).find("script"),(function(){createScript(this)}))}}),$.fn.extend({script:function(){return this.each((function(){$.script(this)}))}}),$.fn.extend({_prop:function(e,t){return 1===arguments.length?0===this.length?void 0:this[0][e]:(not(t)&&(t=""),this.each((function(){const n=this;n[e]=t,"innerHTML"===e&&$.script(n)})))},prop:function(e,t){return 1===arguments.length?this._prop(e):this._prop(e,void 0===t?"":t)},val:function(e){return not(e)?0===this.length?void 0:this[0].value:this.each((function(){const t=$(this);void 0!==this.value?this.value=e:t.html(e)}))},html:function(e){const t=[];return 0===arguments.length?this._prop("innerHTML"):(e instanceof $?e.each((function(){t.push($(this).outerHTML())})):t.push(e),this._prop("innerHTML",1===t.length&¬(t[0])?"":t.join("\n")),this)},outerHTML:function(){return this._prop("outerHTML")},text:function(e){return 0===arguments.length?this._prop("textContent"):this._prop("textContent",void 0===e?"":e)},innerText:function(e){return 0===arguments.length?this._prop("innerText"):this._prop("innerText",void 0===e?"":e)},empty:function(){return this.each((function(){void 0!==this.innerHTML&&(this.innerHTML="")}))},clear:function(){return this.empty()}}),$.each=function(e,t){let n=0;if(isArrayLike$1(e))[].forEach.call(e,(function(e,n){t.apply(e,[n,e])}));else for(const i in e)hasProp(e,i)&&t.apply(e[i],[i,e[i],n++]);return e},$.fn.extend({each:function(e){return $.each(this,e)}});const Data$1=function(e){this.expando="DATASET:UID:"+e.toUpperCase(),Data$1.uid++};Data$1.uid=-1,Data$1.prototype={cache:function(e){let t=e[this.expando];return t||(t={},acceptData(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){let i,a=this.cache(e);if("string"==typeof t)a[camelCase$1(t)]=n;else for(i in t)hasProp(t,i)&&(a[camelCase$1(i)]=t[i]);return a},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][camelCase$1(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){let n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(camelCase$1):(t=camelCase$1(t))in i?[t]:t.match(/[^\x20\t\r\n\f]+/g)||[]).length;for(;n--;)delete i[t[n]]}return(void 0===t||isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando]),!0}},hasData:function(e){const t=e[this.expando];return void 0!==t&&!isEmptyObject(t)}};const oe=new Data$1("m4q");$.extend({hasData:function(e){return oe.hasData(e)},data:function(e,t,n){return oe.access(e,t,n)},removeData:function(e,t){return oe.remove(e,t)},dataSet:function(e){if(not(e))return oe;if(["INTERNAL","M4Q"].indexOf(e.toUpperCase())>-1)throw Error("You can not use reserved name for your dataset");return new Data$1(e)}}),$.fn.extend({data:function(e,t){let n,i,a,s,o,r;if(0!==this.length){if(i=this[0],0===arguments.length){if(this.length&&(a=oe.get(i),1===i.nodeType))for(s=i.attributes,r=s.length;r--;)s[r]&&(o=s[r].name,0===o.indexOf("data-")&&(o=camelCase$1(o.slice(5)),dataAttr(i,o,a[o])));return a}return 1===arguments.length?(n=oe.get(i,e),void 0===n&&1===i.nodeType&&i.hasAttribute("data-"+e)&&(n=i.getAttribute("data-"+e)),n):this.each((function(){oe.set(this,e,t)}))}},removeData:function(e){return this.each((function(){oe.remove(this,e)}))},origin:function(e,t,n){if(0===this.length)return this;if(not(e)&¬(t))return $.data(this[0]);if(not(t)){const t=$.data(this[0],"origin-"+e);return not(t)?n:t}return this.data("origin-"+e,t),this}}),$.extend({device:/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),localhost:isLocalhost(),isLocalhost:isLocalhost,touchable:function isTouch(){return"ontouchstart"in window||navigator.maxTouchPoints>0}(),isPrivateAddress:function isPrivateAddress(e){const t=e||globalThis.location.hostname;return/(^localhost)|(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2\d\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/.test(t)},uniqueId:function(e){let t=(new Date).getTime();return not(e)&&(e="m4q"),(""!==e?e+"-":"")+"xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},toArray:function(e){let t,n=[];for(t=0;t=0;n-=1)if(""!==t.elements[n].name)switch(t.elements[n].nodeName){case"INPUT":switch(t.elements[n].type){case"checkbox":case"radio":t.elements[n].checked&&a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"file":break;default:a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}break;case"TEXTAREA":a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"SELECT":switch(t.elements[n].type){case"select-one":a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"select-multiple":for(i=t.elements[n].options.length-1;i>=0;i-=1)t.elements[n].options[i].selected&&a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].options[i].value))}break;case"BUTTON":switch(t.elements[n].type){case"reset":case"submit":case"button":a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}}return a},serialize:function(e){return $.serializeToArray(e).join("&")}}),$.fn.extend({items:function(){return $.toArray(this)}});const re=Event.prototype.stopPropagation,le=Event.prototype.preventDefault;Event.prototype.stopPropagation=function(){this.isPropagationStopped=!0,re.apply(this,arguments)},Event.prototype.preventDefault=function(){this.isPreventedDefault=!0,le.apply(this,arguments)},Event.prototype.stop=function(e){return e?this.stopImmediatePropagation():this.stopPropagation()},$.extend({events:[],eventHooks:{},eventUID:-1,setEventHandler:function(e){let t,n,i,a=-1;if(this.events.length>0)for(t=0;t-1?(this[0][n](),this):(i=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:t}),this.each((function(){this.dispatchEvent(i)})))}}),"blur focus resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu touchstart touchend touchmove touchcancel".split(" ").forEach((function(e){$.fn[e]=function(t,n,i){return arguments.length>0?this.on(e,t,n,i):this.fire(e)}})),$.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),$.ready=function(e,t){document.addEventListener("DOMContentLoaded",e,t||!1)},$.load=function(e){return $(window).on("load",e)},$.unload=function(e){return $(window).on("unload",e)},$.fn.extend({unload:function(e){return 0===this.length||this[0].self!==window?void 0:$.unload(e)}}),$.beforeunload=function(e){return"string"==typeof e?$(window).on("beforeunload",(function(t){return t.returnValue=e,e})):$(window).on("beforeunload",e)},$.fn.extend({beforeunload:function(e){return 0===this.length||this[0].self!==window?void 0:$.beforeunload(e)}}),$.fn.extend({ready:function(e){if(this.length&&this[0]===document&&"function"==typeof e)return $.ready(e)}}),$.ajax=function(e){return new Promise((function(t,n){const i=new XMLHttpRequest;let a=(e.method||"GET").toUpperCase();const s=[],o=!!not(e.async)||e.async;let r,l=e.url;const exec=function(e,t){"function"==typeof e&&e.apply(null,t)},isGet=function(e){return-1!==["GET","JSON"].indexOf(e)};if(e.data instanceof HTMLFormElement){let t=e.data.getAttribute("action").trim(),n=e.data.getAttribute("method").trim();not(l)&&t&&(l=t),n&&(a=n.toUpperCase())}if(e.timeout&&(i.timeout=e.timeout),e.withCredentials&&(i.withCredentials=e.withCredentials),e.data instanceof HTMLFormElement)r=$.serialize(e.data);else if(e.data instanceof HTMLElement&&e.data.getAttribute("type")&&"file"===e.data.getAttribute("type").toLowerCase()){const t=e.data.getAttribute("name");r=new FormData;for(let n=0;n-1?$(e)[t]():getComputedStyle(e,n)[t]}if("string"!=typeof e||0!==this.length){if(0===this.length)return this;if(n=this[0],not(e)||"all"===e)return getComputedStyle(n,t);{let i={},a=e.split(", ").map((function(e){return(""+e).trim()}));return 1===a.length?_getStyle(n,a[0],t):($.each(a,(function(){i[this]=_getStyle(n,this,t)})),i)}}},removeStyleProperty:function(e){if(not(e)||0===this.length)return this;const t=e.split(", ").map((function(e){return(""+e).trim()}));return this.each((function(){const e=this;$.each(t,(function(){e.style.removeProperty(this)}))}))},css:function(e,t){return"string"==typeof(e=e||"all")&¬(t)?this.style(e):this.each((function(){const n=this;"object"==typeof e?$.each(e,(function(e,t){setStyleProp(n,e,t)})):"string"==typeof e&&setStyleProp(n,e,t)}))},scrollTop:function(e){return not(e)?0===this.length?void 0:this[0]===window?scrollY:this[0].scrollTop:this.each((function(){this.scrollTop=e}))},scrollLeft:function(e){return not(e)?0===this.length?void 0:this[0]===window?scrollX:this[0].scrollLeft:this.each((function(){this.scrollLeft=e}))}}),$.fn.extend({addClass:function(){},removeClass:function(){},toggleClass:function(){},containsClass:function(e){return this.hasClass(e)},hasClass:function(e){let t=!1;const n=e.split(" ").filter((function(e){return""!==(""+e).trim()}));return!not(e)&&(this.each((function(){const e=this;$.each(n,(function(){!t&&e.classList&&e.classList.contains(this)&&(t=!0)}))})),t)},clearClasses:function(){return this.each((function(){this.className=""}))},cls:function(e){return 0===this.length?void 0:e?this[0].className.split(" "):this[0].className},removeClassBy:function(e){return this.each((function(){const t=$(this),n=t.cls(!0);$.each(n,(function(){const n=this;n.indexOf(e)>-1&&t.removeClass(n)}))}))},classNames:function(){const e=Array.prototype.slice.call(arguments,0),t=[];return $.each(e,(function(e,n){"string"==typeof n?t.push(n):isPlainObject(n)&&$.each(n,(function(e,n){n&&t.push(e)}))})),this.each((function(){this.className+=" "+t.join(" ")}))}}),["add","remove","toggle"].forEach((function(e){$.fn[e+"Class"]=function(t){const n=t?Array.isArray(t)?t:t.split(" ").filter((function(e){return!!e})):[];return n.length?this.each((function(){const t=this;void 0!==t.classList?$.each(n,(function(n,i){t.classList[e](i)})):t.className+=n.join(" ")})):this}})),$.parseHTML=function(e){let t,n,i,a,s=[];if("string"!=typeof e)return[];if(e=e.trim(),i=document.implementation.createHTMLDocument(""),t=i.createElement("base"),t.href=document.location.href,i.head.appendChild(t),a=i.body,n=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i.exec(e),n)s.push(document.createElement(n[1]));else{a.innerHTML=e;for(let e=0;e$(e).attr("id"))):this.each((function(){$(this).attr("id",e)}))}}),$.extend({meta:function(e){return not(e)?$("meta"):$("meta[name='$name']".replace("$name",e))},metaBy:function(e){return not(e)?$("meta"):$("meta[$name]".replace("$name",e))},doctype:function(){return $("doctype")},html:function(){return $("html")},head:function(){return $("html").find("head")},body:function(){return $("body")},document:function(){return $(document)},window:function(){return $(window)},charset:function(e){if(e){const t=$("meta[charset]");t.length>0&&t.attr("charset",e)}return document.characterSet}}),$.extend({bind:function(e,t){return this.proxy(e,t)}}),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){["append","prepend"].forEach((function(t){hasProp(e,t)||Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:function(){const e=Array.prototype.slice.call(arguments),n=document.createDocumentFragment();e.forEach((function(e){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))})),"prepend"===t?this.insertBefore(n,this.firstChild):this.appendChild(n)}})}))}));const normalizeElements=function(e){let t;return"string"==typeof e?t=$.isSelector(e)?$(e):$.parseHTML(e):e instanceof HTMLElement?t=[e]:isArrayLike$1(e)&&(t=e),t};$.fn.extend({appendText:function(e){return this.each((function(t,n){n.innerHTML+=e}))},prependText:function(e){return this.each((function(t,n){n.innerHTML=e+n.innerHTML}))},append:function(e){const t=normalizeElements(e);return this.each((function(e,n){$.each(t,(function(){if(n===this)return;const t=0===e?this:this.cloneNode(!0);$.script(t),t.tagName&&"SCRIPT"!==t.tagName&&n.append(t)}))}))},appendTo:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t,n){e!==this&&n.append(0===t?e:e.cloneNode(!0))}))}))},prepend:function(e){const t=normalizeElements(e);return this.each((function(e,n){$.each(t,(function(){if(n===this)return;const t=0===e?this:this.cloneNode(!0);$.script(t),t.tagName&&"SCRIPT"!==t.tagName&&n.prepend(t)}))}))},prependTo:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t,n){e!==this&&$(n).prepend(0===t?e:e.cloneNode(!0))}))}))},insertBefore:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t){if(e===this)return;const n=this.parentNode;n&&n.insertBefore(0===t?e:e.cloneNode(!0),this)}))}))},insertAfter:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t,n){if(e===this)return;const i=this.parentNode;i&&i.insertBefore(0===t?e:e.cloneNode(!0),n.nextSibling)}))}))},after:function(e){return this.each((function(){const t=this;"string"==typeof e?t.insertAdjacentHTML("afterend",e):$(e).insertAfter(t)}))},before:function(e){return this.each((function(){const t=this;"string"==typeof e?t.insertAdjacentHTML("beforebegin",e):$(e).insertBefore(t)}))},clone:function(e,t){const n=[];return not(e)&&(e=!1),not(t)&&(t=!1),this.each((function(){const i=this.cloneNode(e),a=$(i);let s;t&&$.hasData(this)&&(s=$(this).data(),$.each(s,(function(e,t){a.data(e,t)}))),n.push(i)})),$.merge($(),n)},import:function(e){const t=[];return not(e)&&(e=!1),this.each((function(){t.push(document.importNode(this,e))})),$.merge($(),t)},adopt:function(){const e=[];return this.each((function(){e.push(document.adoptNode(this))})),$.merge($(),e)},remove:function(e){let t,n,i=0,a=[];if(0!==this.length){for(n=e?this.filter((function(t){return se.call(t,e)})):this.items();null!=(t=n[i]);i++)t.parentNode&&(a.push(t.parentNode.removeChild(t)),$.removeData(t));return $.merge($(),a)}},wrap:function(e){if(0===this.length)return;const t=$(normalizeElements(e));if(!t.length)return;const n=[];return this.each((function(){let e,i;for(i=t.clone(!0,!0),i.insertBefore(this),e=i;e.children().length;)e=e.children().eq(0);e.append(this),n.push(i)})),$(n)},wrapAll:function(e){let t,n,i;if(0!==this.length&&(t=$(normalizeElements(e)),t.length)){for(n=t.clone(!0,!0),n.insertBefore(this[0]),i=n;i.children().length;)i=i.children().eq(0);return this.each((function(){i.append(this)})),n}},wrapInner:function(e){if(0===this.length)return;const t=$(normalizeElements(e));if(!t.length)return;const n=[];return this.each((function(){const e=$(this),i=e.html(),a=t.clone(!0,!0);e.html(a.html(i)),n.push(a)})),$(n)}}),$.extend({animation:{duration:1e3,ease:"linear",elements:{}}}),"object"==typeof window.setupAnimation&&$.each(window.setupAnimation,(function(e,t){void 0===$.animation[e]||not(t)||($.animation[e]=t)}));const ce=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],de=["opacity","zIndex"],ue=["opacity","volume"],he=["scrollLeft","scrollTop"],pe=["opacity","volume"];function _validElement(e){return e instanceof HTMLElement||e instanceof SVGElement}function _applyStyles$1(e,t,n){$.each(t,(function(t,i){!function _setStyle$1(e,t,n,i,a){not(a)&&(a=!1),t=camelCase$1(t),a&&(n=parseInt(n)),_validElement(e)?void 0!==e[t]?e[t]=n:e.style[t]="transform"===t||t.toLowerCase().indexOf("color")>-1?n:n+i:e[t]=n}(e,t,i[0]+i[2]*n,i[3],i[4])}))}function _getElementTransforms$1(e){if(!_validElement(e))return{};const t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,i={};let a;for(;a=n.exec(t);)i[a[1]]=a[2];return i}function _getColorArrayFromHex$1(e){return/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e||"#000000").slice(1).map((function(e){return parseInt(e,16)}))}function _expandColorValue$1(e){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;return"#"===e[0]&&4===e.length?"#"+e.replace(t,(function(e,t,n,i){return t+t+n+n+i+i})):"#"===e[0]?e:"#"+e}function applyProps$1(e,t,n){_applyStyles$1(e,t.props,n),function _applyTransform$1(e,t,n){const i=[],a=_getElementTransforms$1(e);$.each(t,(function(e,t){let a=t[0],s=t[1],o=t[2],r=t[3];((e=""+e).indexOf("rotate")>-1||e.indexOf("skew")>-1)&&""===r&&(r="deg"),e.indexOf("scale")>-1&&(r=""),e.indexOf("translate")>-1&&""===r&&(r="px"),"turn"===r?i.push(e+"("+s*n+r+")"):i.push(e+"("+(a+o*n)+r+")")})),$.each(a,(function(e,n){void 0===t[e]&&i.push(e+"("+n+")")})),e.style.transform=i.join(" ")}(e,t.transform,n),function _applyColors$1(e,t,n){$.each(t,(function(t,i){let a,s,o=[0,0,0];for(a=0;a<3;a++)o[a]=Math.floor(i[0][a]+i[2][a]*n);s="rgb("+o.join(",")+")",e.style[t]=s}))}(e,t.color,n)}function createAnimationMap$1(e,t,n){const i={props:{},transform:{},color:{}};let a,s,o,r,l,c;const d=_getElementTransforms$1(e);return not(n)&&(n="normal"),$.each(t,(function(t,u){const h=ce.indexOf(""+t)>-1,p=de.indexOf(""+t)>-1,f=(""+t).toLowerCase().indexOf("color")>-1;if(Array.isArray(u)&&1===u.length&&(u=u[0]),Array.isArray(u)?(s=f?_getColorArrayFromHex$1(_expandColorValue$1(u[0])):parseUnit$1(u[0]),o=f?_getColorArrayFromHex$1(_expandColorValue$1(u[1])):parseUnit$1(u[1])):(s=h?d[t]||0:f?function _getColorArrayFromElement$1(e,t){return getComputedStyle(e)[t].replace(/[^\d.,]/g,"").split(",").map((function(e){return parseInt(e)}))}(e,t):function _getStyle$1(e,t,n){return void 0!==e[t]?he.indexOf(t)>-1?"scrollLeft"===t?e===window?pageXOffset:e.scrollLeft:e===window?pageYOffset:e.scrollTop:e[t]||0:e.style[t]||getComputedStyle(e,n)[t]}(e,t,void 0),s=f?s:parseUnit$1(s),o=f?_getColorArrayFromHex$1(u):parseUnit$1(function _getRelativeValue$1(e,t){const n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;const i=getUnit$1(e)||0,a=parseFloat(t),s=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return a+s+i;case"-":return a-s+i;case"*":return a*s+i;case"/":return a/s+i}}(u,Array.isArray(s)?s[0]:s))),pe.indexOf(""+t)>-1&&s[0]===o[0]&&(s[0]=o[0]>0?0:1),"reverse"===n&&(c=s,s=o,o=c),l=e instanceof HTMLElement&&""===o[1]&&!p&&!h?"px":o[1],f)for(r=[0,0,0],a=0;a<3;a++)r[a]=o[a]-s[a];else r=o[0]-s[0];h?i.transform[t]=[s[0],o[0],r,l]:f?i.color[t]=[s,o,r,l]:i.props[t]=[s[0],o[0],r,l,-1===ue.indexOf(""+t)]})),i}function minMax$1(e,t,n){return Math.min(Math.max(e,t),n)}const fe={linear:function(){return function(e){return e}}};fe.default=fe.linear;const me={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){let t,n=4;for(;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){not(e)&&(e=1),not(t)&&(t=.5);const n=minMax$1(e,1,10),i=minMax$1(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-i/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/i)}}};["Quad","Cubic","Quart","Quint","Expo"].forEach((function(e,t){me[e]=function(){return function(e){return Math.pow(e,t+2)}}})),Object.keys(me).forEach((function(e){const t=me[e];fe["easeIn"+e]=t,fe["easeOut"+e]=function(e,n){return function(i){return 1-t(e,n)(1-i)}},fe["easeInOut"+e]=function(e,n){return function(i){return i<.5?t(e,n)(2*i)/2:1-t(e,n)(-2*i+2)/2}}}));let ve={id:null,el:null,draw:{},dur:$.animation.duration,ease:$.animation.ease,loop:0,pause:0,dir:"normal",defer:0,onStart:function(){},onStop:function(){},onStopAll:function(){},onPause:function(){},onPauseAll:function(){},onResume:function(){},onResumeAll:function(){},onFrame:function(){},onDone:function(){}};function animate$1(e){return new Promise((function(t){const n=this,i=$.assign({},ve,{dur:$.animation.duration,ease:$.animation.ease},e);let a,s=i.id,o=i.el,r=i.draw,l=i.dur,c=i.ease,d=i.loop,u=i.onStart,h=i.onFrame,p=i.onDone,f=i.pause,m=i.dir,v=i.defer,g={},b="linear",C=[],w=fe.linear,y="alternate"===m?"normal":m,_=!1,S=s||+performance.now()*Math.pow(10,14);if(not(o))throw new Error("Unknown element!");if("string"==typeof o&&(o=document.querySelector(o)),"function"!=typeof r&&"object"!=typeof r)throw new Error("Unknown draw object. Must be a function or object!");0===l&&(l=1),"alternate"===m&&"number"==typeof d&&(d*=2),"string"==typeof c?(a=/\(([^)]+)\)/.exec(c),b=c.split("(")[0],C=a?a[1].split(",").map((function(e){return parseFloat(e)})):[],w=fe[b]||fe.linear):w="function"==typeof c?c:fe.linear,$.animation.elements[S]={element:o,id:null,stop:0,pause:0,loop:0,t:-1,started:0,paused:0};const play=function(){"object"==typeof r&&(g=createAnimationMap$1(o,r,y)),"function"==typeof u&&u.apply(o),$.animation.elements[S].loop+=1,$.animation.elements[S].started=performance.now(),$.animation.elements[S].duration=l,$.animation.elements[S].id=requestAnimationFrame(animate)},done=function(){cancelAnimationFrame($.animation.elements[S].id),delete $.animation.elements[s],"function"==typeof p&&p.apply(o),t(n)},animate=function(e){let t,n,{stop:i,pause:a,started:s}=$.animation.elements[S];if($.animation.elements[S].paused&&(s=e-$.animation.elements[S].t*l,$.animation.elements[S].started=s),n=((e-s)/l).toFixed(4),n>1&&(n=1),n<0&&(n=0),t=w.apply(null,C)(n),$.animation.elements[S].t=n,$.animation.elements[S].p=t,a)$.animation.elements[S].id=requestAnimationFrame(animate);else{if(i>0)return 2===i&&("function"==typeof r?r.bind(o)(1,1):applyProps$1(o,g,1)),void done();"function"==typeof r?r.bind(o)(n,t):applyProps$1(o,g,t),"function"==typeof h&&h.apply(o,[n,t]),n<1&&($.animation.elements[S].id=requestAnimationFrame(animate)),1===parseInt(n)&&(d?("alternate"===m&&(y="normal"===y?"reverse":"normal"),"boolean"==typeof d||d>$.animation.elements[S].loop?setTimeout((function(){play()}),f):done()):"alternate"!==m||_?done():(y="normal"===y?"reverse":"normal",_=!0,play()))}};v>0?setTimeout((function(){play()}),v):play()}))}function stopAnimation(e,t){const n=$.animation.elements[e];void 0!==n&&(not(t)&&(t=!0),n.stop=!0===t?2:1,"function"==typeof n.onStop&&n.onStop.apply(n.element))}function pauseAnimation(e){const t=$.animation.elements[e];void 0!==t&&(t.pause=1,t.paused=performance.now(),"function"==typeof t.onPause&&t.onPause.apply(t.element))}function resumeAnimation(e){const t=$.animation.elements[e];void 0!==t&&(t.pause=0,t.paused=0,"function"==typeof t.onResume&&t.onResume.apply(t.element))}let ge={loop:!1,onChainItem:null,onChainItemComplete:null,onChainComplete:null};$.easing={},$.extend($.easing,fe),$.extend({animate:function(e){let t,n,i,a,s;return arguments.length>1?(t=$(arguments[0])[0],n=arguments[1],i=arguments[2]||$.animation.duration,a=arguments[3]||$.animation.ease,s=arguments[4],"function"==typeof i&&(s=i,a=$.animation.ease,i=$.animation.duration),"function"==typeof a&&(s=a,a=$.animation.ease),animate$1({el:t,draw:n,dur:i,ease:a,onDone:s})):animate$1(e)},chain:function chain$1(e,t){const n=$.extend({},ge,t);if("boolean"!=typeof n.loop&&n.loop--,!Array.isArray(e))return console.warn("Chain array is not defined!"),!1;e.reduce((function(e,t){return e.then((function(){return"function"==typeof n.onChainItem&&n.onChainItem(t),animate$1(t).then((function(){"function"==typeof n.onChainItemComplete&&n.onChainItemComplete(t)}))}))}),Promise.resolve()).then((function(){"function"==typeof n.onChainComplete&&n.onChainComplete(),n.loop&&chain$1(e,n)}))},stop:stopAnimation,stopAll:function stopAnimationAll(e,t){$.each($.animation.elements,(function(n,i){t?"string"==typeof t?se.call(i.element,t)&&stopAnimation(n,e):t.length?$.each(t,(function(){i.element===this&&stopAnimation(n,e)})):t instanceof Element&&i.element===t&&stopAnimation(n,e):stopAnimation(n,e)}))},resume:resumeAnimation,resumeAll:function resumeAnimationAll(e){$.each($.animation.elements,(function(t,n){e?"string"==typeof e?se.call(n.element,e)&&resumeAnimation(t):e.length?$.each(e,(function(){n.element===this&&resumeAnimation(t)})):e instanceof Element&&n.element===e&&resumeAnimation(t):resumeAnimation(t)}))},pause:pauseAnimation,pauseAll:function pauseAnimationAll(e){$.each($.animation.elements,(function(t,n){e?"string"==typeof e?se.call(n.element,e)&&pauseAnimation(t):e.length?$.each(e,(function(){n.element===this&&pauseAnimation(t)})):e instanceof Element&&n.element===e&&pauseAnimation(t):pauseAnimation(t)}))}}),$.fn.extend({animate:function(e){const t=this;let n,i,a,s;const o=e;let r;return r=!Array.isArray(e)&&(arguments.length>1||1===arguments.length&&void 0===arguments[0].draw),r?(n=arguments[0],i=arguments[1]||$.animation.duration,a=arguments[2]||$.animation.ease,s=arguments[3],"function"==typeof i&&(s=i,i=$.animation.duration,a=$.animation.ease),"function"==typeof a&&(s=a,a=$.animation.ease),this.each((function(){return $.animate({el:this,draw:n,dur:i,ease:a,onDone:s})}))):Array.isArray(e)?($.each(e,(function(){const e=this;t.each((function(){e.el=this,$.animate(e)}))})),this):this.each((function(){o.el=this,$.animate(o)}))},chain:function(e,t){return this.each((function(){const n=this;$.each(e,(function(){this.el=n})),$.chain(e,t)}))},stop:function(e){return this.each((function(){const t=this;$.each($.animation.elements,(function(n,i){i.element===t&&stopAnimation(n,e)}))}))},pause:function(){return this.each((function(){const e=this;$.each($.animation.elements,(function(t,n){n.element===e&&pauseAnimation(t)}))}))},resume:function(){return this.each((function(){const e=this;$.each($.animation.elements,(function(t,n){n.element===e&&resumeAnimation(t)}))}))}}),$.extend({hidden:function(e,t,n){return e=$(e)[0],"string"==typeof t&&(t="true"===t.toLowerCase()),"function"==typeof t&&(n=t,t=!e.hidden),e.hidden=t,"function"==typeof n&&($.bind(n,e),n.call(e,arguments)),this},hide:function(e,t){const n=$(e),i=(e=n[0]).style.display,a=getComputedStyle(e,null).display;return n.origin("display",{inline:i,css:a}),e.style.display="none","function"==typeof t&&($.bind(t,e),t.call(e,arguments)),this},show:function(e,t){const n=$(e).origin("display");if((e=$(e)[0]).style.display="",n){const t=n.inline||"",i=n.css||"";t&&"none"!==t?e.style.display=t:"none"===i&&(e.style.display="block")}else e.style.display="block";return 0===parseInt(e.style.opacity)&&(e.style.opacity="1"),"function"==typeof t&&($.bind(t,e),t.call(e,arguments)),this},visible:function(e,t,n){return void 0===t&&(t=!0),e.style.visibility=t?"visible":"hidden","function"==typeof n&&($.bind(n,e),n.call(e,arguments)),this},toggle:function(e,t){const n="none"!==getComputedStyle(e,null).display?"hide":"show";return $[n](e,t)}}),$.fn.extend({hide:function(){let e;return $.each(arguments,(function(){"function"==typeof this&&(e=this)})),this.each((function(){$.hide(this,e)}))},show:function(){let e;return $.each(arguments,(function(){"function"==typeof this&&(e=this)})),this.each((function(){$.show(this,e)}))},visible:function(e,t){return this.each((function(){$.visible(this,e,t)}))},toggle:function(e){return this.each((function(){$.toggle(this,e)}))},hidden:function(e,t){return this.each((function(){$.hidden(this,e,t)}))}}),$.extend({fx:{off:!1}}),$.fn.extend({fadeIn:function(e,t,n){return this.each((function(){const i=this,a=$(i),s=!(!isVisible(i)||isVisible(i)&&0==+a.style("opacity"));if(not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),$.fx.off&&(e=0),s)return"function"==typeof n&&$.proxy(n,this)(),this;const o=a.origin("display",void 0,"block");return i.style.opacity="0",i.style.display=o,$.animate({el:i,draw:{opacity:1},dur:e,ease:t,onDone:function(){"function"==typeof n&&$.proxy(n,this)()}})}))},fadeOut:function(e,t,n){return this.each((function(){const i=this,a=$(i);return not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),a.origin("display",a.style("display")),isVisible(i)?$.animate({el:i,draw:{opacity:0},dur:e,ease:t,onDone:function(){this.style.display="none","function"==typeof n&&$.proxy(n,this)()}}):("function"==typeof n&&$.proxy(n,this)(),this)}))},slideUp:function(e,t,n){return this.each((function(){const i=this,a=$(i);let s;if(0!==a.height())return not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),s=a.height(),a.origin("height",s),a.origin("display",$(i).style("display")),a.css({overflow:"hidden"}),$.animate({el:i,draw:{height:0},dur:e,ease:t,onDone:function(){a.hide().removeStyleProperty("overflow, height"),"function"==typeof n&&$.proxy(n,this)()}})}))},slideDown:function(e,t,n){return this.each((function(){const i=this,a=$(i);let s,o;return not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),a.show().visible(!1),s=+a.origin("height",void 0,a.height()),0===parseInt(s)&&(s=i.scrollHeight),o=a.origin("display",a.style("display"),"block"),a.height(0).visible(!0),a.css({overflow:"hidden",display:"none"===o?"block":o}),$.animate({el:i,draw:{height:s},dur:e,ease:t,onDone:function(){$(i).removeStyleProperty("overflow, height, visibility"),"function"==typeof n&&$.proxy(n,this)()}})}))},moveTo:function(e,t,n,i,a){const s={top:t,left:e};return"function"==typeof n&&(a=n,n=$.animation.duration,i=$.animation.ease),"function"==typeof i&&(a=i,i=$.animation.ease),this.each((function(){$.animate({el:this,draw:s,dur:n,ease:i,onDone:a})}))},centerTo:function(e,t,n,i,a){return"function"==typeof n&&(a=n,n=$.animation.duration,i=$.animation.ease),"function"==typeof i&&(a=i,i=$.animation.ease),this.each((function(){const s={left:e-this.clientWidth/2,top:t-this.clientHeight/2};$.animate({el:this,draw:s,dur:n,ease:i,onDone:a})}))},colorTo:function(e,t,n,i){const a={color:e};return"function"==typeof t&&(i=t,t=$.animation.duration,n=$.animation.ease),"function"==typeof n&&(i=n,n=$.animation.ease),this.each((function(){$.animate({el:this,draw:a,dur:t,ease:n,onDone:i})}))},backgroundTo:function(e,t,n,i){const a={backgroundColor:e};return"function"==typeof t&&(i=t,t=$.animation.duration,n=$.animation.ease),"function"==typeof n&&(i=n,n=$.animation.ease),this.each((function(){$.animate({el:this,draw:a,dur:t,ease:n,onDone:i})}))}}),$.init=function(e,t){let n;const i=this;if("string"==typeof e&&(e=e.trim()),this.uid=$.uniqueId(),!e)return this;if("function"==typeof e)return $.ready(e);if(e instanceof Element)return this.push(e),this;if(e instanceof $)return $.each(e,(function(){i.push(this)})),this;if("window"===e&&(e=window),"document"===e&&(e=document),"body"===e&&(e=document.body),"html"===e&&(e=document.documentElement),"doctype"===e&&(e=document.doctype),e&&(e.nodeType||e.self===window))return this.push(e),this;if(isArrayLike$1(e))return $.each(e,(function(){$(this).each((function(){i.push(this)}))})),this;if("string"!=typeof e&&e.self&&e.self!==window)return this;if("#"===e||"."===e)return console.error("Selector can't be # or ."),this;if("@"===e[0])$("[data-role]").each((function(){str2arr($(this).attr("data-role"),",").indexOf(e.slice(1))>-1&&i.push(this)}));else if(n=$.parseHTML(e),1===n.length&&3===n[0].nodeType)try{[].push.apply(this,document.querySelectorAll(e))}catch(e){}else $.merge(this,n);return void 0!==t&&(t instanceof $?this.each((function(){$(t).append(i)})):t instanceof HTMLElement?$(t).append(i):isPlainObject(t)&&$.each(this,(function(){for(const e in t)hasProp(t,e)&&this.setAttribute(e,t[e])}))),this},$.init.prototype=$.fn,globalThis.$=$,globalThis.m4q=$; +const ae=["opacity","zIndex"];function isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function not(e){return null==e}function camelCase$1(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function isPlainObject(e){let t;return!(!e||"[object Object]"!==Object.prototype.toString.call(e))&&(t=void 0!==e.prototype,!t||t.constructor&&"function"==typeof t.constructor)}function isEmptyObject(e){for(const t in e)if(hasProp(e,t))return!1;return!0}function isArrayLike$1(e){return e instanceof Object&&"length"in e}function str2arr(e,t){return t=t||" ",e.split(t).map((function(e){return(""+e).trim()})).filter((function(e){return""!==e}))}function parseUnit$1(e,t){return t||(t=[0,""]),e=String(e),t[0]=parseFloat(e),t[1]=e.match(/[\d.\-+]*\s*(.*)/)[1]||"",t}function getUnit$1(e,t){const n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);return void 0!==n[1]?n[1]:t}function setStyleProp(e,t,n){t=camelCase$1(t),["scrollLeft","scrollTop"].indexOf(t)>-1?e[t]=parseInt(n):e.style[t]=isNaN(n)||ae.indexOf(""+t)>-1?n:n+"px"}function acceptData(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function dataAttr(e,t,n){let i;return not(n)&&1===e.nodeType&&(i="data-"+t.replace(/[A-Z]/g,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))?(n=function getData(e){try{return JSON.parse(e)}catch(t){return e}}(n),oe.set(e,t,n)):n=void 0),n}function normName(e){return"string"!=typeof e?void 0:e.replace(/-/g,"").toLowerCase()}function hasProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function isLocalhost(e){const t=e||globalThis.location.hostname;return"localhost"===t||"127.0.0.1"===t||"[::1]"===t||""===t||null!==t.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)}const se=Element.prototype.matches,$=(e,t)=>new $.init(e,t);function createScript(e){const t=document.createElement("script");if(t.type="text/javascript",not(e))return $(t);const n=$(e)[0];return n.src?t.src=n.src:t.textContent=n.innerText,document.body.appendChild(t),n.parentNode&&n.parentNode.removeChild(n),t}$.version="3.0.3",$.build_time="17.07.2024, 10:20:08",$.info=()=>console.info(`%c M4Q %c v${$.version} %c ${$.build_time} `,"color: white; font-weight: bold; background: #fd6a02","color: white; background: darkgreen","color: white; background: #0080fe;"),$.fn=$.prototype=Object.create(Array.prototype),$.prototype.constructor=$,$.prototype.uid="",$.extend=$.fn.extend=function(){let e,t,n=arguments[0]||{},i=1,a=arguments.length;for("object"!=typeof n&&"function"!=typeof n&&(n={}),i===a&&(n=this,i--);i0?e[0]:"string"==typeof e?$(e)[0]:void 0,not(t)||t&&t.parentNode&&$.each(t.parentNode.children,(function(e){this===t&&(n=e)})),n)},indexOf:function(e){let t,n=-1;return 0===this.length?n:(t=not(e)?this[0]:e instanceof $&&e.length>0?e[0]:"string"==typeof e?$(e)[0]:void 0,not(t)||this.each((function(e){this===t&&(n=e)})),n)},get:function(e){return void 0===e?this.items():e<0?this[e+this.length]:this[e]},eq:function(e){return!not(e)&&this.length>0?$.extend($(this.get(e)),{_prevObj:this}):this},is:function(e){let t=!1;return 0!==this.length&&(e instanceof $?this.same(e):(":selected"===e?this.each((function(){this.selected&&(t=!0)})):":checked"===e?this.each((function(){this.checked&&(t=!0)})):":visible"===e?this.each((function(){isVisible(this)&&(t=!0)})):":hidden"===e?this.each((function(){const e=getComputedStyle(this);("hidden"===this.getAttribute("type")||this.hidden||"none"===e.display||"hidden"===e.visibility||0===parseInt(e.opacity))&&(t=!0)})):"string"==typeof e&&-1===[":selected"].indexOf(e)?this.each((function(){se.call(this,e)&&(t=!0)})):isArrayLike$1(e)?this.each((function(){const n=this;$.each(e,(function(){n===this&&(t=!0)}))})):"object"==typeof e&&1===e.nodeType&&this.each((function(){this===e&&(t=!0)})),t))},same:function(e){let t=!0;return e instanceof $||(e=$(e)),this.length===e.length&&(this.each((function(){-1===e.items().indexOf(this)&&(t=!1)})),t)},last:function(){return this.eq(this.length-1)},first:function(){return this.eq(0)},odd:function(){const e=this.filter((function(e,t){return t%2==0}));return $.extend(e,{_prevObj:this})},even:function(){const e=this.filter((function(e,t){return t%2!=0}));return $.extend(e,{_prevObj:this})},filter:function(e){if("string"==typeof e){const t=e;e=function(e){return se.call(e,t)}}return $.extend($.merge($(),[].filter.call(this,e)),{_prevObj:this})},find:function(e){let t,n=[];return e instanceof $?e:(0===this.length?t=this:(this.each((function(){void 0!==this.querySelectorAll&&(n=n.concat([].slice.call(this.querySelectorAll(e))))})),t=$.merge($(),n)),$.extend(t,{_prevObj:this}))},contains:function(e){return this.find(e).length>0},children:function(e){let t,n=[];return e instanceof $?e:(this.each((function(){const e=this;for(t=0;t0&&t.push(this)})),$.extend($.merge($(),t),{_prevObj:this})},back:function(e){let t;if(!0===e)for(t=this._prevObj;t&&t._prevObj;)t=t._prevObj;else t=this._prevObj?this._prevObj:this;return t}}),$.extend({script:function(e){if(not(e))return createScript();const t=$(e)[0];t.tagName&&"SCRIPT"===t.tagName?createScript(t):$.each($(t).find("script"),(function(){createScript(this)}))}}),$.fn.extend({script:function(){return this.each((function(){$.script(this)}))}}),$.fn.extend({_prop:function(e,t){return 1===arguments.length?0===this.length?void 0:this[0][e]:(not(t)&&(t=""),this.each((function(){const n=this;n[e]=t,"innerHTML"===e&&$.script(n)})))},prop:function(e,t){return 1===arguments.length?this._prop(e):this._prop(e,void 0===t?"":t)},val:function(e){return not(e)?0===this.length?void 0:this[0].value:this.each((function(){const t=$(this);void 0!==this.value?this.value=e:t.html(e)}))},html:function(e){const t=[];return 0===arguments.length?this._prop("innerHTML"):(e instanceof $?e.each((function(){t.push($(this).outerHTML())})):t.push(e),this._prop("innerHTML",1===t.length&¬(t[0])?"":t.join("\n")),this)},outerHTML:function(){return this._prop("outerHTML")},text:function(e){return 0===arguments.length?this._prop("textContent"):this._prop("textContent",void 0===e?"":e)},innerText:function(e){return 0===arguments.length?this._prop("innerText"):this._prop("innerText",void 0===e?"":e)},empty:function(){return this.each((function(){void 0!==this.innerHTML&&(this.innerHTML="")}))},clear:function(){return this.empty()}}),$.each=function(e,t){let n=0;if(isArrayLike$1(e))[].forEach.call(e,(function(e,n){t.apply(e,[n,e])}));else for(const i in e)hasProp(e,i)&&t.apply(e[i],[i,e[i],n++]);return e},$.fn.extend({each:function(e){return $.each(this,e)}});const Data$1=function(e){this.expando="DATASET:UID:"+e.toUpperCase(),Data$1.uid++};Data$1.uid=-1,Data$1.prototype={cache:function(e){let t=e[this.expando];return t||(t={},acceptData(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){let i,a=this.cache(e);if("string"==typeof t)a[camelCase$1(t)]=n;else for(i in t)hasProp(t,i)&&(a[camelCase$1(i)]=t[i]);return a},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][camelCase$1(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){let n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(camelCase$1):(t=camelCase$1(t))in i?[t]:t.match(/[^\x20\t\r\n\f]+/g)||[]).length;for(;n--;)delete i[t[n]]}return(void 0===t||isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando]),!0}},hasData:function(e){const t=e[this.expando];return void 0!==t&&!isEmptyObject(t)}};const oe=new Data$1("m4q");$.extend({hasData:function(e){return oe.hasData(e)},data:function(e,t,n){return oe.access(e,t,n)},removeData:function(e,t){return oe.remove(e,t)},dataSet:function(e){if(not(e))return oe;if(["INTERNAL","M4Q"].indexOf(e.toUpperCase())>-1)throw Error("You can not use reserved name for your dataset");return new Data$1(e)}}),$.fn.extend({data:function(e,t){let n,i,a,s,o,r;if(0!==this.length){if(i=this[0],0===arguments.length){if(this.length&&(a=oe.get(i),1===i.nodeType))for(s=i.attributes,r=s.length;r--;)s[r]&&(o=s[r].name,0===o.indexOf("data-")&&(o=camelCase$1(o.slice(5)),dataAttr(i,o,a[o])));return a}return 1===arguments.length?(n=oe.get(i,e),void 0===n&&1===i.nodeType&&i.hasAttribute("data-"+e)&&(n=i.getAttribute("data-"+e)),n):this.each((function(){oe.set(this,e,t)}))}},removeData:function(e){return this.each((function(){oe.remove(this,e)}))},origin:function(e,t,n){if(0===this.length)return this;if(not(e)&¬(t))return $.data(this[0]);if(not(t)){const t=$.data(this[0],"origin-"+e);return not(t)?n:t}return this.data("origin-"+e,t),this}}),$.extend({device:/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),localhost:isLocalhost(),isLocalhost:isLocalhost,touchable:function isTouch(){return"ontouchstart"in window||navigator.maxTouchPoints>0}(),isPrivateAddress:function isPrivateAddress(e){const t=e||globalThis.location.hostname;return/(^localhost)|(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2\d\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/.test(t)},uniqueId:function(e){let t=(new Date).getTime();return not(e)&&(e="m4q"),(""!==e?e+"-":"")+"xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},toArray:function(e){let t,n=[];for(t=0;t=0;n-=1)if(""!==t.elements[n].name)switch(t.elements[n].nodeName){case"INPUT":switch(t.elements[n].type){case"checkbox":case"radio":t.elements[n].checked&&a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"file":break;default:a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}break;case"TEXTAREA":a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"SELECT":switch(t.elements[n].type){case"select-one":a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"select-multiple":for(i=t.elements[n].options.length-1;i>=0;i-=1)t.elements[n].options[i].selected&&a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].options[i].value))}break;case"BUTTON":switch(t.elements[n].type){case"reset":case"submit":case"button":a.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}}return a},serialize:function(e){return $.serializeToArray(e).join("&")}}),$.fn.extend({items:function(){return $.toArray(this)}});const re=Event.prototype.stopPropagation,le=Event.prototype.preventDefault;Event.prototype.stopPropagation=function(){this.isPropagationStopped=!0,re.apply(this,arguments)},Event.prototype.preventDefault=function(){this.isPreventedDefault=!0,le.apply(this,arguments)},Event.prototype.stop=function(e){return e?this.stopImmediatePropagation():this.stopPropagation()},$.extend({events:[],eventHooks:{},eventUID:-1,setEventHandler:function(e){let t,n,i,a=-1;if(this.events.length>0)for(t=0;t-1?(this[0][n](),this):(i=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:t}),this.each((function(){this.dispatchEvent(i)})))}}),"blur focus resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu touchstart touchend touchmove touchcancel".split(" ").forEach((function(e){$.fn[e]=function(t,n,i){return arguments.length>0?this.on(e,t,n,i):this.fire(e)}})),$.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),$.ready=function(e,t){document.addEventListener("DOMContentLoaded",e,t||!1)},$.load=function(e){return $(window).on("load",e)},$.unload=function(e){return $(window).on("unload",e)},$.fn.extend({unload:function(e){return 0===this.length||this[0].self!==window?void 0:$.unload(e)}}),$.beforeunload=function(e){return"string"==typeof e?$(window).on("beforeunload",(function(t){return t.returnValue=e,e})):$(window).on("beforeunload",e)},$.fn.extend({beforeunload:function(e){return 0===this.length||this[0].self!==window?void 0:$.beforeunload(e)}}),$.fn.extend({ready:function(e){if(this.length&&this[0]===document&&"function"==typeof e)return $.ready(e)}}),$.ajax=function(e){return new Promise((function(t,n){const i=new XMLHttpRequest;let a=(e.method||"GET").toUpperCase();const s=[],o=!!not(e.async)||e.async;let r,l=e.url;const exec=function(e,t){"function"==typeof e&&e.apply(null,t)},isGet=function(e){return-1!==["GET","JSON"].indexOf(e)};if(e.data instanceof HTMLFormElement){let t=e.data.getAttribute("action").trim(),n=e.data.getAttribute("method").trim();not(l)&&t&&(l=t),n&&(a=n.toUpperCase())}if(e.timeout&&(i.timeout=e.timeout),e.withCredentials&&(i.withCredentials=e.withCredentials),e.data instanceof HTMLFormElement)r=$.serialize(e.data);else if(e.data instanceof HTMLElement&&e.data.getAttribute("type")&&"file"===e.data.getAttribute("type").toLowerCase()){const t=e.data.getAttribute("name");r=new FormData;for(let n=0;n-1?$(e)[t]():getComputedStyle(e,n)[t]}if("string"!=typeof e||0!==this.length){if(0===this.length)return this;if(n=this[0],not(e)||"all"===e)return getComputedStyle(n,t);{let i={},a=e.split(", ").map((function(e){return(""+e).trim()}));return 1===a.length?_getStyle(n,a[0],t):($.each(a,(function(){i[this]=_getStyle(n,this,t)})),i)}}},removeStyleProperty:function(e){if(not(e)||0===this.length)return this;const t=e.split(", ").map((function(e){return(""+e).trim()}));return this.each((function(){const e=this;$.each(t,(function(){e.style.removeProperty(this)}))}))},css:function(e,t){return"string"==typeof(e=e||"all")&¬(t)?this.style(e):this.each((function(){const n=this;"object"==typeof e?$.each(e,(function(e,t){setStyleProp(n,e,t)})):"string"==typeof e&&setStyleProp(n,e,t)}))},scrollTop:function(e){return not(e)?0===this.length?void 0:this[0]===window?scrollY:this[0].scrollTop:this.each((function(){this.scrollTop=e}))},scrollLeft:function(e){return not(e)?0===this.length?void 0:this[0]===window?scrollX:this[0].scrollLeft:this.each((function(){this.scrollLeft=e}))}}),$.fn.extend({addClass:function(){},removeClass:function(){},toggleClass:function(){},containsClass:function(e){return this.hasClass(e)},hasClass:function(e){let t=!1;const n=e.split(" ").filter((function(e){return""!==(""+e).trim()}));return!not(e)&&(this.each((function(){const e=this;$.each(n,(function(){!t&&e.classList&&e.classList.contains(this)&&(t=!0)}))})),t)},clearClasses:function(){return this.each((function(){this.className=""}))},cls:function(e){return 0===this.length?void 0:e?this[0].className.split(" "):this[0].className},removeClassBy:function(e){return this.each((function(){const t=$(this),n=t.cls(!0);$.each(n,(function(){const n=this;n.indexOf(e)>-1&&t.removeClass(n)}))}))},classNames:function(){const e=Array.prototype.slice.call(arguments,0),t=[];return $.each(e,(function(e,n){"string"==typeof n?t.push(n):isPlainObject(n)&&$.each(n,(function(e,n){n&&t.push(e)}))})),this.each((function(){this.className+=" "+t.join(" ")}))}}),["add","remove","toggle"].forEach((function(e){$.fn[e+"Class"]=function(t){const n=t?Array.isArray(t)?t:t.split(" ").filter((function(e){return!!e})):[];return n.length?this.each((function(){const t=this;void 0!==t.classList?$.each(n,(function(n,i){t.classList[e](i)})):t.className+=n.join(" ")})):this}})),$.parseHTML=function(e){let t,n,i,a,s=[];if("string"!=typeof e)return[];if(e=e.trim(),i=document.implementation.createHTMLDocument(""),t=i.createElement("base"),t.href=document.location.href,i.head.appendChild(t),a=i.body,n=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i.exec(e),n)s.push(document.createElement(n[1]));else{a.innerHTML=e;for(let e=0;e$(e).attr("id"))):this.each((function(){$(this).attr("id",e)}))}}),$.extend({meta:function(e){return not(e)?$("meta"):$("meta[name='$name']".replace("$name",e))},metaBy:function(e){return not(e)?$("meta"):$("meta[$name]".replace("$name",e))},doctype:function(){return $("doctype")},html:function(){return $("html")},head:function(){return $("html").find("head")},body:function(){return $("body")},document:function(){return $(document)},window:function(){return $(window)},charset:function(e){if(e){const t=$("meta[charset]");t.length>0&&t.attr("charset",e)}return document.characterSet}}),$.extend({bind:(e,t)=>e.bind(t)}),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){["append","prepend"].forEach((function(t){hasProp(e,t)||Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:function(){const e=Array.prototype.slice.call(arguments),n=document.createDocumentFragment();e.forEach((function(e){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))})),"prepend"===t?this.insertBefore(n,this.firstChild):this.appendChild(n)}})}))}));const normalizeElements=function(e){let t;return"string"==typeof e?t=$.isSelector(e)?$(e):$.parseHTML(e):e instanceof HTMLElement?t=[e]:isArrayLike$1(e)&&(t=e),t};$.fn.extend({appendText:function(e){return this.each((function(t,n){n.innerHTML+=e}))},prependText:function(e){return this.each((function(t,n){n.innerHTML=e+n.innerHTML}))},append:function(e){const t=normalizeElements(e);return this.each((function(e,n){$.each(t,(function(){if(n===this)return;const t=0===e?this:this.cloneNode(!0);$.script(t),t.tagName&&"SCRIPT"!==t.tagName&&n.append(t)}))}))},appendTo:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t,n){e!==this&&n.append(0===t?e:e.cloneNode(!0))}))}))},prepend:function(e){const t=normalizeElements(e);return this.each((function(e,n){$.each(t,(function(){if(n===this)return;const t=0===e?this:this.cloneNode(!0);$.script(t),t.tagName&&"SCRIPT"!==t.tagName&&n.prepend(t)}))}))},prependTo:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t,n){e!==this&&$(n).prepend(0===t?e:e.cloneNode(!0))}))}))},insertBefore:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t){if(e===this)return;const n=this.parentNode;n&&n.insertBefore(0===t?e:e.cloneNode(!0),this)}))}))},insertAfter:function(e){const t=normalizeElements(e);return this.each((function(){const e=this;$.each(t,(function(t,n){if(e===this)return;const i=this.parentNode;i&&i.insertBefore(0===t?e:e.cloneNode(!0),n.nextSibling)}))}))},after:function(e){return this.each((function(){const t=this;"string"==typeof e?t.insertAdjacentHTML("afterend",e):$(e).insertAfter(t)}))},before:function(e){return this.each((function(){const t=this;"string"==typeof e?t.insertAdjacentHTML("beforebegin",e):$(e).insertBefore(t)}))},clone:function(e,t){const n=[];return not(e)&&(e=!1),not(t)&&(t=!1),this.each((function(){const i=this.cloneNode(e),a=$(i);let s;t&&$.hasData(this)&&(s=$(this).data(),$.each(s,(function(e,t){a.data(e,t)}))),n.push(i)})),$.merge($(),n)},import:function(e){const t=[];return not(e)&&(e=!1),this.each((function(){t.push(document.importNode(this,e))})),$.merge($(),t)},adopt:function(){const e=[];return this.each((function(){e.push(document.adoptNode(this))})),$.merge($(),e)},remove:function(e){let t,n,i=0,a=[];if(0!==this.length){for(n=e?this.filter((function(t){return se.call(t,e)})):this.items();null!=(t=n[i]);i++)t.parentNode&&(a.push(t.parentNode.removeChild(t)),$.removeData(t));return $.merge($(),a)}},wrap:function(e){if(0===this.length)return;const t=$(normalizeElements(e));if(!t.length)return;const n=[];return this.each((function(){let e,i;for(i=t.clone(!0,!0),i.insertBefore(this),e=i;e.children().length;)e=e.children().eq(0);e.append(this),n.push(i)})),$(n)},wrapAll:function(e){let t,n,i;if(0!==this.length&&(t=$(normalizeElements(e)),t.length)){for(n=t.clone(!0,!0),n.insertBefore(this[0]),i=n;i.children().length;)i=i.children().eq(0);return this.each((function(){i.append(this)})),n}},wrapInner:function(e){if(0===this.length)return;const t=$(normalizeElements(e));if(!t.length)return;const n=[];return this.each((function(){const e=$(this),i=e.html(),a=t.clone(!0,!0);e.html(a.html(i)),n.push(a)})),$(n)}}),$.extend({animation:{duration:1e3,ease:"linear",elements:{}}}),"object"==typeof window.setupAnimation&&$.each(window.setupAnimation,(function(e,t){void 0===$.animation[e]||not(t)||($.animation[e]=t)}));const ce=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],de=["opacity","zIndex"],ue=["opacity","volume"],he=["scrollLeft","scrollTop"],pe=["opacity","volume"];function _validElement(e){return e instanceof HTMLElement||e instanceof SVGElement}function _applyStyles$1(e,t,n){$.each(t,(function(t,i){!function _setStyle$1(e,t,n,i,a){not(a)&&(a=!1),t=camelCase$1(t),a&&(n=parseInt(n)),_validElement(e)?void 0!==e[t]?e[t]=n:e.style[t]="transform"===t||t.toLowerCase().indexOf("color")>-1?n:n+i:e[t]=n}(e,t,i[0]+i[2]*n,i[3],i[4])}))}function _getElementTransforms$1(e){if(!_validElement(e))return{};const t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,i={};let a;for(;a=n.exec(t);)i[a[1]]=a[2];return i}function _getColorArrayFromHex$1(e){return/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e||"#000000").slice(1).map((function(e){return parseInt(e,16)}))}function _expandColorValue$1(e){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;return"#"===e[0]&&4===e.length?"#"+e.replace(t,(function(e,t,n,i){return t+t+n+n+i+i})):"#"===e[0]?e:"#"+e}function applyProps$1(e,t,n){_applyStyles$1(e,t.props,n),function _applyTransform$1(e,t,n){const i=[],a=_getElementTransforms$1(e);$.each(t,(function(e,t){let a=t[0],s=t[1],o=t[2],r=t[3];((e=""+e).indexOf("rotate")>-1||e.indexOf("skew")>-1)&&""===r&&(r="deg"),e.indexOf("scale")>-1&&(r=""),e.indexOf("translate")>-1&&""===r&&(r="px"),"turn"===r?i.push(e+"("+s*n+r+")"):i.push(e+"("+(a+o*n)+r+")")})),$.each(a,(function(e,n){void 0===t[e]&&i.push(e+"("+n+")")})),e.style.transform=i.join(" ")}(e,t.transform,n),function _applyColors$1(e,t,n){$.each(t,(function(t,i){let a,s,o=[0,0,0];for(a=0;a<3;a++)o[a]=Math.floor(i[0][a]+i[2][a]*n);s="rgb("+o.join(",")+")",e.style[t]=s}))}(e,t.color,n)}function createAnimationMap$1(e,t,n){const i={props:{},transform:{},color:{}};let a,s,o,r,l,c;const d=_getElementTransforms$1(e);return not(n)&&(n="normal"),$.each(t,(function(t,u){const h=ce.indexOf(""+t)>-1,p=de.indexOf(""+t)>-1,f=(""+t).toLowerCase().indexOf("color")>-1;if(Array.isArray(u)&&1===u.length&&(u=u[0]),Array.isArray(u)?(s=f?_getColorArrayFromHex$1(_expandColorValue$1(u[0])):parseUnit$1(u[0]),o=f?_getColorArrayFromHex$1(_expandColorValue$1(u[1])):parseUnit$1(u[1])):(s=h?d[t]||0:f?function _getColorArrayFromElement$1(e,t){return getComputedStyle(e)[t].replace(/[^\d.,]/g,"").split(",").map((function(e){return parseInt(e)}))}(e,t):function _getStyle$1(e,t,n){return void 0!==e[t]?he.indexOf(t)>-1?"scrollLeft"===t?e===window?pageXOffset:e.scrollLeft:e===window?pageYOffset:e.scrollTop:e[t]||0:e.style[t]||getComputedStyle(e,n)[t]}(e,t,void 0),s=f?s:parseUnit$1(s),o=f?_getColorArrayFromHex$1(u):parseUnit$1(function _getRelativeValue$1(e,t){const n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;const i=getUnit$1(e)||0,a=parseFloat(t),s=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return a+s+i;case"-":return a-s+i;case"*":return a*s+i;case"/":return a/s+i}}(u,Array.isArray(s)?s[0]:s))),pe.indexOf(""+t)>-1&&s[0]===o[0]&&(s[0]=o[0]>0?0:1),"reverse"===n&&(c=s,s=o,o=c),l=e instanceof HTMLElement&&""===o[1]&&!p&&!h?"px":o[1],f)for(r=[0,0,0],a=0;a<3;a++)r[a]=o[a]-s[a];else r=o[0]-s[0];h?i.transform[t]=[s[0],o[0],r,l]:f?i.color[t]=[s,o,r,l]:i.props[t]=[s[0],o[0],r,l,-1===ue.indexOf(""+t)]})),i}function minMax$1(e,t,n){return Math.min(Math.max(e,t),n)}const fe={linear:function(){return function(e){return e}}};fe.default=fe.linear;const me={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){let t,n=4;for(;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){not(e)&&(e=1),not(t)&&(t=.5);const n=minMax$1(e,1,10),i=minMax$1(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-i/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/i)}}};["Quad","Cubic","Quart","Quint","Expo"].forEach((function(e,t){me[e]=function(){return function(e){return Math.pow(e,t+2)}}})),Object.keys(me).forEach((function(e){const t=me[e];fe["easeIn"+e]=t,fe["easeOut"+e]=function(e,n){return function(i){return 1-t(e,n)(1-i)}},fe["easeInOut"+e]=function(e,n){return function(i){return i<.5?t(e,n)(2*i)/2:1-t(e,n)(-2*i+2)/2}}}));let ve={id:null,el:null,draw:{},dur:$.animation.duration,ease:$.animation.ease,loop:0,pause:0,dir:"normal",defer:0,onStart:function(){},onStop:function(){},onStopAll:function(){},onPause:function(){},onPauseAll:function(){},onResume:function(){},onResumeAll:function(){},onFrame:function(){},onDone:function(){}};function animate$1(e){return new Promise((function(t){const n=this,i=$.assign({},ve,{dur:$.animation.duration,ease:$.animation.ease},e);let a,s=i.id,o=i.el,r=i.draw,l=i.dur,c=i.ease,d=i.loop,u=i.onStart,h=i.onFrame,p=i.onDone,f=i.pause,m=i.dir,v=i.defer,g={},b="linear",C=[],w=fe.linear,y="alternate"===m?"normal":m,_=!1,S=s||+performance.now()*Math.pow(10,14);if(not(o))throw new Error("Unknown element!");if("string"==typeof o&&(o=document.querySelector(o)),"function"!=typeof r&&"object"!=typeof r)throw new Error("Unknown draw object. Must be a function or object!");0===l&&(l=1),"alternate"===m&&"number"==typeof d&&(d*=2),"string"==typeof c?(a=/\(([^)]+)\)/.exec(c),b=c.split("(")[0],C=a?a[1].split(",").map((function(e){return parseFloat(e)})):[],w=fe[b]||fe.linear):w="function"==typeof c?c:fe.linear,$.animation.elements[S]={element:o,id:null,stop:0,pause:0,loop:0,t:-1,started:0,paused:0};const play=function(){"object"==typeof r&&(g=createAnimationMap$1(o,r,y)),"function"==typeof u&&u.apply(o),$.animation.elements[S].loop+=1,$.animation.elements[S].started=performance.now(),$.animation.elements[S].duration=l,$.animation.elements[S].id=requestAnimationFrame(animate)},done=function(){cancelAnimationFrame($.animation.elements[S].id),delete $.animation.elements[s],"function"==typeof p&&p.apply(o),t(n)},animate=function(e){let t,n,{stop:i,pause:a,started:s}=$.animation.elements[S];if($.animation.elements[S].paused&&(s=e-$.animation.elements[S].t*l,$.animation.elements[S].started=s),n=((e-s)/l).toFixed(4),n>1&&(n=1),n<0&&(n=0),t=w.apply(null,C)(n),$.animation.elements[S].t=n,$.animation.elements[S].p=t,a)$.animation.elements[S].id=requestAnimationFrame(animate);else{if(i>0)return 2===i&&("function"==typeof r?r.bind(o)(1,1):applyProps$1(o,g,1)),void done();"function"==typeof r?r.bind(o)(n,t):applyProps$1(o,g,t),"function"==typeof h&&h.apply(o,[n,t]),n<1&&($.animation.elements[S].id=requestAnimationFrame(animate)),1===parseInt(n)&&(d?("alternate"===m&&(y="normal"===y?"reverse":"normal"),"boolean"==typeof d||d>$.animation.elements[S].loop?setTimeout((function(){play()}),f):done()):"alternate"!==m||_?done():(y="normal"===y?"reverse":"normal",_=!0,play()))}};v>0?setTimeout((function(){play()}),v):play()}))}function stopAnimation(e,t){const n=$.animation.elements[e];void 0!==n&&(not(t)&&(t=!0),n.stop=!0===t?2:1,"function"==typeof n.onStop&&n.onStop.apply(n.element))}function pauseAnimation(e){const t=$.animation.elements[e];void 0!==t&&(t.pause=1,t.paused=performance.now(),"function"==typeof t.onPause&&t.onPause.apply(t.element))}function resumeAnimation(e){const t=$.animation.elements[e];void 0!==t&&(t.pause=0,t.paused=0,"function"==typeof t.onResume&&t.onResume.apply(t.element))}let ge={loop:!1,onChainItem:null,onChainItemComplete:null,onChainComplete:null};$.easing={},$.extend($.easing,fe),$.extend({animate:function(e){let t,n,i,a,s;return arguments.length>1?(t=$(arguments[0])[0],n=arguments[1],i=arguments[2]||$.animation.duration,a=arguments[3]||$.animation.ease,s=arguments[4],"function"==typeof i&&(s=i,a=$.animation.ease,i=$.animation.duration),"function"==typeof a&&(s=a,a=$.animation.ease),animate$1({el:t,draw:n,dur:i,ease:a,onDone:s})):animate$1(e)},chain:function chain$1(e,t){const n=$.extend({},ge,t);if("boolean"!=typeof n.loop&&n.loop--,!Array.isArray(e))return console.warn("Chain array is not defined!"),!1;e.reduce((function(e,t){return e.then((function(){return"function"==typeof n.onChainItem&&n.onChainItem(t),animate$1(t).then((function(){"function"==typeof n.onChainItemComplete&&n.onChainItemComplete(t)}))}))}),Promise.resolve()).then((function(){"function"==typeof n.onChainComplete&&n.onChainComplete(),n.loop&&chain$1(e,n)}))},stop:stopAnimation,stopAll:function stopAnimationAll(e,t){$.each($.animation.elements,(function(n,i){t?"string"==typeof t?se.call(i.element,t)&&stopAnimation(n,e):t.length?$.each(t,(function(){i.element===this&&stopAnimation(n,e)})):t instanceof Element&&i.element===t&&stopAnimation(n,e):stopAnimation(n,e)}))},resume:resumeAnimation,resumeAll:function resumeAnimationAll(e){$.each($.animation.elements,(function(t,n){e?"string"==typeof e?se.call(n.element,e)&&resumeAnimation(t):e.length?$.each(e,(function(){n.element===this&&resumeAnimation(t)})):e instanceof Element&&n.element===e&&resumeAnimation(t):resumeAnimation(t)}))},pause:pauseAnimation,pauseAll:function pauseAnimationAll(e){$.each($.animation.elements,(function(t,n){e?"string"==typeof e?se.call(n.element,e)&&pauseAnimation(t):e.length?$.each(e,(function(){n.element===this&&pauseAnimation(t)})):e instanceof Element&&n.element===e&&pauseAnimation(t):pauseAnimation(t)}))}}),$.fn.extend({animate:function(e){const t=this;let n,i,a,s;const o=e;let r;return r=!Array.isArray(e)&&(arguments.length>1||1===arguments.length&&void 0===arguments[0].draw),r?(n=arguments[0],i=arguments[1]||$.animation.duration,a=arguments[2]||$.animation.ease,s=arguments[3],"function"==typeof i&&(s=i,i=$.animation.duration,a=$.animation.ease),"function"==typeof a&&(s=a,a=$.animation.ease),this.each((function(){return $.animate({el:this,draw:n,dur:i,ease:a,onDone:s})}))):Array.isArray(e)?($.each(e,(function(){const e=this;t.each((function(){e.el=this,$.animate(e)}))})),this):this.each((function(){o.el=this,$.animate(o)}))},chain:function(e,t){return this.each((function(){const n=this;$.each(e,(function(){this.el=n})),$.chain(e,t)}))},stop:function(e){return this.each((function(){const t=this;$.each($.animation.elements,(function(n,i){i.element===t&&stopAnimation(n,e)}))}))},pause:function(){return this.each((function(){const e=this;$.each($.animation.elements,(function(t,n){n.element===e&&pauseAnimation(t)}))}))},resume:function(){return this.each((function(){const e=this;$.each($.animation.elements,(function(t,n){n.element===e&&resumeAnimation(t)}))}))}}),$.extend({hidden:function(e,t,n){return e=$(e)[0],"string"==typeof t&&(t="true"===t.toLowerCase()),"function"==typeof t&&(n=t,t=!e.hidden),e.hidden=t,"function"==typeof n&&($.bind(n,e),n.call(e,arguments)),this},hide:function(e,t){const n=$(e),i=(e=n[0]).style.display,a=getComputedStyle(e,null).display;return n.origin("display",{inline:i,css:a}),e.style.display="none","function"==typeof t&&($.bind(t,e),t.call(e,arguments)),this},show:function(e,t){const n=$(e).origin("display");if((e=$(e)[0]).style.display="",n){const t=n.inline||"",i=n.css||"";t&&"none"!==t?e.style.display=t:"none"===i&&(e.style.display="block")}else e.style.display="block";return 0===parseInt(e.style.opacity)&&(e.style.opacity="1"),"function"==typeof t&&($.bind(t,e),t.call(e,arguments)),this},visible:function(e,t,n){return void 0===t&&(t=!0),e.style.visibility=t?"visible":"hidden","function"==typeof n&&($.bind(n,e),n.call(e,arguments)),this},toggle:function(e,t){const n="none"!==getComputedStyle(e,null).display?"hide":"show";return $[n](e,t)}}),$.fn.extend({hide:function(){let e;return $.each(arguments,(function(){"function"==typeof this&&(e=this)})),this.each((function(){$.hide(this,e)}))},show:function(){let e;return $.each(arguments,(function(){"function"==typeof this&&(e=this)})),this.each((function(){$.show(this,e)}))},visible:function(e,t){return this.each((function(){$.visible(this,e,t)}))},toggle:function(e){return this.each((function(){$.toggle(this,e)}))},hidden:function(e,t){return this.each((function(){$.hidden(this,e,t)}))}}),$.extend({fx:{off:!1}}),$.fn.extend({fadeIn:function(e,t,n){return this.each((function(){const i=this,a=$(i),s=!(!isVisible(i)||isVisible(i)&&0==+a.style("opacity"));if(not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),$.fx.off&&(e=0),s)return"function"==typeof n&&$.bind(n,this)(),this;const o=a.origin("display",void 0,"block");return i.style.opacity="0",i.style.display=o,$.animate({el:i,draw:{opacity:1},dur:e,ease:t,onDone:function(){"function"==typeof n&&$.bind(n,this)()}})}))},fadeOut:function(e,t,n){return this.each((function(){const i=this,a=$(i);return not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),a.origin("display",a.style("display")),isVisible(i)?$.animate({el:i,draw:{opacity:0},dur:e,ease:t,onDone:function(){this.style.display="none","function"==typeof n&&$.bind(n,this)()}}):("function"==typeof n&&$.bind(n,this)(),this)}))},slideUp:function(e,t,n){return this.each((function(){const i=this,a=$(i);let s;if(0!==a.height())return not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),s=a.height(),a.origin("height",s),a.origin("display",$(i).style("display")),a.css({overflow:"hidden"}),$.animate({el:i,draw:{height:0},dur:e,ease:t,onDone:function(){a.hide().removeStyleProperty("overflow, height"),"function"==typeof n&&$.bind(n,this)()}})}))},slideDown:function(e,t,n){return this.each((function(){const i=this,a=$(i);let s,o;return not(e)&¬(t)&¬(n)?(n=null,e=$.animation.duration):"function"==typeof e&&(n=e,e=$.animation.duration),"function"==typeof t&&(n=t,t=$.animation.ease),a.show().visible(!1),s=+a.origin("height",void 0,a.height()),0===parseInt(s)&&(s=i.scrollHeight),o=a.origin("display",a.style("display"),"block"),a.height(0).visible(!0),a.css({overflow:"hidden",display:"none"===o?"block":o}),$.animate({el:i,draw:{height:s},dur:e,ease:t,onDone:function(){$(i).removeStyleProperty("overflow, height, visibility"),"function"==typeof n&&$.bind(n,this)()}})}))},moveTo:function(e,t,n,i,a){const s={top:t,left:e};return"function"==typeof n&&(a=n,n=$.animation.duration,i=$.animation.ease),"function"==typeof i&&(a=i,i=$.animation.ease),this.each((function(){$.animate({el:this,draw:s,dur:n,ease:i,onDone:a})}))},centerTo:function(e,t,n,i,a){return"function"==typeof n&&(a=n,n=$.animation.duration,i=$.animation.ease),"function"==typeof i&&(a=i,i=$.animation.ease),this.each((function(){const s={left:e-this.clientWidth/2,top:t-this.clientHeight/2};$.animate({el:this,draw:s,dur:n,ease:i,onDone:a})}))},colorTo:function(e,t,n,i){const a={color:e};return"function"==typeof t&&(i=t,t=$.animation.duration,n=$.animation.ease),"function"==typeof n&&(i=n,n=$.animation.ease),this.each((function(){$.animate({el:this,draw:a,dur:t,ease:n,onDone:i})}))},backgroundTo:function(e,t,n,i){const a={backgroundColor:e};return"function"==typeof t&&(i=t,t=$.animation.duration,n=$.animation.ease),"function"==typeof n&&(i=n,n=$.animation.ease),this.each((function(){$.animate({el:this,draw:a,dur:t,ease:n,onDone:i})}))}}),$.init=function(e,t){let n;const i=this;if("string"==typeof e&&(e=e.trim()),this.uid=$.uniqueId(),!e)return this;if("function"==typeof e)return $.ready(e);if(e instanceof Element)return this.push(e),this;if(e instanceof $)return $.each(e,(function(){i.push(this)})),this;if("window"===e&&(e=window),"document"===e&&(e=document),"body"===e&&(e=document.body),"html"===e&&(e=document.documentElement),"doctype"===e&&(e=document.doctype),e&&(e.nodeType||e.self===window))return this.push(e),this;if(isArrayLike$1(e))return $.each(e,(function(){$(this).each((function(){i.push(this)}))})),this;if("string"!=typeof e&&e.self&&e.self!==window)return this;if("#"===e||"."===e)return console.error("Selector can't be # or ."),this;if("@"===e[0])$("[data-role]").each((function(){str2arr($(this).attr("data-role"),",").indexOf(e.slice(1))>-1&&i.push(this)}));else if(n=$.parseHTML(e),1===n.length&&3===n[0].nodeType)try{[].push.apply(this,document.querySelectorAll(e))}catch(e){}else $.merge(this,n);return void 0!==t&&(t instanceof $?this.each((function(){$(t).append(i)})):t instanceof HTMLElement?$(t).append(i):isPlainObject(t)&&$.each(this,(function(){for(const e in t)hasProp(t,e)&&this.setAttribute(e,t[e])}))),this},$.init.prototype=$.fn,globalThis.$=$,globalThis.m4q=$; /*! * HooksJS - The set of hooks (https://github.com/olton/hooks) * Copyright 2024 by Serhii Pimenov @@ -29,19 +29,19 @@ const be=[];let Ce=-1;var we;!function(e){e.LOAD="load",e.VIEWPORT="viewport",e. * Copyright 2024 by Serhii Pimenov * Licensed under MIT !*/ -class HSV{constructor(e=0,t=0,n=0){this.h=e,this.s=t,this.v=n}toString(){return"hsv("+[Math.round(this.h),Math.round(100*this.s)+"%",Math.round(100*this.v)+"%"].join(", ")+")"}}class HSL{constructor(e=0,t=0,n=0){this.h=e,this.s=t,this.l=n}toString(){return"hsl("+[Math.round(this.h),Math.round(100*this.s)+"%",Math.round(100*this.l)+"%"].join(", ")+")"}}class HSLA{constructor(e=0,t=0,n=0,i=0){this.h=e,this.s=t,this.l=n,this.a=i}toString(){return"hsla("+[Math.round(this.h),Math.round(100*this.s)+"%",Math.round(100*this.l)+"%",parseFloat(this.a).toFixed(2)].join(", ")+")"}}class RGB{constructor(e=0,t=0,n=0){this.r=e,this.g=t,this.b=n}toString(){return`rgb(${this.r},${this.g},${this.b})`}}class RGBA{constructor(e=0,t=0,n=0,i=0){this.r=e,this.g=t,this.b=n,this.a=i}toString(){return`rgba(${this.r},${this.g},${this.b},${this.a})`}}class CMYK{constructor(e=0,t=0,n=0,i=0){this.c=e,this.m=t,this.y=n,this.k=i}toString(){return`cmyk(${this.c},${this.m},${this.y},${this.k})`}}const _e={aliceBlue:"#f0f8ff",antiqueWhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedAlmond:"#ffebcd",blue:"#0000ff",blueViolet:"#8a2be2",brown:"#a52a2a",burlyWood:"#deb887",cadetBlue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerBlue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkBlue:"#00008b",darkCyan:"#008b8b",darkGoldenRod:"#b8860b",darkGray:"#a9a9a9",darkGreen:"#006400",darkKhaki:"#bdb76b",darkMagenta:"#8b008b",darkOliveGreen:"#556b2f",darkOrange:"#ff8c00",darkOrchid:"#9932cc",darkRed:"#8b0000",darkSalmon:"#e9967a",darkSeaGreen:"#8fbc8f",darkSlateBlue:"#483d8b",darkSlateGray:"#2f4f4f",darkTurquoise:"#00ced1",darkViolet:"#9400d3",deepPink:"#ff1493",deepSkyBlue:"#00bfff",dimGray:"#696969",dodgerBlue:"#1e90ff",fireBrick:"#b22222",floralWhite:"#fffaf0",forestGreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#DCDCDC",ghostWhite:"#F8F8FF",gold:"#ffd700",goldenRod:"#daa520",gray:"#808080",green:"#008000",greenYellow:"#adff2f",honeyDew:"#f0fff0",hotPink:"#ff69b4",indianRed:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderBlush:"#fff0f5",lawnGreen:"#7cfc00",lemonChiffon:"#fffacd",lightBlue:"#add8e6",lightCoral:"#f08080",lightCyan:"#e0ffff",lightGoldenRodYellow:"#fafad2",lightGray:"#d3d3d3",lightGreen:"#90ee90",lightPink:"#ffb6c1",lightSalmon:"#ffa07a",lightSeaGreen:"#20b2aa",lightSkyBlue:"#87cefa",lightSlateGray:"#778899",lightSteelBlue:"#b0c4de",lightYellow:"#ffffe0",lime:"#00ff00",limeGreen:"#32dc32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumAquaMarine:"#66cdaa",mediumBlue:"#0000cd",mediumOrchid:"#ba55d3",mediumPurple:"#9370db",mediumSeaGreen:"#3cb371",mediumSlateBlue:"#7b68ee",mediumSpringGreen:"#00fa9a",mediumTurquoise:"#48d1cc",mediumVioletRed:"#c71585",midnightBlue:"#191970",mintCream:"#f5fffa",mistyRose:"#ffe4e1",moccasin:"#ffe4b5",navajoWhite:"#ffdead",navy:"#000080",oldLace:"#fdd5e6",olive:"#808000",oliveDrab:"#6b8e23",orange:"#ffa500",orangeRed:"#ff4500",orchid:"#da70d6",paleGoldenRod:"#eee8aa",paleGreen:"#98fb98",paleTurquoise:"#afeeee",paleVioletRed:"#db7093",papayaWhip:"#ffefd5",peachPuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderBlue:"#b0e0e6",purple:"#800080",rebeccaPurple:"#663399",red:"#ff0000",rosyBrown:"#bc8f8f",royalBlue:"#4169e1",saddleBrown:"#8b4513",salmon:"#fa8072",sandyBrown:"#f4a460",seaGreen:"#2e8b57",seaShell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",slyBlue:"#87ceeb",slateBlue:"#6a5acd",slateGray:"#708090",snow:"#fffafa",springGreen:"#00ff7f",steelBlue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whiteSmoke:"#f5f5f5",yellow:"#ffff00",yellowGreen:"#9acd32"},Se={lime:"#a4c400",green:"#60a917",emerald:"#008a00",blue:"#00AFF0",teal:"#00aba9",cyan:"#1ba1e2",cobalt:"#0050ef",indigo:"#6a00ff",violet:"#aa00ff",pink:"#dc4fad",magenta:"#d80073",crimson:"#a20025",red:"#CE352C",orange:"#fa6800",amber:"#f0a30a",yellow:"#fff000",brown:"#825a2c",olive:"#6d8764",steel:"#647687",mauve:"#76608a",taupe:"#87794e"},Te={color:function(e,t=_e,n=void 0){return void 0!==t[e]?t[e]:n},palette:function(e=_e){return Object.keys(e)},colors:function(e=_e){return Object.values(e)}},ke={HSV:HSV,HSL:HSL,HSLA:HSLA,RGB:RGB,RGBA:RGBA,CMYK:CMYK},xe={HEX:"hex",RGB:"rgb",RGBA:"rgba",HSV:"hsv",HSL:"hsl",HSLA:"hsla",CMYK:"cmyk",UNKNOWN:"unknown"},Ee={angle:30,algorithm:1,step:.1,distance:5,tint1:.8,tint2:.4,shade1:.6,shade2:.3,alpha:1,baseLight:"#ffffff",baseDark:"self"};function convert(e,t){let n;switch(t){case"hex":n=e.map((function(e){return toHEX(e)}));break;case"rgb":n=e.map((function(e){return toRGB(e)}));break;case"rgba":n=e.map((function(e){return toRGBA(e,opt.alpha)}));break;case"hsl":n=e.map((function(e){return toHSL(e)}));break;case"hsla":n=e.map((function(e){return toHSLA(e,opt.alpha)}));break;case"cmyk":n=e.map((function(e){return toCMYK(e)}));break;default:n=e}return n}function clamp(e,t,n){return Math.max(t,Math.min(e,n))}function toRange(e,t,n){return en?n:e}function shift(e,t){for(e+=t;e>=360;)e-=360;for(;e<0;)e+=360;return e}const test=e=>{const _isHSLA=e=>/^hsla\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0(\.\d+)?|1(\.0+)?)\s*\)$/.test(e);return(e=>/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))(e)||(e=>/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)||(e=>/^hsv\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)||_isHSLA(e)||_isHSLA(e)||(e=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0(\.\d+)?|1(\.0+)?)\s*\)$/.test(e))(e)||(e=>/^hsl\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)||(e=>/^cmyk\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)},createColor=(e="hex",t="#000000")=>{let n;return"string"==typeof t&&(n=parseColor(t)),isColor(n)||(n="#000000"),toColor(n,e.toLowerCase())},Ae=createColor,expandHexColor=function(e){if(isColor(e)&&"string"!=typeof e)return e;if("string"!=typeof e)throw new Error("Value is not a string!");if("#"===e[0]&&4===e.length){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;return"#"+e.replace(t,((e,t,n,i)=>t+t+n+n+i+i))}return"#"===e[0]?e:"#"+e},Ie=expandHexColor,isDark=e=>{if(e=parseColor(e),!isColor(e))return;const t=toRGB(e);return(299*t.r+587*t.g+114*t.b)/1e3<128},isLight=e=>!isDark(e),isHSV=e=>parseColor(e)instanceof HSV,isHSL=e=>parseColor(e)instanceof HSL,isHSLA=e=>parseColor(e)instanceof HSLA,isRGB=e=>parseColor(e)instanceof RGB,isRGBA=e=>parseColor(e)instanceof RGBA,isCMYK=e=>parseColor(e)instanceof CMYK,isHEX=e=>/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e),isColor=e=>!!e&&("string"==typeof e?test(e):isHEX(e)||isRGB(e)||isRGBA(e)||isHSV(e)||isHSL(e)||isHSLA(e)||isCMYK(e)),colorType=e=>isHEX(e)?xe.HEX:isRGB(e)?xe.RGB:isRGBA(e)?xe.RGBA:isHSV(e)?xe.HSV:isHSL(e)?xe.HSL:isHSLA(e)?xe.HSLA:isCMYK(e)?xe.CMYK:xe.UNKNOWN,equal=(e,t)=>!(!isColor(e)||!isColor(t))&&toHEX(e)===toHEX(t),colorToString=e=>e.toString(),hex2rgb=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(expandHexColor(e)),n=[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];return t?new RGB(...n):null},rgb2hex=e=>"#"+((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1),rgb2hsv=e=>{const t=new HSV;let n,i,a;const s=e.r/255,o=e.g/255,r=e.b/255,l=Math.max(s,o,r),c=Math.min(s,o,r),d=l-c;return a=l,i=0===l?0:1-c/l,n=l===c?0:l===s&&o>=r?(o-r)/d*60:l===s&&o{let t,n,i;const a=e.h,s=100*e.s,o=100*e.v,r=(100-s)*o/100,l=a%60/60*(o-r),c=r+l,d=o-l;switch(Math.floor(a/60)){case 0:t=o,n=c,i=r;break;case 1:t=d,n=o,i=r;break;case 2:t=r,n=o,i=c;break;case 3:t=r,n=d,i=o;break;case 4:t=c,n=r,i=o;break;case 5:t=o,n=r,i=d}return new RGB(Math.round(255*t/100),Math.round(255*n/100),Math.round(255*i/100))},rgb2cmyk=e=>{const t=new CMYK,n=e.r/255,i=e.g/255,a=e.b/255;return t.k=Math.min(1-n,1-i,1-a),t.c=1-t.k==0?0:(1-n-t.k)/(1-t.k),t.m=1-t.k==0?0:(1-i-t.k)/(1-t.k),t.y=1-t.k==0?0:(1-a-t.k)/(1-t.k),t.c=Math.round(100*t.c),t.m=Math.round(100*t.m),t.y=Math.round(100*t.y),t.k=Math.round(100*t.k),t},cmyk2rgb=e=>{const t=Math.floor(255*(1-e.c/100)*(1-e.k/100)),n=Math.ceil(255*(1-e.m/100)*(1-e.k/100)),i=Math.ceil(255*(1-e.y/100)*(1-e.k/100));return new RGB(t,n,i)},hsv2hsl=e=>{let t,n,i,a;return t=parseInt(e.h),i=(2-e.s)*e.v,n=e.s*e.v,0===i?n=0:(a=i<=1?i:2-i,0===a?n=0:n/=a),i/=2,Number.isNaN(n)&&(n=0),Number.isNaN(i)&&(i=0),new HSL(t,n,i)},hsl2hsv=e=>{let t,n,i,a;return t=e.h,a=2*e.l,n=e.s*(a<=1?a:2-a),i=(a+n)/2,n=a+n===0?0:2*n/(a+n),new HSV(t,n,i)},rgb2websafe=e=>new RGB(51*Math.round(e.r/51),51*Math.round(e.g/51),51*Math.round(e.b/51)),rgba2websafe=e=>{const t=rgb2websafe(e);return new RGBA(t.r,t.g,t.b,e.a)},hex2websafe=e=>rgb2hex(rgb2websafe(hex2rgb(e))),hsv2websafe=e=>rgb2hsv(rgb2websafe(toRGB(e))),hsl2websafe=e=>hsv2hsl(rgb2hsv(rgb2websafe(toRGB(e)))),cmyk2websafe=e=>rgb2cmyk(rgb2websafe(cmyk2rgb(e))),websafe=e=>isHEX(e)?hex2websafe(e):isRGB(e)?rgb2websafe(e):isRGBA(e)?rgba2websafe(e):isHSV(e)?hsv2websafe(e):isHSL(e)?hsl2websafe(e):isCMYK(e)?cmyk2websafe(e):e,toColor=(e,t="rgb",n=1)=>{let i;switch(t.toLowerCase()){case"hex":i=toHEX(e);break;case"rgb":i=toRGB(e);break;case"rgba":i=toRGBA(e,n);break;case"hsl":i=toHSL(e);break;case"hsla":i=toHSLA(e,n);break;case"hsv":i=toHSV(e);break;case"cmyk":i=toCMYK(e);break;default:i=e}return i},toHEX=e=>"string"==typeof e?expandHexColor(e):rgb2hex(toRGB(e)),toRGB=e=>{if(isRGB(e))return e;if(isRGBA(e))return new RGB(e.r,e.g,e.b);if(isHSV(e))return hsv2rgb(e);if(isHSL(e))return hsv2rgb(hsl2hsv(e));if(isHSLA(e))return hsv2rgb(hsl2hsv(e));if(isHEX(e))return hex2rgb(e);if(isCMYK(e))return cmyk2rgb(e);throw new Error("Unknown color format!")},toRGBA=(e,t=1)=>{if(isRGBA(e))return t&&(e.a=t),e;const n=toRGB(e);return new RGBA(n.r,n.g,n.b,void 0!==e.a?e.a:t)},toHSV=e=>rgb2hsv(toRGB(e)),toHSL=e=>hsv2hsl(rgb2hsv(toRGB(e))),toHSLA=(e,t=1)=>{if(isHSLA(e))return t&&(e.a=t),e;let n=hsv2hsl(rgb2hsv(toRGB(e)));return n.a=void 0!==e.a?e.a:t,new HSLA(n.h,n.s,n.l,n.a)},toCMYK=e=>rgb2cmyk(toRGB(e)),grayscale=e=>{const t=toRGB(e),n=colorType(e).toLowerCase(),i=Math.round(.2125*t.r+.7154*t.g+.0721*t.b),a=new RGB(i,i,i);return toColor(a,n)},darken=(e,t=10)=>lighten(e,-1*Math.abs(t)),lighten=(e,t=10)=>{let n,i,a=t>0;const calc=function(e,t){let n,i,a;const s=e.slice(1),o=parseInt(s,16);return n=(o>>16)+t,n>255?n=255:n<0&&(n=0),a=(o>>8&255)+t,a>255?a=255:a<0&&(a=0),i=(255&o)+t,i>255?i=255:i<0&&(i=0),"#"+(i|a<<8|n<<16).toString(16)};n=colorType(e).toLowerCase(),n===xe.RGBA&&e.a;do{i=calc(toHEX(e),t),a?t--:t++}while(i.length<7);return toColor(i,n)},hueShift=(e,t,n=1)=>{const i=toHSV(e),a=colorType(e).toLowerCase();let s=i.h;for(s+=t;s>=360;)s-=360;for(;s<0;)s+=360;return i.h=s,toColor(i,a,n)},mix=(e,t,n)=>{n=0===n?0:n||50;const i=new RGB(0,0,0),a=toRGB(e),s=toRGB(t),o=n/100;return i.r=Math.round((s.r-a.r)*o+a.r),i.g=Math.round((s.g-a.g)*o+a.g),i.b=Math.round((s.b-a.b)*o+a.b),toHEX(i)},multiply=(e,t)=>{const n=toRGB(e),i=toRGB(t),a=new RGB;return n.b=Math.floor(n.b*i.b/255),n.g=Math.floor(n.g*i.g/255),n.r=Math.floor(n.r*i.r/255),toHEX(a)},shade=(e,t)=>{if(!isColor(e))throw new Error(e+" is not a valid color value!");t/=100;const n=colorType(e).toLowerCase(),i=toRGB(e),a=t<0?0:255,s=t<0?-1*t:t;let o,r,l,c;return o=Math.round((a-i.r)*s)+i.r,r=Math.round((a-i.g)*s)+i.g,l=Math.round((a-i.b)*s)+i.b,n!==xe.RGBA&&n!==xe.HSLA||(c=e.a),toColor(new RGB(o,r,l),n,c)},saturate=(e,t)=>{let n,i,a;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toHSL(e),n.s+=t/100,n.s=clamp(0,1,n.s),i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},desaturate=(e,t)=>{let n,i,a;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toHSL(e),n.s-=t/100,n.s=clamp(n.s),i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},spin=(e,t)=>{let n,i,a,s;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toHSL(e),s=(n.h+t)%360,n.h=s<0?360+s:s,i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},brighten=(e,t)=>{let n,i,a;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toRGB(e),n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},add=(e,t,n)=>{const i=Me(e),a=Me(t),s=toRGBA(i,void 0),o=toRGBA(a,void 0),r=new RGBA;return(""+n).toLowerCase(),r.r=Math.round((s.r+o.r)/2),r.g=Math.round((s.g+o.g)/2),r.b=Math.round((s.b+o.b)/2),r.a=Math.round((s.a+o.a)/2),toColor(r,n,r.a)},createColorScheme=(e,t,n=xe.HEX,i)=>{const a=Object.assign({},Ee,i);let s;const o=[];let r,l,c,d,u;if(r=toHSV(e),!1===isHSV(r))return console.warn("The value is a not supported color format!"),!1;switch(c=r.h,d=r.s,u=r.v,t){case"monochromatic":case"mono":if(1===a.algorithm)l=hsv2rgb(r),l.r=toRange(Math.round(l.r+(255-l.r)*a.tint1),0,255),l.g=toRange(Math.round(l.g+(255-l.g)*a.tint1),0,255),l.b=toRange(Math.round(l.b+(255-l.b)*a.tint1),0,255),o.push(rgb2hsv(l)),l=hsv2rgb(r),l.r=toRange(Math.round(l.r+(255-l.r)*a.tint2),0,255),l.g=toRange(Math.round(l.g+(255-l.g)*a.tint2),0,255),l.b=toRange(Math.round(l.b+(255-l.b)*a.tint2),0,255),o.push(rgb2hsv(l)),o.push(r),l=hsv2rgb(r),l.r=toRange(Math.round(l.r*a.shade1),0,255),l.g=toRange(Math.round(l.g*a.shade1),0,255),l.b=toRange(Math.round(l.b*a.shade1),0,255),o.push(rgb2hsv(l)),l=hsv2rgb(r),l.r=toRange(Math.round(l.r*a.shade2),0,255),l.g=toRange(Math.round(l.g*a.shade2),0,255),l.b=toRange(Math.round(l.b*a.shade2),0,255),o.push(rgb2hsv(l));else if(2===a.algorithm)for(o.push(r),s=1;s<=a.distance;s++)u=clamp(u-a.step,0,1),d=clamp(d-a.step,0,1),o.push({h:c,s:d,v:u});else if(3===a.algorithm)for(o.push(r),s=1;s<=a.distance;s++)u=clamp(u-a.step,0,1),o.push({h:c,s:d,v:u});else u=clamp(r.v+2*a.step,0,1),o.push({h:c,s:d,v:u}),u=clamp(r.v+a.step,0,1),o.push({h:c,s:d,v:u}),o.push(r),d=r.s,u=r.v,u=clamp(r.v-a.step,0,1),o.push({h:c,s:d,v:u}),u=clamp(r.v-2*a.step,0,1),o.push({h:c,s:d,v:u});break;case"complementary":case"complement":case"comp":o.push(r),c=shift(r.h,180),o.push(new HSV(c,d,u));break;case"double-complementary":case"double-complement":case"double":o.push(r),c=shift(c,180),o.push(new HSV(c,d,u)),c=shift(c,a.angle),o.push(new HSV(c,d,u)),c=shift(c,180),o.push(new HSV(c,d,u));break;case"analogous":case"analog":c=shift(c,a.angle),o.push(new HSV(c,d,u)),o.push(r),c=shift(r.h,0-a.angle),o.push(new HSV(c,d,u));break;case"triadic":case"triad":for(o.push(r),s=1;s<3;s++)c=shift(c,120),o.push(new HSV(c,d,u));break;case"tetradic":case"tetra":o.push(r),c=shift(r.h,180),o.push(new HSV(c,d,u)),c=shift(r.h,-1*a.angle),o.push(new HSV(c,d,u)),c=shift(c,180),o.push(new HSV(c,d,u));break;case"square":for(o.push(r),s=1;s<4;s++)c=shift(c,90),o.push(new HSV(c,d,u));break;case"split-complementary":case"split-complement":case"split":c=shift(c,180-a.angle),o.push(new HSV(c,d,u)),o.push(r),c=shift(r.h,180+a.angle),o.push(new HSV(c,d,u));break;case"material":var h=a.baseLight,p="self"!==a.baseDark&&a.baseDark?a.baseDark:multiply(e,e);o.push({50:mix(h,e,10),100:mix(h,e,30),200:mix(h,e,50),300:mix(h,e,70),400:mix(h,e,85),500:mix(h,e,100),600:mix(p,e,92),700:mix(p,e,83),800:mix(p,e,74),900:mix(p,e,65),A100:lighten(saturate(mix(p,e,15),80),65),A200:lighten(saturate(mix(p,e,15),80),55),A400:lighten(saturate(mix(h,e,100),55),10),A700:lighten(saturate(mix(p,e,83),65),10)});break;default:console.error("Unknown scheme name")}return"material"===t?o[0]:convert(o,n)},parseColor=function(e){let t=(""+e).toLowerCase();void 0!==_e[t]&&(t=_e[t]),void 0!==Se[t]&&(t=Se[t]);let n=t.replace(/[^\d.,]/g,"").split(",").map((e=>+e));return"#"===t[0]?expandHexColor(t):t.includes("rgba")?new RGBA(n[0],n[1],n[2],n[3]):t.includes("rgb")?new RGB(n[0],n[1],n[2]):t.includes("cmyk")?new CMYK(n[0],n[1],n[2],n[3]):t.includes("hsv")?new HSV(n[0],n[1],n[2]):t.includes("hsla")?new HSLA(n[0],n[1],n[2],n[3]):t.includes("hsl")?new HSL(n[0],n[1],n[2]):t},Me=parseColor,randomColor=(e="hex",t=1)=>{const rnd=(e,t)=>Math.floor(e+Math.random()*(t+1-e));let n,i,a,s;return i=rnd(0,255),a=rnd(0,255),s=rnd(0,255),n="#"+((1<<24)+(i<<16)+(a<<8)+s).toString(16).slice(1),"hex"===e?n:toColor(n,e,t)},De=randomColor;var Oe=Object.freeze({__proto__:null,Primitives:ke,colorTypes:xe,colorDefaultProps:Ee,test:test,createColor:createColor,create:Ae,expandHexColor:expandHexColor,expand:Ie,isDark:isDark,isLight:isLight,isHSV:isHSV,isHSL:isHSL,isHSLA:isHSLA,isRGB:isRGB,isRGBA:isRGBA,isCMYK:isCMYK,isHEX:isHEX,isColor:isColor,colorType:colorType,equal:equal,colorToString:colorToString,hex2rgb:hex2rgb,rgb2hex:rgb2hex,rgb2hsv:rgb2hsv,hsv2rgb:hsv2rgb,hsv2hex:e=>rgb2hex(hsv2rgb(e)),hex2hsv:e=>rgb2hsv(hex2rgb(e)),rgb2cmyk:rgb2cmyk,cmyk2rgb:cmyk2rgb,hsv2hsl:hsv2hsl,hsl2hsv:hsl2hsv,rgb2websafe:rgb2websafe,rgba2websafe:rgba2websafe,hex2websafe:hex2websafe,hsv2websafe:hsv2websafe,hsl2websafe:hsl2websafe,cmyk2websafe:cmyk2websafe,websafe:websafe,toColor:toColor,toHEX:toHEX,toRGB:toRGB,toRGBA:toRGBA,toHSV:toHSV,toHSL:toHSL,toHSLA:toHSLA,toCMYK:toCMYK,grayscale:grayscale,darken:darken,lighten:lighten,hueShift:hueShift,mix:mix,multiply:multiply,shade:shade,saturate:saturate,desaturate:desaturate,spin:spin,brighten:brighten,add:add,createColorScheme:createColorScheme,parseColor:parseColor,parse:Me,randomColor:randomColor,random:De});let Pe=class Farbe{_setValue(e){e||(e="#000000"),"string"==typeof e&&(e=parseColor(e)),e&&isColor(e)?this._value=e:this._value=void 0}_setOptions(e){this._options=Object.assign({},Ee,e)}constructor(e="#000000",t=null){this._setValue(e),this._setOptions(t)}get options(){return this._options}set options(e){this._setOptions(e)}get value(){return this._value?this._value:void 0}set value(e){this._setValue(e)}toRGB(){if(this._value)return this._value=toRGB(this._value),this}get rgb(){return this._value?toRGB(this._value):void 0}toRGBA(e){if(this._value)return isRGBA(this._value)?e&&(this._value=toRGBA(this._value,e)):this._value=toRGBA(this._value,e||Ee.alpha),this}get rgba(){return this._value?isRGBA(this._value)?this._value:toRGBA(this._value,this._options.alpha):void 0}toHEX(){if(this._value)return this._value=toHEX(this._value),this}get hex(){return this._value?toHEX(this._value):void 0}toHSV(){if(this._value)return this._value=toHSV(this._value),this}get hsv(){return this._value?toHSV(this._value):void 0}toHSL(){if(this._value)return this._value=toHSL(this._value),this}get hsl(){return this._value?toHSL(this._value):void 0}toHSLA(e){if(this._value)return isHSLA(this._value)?e&&(this._value=toHSLA(this._value,e)):this._value=toHSLA(this._value,e),this}get hsla(){return this._value?isHSLA(this._value)?this._value:toHSLA(this._value,this._options.alpha):void 0}toCMYK(){if(this._value)return this._value=toCMYK(this._value),this}get cmyk(){return this._value?toCMYK(this._value):void 0}toWebsafe(){if(this._value)return this._value=websafe(this._value),this}get websafe(){return this._value?websafe(this._value):void 0}toString(){return this._value?colorToString(this._value):void 0}darken(e=10){if(this._value)return this._value=darken(this._value,e),this}lighten(e=10){if(this._value)return this._value=lighten(this._value,e),this}isDark(){return this._value?isDark(this._value):void 0}isLight(){return this._value?isLight(this._value):void 0}hueShift(e){if(this._value)return this._value=hueShift(this._value,e),this}grayscale(){if(this._value&&this.type!==xe.UNKNOWN)return this._value=grayscale(this._value,(""+this.type).toLowerCase()),this}get type(){return colorType(this._value)}getScheme(e,t,n){return this._value?createColorScheme(this._value,e,t,n):void 0}equal(e){return equal(this._value,e)}random(e,t){this._value=randomColor(e,t)}channel(e,t){const n=this.type;return["red","green","blue"].includes(e)&&(this.toRGB(),this._value[["red","green","blue"].indexOf(e)]=t,this["to"+n]()),"alpha"===e&&this._value.a&&(this._value.a=t),["hue","saturation","value"].includes(e)&&(this.toHSV(),this._value[["hue","saturation","value"].indexOf(e)]=t,this["to"+n]()),["lightness"].includes(e)&&(this.toHSL(),this._value[2]=t,this["to"+n]()),["cyan","magenta","yellow","black"].includes(e)&&(this.toCMYK(),this._value[["cyan","magenta","yellow","black"].indexOf(e)]=t,this["to"+n]()),this}add(e){this._setValue(add(this._value,e))}mix(e,t){this._setValue(mix(this._value,e,t))}multiply(e){this._setValue(multiply(this._value,e))}shade(e){this._setValue(shade(this._value,e))}saturate(e){this._setValue(saturate(this._value,e))}desaturate(e){this._setValue(desaturate(this._value,e))}spin(e){this._setValue(spin(this._value,e))}brighten(e){this._setValue(brighten(this._value,e))}};const Ne={...ke}; +class HSV{constructor(e=0,t=0,n=0){this.h=e,this.s=t,this.v=n}toString(){return"hsv("+[Math.round(this.h),Math.round(100*this.s)+"%",Math.round(100*this.v)+"%"].join(", ")+")"}}class HSL{constructor(e=0,t=0,n=0){this.h=e,this.s=t,this.l=n}toString(){return"hsl("+[Math.round(this.h),Math.round(100*this.s)+"%",Math.round(100*this.l)+"%"].join(", ")+")"}}class HSLA{constructor(e=0,t=0,n=0,i=0){this.h=e,this.s=t,this.l=n,this.a=i}toString(){return"hsla("+[Math.round(this.h),Math.round(100*this.s)+"%",Math.round(100*this.l)+"%",parseFloat(this.a).toFixed(2)].join(", ")+")"}}class RGB{constructor(e=0,t=0,n=0){this.r=e,this.g=t,this.b=n}toString(){return`rgb(${this.r},${this.g},${this.b})`}}class RGBA{constructor(e=0,t=0,n=0,i=0){this.r=e,this.g=t,this.b=n,this.a=i}toString(){return`rgba(${this.r},${this.g},${this.b},${this.a})`}}class CMYK{constructor(e=0,t=0,n=0,i=0){this.c=e,this.m=t,this.y=n,this.k=i}toString(){return`cmyk(${this.c},${this.m},${this.y},${this.k})`}}const _e={aliceBlue:"#f0f8ff",antiqueWhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedAlmond:"#ffebcd",blue:"#0000ff",blueViolet:"#8a2be2",brown:"#a52a2a",burlyWood:"#deb887",cadetBlue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerBlue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkBlue:"#00008b",darkCyan:"#008b8b",darkGoldenRod:"#b8860b",darkGray:"#a9a9a9",darkGreen:"#006400",darkKhaki:"#bdb76b",darkMagenta:"#8b008b",darkOliveGreen:"#556b2f",darkOrange:"#ff8c00",darkOrchid:"#9932cc",darkRed:"#8b0000",darkSalmon:"#e9967a",darkSeaGreen:"#8fbc8f",darkSlateBlue:"#483d8b",darkSlateGray:"#2f4f4f",darkTurquoise:"#00ced1",darkViolet:"#9400d3",deepPink:"#ff1493",deepSkyBlue:"#00bfff",dimGray:"#696969",dodgerBlue:"#1e90ff",fireBrick:"#b22222",floralWhite:"#fffaf0",forestGreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#DCDCDC",ghostWhite:"#F8F8FF",gold:"#ffd700",goldenRod:"#daa520",gray:"#808080",green:"#008000",greenYellow:"#adff2f",honeyDew:"#f0fff0",hotPink:"#ff69b4",indianRed:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderBlush:"#fff0f5",lawnGreen:"#7cfc00",lemonChiffon:"#fffacd",lightBlue:"#add8e6",lightCoral:"#f08080",lightCyan:"#e0ffff",lightGoldenRodYellow:"#fafad2",lightGray:"#d3d3d3",lightGreen:"#90ee90",lightPink:"#ffb6c1",lightSalmon:"#ffa07a",lightSeaGreen:"#20b2aa",lightSkyBlue:"#87cefa",lightSlateGray:"#778899",lightSteelBlue:"#b0c4de",lightYellow:"#ffffe0",lime:"#00ff00",limeGreen:"#32dc32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumAquaMarine:"#66cdaa",mediumBlue:"#0000cd",mediumOrchid:"#ba55d3",mediumPurple:"#9370db",mediumSeaGreen:"#3cb371",mediumSlateBlue:"#7b68ee",mediumSpringGreen:"#00fa9a",mediumTurquoise:"#48d1cc",mediumVioletRed:"#c71585",midnightBlue:"#191970",mintCream:"#f5fffa",mistyRose:"#ffe4e1",moccasin:"#ffe4b5",navajoWhite:"#ffdead",navy:"#000080",oldLace:"#fdd5e6",olive:"#808000",oliveDrab:"#6b8e23",orange:"#ffa500",orangeRed:"#ff4500",orchid:"#da70d6",paleGoldenRod:"#eee8aa",paleGreen:"#98fb98",paleTurquoise:"#afeeee",paleVioletRed:"#db7093",papayaWhip:"#ffefd5",peachPuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderBlue:"#b0e0e6",purple:"#800080",rebeccaPurple:"#663399",red:"#ff0000",rosyBrown:"#bc8f8f",royalBlue:"#4169e1",saddleBrown:"#8b4513",salmon:"#fa8072",sandyBrown:"#f4a460",seaGreen:"#2e8b57",seaShell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",slyBlue:"#87ceeb",slateBlue:"#6a5acd",slateGray:"#708090",snow:"#fffafa",springGreen:"#00ff7f",steelBlue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whiteSmoke:"#f5f5f5",yellow:"#ffff00",yellowGreen:"#9acd32"},Se={lime:"#a4c400",green:"#60a917",emerald:"#008a00",blue:"#00AFF0",teal:"#00aba9",cyan:"#1ba1e2",cobalt:"#0050ef",indigo:"#6a00ff",violet:"#aa00ff",pink:"#dc4fad",magenta:"#d80073",crimson:"#a20025",red:"#CE352C",orange:"#fa6800",amber:"#f0a30a",yellow:"#fff000",brown:"#825a2c",olive:"#6d8764",steel:"#647687",mauve:"#76608a",taupe:"#87794e"},ke={color:function(e,t=_e,n=void 0){return void 0!==t[e]?t[e]:n},palette:function(e=_e){return Object.keys(e)},colors:function(e=_e){return Object.values(e)}},Te={HSV:HSV,HSL:HSL,HSLA:HSLA,RGB:RGB,RGBA:RGBA,CMYK:CMYK},xe={HEX:"hex",RGB:"rgb",RGBA:"rgba",HSV:"hsv",HSL:"hsl",HSLA:"hsla",CMYK:"cmyk",UNKNOWN:"unknown"},Ee={angle:30,algorithm:1,step:.1,distance:5,tint1:.8,tint2:.4,shade1:.6,shade2:.3,alpha:1,baseLight:"#ffffff",baseDark:"self"};function convert(e,t){let n;switch(t){case"hex":n=e.map((function(e){return toHEX(e)}));break;case"rgb":n=e.map((function(e){return toRGB(e)}));break;case"rgba":n=e.map((function(e){return toRGBA(e,opt.alpha)}));break;case"hsl":n=e.map((function(e){return toHSL(e)}));break;case"hsla":n=e.map((function(e){return toHSLA(e,opt.alpha)}));break;case"cmyk":n=e.map((function(e){return toCMYK(e)}));break;default:n=e}return n}function clamp(e,t,n){return Math.max(t,Math.min(e,n))}function toRange(e,t,n){return en?n:e}function shift(e,t){for(e+=t;e>=360;)e-=360;for(;e<0;)e+=360;return e}const test=e=>{const _isHSLA=e=>/^hsla\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0(\.\d+)?|1(\.0+)?)\s*\)$/.test(e);return(e=>/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))(e)||(e=>/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)||(e=>/^hsv\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)||_isHSLA(e)||_isHSLA(e)||(e=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0(\.\d+)?|1(\.0+)?)\s*\)$/.test(e))(e)||(e=>/^hsl\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)||(e=>/^cmyk\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))(e)},createColor=(e="hex",t="#000000")=>{let n;return"string"==typeof t&&(n=parseColor(t)),isColor(n)||(n="#000000"),toColor(n,e.toLowerCase())},Ae=createColor,expandHexColor=function(e){if(isColor(e)&&"string"!=typeof e)return e;if("string"!=typeof e)throw new Error("Value is not a string!");if("#"===e[0]&&4===e.length){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;return"#"+e.replace(t,((e,t,n,i)=>t+t+n+n+i+i))}return"#"===e[0]?e:"#"+e},Ie=expandHexColor,isDark=e=>{if(e=parseColor(e),!isColor(e))return;const t=toRGB(e);return(299*t.r+587*t.g+114*t.b)/1e3<128},isLight=e=>!isDark(e),isHSV=e=>parseColor(e)instanceof HSV,isHSL=e=>parseColor(e)instanceof HSL,isHSLA=e=>parseColor(e)instanceof HSLA,isRGB=e=>parseColor(e)instanceof RGB,isRGBA=e=>parseColor(e)instanceof RGBA,isCMYK=e=>parseColor(e)instanceof CMYK,isHEX=e=>/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e),isColor=e=>!!e&&("string"==typeof e?test(e):isHEX(e)||isRGB(e)||isRGBA(e)||isHSV(e)||isHSL(e)||isHSLA(e)||isCMYK(e)),colorType=e=>isHEX(e)?xe.HEX:isRGB(e)?xe.RGB:isRGBA(e)?xe.RGBA:isHSV(e)?xe.HSV:isHSL(e)?xe.HSL:isHSLA(e)?xe.HSLA:isCMYK(e)?xe.CMYK:xe.UNKNOWN,equal=(e,t)=>!(!isColor(e)||!isColor(t))&&toHEX(e)===toHEX(t),colorToString=e=>e.toString(),hex2rgb=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(expandHexColor(e)),n=[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];return t?new RGB(...n):null},rgb2hex=e=>"#"+((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1),rgb2hsv=e=>{const t=new HSV;let n,i,a;const s=e.r/255,o=e.g/255,r=e.b/255,l=Math.max(s,o,r),c=Math.min(s,o,r),d=l-c;return a=l,i=0===l?0:1-c/l,n=l===c?0:l===s&&o>=r?(o-r)/d*60:l===s&&o{let t,n,i;const a=e.h,s=100*e.s,o=100*e.v,r=(100-s)*o/100,l=a%60/60*(o-r),c=r+l,d=o-l;switch(Math.floor(a/60)){case 0:t=o,n=c,i=r;break;case 1:t=d,n=o,i=r;break;case 2:t=r,n=o,i=c;break;case 3:t=r,n=d,i=o;break;case 4:t=c,n=r,i=o;break;case 5:t=o,n=r,i=d}return new RGB(Math.round(255*t/100),Math.round(255*n/100),Math.round(255*i/100))},rgb2cmyk=e=>{const t=new CMYK,n=e.r/255,i=e.g/255,a=e.b/255;return t.k=Math.min(1-n,1-i,1-a),t.c=1-t.k==0?0:(1-n-t.k)/(1-t.k),t.m=1-t.k==0?0:(1-i-t.k)/(1-t.k),t.y=1-t.k==0?0:(1-a-t.k)/(1-t.k),t.c=Math.round(100*t.c),t.m=Math.round(100*t.m),t.y=Math.round(100*t.y),t.k=Math.round(100*t.k),t},cmyk2rgb=e=>{const t=Math.floor(255*(1-e.c/100)*(1-e.k/100)),n=Math.ceil(255*(1-e.m/100)*(1-e.k/100)),i=Math.ceil(255*(1-e.y/100)*(1-e.k/100));return new RGB(t,n,i)},hsv2hsl=e=>{let t,n,i,a;return t=parseInt(e.h),i=(2-e.s)*e.v,n=e.s*e.v,0===i?n=0:(a=i<=1?i:2-i,0===a?n=0:n/=a),i/=2,Number.isNaN(n)&&(n=0),Number.isNaN(i)&&(i=0),new HSL(t,n,i)},hsl2hsv=e=>{let t,n,i,a;return t=e.h,a=2*e.l,n=e.s*(a<=1?a:2-a),i=(a+n)/2,n=a+n===0?0:2*n/(a+n),new HSV(t,n,i)},rgb2websafe=e=>new RGB(51*Math.round(e.r/51),51*Math.round(e.g/51),51*Math.round(e.b/51)),rgba2websafe=e=>{const t=rgb2websafe(e);return new RGBA(t.r,t.g,t.b,e.a)},hex2websafe=e=>rgb2hex(rgb2websafe(hex2rgb(e))),hsv2websafe=e=>rgb2hsv(rgb2websafe(toRGB(e))),hsl2websafe=e=>hsv2hsl(rgb2hsv(rgb2websafe(toRGB(e)))),cmyk2websafe=e=>rgb2cmyk(rgb2websafe(cmyk2rgb(e))),websafe=e=>isHEX(e)?hex2websafe(e):isRGB(e)?rgb2websafe(e):isRGBA(e)?rgba2websafe(e):isHSV(e)?hsv2websafe(e):isHSL(e)?hsl2websafe(e):isCMYK(e)?cmyk2websafe(e):e,toColor=(e,t="rgb",n=1)=>{let i;switch(t.toLowerCase()){case"hex":i=toHEX(e);break;case"rgb":i=toRGB(e);break;case"rgba":i=toRGBA(e,n);break;case"hsl":i=toHSL(e);break;case"hsla":i=toHSLA(e,n);break;case"hsv":i=toHSV(e);break;case"cmyk":i=toCMYK(e);break;default:i=e}return i},toHEX=e=>"string"==typeof e?expandHexColor(e):rgb2hex(toRGB(e)),toRGB=e=>{if(isRGB(e))return e;if(isRGBA(e))return new RGB(e.r,e.g,e.b);if(isHSV(e))return hsv2rgb(e);if(isHSL(e))return hsv2rgb(hsl2hsv(e));if(isHSLA(e))return hsv2rgb(hsl2hsv(e));if(isHEX(e))return hex2rgb(e);if(isCMYK(e))return cmyk2rgb(e);throw new Error("Unknown color format!")},toRGBA=(e,t=1)=>{if(isRGBA(e))return t&&(e.a=t),e;const n=toRGB(e);return new RGBA(n.r,n.g,n.b,void 0!==e.a?e.a:t)},toHSV=e=>rgb2hsv(toRGB(e)),toHSL=e=>hsv2hsl(rgb2hsv(toRGB(e))),toHSLA=(e,t=1)=>{if(isHSLA(e))return t&&(e.a=t),e;let n=hsv2hsl(rgb2hsv(toRGB(e)));return n.a=void 0!==e.a?e.a:t,new HSLA(n.h,n.s,n.l,n.a)},toCMYK=e=>rgb2cmyk(toRGB(e)),grayscale=e=>{const t=toRGB(e),n=colorType(e).toLowerCase(),i=Math.round(.2125*t.r+.7154*t.g+.0721*t.b),a=new RGB(i,i,i);return toColor(a,n)},darken=(e,t=10)=>lighten(e,-1*Math.abs(t)),lighten=(e,t=10)=>{let n,i,a=t>0;const calc=function(e,t){let n,i,a;const s=e.slice(1),o=parseInt(s,16);return n=(o>>16)+t,n>255?n=255:n<0&&(n=0),a=(o>>8&255)+t,a>255?a=255:a<0&&(a=0),i=(255&o)+t,i>255?i=255:i<0&&(i=0),"#"+(i|a<<8|n<<16).toString(16)};n=colorType(e).toLowerCase(),n===xe.RGBA&&e.a;do{i=calc(toHEX(e),t),a?t--:t++}while(i.length<7);return toColor(i,n)},hueShift=(e,t,n=1)=>{const i=toHSV(e),a=colorType(e).toLowerCase();let s=i.h;for(s+=t;s>=360;)s-=360;for(;s<0;)s+=360;return i.h=s,toColor(i,a,n)},mix=(e,t,n)=>{n=0===n?0:n||50;const i=new RGB(0,0,0),a=toRGB(e),s=toRGB(t),o=n/100;return i.r=Math.round((s.r-a.r)*o+a.r),i.g=Math.round((s.g-a.g)*o+a.g),i.b=Math.round((s.b-a.b)*o+a.b),toHEX(i)},multiply=(e,t)=>{const n=toRGB(e),i=toRGB(t),a=new RGB;return n.b=Math.floor(n.b*i.b/255),n.g=Math.floor(n.g*i.g/255),n.r=Math.floor(n.r*i.r/255),toHEX(a)},shade=(e,t)=>{if(!isColor(e))throw new Error(e+" is not a valid color value!");t/=100;const n=colorType(e).toLowerCase(),i=toRGB(e),a=t<0?0:255,s=t<0?-1*t:t;let o,r,l,c;return o=Math.round((a-i.r)*s)+i.r,r=Math.round((a-i.g)*s)+i.g,l=Math.round((a-i.b)*s)+i.b,n!==xe.RGBA&&n!==xe.HSLA||(c=e.a),toColor(new RGB(o,r,l),n,c)},saturate=(e,t)=>{let n,i,a;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toHSL(e),n.s+=t/100,n.s=clamp(0,1,n.s),i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},desaturate=(e,t)=>{let n,i,a;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toHSL(e),n.s-=t/100,n.s=clamp(n.s),i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},spin=(e,t)=>{let n,i,a,s;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toHSL(e),s=(n.h+t)%360,n.h=s<0?360+s:s,i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},brighten=(e,t)=>{let n,i,a;if(!isColor(e))throw new Error(e+" is not a valid color value!");return n=toRGB(e),n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),i=colorType(e).toLowerCase(),i!==xe.RGBA&&i!==xe.HSLA||(a=e.a),toColor(n,i,a)},add=(e,t,n)=>{const i=Me(e),a=Me(t),s=toRGBA(i,void 0),o=toRGBA(a,void 0),r=new RGBA;return(""+n).toLowerCase(),r.r=Math.round((s.r+o.r)/2),r.g=Math.round((s.g+o.g)/2),r.b=Math.round((s.b+o.b)/2),r.a=Math.round((s.a+o.a)/2),toColor(r,n,r.a)},createColorScheme=(e,t,n=xe.HEX,i)=>{const a=Object.assign({},Ee,i);let s;const o=[];let r,l,c,d,u;if(r=toHSV(e),!1===isHSV(r))return console.warn("The value is a not supported color format!"),!1;switch(c=r.h,d=r.s,u=r.v,t){case"monochromatic":case"mono":if(1===a.algorithm)l=hsv2rgb(r),l.r=toRange(Math.round(l.r+(255-l.r)*a.tint1),0,255),l.g=toRange(Math.round(l.g+(255-l.g)*a.tint1),0,255),l.b=toRange(Math.round(l.b+(255-l.b)*a.tint1),0,255),o.push(rgb2hsv(l)),l=hsv2rgb(r),l.r=toRange(Math.round(l.r+(255-l.r)*a.tint2),0,255),l.g=toRange(Math.round(l.g+(255-l.g)*a.tint2),0,255),l.b=toRange(Math.round(l.b+(255-l.b)*a.tint2),0,255),o.push(rgb2hsv(l)),o.push(r),l=hsv2rgb(r),l.r=toRange(Math.round(l.r*a.shade1),0,255),l.g=toRange(Math.round(l.g*a.shade1),0,255),l.b=toRange(Math.round(l.b*a.shade1),0,255),o.push(rgb2hsv(l)),l=hsv2rgb(r),l.r=toRange(Math.round(l.r*a.shade2),0,255),l.g=toRange(Math.round(l.g*a.shade2),0,255),l.b=toRange(Math.round(l.b*a.shade2),0,255),o.push(rgb2hsv(l));else if(2===a.algorithm)for(o.push(r),s=1;s<=a.distance;s++)u=clamp(u-a.step,0,1),d=clamp(d-a.step,0,1),o.push({h:c,s:d,v:u});else if(3===a.algorithm)for(o.push(r),s=1;s<=a.distance;s++)u=clamp(u-a.step,0,1),o.push({h:c,s:d,v:u});else u=clamp(r.v+2*a.step,0,1),o.push({h:c,s:d,v:u}),u=clamp(r.v+a.step,0,1),o.push({h:c,s:d,v:u}),o.push(r),d=r.s,u=r.v,u=clamp(r.v-a.step,0,1),o.push({h:c,s:d,v:u}),u=clamp(r.v-2*a.step,0,1),o.push({h:c,s:d,v:u});break;case"complementary":case"complement":case"comp":o.push(r),c=shift(r.h,180),o.push(new HSV(c,d,u));break;case"double-complementary":case"double-complement":case"double":o.push(r),c=shift(c,180),o.push(new HSV(c,d,u)),c=shift(c,a.angle),o.push(new HSV(c,d,u)),c=shift(c,180),o.push(new HSV(c,d,u));break;case"analogous":case"analog":c=shift(c,a.angle),o.push(new HSV(c,d,u)),o.push(r),c=shift(r.h,0-a.angle),o.push(new HSV(c,d,u));break;case"triadic":case"triad":for(o.push(r),s=1;s<3;s++)c=shift(c,120),o.push(new HSV(c,d,u));break;case"tetradic":case"tetra":o.push(r),c=shift(r.h,180),o.push(new HSV(c,d,u)),c=shift(r.h,-1*a.angle),o.push(new HSV(c,d,u)),c=shift(c,180),o.push(new HSV(c,d,u));break;case"square":for(o.push(r),s=1;s<4;s++)c=shift(c,90),o.push(new HSV(c,d,u));break;case"split-complementary":case"split-complement":case"split":c=shift(c,180-a.angle),o.push(new HSV(c,d,u)),o.push(r),c=shift(r.h,180+a.angle),o.push(new HSV(c,d,u));break;case"material":var h=a.baseLight,p="self"!==a.baseDark&&a.baseDark?a.baseDark:multiply(e,e);o.push({50:mix(h,e,10),100:mix(h,e,30),200:mix(h,e,50),300:mix(h,e,70),400:mix(h,e,85),500:mix(h,e,100),600:mix(p,e,92),700:mix(p,e,83),800:mix(p,e,74),900:mix(p,e,65),A100:lighten(saturate(mix(p,e,15),80),65),A200:lighten(saturate(mix(p,e,15),80),55),A400:lighten(saturate(mix(h,e,100),55),10),A700:lighten(saturate(mix(p,e,83),65),10)});break;default:console.error("Unknown scheme name")}return"material"===t?o[0]:convert(o,n)},parseColor=function(e){let t=(""+e).toLowerCase();void 0!==_e[t]&&(t=_e[t]),void 0!==Se[t]&&(t=Se[t]);let n=t.replace(/[^\d.,]/g,"").split(",").map((e=>+e));return"#"===t[0]?expandHexColor(t):t.includes("rgba")?new RGBA(n[0],n[1],n[2],n[3]):t.includes("rgb")?new RGB(n[0],n[1],n[2]):t.includes("cmyk")?new CMYK(n[0],n[1],n[2],n[3]):t.includes("hsv")?new HSV(n[0],n[1],n[2]):t.includes("hsla")?new HSLA(n[0],n[1],n[2],n[3]):t.includes("hsl")?new HSL(n[0],n[1],n[2]):t},Me=parseColor,randomColor=(e="hex",t=1)=>{const rnd=(e,t)=>Math.floor(e+Math.random()*(t+1-e));let n,i,a,s;return i=rnd(0,255),a=rnd(0,255),s=rnd(0,255),n="#"+((1<<24)+(i<<16)+(a<<8)+s).toString(16).slice(1),"hex"===e?n:toColor(n,e,t)},De=randomColor;var Oe=Object.freeze({__proto__:null,Primitives:Te,colorTypes:xe,colorDefaultProps:Ee,test:test,createColor:createColor,create:Ae,expandHexColor:expandHexColor,expand:Ie,isDark:isDark,isLight:isLight,isHSV:isHSV,isHSL:isHSL,isHSLA:isHSLA,isRGB:isRGB,isRGBA:isRGBA,isCMYK:isCMYK,isHEX:isHEX,isColor:isColor,colorType:colorType,equal:equal,colorToString:colorToString,hex2rgb:hex2rgb,rgb2hex:rgb2hex,rgb2hsv:rgb2hsv,hsv2rgb:hsv2rgb,hsv2hex:e=>rgb2hex(hsv2rgb(e)),hex2hsv:e=>rgb2hsv(hex2rgb(e)),rgb2cmyk:rgb2cmyk,cmyk2rgb:cmyk2rgb,hsv2hsl:hsv2hsl,hsl2hsv:hsl2hsv,rgb2websafe:rgb2websafe,rgba2websafe:rgba2websafe,hex2websafe:hex2websafe,hsv2websafe:hsv2websafe,hsl2websafe:hsl2websafe,cmyk2websafe:cmyk2websafe,websafe:websafe,toColor:toColor,toHEX:toHEX,toRGB:toRGB,toRGBA:toRGBA,toHSV:toHSV,toHSL:toHSL,toHSLA:toHSLA,toCMYK:toCMYK,grayscale:grayscale,darken:darken,lighten:lighten,hueShift:hueShift,mix:mix,multiply:multiply,shade:shade,saturate:saturate,desaturate:desaturate,spin:spin,brighten:brighten,add:add,createColorScheme:createColorScheme,parseColor:parseColor,parse:Me,randomColor:randomColor,random:De});let Pe=class Farbe{_setValue(e){e||(e="#000000"),"string"==typeof e&&(e=parseColor(e)),e&&isColor(e)?this._value=e:this._value=void 0}_setOptions(e){this._options=Object.assign({},Ee,e)}constructor(e="#000000",t=null){this._setValue(e),this._setOptions(t)}get options(){return this._options}set options(e){this._setOptions(e)}get value(){return this._value?this._value:void 0}set value(e){this._setValue(e)}toRGB(){if(this._value)return this._value=toRGB(this._value),this}get rgb(){return this._value?toRGB(this._value):void 0}toRGBA(e){if(this._value)return isRGBA(this._value)?e&&(this._value=toRGBA(this._value,e)):this._value=toRGBA(this._value,e||Ee.alpha),this}get rgba(){return this._value?isRGBA(this._value)?this._value:toRGBA(this._value,this._options.alpha):void 0}toHEX(){if(this._value)return this._value=toHEX(this._value),this}get hex(){return this._value?toHEX(this._value):void 0}toHSV(){if(this._value)return this._value=toHSV(this._value),this}get hsv(){return this._value?toHSV(this._value):void 0}toHSL(){if(this._value)return this._value=toHSL(this._value),this}get hsl(){return this._value?toHSL(this._value):void 0}toHSLA(e){if(this._value)return isHSLA(this._value)?e&&(this._value=toHSLA(this._value,e)):this._value=toHSLA(this._value,e),this}get hsla(){return this._value?isHSLA(this._value)?this._value:toHSLA(this._value,this._options.alpha):void 0}toCMYK(){if(this._value)return this._value=toCMYK(this._value),this}get cmyk(){return this._value?toCMYK(this._value):void 0}toWebsafe(){if(this._value)return this._value=websafe(this._value),this}get websafe(){return this._value?websafe(this._value):void 0}toString(){return this._value?colorToString(this._value):void 0}darken(e=10){if(this._value)return this._value=darken(this._value,e),this}lighten(e=10){if(this._value)return this._value=lighten(this._value,e),this}isDark(){return this._value?isDark(this._value):void 0}isLight(){return this._value?isLight(this._value):void 0}hueShift(e){if(this._value)return this._value=hueShift(this._value,e),this}grayscale(){if(this._value&&this.type!==xe.UNKNOWN)return this._value=grayscale(this._value,(""+this.type).toLowerCase()),this}get type(){return colorType(this._value)}getScheme(e,t,n){return this._value?createColorScheme(this._value,e,t,n):void 0}equal(e){return equal(this._value,e)}random(e,t){this._value=randomColor(e,t)}channel(e,t){const n=this.type;return["red","green","blue"].includes(e)&&(this.toRGB(),this._value[["red","green","blue"].indexOf(e)]=t,this["to"+n]()),"alpha"===e&&this._value.a&&(this._value.a=t),["hue","saturation","value"].includes(e)&&(this.toHSV(),this._value[["hue","saturation","value"].indexOf(e)]=t,this["to"+n]()),["lightness"].includes(e)&&(this.toHSL(),this._value[2]=t,this["to"+n]()),["cyan","magenta","yellow","black"].includes(e)&&(this.toCMYK(),this._value[["cyan","magenta","yellow","black"].indexOf(e)]=t,this["to"+n]()),this}add(e){this._setValue(add(this._value,e))}mix(e,t){this._setValue(mix(this._value,e,t))}multiply(e){this._setValue(multiply(this._value,e))}shade(e){this._setValue(shade(this._value,e))}saturate(e){this._setValue(saturate(this._value,e))}desaturate(e){this._setValue(desaturate(this._value,e))}spin(e){this._setValue(spin(this._value,e))}brighten(e){this._setValue(brighten(this._value,e))}};const Ne={...Te}; /*! * HtmlJS - Create html elements with JS * Copyright 2024 by Serhii Pimenov * Licensed under MIT !*/ -function dashedName(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}globalThis.Farbe=Pe,globalThis.farbe=e=>new Pe(e),globalThis.Farbe.Routines=Oe,globalThis.Farbe.Palette=Te,globalThis.Farbe.StandardColors=_e,globalThis.Farbe.MetroColors=Se,globalThis.Farbe.Primitives=Ne,globalThis.Farbe.info=()=>{console.info("%c Farbe %c v1.0.3 %c 14.07.2024, 17:25:33 ","color: #ffffff; font-weight: bold; background: #ff00ff","color: white; background: darkgreen","color: white; background: #0080fe;")};const Re=["opacity","zIndex","order","zoom"];function setStyles(e={}){return"string"==typeof e?e:Object.keys(e).map((t=>{const n=dashedName(t);let i=e[t];return Re.includes(n)||isNaN(i)||(i+="px"),`${n}: ${i}`})).join(";")}const Le=["accesskey","autocapitalize","autofocus","contenteditable","dir","draggable","enterkeyhint","hidden","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","spellcheck","style","tabindex","title","translate","writingsuggestions"],Be=["onauxclick","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting","onwheel"];class BaseElement{constructor(e={}){this.options=e,this.tag="div"}selfAttributes(){return[]}get attributes(){return this.getAttributes().join(" ")}getAttributes(){let e=[],t=["hidden","disabled","required","readonly","selected","open","multiply","default"],n=["className","style","data","tag","events"];for(let i in this.options)n.includes(i)||(t.includes(i)&&!0===this.options[i]?e.push(i):(this.selfAttributes().includes(i)&&!e.includes(i)||Le.includes(i))&&e.push(`${i}="${this.options[i]}"`));return this.classes&&e.push(`class="${this.classes}"`),this.styles&&e.push(`style="${this.styles}"`),this.dataSet&&e.push(this.dataSet),this.aria&&e.push(this.aria),e}draw(){return this.template()}get dataSet(){const{data:e={}}=this.options;let t=[];for(let n in e)t.push(`data-${dashedName(n)}="${e[n]}"`);return t.join(" ")}get aria(){const{aria:e={}}=this.options;let t=[];for(let n in e)t.push(`aria-${n.toLowerCase()}="${e[n]}"`);return t.join(" ")}get events(){const{events:e={},control:t=!0}=this.options;let n=[];for(let i in e)t&&!Be.includes(i)&&console.info(`Event ${i} for element ${this.tag} not specified in HTML specification`),n.push(`${i.toLowerCase()}="${e[i]}"`);return n.join(" ")}get classes(){return function setClasses(e=[]){return Array.isArray(e)?e.join(" "):e.toString()}(this.options.class)}get styles(){return setStyles(this.options.style)}template(){return""}toString(){return this.draw()}toElement(){return(e=>{let t,n,i,a,s=[];if("string"==typeof e){if(e=e.trim(),i=document.implementation.createHTMLDocument(""),t=i.createElement("base"),t.href=document.location.href,i.head.appendChild(t),a=i.body,n=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i.exec(e),n)return document.createElement(n[1]);a.innerHTML=e;for(let e=0;e{if(Array.isArray(e))return e.map(parser).join("\n");if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(e.draw)return e.draw();throw new Error("Unknown element! "+e)};class Tag extends BaseElement{constructor(...e){let t={},n=[];for(let i of e)"object"!=typeof i||i instanceof BaseElement?n.push(i):t=i;super(t),this.children=n}template(e){const t=this.options.tag?this.options.tag:this.tag;return`\n <${t} ${this.attributes} ${this.events}>${e}\n `}draw(){return this.template(this.children.map(parser).join(""))}}class SingleTag extends BaseElement{constructor(e={}){super(e),this.options=e}template(){return`\n <${this.options.tag?this.options.tag:this.tag} ${this.attributes} ${this.events}/>\n `}}class Router{version="0.1.0";_routes=[];_route="/";_mode=null;_ignore="[data-route-ignore]";_404=()=>{};constructor(e={}){this.options=Object.assign({},this.options,e),this.options.mode&&(this._mode=this.options.mode),this.options.ignore&&(this._ignore=this.options.ignore),this.options.routes&&this.addRoutes(this.options.routes),this.options[404]&&"function"==typeof this.options[404]&&(this._404=this.options[404])}clearSlashes(e){return e.replace(/\/$/,"").replace(/^\//,"")}index(e){let t=-1;for(let n=0;n{e.path&&this[t](e.path,e.callback)}));else if("object"==typeof e)for(let n in e)e.hasOwnProperty(n)&&this[t](n,e[n])}addRoute(e,t){return e&&!this.routeExists(e)&&this._routes.push({path:e,callback:t,pattern:new RegExp("^"+e.replace(/:\w+/g,"(\\w+)")+"$")}),this}addRoutes(e){return this._routesFn(e,"addRoute"),this}updRoute(e,t){const n=this.index(e);if(-1!==n)return t&&t.path&&(this._routes[n].path=t.path),t&&t.callback&&(this._routes[n].callback=t.callback),this}updRoutes(e){return this._routesFn(e,"updRoute"),this}delRoute(e){return this.routeExists(e)&&delete this._routes[e],this}findRoute(e){let t;for(let n=0;n{const n=t.target;let i;"a"!==n.tagName.toLowerCase()||n.matches(e)||(t.preventDefault(),i=n.href,i&&this.exec(i,!0))}),!1),window.addEventListener("popstate",(e=>{this.exec(document.location)}),!1),this}}const createStyleElement=(e="",t)=>{let n=document.createElement("style");return void 0!==t&&n.setAttribute("media",t),n.appendChild(document.createTextNode(e)),document.head.appendChild(n),n},createStyleSheet=e=>createStyleElement(e).sheet,addCssRule=(e,t,n)=>{e.insertRule(t+"{"+n+"}")};class Html extends Tag{tag="html";selfAttributes(){return["lang"]}}class Head extends Tag{tag="head"}class Base extends SingleTag{tag="base";selfAttributes(){return["href","target"]}}class Link extends SingleTag{tag="link";selfAttributes(){return["href","crossorigin","rel","media","integrity","hreflang","type","referrerpolicy","sizes","imagesrcset","imagesizes","as","blocking","color","disabled","fetchpriority"]}}class Body extends Tag{tag="body"}class Span extends Tag{tag="span"}class Img extends SingleTag{tag="img";selfAttributes(){return["align","alt","border","height","hspace","ismap","longdesc","lowsrc","src","vspace","width","usemap"]}}class Input extends SingleTag{tag="input";selfAttributes(){return["accept","align","alt","autocomplete","autofocus","border","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","list","max","maxlength","min","multiple","name","pattern","placeholder","size","src","step","type","value"]}}class Br extends SingleTag{tag="br";selfAttributes(){return["clear"]}}class Hr extends SingleTag{tag="hr"}class Heading extends Tag{constructor(e="h1",...t){super(...t),this.tag=e}}const heading=(e="h1",...t)=>new Heading(e,...t);class Section extends Tag{tag="section"}class Anchor extends Tag{tag="a";selfAttributes(){return["coords","download","hreflang","name","rel","rev","shape","target","type","href"]}}class Abbr extends Tag{tag="abbr"}class Article extends Tag{tag="article"}class Nav extends Tag{tag="nav"}class Aside extends Tag{tag="aside"}class Header extends Tag{tag="header"}class Footer extends Tag{tag="footer"}class Address extends Tag{tag="address"}let Fe=class Map extends Tag{tag="map";selfAttributes(){return["name"]}};class Area extends SingleTag{tag="area";selfAttributes(){return["alt","coords","hreflang","nohref","shape","target","type","href"]}}class AudioTag extends Tag{tag="audio";selfAttributes(){return["autoplay","controls","loop","preload","src"]}}class Bold extends Tag{tag="b"}class Bdi extends Tag{tag="bdi"}class Bdo extends Tag{tag="bdo"}class Blockquote extends Tag{tag="blockquote";selfAttributes(){return["cite"]}}class Button extends Tag{tag="button";selfAttributes(){return["autofocus","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"]}}class Canvas extends Tag{tag="canvas";selfAttributes(){return["width","height"]}}class Table extends Tag{tag="table";selfAttributes(){return["align","background","bgcolor","border","bordercolor","cellpadding","cellspacing","cols","frame","height","rules","summary","width"]}}class Caption extends Tag{tag="caption";selfAttributes(){return["align","valign"]}}class Col extends SingleTag{tag="col";selfAttributes(){return["align","valign","char","charoff","span","width"]}}class Colgroup extends SingleTag{tag="colgroup";selfAttributes(){return["align","valign","char","charoff","span","width"]}}class TableSection extends Tag{constructor(e="tbody",...t){super(...t),this.tag=e}selfAttributes(){return["align","valign","char","charoff","bgcolor"]}}class TableRow extends Tag{tag="tr";selfAttributes(){return["align","bgcolor","bordercolor","char","charoff","valign"]}}class TableCell extends Tag{constructor(e="td",...t){super(...t),this.tag=e}selfAttributes(){return["abbr","align","axis","background","bgcolor","bordercolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"]}}class Cite extends Tag{tag="cite"}class Code extends Tag{tag="code"}class Dl extends Tag{tag="dl"}class Dt extends Tag{tag="dt"}class Dd extends Tag{tag="dd"}class Details extends Tag{tag="details"}class Summary extends Tag{tag="summary"}class Dfn extends Tag{tag="dfn"}class Div extends Tag{tag="div";selfAttributes(){return["align","title"]}}class Em extends Tag{tag="em"}class Ital extends Tag{tag="i"}class Strong extends Tag{tag="strong"}class Embed extends Tag{tag="embed";selfAttributes(){return["align","height","hspace","pluginspace","src","type","vspace","width"]}}class NoEmbed extends Tag{tag="noembed"}class Fieldset extends Tag{tag="fieldset";selfAttributes(){return["form","title"]}}class Legend extends Tag{tag="legend";selfAttributes(){return["align","title"]}}class Figure extends Tag{tag="figure"}class FigCaption extends Tag{tag="figcaption"}class Form extends Tag{tag="form";selfAttributes(){return["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"]}}class Frameset extends Tag{tag="frameset";selfAttributes(){return["border","bordercolor","cols","frameborder","framespacing","rows"]}}class Frame extends SingleTag{tag="frame";selfAttributes(){return["bordercolor","frameborder","noresize","name","src","scrolling"]}}class NoFrames extends Tag{tag="noframes"}class IFrame extends Tag{tag="iframe";selfAttributes(){return["align","allowtransparency","frameborder","height","hspace","marginheight","marginwidth","name","sandbox","scrolling","seamless","src","srcdoc","vspace","width"]}}class Ins extends Tag{tag="ins";selfAttributes(){return["cite","datetime"]}}class Kbd extends Tag{tag="kbd"}class Label extends Tag{tag="label";selfAttributes(){return["for"]}}class List extends Tag{constructor(e="ul",...t){super(...t),this.tag=e}selfAttributes(){return"ul"===this.tag?["type"]:["type","reserved","start"]}}class ListItem extends Tag{tag="li";selfAttributes(){return["type","value"]}}class Mark extends Tag{tag="mark"}class NoScript extends Tag{tag="noscript"}class Select extends Tag{tag="select";selfAttributes(){return["autofocus","form","name","size"]}}class OptionGroup extends Tag{tag="optgroup";selfAttributes(){return["label"]}}class Option extends Tag{tag="option";selfAttributes(){return["label","value"]}}class Output extends Tag{tag="output";selfAttributes(){return["for","form","name"]}}class Paragraph extends Tag{tag="p";selfAttributes(){return["align"]}}class Pre extends Tag{tag="pre"}class Quoted extends Tag{tag="q";selfAttributes(){return["cite"]}}class Strike extends Tag{tag="strike"}class Script extends Tag{tag="script";selfAttributes(){return["async","defer","language","src","type"]}}class Small extends Tag{tag="small"}class Source extends SingleTag{tag="source";selfAttributes(){return["media","src","type"]}}class Sub extends Tag{tag="sub"}class Sup extends Tag{tag="sup"}class Textarea extends Tag{tag="textarea";selfAttributes(){return["autofocus","cols","form","maxlength","name","placeholder","rows","wrap"]}}class Time extends Tag{tag="time";selfAttributes(){return["datetime","pubdate"]}}class Track extends SingleTag{tag="track";selfAttributes(){return["kind","src","srclang","label"]}}class Var extends Tag{tag="var"}class VideoTag extends Tag{tag="video";selfAttributes(){return["autoplay","controls","height","loop","loop","poster","preload","src","width"]}}class Wbr extends SingleTag{tag="wbr"}class Main extends Tag{tag="main"}class Meta extends SingleTag{tag="meta";selfAttributes(){return["content","name","http-equiv","charset"]}}class Title extends Tag{tag="title"}class Template extends Tag{tag="template";selfAttributes(){return["shadowrootmode","shadowrootdelegatesfocus","shadowrootclonable","shadowrootserializable"]}}class Ruby extends Tag{tag="ruby"}class Rt extends SingleTag{tag="rt"}class Rp extends SingleTag{tag="rp"}class Data extends Tag{tag="data"}class Picture extends Tag{tag="picture"}class Dialog extends Tag{tag="dialog";selfAttributes(){return["open"]}}class Slot extends Tag{tag="slot";selfAttributes(){return["name"]}}var He=Object.freeze({__proto__:null,Abbr:Abbr,Address:Address,Anchor:Anchor,Area:Area,Article:Article,Aside:Aside,AudioTag:AudioTag,Base:Base,Bdi:Bdi,Bdo:Bdo,Blockquote:Blockquote,Body:Body,Bold:Bold,Br:Br,Button:Button,Canvas:Canvas,Caption:Caption,Cite:Cite,Code:Code,Col:Col,Colgroup:Colgroup,Data:Data,Dd:Dd,Details:Details,Dfn:Dfn,Dialog:Dialog,Div:Div,Dl:Dl,Dt:Dt,Em:Em,Embed:Embed,Fieldset:Fieldset,FigCaption:FigCaption,Figure:Figure,Footer:Footer,Form:Form,Frame:Frame,Frameset:Frameset,Head:Head,Header:Header,Heading:Heading,Hr:Hr,Html:Html,IFrame:IFrame,Img:Img,Input:Input,Ins:Ins,Ital:Ital,Kbd:Kbd,Label:Label,Legend:Legend,Link:Link,List:List,ListItem:ListItem,Main:Main,Map:Fe,Mark:Mark,Meta:Meta,Nav:Nav,NoEmbed:NoEmbed,NoFrames:NoFrames,NoScript:NoScript,Option:Option,OptionGroup:OptionGroup,Output:Output,Paragraph:Paragraph,Picture:Picture,Pre:Pre,Quoted:Quoted,Rp:Rp,Rt:Rt,Ruby:Ruby,Script:Script,Section:Section,Select:Select,Slot:Slot,Small:Small,Source:Source,Span:Span,Strike:Strike,Strong:Strong,Sub:Sub,Summary:Summary,Sup:Sup,Table:Table,TableCell:TableCell,TableRow:TableRow,TableSection:TableSection,Template:Template,Textarea:Textarea,Time:Time,Title:Title,Track:Track,Var:Var,VideoTag:VideoTag,Wbr:Wbr,a:(...e)=>new Anchor(...e),abbr:(...e)=>new Abbr(...e),address:(...e)=>new Address(...e),anchor:(...e)=>new Anchor(...e),area:(e={})=>new Area(e),article:(...e)=>new Article(...e),aside:(...e)=>new Aside(...e),audio:(...e)=>new AudioTag(...e),base:e=>new Base(e),bdi:(...e)=>new Bdi(...e),bdo:(...e)=>new Bdo(...e),blockquote:(...e)=>new Blockquote(...e),body:(...e)=>new Body(...e),bold:(...e)=>new Bold(...e),br:e=>new Br(e),button:(...e)=>new Button(...e),canvas:(...e)=>new Canvas(...e),caption:(...e)=>new Caption(...e),cite:(...e)=>new Cite(...e),code:(...e)=>new Code(...e),col:e=>new Col(e),colgroup:e=>new Colgroup(e),data:(...e)=>new Data(...e),dd:(...e)=>new Dd(...e),details:(...e)=>new Details(...e),dfn:(...e)=>new Dfn(...e),dialog:(...e)=>new Dialog(...e),div:(...e)=>new Div(...e),dl:(...e)=>new Dl(...e),dt:(...e)=>new Dt(...e),em:(...e)=>new Em(...e),embed:(...e)=>new Embed(...e),fieldset:(...e)=>new Fieldset(...e),figcaption:(...e)=>new FigCaption(...e),figure:(...e)=>new Figure(...e),footer:(...e)=>new Footer(...e),form:(...e)=>new Form(...e),frame:(e={})=>new Frame(e),frameset:(...e)=>new Frameset(...e),h1:(...e)=>heading("h1",...e),h2:(...e)=>heading("h2",...e),h3:(...e)=>heading("h3",...e),h4:(...e)=>heading("h4",...e),h5:(...e)=>heading("h5",...e),h6:(...e)=>heading("h6",...e),head:(...e)=>new Head(...e),header:(...e)=>new Header(...e),heading:heading,hr:e=>new Hr(e),html:(...e)=>new Html(...e),i:(...e)=>new Ital(...e),iframe:(...e)=>new IFrame(...e),img:(e="",t="",n={})=>new Img({...n,src:e,alt:t}),input:(e={})=>new Input(e),ins:(...e)=>new Ins(...e),ital:(...e)=>new Ital(...e),kbd:(...e)=>new Kbd(...e),label:(...e)=>new Label(...e),legend:(...e)=>new Legend(...e),li:(...e)=>new ListItem(...e),link:e=>new Link(e),main:(...e)=>new Main(...e),map:(...e)=>new Fe(...e),mark:(...e)=>new Mark(...e),meta:e=>new Meta(e),nav:(...e)=>new Nav(...e),noembed:(...e)=>new NoEmbed(...e),noframes:(...e)=>new NoFrames(...e),noscript:(...e)=>new NoScript(...e),ol:(...e)=>new List("ol",...e),optgroup:(...e)=>new OptionGroup(...e),option:(...e)=>new Option(...e),output:(...e)=>new Output(...e),p:(...e)=>new Paragraph(...e),paragraph:(...e)=>new Paragraph(...e),picture:(...e)=>new Picture(...e),pre:(...e)=>new Pre(...e),q:(...e)=>new Quoted(...e),quoted:(...e)=>new Quoted(...e),rp:e=>new Rp(e),rt:e=>new Rt(e),ruby:(...e)=>new Ruby(...e),s:(...e)=>new Strike(...e),script:(...e)=>new Script(...e),section:(...e)=>new Section(...e),select:(...e)=>new Select(...e),slot:(...e)=>new Slot(...e),small:(...e)=>new Small(...e),source:(e={})=>new Source(e),span:(...e)=>new Span(...e),strike:(...e)=>new Strike(...e),strong:(...e)=>new Strong(...e),sub:(...e)=>new Sub(...e),summary:(...e)=>new Summary(...e),sup:(...e)=>new Sup(...e),table:(...e)=>new Table(...e),tbody:(...e)=>new TableSection("tbody",...e),td:(...e)=>new TableCell("td",...e),template:(...e)=>new Template(...e),textarea:(...e)=>new Textarea(...e),tfoot:(...e)=>new TableSection("tfoot",...e),th:(...e)=>new TableCell("th",...e),thead:(...e)=>new TableSection("thead",...e),time:(...e)=>new Time(...e),title:e=>new Title(e),tr:(...e)=>new TableRow(...e),track:(e={})=>new Track(e),ul:(...e)=>new List("ul",...e),variable:(...e)=>new Var(...e),video:(...e)=>new VideoTag(...e),wbr:e=>new Wbr(e)});const Ve={},ze={...He,extract:(e=globalThis)=>{for(let t in He)globalThis[t]&&(Ve[t]=globalThis[t]),e[t]=He[t]},restore:(e=globalThis)=>{for(let t in Ve)e[t]=Ve[t]},info:()=>{console.info("%c HtmlJS %c v0.11.0 %c 24.06.2024, 17:03:41 ","color: #ffffff; font-weight: bold; background: #708238","color: white; background: darkgreen","color: white; background: #0080fe;")}};globalThis.htmljs={addStyle:(e,t)=>{if("string"==typeof e)return void createStyleElement(e,t);const n=createStyleSheet(t);for(let t in e)addCssRule(n,t,setStyles(e[t]))},addCssRule:addCssRule,cssLoader:async(e,t)=>{let n,i,a=await fetch(e,t);if(!a.ok)throw new Error("HTTP error: "+a.status);n=await a.text(),i=document.createElement("style"),i.appendChild(document.createTextNode(n)),document.body.appendChild(i)},jsLoader:async(e,t)=>{let n,i,a=await fetch(e,t);if(!a.ok)throw new Error("HTTP error: "+a.status);n=await a.text(),i=document.createElement("script"),i.appendChild(document.createTextNode(n)),document.body.appendChild(i)},viewLoader:async(e,t={},n=!1)=>{let i,a,s;if(!1!==n&&(s=`html::key::${e}`,a=localStorage.getItem(s)),!a){if(i=await fetch(e,t),!i.ok)throw new Error("HTTP error: "+i.status);a=await i.text(),!1!==n&&localStorage.setItem(s,a)}(0,eval)(`result = ${a}`)},clearViewStorageHolder:e=>localStorage.removeItem(`html::key::${e}`),createStyleElement:createStyleElement,createStyleSheet:createStyleSheet,render:(e=[],t=document.body,n={})=>{let i,a;const{clear:s=!0,where:o="beforeend"}=n;a="string"==typeof t?document.querySelector(t):t,a instanceof HTMLElement||(a=document.body),s&&(a.innerHTML=""),Array.isArray(e)||(e=[e]),i=e.map(parser).join(""),a.insertAdjacentHTML(o,i)},...ze},globalThis.Router=Router,globalThis.Router.create=e=>new Router(e); +function dashedName(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}globalThis.Farbe=Pe,globalThis.farbe=e=>new Pe(e),globalThis.Farbe.Routines=Oe,globalThis.Farbe.Palette=ke,globalThis.Farbe.StandardColors=_e,globalThis.Farbe.MetroColors=Se,globalThis.Farbe.Primitives=Ne,globalThis.Farbe.info=()=>{console.info("%c Farbe %c v1.0.3 %c 14.07.2024, 17:25:33 ","color: #ffffff; font-weight: bold; background: #ff00ff","color: white; background: darkgreen","color: white; background: #0080fe;")};const Re=["opacity","zIndex","order","zoom"];function setStyles(e={}){return"string"==typeof e?e:Object.keys(e).map((t=>{const n=dashedName(t);let i=e[t];return Re.includes(n)||isNaN(i)||(i+="px"),`${n}: ${i}`})).join(";")}const Le=["accesskey","autocapitalize","autofocus","contenteditable","dir","draggable","enterkeyhint","hidden","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","spellcheck","style","tabindex","title","translate","writingsuggestions"],Be=["onauxclick","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting","onwheel"];class BaseElement{constructor(e={}){this.options=e,this.tag="div"}selfAttributes(){return[]}get attributes(){return this.getAttributes().join(" ")}getAttributes(){let e=[],t=["hidden","disabled","required","readonly","selected","open","multiply","default"],n=["className","style","data","tag","events"];for(let i in this.options)n.includes(i)||(t.includes(i)&&!0===this.options[i]?e.push(i):(this.selfAttributes().includes(i)&&!e.includes(i)||Le.includes(i))&&e.push(`${i}="${this.options[i]}"`));return this.classes&&e.push(`class="${this.classes}"`),this.styles&&e.push(`style="${this.styles}"`),this.dataSet&&e.push(this.dataSet),this.aria&&e.push(this.aria),e}draw(){return this.template()}get dataSet(){const{data:e={}}=this.options;let t=[];for(let n in e)t.push(`data-${dashedName(n)}="${e[n]}"`);return t.join(" ")}get aria(){const{aria:e={}}=this.options;let t=[];for(let n in e)t.push(`aria-${n.toLowerCase()}="${e[n]}"`);return t.join(" ")}get events(){const{events:e={},control:t=!0}=this.options;let n=[];for(let i in e)t&&!Be.includes(i)&&console.info(`Event ${i} for element ${this.tag} not specified in HTML specification`),n.push(`${i.toLowerCase()}="${e[i]}"`);return n.join(" ")}get classes(){return function setClasses(e=[]){return Array.isArray(e)?e.join(" "):e.toString()}(this.options.class)}get styles(){return setStyles(this.options.style)}template(){return""}toString(){return this.draw()}toElement(){return(e=>{let t,n,i,a,s=[];if("string"==typeof e){if(e=e.trim(),i=document.implementation.createHTMLDocument(""),t=i.createElement("base"),t.href=document.location.href,i.head.appendChild(t),a=i.body,n=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i.exec(e),n)return document.createElement(n[1]);a.innerHTML=e;for(let e=0;e{if(Array.isArray(e))return e.map(parser).join("\n");if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(e.draw)return e.draw();throw new Error("Unknown element! "+e)};class Tag extends BaseElement{constructor(...e){let t={},n=[];for(let i of e)"object"!=typeof i||i instanceof BaseElement?n.push(i):t=i;super(t),this.children=n}template(e){const t=this.options.tag?this.options.tag:this.tag;return`\n <${t} ${this.attributes} ${this.events}>${e}\n `}draw(){return this.template(this.children.map(parser).join(""))}}class SingleTag extends BaseElement{constructor(e={}){super(e),this.options=e}template(){return`\n <${this.options.tag?this.options.tag:this.tag} ${this.attributes} ${this.events}/>\n `}}class Router{version="0.1.0";_routes=[];_route="/";_mode=null;_ignore="[data-route-ignore]";_404=()=>{};constructor(e={}){this.options=Object.assign({},this.options,e),this.options.mode&&(this._mode=this.options.mode),this.options.ignore&&(this._ignore=this.options.ignore),this.options.routes&&this.addRoutes(this.options.routes),this.options[404]&&"function"==typeof this.options[404]&&(this._404=this.options[404])}clearSlashes(e){return e.replace(/\/$/,"").replace(/^\//,"")}index(e){let t=-1;for(let n=0;n{e.path&&this[t](e.path,e.callback)}));else if("object"==typeof e)for(let n in e)e.hasOwnProperty(n)&&this[t](n,e[n])}addRoute(e,t){return e&&!this.routeExists(e)&&this._routes.push({path:e,callback:t,pattern:new RegExp("^"+e.replace(/:\w+/g,"(\\w+)")+"$")}),this}addRoutes(e){return this._routesFn(e,"addRoute"),this}updRoute(e,t){const n=this.index(e);if(-1!==n)return t&&t.path&&(this._routes[n].path=t.path),t&&t.callback&&(this._routes[n].callback=t.callback),this}updRoutes(e){return this._routesFn(e,"updRoute"),this}delRoute(e){return this.routeExists(e)&&delete this._routes[e],this}findRoute(e){let t;for(let n=0;n{const n=t.target;let i;"a"!==n.tagName.toLowerCase()||n.matches(e)||(t.preventDefault(),i=n.href,i&&this.exec(i,!0))}),!1),window.addEventListener("popstate",(e=>{this.exec(document.location)}),!1),this}}const createStyleElement=(e="",t)=>{let n=document.createElement("style");return void 0!==t&&n.setAttribute("media",t),n.appendChild(document.createTextNode(e)),document.head.appendChild(n),n},createStyleSheet=e=>createStyleElement(e).sheet,addCssRule=(e,t,n)=>{e.insertRule(t+"{"+n+"}")};class Html extends Tag{tag="html";selfAttributes(){return["lang"]}}class Head extends Tag{tag="head"}class Base extends SingleTag{tag="base";selfAttributes(){return["href","target"]}}class Link extends SingleTag{tag="link";selfAttributes(){return["href","crossorigin","rel","media","integrity","hreflang","type","referrerpolicy","sizes","imagesrcset","imagesizes","as","blocking","color","disabled","fetchpriority"]}}class Body extends Tag{tag="body"}class Span extends Tag{tag="span"}class Img extends SingleTag{tag="img";selfAttributes(){return["align","alt","border","height","hspace","ismap","longdesc","lowsrc","src","vspace","width","usemap"]}}class Input extends SingleTag{tag="input";selfAttributes(){return["accept","align","alt","autocomplete","autofocus","border","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","list","max","maxlength","min","multiple","name","pattern","placeholder","size","src","step","type","value"]}}class Br extends SingleTag{tag="br";selfAttributes(){return["clear"]}}class Hr extends SingleTag{tag="hr"}class Heading extends Tag{constructor(e="h1",...t){super(...t),this.tag=e}}const heading=(e="h1",...t)=>new Heading(e,...t);class Section extends Tag{tag="section"}class Anchor extends Tag{tag="a";selfAttributes(){return["coords","download","hreflang","name","rel","rev","shape","target","type","href"]}}class Abbr extends Tag{tag="abbr"}class Article extends Tag{tag="article"}class Nav extends Tag{tag="nav"}class Aside extends Tag{tag="aside"}class Header extends Tag{tag="header"}class Footer extends Tag{tag="footer"}class Address extends Tag{tag="address"}let Fe=class Map extends Tag{tag="map";selfAttributes(){return["name"]}};class Area extends SingleTag{tag="area";selfAttributes(){return["alt","coords","hreflang","nohref","shape","target","type","href"]}}class AudioTag extends Tag{tag="audio";selfAttributes(){return["autoplay","controls","loop","preload","src"]}}class Bold extends Tag{tag="b"}class Bdi extends Tag{tag="bdi"}class Bdo extends Tag{tag="bdo"}class Blockquote extends Tag{tag="blockquote";selfAttributes(){return["cite"]}}class Button extends Tag{tag="button";selfAttributes(){return["autofocus","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"]}}class Canvas extends Tag{tag="canvas";selfAttributes(){return["width","height"]}}class Table extends Tag{tag="table";selfAttributes(){return["align","background","bgcolor","border","bordercolor","cellpadding","cellspacing","cols","frame","height","rules","summary","width"]}}class Caption extends Tag{tag="caption";selfAttributes(){return["align","valign"]}}class Col extends SingleTag{tag="col";selfAttributes(){return["align","valign","char","charoff","span","width"]}}class Colgroup extends SingleTag{tag="colgroup";selfAttributes(){return["align","valign","char","charoff","span","width"]}}class TableSection extends Tag{constructor(e="tbody",...t){super(...t),this.tag=e}selfAttributes(){return["align","valign","char","charoff","bgcolor"]}}class TableRow extends Tag{tag="tr";selfAttributes(){return["align","bgcolor","bordercolor","char","charoff","valign"]}}class TableCell extends Tag{constructor(e="td",...t){super(...t),this.tag=e}selfAttributes(){return["abbr","align","axis","background","bgcolor","bordercolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"]}}class Cite extends Tag{tag="cite"}class Code extends Tag{tag="code"}class Dl extends Tag{tag="dl"}class Dt extends Tag{tag="dt"}class Dd extends Tag{tag="dd"}class Details extends Tag{tag="details"}class Summary extends Tag{tag="summary"}class Dfn extends Tag{tag="dfn"}class Div extends Tag{tag="div";selfAttributes(){return["align","title"]}}class Em extends Tag{tag="em"}class Ital extends Tag{tag="i"}class Strong extends Tag{tag="strong"}class Embed extends Tag{tag="embed";selfAttributes(){return["align","height","hspace","pluginspace","src","type","vspace","width"]}}class NoEmbed extends Tag{tag="noembed"}class Fieldset extends Tag{tag="fieldset";selfAttributes(){return["form","title"]}}class Legend extends Tag{tag="legend";selfAttributes(){return["align","title"]}}class Figure extends Tag{tag="figure"}class FigCaption extends Tag{tag="figcaption"}class Form extends Tag{tag="form";selfAttributes(){return["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"]}}class Frameset extends Tag{tag="frameset";selfAttributes(){return["border","bordercolor","cols","frameborder","framespacing","rows"]}}class Frame extends SingleTag{tag="frame";selfAttributes(){return["bordercolor","frameborder","noresize","name","src","scrolling"]}}class NoFrames extends Tag{tag="noframes"}class IFrame extends Tag{tag="iframe";selfAttributes(){return["align","allowtransparency","frameborder","height","hspace","marginheight","marginwidth","name","sandbox","scrolling","seamless","src","srcdoc","vspace","width"]}}class Ins extends Tag{tag="ins";selfAttributes(){return["cite","datetime"]}}class Kbd extends Tag{tag="kbd"}class Label extends Tag{tag="label";selfAttributes(){return["for"]}}class List extends Tag{constructor(e="ul",...t){super(...t),this.tag=e}selfAttributes(){return"ul"===this.tag?["type"]:["type","reserved","start"]}}class ListItem extends Tag{tag="li";selfAttributes(){return["type","value"]}}class Mark extends Tag{tag="mark"}class NoScript extends Tag{tag="noscript"}class Select extends Tag{tag="select";selfAttributes(){return["autofocus","form","name","size"]}}class OptionGroup extends Tag{tag="optgroup";selfAttributes(){return["label"]}}class Option extends Tag{tag="option";selfAttributes(){return["label","value"]}}class Output extends Tag{tag="output";selfAttributes(){return["for","form","name"]}}class Paragraph extends Tag{tag="p";selfAttributes(){return["align"]}}class Pre extends Tag{tag="pre"}class Quoted extends Tag{tag="q";selfAttributes(){return["cite"]}}class Strike extends Tag{tag="strike"}class Script extends Tag{tag="script";selfAttributes(){return["async","defer","language","src","type"]}}class Small extends Tag{tag="small"}class Source extends SingleTag{tag="source";selfAttributes(){return["media","src","type"]}}class Sub extends Tag{tag="sub"}class Sup extends Tag{tag="sup"}class Textarea extends Tag{tag="textarea";selfAttributes(){return["autofocus","cols","form","maxlength","name","placeholder","rows","wrap"]}}class Time extends Tag{tag="time";selfAttributes(){return["datetime","pubdate"]}}class Track extends SingleTag{tag="track";selfAttributes(){return["kind","src","srclang","label"]}}class Var extends Tag{tag="var"}class VideoTag extends Tag{tag="video";selfAttributes(){return["autoplay","controls","height","loop","loop","poster","preload","src","width"]}}class Wbr extends SingleTag{tag="wbr"}class Main extends Tag{tag="main"}class Meta extends SingleTag{tag="meta";selfAttributes(){return["content","name","http-equiv","charset"]}}class Title extends Tag{tag="title"}class Template extends Tag{tag="template";selfAttributes(){return["shadowrootmode","shadowrootdelegatesfocus","shadowrootclonable","shadowrootserializable"]}}class Ruby extends Tag{tag="ruby"}class Rt extends SingleTag{tag="rt"}class Rp extends SingleTag{tag="rp"}class Data extends Tag{tag="data"}class Picture extends Tag{tag="picture"}class Dialog extends Tag{tag="dialog";selfAttributes(){return["open"]}}class Slot extends Tag{tag="slot";selfAttributes(){return["name"]}}var He=Object.freeze({__proto__:null,Abbr:Abbr,Address:Address,Anchor:Anchor,Area:Area,Article:Article,Aside:Aside,AudioTag:AudioTag,Base:Base,Bdi:Bdi,Bdo:Bdo,Blockquote:Blockquote,Body:Body,Bold:Bold,Br:Br,Button:Button,Canvas:Canvas,Caption:Caption,Cite:Cite,Code:Code,Col:Col,Colgroup:Colgroup,Data:Data,Dd:Dd,Details:Details,Dfn:Dfn,Dialog:Dialog,Div:Div,Dl:Dl,Dt:Dt,Em:Em,Embed:Embed,Fieldset:Fieldset,FigCaption:FigCaption,Figure:Figure,Footer:Footer,Form:Form,Frame:Frame,Frameset:Frameset,Head:Head,Header:Header,Heading:Heading,Hr:Hr,Html:Html,IFrame:IFrame,Img:Img,Input:Input,Ins:Ins,Ital:Ital,Kbd:Kbd,Label:Label,Legend:Legend,Link:Link,List:List,ListItem:ListItem,Main:Main,Map:Fe,Mark:Mark,Meta:Meta,Nav:Nav,NoEmbed:NoEmbed,NoFrames:NoFrames,NoScript:NoScript,Option:Option,OptionGroup:OptionGroup,Output:Output,Paragraph:Paragraph,Picture:Picture,Pre:Pre,Quoted:Quoted,Rp:Rp,Rt:Rt,Ruby:Ruby,Script:Script,Section:Section,Select:Select,Slot:Slot,Small:Small,Source:Source,Span:Span,Strike:Strike,Strong:Strong,Sub:Sub,Summary:Summary,Sup:Sup,Table:Table,TableCell:TableCell,TableRow:TableRow,TableSection:TableSection,Template:Template,Textarea:Textarea,Time:Time,Title:Title,Track:Track,Var:Var,VideoTag:VideoTag,Wbr:Wbr,a:(...e)=>new Anchor(...e),abbr:(...e)=>new Abbr(...e),address:(...e)=>new Address(...e),anchor:(...e)=>new Anchor(...e),area:(e={})=>new Area(e),article:(...e)=>new Article(...e),aside:(...e)=>new Aside(...e),audio:(...e)=>new AudioTag(...e),base:e=>new Base(e),bdi:(...e)=>new Bdi(...e),bdo:(...e)=>new Bdo(...e),blockquote:(...e)=>new Blockquote(...e),body:(...e)=>new Body(...e),bold:(...e)=>new Bold(...e),br:e=>new Br(e),button:(...e)=>new Button(...e),canvas:(...e)=>new Canvas(...e),caption:(...e)=>new Caption(...e),cite:(...e)=>new Cite(...e),code:(...e)=>new Code(...e),col:e=>new Col(e),colgroup:e=>new Colgroup(e),data:(...e)=>new Data(...e),dd:(...e)=>new Dd(...e),details:(...e)=>new Details(...e),dfn:(...e)=>new Dfn(...e),dialog:(...e)=>new Dialog(...e),div:(...e)=>new Div(...e),dl:(...e)=>new Dl(...e),dt:(...e)=>new Dt(...e),em:(...e)=>new Em(...e),embed:(...e)=>new Embed(...e),fieldset:(...e)=>new Fieldset(...e),figcaption:(...e)=>new FigCaption(...e),figure:(...e)=>new Figure(...e),footer:(...e)=>new Footer(...e),form:(...e)=>new Form(...e),frame:(e={})=>new Frame(e),frameset:(...e)=>new Frameset(...e),h1:(...e)=>heading("h1",...e),h2:(...e)=>heading("h2",...e),h3:(...e)=>heading("h3",...e),h4:(...e)=>heading("h4",...e),h5:(...e)=>heading("h5",...e),h6:(...e)=>heading("h6",...e),head:(...e)=>new Head(...e),header:(...e)=>new Header(...e),heading:heading,hr:e=>new Hr(e),html:(...e)=>new Html(...e),i:(...e)=>new Ital(...e),iframe:(...e)=>new IFrame(...e),img:(e="",t="",n={})=>new Img({...n,src:e,alt:t}),input:(e={})=>new Input(e),ins:(...e)=>new Ins(...e),ital:(...e)=>new Ital(...e),kbd:(...e)=>new Kbd(...e),label:(...e)=>new Label(...e),legend:(...e)=>new Legend(...e),li:(...e)=>new ListItem(...e),link:e=>new Link(e),main:(...e)=>new Main(...e),map:(...e)=>new Fe(...e),mark:(...e)=>new Mark(...e),meta:e=>new Meta(e),nav:(...e)=>new Nav(...e),noembed:(...e)=>new NoEmbed(...e),noframes:(...e)=>new NoFrames(...e),noscript:(...e)=>new NoScript(...e),ol:(...e)=>new List("ol",...e),optgroup:(...e)=>new OptionGroup(...e),option:(...e)=>new Option(...e),output:(...e)=>new Output(...e),p:(...e)=>new Paragraph(...e),paragraph:(...e)=>new Paragraph(...e),picture:(...e)=>new Picture(...e),pre:(...e)=>new Pre(...e),q:(...e)=>new Quoted(...e),quoted:(...e)=>new Quoted(...e),rp:e=>new Rp(e),rt:e=>new Rt(e),ruby:(...e)=>new Ruby(...e),s:(...e)=>new Strike(...e),script:(...e)=>new Script(...e),section:(...e)=>new Section(...e),select:(...e)=>new Select(...e),slot:(...e)=>new Slot(...e),small:(...e)=>new Small(...e),source:(e={})=>new Source(e),span:(...e)=>new Span(...e),strike:(...e)=>new Strike(...e),strong:(...e)=>new Strong(...e),sub:(...e)=>new Sub(...e),summary:(...e)=>new Summary(...e),sup:(...e)=>new Sup(...e),table:(...e)=>new Table(...e),tbody:(...e)=>new TableSection("tbody",...e),td:(...e)=>new TableCell("td",...e),template:(...e)=>new Template(...e),textarea:(...e)=>new Textarea(...e),tfoot:(...e)=>new TableSection("tfoot",...e),th:(...e)=>new TableCell("th",...e),thead:(...e)=>new TableSection("thead",...e),time:(...e)=>new Time(...e),title:e=>new Title(e),tr:(...e)=>new TableRow(...e),track:(e={})=>new Track(e),ul:(...e)=>new List("ul",...e),variable:(...e)=>new Var(...e),video:(...e)=>new VideoTag(...e),wbr:e=>new Wbr(e)});const Ve={},ze={...He,extract:(e=globalThis)=>{for(let t in He)globalThis[t]&&(Ve[t]=globalThis[t]),e[t]=He[t]},restore:(e=globalThis)=>{for(let t in Ve)e[t]=Ve[t]},info:()=>{console.info("%c HtmlJS %c v0.11.0 %c 24.06.2024, 17:03:41 ","color: #ffffff; font-weight: bold; background: #708238","color: white; background: darkgreen","color: white; background: #0080fe;")}};globalThis.htmljs={addStyle:(e,t)=>{if("string"==typeof e)return void createStyleElement(e,t);const n=createStyleSheet(t);for(let t in e)addCssRule(n,t,setStyles(e[t]))},addCssRule:addCssRule,cssLoader:async(e,t)=>{let n,i,a=await fetch(e,t);if(!a.ok)throw new Error("HTTP error: "+a.status);n=await a.text(),i=document.createElement("style"),i.appendChild(document.createTextNode(n)),document.body.appendChild(i)},jsLoader:async(e,t)=>{let n,i,a=await fetch(e,t);if(!a.ok)throw new Error("HTTP error: "+a.status);n=await a.text(),i=document.createElement("script"),i.appendChild(document.createTextNode(n)),document.body.appendChild(i)},viewLoader:async(e,t={},n=!1)=>{let i,a,s;if(!1!==n&&(s=`html::key::${e}`,a=localStorage.getItem(s)),!a){if(i=await fetch(e,t),!i.ok)throw new Error("HTTP error: "+i.status);a=await i.text(),!1!==n&&localStorage.setItem(s,a)}(0,eval)(`result = ${a}`)},clearViewStorageHolder:e=>localStorage.removeItem(`html::key::${e}`),createStyleElement:createStyleElement,createStyleSheet:createStyleSheet,render:(e=[],t=document.body,n={})=>{let i,a;const{clear:s=!0,where:o="beforeend"}=n;a="string"==typeof t?document.querySelector(t):t,a instanceof HTMLElement||(a=document.body),s&&(a.innerHTML=""),Array.isArray(e)||(e=[e]),i=e.map(parser).join(""),a.insertAdjacentHTML(o,i)},...ze},globalThis.Router=Router,globalThis.Router.create=e=>new Router(e); /*! * Animation - Library for animating HTML elements. * Copyright 2024 by Serhii Pimenov * Licensed under MIT !*/ -const je=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],Ue=["opacity","zIndex"],qe=["opacity","volume"],We=["scrollLeft","scrollTop"],$e=["backgroundColor","color"],Ge=["opacity"],_setStyle=(e,t,n,i,a=!1)=>{t=camelCase(t),a&&(n=parseInt(n)),e instanceof HTMLElement?void 0!==e[t]?e[t]=n:e.style[t]="transform"===t||t.toLowerCase().includes("color")?n:n+i:e[t]=n},_getElementTransforms=e=>{if(!e instanceof HTMLElement)return;const t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,i=new Map;let a;for(;a=n.exec(t);)i.set(a[1],a[2]);return i},_getColorArrayFromHex=e=>Array.from(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e||"#000000")).slice(1).map((e=>parseInt(e,16))),_expandColorValue=e=>{const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;return"#"===e[0]&&4===e.length?"#"+e.replace(t,((e,t,n,i)=>t+t+n+n+i+i)):"#"===e[0]?e:"#"+e},applyProps=function(e,t,n){((e,t,n)=>{each(t,((t,i)=>{_setStyle(e,t,i[0]+i[2]*n,i[3],i[4])}))})(e,t.props,n),((e,t,n)=>{let i=[],a=_getElementTransforms(e);each(t,((e,t)=>{let a=t[0];t[1];let s=t[2],o=t[3];e.includes("rotate")||e.includes("skew")?""===o&&(o="deg"):o=e.includes("scale")?"":"px","turn"===o?i.push(`${e}(${t[1]*n+o})`):i.push(`${e}(${a+s*n+o})`)})),a.forEach(((e,n)=>{void 0===t[n]&&i.push(`${n}(${e})`)})),_setStyle(e,"transform",i.join(" "))})(e,t.transform,n),function(e,t,n){each(t,(function(t,i){let a=[0,0,0];for(let e=0;e<3;e++)a[e]=Math.floor(i[0][e]+i[2][e]*n);_setStyle(e,t,`rgb(${a.join(",")})`)}))}(e,t.color,n)},createAnimationMap=(e,t,n="normal")=>{const i={props:{},transform:{},color:{}};let a,s,o,r,l=_getElementTransforms(e);return each(t,((t,c)=>{const d=je.includes(t),u=Ue.includes(t),h=$e.includes(t);if(Array.isArray(c)&&1===c.length&&(c=c[0]),Array.isArray(c)?(a=h?_getColorArrayFromHex(_expandColorValue(c[0])):parseUnit(c[0]),s=h?_getColorArrayFromHex(_expandColorValue(c[1])):parseUnit(c[1])):(a=d?l.get(t)||0:h?((e,t)=>getComputedStyle(e)[t].replace(/[^\d.,]/g,"").split(",").map((e=>parseInt(e))))(e,t):((e,t,n)=>void 0!==e[t]?We.includes(t)?"scrollLeft"===t?e===window?pageXOffset:e.scrollLeft:e===window?pageYOffset:e.scrollTop:e[t]||0:e.style[t]||getComputedStyle(e,n)[t])(e,t),a=h?a:parseUnit(a),s=h?_getColorArrayFromHex(c):parseUnit(((e,t)=>{const n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;const i=getUnit(e)||0,a=parseFloat(t),s=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return a+s+i;case"-":return a-s+i;case"*":return a*s+i}})(c,Array.isArray(a)?a[0]:a))),Ge.includes(t)&&a[0]===s[0]&&(a[0]=s[0]>0?0:1),"reverse"===n&&([s,a]=[a,s]),r=e instanceof HTMLElement&&""===s[1]&&!u&&!d?"px":s[1],h){o=[0,0,0];for(let e=0;e<3;e++)o[e]=s[e]-a[e]}else o=s[0]-a[0];d?i.transform[t]=[a[0],s[0],o,r]:h?i.color[t]=[a,s,o,r]:i.props[t]=[a[0],s[0],o,r,!qe.includes(t)]})),i},exec=(e,t,n)=>{let i;if("function"==typeof e)i=e;else if(/^[a-z]+[\w.]*[\w]$/i.test(e)){const t=e.split(".");i=global;for(let e=0;ee.replace(/-([a-z])/g,(e=>e[1].toUpperCase())),each=(e,t)=>{let n=0;if(isArrayLike(e))[].forEach.call(e,(function(e,n){t.apply(e,[n,e])}));else for(let i in e)e.hasOwnProperty(i)&&t.apply(e[i],[i,e[i],n++]);return e},isArrayLike=e=>Array.isArray(e)||"object"==typeof e&&"length"in e&&"number"==typeof e.length,getUnit=(e,t)=>{const n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);return void 0!==n[1]?n[1]:t},parseUnit=e=>{const t=[0,""];return e=""+e,t[0]=parseFloat(e),t[1]=e.match(/[\d.\-+]*\s*(.*)/)[1]||"",t};function minMax(e,t,n){return Math.min(Math.max(e,t),n)}const Ye={linear:()=>e=>e};Ye.default=Ye.linear;const Ke={Sine:()=>e=>1-Math.cos(e*Math.PI/2),Circ:()=>e=>1-Math.sqrt(1-e*e),Back:()=>e=>e*e*(3*e-2),Bounce:()=>e=>{let t,n=4;for(;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)},Elastic:(e=1,t=.5)=>{const n=minMax(e,1,10),i=minMax(t,.1,2);return e=>0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-i/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/i)}};["Quad","Cubic","Quart","Quint","Expo"].forEach(((e,t)=>{Ke[e]=()=>e=>Math.pow(e,t+2)})),Object.keys(Ke).forEach((e=>{const t=Ke[e];Ye["easeIn"+e]=t,Ye["easeOut"+e]=(e,n)=>i=>1-t(e,n)(1-i),Ye["easeInOut"+e]=(e,n)=>i=>i<.5?t(e,n)(2*i)/2:1-t(e,n)(-2*i+2)/2}));const Xe={fx:!0,elements:{}},Je={id:null,el:null,draw:{},dur:1e3,ease:"linear",loop:0,pause:0,dir:"normal",defer:0,onFrame:()=>{},onDone:()=>{}},animate=function(e){return new Promise((function(t){let n,i,{id:a,el:s,draw:o,dur:r,ease:l,loop:c,onFrame:d,onDone:u,pause:h,dir:p,defer:f}=Object.assign({},Je,e),m={},v="linear",g=[],b=Ye.linear,C="alternate"===p?"normal":p,w=!1,y=a||+performance.now()*Math.pow(10,14);if(void 0===(_=s)||null==_)throw new Error("Unknown element!");var _;if("string"==typeof s&&(s=document.querySelector(s)),"function"!=typeof o&&"object"!=typeof o)throw new Error("Unknown draw object. Must be a function or object!");0!==r&&Xe.fx||(r=1),"alternate"===p&&"number"==typeof c&&(c*=2),"string"==typeof l?(i=/\(([^)]+)\)/.exec(l),v=l.split("(")[0],g=i?i[1].split(",").map((e=>parseFloat(e))):[],b=Ye[v]):b="function"==typeof l?l:Ye.linear,Xe.elements[y]={element:s,id:null,stop:0,pause:0,loop:0};const play=()=>{"object"==typeof o&&(m=createAnimationMap(s,o,C)),n=performance.now(),Xe.elements[y].loop+=1,Xe.elements[y].id=requestAnimationFrame(animate)},done=()=>{cancelAnimationFrame(Xe.elements[y].id),delete Xe.elements[a],exec(u,null,s),exec(t,[this],s)},animate=e=>{let t,i;const a=Xe.elements[y].stop;if(a>0)return 2===a&&("function"==typeof o?o.bind(s)(1,1):applyProps(s,m,1)),void done();i=(e-n)/r,i>1&&(i=1),i<0&&(i=0),t=b.apply(null,g)(i),"function"==typeof o?o.bind(s)(i,t):applyProps(s,m,t),exec(d,[i,t],s),i<1&&(Xe.elements[y].id=requestAnimationFrame(animate)),1===parseInt(i)&&(c?("alternate"===p&&(C="normal"===C?"reverse":"normal"),"boolean"==typeof c||c>Xe.elements[y].loop?setTimeout((function(){play()}),h):done()):"alternate"!==p||w?done():(C="normal"===C?"reverse":"normal",w=!0,play()))};f>0?setTimeout((()=>{play()}),f):play()}))};Xe.animate=animate,Xe.stop=function(e,t=!0){Xe.elements[e].stop=!0===t?2:1},Xe.chain=async function chain(e,t){for(let t=0;t0)&&await chain(e,t)},Xe.easing=Ye,Xe.info=()=>{console.info("%c Animation %c v0.3.0 %c 08.05.2024, 13:35:42 ","color: #ffffff; font-weight: bold; background: #468284","color: white; background: darkgreen","color: white; background: #0080fe;")},globalThis.Animation=Xe,function(e){var t=e.meta("metro4:init").attr("content"),n=e.meta("metro4:locale").attr("content"),i=e.meta("metro4:week_start").attr("content"),a=e.meta("metro4:date_format").attr("content"),s=e.meta("metro4:date_format_input").attr("content"),o=e.meta("metro4:animation_duration").attr("content"),r=e.meta("metro4:callback_timeout").attr("content"),l=e.meta("metro4:timeout").attr("content"),c=e.meta("metro4:scroll_multiple").attr("content"),d=e.meta("metro4:cloak").attr("content"),u=e.meta("metro4:cloak_duration").attr("content"),h=e.meta("metro4:global_common").attr("content"),p=e.meta("metro4:blur_image").attr("content");void 0===window.METRO_BLUR_IMAGE&&(window.METRO_BLUR_IMAGE=void 0!==p&&JSON.parse(h)),void 0===window.METRO_GLOBAL_COMMON&&(window.METRO_GLOBAL_COMMON=void 0!==h&&JSON.parse(h));var f=e.meta("metro4:jquery").attr("content");window.jquery_present="undefined"!=typeof jQuery,void 0===window.METRO_JQUERY&&(window.METRO_JQUERY=void 0===f||JSON.parse(f)),window.useJQuery=window.jquery_present&&window.METRO_JQUERY;var m=e.meta("metro4:info").attr("content");void 0===window.METRO_SHOW_INFO&&(window.METRO_SHOW_INFO=void 0===m||JSON.parse(m));var v=e.meta("metro4:compile").attr("content");void 0===window.METRO_SHOW_COMPILE_TIME&&(window.METRO_SHOW_COMPILE_TIME=void 0===v||JSON.parse(v)),void 0===window.METRO_INIT&&(window.METRO_INIT=void 0===t||JSON.parse(t)),void 0===window.METRO_DEBUG&&(window.METRO_DEBUG=!0),void 0===window.METRO_WEEK_START&&(window.METRO_WEEK_START=void 0!==i?parseInt(i):0),void 0===window.METRO_DATE_FORMAT&&(window.METRO_DATE_FORMAT=void 0!==a?a:"YYYY-MM-DD"),void 0===window.METRO_DATE_FORMAT_INPUT&&(window.METRO_DATE_FORMAT_INPUT=void 0!==s?s:"YYYY-MM-DD"),void 0===window.METRO_LOCALE&&(window.METRO_LOCALE=void 0!==n?n:"en-US"),void 0===window.METRO_ANIMATION_DURATION&&(window.METRO_ANIMATION_DURATION=void 0!==o?parseInt(o):100),void 0===window.METRO_CALLBACK_TIMEOUT&&(window.METRO_CALLBACK_TIMEOUT=void 0!==r?parseInt(r):500),void 0===window.METRO_TIMEOUT&&(window.METRO_TIMEOUT=void 0!==l?parseInt(l):2e3),void 0===window.METRO_SCROLL_MULTIPLE&&(window.METRO_SCROLL_MULTIPLE=void 0!==c?parseInt(c):20),void 0===window.METRO_CLOAK_REMOVE&&(window.METRO_CLOAK_REMOVE=void 0!==d?(""+d).toLowerCase():"fade"),void 0===window.METRO_CLOAK_DURATION&&(window.METRO_CLOAK_DURATION=void 0!==u?parseInt(u):300),void 0===window.METRO_HOTKEYS_FILTER_CONTENT_EDITABLE&&(window.METRO_HOTKEYS_FILTER_CONTENT_EDITABLE=!0),void 0===window.METRO_HOTKEYS_FILTER_INPUT_ACCEPTING_ELEMENTS&&(window.METRO_HOTKEYS_FILTER_INPUT_ACCEPTING_ELEMENTS=!0),void 0===window.METRO_HOTKEYS_FILTER_TEXT_INPUTS&&(window.METRO_HOTKEYS_FILTER_TEXT_INPUTS=!0),void 0===window.METRO_HOTKEYS_BUBBLE_UP&&(window.METRO_HOTKEYS_BUBBLE_UP=!1),void 0===window.METRO_THROWS&&(window.METRO_THROWS=!0),window.METRO_MEDIA=[]}(m4q),function(){var e=m4q;if("undefined"==typeof m4q)throw new Error("Metro UI requires m4q helper!");if(!("MutationObserver"in window))throw new Error("Metro UI requires MutationObserver!");var t="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,normalizeComponentName=function(e){return"string"!=typeof e?void 0:e.replace(/-/g,"").toLowerCase()},n={version:"5.1.0",build_time:"14.07.2024, 17:26:18",buildNumber:0,isTouchable:t,fullScreenEnabled:document.fullscreenEnabled,sheet:null,controlsPosition:{INSIDE:"inside",OUTSIDE:"outside"},groupMode:{ONE:"one",MULTI:"multi"},aspectRatio:{HD:"hd",SD:"sd",CINEMA:"cinema"},fullScreenMode:{WINDOW:"window",DESKTOP:"desktop"},position:{TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",TOP_RIGHT:"top-right",TOP_LEFT:"top-left",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",LEFT_BOTTOM:"left-bottom",LEFT_TOP:"left-top",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom"},popoverEvents:{CLICK:"click",HOVER:"hover",FOCUS:"focus"},stepperView:{SQUARE:"square",CYCLE:"cycle",DIAMOND:"diamond"},listView:{LIST:"list",CONTENT:"content",ICONS:"icons",ICONS_MEDIUM:"icons-medium",ICONS_LARGE:"icons-large",TILES:"tiles",TABLE:"table"},events:{click:"click",start:t?"touchstart":"mousedown",stop:t?"touchend":"mouseup",move:t?"touchmove":"mousemove",enter:t?"touchstart":"mouseenter",startAll:"mousedown touchstart",stopAll:"mouseup touchend",moveAll:"mousemove touchmove",leave:"mouseleave",focus:"focus",blur:"blur",resize:"resize",keyup:"keyup",keydown:"keydown",keypress:"keypress",dblclick:"dblclick",input:"input",change:"change",cut:"cut",paste:"paste",scroll:"scroll",mousewheel:"mousewheel",inputchange:"change input propertychange cut paste copy drop",dragstart:"dragstart",dragend:"dragend",dragenter:"dragenter",dragover:"dragover",dragleave:"dragleave",drop:"drop",drag:"drag"},keyCode:{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,BREAK:19,CAPS:20,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,COMMA:188},media_queries:{FS:"(min-width: 0px)",XS:"(min-width: 360px)",SM:"(min-width: 576px)",LD:"(min-width: 640px)",MD:"(min-width: 768px)",LG:"(min-width: 992px)",XL:"(min-width: 1200px)",XXL:"(min-width: 1452px)",XXXL:"(min-width: 2000px)"},media_sizes:{FS:0,XS:360,SM:576,LD:640,MD:768,LG:992,XL:1200,XXL:1452,XXXL:2e3},media_mode:{FS:"fs",XS:"xs",SM:"sm",LD:"ld",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},media_modes:["fs","xs","sm","ld","md","lg","xl","xxl","xxxl"],actions:{REMOVE:1,HIDE:2},hotkeys:{},locales:{},utils:{},colors:{},dialog:null,pagination:null,md5:null,storage:null,export:null,animations:null,cookie:null,template:null,defaults:{},info:function(){void 0===globalThis.METRO_DISABLE_LIB_INFO&&(console.info(`%c METRO UI %c v${n.version} %c ${n.build_time} `,"color: pink; font-weight: bold; background: #800000","color: white; background: darkgreen","color: white; background: #0080fe;"),globalThis.$&&e.info&&e.info(),globalThis.Hooks&&Hooks.info&&Hooks.info(),globalThis.html&&html.info&&html.info(),globalThis.Animation&&Animation.info&&Animation.info(),globalThis.Farbe&&Farbe.info&&Farbe.info(),globalThis.Datetime&&Datetime.info&&Datetime.info(),globalThis.Str&&Str.info&&Str.info())},showCompileTime:function(){return""},aboutDlg:function(){alert("Metro UI - v"+n.version)},ver:function(){return n.version},build:function(){return n.build},compile:function(){return""},observe:function(){var t;t=function(t){t.map((function(t){if("attributes"===t.type&&"data-role"!==t.attributeName)if("data-hotkey"===t.attributeName)n.initHotkeys([t.target],!0);else{var i=e(t.target),a=i.data("metroComponent"),s=t.attributeName,o=i.attr(s),r=t.oldValue;void 0!==a&&(i.fire("attr-change",{attr:s,newValue:o,oldValue:r,__this:i[0]}),e.each(a,(function(){var e=n.getPlugin(i,this);e&&"function"==typeof e.changeAttribute&&e.changeAttribute(s,o,r)})))}else if("childList"===t.type&&t.addedNodes.length>0){var l,c,d,u=[],h=t.addedNodes;if(h.length){for(l=0;l0&&e.each(a,(function(){n.destroyPlugin(i[0],this)}))},noop:function(){},noop_true:function(){return!0},noop_false:function(){return!1},noop_arg:function(e){return e},requestFullScreen:function(e){e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.requestFullscreen().catch((function(e){console.warn("Error attempting to enable full-screen mode: "+e.message+" "+e.name)}))},exitFullScreen:function(){document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.exitFullscreen().catch((function(e){console.warn("Error attempting to disable full-screen mode: "+e.message+" "+e.name)}))},inFullScreen:function(){return void 0!==(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},$:function(){return window.useJQuery?jQuery:m4q},get$el:function(t){return n.$()(e(t)[0])},get$elements:function(t){return n.$()(e(t))},getPlugin:function(e,t){var i=normalizeComponentName(t),a=n.get$el(e);return a.length?a.data(i):void 0},makePlugin:function(e,t,i){var a=normalizeComponentName(t),s=n.get$elements(e);return s.length&&"function"==typeof s[a]?s[a](i):void 0},Component:function(t,i){var a=normalizeComponentName(t),s=n.utils,o=e.extend({name:a},{_super:function(t,n,i,a){var s=this;this.elem=t,this.element=e(t),this.options=e.extend({},i,n),this.component=this.elem,this._setOptionsFromDOM(),this._runtime(),a&&"object"==typeof a&&e.each(a,(function(e,t){s[e]=t})),this._createExec()},_setOptionsFromDOM:function(){var t=this.element,n=this.options;e.each(t.data(),(function(e,t){if(e in n)try{n[e]=JSON.parse(t)}catch(i){n[e]=t}}))},_runtime:function(){var e,t=this.element,n=(t.attr("data-role")||"").toArray(",").map((function(e){return normalizeComponentName(e)})).filter((function(e){return""!==e.trim()}));t.attr("data-role-"+this.name)||(t.attr("data-role-"+this.name,!0),-1===n.indexOf(this.name)&&(n.push(this.name),t.attr("data-role",n.join(","))),void 0===(e=t.data("metroComponent"))?e=[this.name]:e.push(this.name),t.data("metroComponent",e))},_createExec:function(){var e=this,t=this.options[this.name+"Deferred"];t?setTimeout((function(){e._create()}),t):e._create()},_fireEvent:function(t,n,i,a,o=null){var r,l=this.element,c=this.options,d=str(t).camelCase().capitalize(!1).value;return r=(n=e.extend({},n,{__this:l[0]}))?Object.values(n):{},i&&(console.warn(i),console.warn("Event: on"+d),console.warn("Data: ",n),console.warn("Element: ",l[0])),!0!==a&&l.fire(d.toLowerCase(),n),s.exec(c["on"+d],r,o||l[0])},_fireEvents:function(t,n,i,a,o){var r,l=this;if(0!==arguments.length)return 1===arguments.length?(e.each(t,(function(){var e=this;l._fireEvent(e.name,e.data,e.log,e.noFire,o)})),s.objectLength(t)):void((Array.isArray(t)||"string"==typeof t)&&(r=Array.isArray(t)?t:t.toArray(","),e.each(r,(function(){l._fireEvent(this,n,i,a,o)}))))},getComponent:function(){return this.component},getComponentName:function(){return this.name}},i);return n.plugin(a,o),o},fetch:{status:function(e){return e.ok?Promise.resolve(e):Promise.reject(new Error(e.statusText))},json:function(e){return e.json()},text:function(e){return e.text()},form:function(e){return e.formData()},blob:function(e){return e.blob()},buffer:function(e){return e.arrayBuffer()}}};e(window).on(n.events.resize,(function(){window.METRO_MEDIA=[],e.each(n.media_queries,(function(e,t){n.utils.media(t)&&window.METRO_MEDIA.push(n.media_mode[e])}))})),window.Metro=n,!0===window.METRO_INIT&&e((function(){n.init()}))}(),function(e,t){m4q.extend(e.locales,{"da-DK":{calendar:{months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December","Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Sø","Ma","Ti","On","To","Fr","Lø","Søn","Man","Tir","Ons","Tor","Fre","Lør"],time:{days:"DAGE",hours:"TIMER",minutes:"MIN",seconds:"SEK",month:"MON",day:"DAG",year:"ÅR"},weekStart:1},buttons:{ok:"OK",cancel:"Annuller",done:"Færdig",today:"Idag",now:"Nu",clear:"Ryd",help:"Hjælp",yes:"Ja",no:"Nej",random:"Tilfældig",save:"Gem",reset:"Nulstil"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"de-DE":{calendar:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember","Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","So","Mo","Di","Mi","Do","Fr","Sa","Son","Mon","Die","Mit","Don","Fre","Sam"],time:{days:"TAGE",hours:"STD",minutes:"MIN",seconds:"SEK"},weekStart:2},buttons:{ok:"OK",cancel:"Abbrechen",done:"Fertig",today:"Heute",now:"Jetzt",clear:"Löschen",help:"Hilfe",yes:"Ja",no:"Nein",random:"Zufällig",save:"Speichern",reset:"Zurücksetzen"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"en-US":{calendar:{months:["January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Su","Mo","Tu","We","Th","Fr","Sa","Sun","Mon","Tus","Wen","Thu","Fri","Sat"],time:{days:"DAYS",hours:"HOURS",minutes:"MINS",seconds:"SECS",month:"MON",day:"DAY",year:"YEAR"},weekStart:0},buttons:{ok:"OK",cancel:"Cancel",done:"Done",today:"Today",now:"Now",clear:"Clear",help:"Help",yes:"Yes",no:"No",random:"Random",save:"Save",reset:"Reset"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"es-MX":{calendar:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre","Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Do","Lu","Ma","Mi","Ju","Vi","Sa","Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],time:{days:"DÍAS",hours:"HORAS",minutes:"MINS",seconds:"SEGS",month:"MES",day:"DÍA",year:"AÑO"},weekStart:1},buttons:{ok:"Aceptar",cancel:"Cancelar",done:"Hecho",today:"Hoy",now:"Ahora",clear:"Limpiar",help:"Ayuda",yes:"Si",no:"No",random:"Aleatorio",save:"Salvar",reset:"Reiniciar"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"fr-FR":{calendar:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre","Janv","Févr","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Di","Lu","Ma","Me","Je","Ve","Sa","Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],time:{days:"JOURS",hours:"HEURES",minutes:"MINS",seconds:"SECS",month:"MOIS",day:"JOUR",year:"ANNEE"},weekStart:1},buttons:{ok:"OK",cancel:"Annulé",done:"Fait",today:"Aujourd'hui",now:"Maintenant",clear:"Effacé",help:"Aide",yes:"Oui",no:"Non",random:"Aléatoire",save:"Sauvegarder",reset:"Réinitialiser"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"hr-HR":{calendar:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac","Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],days:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota","Ne","Po","Ut","Sr","Če","Pe","Su","Ned","Pon","Uto","Sri","Čet","Pet","Sub"],time:{days:"DANI",hours:"SATI",minutes:"MINUTE",seconds:"SEKUNDE",month:"MJESEC",day:"DAN",year:"GODINA"},weekStart:1},buttons:{ok:"OK",cancel:"Otkaži",done:"Gotovo",today:"Danas",now:"Sada",clear:"Izbriši",help:"Pomoć",yes:"Da",no:"Ne",random:"Nasumično",save:"Spremi",reset:"Reset"},table:{rowsCount:"Broj redaka:",search:"Pretraga:",info:"Prikazujem $1 do $2 od $3",prev:"Nazad",next:"Naprijed",all:"Sve",inspector:"Inspektor",skip:"Idi na stranicu",empty:"Prazno"},colorSelector:{addUserColorButton:"Dodaj uzorcima",userColorsTitle:"Korisničke boje"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"hu-HU":{calendar:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December","Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],days:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat","V","H","K","Sz","Cs","P","Sz","Vas","Hét","Ke","Sze","Csü","Pén","Szom"],time:{days:"NAP",hours:"ÓRA",minutes:"PERC",seconds:"MP"},weekStart:1},buttons:{ok:"OK",cancel:"Mégse",done:"Kész",today:"Ma",now:"Most",clear:"Törlés",help:"Segítség",yes:"Igen",no:"Nem",random:"Véletlen",save:"Mentés",reset:"Visszaállítás"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"it-IT":{calendar:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre","Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Do","Lu","Ma","Me","Gi","Ve","Sa","Dom","Lun","Mar","Mer","Gio","Ven","Sab"],time:{days:"GIORNI",hours:"ORE",minutes:"MIN",seconds:"SEC",month:"MESE",day:"GIORNO",year:"ANNO"},weekStart:1},buttons:{ok:"OK",cancel:"Annulla",done:"Fatto",today:"Oggi",now:"Adesso",clear:"Cancella",help:"Aiuto",yes:"Sì",no:"No",random:"Random",save:"Salvare",reset:"Reset"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"pl-PL":{calendar:{months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień","Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","NDZ","PN","WT","ŚR","CZW","PT","SB","Niedz","Pon","Wt","Śr","Czw","Pt","Sob"],time:{days:"DNI",hours:"GODZINY",minutes:"MINUTY",seconds:"SEKUNDY",month:"MIESIĄC",day:"DZIEŃ",year:"ROK"},weekStart:1},buttons:{ok:"OK",cancel:"Anuluj",done:"Gotowe",today:"Dziś",now:"Teraz",clear:"Wyczyść",help:"Pomoc",yes:"Tak",no:"Nie",random:"Losowy",save:"Zapisz",reset:"Resetowanie"},table:{rowsCount:"Pokaż wpisy:",search:"Wyszukaj:",info:"Wyświetlanie wpisów od $1 do $2 z łącznie $3",prev:"Poprzedni",next:"Następny",all:"Wszystkie",inspector:"Inspektor",skip:"Idź do strony",empty:"Nic do wyświetlenia"},colorSelector:{addUserColorButton:"DODAJ DO PRÓBEK",userColorsTitle:"KOLOR UŻYTKOWNIKA"},switch:{on:"Włącz",off:"Wyłącz"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"pt-BR":{calendar:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro","Jan","Fev","Mar","Abr","Maio","Jun","Jul","Ago","Set","Out","Nov","Dez"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Do","Se","Te","Qa","Qi","Se","Sa","Dom","Seg","Ter","Qua","Qui","Sex","Sab"],time:{days:"DIAS",hours:"HORAS",minutes:"MINUTOS",seconds:"SEGUNDOS",month:"MÊS",day:"DIA",year:"ANO"},weekStart:1},buttons:{ok:"OK",cancel:"Cancelar",done:"Feito",today:"Hoje",now:"Agora",clear:"Limpar",help:"Ajuda",yes:"Sim",no:"Não",random:"Aleatório",save:"Salvar",reset:"Restaurar"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"ru-RU":{calendar:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь","Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вос","Пон","Вто","Сре","Чет","Пят","Суб"],time:{days:"ДНИ",hours:"ЧАСЫ",minutes:"МИН",seconds:"СЕК",month:"МЕС",day:"ДЕНЬ",year:"ГОД"},weekStart:1},buttons:{ok:"ОК",cancel:"Отмена",done:"Готово",today:"Сегодня",now:"Сейчас",clear:"Очистить",help:"Помощь",yes:"Да",no:"Нет",random:"Случайно",save:"Сохранить",reset:"Сброс"},table:{rowsCount:"Показать записей:",search:"Поиск:",info:"Показаны $1 с $2 по $3 записей",prev:"Предыдущие",next:"Следующие",all:"Все",inspector:"Инспектор",skip:"Перейти на страницу",empty:"Нет записей"},colorSelector:{addUserColorButton:"ДОБАВИТЬ В ОБРАЗЦЫ",userColorsTitle:"ЦВЕТА ПОЛЬЗОВАТЕЛЯ"},switch:{on:"вкл",off:"выкл"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"tr-TR":{calendar:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık","Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pa","Pz","Sa","Ça","Pe","Cu","Ct","Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],time:{days:"GÜN",hours:"SAAT",minutes:"DAK",seconds:"SAN",month:"AY",day:"GÜN",year:"YIL"},weekStart:1},buttons:{ok:"Tamam",cancel:"Vazgeç",done:"Bitti",today:"Bugün",now:"Şimdi",clear:"Temizle",help:"Yardım",yes:"Evet",no:"Hayır",random:"Rasgele",save:"Kurtarmak",reset:"Sıfırla"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"uk-UA":{calendar:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень","Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],days:["Неділя","Понеділок","Вівторок","Середа","Четвер","П’ятниця","Субота","Нд","Пн","Вт","Ср","Чт","Пт","Сб","Нед","Пон","Вiв","Сер","Чет","Пят","Суб"],time:{days:"ДНІ",hours:"ГОД",minutes:"ХВИЛ",seconds:"СЕК",month:"МІС",day:"ДЕНЬ",year:"РІК"},weekStart:1},buttons:{ok:"ОК",cancel:"Відміна",done:"Готово",today:"Сьогодні",now:"Зараз",clear:"Очистити",help:"Допомога",yes:"Так",no:"Ні",random:"Випадково",save:"Зберегти",reset:"Скинути"},table:{rowsCount:"Показати записів:",search:"Пошук:",info:"Показано $1 з $2 по $3 записів",prev:"Попередні",next:"Наступні",all:"Усі",inspector:"Інспектор",skip:"Перейти до сторінки",empty:"Нема записів"},colorSelector:{addUserColorButton:"ДОДАТИ В ЗРАЗКИ",userColorsTitle:"КОЛІРИ КОРИСТУВАЧА"},switch:{on:"увм",off:"вім"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"zh-CN":{calendar:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","日","一","二","三","四","五","六","周日","周一","周二","周三","周四","周五","周六"],time:{days:"天",hours:"时",minutes:"分",seconds:"秒",month:"月",day:"日",year:"年"},weekStart:1},buttons:{ok:"确认",cancel:"取消",done:"完成",today:"今天",now:"现在",clear:"清除",help:"帮助",yes:"是",no:"否",random:"随机",save:"保存",reset:"重啟"},table:{rowsCount:"显示实体:",search:"搜索:",info:"显示 $1 到 $2 的 $3 条目",prev:"上一页",next:"下一页",all:"全部",inspector:"查看",skip:"转到页面",empty:"没有数据"},colorSelector:{addUserColorButton:"添加到颜色板",userColorsTitle:"用户颜色"},switch:{on:"是",off:"否"}}})}(Metro),function(e,t){m4q.extend(e.locales,{"zh-TW":{calendar:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","日","一","二","三","四","五","六","週日","週一","週二","週三","週四","週五","週六"],time:{days:"天",hours:"時",minutes:"分",seconds:"秒",month:"月",day:"日",year:"年"},weekStart:1},buttons:{ok:"確認",cancel:"取消",done:"完成",today:"今天",now:"現在",clear:"清除",help:"幫助",yes:"是",no:"否",random:"隨機",save:"保存",reset:"重啟"},table:{rowsCount:"Show entries:",search:"Search:",info:"Showing $1 to $2 of $3 entries",prev:"Prev",next:"Next",all:"All",inspector:"Inspector",skip:"Goto page",empty:"Nothing to show"},colorSelector:{addUserColorButton:"ADD TO SWATCHES",userColorsTitle:"USER COLORS"},switch:{on:"on",off:"off"}}})}(Metro),"function"!=typeof Array.prototype.shuffle&&(Array.prototype.shuffle=function(){for(var e,t,n=this.length;0!==n;)t=Math.floor(Math.random()*n),e=this[n-=1],this[n]=this[t],this[t]=e;return this}),"function"!=typeof Array.prototype.clone&&(Array.prototype.clone=function(){return this.slice(0)}),"function"!=typeof Array.prototype.unique&&(Array.prototype.unique=function(){for(var e=this.concat(),t=0;te.trim())).filter(Boolean)}),Number.prototype.format=function(e,t,n,i){var a="\\d(?=(\\d{"+(t||3)+"})+"+(e>0?"\\D":"$")+")",s=this.toFixed(Math.max(0,~~e));return(i?s.replace(".",i):s).replace(new RegExp(a,"g"),"$&"+(n||","))},String.prototype.toArray=function(e,t,n,i){return t=t||"string",n=null!=n&&n,(""+this).split(e=e||",").map((function(e){var a;switch(t){case"int":case"integer":a=isNaN(e)?e.trim():parseInt(e);break;case"number":case"float":a=isNaN(e)?e:parseFloat(e);break;case"date":a=n?Datetime.from(e,n,i||"en-US"):datetime(e);break;default:a=e.trim()}return a}))},String.prototype.capitalize=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},function(e,t){e.utils={nothing:function(){},noop:function(){},elementId:function(e){return e+"-"+(new Date).getTime()+t.random(1,1e3)},secondsToTime:function(e){return{d:Math.floor(e%31536e3/86400),h:Math.floor(e%31536e3%86400/3600),m:Math.floor(e%31536e3%86400%3600/60),s:Math.round(e%31536e3%86400%3600%60)}},secondsToFormattedString:function(e){var t=parseInt(e,10),n=Math.floor(t/3600),i=Math.floor((t-3600*n)/60),a=t-3600*n-60*i;return[Str.lpad(n,"0",2),Str.lpad(i,"0",2),Str.lpad(a,"0",2)].join(":")},func:function(e){return new Function("a",e)},exec:function(e,t,n){var i;if(null==e)return!1;var a=this.isFunc(e);!1===a&&(a=this.func(e));try{i=a.apply(n,t)}catch(e){if(i=null,!0===window.METRO_THROWS)throw e}return i},embedUrl:function(e){return-1!==e.indexOf("youtu.be")&&(e="https://www.youtube.com/embed/"+e.split("/").pop()),"
"},isVisible:function(e){var n=t(e)[0];return"none"!==this.getStyleOne(n,"display")&&"hidden"!==this.getStyleOne(n,"visibility")&&null!==n.offsetParent},isUrl:function(e){return/^(\.\/|\.\.\/|ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@\-\/]))?/.test(e)},isTag:function(e){return/^<\/?[\w\s="/.':;#-\/\?]+>/gi.test(e)},isEmbedObject:function(e){var n=!1;return t.each(["iframe","object","embed","video"],(function(){("string"==typeof e&&e.toLowerCase()===this||void 0!==e.nodeType&&e.tagName.toLowerCase()===this)&&(n=!0)})),n},isVideoUrl:function(e){return/youtu\.be|youtube|twitch|vimeo/gi.test(e)},isDate:function(e,t,n="en-US"){var i;if(this.isDateObject(e))return!0;try{return i=t?Datetime.from(e,t,n):datetime(e),Datetime.isDatetime(i)}catch(e){return!1}},isDateObject:function(e){return"object"==typeof e&&void 0!==e.getMonth},isInt:function(e){return!isNaN(e)&&+e%1==0},isFloat:function(e){return!isNaN(e)&&+e%1!=0||/^\d*\.\d+$/.test(e)},isFunc:function(e){return this.isType(e,"function")},isObject:function(e){return this.isType(e,"object")},isObject2:function(e){return"object"==typeof e&&!Array.isArray(e)},isType:function(e,t){if(!this.isValue(e))return!1;if(typeof e===t)return e;if("tag"===(""+t).toLowerCase()&&this.isTag(e))return e;if("url"===(""+t).toLowerCase()&&this.isUrl(e))return e;if("array"===(""+t).toLowerCase()&&Array.isArray(e))return e;if("string"!==t&&this.isTag(e)||this.isUrl(e))return!1;if(typeof window[e]===t)return window[e];if("string"==typeof e&&-1===e.indexOf("."))return!1;if("string"==typeof e&&/[/\s([]+/gm.test(e))return!1;if("number"==typeof e&&"number"!==t.toLowerCase())return!1;var n,i=e.split("."),a=window;for(n=0;n=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},rect:function(e){return e.getBoundingClientRect()},getCursorPosition:function(e,t){var n=this.rect(e);return{x:this.pageXY(t).x-n.left-window.scrollX,y:this.pageXY(t).y-n.top-window.scrollY}},getCursorPositionX:function(e,t){return this.getCursorPosition(e,t).x},getCursorPositionY:function(e,t){return this.getCursorPosition(e,t).y},objectLength:function(e){return Object.keys(e).length},percent:function(e,t,n){if(0===e)return 0;var i=100*t/e;return!0===n?Math.round(i):Math.round(100*i)/100},objectShift:function(e){var n=0;return t.each(e,(function(e){(0===n||n>e)&&(n=e)})),delete e[n],e},objectDelete:function(e,t){t in e&&delete e[t]},arrayDeleteByMultipleKeys:function(e,t){return t.forEach((function(t){delete e[t]})),e.filter((function(e){return void 0!==e}))},arrayDelete:function(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},arrayDeleteByKey:function(e,t){e.splice(t,1)},nvl:function(e,t){return null==e?t:e},objectClone:function(e){var n={};for(var i in e)t.hasProp(e,i)&&(n[i]=e[i]);return n},github:async function(e,t){const n=await fetch(`https://api.github.com/repos/${e}`);if(!n.ok)return;const i=await n.json();this.exec(t,[i])},pageHeight:function(){var e=document.body,t=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)},cleanPreCode:function(e){Array.prototype.slice.call(document.querySelectorAll(e),0).forEach((function(e){var t=e.textContent.replace(/^[\r\n]+/,"").replace(/\s+$/g,"");if(/^\S/gm.test(t))e.textContent=t;else{for(var n,i,a,s=/^[\t ]+/gm,o=1e3;n=s.exec(t);)(a=n[0].length)-1},keyInObject:function(e,t){return Object.keys(e).indexOf(t)>-1},inObject:function(e,t,n){return void 0!==e[t]&&e[t]===n},newCssSheet:function(e){var t=document.createElement("style");return void 0!==e&&t.setAttribute("media",e),t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet},addCssRule:function(e,t,n,i){e.insertRule(t+"{"+n+"}",i)},media:function(e){return window.matchMedia(e).matches},mediaModes:function(){return window.METRO_MEDIA},mediaExist:function(e){return window.METRO_MEDIA.indexOf(e)>-1},inMedia:function(e){return window.METRO_MEDIA.indexOf(e)>-1&&window.METRO_MEDIA.indexOf(e)===window.METRO_MEDIA.length-1},isValue:function(e){return null!=e&&""!==e},isNull:function(e){return null==e},isNegative:function(e){return parseFloat(e)<0},isPositive:function(e){return parseFloat(e)>0},isZero:function(e){return 0===parseFloat(e.toFixed(2))},between:function(e,t,n,i){return!0===i?e>=t&&e<=n:e>t&&e0){var l,c=s.find(".dialog-actions");0===c.length&&(c=t("
").addClass("dialog-actions").addClass("text-"+o.actionsAlign).appendTo(s)),!0===o.defaultAction&&0===n.objectLength(o.actions)&&0===s.find(".dialog-actions > *").length&&(l=t("").appendTo(a),r[s.view[e]["index-view"]]=a})),i=0;i").addClass("table-inspector")).attr("for",this.element.attr("id")),t("
"+(o.inspectorTitle||this.locale.table.inspector)+"
").appendTo(e),n=t("
").addClass("table-wrap").appendTo(e),i=t("").addClass("table subcompact"),a=t("").appendTo(i),i.appendTo(n),this._createInspectorItems(a),s=t("
").appendTo(e),t("
"),s.prepend(r)),r.clear().addClass(o.clsHead),0===this.heads.length)return r;for(e=t("").addClass(o.clsHeadRow).appendTo(r),t.each(this.service,(function(){var i=this,a=[],s=t("").appendTo(a)),o.clear().addClass(s.clsFooter),0!==this.foots.length&&(e=t("").addClass(s.clsHeadRow).appendTo(o),t.each(this.foots,(function(){var a=this;i=t("").addClass(m.clsBodyRow)).data("original",c),u=a%2==0,r=t("").appendTo(b),w=t("").appendTo(b),y=[];if("function"==typeof m.tableToCSV){for(a=n.isValue(a)?a.toLowerCase():"all-filtered",s=n.isValue(s)?s:n.elementId("table")+"-export.csv",u=t(""),c=this.heads,l=0;l"),n.isValue(this.title)&&h.html(this.title),y[v.view[e]["index-view"]]=h)})),l=0;l"),c=d[r],l=0;l").html(this),y[v.view[e]["index-view"]]=h)})),l=0;l0&&r.off(e.events.inputchange)}return a.off(e.events.click,".pagination .page-link"),n.isValue(this.wrapperPagination)&&this.wrapperPagination.off(e.events.click,".pagination .page-link"),i.off(e.events.click,".js-table-crud-button"),this._removeInspectorEvents(),i}})}(Metro,m4q),function(e,t){var n=e.utils,i={tabsDeferred:0,expand:!1,expandPoint:null,tabsPosition:"top",tabsType:"default",updateUri:!1,clsTabs:"",clsTabsList:"",clsTabsListItem:"",clsTabsListItemActive:"",onTab:e.noop,onTabOpen:e.noop,onTabClose:e.noop,onBeforeTab:e.noop_true,onTabsCreate:e.noop};e.tabsSetup=function(e){i=t.extend({},i,e)},void 0!==typeof window.metroTabsSetup&&e.tabsSetup(window.metroTabsSetup),e.Component("tabs",{init:function(e,t){return this._super(t,e,i,{_targets:[],id:n.elementId("tabs")}),this},_create:function(){var e=this.element;this.options;var n=e.find(".active").length>0?t(e.find(".active")[0]):void 0;this._createStructure(),this._createEvents(),this._open(n),this._fireEvent("tabs-create",{element:e})},_createStructure:function(){var e,i,a=this.element,s=this.options,o=a.parent(),r=o.hasClass("tabs"),l=r?o:t("
").addClass("tabs tabs-wrapper");if(l.addClass(s.tabsPosition.replace(["-","_","+"]," ")),a.addClass("tabs-list"),"default"!==s.tabsType&&a.addClass("tabs-"+s.tabsType),r||(l.insertBefore(a),a.appendTo(l)),a.data("expanded",!1),e=t("
").addClass("expand-title"),l.prepend(e),0===(i=l.find(".hamburger")).length){i=t("
");n.isValue(i.title)&&s.html(i.title),n.isValue(i.size)&&s.css({width:i.size}),n.isValue(i.cls)&&a.push(i.cls),a.push(o.clsHeadCell),s.addClass(a.join(" ")),e.append(s)})),a=this.heads,i=0;i");s.data("index",e),n.isValue(i.title)&&s.html(i.title),n.isValue(i.format)&&s.attr("data-format",i.format),n.isValue(i.formatMask)&&s.attr("data-format-mask",i.formatMask),n.isValue(i.name)&&s.attr("data-name",i.name),n.isValue(i.colspan)&&s.attr("colspan",i.colspan),n.isValue(i.size)&&s.attr("data-size",i.size),n.isValue(i.sortable)&&s.attr("data-sortable",i.sortable),n.isValue(i.sortDir)&&s.attr("data-sort-dir",i.sortDir),n.isValue(i.clsColumn)&&s.attr("data-cls-column",i.clsColumn),n.isValue(i.cls)&&s.attr("data-cls",i.cls),n.isValue(i.colspan)&&s.attr("colspan",i.colspan),n.isValue(i.show)&&s.attr("data-show",i.show),n.isValue(i.required)&&s.attr("data-required",i.required),n.isValue(i.field)&&s.attr("data-field",i.field),n.isValue(i.fieldType)&&s.attr("data-field-type",i.fieldType),n.isValue(i.validator)&&s.attr("data-validator",i.validator),n.isValue(i.template)&&s.attr("data-template",i.template),n.isValue(c[e].size)&&s.css({width:c[e].size}),!0===i.sortable&&(a.push("sortable-column"),n.isValue(i.sortDir)&&a.push("sort-"+i.sortDir)),n.isValue(i.cls)&&t.each(i.cls.toArray(),(function(){a.push(this)})),!1===n.bool(c[e].show)&&-1===a.indexOf("hidden")&&a.push("hidden"),a.push(o.clsHeadCell),n.bool(c[e].show)&&n.arrayDelete(a,"hidden"),s.addClass(a.join(" ")),l[c[e]["index-view"]]=s})),i=0;i").addClass(this.options.clsBody),0!==n.length?e.insertAfter(n):i.append(e)),e.clear()},_createTableFooter:function(){var e,i,a=this.element,s=this.options,o=a.find("tfoot");0===o.length&&(o=t("
").appendTo(e),void 0!==a.title&&i.html(a.title),void 0!==a.name&&i.addClass("foot-column-name-"+a.name),void 0!==a.cls&&i.addClass(a.cls),n.isValue(a.colspan)&&i.attr("colspan",a.colspan),i.appendTo(e)})))},_createTopBlock:function(){var i,a,s,o,r=this,l=this.element,c=this.options,d=t("
").addClass("table-top").addClass(c.clsTableTop).insertBefore(l.parent());return(i=n.isValue(this.wrapperSearch)?this.wrapperSearch:t("
").addClass("table-search-block").addClass(c.clsSearch).appendTo(d)).addClass(c.clsSearch),a=t("").attr("type","text").attr("placeholder",c.tableSearchPlaceholder).appendTo(i),e.makePlugin(a,"input",{prepend:c.tableSearchTitle||r.locale.table.search}),!0!==c.showSearch&&i.hide(),(s=n.isValue(this.wrapperRows)?this.wrapperRows:t("
").addClass("table-rows-block").appendTo(d)).addClass(c.clsRowsCount),o=t("").addClass("input table-skip-input").addClass(o.clsTableSkipInput).appendTo(a),t("
").html(a+1),void 0!==p.service[0].clsColumn&&r.addClass(p.service[0].clsColumn),r.appendTo(o),r=t(""),l="checkbox"===m.checkType?t(""):t(""),n.isValue(w)&&Array.isArray(w)&&w.indexOf(""+h[a][m.checkColIndex])>-1&&(l.prop("checked",!0),C.push(c)),l.addClass("table-service-check"),this._fireEvent("check-draw",{check:l}),l.appendTo(r),void 0!==p.service[1].clsColumn&&r.addClass(p.service[1].clsColumn),r.appendTo(o),s=0;s");n.isValue(p.heads[e].template)&&(i=p.heads[e].template.replace(/%VAL%/g,i)),a.html(i),a.addClass(m.clsBodyCell),n.isValue(p.heads[e].clsColumn)&&a.addClass(p.heads[e].clsColumn),!1===n.bool(y[e].show)&&a.addClass("hidden"),n.bool(y[e].show)&&a.removeClass("hidden"),a.data("original",this),d[y[e]["index-view"]]=a,p._fireEvent("draw-cell",{td:a,val:i,cellIndex:e,head:p.heads[e],items:c}),!0===m.cellWrapper&&(i=t("
").addClass("data-wrapper").addClass(m.clsCellWrapper).html(a.html()),a.html("").append(i))})),s=0;s").addClass(m.clsBodyRow).appendTo(v),(r=t("
").attr("colspan",s).addClass("text-center").html(t("").addClass(m.clsEmptyTableTitle).html(m.emptyTableTitle||p.locale.table.empty))).appendTo(o);this._info(g+1,b+1,h.length),this._paging(h.length),this.activity&&this.activity.hide(),this._fireEvent("draw"),void 0!==i&&n.exec(i,null,f[0])}else console.warn("Heads is not defined for table ID "+f.attr("id"))},_getItemContent:function(e){var t,i=this.options,a=e[this.sort.colIndex],s=this.heads[this.sort.colIndex].format,o=n.isNull(this.heads)||n.isNull(this.heads[this.sort.colIndex])||!n.isValue(this.heads[this.sort.colIndex].formatMask)?"%Y-%m-%d":this.heads[this.sort.colIndex].formatMask,r=this.heads&&this.heads[this.sort.colIndex]&&this.heads[this.sort.colIndex].thousandSeparator?this.heads[this.sort.colIndex].thousandSeparator:i.thousandSeparator,l=this.heads&&this.heads[this.sort.colIndex]&&this.heads[this.sort.colIndex].decimalSeparator?this.heads[this.sort.colIndex].decimalSeparator:i.decimalSeparator;if(t=(""+a).toLowerCase().replace(/[\n\r]+|[\s]{2,}/g," ").trim(),n.isValue(t)&&n.isValue(s))switch(-1!==["number","int","float","money"].indexOf(s)&&(t=n.parseNumber(t,r,l)),s){case"date":t=o?Datetime.from(t,o,i.locale):datetime(t);break;case"number":t=+t;break;case"int":t=parseInt(t);break;case"float":t=parseFloat(t);break;case"money":t=n.parseMoney(t);break;case"card":t=n.parseCard(t);break;case"phone":t=n.parsePhone(t)}return t},addItem:function(e,t){if(!Array.isArray(e))return console.warn("Item is not an array and can't be added"),this;this.items.push(e),!1!==t&&this.draw()},addItems:function(e,t){if(!Array.isArray(e))return console.warn("Items is not an array and can't be added"),this;e.forEach((function(e){Array.isArray(e)&&this.items.push(e,!1)})),this.draw(),!1!==t&&this.draw()},updateItem:function(e,t,i){var a=this.items[this.index[e]],s=null;return n.isNull(a)?(console.warn("Item is undefined for update"),this):(isNaN(t)&&this.heads.forEach((function(e,n){e.name===t&&(s=n)})),n.isNull(s)?(console.warn("Item is undefined for update. Field "+t+" not found in data structure"),this):(a[s]=i,this.items[this.index[e]]=a,this))},getItem:function(e){return this.items[this.index[e]]},deleteItem:function(e,t){var i,a=[],s=n.isFunc(t);for(i=0;ia&&(s="asc"===t.sort.dir?1:-1),0!==s&&t._fireEvent("sort-item-switch",{a:e,b:n,result:s}),s})),this._fireEvent("sort-stop",{items:this.items}),this},search:function(e){return this.searchString=e.trim().toLowerCase(),this.currentPage=1,this._draw(),this},_rebuild:function(e){var n,i=this,a=this.element,s=!1;this._createIndex(),!0===e&&(this.view=this._createView()),this._createTableHeader(),this._createTableBody(),this._createTableFooter(),this.heads.length>0&&t.each(this.heads,(function(e){!s&&["asc","desc"].indexOf(this.sortDir)>-1&&(s=!0,i.sort.colIndex=e,i.sort.dir=this.sortDir)})),s&&(n=a.find(".sortable-column"),this._resetSortClass(n),t(n.get(i.sort.colIndex)).addClass("sort-"+i.sort.dir),this.sorting()),i.currentPage=1,i._draw()},setHeads:function(e){return this.heads=e,this},setHeadItem:function(e,t){var n,i;for(n=0;nthis.pagesCount))return this._draw(),this;this.currentPage=this.pagesCount}},prev:function(){if(0!==this.items.length){if(this.currentPage--,0!==this.currentPage)return this._draw(),this;this.currentPage=1}},first:function(){if(0!==this.items.length)return this.currentPage=1,this._draw(),this},last:function(){if(0!==this.items.length)return this.currentPage=this.pagesCount,this._draw(),this},page:function(e){return e<=0&&(e=1),e>this.pagesCount&&(e=this.pagesCount),this.currentPage=e,this._draw(),this},addFilter:function(e,t){var i,a=null,s=n.isFunc(e);if(!1!==s){for(i=0;i0?this.filteredItems:this.items},getSelectedItems:function(){var i=this.element,a=this.options,s=e.storage.getItem(a.checkStoreKey.replace("$1",i.attr("id"))),o=[];return n.isValue(s)?(t.each(this.items,(function(){-1!==s.indexOf(""+this[a.checkColIndex])&&o.push(this)})),o):[]},getStoredKeys:function(){var t=this.element,n=this.options;return e.storage.getItem(n.checkStoreKey.replace("$1",t.attr("id")),[])},clearSelected:function(t){var n=this.element,i=this.options;e.storage.setItem(i.checkStoreKey.replace("$1",n.attr("id")),[]),n.find("table-service-check-all input").prop("checked",!1),!0===t&&this._draw()},getFilters:function(){return this.filters},getFiltersIndexes:function(){return this.filtersIndexes},openInspector:function(e){var n=this.inspector;e?n.show(0,(function(){n.css({top:(t(window).height()-n.outerHeight(!0))/2+pageYOffset,left:(t(window).width()-n.outerWidth(!0))/2+pageXOffset}).data("open",!0)})):n.hide().data("open",!1)},closeInspector:function(){this.openInspector(!1)},toggleInspector:function(){this.openInspector(!this.inspector.data("open"))},resetView:function(){this.view=this._createView(),this._createTableHeader(),this._createTableFooter(),this._draw(),this._resetInspector(),this._saveTableView()},rebuildIndex:function(){this._createIndex()},getIndex:function(){return this.index},export:function(i,a,s,o){var r,l,c,d,u,h,p,f,m=e.export,v=this,g=this.options,b=document.createElement("table"),C=t("