@codady/axui
Version:
The AXUI front-end framework is built on HTML5, CSS3, and JavaScript standards, with TypeScript used for type management. It has no library dependencies and is designed to meet diverse needs with a focus on design.
15 lines • 855 kB
JavaScript
/*!
* @since Last modified: 2025-8-29 7:2:38
* @name AXUI front-end framework.
* @version 3.1.33
* @author AXUI development team <3217728223@qq.com>
* @description The AXUI front-end framework is built on HTML5, CSS3, and JavaScript standards, with TypeScript used for type management.
* @see {@link https://www.axui.cn|Official website}
* @see {@link https://github.com/codady/axui/issues|github issues}
* @see {@link https://gitee.com/codady/axui/issues|Gitee issues}
* @see {@link https://www.npmjs.com/package/@codady/axui|NPM}
* @issue QQ Group No.1:952502085
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'ax,' 'axui,' 'AX,' and 'AXUI' within the software.
* @license MIT license
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ax=e()}(this,(function(){"use strict";const isNull=t=>[void 0,null,"undefined","null"].includes(t),augment=function(t){if(isNull(t)||!t.name)return;let e;if(t.target&&"ax"!==t.target){for(let s in this)if(this[s].name===t.target){e=this[s];break}if(!e)throw new Error(`Cannot find the ${t.target} property in the ax object!`)}else e=this;"method"===t.type?e[e.prototype?"prototype":"__proto__"][t.name]=t.data:Reflect.set(e,t.name,t.data)},t=getComputedStyle(document.documentElement),_getCssVar=e=>t.getPropertyValue(e).trim(),e=_getCssVar("--PREFIX").trim(),s={frame:0,ajaxStor:[],styles:t,cssVar:_getCssVar,prefix:e,alias:_getCssVar(`--${e}alias`),screen:_getCssVar(`--${e}screen`),fullGap:_getCssVar(`--${e}g-full`),fsRoot:_getCssVar(`--${e}fs-root`),images:{spin:_getCssVar(`--${e}spin`).split('"')[1],spinDk:_getCssVar(`--${e}spin-dk`).split('"')[1],blank:_getCssVar(`--${e}blank`).split('"')[1],avatar:_getCssVar(`--${e}avatar`).split('"')[1],empty:_getCssVar(`--${e}empty`).split('"')[1],none:_getCssVar(`--${e}none`).split('"')[1]},curves:{linear:_getCssVar(`--${e}bez-linear`),ease:_getCssVar(`--${e}bez-ease`),easeOut:_getCssVar(`--${e}bez-eo`),easeIn:_getCssVar(`--${e}bez-ei`),easeInOut:_getCssVar(`--${e}bez-eio`),easeOutIn:_getCssVar(`--${e}bez-eoi`)},isNarrowScr:~~_getCssVar(`--${e}isnarrow`),isTouchScr:"ontouchstart"in document.documentElement,dragNode:null,compSign:"comp",embedSign:"embed",namePfx:"TMP_",messages:[],valids:[],augment:augment,tasks:[],swatches:["#ff6b6b","#e83e8c","#f72585","#e64980","#ff922b","#feca57","#51cf66","#94d82d","#20c997","#0ca678","#4cc9f0","#228be6","#4263eb","#364fc7","#6d5dfc","#7209b7","#3a0ca3","#7950f2","#be4bdb","#343a40","#495057","#6c757d","#adb5bd","#e9ecef","#f8f9fa","#ffffff"],colorStor:"CUSTOM_COLOR"},i=["input","file","textarea","range","number","datetime","upload","select","radio","checkbox","radios","checkboxes","editor"],a={name:"zh-CN",support:{content:"由于AXUI使用了<code>:has</code>的css伪类选择器,而您的浏览器相对陈旧,请更新至<code>Chrome105</code>以上内核的浏览器!",cancel:"下次再提醒我",confirm:"我知道了"},privacy:{content:"我们使用Cookie来确保您在我们的网站上获得最佳体验,并为您提供个性化服务。继续浏览即表示您同意我们的Cookie政策。",cancel:"拒绝",confirm:"接受"},ajax:{abort:`<i class="${s.prefix}c-warn">中止了请求!</i>`,timeout:`<i class="${s.prefix}c-error">请求超时了!</i>`,error:`<i class="${s.prefix}c-error">错误状态:{{this.status}}</i>`,submit:{btn:"正在提交",succ:"恭喜,提交成功!",fail:"对不起,提交失败!"}},more:{unfold:"收起",fold:"折叠"},button:{default:"新按钮",confirm:"确定",cancel:"取消",clear:"清除",close:"关闭",reset:"重置",submit:"提交",now:"现在",prev:"上一个",next:"下一个"},placehold:{note:"请写上备注内容!",fileName:"新文件",downloadName:"下载文件"},form:{placeholder:"请输入...",fileLabel:"请选择文件...",fileMulti:"{{this.data}}个文件:",maxLength:"最多可输入{{this.total}}个字符,已输入{{this.value}}个,还可以输入{{this.remaining}}个。",minLength:"至少输入{{this.min}}个字符,已输入{{this.value}}个,还要输入{{this.remaining}}个。",limitLength:"至少输入{{this.min}}个字符,最多可输入{{this.max}}个字符,已输入{{this.value}}个。",maxNumber:"最大取值{{this.max}}。",minNumber:"最小取值{{this.min}}。",limitNumber:"取值范围{{this.min}}~{{this.max}}。",exceed:"已超限。",range:"取值范围{{this.min}}~{{this.max}}。"},color:{label:{h:"色相 (H)",s:"饱和度 (S)",v:"明度 (V)",l:"亮度 (L)",a:"透明度 (A)",hsv:"HSV模式",hsl:"HSL模式"},btn:{random:"随机位置",change:"切换模式",straw:"吸色",restore:"重置",clear:"清空",save:"保存",copy:"复制",confirm:"确定",add:"从拾色器自定义颜色"},message:{preset:"是否存为所有拾色器实例共用的预设色值?",copy:"复制成功!可Ctrl+V粘贴到文档中。"},regular:"常用颜色",theme:"主题颜色",history:"最近使用的颜色",add:{heading:"添加颜色",content:"是否添加<code>{{this.value}}</code>颜色到调色盘?"}},range:{result:"结果:{{this.multiple?this.range[0]+'-'+this.range[1]:this.value}}"},valid:{regLocal:"一-龥",types:{a:"小写字母",A:"大写字母",d:"数字","~":"特殊字符","@":"中文字符"},message:{wrongRule:"校验规则错误,请修正!",wrongFormat:"值格式错误,应该为文本格式!",noValids:"表单没有任何校验字段!"},strFormat:"值格式错误,应该为文本格式!",arrFormat:"参数格式错误,应该为数组格式!",succ:'{{ this.label || "" }}通过校验!',fail:'{{ this.label || "" }}校验失败!',required:"{{ this.label }}是必填项!",email:"{{ this.label }}请填写正确的邮箱!",cellphone:"{{ this.label }}请填写11位手机号!",landline:"{{ this.label }}请填写正确的座机号码!",ip:"{{ this.label }}请填写正确的IP地址!",id:"{{ this.label }}请填写正确的身份证号!",zip:"{{ this.label }}只能填写6位数字邮编!",url:"{{ this.label }}请填写正确的域名!",plate:"{{ this.label }}请填写正确的车牌号!",locale:"{{ this.label }}只能填写中文!",letter:"{{ this.label }}只能填写大小写英文字母!",string:"{{ this.label }}只能填写大小写英文字母和数字!",password:"{{ this.label }}只能填写大小写英文字母、数字以及特殊字符!",ymdhms:"{{ this.label }}只能填写类似2022-11-13 2:56:12的日期格式!",ymd:"{{ this.label }}只能填写类似2022-11-13的日期格式!",hms:"{{ this.label }}只能填写类似2:56:12的日期格式!",ym:"{{ this.label }}只能填写类似2022-11的日期格式!",y:"{{ this.label }}只能填写4位数字年份!",m:"{{ this.label }}只能填写1~12月份!",d:"{{ this.label }}只能填写1~31日!",date:"{{ this.label }}请填写有效的日期!",integer:"{{ this.label }}只能填写非0开头的正整数!",number:"{{ this.label }}只能填写数字,包括正数、负数、整数、小数!","date=":"{{ this.label }}只能是{{ this.data }}!","date>":"{{ this.label }}需超过{{ this.data }}!","date>=":"{{ this.label }}不可早于{{ this.data }}!","date<":"{{ this.label }}不可超过{{ this.data }}!","date<=":"{{ this.label }}不可晚于{{ this.data }}!","date><":"{{ this.label }}需超过{{ this.data[0] }},且不可超过{{ this.data[1] }}!","date><=":"{{ this.label }}需超过{{ this.data[0] }},且不可超过或等于{{ this.data[1] }}!","date>=<":"{{ this.label }}需超过或等于{{ this.data[0] }},且不可超过{{ this.data[1] }}!","date>=<=":"{{ this.label }}不可早于{{ this.data[0] }},且不可晚于{{ this.data[1] }}!","than=":"{{ this.label }}需要等于{{ this.data }}!","than>":"{{ this.label }}需要大于{{ this.data }}!","than>=":"{{ this.label }}需要大于或等于{{ this.data }}!","than<":"{{ this.label }}需要小于{{ this.data }}!","than<=":"{{ this.label }}需要小于或等于{{ this.data }}!","than><":"{{ this.label }}需要大于{{ this.data[0] }},且小于{{ this.data[1] }}!","than><=":"{{ this.label }}需要大于{{ this.data[0] }}个,且小于等于{{ this.data[1] }}!","than>=<":"{{ this.label }}需要大于等于{{ this.data[0] }}个,且小于{{ this.data[1] }}!","than>=<=":"{{ this.label }}需要大于等于{{ this.data[0] }}个,且小于等于{{ this.data[1] }}!","length=":"{{ this.label }}已输入{{ this.value.length }}个字符,只能填写{{ this.data }}个字符!","length>":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于{{ this.data }}个!","length>=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量不可少于{{ this.data }}个!","length<":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需少于{{ this.data }}个!","length<=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量不可多于{{ this.data }}个!","length><":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于{{ this.data[0] }}个,且少于{{ this.data[1] }}个!","length><=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于{{ this.data[0] }}个,且少于或等于{{ this.data[1] }}个!","length>=<":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于或等于{{ this.data[0] }}个,且少于{{ this.data[1] }}个!","length>=<=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量不可少于{{ this.data[0] }}个,且不可多于{{ this.data[1] }}个!","count=":"{{ this.label }}有{{ this.value }}项,必须且只能选择{{ this.data }}项!","count>":"{{ this.label }}有{{ this.value }}项,选择项需要多于{{ this.data }}!","count>=":"{{ this.label }}有{{ this.value }}项,至少选择{{ this.data }}项!","count<":"{{ this.label }}有{{ this.value }}项,选择项需要少于{{ this.data }}!","count<=":"{{ this.label }}有{{ this.value }}项,最多选择{{ this.data }}项!","count><":"{{ this.label }}有{{ this.value }}项,选择项需多于{{ this.data[0] }},且少于{{ this.data[1] }}!","count><=":"{{ this.label }}有{{ this.value }}项,选择项需多于{{ this.data[0] }},且少于或等于{{ this.data[1] }}!","count>=<":"{{ this.label }}有{{ this.value }}项,选择项需多于或等于{{ this.data[0] }},且少于{{ this.data[1] }}!","count>=<=":"{{ this.label }}有{{ this.value }}项,至少选择{{ this.data[0] }}项,且不能多于{{ this.data[1] }}项!",include:'{{ this.label }}的值应该在"{{ this.data }}"之中!',exclude:'{{ this.label }}的值不能在"{{ this.data }}"之中!',same:'{{ this.label }}字段值与"{{ this.data[1] || this.data[0] }}"字段值不一致!',different:'{{ this.label }}字段值不能与"{{ this.data[1] || this.data[0] }}"字段值一致!',strength:"{{ this.label }}的当前强度为{{ this.value}},要求达到{{ this.data }}!",specific:"{{ this.label }}要求{{ for(let k in this.data){/}}{{k+'至少'+this.data[k]+'个'}}{{ (Object.keys(this.data).slice(-1)[0] !== k)? ',':''}}{{}/}}!",combine:"{{ this.label }}要求{{ this.data.types.join('、') }}至少{{ this.data.total }}种!"},status:{warn:"有警告",succ:"完成了",error:"有报错",issue:"有疑问",info:"有消息",confirm:"已确认",cancel:"已取消",forbid:"已禁用"},message:{heading:{warn:"操作警告!",succ:"操作成功!",error:"操作失败!",issue:"操作疑问!",info:"信息提示!"},content:{warn:"警告!运行过程中可能存在故障,请注意排查!",succ:"恭喜!运行顺利或者操作成功!",error:"失败!运行过程中发生了错误或操作失败!",issue:"有疑问!运行过程中遇到一些问题需要解决!",info:"提示!运行中未出现状况,请继续!"}},toast:{content:{warn:"系统异常!",succ:"操作成功!",error:"操作失败!",issue:"操作存疑?",info:"系统提示!"}},viewer:{close:"关闭查看器",play:"已暂停,点击播放",pause:"播放中,点击暂停",fullscrOn:"非全屏,点击展开",fullscrOff:"全屏中,点击退出",rotatel:"逆时针旋转90°",rotater:"顺时针旋转90°",flipv:"垂直翻转",fliph:"水平翻转",download:"下载媒体文件",thumb:"切换缩略图",zoom:"切换缩放模式",zoomin:"放大",zoomout:"缩小",expand:"侧边栏已收起,点击展开",collapse:"侧边栏已展开,点击收起"},tree:{empty:"没有树形数据",label:"新分支",title:{folder:"新增枝干分支",file:"新增叶子分支",edit:"编辑分支",remove:"删除分支",arrow:"点击折叠或展开"},message:{remove:'确定要删除"{{this.label}}"分支么'},paginated:{more:"查看更多",next:"下一页",first:"返回首页",info:'"{{this.label}}"还剩{{this.rest}}条信息',main:"主分支"},result:`<i ${s.alias}="holder">还未选择...</i>`},accordion:{label:"新板块",content:"新内容",extra:"更多内容",title:{add:"新增板块",edit:"编辑板块",remove:"删除板块",arrow:"点击折叠或展开"},message:{remove:'确定要删除"{{this.label}}"板块么'}},tab:{label:"新标签",content:"新内容",title:{add:"新增页签",edit:"编辑页签",close:"删除页签",move:"移动页签",update:"更新页签"},message:{add:'确定要新增"{{this.label}}"页签么',edit:'确定要编辑"{{this.label}}"页签么',close:'确定要删除"{{this.label}}"页签么',move:'确定要移动"{{this.label}}"页签么',update:'确定要更新"{{this.label}}"页签么'}},flat:{label:"新项目"},spy:{isObserved:"媒体文件{{ this.src }}已经处于监听状态,不需要添加监听操作!",isUnobserved:"媒体文件{{ this.src }}还未被监听,不需要取消监听操作!"},tags:{emptyholder:"还没有创建标签!",placeholder:"请输入...",includePart:"包含了重复的标签!",includeFull:"标签完全重复,添加失败!"},retrieval:{status:"共有<u>{{this.value}}</u>个结果符合<s>{{this.keys}}</s>要求!",nullKeys:"没有检索词且没有检索结果!"},drag:{holderDrag:"转移中...",holderDrop:"释放到这里...",holderEmpty:"可拖入这里"},progress:{complete:"已完成!",tips:"当前进度"},infinite:{finish:"没有更多内容了",error:"请求终止,已停止加载",next:'<ax-btn width="5">查看更多</ax-btn>',preload:"等待加载数据",loading:"正在加载数据",loaded:"单页数据加载完成!"},virtualize:{preload:"等待加载数据"},pagination:{first:"首页",last:"尾页",prev:"上一页",next:"下一页",ellipsis:"...",tips:"{{this.current}}/{{this.pages}}",total:"共有{{this.total}}条数据",locate:"跳到",count:"每页",page:"页",unit:"条"},datetime:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],week:["一","二","三","四","五","六","日"],weeks:["周日","周一","周二","周三","周四","周五","周六"],year:{prev:"上一页",next:"下一页",placeholder:"输入年份"},range:{hyphen:"至",checkbox:"选择同一天"},unit:{Y:"年",M:"月",D:"日",W:"周",h:"时",m:"分",s:"秒"},bc:"公元前",daytime:{select:"时间选择",start:"开始时间",end:"结束时间"},toolTip:{restore:"还原初始值",reset:"归零",now:"设为当前时间",close:"关闭时间选择器"},empty:`<i class="${s.prefix}c-caption">还未选择日期!</i>`,message:{requireTwoValue:"区间模式至少需要选择两个日期!",requireYearFormat:"请填入正确的年份格式!",requireOneSelected:"请至少选择一个日期!"},noEvent:`<i class="${s.prefix}c-caption">今天没有需要安排的事项!</i>`},rate:{title:{dft:"暂无评星",clear:"评星归零"},template:{result:"{{this.stars}}星",tooltip:"{{this.stars}}星,总分:{{this.value}}"},star:"星"},editor:{defer:"点击加载内容",placeholder:"请输入...",path:"路径:",chars:"文字:",paras:"段落:",fontsizeDft:"默认字号",alignDft:"默认排列",tagsDft:"特殊标签",tips:{bold:"加粗",italic:"斜体",through:"删除线",underline:"下划线",alignDft:"默认对齐",alignLeft:"左对齐",alignRight:"右对齐",alignCenter:"居中对齐",alignJustify:"两端对齐",indentMore:"增加缩进",indentLess:"减少缩进",sub:"下标",sup:"上标",highlight:"高亮(MARK)",em:"强调(EM)",ruby:"拼音(RUBY)",rt:"拼音(RT)",address:"地址(ADDRESS)",time:"时间(TIME)",blockquote:"段落引用(BLOCKQUOTE)",cite:"行内引用(CITE)",codeInline:"行内代码(CODE)",codeBlock:"代码块(PRE+CODE)",source:"源码模式",heading:"设置标题",hr:"插入水平线(HR)",br:"插入换行符(BR)",p:"插入段落符(P)",listOl:"有序列表(OL+LI)",listUl:"无序列表(UL+LI)",listCheck:"任务列表(CHECKBOX)",paragraph:"插入段落(DIV+BR)",fontSet:"文字设置",fontSize:"字号大小",fontColor:"文字颜色",fontBg:"文字背景色",h1:"一号标题",h2:"二号标题",h3:"三号标题",h4:"四号标题",h5:"五号标题",h6:"六号标题",text:"正文"}},select:{empty:"没有可选择的数据",placeholder:"请选择...",title:{close:"清空"},search:{fail:'没有找到符合"{{this.keys}}"的选项',succ:'找到了{{this.value}}项符合"{{this.keys}}"',start:"还没有输入检索关键字",placeholder:"请输入关键字..."},check:{ed:"未勾选,选择全部",ing:"勾选了部分,选择全部",none:"已勾选全部,取消全部"},stats:"已选择了{{this.value}}/{{this.total}}项"},upload:{paste:{before:"点击这里粘贴上传",ing:"请使用ctrl+v组合键",after:"完成了粘贴!"},tips:{suffix:"支持{{this.value}}格式",size:"单文件子节数不超过{{this.value}}MB",min:"至少上传{{this.value}}个文件",max:"最多上传{{this.value}}个文件",free:"上传文件未做限制"},progress:{passed:"文件合格",notPassed:"文件不合格",rendered:"等待上传",uploading:"上传中",uploaded:"已上传",received:"已接收",getAuth:"获取授权中",authorized:"已授权",unauthorized:"未获得授权",failed:"上传失败"},summary:"提交了{{this.total}}个文件,成功上传了{{this.count}}个,共{{this.size}}",message:{single:{passed:"通过校验!",max:"文件数量太多,请删除!",size:"文件体积太大,请删除!",suffix:"文件格式错误,请删除!",success:"上传成功!",failed:"提交地址可能错误,请删除!"},global:{passed:"所有文件通过校验!",min:"请至少上传{{this.value}}个文件!",max:"最多只能上传{{this.value}}个文件,可先删除再添加!"}},button:{choose:"选择文件",upload:"批量上传",clear:"批量删除",gallery:"点击或拖拽上传",picture:"选择文件"},thead:["图示","文件名","文件体积","上传进度","实时消息","上传状态","操作"]},confirm:{heading:""},twilight:{day:"白天",night:"黑夜"}},getDataType=t=>{let e,s=Object.prototype.toString.call(t).slice(8,-1);return e="Function"===s&&/^\s*class\s+/.test(t.toString())?"Class":"Object"===s&&Object.getPrototypeOf(t)!==Object.prototype?"Instance":s,e},isEmpty=t=>{let e,s=getDataType(t);return e=!t||("Object"===s?0===Object.keys(t).length:"Array"===s?""===t.join(""):"Function"===s?"{}"===t.toString().replace(/\s+/g,"").match(/{.*}/g)[0]:"Symbol"===s&&"()"===t.toString().replace(/\s+/g,"").match(/\(.*\)/g)[0]),e},deepClone=t=>{let e,s=getDataType(t);if("Object"===s){let s={},i=Object.getOwnPropertySymbols(t);for(let e in t)s[e]=deepClone(t[e]);if(i.length>0)for(let e of i)s[e]=deepClone(t[e]);e=s}else e="Array"===s?t.map((t=>deepClone(t))):"Date"===s?new Date(t):t;return e},deepMerge=(t,e,s)=>{let i=getDataType(t),a=getDataType(e),l=Object.assign({arrAppend:!1,propAppend:!0,targetClone:!1,override:"partial"},s),n=l.targetClone?deepClone(t):t;if("Object"!==i||"Object"!==a)return n;for(let t in e)if(e.hasOwnProperty(t)&&n.hasOwnProperty(t)){let s=getDataType(n[t]),i=getDataType(e[t]);s!==i?"partial"===l.override&&n.hasOwnProperty(t)&&n[t]?.hasOwnProperty("enable")&&"boolean"==typeof e[t]?n[t]?.hasOwnProperty("enable")&&"boolean"==typeof e[t]?n[t].enable=e[t]:e[t]?.hasOwnProperty("enable")&&"boolean"==typeof n[t]?n=Object.assign({enable:n[t]},e[t]):n[t]=e[t]:n[t]=e[t]:"Object"===i?n[t]=deepMerge(n[t],e[t],l):"Array"===i&&l.arrAppend?n[t].push(...e[t]):n[t]=e[t]}else e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&l.propAppend&&(n[t]=e[t]);let r=Object.getOwnPropertySymbols(e);if(r.length>0)for(let t of r)n[t]=e[t];return n},l={initial:!0,support:!1,privacy:!1,lang:a,attrs:{ajaxSpin:"spinning",ajaxState:"ajax"},debounce:200,throttle:500,rootStart:-1,idStart:0,floorStart:0,pathHyphen:"~",rangeHyphen:"~",labelHyphen:"/",splitHyphen:",",wordHyphen:" ",actClass:`${s.prefix}opened`,reqProp:"REQRETRY",parser:"new Function",warn:{init:"The initialization process of the instance has been stopped. You will need to manually initialize it using the init() method later!",emptyCont:"Data was not obtained, but execution was not halted!",parse:"Getting data from HTML resulted in an error, an empty array was returned, but execution was not interrupted!"},error:{},message:{},valid:{regChars:"~!@#$%^&*",lengthStr:6},popup:{},alert:{},more:{},menu:{},tree:{},drawer:{}};s.config=l,s.install=(t,e)=>{!isEmpty(e)&&deepMerge(l,e),t.config.globalProperties.$ax=s};const requireTypes=(t,e,s)=>{let i=getDataType(t).toLowerCase(),a="string"==typeof e?[e]:e;if(i.includes("html")&&(i="element"),a=a.map((t=>t.toLowerCase())),s)try{if(!a.includes(i))throw new Error(`Wrong data type,Require types: "${""+a}"!`)}catch(t){s(t)}else if(!a.includes(i))throw new Error(`Wrong data type,Require types: "${""+a}"!`)},renderTpl=(t,e)=>{if(requireTypes(t,"string"),requireTypes(e,["array","object"]),!t||0===Object.keys(e).length)return"";let s,i=new RegExp("\\{\\{([\\s\\S]+?)?\\}\\}","g"),a='"use strict";let str=[];\n',l=0,n="",add=(t,e)=>(a+=e?t.endsWith("/")?t.replace("=>","=>").slice(0,-1)+"\n":"str.push("+t+");\n":""!==t?'str.push("'+t.replace(/"/g,'\\"')+'");\n':"",add);for(;s=i.exec(t);)add(t.slice(l,s.index))(s[1],!0),l=s.index+s[0].length;add(t.slice(l)),a+="return str.join('');";try{n=new Function(a.replace(/[\r\t\n]/g,"")).apply(e)}catch(t){}return n},getComputedVar=t=>getComputedStyle(document.documentElement).getPropertyValue(t).trim(),getScreenSize=()=>getComputedVar(`--${s.prefix}screen`),startUpper=t=>(t=t.trim()).slice(0,1).toUpperCase()+t.slice(1),sliceStrEnd=({str:t="",key:e="#",type:s="afterend",contain:i=!0})=>{t=t.toString();let a="",l=0,n=(e=e.toString()).length,r=t.length,o=0;return t&&e?((t=t.trim()).includes(e)&&("beforebegin"===s?(l=t.indexOf(e),i&&(l+=n),r=l):"afterbegin"===s?(l=t.indexOf(e),!i&&(l+=n),o=l):"beforeend"===s?(l=t.lastIndexOf(e),i&&(l+=n),r=l):"afterend"===s&&(l=t.lastIndexOf(e),!i&&(l+=n),o=l),a=t.substring(o,r)),a):a},delay=function({duration:t=2e3,todo:e,doing:s,done:i,frame:a=0}){return t<0&&Promise.reject(new Error("Invalid duration")),e&&e(a),new Promise(((e,l)=>{try{t||(i&&i(a),e(a));let l=Date.now()+t,listen=()=>{Date.now()>=l?(cancelAnimationFrame(a),i&&i(a),e(a),a=0):(a=requestAnimationFrame(listen),s&&s(a))};listen()}catch(t){l(t)}}))},getPlaces=t=>t.toString().split(".")[1]?.length||0,toNumber=(t,e)=>{let s=0,i=Number(t),a=Object.assign({places:10,mode:"round",zero:!1,epsilon:!0},e);if(!t||!i)return 0;if(a.places<0)return i;{let t=i+(a.epsilon?Number.EPSILON:0),e=Number(`1${"0".repeat(a.places)}`),l=t*e;if(s="floor"===a.mode?Math.floor(l)/e:"ceil"===a.mode?Math.ceil(l)/e:Math.round(l)/e,a.zero){let t=getPlaces(s);a.places>t&&(s=s+(t?"":".")+"0".repeat(a.places-t))}return s}},toPixel=(t,e)=>{let i=0;if(!t)return i;if(e=e||parseInt(s.fsRoot)||10,"string"==typeof t)if((t=t.trim()).endsWith("rem")||t.endsWith("REM"))i=~~(toNumber(t.replace("rem","").replace("REM",""))*e);else if(t.endsWith("px")||t.endsWith("PX"))i=~~toNumber(t.replace("px","").replace("PX",""));else if(t.startsWith("var(")){let e=s.getCssVar(t);i=toPixel(e)}else i=~~t;else"number"==typeof t&&(i=~~t);return i},preventDft=(t,e=!1)=>{t.cancelable&&t.preventDefault(),e&&t.stopPropagation()},n=s.isTouchScr?["touchstart","touchmove","touchend","touchcancel"]:["mousedown","mousemove","mouseup","mouseleave"],r={font:{succ:`<i class="${s.prefix}icon-check-o"></i>`,error:`<i class="${s.prefix}icon-close-o"></i>`,warn:`<i class="${s.prefix}icon-warn-o"></i>`,info:`<i class="${s.prefix}icon-info-o"></i>`,issue:`<i class="${s.prefix}icon-issue-o"></i>`,"succ-t":`<i class="${s.prefix}icon-check-o-t"></i>`,"error-t":`<i class="${s.prefix}icon-close-o-t"></i>`,"warn-t":`<i class="${s.prefix}icon-warn-o-t"></i>`,"info-t":`<i class="${s.prefix}icon-info-o-t"></i>`,"issue-t":`<i class="${s.prefix}icon-issue-o-t"></i>`,"succ-f":`<i class="${s.prefix}icon-check-o-f"></i>`,"error-f":`<i class="${s.prefix}icon-close-o-f"></i>`,"warn-f":`<i class="${s.prefix}icon-warn-o-f"></i>`,"info-f":`<i class="${s.prefix}icon-info-o-f"></i>`,"issue-f":`<i class="${s.prefix}icon-issue-o-f"></i>`},svg:{succ:`<svg class="${s.prefix}svg-succ" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${s.prefix}line ${s.prefix}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}in-1" d="M26.316,42.859L37.9984,54.5414L60.3826,32.1572"></path></svg>`,error:`<svg class="${s.prefix}svg-error" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${s.prefix}line ${s.prefix}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}in-1" d="M28.774,57.9246L57.9247,28.7739"></path><path class="${s.prefix}line ${s.prefix}in-2" d="M57.9246,57.9246L28.7739,28.7739"></path></svg>`,warn:`<svg class="${s.prefix}svg-warn" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${s.prefix}line ${s.prefix}bg" d="M43.4611 7.24c2.8081,0.0924 4.39,1.7 5.3045,3.1159l17.4543 29.9414 17.3445 29.7538c0.5448,1.0193 1.596,4.0544 0.1109,6.4168 -1.4849,2.3626 -3.6815,2.9155 -5.3768,2.992l-34.9082 0.0002 -34.6892 -0.0002c-1.1636,-0.0421 -4.3433,-0.6583 -5.6666,-3.1131 -1.3232,-2.4549 -0.7085,-4.6157 0.0723,-6.1078l17.454 -29.9417 17.3449 -29.7537c0.6185,-0.977 2.7471,-3.396 5.5554,-3.3036z"></path><path class="${s.prefix}line ${s.prefix}out" d="M43.4611 7.24c2.8081,0.0924 4.39,1.7 5.3045,3.1159l17.4543 29.9414 17.3445 29.7538c0.5448,1.0193 1.596,4.0544 0.1109,6.4168 -1.4849,2.3626 -3.6815,2.9155 -5.3768,2.992l-34.9082 0.0002 -34.6892 -0.0002c-1.1636,-0.0421 -4.3433,-0.6583 -5.6666,-3.1131 -1.3232,-2.4549 -0.7085,-4.6157 0.0723,-6.1078l17.454 -29.9417 17.3449 -29.7537c0.6185,-0.977 2.7471,-3.396 5.5554,-3.3036z"></path><path class="${s.prefix}line ${s.prefix}in-1" d="M43.3493,27.8713L43.3493,57.2858"></path><circle class="${s.prefix}circle ${s.prefix}in-2" cx="43.3492" cy="64.3337" r="2.1166"></circle></svg>`,info:`<svg class="${s.prefix}svg-info" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${s.prefix}line ${s.prefix}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}in-1" d="M43.3493,65.0602L43.3493,30.9723"></path><circle class="${s.prefix}circle ${s.prefix}in-2" cx="43.3492" cy="23.5856" r="2.1166"></circle></svg>`,issue:`<svg class="${s.prefix}svg-issue" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${s.prefix}line ${s.prefix}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${s.prefix}line ${s.prefix}in-1" d="M32.3757 35.7255c-0.2203,-11.823 12.5789,-14.1087 18.4056,-9.4189 5.4663,4.3995 4.7426,12.804 -3.1088,17.9938 -3.0015,1.9839 -3.0003,3.8403 -3.0003,10.1707"></path><circle class="${s.prefix}circle ${s.prefix}in-2" cx="44.6612" cy="60.5502" r="2.1166"></circle></svg>`}},o={x:{axis:"x",position:"left",start:"insetInlineStart",startAlt:"inset-inline-start",overflow:"overflowX",inner:"clientWidth",outer:"offsetWidth",scroll:"scrollLeft",client:"clientX",size:"width",index:4,offset:"offsetLeft",gap:"marginInlineStart"},y:{axis:"y",position:"top",start:"insetBlockStart",startAlt:"inset-block-start",overflow:"overflowY",inner:"clientHeight",outer:"offsetHeight",scroll:"scrollTop",client:"clientY",size:"height",index:5,offset:"offsetTop",gap:"marginBlockStart"}},getEl=(t,e)=>{let s=getDataType(t),i=getDataType(e).includes("HTML")?e:document.querySelector(e),a=i&&i instanceof HTMLTemplateElement?i.content:i,l=null;if(t)if(s.includes("HTML"))l=t;else if("String"===s)try{l=(a||document).querySelector(t.trim())}catch{l=null}return l},h={data:[],destroyFn:t=>{if(!t)return!1;t.ins.hasOwnProperty("destroyed")&&t.ins.destroyed||!t.ins.__proto__.destroy||(t.ins.destroy(),t.destTime=Date.now())},initFn:t=>{if(!t)return!1;t.ins.hasOwnProperty("destroyed")&&!t.ins.destroyed||!t.ins.__proto__.init||(t.ins.init(),t.initTime=Date.now())},push:function(t,e="",s=""){if(!t)return!1;let i={name:e,ins:t,type:s,pushTime:Date.now()};return this.data.some((e=>e.ins===t))||this.data.push(i),this},find:function(t,e="",s=!1){if(!t)return null;let i;return i=this.data.find((i=>{let a=!e||i.type===e;return i.ins.hasOwnProperty("destroyed")?i.name===t&&i.ins.destroyed===s&&a:i.name===t&&a})),i?i.ins:null},findAll:function(t="",e=!1){let s=[];return s=t?this.data.filter((s=>s.ins.hasOwnProperty("destroyed")?s.type===t&&s.ins.destroyed===e:s.type===t)):this.data.filter((t=>t.ins.destroyed===e)),s.length>0?s.map((t=>t.ins)):[]},destroy:function(t,e){if(!t)return!1;let s=e?this.data.find((s=>s.name===t&&s.type===e)):this.data.find((e=>e.name===t));return s&&this.destroyFn(s),this},destroyAll:function(t){return(t?this.data.filter((e=>e.type===t)):this.data).forEach((t=>{this.destroyFn(t)})),this},clear:function(){return this.data.forEach((t=>{this.destroyFn(t)})),this.data.length=0,this},init:function(t,e){if(!t)return!1;let s=e?this.data.find((s=>s.name===t&&s.type===e)):this.data.find((e=>e.name===t));return s&&this.initFn(s),this},initAll:function(t){return(t?this.data.filter((e=>e.type===t)):this.data).forEach((t=>{this.initFn(t)})),this}},getEls=(t,e)=>{let s=getDataType(t),i=getEl(e),a=i&&i instanceof HTMLTemplateElement?i.content:i||document,l=[];return isEmpty(t)?l:(s.includes("HTML")?l.push(t):"String"===s?l=(t=t.trim()).split(",").map((t=>[...a.querySelectorAll(t)])).flat():"Array"===s&&(l=t.map((t=>getEl(t,i)))),l.filter(Boolean))},createEl=(t,e,s)=>{let i=(t=t||"div").toUpperCase().trim(),a=document.createElement(i),l=getDataType(e);if(e&&"Object"===l)for(let t in e)e.hasOwnProperty(t)&&a.setAttribute(t,"string"==typeof e[t]?e[t]:JSON.stringify(e[t]));return((t,e)=>{if(""===e||null==e)return!1;let s=getDataType(e);if("TEMPLATE"===i)t.innerHTML=e.toString();else if("Array"===s&&e.length>0)for(let s of e){if(getDataType(s).includes("HTML"))t.appendChild(s);else{let e=createEl(s.name,s.attrs,s.content);e&&t.appendChild(e)}}else if(s.includes("HTML"))t.appendChild(e);else if("String"===s&&e.trim().startsWith("#")&&e.trim().length>1){let s=getEl(e);if(!s)return;"TEMPLATE"===s.nodeName?t.appendChild(s.content.cloneNode(!0)):t.insertAdjacentHTML("beforeEnd",s.innerHTML)}else t.insertAdjacentHTML("beforeEnd",e)})(a,s),a},parseStr=({content:t="",type:e="object",method:s=l.parser,catchable:i=!1,error:a})=>{let n="object"===e?{}:"array"===e?[]:null;if(!t)return n;let r=t.trim();try{n="function"==typeof s?s(r):"JSON.parse"===s?JSON.parse(r):new Function(`"use strict"; return ${r}`)()}catch(t){if(a&&a(t),i)throw t}return n},strToJson=(t,e="object")=>{let s="array"===e?[]:{};if("string"!=typeof t)return s;if(!(t=t.trim()))return s;t=t.startsWith("[")&&t.endsWith("]")||t.startsWith("{")&&t.endsWith("}")?t:`{${t}}`;try{return parseStr({content:t,type:e,catchable:!0})}catch{return s}},attrToJson=(t,e)=>{requireTypes(e,"string");let s=getEl(t),i=s.getAttribute(e),a={};return s&&e&&i&&(a=strToJson(i)),a},extend=({target:t={},source:e={},host:s=null,attr:i=""})=>{let a=getDataType(t),l=getEl(s);return"Object"!==a||(e&&deepMerge(t,e),l&&i&&deepMerge(t,attrToJson(l,i))),t},trim=(t,e)=>(requireTypes(t,"string"),"start"===e?t.trimStart():"end"===e?t.trimEnd():"both"===e?t.trim():"global"===e?t.replace(/[\s\r\n]+/g,""):t.trim().replace(/[\s\r\n]+/g," ")),allToEls=(t,e)=>{if(isEmpty(t))return[];let s=[],i=getDataType(t);if(i.includes("HTML"))s.push(t);else if("String"===i){let i=trim(t),a=i.includes(l.splitHyphen)?l.splitHyphen:l.wordHyphen;i.split(a).forEach((t=>{let i=getEl(t,e);i&&s.push(i)}))}else"Array"===i?t.forEach((t=>{let i=getEl(t,e);i&&s.push(i)})):"NodeList"===i&&(s=[...t]);return s},ajax=t=>{if(isEmpty(t))throw new Error("There is no options!");let e={target:"",url:"",type:"post",async:!0,data:null,holdTime:0,stopTime:36e5,contType:"",headers:{},respType:"",catchable:!1,spinStr:"<ax-spin></ax-spin>",spinSel:"",xhrName:"",repeat:{index:0,max:0,keyword:""},xhrFields:{},abort:t=>{},timeout:t=>{},opened:t=>{},before:t=>{},downloading:t=>{},uploading:t=>{},complete:t=>{},success:t=>{},error:t=>{},cb:t=>{}};extend({target:e,source:t}),!e.type&&(e.type="post");let i=createEl("span",{[s.alias]:"message"}),a=getEl(e.target);a&&(a.innerHTML="",a.appendChild(i));let n,r=allToEls(e.spinSel),o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if(!isEmpty(e.data)){let t=getDataType(e.data);"FormData"===t?n=e.data:"Object"===t?e.contType?.includes("json")||e.headers["Content-Type"]?.includes("json")?n=JSON.stringify(e.data):(n=new URLSearchParams(e.data).toString(),e.contType="application/x-www-form-urlencoded"):(e.data=e.data.trim(),n=e.data.startsWith("&")||e.data.startsWith("?")?e.data.slice(1):e.data,e.contType="application/x-www-form-urlencoded")}if(e.contType&&(e.headers["Content-Type"]=e.contType,!e.contType.includes("urlencoded")&&"get"===e.type.toLowerCase()))throw new Error("Please request data with post!");o.timeout=e.stopTime,o.responseType=e.respType;let h,p,d,c={target:a,label:i,xhr:o,spins:r},abortFun=()=>{h&&o.removeEventListener("timeout",h),o.abort(),a&&a.setAttribute(l.attrs.ajaxState,"abort"),isEmpty(e.abort)?a&&(i.innerHTML=l.lang.ajax.abort):e.abort(Object.assign({status:o.status,content:o.response},c))};return new Promise(((t,u)=>{let progress=(t,s)=>{let i=t.loaded,a=t.total,l=0,n=0,r="0%",h=new Date(t.timeStamp).getTime();if(t.lengthComputable){l=i/a,n=Math.round(100*l),r=n+"%";let t=Object.assign({result:r,percent:n,current:i,total:a,ratio:l,time:h,status:o.status,abort:abortFun},c);s&&s(t),n>=100&&e.complete&&e.complete(t)}};o.upload.onprogress=t=>{progress(t,(t=>{!isEmpty(e.uploading)&&e.uploading(t)}))},o.onprogress=t=>{progress(t,(t=>{!isEmpty(e.downloading)&&e.downloading(t)}))},h=()=>{let t=Object.assign({status:o.status,content:o.response},c);a&&a.setAttribute(l.attrs.ajaxState,"timeout"),isEmpty(e.timeout)?a&&(i.innerHTML=l.lang.ajax.timeout):e.timeout(t),e.catchable&&u(t),e.cb&&e.cb(t)},p=t=>{var s;a&&a.setAttribute(l.attrs.ajaxState,"error"),isEmpty(e.error)?(s=t,a&&(i.innerHTML=renderTpl(l.lang.ajax.error,{status:s.status}))):e.error(t),e.catchable&&u(t),e.cb&&e.cb(t)},d=i=>{if(e.repeat.max&&e.repeat.keyword&&"string"==typeof i.content){if(s.ajaxStor[e.repeat.index]<e.repeat.max&&i.content.includes(e.repeat.keyword))return isNull(s.ajaxStor[e.repeat.index])?(s.ajaxStor.push(0),e.repeat.index=s.ajaxStor.length-1):s.ajaxStor[e.repeat.index]++,void ajax(e);s.ajaxStor[e.repeat.index]=0}if(r.length>0)for(let t of r)t.removeAttribute(l.attrs.ajaxSpin);var n;a&&a.setAttribute(l.attrs.ajaxState,"success"),isEmpty(e.success)?(n=i,a&&(a.innerHTML=n.content)):e.success(i),t(i),e.cb&&e.cb(i)},o.addEventListener("timeout",h),o.onreadystatechange=function(){if(o.readyState<4){let s=Object.assign({status:o.status,content:e.spinStr,abort:abortFun},c);if(1===o.readyState&&(e.xhrName&&(this[e.xhrName]=o),!isEmpty(e.opened)&&e.opened(s)),r.length>0)for(let t of r)t.toggleAttribute(l.attrs.ajaxSpin,!0);a&&a.setAttribute(l.attrs.ajaxState,"before"),isEmpty(e.before)?(t=s,a&&(i.innerHTML=t.content)):e.before(s)}else{let t=Object.assign({status:o.status},c);if(o.status>=200&&o.status<300||304===o.status){if(e.respType&&"text"!==o.responseType)t.content=o.response;else{let s=o.responseText.trim(),i="";if(s.startsWith("[")&&s.endsWith("]")||s.startsWith("{")&&s.endsWith("}"))try{i=JSON.parse(s)}catch{i=o.responseText}else if(s.endsWith("</html>")){let t=/(<head\b[^<]*(?:(?!<\/head>)<[^<]*)*<\/head>)|(<\/?html.*?>)|(<\!DOCTYPE.*?html.*?>)|(<\/?body.*?>)/gi,a=sliceStrEnd({str:e.url}),l="string"==typeof e.data?e.data:a;if(l){let e=createEl("div","",s),a=getEl(l,e);i=a?a.innerHTML:s.replace(t,"").trim()}else i=s.replace(t,"").trim()}else i=o.responseText;t.content=i}e.holdTime?delay({duration:e.holdTime,done:()=>{d(t)}}):d(t)}else t.content=o.response,e.holdTime?delay({duration:e.holdTime,done:()=>{p(t)}}):p(t)}var t};let g=[],m=null;"get"===e.type.toLowerCase()?g=["get",e.url+"?now="+Date.now()+"&"+n,e.async]:"post"===e.type.toLowerCase()&&(g=["post",e.url,e.async],m=n);for(let t in e.xhrFields)e.xhrFields.hasOwnProperty(t)&&(o[t]=e.xhrFields[t]);o.open(...g);for(let t in e.headers)e.headers.hasOwnProperty(t)&&o.setRequestHeader(t,e.headers[t]);o.send(m)}))},valToArr=(t,e,s=!0)=>{let i=getDataType(t),a=[];return[void 0,null,"undefined","null",""].includes(t)?a:("Array"===i?a=t.filter((t=>!isNull(t))):"String"===i?(a=t.trim().split(e||l.splitHyphen),a=a.filter((t=>""!==(t=t.trim())&&!isNull(t))),s&&(a=a.map((t=>isNaN(+t)?t:+t)))):a.push(t),[...new Set(a)])},getValsFromAttrs=t=>{let e=getEl(t),s={};if(e){s.label=e.textContent.trim(),[...e.attributes].forEach((t=>{s[t.name]=!!["selected","disabled","readonly","active","checked","expanded","draggable"].includes(t.name)||t.value.trim()})),!s.hasOwnProperty("value")&&(s.value=s.label),s.value&&!s.label&&(s.label=s.value)}return s},select2Tree=t=>{let e=getEl(t),s=[];if(!e)return s;let getJson=t=>{let e={node:t,...getValsFromAttrs(t)};return"OPTGROUP"==t.nodeName&&(e.children=[],[...t.children].forEach((t=>{e.children.push(getJson(t))}))),e};return s=(()=>{let t=[];return[...e.children].forEach((e=>{t.push(getJson(e))})),t})(),s},ul2Tree=(t,e="tree")=>{let i=getEl(t),a=[];if(!i)return a;let getJson=t=>{let i={node:t.firstElementChild},a=i.node.querySelector(`:scope> [${s.alias}="label"]`),l=i.node.querySelector(`:scope> [${s.alias}="badge"]`)||i.node.querySelector(":scope> AX-BADGE"),n=i.node.querySelector(`:scope> [${s.alias}="tips"]`),r=i.node.querySelector(`:scope> [${s.alias}="icon"]`),o=i.node.querySelector(`:scope> [${s.alias}="disk"]`),h=i.node.querySelector(`:scope> [${s.alias}="cube"]`),p=i.node.querySelector(`:scope> [${s.alias}="custom"]`),d=t.querySelector(`:scope> .${s.prefix}${e}-brief`),c=t.querySelector(`:scope> .${s.prefix}${e}-cont`),u=t.querySelector(`:scope> .${s.prefix}${e}-extra`);i.node.classList.contains(`${s.prefix}${e}-head`)&&(i.headEl=i.node),a&&(i.labelEl=a),l&&(i.badgeEl=l),n&&(i.tipsEl=n),p&&(i.customEl=p),r&&(i.iconEl=r),o&&(i.diskEl=o),h&&(i.cubeEl=h),d&&(i.briefEl=d),c&&(i.contEl=c),u&&(i.extraEl=u),Object.assign(i,{...getValsFromAttrs(i.wrapEl),...getValsFromAttrs(i.node),...getValsFromAttrs(i.labelEl)}),i.headEl&&!i.labelEl&&(i.headEl.innerHTML="");let g=t.querySelector(":scope> ul,:scope> ol");return g&&(i.children=[],[...g.children].forEach((t=>{i.children.push(getJson(t))}))),i};return a=(()=>{let t=[];return[...i.children].forEach((e=>{t.push(getJson(e))})),t})(),a},getContent=async function(t){let e,a=getDataType(t.content),getListArr=e=>{let s,i,a=getEl(e,t.parent)||createEl("div",{},e),l=a.nodeName;if(a&&(s=["SELECT","DATALIST","UL","OL"].includes(l)?a:"TEMPLATE"===l?a.content.cloneNode(!0).querySelector("ul,ol,select,datalist"):a.querySelector("ul,ol,select,datalist")),s){let t=s.nodeName;i=["SELECT","DATALIST"].includes(t)?select2Tree(s):["UL","OL"].includes(t)?ul2Tree(s):[]}else i=[];return i},getIframe=e=>{let i={src:e},a=createEl("iframe",Object.assign(i,t.contData)),l=createEl("div",{[s.alias]:"media"},a);return createEl("div",{class:`${s.prefix}box-iframe`},l)},getImage=e=>{let i={src:e},a=createEl("img",Object.assign(i,t.contData)),l=createEl("div",{[s.alias]:"media"},a);return createEl("div",{class:`${s.prefix}box-image`},l)},getVideo=e=>{let i={src:e,controls:"controls"},a=createEl("video",Object.assign(i,t.contData)),l=createEl("div",{[s.alias]:"media"},a);return createEl("div",{class:`${s.prefix}box-video`},l)},getAudio=e=>{let i={src:e,controls:"controls"},a=createEl("audio",Object.assign(i,t.contData)),l=createEl("div",{[s.alias]:"media"},a);return createEl("div",{class:`${s.prefix}box-audio`},l)},getMedias=e=>{let s={iframe:getIframe,audio:getAudio,video:getVideo,image:getImage},i=valToArr(t.content,t.hyphen||l.splitHyphen).map((t=>t.trim())),a=[];for(let t of i)a.push(s[e](t));return a},getAsync=async e=>{let s,i=Object.assign({url:e,data:t.contData,success:t=>{s=t.content},cb:e=>{t.request&&t.request(e)}},t.ajax);return await ajax.call(this,i),s};if("Number"===a)e=t.content+"";else if("String"===a)if(t.content=t.content.trim(),"text"===t.contType)e=t.content;else if("html"===t.contType)e=getEl(t.content,t.parent)?getEl(t.content,t.parent).innerHTML:"";else if("node"===t.contType)e=getEl(t.content,t.parent);else if("list"===t.contType)e=getListArr(t.content);else if("form"===t.contType){let s=getEl(t.content,t.parent),i="TEMPLATE"===s?.nodeName?s.content.cloneNode(!0):s;e=i?.querySelector("form")||""}else if("iframe"===t.contType)e=getIframe(t.content);else if("iframes"===t.contType)e=getMedias("iframe");else if("image"===t.contType)e=getImage(t.content);else if("images"===t.contType)e=getMedias("image");else if("video"===t.contType)e=getVideo(t.content);else if("videos"===t.contType)e=getMedias("video");else if("audio"===t.contType)e=getAudio(t.content);else if("audios"===t.contType)e=getMedias("audio");else if("async"===t.contType)await getAsync(t.content).then((t=>{e=t}));else if("asyncs"===t.contType)await(async()=>{let e=valToArr(t.content,t.hyphen||l.splitHyphen),s=[];for(let t of e)await getAsync(t).then((t=>{s.push(t)}));return s})().then((t=>{e=t}));else if(i.includes(t.contType)){let i="select"===t.contType?{popup:{multiple:!0}}:"datetime"===t.contType?{feature:"flat",full:!0}:"upload"===t.contType?{feature:"gallery"}:["radios","checkboxes","checkbox"].includes(t.contType)?{type:"text"}:{full:!0},a={[["checkboxes","radios","select"].includes(t.contType)?"content":["checkbox","radio"].includes(t.contType)?"label":"upload"===t.contType?"url":"file"===t.contType?"placeholder":"value"]:t.content,...i,...Object.assign({name:s.namePfx+Date.now()},t.contData)};e=createEl(`ax-${t.contType}`,a)}else e=t.content;else"Promise"===a?await t.content.then((t=>{e=t})):"AsyncFunction"===a?await t.content.call(this).then((t=>{e=t})):"Function"===a?e=t.content.call(this):"Object"===a||"Array"===a?"Object"===a&&t.content[l.reqProp]?await getContent(t.content).then((t=>{e=t})):e=deepClone(t.content):e=a.includes("HTML")&&"list"===t.contType?getListArr(t.content):t.content;return t.cb&&t.cb.call(this,e),e},style=(t,e)=>{let s=getEl(t);return s?document.defaultView.getComputedStyle(s,e):{}},getClasses=t=>{let e,s=[];return"Array"===getDataType(t)?s=t.filter((t=>t&&"string"==typeof t)):(e=(t=trim(t)).includes(l.splitHyphen)?l.splitHyphen:l.wordHyphen,s=t.split(e)),s.map((t=>trim(t,"global"))).filter(Boolean)},classes=t=>{let e=getEl(t);return{get:()=>e?getClasses(e.getAttrubute("class")):[],add:function(t,s){let i=getClasses(t);return e&&0!==i.length?(i.forEach((t=>{let i;s?(i=s(t),!0===i?e.classList.add(t):"string"==typeof i&&i&&e.classList.add(i)):e.classList.add(t)})),this):this},remove:function(t,s){let i=getClasses(t);return e&&0!==i.length?(i.forEach((t=>{let i;s?(i=s(t),!0===i?e.classList.remove(t):"string"==typeof i&&i&&e.classList.remove(i)):e.classList.remove(t)})),this):this},replace:function(t,s){return e&&t?(e&&s&&t&&(e.classList.remove(t),e.classList.add(s)),this):this},has:function(t){if(!e||isEmpty(t))return this;let s=getClasses(t);for(let t of s)if(!e.classList.contains(t))return!1;return!0}}},elState=t=>{let e=getEl(t),s=!!e;if(e){if(!e.isConnected)return{isExist:s,isVirtual:!0,isHidden:!0,isVisible:!1,isCalc:!1,isUncalc:!0};if("none"===e.style.display)return{isExist:s,isVirtual:!1,isHidden:!0,isVisible:!1,isCalc:!1,isUncalc:!0};let t=getComputedStyle(e),i=!t.display,a="none"===t.display||"hidden"===t.visibility,l=!(!t.display||"none"===t.display);return{isExist:s,isVirtual:i,isHidden:a,isVisible:!(!l||"visible"!==t.visibility),isCalc:l,isUncalc:i||a}}return{isExist:s,isCalc:!1,isUncalc:!0}},p=[{attr:"ins-name",prop:"insName",value:""},{attr:"stor-name",prop:"storName",value:""},{attr:"stor-keys",prop:"storKeys",value:[]},{attr:"breakpoints",prop:"breakpoints",value:{}},{attr:"rtl",prop:"rtl",value:!1},{attr:"lang",prop:"lang",value:{}},{attr:"b4-init",prop:"b4Init",value:null},{attr:"on-constructed",prop:"onConstructed",value:null},{attr:"on-initiate",prop:"onInitiate",value:null},{attr:"on-initiated",prop:"onInitiated",value:null},{attr:"on-destroyed",prop:"onDestroyed",value:null},{attr:"on-error",prop:"onError",value:null},{attr:"on-reset",prop:"onReset",value:null},{attr:"on-updated",prop:"onUpdated",value:null},{attr:"on-saved",prop:"onSaved",value:null},{attr:"on-clearedcache",prop:"onClearedCache",value:null},{attr:"on-updatedcache",prop:"onUpdatedCache",value:null}];const d=[{attr:"heading",prop:"heading",value:""},{attr:"divider",prop:"divider",value:!1},{attr:"duration",prop:"duration",value:0},{attr:"auto-dur",prop:"autoDur",value:!1},{attr:"asleep",prop:"asleep",value:!1},{attr:"dead-show",prop:"deadShow",value:!1},{attr:"keep-show",prop:"keepShow",value:!1},{attr:"classes",prop:"classes",value:""},{attr:"padding",prop:"padding",value:{enable:!0,body:!0,foot:!0}},{attr:"content",prop:"content",value:""},{attr:"cont-type",prop:"contType",value:"text"},{attr:"cont-data",prop:"contData",value:{}},{attr:"ajax",prop:"ajax",value:{}},{attr:"act-class",prop:"actClass",value:l.actClass},{attr:"tpl-str",prop:"tplStr",value:""},{attr:"tpl-eng",prop:"tplEng",value:null},{attr:"z-index",prop:"zIndex",value:0},{attr:"dedicated",prop:"dedicated",value:!1},{attr:"can-click",prop:"canClick",value:null},{attr:"media",prop:"media",value:{title:"",brief:""}},{attr:"auto-fill",prop:"autoFill",value:{enable:!1,inputSel:"",childSel:"",detectable:!1,attr:""}},{attr:"bullet",prop:"bullet",value:{enable:!1,type:"custom",parentNode:"ul",childNode:"li",unpadded:!1,hoverable:!1,divisible:!1,multiline:!1,cols:0,lines:"",action:null}},{attr:"tools",prop:"tools",value:{enable:!0,placement:"inside",children:["close"]}},{attr:"footer",prop:"footer",value:{enable:!0,layout:"plain",note:!1,divider:!1,padding:!1,children:["cancel","confirm"]}},{attr:"b4-show",prop:"b4Show",value:null},{attr:"b4-hide",prop:"b4Hide",value:null},{attr:"b4-fill",prop:"b4Fill",value:null},{attr:"b4-confirm",prop:"b4Confirm",value:null},{attr:"b4-cancel",prop:"b4Cancel",value:null},{attr:"on-show",prop:"onShow",value:null},{attr:"on-hide",prop:"onHide",value:null},{attr:"on-shown",prop:"onShown",value:null},{attr:"on-hidden",prop:"onHidden",value:null},{attr:"on-invalidated",prop:"onInvalidated",value:null},{attr:"on-validated",prop:"onValidated",value:null},{attr:"on-sended",prop:"onSended",value:null},{attr:"on-render",prop:"onRender",value:null},{attr:"on-rendered",prop:"onRendered",value:null},{attr:"on-updatedcont",prop:"onUpdatedCont",value:null},{attr:"on-transferred",prop:"onTransferred",value:null},{attr:"on-confirmed",prop:"onConfirmed",value:null},{attr:"on-canceled",prop:"onCanceled",value:null},{attr:"on-closed",prop:"onClosed",value:null},{attr:"on-cleared",prop:"onCleared",value:null},{attr:"on-request",prop:"onRequest",value:null},{attr:"on-bulletschecked",prop:"onBulletsChecked",value:null},{attr:"on-bulletsselected",prop:"onBulletsSelected",value:null},{attr:"on-targetset",prop:"onTargetSet",value:null},...p],c=[{attr:"placement",prop:"placement",value:"right"},{attr:"trigger",prop:"trigger",value:"click"},{attr:"offset",prop:"offset",value:"100px"},{attr:"size",prop:"size",value:"sm"},{attr:"multiple",prop:"multiple",value:!0},{attr:"parent",prop:"parent",value:""},{attr:"wing",prop:"wing",value:{selector:"",actClass:""}},{attr:"mask",prop:"mask",value:{enable:!0,closable:!0}},...d],getEvtTarget=t=>{if(t.targetTouches){let e=t.targetTouches[0]||t.changedTouches[0];return document.elementFromPoint(e.clientX,e.clientY)}return t.target},removeStyle=(t,e)=>{let s=getEl(t);s&&e&&(s.style.cssText=s.style.cssText.replace(`${e}:`,""))},addStyle=(t,e,s)=>{let i=getEl(t);if(e=(e+"").toLowerCase(),s+="",!i||!e||!s)return;let a=e.replace(/-([a-z])/g,((t,e)=>e.toUpperCase()));i.style[a]=s},isDateStr=t=>"string"==typeof t&&!isNaN(Date.parse(t)),getUTCTimestamp=t=>{let e,s,i,a=getDataType(t);return e="Date"===a?t:"String"===a?isDateStr(t)?new Date(t):new Date:"Number"===a?new Date(t):new Date,i=e.getTime(),s=6e4*e.getTimezoneOffset(),i+s},getExpiration=(t="d",e=365,s="locale")=>{let i;if(isDateStr(e))i=new Date(e);else switch(i=new Date,t){case"s":i.setSeconds(i.getSeconds()+~~e);break;case"m":i.setMinutes(i.getMinutes()+~~e);break;case"h":i.setHours(i.getHours()+~~e);break;default:i.setDate(i.getDate()+~~e)}return"utc"===s?getUTCTimestamp(i):i.getTime()},u={set:function(t,e,s){if(isEmpty(t)&&"string"!=typeof t)return;let i=Object.assign({unit:"d",expires:0,override:!0,type:"local"},s),a=deepClone(e),l=getDataType(e),n="session"===i.type?window.sessionStorage:window.localStorage,filterProps=t=>(Object.keys(t).forEach((e=>{let s=t[e],i=getDataType(s);["Array","Object"].includes(i)&&filterProps(s),(i.includes("HTML")||i.includes("Function")||["Promise","Symbol","Instance"].includes(i))&&delete t[e]})),t);["Array","Object"].includes(l)&&!isEmpty(a)&&filterProps(a);let r=0!==i.expires?getExpiration(i.unit,i.expires):0,o=this.get(t,i.type),h={data:!i.override&&this.get(t,i.type)?extend({target:o,source:a}):a,expires:r};return("number"==typeof i.expires&&i.expires<0||null===a)&&this.get(t,i.type)?this.remove(t,i.type):n.setItem(t,JSON.stringify(h)),this},get:function(t,e="local"){if(isEmpty(t)||"string"!=typeof t)return!1;let s=Date.now(),i="session"===e?window.sessionStorage:window.localStorage,a=i.getItem(t);if(a){let e=new Function('"use strict";return '+a)();return 0===e.expires||s<=e.expires?e.data:(i.removeItem(t),null)}return null},remove:function(t,e="local"){if(isEmpty(t)||"string"!=typeof t)return!1;return("session"===e?window.sessionStorage:window.localStorage).removeItem(t),this},clear:function(t="local"){return("session"===t?window.sessionStorage:window.localStorage).clear(),this}},g=[{attr:"deep",prop:"deep",value:{enable:!1,include:[],exclude:[]}},{attr:"filter",prop:"filter",value:null},{attr:"tpyes",prop:"tpyes",value:["Object","Array","Function"]},{attr:"accept",prop:"accept",value:!0},{attr:"lenient",prop:"lenient",value:!0},{attr:"once",prop:"once",value:!1},{attr:"methods",prop:"methods",value:["set","delete"]},{attr:"on-added",prop:"onAdded",value:null},{attr:"on-edited",prop:"onEdited",value:null},{attr:"on-set",prop:"onSet",value:null},{attr:"on-deleted",prop:"onDeleted",value:null},{attr:"on-crud",prop:"onCrud",value:null},{attr:"on-new",prop:"onNew",value:null},{attr:"on-applied",prop:"onApplied",value:null},{attr:"on-trigger",prop:"onTrigger",value:null},{attr:"on-completed",prop:"onCompleted",value:null},...p],deepEqual=(t,e)=>{if(t===e)return!0;let s=getDataType(t);if(s===getDataType(e)&&"Object"===s){let getStr=t=>{let e=new Set;return JSON.stringify(t,((t,s)=>{if("object"==typeof s&&null!==s){if(e.has(s))return;e.add(s)}return s}))};return getStr(t)===getStr(e)}return!1},isProxy=t=>!0===t?._isProxy,unique=(t,e)=>{let s;if(isEmpty(t))s=[...t];else if(s=[...new Set(t)],"object"==typeof s[0]&&e){let t=new Map;for(let i of s)!t.has(i[e])&&t.set(i[e],i);s=[...t.values()]}return s},m={handle:(t,e,s)=>{let i=[];if("String"===e?i=(t=trim(t)).includes(",")?t.split(","):t.split(" "):"Array"===e&&(i=t.map((t=>trim(t)))),i.length>0)for(let t of i)s(t)},add:function(t,e,s){let i=getDataType(t);return this.handle(t,i,(t=>(t=>{e.plans.hasOwnProperty(t)||(e.plans[t]=[]);let i=s.toString().replace(/\s/g,"").replace(/\;/g,"").match(/{(\S*)}/),a=e.plans[t].toString().replace(/\s/g,"").replace(/\;/g,"");i&&!a.includes(i[1])&&e.plans[t].push(s)})(t))),this},remove:function(t,e,s){let i=getDataType(t);return this.handle(t,i,(t=>(t=>{if(e.plans.hasOwnProperty(t))if(s){let i=e.plans[t].findIndex((t=>t===s));if(i<0)return;e.plans[t].splice(i,1),0===e.plans[t].length&&delete e.plans[t]}else delete e.plans[t]})(t))),this},do:function(t,e,...s){let i=getDataType(t);return this.handle(t,i,(t=>{return i=t,void(e.plans.hasOwnProperty(i)&&e.plans[i].forEach((t=>{t.call(e,...s)})));var i})),this}},attrJoinVal=(t,e,s)=>{let i=s?s.find((e=>e.attr===t)):null,a=(()=>{let e=t.trim(),s=!!i&&"function"==typeof i?.value;return e.startsWith("on-")||e.startsWith("b4-")||s})()?(t=>{let e=t.trim();return e.startsWith("function")||e.startsWith("(")||e.endsWith("}")?t:`function(){${t}}`})(e):e;try{if(i){if(null===e)return{[i.prop]:i.value};{let t=getDataType(i.value),s=e.trim(),l=["","1","true",!0],n=[null,"null","undefined","0","false","NaN"];return"ignore"===i.type?{[i.prop]:e}:"String"===t?{[i.prop]:e}:"Number"===t?{[i.prop]:parseFloat(e)}:"Boolean"===t&&l.includes(s)?{[i.prop]:!0}:"Boolean"===t&&n.includes(s)?{[i.prop]:!1}:"Object"===t&&i.value.hasOwnProperty("enable")&&l.includes(s)?{[i.prop]:!0}:"Object"===t&&i.value.hasOwnProperty("enable")&&i.value.hasOwnProperty("children")&&s.startsWith("[")&&s.endsWith("]")?{[i.prop]:{enable:!0,children:parseStr({content:`${e}`,type:"array",catchable:!0})}}:"Object"===t&&e.includes(":")?{[i.prop]:strToJson(e)}:parseStr({content:`{"${i.prop}":${a}}`,type:"object",catchable:!0})}}return""===e?{[t]:""}:parseStr({content:`{"${t}":${a}}`,type:"object",catchable:!0})}catch(s){return{[t