diff --git a/.gitignore b/.gitignore index 2c75ee9..50b8b43 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,6 @@ .Spotlight-V100 .Trashes - +we __pycache__ *.txt \ No newline at end of file diff --git a/icons/app.icns b/icons/app.icns deleted file mode 100644 index 1cb73a7..0000000 Binary files a/icons/app.icns and /dev/null differ diff --git a/icons/dns-host.svg b/icons/dns-host.svg deleted file mode 100644 index 63e3a5a..0000000 --- a/icons/dns-host.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/css/app.css b/src/css/app.css deleted file mode 100644 index 2c2391b..0000000 --- a/src/css/app.css +++ /dev/null @@ -1,218 +0,0 @@ -html { - width: 100%; - height: 100vh; -} -body { - position: fixed; - left: 0; - top: 0; - display: flex; - width: 100%; - height: 100%; - line-height: 1.5; - font-size: 14px; - color: var(--color-dark-1); -} -.layout-left { - display: flex; - flex-direction: column; - width: 180px; - height: 100vh; - background: var(--color-dark-2); -} -.layout-left wc-scroll { - overflow: hidden; - flex: 1; -} -.layout-left .domain-list { - width: 100%; -} -.layout-left .domain-list .item { - display: flex; - justify-content: flex-end; - align-items: center; - height: 40px; - padding: 0 20px 0 10px; - color: var(--color-plain-1); - cursor: pointer; - transition: background 0.1s ease-in-out; -} -.layout-left .domain-list .item wc-icon { - --size: 12px; - margin: auto -15px auto 5px; - color: var(--color-grey-3); -} -.layout-left .domain-list .item:hover, -.layout-left .domain-list .item.active { - background: var(--color-dark-1); -} -.layout-left .domain-list .item.active { - border-left: 0.3px solid var(--color-orange-1); - color: var(--color-orange-1); - font-weight: bold; -} -.layout-left .domain-list .item.blank { - justify-content: center; - cursor: default; -} -.layout-left .domain-list .item.blank:hover { - background: none; -} -.layout-left .action { - display: flex; - align-items: center; - height: 50px; - padding: 0 10px; -} - - - - -.layout-right { - flex: 1; - display: flex; - flex-direction: column; - background: #f7f8fb; -} -.layout-right .toolbar { - display: flex; - align-items: center; - justify-content: space-between; - height: 40px; - padding: 0 15px; - background: var(--color-plain-2); - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); -} -.layout-right .toolbar wc-input { - width: 200px; -} -.layout-right .main { - overflow: hidden; - flex: 1; - display: flex; - flex-direction: column; - margin: 20px 10px; - padding: 0 5px; - background: #fff; -} -.layout-right .thead { - display: flex; - align-items: center; - justify-content: center; - height: 40px; - margin-bottom: 8px; - border-bottom: 1px solid var(--color-plain-2); - text-align: center; -} -.layout-right .thead span { - flex: 1; -} -.layout-right .thead .long { - flex: 1.5; -} -.layout-right wc-scroll { - flex: 1; -} -.layout-right .record-list { - width: 100%; - line-height: 40px; -} -.layout-right .record-list .item { - display: flex; - justify-content: center; - align-items: center; - height: 40px; - padding: 0 10px; - border-bottom: 1px solid var(--color-plain-2); - text-align: center; -} -.layout-right .record-list .item wc-input, -.layout-right .record-list .item span, -.layout-right .record-list .item section { - flex: 1; -} -.layout-right .record-list .item .long { - flex: 1.5; -} -.layout-right .record-list .item section { - display: flex; - align-items: center; - justify-content: center; -} -.layout-right .record-list .item wc-button { - margin-left: 5px; -} -.layout-right .record-list .item:last-child { - border-bottom: none; -} - - - - - - - - - - -.permission-error { - position: fixed; - left: 0; - top: 0; - z-index: 102401; - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - height: 100%; - padding: 50px; - background: rgba(255, 233, 233, 0.95); - -webkit-backdrop-filter: blur(0.5rem); - backdrop-filter: blur(0.5rem); -} -.permission-error pre { - font-family: 'Courier New', Courier, monospace; - font-size: 16px; - color: var(--color-red-1); -} -.permission-error fieldset { - width: 600px; - padding: 0 30px 30px; - border: 1px solid var(--color-orange-1); - border-radius: 8px; -} -.permission-error fieldset legend { - padding: 0 10px; - font-size: 16px; -} -.permission-error fieldset dt { - margin-top: 20px; - font-weight: bold; -} -.permission-error fieldset code { - display: block; - padding: 8px 10px; - margin-top: 8px; - border-left: 3px solid var(--color-plain-3); - background: rgba(255, 255, 255, 0.3); - font-family: 'Courier New', Courier, monospace; -} -.permission-error.show { - display: flex; -} -.context-menu { - display: flex; - flex-direction: column; - width: 100px; - padding: 5px 0; - background: #fff; -} -.context-menu .item { - height: 30px; - line-height: 30px; - padding: 0 15px; - cursor: pointer; -} -.context-menu .item:hover { - background: #f2f5fc; -} diff --git a/src/css/app.scss b/src/css/app.scss deleted file mode 100644 index 0313b1e..0000000 --- a/src/css/app.scss +++ /dev/null @@ -1,240 +0,0 @@ -@charset "UTF-8"; -/** - * {sonist app style} - * @authors yutent - * @date 2018/12/16 17:15:07 - */ - -@mixin ts($c: all, $t: 0.1s, $m: ease-in-out) { - transition: $c $t $m; -} - -html { - width: 100%; - height: 100vh; -} -body { - position: fixed; - left: 0; - top: 0; - display: flex; - width: 100%; - height: 100%; - line-height: 1.5; - font-size: 14px; - color: var(--color-dark-1); -} - -.layout-left { - display: flex; - flex-direction: column; - width: 180px; - height: 100vh; - background: var(--color-dark-2); - - wc-scroll { - overflow: hidden; - flex: 1; - } - - .domain-list { - width: 100%; - - .item { - display: flex; - justify-content: flex-end; - align-items: center; - height: 40px; - padding: 0 20px 0 10px; - color: var(--color-plain-1); - cursor: pointer; - @include ts(background); - - wc-icon { - --size: 12px; - margin: auto -15px auto 5px; - color: var(--color-grey-3); - } - - &:hover, - &.active { - background: var(--color-dark-1); - } - &.active { - border-left: 0.3px solid var(--color-orange-1); - color: var(--color-orange-1); - font-weight: bold; - } - &.blank { - justify-content: center; - cursor: default; - &:hover { - background: none; - } - } - } - } - - .action { - display: flex; - align-items: center; - height: 50px; - padding: 0 10px; - } -} - -.layout-right { - flex: 1; - display: flex; - flex-direction: column; - background: #f7f8fb; - - .toolbar { - display: flex; - align-items: center; - justify-content: space-between; - height: 40px; - padding: 0 15px; - background: var(--color-plain-2); - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); - - wc-input { - width: 200px; - } - } - - .main { - overflow: hidden; - flex: 1; - display: flex; - flex-direction: column; - margin: 20px 10px; - padding: 0 5px; - background: #fff; - } - - .thead { - display: flex; - align-items: center; - justify-content: center; - height: 40px; - margin-bottom: 8px; - border-bottom: 1px solid var(--color-plain-2); - text-align: center; - - span { - flex: 1; - } - .long { - flex: 1.5; - } - } - - wc-scroll { - flex: 1; - } - .record-list { - width: 100%; - line-height: 40px; - - .item { - display: flex; - justify-content: center; - align-items: center; - height: 40px; - padding: 0 10px; - border-bottom: 1px solid var(--color-plain-2); - text-align: center; - - wc-input, - span, - section { - flex: 1; - } - .long { - flex: 1.5; - } - section { - display: flex; - align-items: center; - justify-content: center; - } - wc-button { - margin-left: 5px; - } - - &:last-child { - border-bottom: none; - } - } - } -} - -.permission-error { - position: fixed; - left: 0; - top: 0; - z-index: 102401; - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - height: 100%; - padding: 50px; - background: rgba(255, 233, 233, 0.95); - backdrop-filter: blur(0.5rem); - - pre { - font-family: 'Courier New', Courier, monospace; - font-size: 16px; - color: var(--color-red-1); - } - - fieldset { - width: 600px; - padding: 0 30px 30px; - border: 1px solid var(--color-orange-1); - border-radius: 8px; - - legend { - padding: 0 10px; - font-size: 16px; - } - - dt { - margin-top: 20px; - font-weight: bold; - } - code { - display: block; - padding: 8px 10px; - margin-top: 8px; - border-left: 3px solid var(--color-plain-3); - background: rgba(255, 255, 255, 0.3); - font-family: 'Courier New', Courier, monospace; - } - } - - &.show { - display: flex; - } -} - -.context-menu { - display: flex; - flex-direction: column; - width: 100px; - padding: 5px 0; - background: #fff; - - .item { - height: 30px; - line-height: 30px; - padding: 0 15px; - cursor: pointer; - - &:hover { - background: #f2f5fc; - } - } -} diff --git a/src/images/app.png b/src/images/app.png deleted file mode 100644 index 46b31a0..0000000 Binary files a/src/images/app.png and /dev/null differ diff --git a/src/index.html b/src/index.html deleted file mode 100644 index c41b774..0000000 --- a/src/index.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - -
- -
    -
  • - - -
  • -
  • 没有域名
  • -
-
-
- - -
-
- -
- -
- 新增记录 - 保存 -
- -
-
- 主机记录 - 类型 - 记录值 - 操作 - 备注 -
- -
    -
  • - - A - -
    - - 删除 - 克隆 -
    - -
  • -
-
-
-
- - - -
-
-/************************************************************/
- *                   hosts文件没有写权限                      *
-/************************************************************/
-    
-
- 操作指引 -
-
MacOS用户
-
打开终端, 执行以下命令
-
sudo chown $USER:admin /etc/hosts
- -
Linux用户
-
打开终端, 执行以下命令
-
sudo chown $USER: /etc/hosts
- -
完成之后
-
点击下面的按钮重新检测.
-
- 权限检测 -
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js deleted file mode 100644 index c390b1f..0000000 --- a/src/js/app.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * {sonist app} - * @author yutent - * @date 2018/12/16 17:15:57 - */ - -import '/lib/anot.js' -import '/lib/form/button.js' -import '/lib/form/link.js' -import '/lib/form/input.js' -import '/lib/form/switch.js' -import '/lib/layer/index.js' -import Utils from '/lib/utils.js' - -const $doc = Anot(document) - -let dict = {} -let tmp_records = {} - -Anot({ - $id: 'app', - state: { - filter: '', - activeDomain: Anot.ls('last_domain') || '', //当前选中的域名 - editDomain: '', // 当前临时要编辑的域名, 即右键菜单选择到的 - domains: [], - records: [], - permissionShow: false - }, - mounted() { - // this.$refs.context.show() - this.check() - Utils.outside(this.$refs.context, ev => { - this.$refs.context.close() - }) - }, - watch: {}, - methods: { - addRecord() { - if (this.activeDomain) { - this.records.unshift({ - record: '', - value: '', - enabled: true, - remark: '' - }) - this.$refs.records.scrollTop = 0 - } else { - layer.toast('请先选择域名', 'warn') - } - }, - addDomain() { - layer - .prompt('请输入根域名', function (val, done) { - if ( - val === 'localhost' || - val === 'local' || - val === electron.hostname || - /^[\w.\-]+\.[a-z]+$/.test(val) - ) { - done() - } else { - layer.toast('域名格式错误', 'error') - } - }) - .then(val => { - this.domains.push(val) - dict[val] = [] - if (!this.activeDomain) { - this.toggleDomain(val) - } - this.save() - }) - .catch(Anot.noop) - }, - toggleDomain(name) { - this.activeDomain = name - this.records = (dict[name] || []).sort((a, b) => a.record.localeCompare(b.record)) - - tmp_records = Object.create(null) - for (let it of this.records) { - if (tmp_records[it.record]) { - tmp_records[it.record].push(it) - } else { - tmp_records[it.record] = [it] - } - } - document.title = `伪域名解析 ${name} ` - Anot.ls('last_domain', name) - setTimeout(() => { - this.$refs.records.scrollTop = 0 - }, 50) - }, - showMenu(ev) { - this.$refs.context.close() - var { pageX, pageY } = ev - if (pageY + 70 > 600) { - pageY -= 70 - } - - var elem = ev.target - - if (elem.tagName !== 'LI') { - elem = elem.parentNode - } - this.editDomain = elem.dataset.name - Anot.nextTick(_ => { - this.$refs.context.moveTo({ left: pageX + 'px', top: pageY + 'px' }) - this.$refs.context.show() - }) - }, - confirmAction(ev) { - this.$refs.context.close() - if (ev.target.tagName === 'LI') { - var act = ev.target.dataset.act - - if (act === 'del') { - layer - .confirm(`是否要删除域名「${this.editDomain}」?`) - .then(res => { - if (this.editDomain === this.activeDomain) { - if (this.records.length) { - return layer.toast('该域名下有主机记录, 请先删除主机记录后再删除域名', 'error') - } - } else { - if (dict[this.editDomain].length > 0) { - return layer.toast('该域名下有主机记录, 请先删除主机记录后再删除域名', 'error') - } - } - delete dict[this.editDomain] - this.domains.remove(this.editDomain) - this.activeDomain = '' - this.editDomain = '' - this.records.clear() - this.save() - this.toggleDomain(this.domains[0]) - }) - .catch(Anot.noop) - } else if (act === 'edit') { - layer - .prompt(`请输入新的名字「${this.editDomain}」`, (val, done) => { - if (val === this.editDomain || dict[val]) { - return - } - - if ( - val === 'localhost' || - val === 'local' || - val === electron.hostname || - /^[\w.]+\.[a-z]+$/.test(val) - ) { - done() - } else { - layer.toast('域名格式错误', 'error') - } - }) - .then(val => { - var idx = this.domains.indexOf(this.editDomain) - this.domains.set(idx, val) - dict[val] = dict[this.editDomain] - delete dict[this.editDomain] - this.activeDomain = '' - this.editDomain = '' - this.save() - this.toggleDomain(val) - }) - .catch(Anot.noop) - } - } - }, - check() { - var check = electron.checkPermission() - - if (check) { - dict = electron.getHistory() - - var tmp = [] - for (var k in dict) { - if (k) { - tmp.push(k) - } else { - delete dict[k] - } - } - this.domains = tmp - this.permissionShow = false - this.toggleDomain(Anot.ls('last_domain') || tmp[0]) - } else { - this.permissionShow = true - } - }, - updateCacheDict(item) { - clearTimeout(this.timer) - this.timer = setTimeout(_ => { - tmp_records = Object.create(null) - for (let it of this.records) { - if (tmp_records[it.record]) { - tmp_records[it.record].push(it) - } else { - tmp_records[it.record] = [it] - } - } - }, 1000) - }, - clone(item) { - var params = { ...item } - params.enabled = false - - this.records.unshift(params) - tmp_records[params.record].push(this.records[0]) - - this.$refs.records.scrollTop = 0 - }, - // 同一个记录, 允许一条被激活 - recordChanges(item) { - if (item.enabled) { - if (tmp_records[item.record].length > 1) { - for (let it of tmp_records[item.record]) { - if (it.value !== item.value) { - it.enabled = false - } - } - } - } - }, - save() { - if (this.activeDomain) { - dict[this.activeDomain] = this.records.$model - } - electron.saveHosts(dict) - layer.toast('保存成功', 'success') - } - } -}) diff --git a/src/lib/anot.js b/src/lib/anot.js deleted file mode 100644 index a85214b..0000000 --- a/src/lib/anot.js +++ /dev/null @@ -1,8 +0,0 @@ -/*================================================== - * Anot normal version for future browsers - * @authors yutent - * @date 2020-07-27 14:55:37 - * @version v2.2.3 - * - ==================================================*/ - const _Anot=function(){var e=1024,t=A(),n=window.document,r=n.head;r.insertAdjacentHTML("afterbegin",'');var i=r.firstChild;function a(){console.log.apply(console,arguments)}function o(){return Object.create(null)}var s=encodeURIComponent,c=decodeURIComponent,l="$"+t,u={},f=/[^, ]+/g,p=/\w+/g,d=/^\[object SVG\w*Element\]$/,h=Object.prototype,v=h.hasOwnProperty,m=h.toString,y=Array.prototype,g=y.slice,b=n.documentElement,$=n.createDocumentFragment(),x=(n.createElement("div"),{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object","[object Error]":"error","[object AsyncFunction]":"asyncfunction","[object Promise]":"promise","[object Generator]":"generator","[object GeneratorFunction]":"generatorfunction"});function w(){}function k(e){return Function.apply(w,e)}function C(e,t){"string"==typeof e&&(e=e.match(f)||[]);for(var n={},r=void 0!==t?t:1,i=0,a=e.length;i{e.resolve=t,e.reject=n}),e}),String.prototype.splice||Object.defineProperty(String.prototype,"splice",{value:function(e,t,n){let r=this.length,i=arguments.length;if(n=void 0===n?"":n,i<1)return this;if(e<0&&(e=Math.abs(e)>=r?0:r+e),1===i)return this.slice(0,e);return t-=0,this.slice(0,e)+n+this.slice(e+t)},enumerable:!1}),Date.prototype.getFullWeek||(Object.defineProperty(Date.prototype,"getFullWeek",{value:function(){let e=this.getFullYear(),t=new Date(e,0,1),n=t.getDay()||1,r=(this-t)/864e5;return Math.ceil((r+n)/7)},enumerable:!1}),Object.defineProperty(Date.prototype,"getWeek",{value:function(){let e=this.getDate(),t=this.getMonth(),n=this.getFullYear(),r=new Date(n,t,1).getDay();return Math.ceil((e+r)/7)},enumerable:!1})),Date.isDate||Object.defineProperty(Date,"isDate",{value:function(e){return!("object"!=typeof e||!e.getTime)},enumerable:!1}),Date.prototype.format||Object.defineProperty(Date.prototype,"format",{value:function(e){e=e||"Y-m-d H:i:s";let t,n={fullyear:this.getFullYear(),year:this.getYear(),fullweek:this.getFullWeek(),week:this.getWeek(),month:this.getMonth()+1,date:this.getDate(),day:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"][this.getDay()],hours:this.getHours(),minutes:this.getMinutes(),seconds:this.getSeconds()};n.g=n.hours>12?n.hours-12:n.hours,t={Y:n.fullyear,y:n.year,m:n.month<10?"0"+n.month:n.month,n:n.month,d:n.date<10?"0"+n.date:n.date,j:n.date,H:n.hours<10?"0"+n.hours:n.hours,h:n.g<10?"0"+n.g:n.g,G:n.hours,g:n.g,i:n.minutes<10?"0"+n.minutes:n.minutes,s:n.seconds<10?"0"+n.seconds:n.seconds,W:n.fullweek,w:n.week,D:n.day};for(let n in t)e=e.replace(new RegExp(n,"g"),t[n]);return e},enumerable:!1});let N=function(e){return new N.init(e)};N.nextTick=new function(){let e=window.setImmediate,t=window.MutationObserver;if(e)return e.bind(window);let n=[];if(t){let e=document.createTextNode("anot");new t(function(){let e=n.length;for(let t=0;t>>0)return!0}return!1}(e))for(let n=0,r=e.length;n1){if(!e)return;if(n=n||{},n=Object.assign({expires:"",path:"/",domain:document.domain,secure:""},n),"string"==this.type(t)&&""===t.trim()||null===t)return document.cookie=s(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain="+n.domain+"; path="+n.path,!0;if(n.expires)switch(n.expires.constructor){case Number:n.expires=n.expires===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n.expires;break;case String:n.expires="; expires="+n.expires;break;case Date:n.expires="; expires="+n.expires.toUTCString()}return document.cookie=s(e)+"="+s(t)+n.expires+"; domain="+n.domain+"; path="+n.path+"; "+n.secure,!0}return e?c(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+s(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:document.cookie},search:function(e){e+="";let t=location.search;if(!e||!t)return null;t=(t=(t=c(t)).slice(1)).split("&");let n={};for(let e,r=0;e=t[r++];){let t=e.split("=");t[1]=t.length<2?null:t[1],t[1]=t[1],n.hasOwnProperty(t[0])?"object"==typeof n[t[0]]?n[t[0]].push(t[1]):(n[t[0]]=[n[t[0]]],n[t[0]].push(t[1])):n[t[0]]=t[1]}return n.hasOwnProperty(e)?n[e]:null},copy:function(e){try{navigator.clipboard.writeText(e)}catch(e){a("复制到粘贴板失败",e)}}});let O=N.bindingHandlers={},E=N.bindingExecutors={},S=N.directives={};N.directive=function(e,t){return O[e]=t.init=t.init||w,E[e]=t.update=t.update||w,S[e]=t};let D=new function(){function e(e){this.size=0,this.limit=e,this.head=this.tail=void 0,this._keymap={}}let t=e.prototype;return t.put=function(e,t){let n={key:e,value:t};return this._keymap[e]=n,this.tail?(this.tail.newer=n,n.older=this.tail):this.head=n,this.tail=n,this.size===this.limit?this.shift():this.size++,t},t.shift=function(){let e=this.head;e&&(this.head=this.head.newer,this.head.older=e.newer=e.older=this._keymap[e.key]=void 0,delete this._keymap[e.key])},t.get=function(e){let t=this._keymap[e];if(void 0!==t)return t===this.tail?t.value:(t.newer&&(t===this.head&&(this.head=t.newer),t.newer.older=t.older),t.older&&(t.older.newer=t.newer),t.newer=void 0,t.older=this.tail,this.tail&&(this.tail.newer=t),this.tail=t,t.value)},e};n.contains||(Node.prototype.contains=function(e){return!!(16&this.compareDocumentPosition(e))}),N.contains=function(e,t){try{for(;t=t.parentNode;)if(t===e)return!0;return!1}catch(e){return!1}};let _=N.eventHooks;function P(e){for(var t in e)if(v.call(e,t)){var n=e[t];"function"==typeof P.plugins[t]?P.plugins[t](n):"object"==typeof P[t]?N.mix(P[t],n):P[t]=n}return this}void 0===n.onmousewheel&&(_.mousewheel={type:"wheel",fix:function(e,t){return function(n){n.wheelDeltaY=n.wheelDelta=n.deltaY>0?-120:120,n.wheelDeltaX=0,Object.defineProperty(n,"type",{value:"mousewheel"}),t.call(e,n)}}}),N.config=P;var L,M,H,F,B=/[-.*+?^${}()|[\]\/\\]/g;function I(e){return(e+"").replace(B,"\\$&")}var R={interpolate:function(e){if(L=e[0],M=e[1],L===M)throw new SyntaxError("openTag!==closeTag");P.openTag=L,P.closeTag=M;var t=I(L),n=I(M);H=new RegExp(t+"([\\s\\S]*)"+n),F=new RegExp(t+"([\\s\\S]*)"+n,"g"),new RegExp(t+"[\\s\\S]*"+n+"|\\s:")}};function q(t,r){var i=this.$events||(this.$events={}),a=i[t]||(i[t]=[]);if("function"==typeof r){var o=r;o.uuid="_"+ ++e,(r={element:b,type:"user-watcher",handler:w,vmodels:[this],expr:t,uuid:o.uuid}).wildcard=/\*/.test(t)}if(r.update)r.oneTime||N.Array.ensure(a,r);else{if(/\w\.*\B/.test(t)||"*"===t){r.getter=w;var s=this;r.update=function(){var e=this.fireArgs||[];e[2]&&r.handler.apply(s,e),delete this.fireArgs},a.sync=!0,N.Array.ensure(a,r)}else N.injectBinding(r);o&&(r.handler=o)}return function(){r.update=r.getter=r.handler=w,r.element=n.createElement("a")}}function V(t,n){var r=this.$events,i=null;if(r&&r[t]){n&&(n[2]=t);var a=r[t];if(function(t,n){if(!t)return;new Date-se>444&&"object"==typeof t[0]&&le();for(var r,i=[],a=[],o=0;r=t[o++];)"user-watcher"===r.type?i.push(r):a.push(r);if(P.async){for(dt.render(),o=0;r=a[o++];)if(r.update){r.uuid=r.uuid||"_"+ ++e;var s=r.uuid;dt.queue[s]||(dt.queue[s]="__",dt.queue.push(r))}}else for(o=0;r=a[o++];)r.update&&r.update();for(o=0;r=i[o++];)(n&&n[2]===r.expr||r.wildcard)&&(r.fireArgs=n),r.update()}(a,n),n&&r["*"]&&!/\./.test(t))for(var o,s=0;o=r["*"][s++];)try{o.handler.apply(this,n)}catch(e){}(i=this.$up)&&(this.$pathname&&V.call(i,this.$pathname+"."+t,n),V.call(i,"*."+t,n))}else{if(i=this.$up,this.$ups){for(var c in this.$ups)V.call(this.$ups[c],c+"."+t,n);return}if(i){var l=this.$pathname;""===l&&(l="*");var u=l+"."+t;a=u.split("."),n=n&&n.concat([u,t])||[u,t],-1===a.indexOf("*")?(V.call(i,u,n),a[1]="*",V.call(i,a.join("."),n)):V.call(i,u,n)}}}P.plugins=R,P.plugins.interpolate(["{{","}}"]),P.async=!0,P.paths={},P.shim={},P.maxRepeatSize=100;var W=C("$id,$watch,$fire,$events,$model,$active,$pathname,$up,$ups,$track,$accessors");function z(e,t){return(t=t||{}).watch=!0,U(e,t)}function U(e,t){if(!e||e.$id&&e.$accessors||e.nodeName&&e.nodeType>0)return e;var n,r=(t=t||u).force||u,i=t.old,o=i&&i.$accessors||u,s=new function(){},c={},l={},f=[],p=[],d={},h=e.state,v=e.computed,m=e.methods,y=e.props,g=e.watch,b=e.mounted;if(delete e.state,delete e.computed,delete e.methods,delete e.props,delete e.watch,e.skip&&(d=C(e.skip),delete e.skip),h)for(x in e.$id&&delete h.props,h){var $=h[x];W[x]||(l[x]=!0),"function"==typeof $||$&&$.nodeName&&$.nodeType>0||!r[x]&&("$"===(n=x).charAt(0)||"__"===n.slice(0,2)||W[n]||d[x])?f.push(x):Y($)?(a("warning:计算属性建议放在[computed]对象中统一定义"),v[x]=$):(p.push(x),o[x]?c[x]=o[x]:c[x]=G(x,$))}if(v)for(var x in delete v.props,v)l[x]=!0,function(e,t){var n;"function"==typeof t&&(t={get:t,set:w}),"function"!=typeof t.set&&(t.set=w),c[e]={get:function(){return n=t.get.call(this)},set:function(r){var i,a=n;t.set.call(this,r),i=this[e],this.$fire&&i!==a&&this.$fire(e,i,a)},enumerable:!0,configurable:!0}}(x,v[x]);if(m)for(var x in delete m.props,m)l[x]=!0,f.push(x);if(y)for(var x in X(s,"props",{}),l.props=!!e.$id,y)s.props[x]=y[x];if(Object.assign(e,h,m),c.$model=Z,s=Object.defineProperties(s,c,e),f.forEach(function(t){s[t]=e[t]}),X(s,"$id","anonymous"),X(s,"$up",i?i.$up:null),X(s,"$track",Object.keys(l)),X(s,"$active",!1),X(s,"$pathname",i?i.$pathname:""),X(s,"$accessors",c),X(s,"$events",{}),X(s,"$refs",{}),X(s,"$children",[]),X(s,"hasOwnProperty",function(e){return!0===l[e]}),X(s,"$mounted",b),t.watch&&(X(s,"$watch",function(){return q.apply(s,arguments)}),X(s,"$fire",function(e,t){if(0===e.indexOf("all!")){var n=e.slice(4);for(var r in N.vmodels){(i=N.vmodels[r]).$fire&&i.$fire.apply(i,[n,t])}}else if(0===e.indexOf("child!")){n="props."+e.slice(6);for(var r in s.$children){var i;(i=s.$children[r]).$fire&&i.$fire.apply(i,[n,t])}}else V.call(s,e,[t])})),p.forEach(function(e){var t=i&&i[e],n=s[e]=h[e];n&&"object"==typeof n&&!Date.isDate(n)&&(n.$up=s,n.$pathname=e),V.call(s,e,[n,t])}),g)for(var k in delete g.props,g)if(Array.isArray(g[k]))for(var A;A=g[k].pop();)q.call(s,k,A);else q.call(s,k,g[k]);return s.$active=!0,"anonymous"!==s.$id&&i&&i.$up&&i.$up.$children&&i.$up.$children.push(s),s}function Y(e){if(e&&"object"==typeof e){for(var t in e)if("get"!==t&&"set"!==t)return!1;return"function"==typeof e.get}}function G(e,t){var n;t=NaN;return{get:function(){return this.$active&&function(e,t){for(;;){if(e.$watch){var n=e.$events||(e.$events={}),r=n[t]||(n[t]=[]);return void ae.collectDependency(r)}if(!(e=e.$up))break;t=e.$pathname+"."+t}}(this,e),t},set:function(r){if(t!==r){var i=t;(n=J(r,t))?t=n:(n=void 0,t=r),Object(n)===n&&(n.$pathname=e,n.$up=this),this.$active&&V.call(this,e,[t,i])}},enumerable:!0,configurable:!0}}function J(e,t,n,r){if(Array.isArray(e))return function(e,t,n){if(t&&t.splice){var r=[0,t.length].concat(e);return t.splice.apply(t,r),t}for(var i in ee)e[i]=ee[i];X(e,"$up",null),X(e,"$pathname",""),X(e,"$track",ne(e.length)),e._=U({state:{length:NaN}},{watch:!0}),e._.length=e.length,e._.$watch("length",function(t,n){V.call(e.$up,e.$pathname+".length",[t,n])}),n&&X(e,"$watch",function(){return q.apply(e,arguments)}),Object.defineProperty(e,"$model",Z);for(var a=0,o=e.length;a>>=0)>this.length)throw Error(e+"set方法的第一个参数不能大于原数组长度");if(this[e]!==t){var n=this[e];this.splice(e,1,t),V.call(this.$up,this.$pathname+".*",[t,n,null,e])}},contains:function(e){return this.indexOf(e)>-1},ensure:function(e){return this.contains(e)||this.push(e),this},pushArray:function(e){return this.push.apply(this,K(e))},remove:function(e){return this.removeAt(this.indexOf(e))},removeAt:function(e){return e>>>=0,this.splice(e,1)},size:function(){return this._.length},removeAll:function(e){if(Array.isArray(e))for(var t=this.length-1;t>=0;t--)-1!==e.indexOf(this[t])&&(te.call(this.$track,t,1),te.call(this,t,1));else if("function"==typeof e)for(t=this.length-1;t>=0;t--){e(this[t],t)&&(te.call(this.$track,t,1),te.call(this,t,1))}else te.call(this.$track,0,this.length),te.call(this,0,this.length);this.notify(),this._.length=this.length},clear:function(){this.removeAll()}},te=Q.splice;function ne(e){for(var t=[],n=0;n2){n[1],n.length;n=[n[0],n[1]].concat(ne(n.length-2))}}Array.prototype[t].apply(e,n)}(this.$track,e,n),this.notify(),this._.length=this.length,a}}),"sort,reverse".replace(f,function(e){ee[e]=function(){var t=this.concat(),n=Math.random(),r=[],i=!1;Q[e].apply(this,arguments);for(var a=0,o=t.length;a444&&le())}(n,t)}}),t.getter=He(t.expr,t.vmodels,t),t.observers.forEach(function(e){e.v.$watch(e.p,t)}),delete t.observers);try{var r,i,o=t.fireArgs;if(delete t.fireArgs,o)r=o[0],i=o[1];else if("on"===t.type)r=t.getter+"";else try{r=t.getter.apply(0,t.args)}catch(e){r=null}if(i=void 0===i?t.oldValue:i,t._filters&&(r=cn.$filter.apply(0,[r].concat(t._filters))),t.signature){var s=N.type(r);if("array"!==s&&"object"!==s)throw Error("warning:"+t.expr+"只能是对象或数组");t.xtype=s;var c=function(e,t){for(var n,r=[],i=0;n=e[i++];)r.push(t?n.$id:n.$key);return r.join(";")}(t.proxies||[],s),l=r.$track||("array"===s?ne(r.length):Object.keys(r));t.track=l,c!==l.join(";")&&(t.handler(r,i),t.oldValue=1)}else Array.isArray(r)&&r.length!==(i&&i.length)?(t.handler(r,i),t.oldValue=r.concat()):"oldValue"in t&&r===i||(t.handler(r,i),t.oldValue=Array.isArray(r)?r.concat():r)}catch(e){delete t.getter,a("warning:exception throwed in [Anot.injectBinding] ",e);var u=t.element;u&&3===u.nodeType&&(u.nodeValue=L+(t.oneTime?"::":"")+t.expr+M)}finally{n&&ae.end()}},t.update()};var oe=N.$$subscribers=[],se=new Date;var ce=0;function le(e){for(var t=ce||oe.length,n=0;e=oe[--t];)if(e.i<7){if(null===e.element){oe.splice(t,1),e.list&&(N.Array.remove(e.list,e),delete oe[e.uuid]);continue}if(fe(e.element)){if(oe.splice(t,1),N.Array.remove(e.list,e),ue(e),n++>500){ce=t;break}continue}e.i++,7===e.i&&(e.i=14)}else e.i--;se=new Date}function ue(e){for(var t in delete oe[e.uuid],e.element=null,e.rollback&&e.rollback(),e)e[t]=null}function fe(e){try{e.parentNode.nodeType}catch(e){return!0}return e.ifRemove&&!b.contains(e.ifRemove)&&i===e.parentNode?(e.parentNode&&e.parentNode.removeChild(e),!0):e.msRetain?0:1===e.nodeType?!b.contains(e):!N.contains(b,e)}var pe=new function(){N.mix(this,{option:n.createElement("select"),thead:n.createElement("table"),td:n.createElement("tr"),area:n.createElement("map"),tr:n.createElement("tbody"),col:n.createElement("colgroup"),legend:n.createElement("fieldset"),_default:n.createElement("div"),g:n.createElementNS("http://www.w3.org/2000/svg","svg")}),this.optgroup=this.option,this.tbody=this.tfoot=this.colgroup=this.caption=this.thead,this.th=this.td};String("circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use").replace(f,function(e){pe[e]=pe.g});var de=/<([\w:]+)/,he=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ve=C(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),me=n.createElement("script"),ye=/<|&#?\w+;/;function ge(e){return e.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function be(e){return e.indexOf("-")<0&&e.indexOf("_")<0?e:e.replace(/[-_][^-_]/g,function(e){return e.charAt(1).toUpperCase()})}N.parseHTML=function(e){var t=$.cloneNode(!1);if("string"!=typeof e)return t;if(!ye.test(e))return t.appendChild(n.createTextNode(e)),t;e=e.replace(he,"<$1>").trim();var r,i=(de.exec(e)||["",""])[1].toLowerCase(),a=pe[i]||pe._default;a.innerHTML=e;var o=a.getElementsByTagName("script");if(o.length)for(var s,c=0;s=o[c++];)if(ve[s.type]){var l=me.cloneNode(!1);y.forEach.call(s.attributes,function(e){l.setAttribute(e.name,e.value)}),l.text=s.text,s.parentNode.replaceChild(l,s)}for(;r=a.firstChild;)t.appendChild(r);return t},N.innerHTML=function(e,t){var n=this.parseHTML(t);this.clearHTML(e).appendChild(n)},N.clearHTML=function(e){for(e.textContent="";e.firstChild;)e.removeChild(e.firstChild);return e},"add,remove".replace(f,function(e){N.fn[e+"Class"]=function(t){var n=this[0];return t&&"string"==typeof t&&n&&1===n.nodeType&&t.replace(/\S+/g,function(t){n.classList[e](t)}),this}}),N.fn.mix({attr:function(e,t){return 2===arguments.length?(this[0].setAttribute(e,t),this):this[0].getAttribute(e)},data:function(e,t){var n=arguments.length,r=this[0].dataset;switch((e=ge(e||""))||(n=0),n){case 2:return r[e]=t,this;case 1:return xe(r[e]);case 0:var i=o();for(var a in r)i[a]=xe(r[a]);return i}},removeData:function(e){return e="data-"+ge(e),this[0].removeAttribute(e),this},css:function(e,t){if(N.isPlainObject(e))for(var n in e)N.css(this,n,e[n]);else var r=N.css(this,e,t);return void 0!==r?r:this},position:function(){var e,t,n=this[0],r={top:0,left:0};if(n)return"fixed"===this.css("position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),"HTML"!==e[0].tagName&&(r=e.offset()),r.top+=N.css(e[0],"borderTopWidth",!0),r.left+=N.css(e[0],"borderLeftWidth",!0),r.top-=e.scrollTop(),r.left-=e.scrollLeft()),{top:t.top-r.top-N.css(n,"marginTop",!0),left:t.left-r.left-N.css(n,"marginLeft",!0)}},offsetParent:function(){for(var e=this[0].offsetParent;e&&"static"===N.css(e,"position");)e=e.offsetParent;return N(e||b)},bind:function(e,t,n){if(this[0])return N.bind(this[0],e,t,n)},unbind:function(e,t,n){return this[0]&&N.unbind(this[0],e,t,n),this},val:function(e){var t,n,r=this[0];if(r&&1===r.nodeType){var i=0===arguments.length,a=i?":get":":set",o=je[(t=r,n=t.tagName.toLowerCase(),("input"===n&&/checkbox|radio/.test(t.type)?"checked":n)+a)];if(o)var s=o(r,e);else{if(i)return(r.value||"").replace(/\r/g,"");r.value=e}}return i?s:this}}),N.parseJSON=JSON.parse;var $e=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;function xe(e){try{if("object"==typeof e)return e;e="true"===e||"false"!==e&&("null"===e?null:+e+""===e?+e:$e.test(e)?JSON.parse(e):e)}catch(e){}return e}N.fireDom=function(e,t,r){var i=n.createEvent("Events");i.initEvent(t,!0,!0),N.mix(i,r),e.dispatchEvent(i)},N.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){N.fn[e]=function(n){var r=this[0]||{},i=function(e){return e.window&&e.document?e:9===e.nodeType&&e.defaultView}(r),a="scrollTop"===e;if(!arguments.length)return i?i[t]:r[e];i?i.scrollTo(a?i[t]:n,a?n:i[t]):r[e]=n}});var we=N.cssHooks=o(),ke=["","-webkit-","-moz-","-ms-"],Ce={float:"cssFloat"};N.cssNumber=C("animationIterationCount,animationIterationCount,columnCount,order,flex,flexGrow,flexShrink,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom"),N.cssName=function(e,t,n){if(Ce[e])return Ce[e];t=t||b.style;for(var r=0,i=ke.length;r-1)&&(n=!0);n||(e.selectedIndex=-1)}},Te={};["break,case,catch,continue,debugger,default,delete,do,else,false","finally,for,function,if,in,instanceof,new,null,return,switch,this","throw,true,try,typeof,var,void,while,with","abstract,boolean,byte,char,class,const,double,enum,export,extends","final,float,goto,implements,import,int,interface,long,native","package,private,protected,public,short,static,super,synchronized","throws,transient,volatile","arguments,let,yield,async,await,undefined"].join(",").replace(/\w+/g,function(e){Te[e]=!0});var Oe=/[a-z_$]/i,Ee=/[\s\uFEFF\xA0]/;function Se(e,t){if(t&&!Te[t])return e.push(t),!0}function De(e,t,n,r){for(var i,a=[],o=" = "+n+".",s=e.length;i=e[--s];){var c=i.split(".")[0];t.hasOwnProperty(c)&&(a.push(c+o+c),r.observers.push({v:t,p:i,type:N.type(t[c])}),e.splice(s,1))}return a}var _e=/(proxy\-[a-z]+)\-[\-0-9a-f]+$/,Pe=new D(218),Le=new D(128);function Me(e){e=e.trim();var t=Pe.get(e);if(t)return t.concat();for(var n,r=function e(t,n){var r=[],i=!!n;n=n||0;for(var a="unknown",o="",s=0;s0){var t=e.replace(st,function(e){return Array(e.length+1).join("1")}).replace(ot,"ᄢ㍄").indexOf("|");if(t>-1)return{type:"text",filters:e.slice(t).trim(),expr:e.slice(0,t)}}return{type:"text",expr:e,filters:""}}function ut(e){for(var t,n,r=[],i=0;;){if(-1===(n=e.indexOf(L,i)))break;if((t=e.slice(i,n))&&r.push({expr:t}),i=n+L.length,-1===(n=e.indexOf(M,i)))break;(t=e.slice(i,n))&&r.push(lt(t.replace(ct,""))),i=n+M.length}return(t=e.slice(i))&&r.push({expr:t}),r}function ft(e,t,r){var i=[],a=ut(e.data);if(a.length){for(var o,s=0;o=a[s++];){var c=n.createTextNode(o.expr);o.type&&(o.expr=o.expr.replace(Ge,function(){return o.oneTime=!0,""}),o.element=c,o.filters=o.filters.replace(at,function(){return o.type="html",""}),o.pos=1e3*r+s,i.push(o)),$.appendChild(c)}e.parentNode.replaceChild($,e),i.length&&Ye(i,t)}}var pt=function(){this.queue=[]};pt.prototype={render:function(e){if(!this.locked){this.locked=e?b.offsetHeight+10:1;var t=this;N.nextTick(function(){t.flush()})}},flush:function(){for(var e,t=0;e=this.queue[t++];)e.update&&e.update();this.locked=0,this.queue=[]}};var dt=new pt,ht={};["autofocus,autoplay,async,allowTransparency,checked,controls","declare,disabled,defer,defaultChecked,defaultSelected","contentEditable,isMap,loop,multiple,noHref,noResize,noShade","open,readOnly,selected"].join(",").replace(f,function(e){ht[e.toLowerCase()]=e});N.directive("attr",{init:function(e){if(e.expr=Fe(e.expr.trim()),"include"===e.type){var t=e.element;St(t,e),e.includeRendered=Ue(t,"data-rendered",e.vmodels),e.includeLoaded=Ue(t,"data-loaded",e.vmodels);var r=e.includeReplace=t.hasAttribute("replace");t.hasAttribute("cache")&&(e.templateCache={}),e.start=n.createComment(":include"),e.end=n.createComment(":include-end"),r?(e.element=e.end,e._element=t,t.parentNode.insertBefore(e.start,t),t.parentNode.insertBefore(e.end,t.nextSibling)):(t.insertBefore(e.start,t.firstChild),t.appendChild(e.end))}},update:function(e){var t=this.element,n=Object.create(null),r=d.test(t);if(e=K(e),this.param)e&&"object"==typeof e?Array.isArray(e)?n[this.param]=e:Date.isDate(e)?n[this.param]=e.toISOString():n[this.param]=e:n[this.param]=e;else{if(!e||"object"!=typeof e||Array.isArray(e)||Date.isDate(e))return;n=e}for(var i in n)if("style"!==i){if("xlink:"===i.slice(0,6)){var a=i;n[i=i.slice(6)]=n[a],delete n[a]}if(!1!==n[i]&&null!==n[i]&&void 0!==n[i]||(n[i]=""),"boolean"==typeof t[i]||"boolean"==typeof t[ht[i]]){a=i;if(ht[i]&&a!==ht[i]&&(a=ht[i]),n[i]=!!n[i],t[a]=n[i],!n[i]){t.removeAttribute(a);continue}}!r&&i in t.cloneNode(!1)?t[i]=n[i]:("object"==typeof n[i]&&(n[i]=Date.isDate(n[i])?n[i].toISOString():JSON.stringify(n[i])),t.setAttribute(i,n[i]))}else t.style.cssText=n[i]}});N.directive("class",{init:function(e){if(e.expr=e.expr.replace(/\n/g," ").replace(/\s+/g," "),"hover"===e.type||"active"===e.type){var t=new Function("return "+e.expr)();if(!e.hasBindEvent){var n=e.element,r=N(n),i="mouseenter",a="mouseleave";if("active"===e.type){n.tabIndex=n.tabIndex||-1,i="mousedown",a="mouseup";var o=r.bind("mouseleave",function(){r.removeClass(t)})}}var s=r.bind(i,function(){r.addClass(t)}),c=r.bind(a,function(){r.removeClass(t)});e.rollback=function(){r.unbind("mouseleave",o),r.unbind(i,s),r.unbind(a,c)},e.hasBindEvent=!0}},update:function(e){if("class"===this.type){var t=e;if(!t||this.param)return a('class指令语法错误 %c %s="%s"',"color:#f00",this.name,this.expr);for(var n in"string"==typeof t&&((t={})[e]=!0),N.isPlainObject(t)||(t=t.$model),t)this.element.classList.toggle(n,!!t[n])}}}),"hover,active".replace(f,function(e){S[e]=S.class}),N.directive("css",{init:S.attr.init,update:function(e){var t=N(this.element);if(this.param)t.css(this.param,e);else{if("object"!=typeof e)return a(':css指令格式错误 %c %s="%s"',"color:#f00",this.name,this.expr);var n=e;N.isPlainObject(n)||(n=e.$model),t.css(n)}}}),N.directive("data",{priority:100,init:S.attr.init,update:function(e){var t=N(this.element);if(this.param)t.data(this.param,e);else{if("object"!=typeof e)return a(':data指令格式错误 %c %s="%s"',"color:#f00",this.name,this.expr);var n=e;for(var r in N.isPlainObject(n)||(n=e.$model),n)t.data(r,n[r])}}});var vt=/^(?:checkbox|radio)$/,mt=/^(?:radio|checked)$/,yt=/^(file|button|reset|submit|checkbox|radio|range)$/;N.directive("duplex",{priority:2e3,init:function(e,t){var n=e.element,r=e.vmodels;e.changed=Ue(n,"data-changed",r)||w;var i=[],o=C("string,number,boolean,checked");"radio"===n.type&&""===e.param&&(e.param="checked"),e.param.replace(p,function(r){vt.test(n.type)&&mt.test(r)&&(r="checked",e.isChecked=!0,e.xtype="radio"),o[r]&&(t=!0),N.Array.ensure(i,r)}),t||i.push("string"),e.param=i.join("-"),e.xtype||(e.xtype="SELECT"===n.tagName?"select":"checkbox"===n.type?"checkbox":"radio"===n.type?"radio":/^change/.test(n.getAttribute("data-event"))?"change":"input"),n.expr=e.expr;var s=e.bound=function(t,r){n.addEventListener(t,r,!1);var i=e.rollback;e.rollback=function(){n.anotSetter=null,N.unbind(n,t,r),i&&i()}};function c(t){e.changed.call(this,t)}var l=!1;var u=function(t){var r=n.value;if(!l&&r!==e.oldValue&&null!==e.pipe){var i=e.pipe(r,e,"get");e.oldValue=r,e.setter(i),c.call(n,i),N.fireDom(n,"change")}};switch(e.xtype){case"radio":s("click",function(){var t=e.pipe(n.value,e,"get");e.setter(t),c.call(n,t)});break;case"checkbox":s("change",function(){var t=n.checked?"ensure":"remove",r=e.getter.apply(0,e.vmodels);Array.isArray(r)||(a(":duplex应用于checkbox上要对应一个数组"),r=[r]);var i=e.pipe(n.value,e,"get");N.Array[t](r,i),c.call(n,r)});break;case"change":s("change",u);break;case"input":s("input",u),s("keyup",u),s("compositionstart",function(){l=!0}),s("compositionend",function(){l=!1,setTimeout(u)}),s("DOMAutoComplete",u);break;case"select":s("change",function(){var t=N(n).val();if((t=Array.isArray(t)?t.map(function(t){return e.pipe(t,e,"get")}):e.pipe(t,e,"get"))+""!==e.oldValue)try{e.setter(t)}catch(e){a(e)}}),s("datasetchanged",function(t){if("selectDuplex"===t.bubble){var r=e._value,i=Array.isArray(r)?r.map(String):r+"";N(n).val(i),n.oldValue=i+"",c.call(n,i)}})}"input"!==e.xtype||yt.test(n.type)||("hidden"!==n.type&&(s("focus",function(){n.msFocus=!0}),s("blur",function(){n.msFocus=!1})),n.anotSetter=u,kt(function(){if(b.contains(n))n.msFocus||u();else if(!n.msRetain)return!1}))},update:function(e){var t,n=this.element;this.init||((this.pipe||(this.pipe=bt))(null,this,"init"),this.init=1);switch(this.xtype){case"input":n.value=e;break;case"change":if((t=this.pipe(e,this,"set"))!==this.oldValue){var r=!1;if(n.msFocus)try{var i=n.selectionStart;if(i===n.selectionEnd){var a=i;r=!0}}catch(e){}n.value=this.oldValue=t,r&&!n.readOnly&&(n.selectionStart=n.selectionEnd=a)}break;case"radio":t=this.isChecked?!!e:e+""===n.value,n.checked=t;break;case"checkbox":var o=[].concat(e);t=this.pipe(n.value,this,"get"),n.checked=o.indexOf(t)>-1;break;case"select":this._value=e,n.msHasEvent?N.fireDom(n,"datasetchanged",{bubble:n.msHasEvent}):n.msHasEvent="selectDuplex"}}});function gt(e){return null==e?"":e}function bt(e,t,n,r){return t.param.replace(p,function(r){var i=N.duplexHooks[r];i&&"function"==typeof i[n]&&(e=i[n](e,t))}),e}N.duplexHooks={checked:{get:function(e,t){return!t.oldValue}},string:{get:function(e){return e},set:gt},boolean:{get:function(e){return"true"===e},set:gt},number:{get:function(e,t){var n=+e;return+e===n?n:0},set:gt}};var $t,xt=[];function wt(){for(var e=xt.length-1;e>=0;e--){!1===(0,xt[e])()&&xt.splice(e,1)}xt.length||clearInterval($t)}N.tick=function(e){1===xt.push(e)&&($t=setInterval(wt,60))};var kt=w;new function(){try{var e={},t=HTMLInputElement.prototype,n=HTMLTextAreaElement.prototype;function r(t){e[this.tagName].call(this,t),!this.msFocus&&this.anotSetter&&this.anotSetter()}var i=HTMLInputElement.prototype;Object.getOwnPropertyNames(i),e.INPUT=Object.getOwnPropertyDescriptor(t,"value").set,Object.defineProperty(t,"value",{set:r}),e.TEXTAREA=Object.getOwnPropertyDescriptor(n,"value").set,Object.defineProperty(n,"value",{set:r})}catch(e){kt=N.tick}},N.directive("effect",{priority:5,init:function(e){var t,n,r=e.expr,i=r.replace(F,function(e){return e.replace(/./g,"0")}).indexOf(":");-1===i?(t=r,n=!0):(t=r.slice(0,i),n=r.slice(i+1)),t=H.test(r)?Fe(t):We(t),e.expr="["+t+","+n+"]"},update:function(e){var t=e[0],n=this.element;if(n.getAttribute("data-effect-name")!==t){n.removeAttribute("data-effect-driver");var r=n.style,i=window.getComputedStyle?window.getComputedStyle(n):null,a=!1;if(i&&(Nt||jt)){var o=r[Tt]||i[Tt];o&&"0s"!==o&&(n.setAttribute("data-effect-driver","t"),a=!0),a||(o=r[Ot]||i[Ot])&&"0s"!==o&&(n.setAttribute("data-effect-driver","a"),a=!0)}a||N.effects[t]&&(n.setAttribute("data-effect-driver","j"),a=!0),a&&n.setAttribute("data-effect-name",t)}}}),N.effects={},N.effect=function(e,t){N.effects[e]=t};var Ct,At,Nt=!1,jt=!1,Tt=N.cssName("transition-duration"),Ot=N.cssName("animation-duration");new function(){var e,t,n={TransitionEvent:"transitionend",WebKitTransitionEvent:"webkitTransitionEnd",OTransitionEvent:"oTransitionEnd",otransitionEvent:"otransitionEnd"};for(var r in n){if(window[r]){e=n[r];break}try{document.createEvent(r);e=n[r];break}catch(e){}}for(r in"string"==typeof e&&(Nt=!0,Ct=e),n={AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"})if(window[r]){t=n[r];break}"string"==typeof t&&(Nt=!0,At=t)};var Et=[];function St(e,t){var n=e.getAttribute("data-effect-name");if(n){t.effectName=n,t.effectDriver=e.getAttribute("data-effect-driver");var r=+e.getAttribute("data-effect-stagger");t.effectLeaveStagger=+e.getAttribute("data-effect-leave-stagger")||r,t.effectEnterStagger=+e.getAttribute("data-effect-enter-stagger")||r,t.effectClass=e.className||NaN}}function Dt(e){return e.replace(/^[\S]/g,function(e){return e.toUpperCase()})}var _t=new pt;function Pt(){}function Lt(e,t){var n=e.callbacks[t+"Class"];return"string"==typeof n?n:"function"==typeof n?n():e.name+"-"+t}function Mt(e,t,n){var r=e.callbacks[t];r&&r.call(e,e.el,n)}Pt.prototype={contrustor:Pt,enterClass:function(){return Lt(this,"enter")},leaveClass:function(){return Lt(this,"leave")},actionFun:function(e,t,n){if(!document.hidden){var r=this,i=r.el,a="leave"===e;e=a?"leave":"enter",Mt(r,"abort"+Dt(a?"enter":"leave")),Mt(r,"before"+Dt(e)),a||t(i);var o=function(o){i.removeEventListener(r.cssEvent,r.cssCallback),a?(t(i),N(i).removeClass(r.cssClass)):"a"===r.driver&&N(i).removeClass(r.cssClass),!0!==o&&(Mt(r,"after"+Dt(e)),n&&n(i)),r.dispose()};r.useCss?(r.cssCallback&&r.cssCallback(!0),r.cssClass=Lt(r,e),r.cssCallback=o,r.update=function(){i.addEventListener(r.cssEvent,r.cssCallback),a||"t"!==r.driver||N(i).removeClass(r.cssClass)},N(i).addClass(r.cssClass),_t.render(!0),_t.queue.push(r)):Mt(r,e,o)}},enter:function(e,t){this.actionFun.apply(this,["enter"].concat(N.slice(arguments)))},leave:function(e,t){this.actionFun.apply(this,["leave"].concat(N.slice(arguments)))},dispose:function(){this.update=this.cssCallback=null,Et.unshift(this)>100&&Et.pop()}};var Ht=function(e,t){var n=g.call(arguments,0);"function"!=typeof n[2]&&n.splice(2,0,w),"function"!=typeof n[3]&&n.splice(3,0,w);var r=n[2],i=n[3],a=function(e,t){if(!e||1!==e.nodeType)return null;if(t)var n=t.effectName,r=t.effectDriver;else n=e.getAttribute("data-effect-name"),r=e.getAttribute("data-effect-driver");if(!n||!r)return null;var i=Et.pop()||new Pt;return i.el=e,i.driver=r,i.useCss="j"!==r,i.useCss&&(t&&N(e).addClass(t.effectClass),i.cssEvent="t"===r?Ct:At),i.name=n,i.callbacks=N.effects[n]||{},i}(e,n[4]);if(!a)return r(),i(),!1;a[t?"enter":"leave"](r,i)};N.mix(N.effect,{apply:Ht,append:function(e,t,n,r){return Ht(e,1,function(){t.appendChild(e)},n,r)},before:function(e,t,n,r){return Ht(e,1,function(){t.parentNode.insertBefore(e,t)},n,r)},remove:function(e,t,n,r){return Ht(e,0,function(){e.parentNode===t&&t.removeChild(e)},n,r)}}),N.directive("html",{update:function(e){var t=this.element,r=1!==t.nodeType,i=r?t.parentNode:t;if(i){if(e=null==e?"":e,3===t.nodeType){var a=A("html");i.insertBefore(n.createComment(a),t),this.element=n.createComment(a+":end"),i.replaceChild(this.element,t),t=this.element}if("object"!=typeof e)var o=N.parseHTML(String(e));else if(11===e.nodeType)o=e;else if(1===e.nodeType||e.item){var s=1===e.nodeType?e.childNodes:e.item;for(o=$.cloneNode(!0);s[0];)o.appendChild(s[0])}if(s=N.slice(o.childNodes),r){for(var c=t.nodeValue.slice(0,-4);;){var l=t.previousSibling;if(!l||8===l.nodeType&&l.nodeValue===c)break;i.removeChild(l)}i.insertBefore(o,t)}else N.clearHTML(t).appendChild(o);rt(s,this.vmodels)}}}),N.directive("text",{update:function(e){var t=this.element;if(e=null==e?"":e,3===t.nodeType)try{t.data=e}catch(e){}else t.textContent=e}}),N.directive("if",{priority:10,update:function(e){var t,r=this,a=this.element,o=r.stamp=Date.now(),s=function(){o===r.stamp&&(r.recoverNode=null)};r.recoverNode&&r.recoverNode();try{if(!a.parentNode)return;t=a.parentNode}catch(e){return}if(e){function c(){a.getAttribute(r.name)&&(a.removeAttribute(r.name),et(a,r.vmodels)),r.rollback=null}if(8===a.nodeType){var l=r.keep,u=N.effect.apply(l,1,function(){o===r.stamp&&(a.parentNode.replaceChild(l,a),a=r.element=l,l.getAttribute("_required")&&(a.required=!0,a.removeAttribute("_required")),a.querySelectorAll&&N.each(a.querySelectorAll("[_required=true]"),function(e){e.required=!0,e.removeAttribute("_required")}),c())},s);u=!1===u}u||c()}else if(1===a.nodeType){!0===a.required&&(a.required=!1,a.setAttribute("_required","true"));try{N.each(a.querySelectorAll(":required"),function(e){a.required=!1,e.setAttribute("_required","true")})}catch(e){}var f=r.element=n.createComment(":if"),p=a.nextSibling;r.recoverNode=function(){r.recoverNode=null,f.parentNode!==t&&(t.insertBefore(f,p),r.keep=a)},N.effect.apply(a,0,function(){r.recoverNode=null,o===r.stamp&&(a.parentNode.replaceChild(f,a),r.keep=a,i.appendChild(a),r.rollback=function(){a.parentNode===i&&i.removeChild(a)})},s)}}});var Ft=N.templateCache={};function Bt(e){for(var t=n.createDocumentFragment(),r=0,i=e.length;r=200&&this.status<400?m.resolve(this.response):m.reject(this))},v.send(null),m.promise).then(t=>{Ft[e]=t,y(t)}).catch(t=>{a(":include load ["+e+"] error\n%c%s","color:#f30",`获取网络资源出错, ${t.status} (${t.statusText})`)})}}});var It=/\(([^)]*)\)/,Rt=N.directive("on",{priority:3e3,init:function(e){var t=e.expr;e.type="on";var n=e.param.replace(/-\d+$/,"");if("function"==typeof Rt[n+"Hook"]&&Rt[n+"Hook"](e),t.indexOf("(")>0&&t.indexOf(")")>-1){var r=(t.match(It)||["",""])[1].trim();""!==r&&"$event"!==r||(t=t.replace(It,""))}e.expr=t},update:function(e){var t=this,n=this.element;e=function(e){return(t.getter||w).apply(t.args[0],t.args.concat(e))};var r=t.param.replace(/-\d+$/,"");if("scan"===r)e.call(n,{type:r});else if("function"==typeof t.specialBind)t.specialBind(n,e);else var i=N.bind(n,r,e);t.rollback=function(){"function"==typeof t.specialUnbind?t.specialUnbind():N.unbind(n,r,i)}}});function qt(e,t,n){for(var r,i=0;r=e[i++];)r.className===n.effectClass&&N.effect.apply(r,t,w,w,n)}function Vt(e,t,n){return e?setTimeout(t,++n*e):t(),n}function Wt(e,t,n){for(var r=$.cloneNode(!1),i=e,a=i.nodeValue,o=t&&Math.max(+t.staggerIndex,0),s=N.slice(i.parentNode.childNodes),c=s.indexOf(i);;){var l=s[--c];if(!l||0===String(l.nodeValue).indexOf(a))break;!n&&t&&l.className===t.effectClass?(e=l,function(e){t.staggerIndex=Vt(t.effectLeaveStagger,function(){N.effect.apply(e,0,w,function(){r.appendChild(e)},t)},o)}(l)):r.insertBefore(l,r.firstChild)}return r.appendChild(i),r}function zt(e,t,n,r,i){var a=e.template.cloneNode(!0),o=N.slice(a.childNodes);a.appendChild(n.$anchor),i&&t.appendChild(a);n[e.param||"el"];var s={nodes:o,vmodels:[n].concat(e.vmodels),content:a};r.push(s)}function Ut(e){var t=("object"===e.xtype?Kt:Jt)(e);return(t.$anchor||(t.$anchor=e.element.cloneNode(!1))).nodeValue=e.signature,t.$outer=e.$outer,t}function Yt(e,t,n){if("array"===n){e.$remove=function(){t.$repeat.removeAt(e.$index)};var r=t.param;e.$watch(r,function(n){var r=e.$index;t.$repeat[r]=n})}else{var i=t.vars[0],a=t.vars[1];e.$up.$watch(t.expr+"."+e[i],function(n){e[t.param][a]=n,e[a]=n})}}N.directive("for",{priority:90,init:function(e){var t=e.type;e.cache={},e.enterCount=0;var r=e.element;if(1===r.nodeType){var i=e.expr.split(" in ");e.expr=i.pop(),i.length&&(i=i.pop().split(/\s+/)),e.vars=i,r.removeAttribute(e.name),St(r,e);var a=Ue(r,"data-rendered",e.vmodels),o=A(t),s=n.createComment(o+":start"),c=e.element=n.createComment(o+":end");e.signature=o,e.start=s,e.template=$.cloneNode(!1);var l=r.parentNode;if(l.replaceChild(c,r),l.insertBefore(s,c),e.template.appendChild(r),e.element=c,a)var u=N.bind(l,"datasetchanged",function(){a.apply(l,l.args),N.unbind(l,"datasetchanged",u),l.msRendered=a})}},update:function(e,t){var n=this,r=this.xtype;"array"===r?(this.vars.length?1===this.vars.length&&this.vars.unshift("$index"):this.vars.push("$index","el"),this.param=this.vars[1]):(this.param="__el__",this.vars.length?1===this.vars.length&&this.vars.push("$val"):this.vars.push("$key","$val")),this.enterCount+=1;var i=!t;if(i){n.$outer={};var a=this.vars[0],o=this.vars[1];"array"===r&&(a="$first",o="$last");for(var s,c=0;s=n.vmodels[c++];)if(s.hasOwnProperty(a)&&s.hasOwnProperty(o)){n.$outer=s;break}}var l=this.track,u="move";n.$repeat=e;var f=[],p=i&&$.cloneNode(!1),d=[],h=this.param,v=N.mix({},this.cache),m=this.element,y=l.length,g=m.parentNode,b=0;for(c=0;c10,A=m.previousSibling,j=n.start;if(C)for(;A!==j;)g.removeChild(A),A=m.previousSibling;for(c=0;cP.maxRepeatSize&&i.pop(),delete e[t]}}function Qt(e,t){var r="_"+e;if(!Qt[r]){var i=n.createElement(e);b.appendChild(i),t=getComputedStyle(i,null).display,b.removeChild(i),Qt[r]=t}return Qt[r]}N.parseDisplay=Qt,N.directive("visible",{init:function(e){St(e.element,e)},update:function(e){var t,n=this,r=this.element,i=!this.effectName;if(!this.stamp)return t=this.stamp=Date.now(),void(e?(r.style.display=n.display||"","none"===N(r).css("display")&&(r.style.display=n.display=Qt(r.nodeName))):r.style.display="none");t=this.stamp=+new Date,e?N.effect.apply(r,1,function(){if(t===n.stamp){var e=r.getAttribute("data-effect-driver")||"a";i&&(r.style.display=n.display||""),"a"!==e&&"t"!==e||"none"===N(r).css("display")&&(r.style.display=n.display||Qt(r.nodeName))}}):N.effect.apply(r,0,function(){t===n.stamp&&(r.style.display="none")})}});var en=/]*>([\S\s]*?)<\/script\s*>/gim,tn=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,nn=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/gi,rn={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/gi,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/gi,form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/gi},an=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,on=/([^\#-~| |!])/g;function sn(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+e)?+e:0,a=isFinite(+t)?Math.abs(t):3,o=r||",",s=n||".",c="";return(c=(a?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(i,a):""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(c[1]||"").length>=0)%60,n=Math.floor(e/60),r=Math.floor(n/60);return n=(n%=60)<10?"0"+n:n,t=t<10?"0"+t:t,r>0?(r=r<10?"0"+r:r)+":"+n+":"+t:n+":"+t},$filter:function(e){for(var t=1,n=arguments.length;t/g,">")},currency:function(e,t,n){return(t||"¥")+sn(e,isFinite(n)?n:2)},number:sn,date:function(e,t){var n=e;if(!Date.isDate(n)){var r=+n;if(r==r&&(n=r),"Invalid Date"===(n=new Date(n)).toString())return"Invalid Date"}return n.format(t)}};let ln,un=[],fn=function(e){for(ln=!0;e=un.shift();)e(N)};return"complete"===n.readyState?setTimeout(fn):n.addEventListener("DOMContentLoaded",fn),window.addEventListener("load",fn),N.ready=function(e){ln?e(N):un.push(e)},window.Anot=N,N}();export default _Anot; \ No newline at end of file diff --git a/src/lib/css/reset-basic.css b/src/lib/css/reset-basic.css deleted file mode 100644 index b064f65..0000000 --- a/src/lib/css/reset-basic.css +++ /dev/null @@ -1,82 +0,0 @@ -@charset "UTF-8"; -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2014-10-10 00:45:09 - * - * CSS规范 - * - * 不能出现大写,以连字符风格命名 - * - * 样式规则的出现顺序 - * 1 display float position overflow z-index 表示定位/布局的属性 - * 2 width height margin padding border 表示盒子模型的属性 - * 3 line-height font-size vertical-align text-align user-select outline ....排版相关的属性 - * 4 color background opacity cursor ...表示装饰相关的属性 - * 5 content list-style quotes ... 内容生成相关的属性 - * - */ - -* {margin: 0;padding: 0;vertical-align: baseline;box-sizing: border-box;} -::before, ::after {box-sizing: border-box;} -/* HTML5 display-role reset for older browsers */ -article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,content {display: block;} -img {border: 0;display: inline-block;} -ol,ul {list-style: none;} -blockquote, q {quotes: none;} -blockquote::before, blockquote::after, q::before, q::after {content: '';content: none;} -table {border-collapse: collapse;border-spacing: 0;} -a:focus,input,textarea,button:focus,input:focus,textarea:focus {outline: none;} -::-moz-focus-inner {border: none;outline: none;} - -body {font-family: 'Helvetica Neue', Arial, 'WenQuanYi Micro Hei', 'PingFang SC', 'Hiragino Sans GB', 'Segoe UI', 'Microsoft Yahei', sans-serif;-webkit-font-smoothing: antialiased;text-size-adjust: 100%;-webkit-tap-highlight-color: transparent;} -code, pre, samp {font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;white-space:pre-wrap;} -[anot],[\:repeat],[\:if] {visibility: hidden;} - -.noselect {-webkit-touch-callout: none;-webkit-user-select: none;-moz-user-select: none;user-select: none;} -.noselect img, .noselect a {-webkit-user-drag: none;} -.text-ell {overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} -.text-thin {-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;} - -:root { - /* primary */ - --color-teal-a: rgba(72, 201, 176, 0.35); - --color-teal-1: rgb(72, 201, 176); - --color-teal-2: rgb(26, 188, 156); - --color-teal-3: rgb(22, 160, 133); - /* success */ - --color-green-a: rgba(70, 221, 126, 0.35); - --color-green-1: rgb(70, 221, 126); - --color-green-2: rgb(47, 208, 105); - --color-green-3: rgb(26, 196, 88); - /* info */ - --color-blue-a: rgba(100, 181, 246, 0.35); - --color-blue-1: rgb(100, 181, 246); - --color-blue-2: rgb(66, 165, 245); - --color-blue-3: rgb(33, 150, 243); - /* danger */ - --color-red-a: rgba(252, 118, 97, 0.35); - --color-red-1: rgb(252, 118, 97); - --color-red-2: rgb(255, 95, 69); - --color-red-3: rgb(243, 62, 34); - /* warning */ - --color-orange-a: rgba(254, 174, 117, 0.35); - --color-orange-1: #feae75; - --color-orange-2: #fd964b; - --color-orange-3: #f97316; - /* default1 */ - --color-plain-a: rgba(150, 204, 248, 0.35); - --color-plain-1: rgb(242, 245, 252); - --color-plain-2: rgb(232, 235, 244); - --color-plain-3: rgb(218, 225, 233); - /* default2 */ - --color-grey-a: rgba(206, 214, 224, 0.35); - --color-grey-1: rgb(206, 214, 224); - --color-grey-2: rgb(164, 176, 190); - --color-grey-3: rgb(134, 144, 155); - /* inverse */ - --color-dark-a: rgba(100, 116, 139, 0.35); - --color-dark-1: #64748B; - --color-dark-2: #475569; - --color-dark-3: #2c3441; -} diff --git a/src/lib/drag/core.js b/src/lib/drag/core.js deleted file mode 100644 index 3949b0a..0000000 --- a/src/lib/drag/core.js +++ /dev/null @@ -1 +0,0 @@ -import e from"../utils.js";const c={axis:"",limit:!1,overflow:!0};class g{constructor(t){this.$elem=t,this._init()}_init(){this.$elem.style.transform="";var{x:t,y:n}=this.$elem.getBoundingClientRect();this.pos={x:t,y:n,_x:0,_y:0}}by(t,n={}){return this.$drag=t,this.opt=Object.assign(Object.create(null),c,n),this.opt.limit!==!1&&(this.opt.overflow=!1),t.style.cursor="move",this._handleResize=e.bind(window,"resize",this._init.bind(this)),this._handleMousedown=e.bind(t,"mousedown",p=>{if(this.disabled)return;var l=this.$elem.getBoundingClientRect();l.x-this.pos._x!==this.pos.x&&(this.pos.x=l.x-this.pos._x),l.y-this.pos._y!==this.pos.y&&(this.pos.y=l.y-this.pos._y);let r=p.pageX,a=p.pageY,u=document.documentElement.clientWidth,f=document.documentElement.clientHeight,d=l.width,m=l.height,s=[0,u-d,f-m,0];if(this.opt.limit==="parent"){let i=this.$elem.parentNode.getBoundingClientRect();s=[i.top,i.right-d,i.bottom-m,i.left]}let x=e.bind(document,"mousemove",i=>{i.preventDefault();let o=i.pageX-r+(l.x-this.pos.x),h=i.pageY-a+(l.y-this.pos.y);this.opt.axis==="x"&&(h=0),this.opt.axis==="y"&&(o=0),this.opt.overflow===!1&&(os[1]-this.pos.x&&(o=s[1]-this.pos.x),hs[2]-this.pos.y&&(h=s[2]-this.pos.y)),this.pos._x=o,this.pos._y=h,this.$elem.dispatchEvent(new CustomEvent("dragging",{detail:{offset:{x:this.pos.x+o,y:this.pos.y+h},move:{x:o,y:h}}})),this.$elem.style.transform=`translate(${o}px, ${h}px)`}),y=e.bind(document,"mouseup",i=>{this.$elem.dispatchEvent(new CustomEvent("dragged",{detail:{offset:{x:this.pos.x+this.pos._x,y:this.pos.y+this.pos._y},move:{x:this.pos._x,y:this.pos._y}}})),e.unbind(document,"mousemove",x),e.unbind(document,"mouseup",y)})}),this}on(t,n){if(!(!t||typeof n!="function"))return e.bind(this,t,n)}off(t,n){e.unbind(this,t,n)}destroy(){e.unbind(window,"resize",this._handleResize),e.unbind(this.$drag,"mousedown",this._handleMousedown),delete this.$elem,delete this.$drag}}export{g as default}; diff --git a/src/lib/drag/doc.md b/src/lib/drag/doc.md deleted file mode 100644 index 0cd4766..0000000 --- a/src/lib/drag/doc.md +++ /dev/null @@ -1,85 +0,0 @@ -# 拖拽插件 -> 该插件可以让任意一个元素可以被拖拽,而不需要该元素是否具有定位属性。 -> 使用时,在目标元素上添加`:drag`属性即可以实现拖拽功能。 - -## 依赖 -> 依赖`Anot`框架 - -## 浏览器兼容性 -+ chrome -+ firefox -+ safari -+ IE10+ - - -## 用法 -> 只需要在要拖拽的元素上添加`:drag`即可; -> 如果要拖拽的元素不是当前元素,只需要给该属性增加一个值为想要拖拽元素的类名或ID。 -> 具体请看示例: -> **注意:** `拖拽的元素不是本身时,只会往父级一级一级找相匹配的` - -```html - - - - - - - - -
- -
-
-
- - - - - - -``` - - -## 额外参数 - -### `data-limit` -> 用于限制元素的拖动范围,默认没有限制。 可选值为 "window"和"parent", 分别为 "限制在可视区"和"限制在父级元素的范围" - -### `data-axis` -> 用于限制拖动的方向, 默认值为 "xy",即不限制方向。可选值为 "x"和"y", 即只能在"x轴"或"y轴"方向拖动。 - -### `data-beforedrag` -> 拖动前的回调,如果有设置回调方法, 则该回调的返回值,可决定该元素是否能被拖拽, 可用于在特殊场景下,临时禁用拖拽。 -> `注:` -> 1. 该回调方法,会传入3个参数, 第1个为被拖拽的元素(dom对象), 第2个参数为 该元素的x轴绝对坐标, 第3个元素为y轴绝对坐标; -> 2. 该回调方法, 返回false时, 本次拖拽将临时失效, 返回其他值,或没有返回值,则忽略。 - - -### `data-dragging` -> 元素被拖动时的回调。 -> `注:` -> 1.该回调方法,会传入3个参数, 第1个为被拖拽的元素(dom对象), 第2个参数为 该元素的x轴绝对坐标, 第3个元素为y轴绝对坐标; - - -### `data-dragged` -> 元素被拖动结束后的回调。 -> `注:` -> 1. 该回调方法,会传入3个参数, 第1个为被拖拽的元素(dom对象), 第2个参数为 该元素的x轴绝对坐标, 第3个元素为y轴绝对坐标; - - - - - - - - diff --git a/src/lib/drag/index.js b/src/lib/drag/index.js deleted file mode 100644 index 02e42e1..0000000 --- a/src/lib/drag/index.js +++ /dev/null @@ -1 +0,0 @@ -import a from"./core.js";Anot.directive("drag",{priority:1500,init:function(e){e.expr='"'+e.expr+'"',e.overflow=!0,e.axis="xy",e.element.dataset.axis&&(e.axis=e.element.dataset.axis,delete e.element.dataset.axis),e.limit=!1,e.element.dataset.limit&&(e.limit=e.element.dataset.limit,e.overflow=!1,delete e.element.dataset.limit)},update:function(e){var t=this.element;if(e)for(t=this.element.parentNode;t;){if(t.classList||Anot.error(`${this.name}=${this.expr}, \u89E3\u6790\u5F02\u5E38[\u5143\u7D20\u4E0D\u5B58\u5728]`),t.tagName==="WC-LAYER"&&e==="layer"){t=t.root.children[1];break}if(t.classList.contains(e)||t.id===e)break;t=t.parentNode}new a(t).by(this.element,{limit:this.limit,axis:this.axis,overflow:this.overflow})}}); diff --git a/src/lib/form/button.js b/src/lib/form/button.js deleted file mode 100644 index a3cbc8d..0000000 --- a/src/lib/form/button.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var h=Object.defineProperty;var c=(r,e,o)=>e in r?h(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o;var a=(r,e,o)=>(c(r,typeof e!="symbol"?e+"":e,o),o);import"../icon/index.js";import d from"../utils.js";class l extends HTMLElement{constructor(){super();a(this,"props",{icon:"",autofocus:"",loading:!1,disabled:!1,lazy:0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=' ',this.hasAttribute("circle")&&(this.textContent=""),this.__BTN__=this.root.children[1],this.__ICO__=this.__BTN__.children[0]}static get observedAttributes(){return["icon","autofocus","loading","disabled","lazy"]}get loading(){return this.props.loading}set loading(o){var t=typeof o;o!==this.props.loading&&(t==="boolean"&&o||t!=="boolean"?(this.props.loading=!0,this.__BTN__.disabled=!0,this.__ICO__.setAttribute("is","loading"),this.setAttribute("loading","")):(this.props.loading=!1,this.__BTN__.disabled=!1,this.__ICO__.setAttribute("is",this.props.icon),this.removeAttribute("loading")))}get disabled(){return this.props.disabled}set disabled(o){var t=typeof o;o!==this.props.disabled&&(t==="boolean"&&o||t!=="boolean"?(this.props.disabled=!0,this.__BTN__.disabled=!0,this.setAttribute("disabled","")):(this.props.disabled=!1,this.__BTN__.disabled=!1,this.removeAttribute("disabled")))}connectedCallback(){this.stamp=0,this._handleClick=d.bind(this,"click",o=>{var{loading:t,disabled:i,lazy:s}=this.props,n=Date.now();if(t||i||s&&n-this.stampthis.__BTN__.focus(),10);break;case"lazy":this.props.lazy=i>>0;break;case"loading":case"disabled":this[o]=i!==null;break}}}customElements.get("wc-button")||customElements.define("wc-button",l);export{l as default}; - diff --git a/src/lib/form/checkbox-item.js b/src/lib/form/checkbox-item.js deleted file mode 100644 index b9530b8..0000000 --- a/src/lib/form/checkbox-item.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var d=Object.defineProperty;var n=(r,o,e)=>o in r?d(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e;var l=(r,o,e)=>(n(r,typeof o!="symbol"?o+"":o,e),e);import"../icon/index.js";import s from"../utils.js";class c extends HTMLElement{constructor(){super();l(this,"props",{value:"",checked:!1,readonly:!1,disabled:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=' ',this.__SWITCH__=this.root.lastElementChild,this.__ICO__=this.__SWITCH__.children[0],this._isInGroup=!1}static get observedAttributes(){return["value","checked","readonly","disabled"]}_checkGroup(){this._isInGroup=this.parentNode.tagName==="WC-CHECKBOX-GROUP",this._isInGroup&&this.parentNode.root&&this.parentNode.value.includes(this.value)&&(this.checked=!0)}get value(){return this.props.value}set value(e){this.props.value=e}get checked(){return this.props.checked}set checked(e){this.props.checked=!!e,this.__SWITCH__.classList.toggle("checked",this.props.checked)}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__SWITCH__.removeAttribute("tabindex")):(this.props.disabled=!1,this.removeAttribute("disabled")))}_toggleCheck(){this.disabled||this.readOnly||(this.checked=!this.checked,this._isInGroup?this.parentNode.dispatchEvent(new CustomEvent("child-picked",{detail:{value:this.value,checked:this.checked}})):this.dispatchEvent(new CustomEvent("input")))}connectedCallback(){this._checkGroup(),this._handlClick=s.bind(this,"click",e=>{e.stopPropagation(),this._toggleCheck()}),this._handlKeydown=s.bind(this,"keydown",e=>{e.keyCode===32&&this._toggleCheck()})}disconnectedCallback(){s.unbind(this,"click",this._handlClick),s.unbind(this,"keydown",this._handlKeydown)}attributeChangedCallback(e,t,a){if(t!==a)switch(e){case"value":this.props[e]=a;break;case"checked":case"readonly":case"disabled":var i=e;i==="readonly"&&(i="readOnly"),this[i]=a!==null;break}}}customElements.get("wc-checkbox")||customElements.define("wc-checkbox",c);export{c as default}; - diff --git a/src/lib/form/checkbox.js b/src/lib/form/checkbox.js deleted file mode 100644 index 5771ba4..0000000 --- a/src/lib/form/checkbox.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var u=Object.defineProperty;var h=(i,r,e)=>r in i?u(i,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[r]=e;var l=(i,r,e)=>(h(i,typeof r!="symbol"?r+"":r,e),e);import d from"../utils.js";import"./checkbox-item.js";class o extends HTMLElement{constructor(){super();l(this,"props",{value:"",disabled:!1,readonly:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=" "}static get observedAttributes(){return["value","disabled","readonly"]}_updateChildrenStat(e){Array.from(this.children).forEach(t=>{t.tagName==="WC-CHECKBOX"?t.root&&(e&&(t.disabled=this.disabled,t.readOnly=this.readOnly),this.value.includes(t.value)?t.checked=!0:t.checked=!1):t.remove()})}get value(){return this.props.value}set value(e){e!==this.props.value&&(this.props.value=[...e],this._updateChildrenStat())}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly")),this._updateChildrenStat(!0))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled")),this._updateChildrenStat(!0))}connectedCallback(){this._pickedFn=d.bind(this,"child-picked",e=>{var t=[...this.props.value],s=t.indexOf(e.detail.value);e.detail.checked?s<0&&t.push(e.detail.value):~s&&t.splice(s,1),this.value=t,this.dispatchEvent(new CustomEvent("input"))}),this.__observer=new MutationObserver(e=>{this._updateChildrenStat(!0)}),this.__observer.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){d.unbind(this,"child-picked",this._pickedFn),this.__observer.disconnect()}attributeChangedCallback(e,t,s){if(t!==s)switch(e){case"value":s&&(this.value=s.split(",").map(n=>n.trim()));break;case"readonly":case"disabled":var a=e;a==="readonly"&&(a="readOnly"),this[a]=s!==null;break}}}customElements.get("wc-checkbox-group")||customElements.define("wc-checkbox-group",o);export{o as default}; - diff --git a/src/lib/form/dropdown.js b/src/lib/form/dropdown.js deleted file mode 100644 index 469b4f4..0000000 --- a/src/lib/form/dropdown.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var h=Object.defineProperty;var d=(r,t,e)=>t in r?h(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var a=(r,t,e)=>(d(r,typeof t!="symbol"?t+"":t,e),e);import"../icon/index.js";import"./option.js";import o from"../utils.js";class n extends HTMLElement{constructor(){super();a(this,"props",{value:"",placeholder:"",size:"",disabled:!1});a(this,"state",{optionShow:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
';var e=this.root.children[1];this.__PREVIEW__=e.children[0],this.__OPTIONS__=e.children[1],this.__INPUT__=this.__PREVIEW__.children[0],this.__ICO__=this.__PREVIEW__.children[1]}static get observedAttributes(){return["value","placeholder","size","disabled"]}_updateChildrenStat(){Array.from(this.children).forEach(e=>{e.tagName==="WC-OPTION"?e.root&&(e.value===this.props.value?(e.setAttribute("active",""),this.__INPUT__.value=e.label||e.textContent):e.removeAttribute("active")):e.remove()})}get value(){return this.props.value}set value(e){this.props.value=e,this._updateChildrenStat()}get disabled(){return this.props.disabled}set disabled(e){var i=typeof e;e!==this.props.disabled&&(i==="boolean"&&e||i!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__INPUT__.disabled=!0):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__INPUT__.disabled=!1))}connectedCallback(){this._activeFn=o.bind(this.__PREVIEW__,"click",e=>{this.disabled||(this.state.optionShow=!this.state.optionShow,this.__OPTIONS__.classList.toggle("active",this.state.optionShow))}),this._pickedFn=o.bind(this.__OPTIONS__,"click",e=>{let i=e.target;if(i!==e.currentTarget){for(;i.tagName!=="WC-OPTION";)i=i.parentNode;this.props.value=i.value,this._updateChildrenStat(),this.dispatchEvent(new CustomEvent("input")),this.state.optionShow=!1,this.__OPTIONS__.classList.toggle("active",!1)}}),this._inactiveFn=o.outside(this,e=>{this.state.optionShow=!1,this.__OPTIONS__.classList.toggle("active",!1)}),o.nextTick(e=>this._updateChildrenStat())}disconnectedCallback(){this.state.options=[],o.unbind(this.__PREVIEW__,"click",this._activeFn),o.unbind(this.__OPTIONS__,"click",this._pickedFn),o.clearOutside(this._inactiveFn)}attributeChangedCallback(e,i,s){if(i!==s)switch(e){case"value":s!==null&&(this.value=s);break;case"placeholder":this.__INPUT__.placeholder=s||"";break;case"size":s&&Array.from(this.children).forEach(l=>{l.setAttribute("size",s)});break;case"disabled":this.disabled=s!==null;break}}}customElements.get("wc-dropdown")||customElements.define("wc-dropdown",n);export{n as default}; - diff --git a/src/lib/form/index.js b/src/lib/form/index.js deleted file mode 100644 index 896cf70..0000000 --- a/src/lib/form/index.js +++ /dev/null @@ -1 +0,0 @@ -import"./button.js";import"./link.js";import"./input.js";import"./passwd.js";import"./textarea.js";import"./number.js";import"./radio.js";import"./checkbox.js";import"./switch.js";import"./select.js";import"./dropdown.js";import"./star.js"; diff --git a/src/lib/form/input.js b/src/lib/form/input.js deleted file mode 100644 index eebc61b..0000000 --- a/src/lib/form/input.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var g=Object.defineProperty;var x=(n,l,e)=>l in n?g(n,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[l]=e;var d=(n,l,e)=>(x(n,typeof l!="symbol"?l+"":l,e),e);import"../scroll/index.js";import"../icon/index.js";import r from"../utils.js";class p extends HTMLElement{constructor(){super();d(this,"props",{value:"",placeholder:"",maxlength:0,minlength:0,clearable:!1,autofocus:!1,readonly:!1,disabled:!1,lazy:0});d(this,"state",{list:[],mvidx:null});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__OUTER__=this.root.children[1],this.__PREPEND__=this.__OUTER__.children[0],this.__INPUT__=this.__OUTER__.children[1],this.__CLOSE__=this.__OUTER__.children[2],this.__APPEND__=this.__OUTER__.children[3],this.__LIST__=this.__OUTER__.children[4]}static get observedAttributes(){return["value","placeholder","maxlength","minlength","clearable","autofocus","readonly","disabled","lazy"]}get readOnly(){return this.props.readonly}set readOnly(e){var s=typeof e;e!==this.props.readonly&&(s==="boolean"&&e||s!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly",""),this.__INPUT__.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly"),this.__INPUT__.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(e){var s=typeof e;e!==this.props.disabled&&(s==="boolean"&&e||s!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__INPUT__.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__INPUT__.removeAttribute("disabled")))}get value(){return this.__INPUT__.value}set value(e){this.__INPUT__.value=e}_moveSelect(e){var{list:s}=this.state;if(s&&s.length){e.preventDefault();var t=e.keyCode===38?-1:1,i=Array.from(this.__LIST__.firstElementChild.firstElementChild.children);this.state.mvidx===null?this.state.mvidx=0:this.state.mvidx+=t,this.state.mvidx<0?this.state.mvidx=0:this.state.mvidx>i.length-1&&(this.state.mvidx=i.length-1),i.forEach((o,a)=>{a===this.state.mvidx?(this.__LIST__.firstElementChild.scrollTop=o.offsetTop-150,o.setAttribute("focus","")):o.removeAttribute("focus")})}}_fetchSelect(e,s){var t=this.state.list[e];this.value=t.value,this.dispatchEvent(new CustomEvent("select",{detail:t})),this._handleChange(s),this.__LIST__.classList.remove("show"),this.state.mvidx=null}connectedCallback(){var e=this.__PREPEND__.assignedNodes(),s=this.__APPEND__.assignedNodes();for(this.stamp=0;e.length>1;)this.removeChild(e.pop());for(;s.length>1;)this.removeChild(s.pop());e.length&&this.__OUTER__.setAttribute("prepend",""),s.length&&this.__OUTER__.setAttribute("append",""),this._handleSubmit=r.catch(this.__INPUT__,"keydown",t=>{let{minlength:i,lazy:o}=this.props,a=this.value;if(!(this.disabled||this.readOnly)){if(t.keyCode===38||t.keyCode===40)return this._moveSelect(t);if(t.keyCode===13){t.preventDefault();let h=Date.now();if(this.state.mvidx!==null)return this._fetchSelect(this.state.mvidx,t);if(o&&h-this.stamp0&&a.length{let i=Date.now(),{lazy:o}=this.props;o&&i-this.stamp{this.state.list=a,this._parseSuggestion()}}})))}),this._parseSuggestion=r.bind(this.__INPUT__,"click",t=>{var{list:i}=this.state;let{x:o,y:a,width:h,height:c}=this.getBoundingClientRect();if(i&&i.length){var u=i.map((_,b)=>`
  • ${_.value}
  • `).join("");this.__LIST__.firstElementChild.firstElementChild.innerHTML=u,this.__LIST__.classList.toggle("show",!0),this.__LIST__.style.cssText=`left:${o}px;top:${a+c+5}px;width:${h}px;`}else this.__LIST__.classList.toggle("show",!1)}),this._inactiveFn=r.outside(this,t=>{this.__LIST__.classList.remove("show")}),this._handleSelect=r.bind(this.__LIST__,"click",t=>{t.target.tagName==="LI"&&(this._fetchSelect(t.target.dataset.idx,t),this.dispatchEvent(new CustomEvent("input")))}),this._clearFn=r.bind(this.__CLOSE__,"click",t=>{this.value="",this.dispatchEvent(new CustomEvent("input"))})}disconnectedCallback(){r.unbind(this.__INPUT__,"keydown",this._handleSubmit),r.unbind(this.__INPUT__,"input",this._handleChange),r.unbind(this.__INPUT__,"click",this._parseSuggestion),r.unbind(this.__LIST__,"click",this._handleSelect),r.unbind(this.__CLOSE__,"click",this._clearFn),r.clearOutside(this._inactiveFn)}attributeChangedCallback(e,s,t){if(s!==t)switch(e){case"autofocus":this.__INPUT__.setAttribute("autofocus",""),setTimeout(o=>{this.__INPUT__.focus()},10);break;case"placeholder":this.__INPUT__.setAttribute("placeholder",t);break;case"value":this.value=t||"";break;case"maxlength":if(t===null)this.__INPUT__.removeAttribute(e);else{let o=+t;o>0?this.__INPUT__.setAttribute(e,o):this.removeAttribute(e)}break;case"lazy":this.props.lazy=t>>0;break;case"readonly":case"disabled":var i=e;i==="readonly"&&(i="readOnly"),this[i]=t!==null;break}}}customElements.get("wc-input")||customElements.define("wc-input",p);export{p as default}; - diff --git a/src/lib/form/link.js b/src/lib/form/link.js deleted file mode 100644 index d10739b..0000000 --- a/src/lib/form/link.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var d=Object.defineProperty;var c=(r,e,o)=>e in r?d(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o;var i=(r,e,o)=>(c(r,typeof e!="symbol"?e+"":e,o),o);import"../icon/index.js";import l from"../utils.js";class n extends HTMLElement{constructor(){super();i(this,"props",{to:null,autofocus:"",disabled:!1,lazy:0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=' ',this.__LINK__=this.root.children[1]}static get observedAttributes(){return["to","autofocus","disabled","lazy"]}get disabled(){return this.props.disabled}set disabled(o){var s=typeof o;o!==this.props.disabled&&(s==="boolean"&&o||s!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__LINK__.removeAttribute("tabindex")):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__LINK__.setAttribute("tabindex",0)))}connectedCallback(){this.stamp=0,this._handleClick=l.bind(this.__LINK__,"click",o=>{var{disabled:s,lazy:t}=this.props,a=Date.now();if(s){o.stopPropagation(),o.preventDefault();return}if(t&&a-this.stampthis.__LINK__.focus(),10);break;case"to":t===null?this.__LINK__.removeAttribute("href"):this.__LINK__.setAttribute("href",t);break;case"lazy":this.props.lazy=t>>0;break;case"disabled":this[o]=t!==null;break}}}customElements.get("wc-link")||customElements.define("wc-link",n);export{n as default}; - diff --git a/src/lib/form/number.js b/src/lib/form/number.js deleted file mode 100644 index a4a335b..0000000 --- a/src/lib/form/number.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var h=Object.defineProperty;var p=(a,r,e)=>r in a?h(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var n=(a,r,e)=>(p(a,typeof r!="symbol"?r+"":r,e),e);import l from"../utils.js";class d extends HTMLElement{constructor(){super();n(this,"props",{value:0,max:null,min:null,step:1,autofocus:!1,readonly:!1,disabled:!1,lazy:0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    - +
    ',this.__OUTER__=this.root.children[1],this.__INPUT__=this.__OUTER__.children[1]}static get observedAttributes(){return["value","max","min","step","autofocus","readonly","disabled","lazy"]}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly",""),this.__INPUT__.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly"),this.__INPUT__.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__INPUT__.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__INPUT__.removeAttribute("disabled")))}get value(){return this.props.value}set value(e){var t=+e;t===t?e=t:e=0,this.props.value=e,this.__INPUT__.value=e,this._checkActionEnable(),this.dispatchEvent(new CustomEvent("input"))}_checkActionEnable(){var{max:e,min:t,value:i}=this.props,s=i;t!==null&&(t>s&&(s=t),this.__OUTER__.children[0].classList.toggle("disabled",i<=t)),e!==null&&(e=e)),s!==i&&(this.props.value=s,this.__INPUT__.value=s)}_updateValue(e){var{max:t,min:i,value:s,step:o}=this.props;if(e==="+"){if(t!==null&&ts-o)return;s-=o}this.props.value=+s.toFixed(2),this.__INPUT__.value=this.props.value,this._checkActionEnable(),this.dispatchEvent(new CustomEvent("input"))}connectedCallback(){this.stamp=0,this._handleSubmit=l.catch(this.__INPUT__,"keydown",e=>{let t=Date.now(),{lazy:i}=this.props;if(!(this.disabled||this.readOnly)){if(e.keyCode===38||e.keyCode===40)return e.preventDefault(),this._updateValue(e.keyCode===38?"+":"-");if(e.keyCode===13){if(e.preventDefault(),i&&t-this.stamp{isFinite(this.__INPUT__.value)?this.value=this.__INPUT__.value:this.value=0}),this._handleAction=l.bind(this.__OUTER__,"click",e=>{this.disabled||this.readOnly||e.target.tagName==="SPAN"&&this._updateValue(e.target.dataset.act)})}disconnectedCallback(){l.unbind(this.__INPUT__,"keydown",this._handleSubmit),l.unbind(this.__OUTER__,"click",this._handleAction)}attributeChangedCallback(e,t,i){if(t!==i)switch(e){case"autofocus":this.__INPUT__.setAttribute("autofocus",""),setTimeout(c=>{this.__INPUT__.focus()},10);break;case"value":this.value=i>>0;break;case"step":case"max":case"min":var s=+i;s===s&&(this.props[e]=s),this._checkActionEnable();break;case"lazy":this.props.lazy=i>>0;break;case"readonly":case"disabled":var o=e;o==="readonly"&&(o="readOnly"),this[o]=i!==null;break}}}customElements.get("wc-number")||customElements.define("wc-number",d);export{d as default}; - diff --git a/src/lib/form/option.js b/src/lib/form/option.js deleted file mode 100644 index 07f71e7..0000000 --- a/src/lib/form/option.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var n=Object.defineProperty;var b=(s,t,e)=>t in s?n(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var r=(s,t,e)=>(b(s,typeof t!="symbol"?t+"":t,e),e);import o from"../utils.js";class a extends HTMLElement{constructor(){super();r(this,"props",{value:"",label:"",disabled:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=" ",this.__LABEL__=this.root.children[1]}static get observedAttributes(){return["value","label","disabled"]}get value(){return this.props.value}set value(e){e!==this.props.value&&(this.props.value=e)}get label(){return this.props.label}set label(e){e!==this.props.label&&(this.props.label=e,this.__LABEL__.textContent=e)}get disabled(){return this.props.disabled}set disabled(e){var i=typeof e;e!==this.props.disabled&&(i==="boolean"&&e||i!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled")))}connectedCallback(){this._clickFn=o.bind(this,"click",e=>{this.disabled&&e.stopPropagation()})}disconnectedCallback(){o.unbind(this,"click",this._clickFn)}attributeChangedCallback(e,i,l){if(i!==l)switch(e){case"value":case"label":l===null?this[e]="":this[e]=l;break;case"disabled":this.disabled=l!==null;break}}}customElements.get("wc-option")||customElements.define("wc-option",a);export{a as default}; - diff --git a/src/lib/form/passwd.js b/src/lib/form/passwd.js deleted file mode 100644 index 236f787..0000000 --- a/src/lib/form/passwd.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var b=Object.defineProperty;var c=(s,r,e)=>r in s?b(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var p=(s,r,e)=>(c(s,typeof r!="symbol"?r+"":r,e),e);import"../icon/index.js";import a from"../utils.js";class d extends HTMLElement{constructor(){super();p(this,"props",{value:"",placeholder:"",maxlength:0,minlength:0,autofocus:!1,readonly:!1,disabled:!1,lazy:0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__OUTER__=this.root.children[1],this.__PREPEND__=this.__OUTER__.children[0],this.__INPUT__=this.__OUTER__.children[1],this.__EYE__=this.__OUTER__.children[2],this.__APPEND__=this.__OUTER__.children[3]}static get observedAttributes(){return["value","placeholder","maxlength","minlength","autofocus","readonly","disabled","lazy"]}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly",""),this.__INPUT__.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly"),this.__INPUT__.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__INPUT__.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__INPUT__.removeAttribute("disabled")))}get value(){return this.__INPUT__.value}set value(e){this.__INPUT__.value=e}connectedCallback(){var e=this.__PREPEND__.assignedNodes(),t=this.__APPEND__.assignedNodes();for(this.stamp=0;e.length>1;)this.removeChild(e.pop());for(;t.length>1;)this.removeChild(t.pop());e.length&&this.__OUTER__.setAttribute("prepend",""),t.length&&this.__OUTER__.setAttribute("append",""),this._handleSubmit=a.catch(this.__INPUT__,"keydown",o=>{let{minlength:i,lazy:l}=this.props,h=this.value,n=Date.now();if(!(this.disabled||this.readOnly)&&o.keyCode===13){if(l&&n-this.stamp0&&h.length{this.__INPUT__.type==="password"?(this.__INPUT__.type="text",this.__EYE__.is="eye-off"):(this.__INPUT__.type="password",this.__EYE__.is="eye")})}disconnectedCallback(){a.unbind(this.__INPUT__,"keydown",this._handleSubmit),a.unbind(this.__EYE__,"click",this._eyeFn)}attributeChangedCallback(e,t,o){if(t!==o)switch(e){case"autofocus":this.__INPUT__.setAttribute("autofocus",""),setTimeout(l=>{this.__INPUT__.focus()},10);break;case"placeholder":this.__INPUT__.setAttribute("placeholder",o);break;case"value":this.value=o;break;case"maxlength":if(o===null)this.__INPUT__.removeAttribute(e);else{let l=+o;l>0?this.__INPUT__.setAttribute(e,l):this.removeAttribute(e)}break;case"lazy":this.props.lazy=o>>0;break;case"readonly":case"disabled":var i=e;i==="readonly"&&(i="readOnly"),this[i]=o!==null;break}}}customElements.get("wc-passwd")||customElements.define("wc-passwd",d);export{d as default}; - diff --git a/src/lib/form/radio-item.js b/src/lib/form/radio-item.js deleted file mode 100644 index 41de165..0000000 --- a/src/lib/form/radio-item.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var n=Object.defineProperty;var c=(r,o,e)=>o in r?n(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e;var i=(r,o,e)=>(c(r,typeof o!="symbol"?o+"":o,e),e);import a from"../utils.js";class d extends HTMLElement{constructor(){super();i(this,"props",{value:"",checked:!1,readonly:!1,disabled:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=' ',this.__SWITCH__=this.root.lastElementChild}static get observedAttributes(){return["value","checked","readonly","disabled"]}get value(){return this.props.value}set value(e){this.props.value=e}get checked(){return this.props.checked}set checked(e){this.props.checked=!!e,this.__SWITCH__.classList.toggle("checked",this.props.checked)}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__SWITCH__.removeAttribute("tabindex")):(this.props.disabled=!1,this.removeAttribute("disabled")))}_toggleCheck(){this.disabled||this.readOnly||this.checked||(this.checked=!0,this.parentNode.dispatchEvent(new CustomEvent("child-picked",{detail:this.value})))}connectedCallback(){this.value===this.parentNode.value&&(this.checked=!0),this._handleClick=a.catch(this,"click",e=>{e.stopPropagation(),this._toggleCheck()}),this._handlKeydown=a.bind(this,"keydown",e=>{e.keyCode===32&&this._toggleCheck()})}disconnectedCallback(){a.unbind(this,"click",this._handleClick),a.unbind(this,"keydown",this._handlKeydown)}attributeChangedCallback(e,t,s){if(t!==s)switch(e){case"value":this.value=s;break;case"checked":case"readonly":case"disabled":var l=e;l==="readonly"&&(l="readOnly"),this[l]=s!==null;break}}}customElements.get("wc-radio")||customElements.define("wc-radio",d);export{d as default}; - diff --git a/src/lib/form/radio.js b/src/lib/form/radio.js deleted file mode 100644 index 552ff5d..0000000 --- a/src/lib/form/radio.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var n=Object.defineProperty;var u=(s,r,e)=>r in s?n(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var d=(s,r,e)=>(u(s,typeof r!="symbol"?r+"":r,e),e);import l from"../utils.js";import"./radio-item.js";class o extends HTMLElement{constructor(){super();d(this,"props",{value:null,disabled:!1,readonly:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=" "}static get observedAttributes(){return["value","disabled","readonly"]}_updateChildrenStat(e){Array.from(this.children).forEach(t=>{t.tagName==="WC-RADIO"?t.root&&(e&&(t.disabled=this.disabled,t.readOnly=this.readOnly),t.value===this.props.value?t.checked=!0:t.checked=!1):t.remove()})}get value(){return this.props.value}set value(e){e!==this.props.value&&(this.props.value=e,this._updateChildrenStat())}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly")),this._updateChildrenStat(!0))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled")),this._updateChildrenStat(!0))}connectedCallback(){this._pickedFn=l.bind(this,"child-picked",e=>{this.value=e.detail,this.dispatchEvent(new CustomEvent("input"))}),this.__observer=new MutationObserver(e=>{this._updateChildrenStat(!0)}),this.__observer.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){l.unbind(this,"child-picked",this._pickedFn),this.__observer.disconnect()}attributeChangedCallback(e,t,i){if(t!==i)switch(e){case"value":this.value=i;break;case"readonly":case"disabled":var a=e;a==="readonly"&&(a="readOnly"),this[a]=i!==null;break}}}customElements.get("wc-radio-group")||customElements.define("wc-radio-group",o);export{o as default}; - diff --git a/src/lib/form/select.js b/src/lib/form/select.js deleted file mode 100644 index 3eab9c7..0000000 --- a/src/lib/form/select.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var c=Object.defineProperty;var u=(l,s,t)=>s in l?c(l,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[s]=t;var n=(l,s,t)=>(u(l,typeof s!="symbol"?s+"":s,t),t);import"../scroll/index.js";import"../icon/index.js";import d from"../utils.js";function b(l,s){let t="";for(let e of l)if(e.list){t+=`
    ${e.name}
    `;for(let i of e.list)s.DICT[i.value]=i,i.disabled||s.LIST.push(i),t+=`
    ${i.label}
    `}else e.disabled||s.LIST.push(e),s.DICT[e.value]=e,t+=`
    ${e.label}
    `;return t}class p extends HTMLElement{constructor(){super();n(this,"props",{label:"",placeholder:"",multi:"",value:"",mvidx:null,readonly:!1,disabled:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__OUTER__=this.root.children[1],this.__INPUT__=this.__OUTER__.children[0],this.__OPTG__=this.__OUTER__.children[2]}static get observedAttributes(){return["label","placeholder","multi","value","mvidx","readonly","disabled"]}get readOnly(){return this.props.readonly}set readOnly(t){var e=typeof t;t!==this.props.readonly&&(e==="boolean"&&t||e!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(t){var e=typeof t;t!==this.props.disabled&&(e==="boolean"&&t||e!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__INPUT__.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__INPUT__.removeAttribute("disabled")))}get value(){return this.props.value}set value(t){var{DICT:e,active:i}=this.props;this.props.value=t,this.__INPUT__.value=e&&e[t]&&e[t].label||t,i||this._updateStyle()}_renderOptions(t){this.props.DICT={},this.props.LIST=[];var e=this.__OPTG__.firstElementChild.firstElementChild;e.innerHTML=b(t,this.props),this.props.ITEMS=Array.from(e.children).filter(i=>i.tagName==="DD"&&!i.hasAttribute("disabled")),this.value=this.props.value}_moveSelect(t){var{LIST:e,DICT:i,ITEMS:r}=this.props;if(e&&e.length){t.preventDefault();var o=t.keyCode===38?-1:1;this.props.mvidx===null?this.props.mvidx=0:this.props.mvidx+=o,this.props.mvidx<0?this.props.mvidx=0:this.props.mvidx>r.length-1&&(this.props.mvidx=r.length-1),r.forEach((a,h)=>{h===this.props.mvidx?(this.__OPTG__.firstElementChild.scrollTop=a.offsetTop-150,a.setAttribute("focus","")):a.removeAttribute("focus")})}}_updateStyle(t){var{LIST:e,ITEMS:i,value:r}=this.props;if(e&&e.length){if(t===void 0){for(let o=-1,a;a=e[++o];)if(r===a.value){t=o;break}}this.props.mvidx=t,i.forEach((o,a)=>{a===t?o.setAttribute("focus",""):o.removeAttribute("focus")})}}_fetchSelect(t,e){var i=this.props.LIST[t];this.value=i.value,this.dispatchEvent(new CustomEvent("select",{detail:i})),e&&this._updateStyle(t),this.props.active=!1,this.__OPTG__.classList.remove("show")}connectedCallback(){function t(){var{x:e,y:i,width:r}=this.getBoundingClientRect(),o=this.getAttribute("size");this.props.active=!0,o&&o==="mini"?i+=32:i+=50,this.__OPTG__.style.cssText=`left:${e}px;top:${i}px;width:${r}px;`}this._handleKeydown=d.catch(this.__INPUT__,"keydown",e=>{if(!(this.disabled||this.readOnly)){if(e.keyCode===38||e.keyCode===40){if(!this.props.active){t.call(this),this.__OPTG__.classList.toggle("show",!0);return}return this._moveSelect(e)}if(e.keyCode===13&&this.props.mvidx!==null&&this.props.active)return this._fetchSelect(this.props.mvidx)}}),this._activeFn=d.bind(this.__INPUT__,"click",e=>{var{options:i}=this.props;this.disabled||this.readOnly||(t.call(this),this.__OPTG__.classList.toggle("show"))}),this._handleSelect=d.bind(this.__OPTG__,"click",e=>{e.target.tagName==="DD"&&!e.target.hasAttribute("disabled")&&(this._fetchSelect(+e.target.dataset.idx,!0),this.dispatchEvent(new CustomEvent("input")))}),this._inactiveFn=d.outside(this,e=>{this.__OPTG__.classList.toggle("show",!1),this.props.active=!1})}attributeChangedCallback(t,e,i){if(e!==i)switch(t){case"label":case"placeholder":this.__INPUT__.setAttribute("placeholder",i);break;case"value":this.value=i;break;case"readonly":case"disabled":var r=t;r==="readonly"&&(r="readOnly"),this[r]=i!==null;break}}disconnectedCallback(){d.unbind(this.__INPUT__,"keydown",this._handleKeydown),d.unbind(this.__INPUT__,"click",this._activeFn),d.unbind(this.__OPTG__,"click",this._handleSelect),d.clearOutside(this._inactiveFn)}}customElements.get("wc-select")||customElements.define("wc-select",p);export{p as default}; - diff --git a/src/lib/form/switch.js b/src/lib/form/switch.js deleted file mode 100644 index 0df0782..0000000 --- a/src/lib/form/switch.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var l=Object.defineProperty;var d=(i,t,e)=>t in i?l(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t,e)=>(d(i,typeof t!="symbol"?t+"":t,e),e);import c from"../utils.js";class o extends HTMLElement{constructor(){super();a(this,"props",{"active-text":null,"inactive-text":null,checked:!1,disabled:!1});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__SWITCH__=this.root.lastElementChild.firstElementChild}static get observedAttributes(){return["active-text","inactive-text","checked","disabled"]}get value(){return this.props.checked}set value(e){this.checked=e}get checked(){return this.props.checked}set checked(e){this.props.checked=!!e,this.__SWITCH__.classList.toggle("checked",this.props.checked)}get disabled(){return this.props.disabled}set disabled(e){var s=typeof e;e!==this.props.disabled&&(s==="boolean"&&e||s!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled")))}_updateStat(){this.checked?this.props["active-text"]!==null&&(this.textContent=this.props["active-text"]):this.props["inactive-text"]!==null&&(this.textContent=this.props["inactive-text"])}connectedCallback(){this._handleClick=c.bind(this,"click",e=>{this.disabled||(this.checked=!this.checked,this._updateStat(),this.dispatchEvent(new CustomEvent("input")))})}disconnectedCallback(){c.unbind(this,"click",this._handleClick)}attributeChangedCallback(e,s,r){if(s!==r)switch(e){case"checked":case"disabled":this[e]=r!==null;break;case"active-text":case"inactive-text":this.props[e]=r+"",this._updateStat();break}}}customElements.get("wc-switch")||customElements.define("wc-switch",o);export{o as default}; - diff --git a/src/lib/form/textarea.js b/src/lib/form/textarea.js deleted file mode 100644 index 667c817..0000000 --- a/src/lib/form/textarea.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var b=Object.defineProperty;var c=(s,r,e)=>r in s?b(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var h=(s,r,e)=>(c(s,typeof r!="symbol"?r+"":r,e),e);import n from"../utils.js";class d extends HTMLElement{constructor(){super();h(this,"props",{value:"",placeholder:"",maxlength:0,minlength:0,autofocus:!1,readonly:!1,disabled:!1,lazy:0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    0/\u221E
    ',this.__OUTER__=this.root.children[1],this.__INPUT__=this.__OUTER__.children[0],this.__STAT__=this.__OUTER__.children[1]}static get observedAttributes(){return["value","placeholder","maxlength","minlength","autofocus","readonly","disabled","lazy"]}get readOnly(){return this.props.readonly}set readOnly(e){var t=typeof e;e!==this.props.readonly&&(t==="boolean"&&e||t!=="boolean"?(this.props.readonly=!0,this.setAttribute("readonly",""),this.__INPUT__.setAttribute("readonly","")):(this.props.readonly=!1,this.removeAttribute("readonly"),this.__INPUT__.removeAttribute("readonly")))}get disabled(){return this.props.disabled}set disabled(e){var t=typeof e;e!==this.props.disabled&&(t==="boolean"&&e||t!=="boolean"?(this.props.disabled=!0,this.setAttribute("disabled",""),this.__INPUT__.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled"),this.__INPUT__.removeAttribute("disabled")))}get value(){return this.__INPUT__.value}set value(e){this.__INPUT__.value=e}connectedCallback(){this.stamp=0,this._handleSubmit=n.catch(this.__INPUT__,"keydown",e=>{let{minlength:t,lazy:o}=this.props,a=this.value,i=Date.now();if(e.keyCode===13&&(e.ctrlKey||e.metaKey)){if(this.disabled||this.readOnly||o&&i-this.stamp0&&a.length{let{maxlength:t}=this.props,o=this.value.length;t=t||"\u221E",this.__STAT__.textContent=`${o}/${t}`})}disconnectedCallback(){n.unbind(this.__INPUT__,"keydown",this._handleSubmit),n.unbind(this.__INPUT__,"input,change",this._statFn)}attributeChangedCallback(e,t,o){if(t!==o)switch(e){case"autofocus":this.__INPUT__.setAttribute("autofocus",""),setTimeout(i=>{this.__INPUT__.focus()},10);break;case"placeholder":this.__INPUT__.setAttribute("placeholder",o);break;case"value":this.value=o||"";break;case"maxlength":{let i=this.value.length;if(o===null)this.__INPUT__.removeAttribute(e),this.props.maxlength=0,this.__STAT__.textContent=`${i}/\u221E`;else{let l=+o;l>0?(this.__INPUT__.setAttribute(e,l),this.props.maxlength=l,this.__STAT__.textContent=`${i}/${l}`):this.removeAttribute(e)}}break;case"lazy":this.props.lazy=o>>0;break;case"readonly":case"disabled":var a=e;a==="readonly"&&(a="readOnly"),this[a]=o!==null;break}}}customElements.get("wc-textarea")||customElements.define("wc-textarea",d);export{d as default}; - diff --git a/src/lib/icon/index.js b/src/lib/icon/index.js deleted file mode 100644 index ef35f8a..0000000 --- a/src/lib/icon/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var n=Object.defineProperty;var l=(e,i,t)=>i in e?n(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var o=(e,i,t)=>(l(e,typeof i!="symbol"?i+"":i,t),t);import d from"./svg.js";let a=d;window.EXT_SVG_DICT&&Object.assign(a,EXT_SVG_DICT);class h extends HTMLElement{constructor(){super();o(this,"props",{is:""});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=' ',this.__ICO__=this.root.lastElementChild,this.drawPath()}static get observedAttributes(){return["is"]}get is(){return this.props.is}set is(t){t&&this.setAttribute("is",t)}drawPath(){var{is:t}=this.props,s=a[t];!this.__ICO__||t&&s&&(this.__ICO__.innerHTML=t==="loading"?s:``,this.__ICO__.classList.toggle("load",t==="loading"))}attributeChangedCallback(t,s,r){if(s!==r)switch(t){case"is":this.props.is=r,r?this.drawPath():this.removeAttribute("is");break}}}customElements.get("wc-icon")||customElements.define("wc-icon",h);export{h as default}; - diff --git a/src/lib/icon/svg.js b/src/lib/icon/svg.js deleted file mode 100644 index 651e440..0000000 --- a/src/lib/icon/svg.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const c={android:"M733.9 338.6C723.1 214.3 628.3 117 512.9 117s-210.2 97.3-221 221.6h442zM393 232.6c0-12.4 8.9-22.4 20-22.4 11 0 19.9 10.1 19.9 22.4 0 12.4-8.9 22.4-19.9 22.4-11.1 0-20-10-20-22.4m199.4 0c0-12.4 8.9-22.4 19.9-22.4 11 0 20 10.1 20 22.4 0 12.4-9 22.4-20 22.4s-19.9-10-19.9-22.4m-173.6-92c-4.7 2.4-9.6 5.2-13 7.2l-36-71.6c-2-3.9-0.8-8.9 2.7-11.1 3.5-2.3 7.9-0.9 9.9 3.1l36.4 72.4m187.7 0L643 68.2c2-3.9 6.4-5.3 9.9-3.1 3.5 2.2 4.7 7.2 2.8 11.1l-36.1 71.6c-3.4-1.9-8.4-4.7-13.1-7.2m-332 495.1c0 31.8-22.3 57.8-49.5 57.8-27.3 0-49.6-26-49.6-57.8V411.4c0-31.8 22.3-57.8 49.6-57.8 27.2 0 49.5 26 49.5 57.8v224.3z m574.1 0c0 31.8-22.3 57.8-49.5 57.8s-49.6-26-49.6-57.8V411.4c0-31.8 22.3-57.8 49.6-57.8 27.2 0 49.5 26 49.5 57.8v224.3zM293.8 363.1V722c0 31.8 23.2 57.8 51.4 57.8h35.6v122.3c0 31.8 22.3 57.8 49.6 57.8 27.2 0 49.5-26 49.5-57.8V779.9h64.6v122.3c0 31.8 22.3 57.8 49.5 57.8 27.3 0 49.6-26 49.6-57.8V779.9h36.2c28.3 0 51.4-26 51.4-57.8v-359H293.8z",app:"M834.6 960H564.3c-30.4 0-55.1-24.7-55.1-55V635c0-30.3 24.7-55 55.1-55h270.3c30.4 0 55.1 24.7 55.1 55v270c-0.1 30.3-24.8 55-55.1 55z m-445.3 0H119.1C88.7 960 64 935.3 64 905V635c0-30.3 24.7-55 55.1-55h270.3c30.4 0 55.1 24.7 55.1 55v270c-0.1 30.3-24.8 55-55.2 55z m177.9-61h258.4V640.8H567.2V899zM125 899h258.4V640.8H125V899z m595.6-356.7c-12.9 0-25.8-4.9-35.7-14.7L496.1 338.8c-9.5-9.5-14.8-22.2-14.8-35.6 0-13.5 5.2-26.1 14.8-35.6L685 78.8c19.7-19.7 51.7-19.7 71.3 0l188.9 188.8c9.5 9.5 14.8 22.2 14.8 35.6 0 13.5-5.3 26.1-14.8 35.6L756.3 527.6c-9.8 9.8-22.7 14.7-35.7 14.7zM543 303.5l178 177.9 178-177.9-178-177.9-178 177.9zM389.3 515.1H119.1c-30.4 0-55.1-24.7-55.1-55V190c0-30.3 24.7-55 55.1-55h270.3c30.4 0 55.1 24.7 55.1 55v270c-0.1 30.4-24.8 55.1-55.2 55.1z m-264.3-58h258.4V198.9H125v258.2z",apple:"M512.1 269c-1.3-2-1.6-19.8-0.5-30.5 2.3-22.4 7.5-40.1 17.6-60.2 9.4-18.5 24-38.6 39.7-54.8 22.7-23.3 61.8-45.2 97.4-54.7 12.1-3.2 30.1-5.9 31.4-4.6 1.2 1.2 1.4 24.1 0.3 34.8-4.9 45.1-27.1 88.3-63.2 123.1-28.1 27.1-57.6 42-91.7 46.5-12.1 1.7-30.1 1.9-31 0.4zM356.3 959c-33.9-7.5-66.3-32.7-104.1-81.2-37.7-48.3-59.2-84.4-79.3-133-20.5-49.4-33.3-97.8-39.2-147-1.4-11.5-1.7-21.6-1.7-47.4 0-36 0.9-46.1 6.2-71.6 10.5-50.4 34.1-95.6 67.5-128.9 20.3-20.3 39.3-33.6 66-46.2 29.9-14.1 60.4-21.1 92.2-21.1 25.8 0 44 4.5 104 25.7 22.1 7.8 38.6 12.5 46.8 13.3 4.5 0.4 7.9 0.1 13.8-1.4 8.3-2 38.3-11.9 63-20.6 53.4-18.9 88.9-23.4 130.9-16.4 50.9 8.4 89.7 26.7 121.4 57.4 9.6 9.3 24.2 26.1 24.2 28 0 0.3-3.7 3-8.3 5.9-18.4 12-41.3 32.1-52.6 46.4-36.5 46-48.6 108-33.1 169 13.7 53.7 53.1 100.6 107.4 127.7 8.9 4.4 10.9 5.8 10.7 7.3-0.3 2.5-11.5 31.3-17 43.6-11.1 25.1-28.8 56.1-45.8 80.4-29.8 42.7-57.9 73.8-80.6 89.3-10.9 7.4-26.8 14.8-38.9 18.1-8.6 2.3-11 2.5-25.2 2.5-12.9 0-17.6-0.4-26.1-2.1-11.8-2.4-32.8-9.1-54.8-17.3-26-9.8-50.3-14.7-72.7-14.7-26.6 0-48.5 4.6-83 17.5-20.3 7.6-31.8 11.3-45.1 14.5-9.7 2.3-13.6 2.8-26.1 3.1-10.4 0.4-16.5 0.1-20.5-0.8z",at:"M532.7 417.9c-22.6 0-39.8 9.5-51.7 28.4-11.8 19-19.6 47.4-23.3 85.3-1.9 25.2 0 44.2 5.8 57.1 5.8 12.9 15.3 19.4 28.2 19.4 11.8 0 22.2-3.2 31.4-9.5s17.4-17.9 24.3-34.9l13.1-142.2c-4.7-1.1-9.5-1.9-14-2.6-4.8-0.8-9.3-1-13.8-1zM512 64C264.5 64 64 264.5 64 512s200.5 448 448 448 448-200.5 448-448S759.5 64 512 64z m275.3 434.9c-1.9 46.1-16.4 85.9-43.1 119.8-26.7 33.6-66.8 50.4-119.8 50.4-17.7 0-33-4.7-45.7-14.2-12.9-9.5-22-23-27.1-40.5-8.8 17.9-20.2 31.2-33.8 40.1-13.6 8.8-29.5 13.4-47.8 13.4-32.5 0-57.3-12.5-74.5-37.3s-23.5-57.7-19-98.9c5.6-52.6 21.5-94.8 47.8-126.4s58.2-47.4 95.6-47.4c26.3 0 47.6 2.8 63.5 8.2 15.9 5.4 33.6 12.3 52.8 23.7l-1.1-0.2h1.7l-16.6 179.6c-1.1 18.3 0.2 31.4 3.7 38.3 3.7 6.9 8.4 10.6 14.4 10.6 24.3 0 43.9-11 58.6-33.6 14.6-22.6 22.8-50.8 24.6-85.3 3.4-71.1-11-126.4-43.5-166.1-32.5-39.6-82.5-59.7-150.1-59.7-65.7 0-118 21.3-156.8 64.2s-59.7 101-63.1 174.9c-3.7 71.9 12.1 128.8 47.2 170.4 35.1 41.8 85.5 62.7 151.4 62.7 18.3 0 37.3-1.9 57.1-5.8 19.6-3.9 36.8-8.8 51-14.6l12.5 52.1c-14.6 8.8-33.2 15.7-55.8 20.7-22.6 5-44.6 7.3-66.1 7.3-87.9 0-155.7-26.1-203.1-78.4-47.4-52.1-69.4-123.6-65.7-214.5 3.9-90 32.1-161.3 84.2-214.1 52.3-52.8 121.7-79 208.3-79 85.1 0 150.3 25 195.4 74.7 45.6 49.8 66.3 118.1 62.9 204.9z",attach:"M872.7 458.8L499.9 831.6c-74.6 74.6-196.6 74.6-271.1 0-74.6-74.6-74.6-196.6 0-271.1l389.7-389.7c47.4-47.4 122-47.4 169.5 0 47.4 47.4 47.4 122 0 169.5L398.2 730c-18.6 18.6-49.1 18.6-67.8 0-18.6-18.6-18.6-49.1 0-67.8l322-322-50.8-50.8-322 322c-47.4 47.4-47.4 122 0 169.5 47.4 47.4 122 47.4 169.5 0l389.7-389.7c74.6-74.6 74.6-196.6 0-271.1s-196.6-74.6-271.1 0L178 509.7C74.6 613 74.6 779.1 178 882.5s269.4 103.4 372.8 0l372.8-372.8-50.9-50.9z",backward:"M952.7 732c-19.3-108-78-244.6-175.4-336.6-48.6-46-102-75.5-156.7-91.3-6.8-2-13.7-3.8-20.6-5.4-6.9-1.6-13.8-3-20.7-4.2-13.8-2.4-27.6-4.1-41.4-5-9.7-0.7-19.4-1-29-1.1V124.7c0-0.1 0.2-1.6-0.9-2.5-0.9-0.7-2.2-0.8-3.2-0.2L68 420.6c-0.2 0.1-4.2 2.8-4 7.7 0.2 4.7 4.1 7 4.3 7.2l436.8 338.3c1.8 1.1 2.5 1.1 2.8 0.8 0.7-0.5 0.9-2.5 0.9-2.5V552.4c51.6 2.8 127.6 10.1 184.3 29.1C815.1 622.3 894 733 927.3 836.8c8.2 25.6 12.3 47.7 14.5 63.5 0.4 1.4 1.8 2.2 3 2 1-0.2 1.8-1 2-2 0.7-2.6 1.6-6.4 2.9-11.2 1.6-6.3 2.8-10.9 2.9-11.1 4.9-21.3 7.4-44 7.4-68.4 0-24.3-2.4-50.3-7.3-77.6z",bell:"M512 911.1c-37.2 0-69.8-25.6-79.1-60.5H384c9.3 62.8 62.8 109.4 128 109.4s118.7-48.9 128-109.4h-48.9c-9.3 34.9-41.9 60.5-79.1 60.5z m336-238.2c0-9-4.5-18-13.5-20.3-2.3 0-121.8-65.4-121.8-241.3 2.3-51.9-20.3-162.4-124-196.2-2.3 0-2.3 0-4.5-2.3 11.3-15.8 20.3-36.1 20.3-56.4 0-49.6-40.6-92.5-92.5-92.5s-92.5 40.6-92.5 92.5c0 20.3 6.8 40.6 20.3 56.4-2.3 0-4.5 0-4.5 2.3C331.6 248.9 309 357.2 311.3 409c0 175.9-115 239-121.8 243.5-6.8 4.5-13.5 11.3-13.5 20.3v121.8c0 6.8 2.3 13.5 6.8 18s11.3 6.8 15.8 6.8h626.9c6.8 0 13.5-2.3 15.8-6.8 4.5-4.5 6.8-11.3 6.8-18V672.9zM512 111c24.6 0 44.8 20.2 44.8 44.8 0 24.6-20.2 44.8-44.8 44.8-24.6 0-44.8-20.2-44.8-44.8 0-24.6 20.2-44.8 44.8-44.8zM242 761v-80.1c33.8-23.8 124.5-101.8 124.5-266.3 0-4.3-2.1-112.6 86.5-142.9 6.3-2.2 27.4-8.7 59.1-8.7 31.6 0 52.7 6.5 59.1 8.7 88.6 30.3 86.5 138.6 86.5 142.9 0 164.6 90.7 242.5 124.5 266.3V761H242z",calendar:"M315.3 323.8c-18 0-32.7-14.1-32.7-31.3V128.2c0-17.3 14.7-31.3 32.7-31.3 18 0 32.7 14.1 32.7 31.3v164.3c-0.1 17.2-14.7 31.3-32.7 31.3z m528.5 603.4H180.2C116.1 927.2 64 876 64 813.2V300.8c0-62.9 52.1-114 116.2-114h38.9c18 0 32.7 14.1 32.7 31.3 0 17.3-14.7 31.3-32.7 31.3h-38.9c-28.1 0-50.9 23-50.9 51.3v512.4c0 28.3 22.8 51.3 50.9 51.3h663.5c28.1 0 50.9-23 50.9-51.3V300.8c0-28.3-22.8-51.3-50.9-51.3H810c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h33.7c64.1 0 116.2 51.1 116.2 114v512.4c0.1 62.7-52 113.9-116.1 113.9zM708.7 323.8c-18 0-32.7-14.1-32.7-31.3V128.2c0-17.3 14.7-31.3 32.7-31.3 18 0 32.7 14.1 32.7 31.3v164.3c0 17.2-14.7 31.3-32.7 31.3z m43.8 393.1h-481c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h480.9c18 0 32.7 14.1 32.7 31.3 0 17.3-14.6 31.3-32.6 31.3z m0-205.3h-481c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h480.9c18 0 32.7 14.1 32.7 31.3 0 17.2-14.6 31.3-32.6 31.3z m-131.2-267H399.9c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h221.4c18 0 32.7 14.1 32.7 31.3 0 17.2-14.7 31.3-32.7 31.3z",camera:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m271.5 719.5C711 856.1 614.6 896 512 896s-199-39.9-271.5-112.5C167.9 711 128 614.6 128 512s39.9-199 112.5-271.5C313 167.9 409.4 128 512 128s199 39.9 271.5 112.5C856.1 313 896 409.4 896 512s-39.9 199-112.5 271.5zM400.1 212.1c-81.3 30.3-146.9 92.8-181.4 171.9H512L400.1 212.1zM825.6 576c4.3-21.1 6.4-42.5 6.4-64 0-73.2-24.6-140.7-66-194.7L622 576h203.6zM719.9 268.8C664 220.9 591.4 192 512 192c-15.9 0-31.6 1.2-46.9 3.4L621.7 448l98.2-179.2zM198.4 448c-4.3 21.1-6.4 42.5-6.4 64 0 73.3 24.6 140.8 66.1 194.7L402 448H198.4z m425.5 363.9c81.3-30.3 146.9-92.8 181.4-171.9H512l111.9 171.9z m-319.8-56.7C360 803.1 432.6 832 512 832c15.9 0 31.6-1.2 46.9-3.4L402.3 576l-98.2 179.2z",chart:"M321.4 812.4h-108V548h108v264.4z m165.2 0h-108V283.6h108v528.8z m165.2 0h-108V415.8h108v396.6z m158.9 0h-108V213.6h108v598.8zM960 876.8c0-10.6-8.4-19.2-18.7-19.2H82.7c-10.3 0-18.7 8.6-18.7 19.2S72.4 896 82.7 896h858.7c10.2 0 18.6-8.6 18.6-19.2zM85.3 128H80c-8.8 0-16 7.2-16 16v736c0 8.8 7.2 16 16 16h5.3c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16z","checkbox-on":"M860.4 64H163.6C108.8 64 64 108.8 64 163.6v696.9c0 54.8 44.8 99.6 99.6 99.6h696.9c54.8 0 99.6-44.8 99.6-99.6V163.6C960 108.8 915.2 64 860.4 64z m-448 696.9L163.6 512l69.7-69.7 179.2 179.2 378.3-378.3 69.7 69.7-448.1 448z","checkbox-off":"M860.2 163.6v696.8H163.6V163.6h696.6m0-99.6H163.6C108.8 64 64 108.8 64 163.6v696.8c0 54.8 44.8 99.6 99.6 99.6h696.8c54.8 0 99.6-44.8 99.6-99.6V163.6c-0.2-54.8-45-99.6-99.8-99.6z",client:"M578 886.6H137.9c-40.7 0-73.9-35.1-73.9-78.3v-46.9c0-17.3 13.4-31.3 29.9-31.3H578c16.5 0 29.9 14.1 29.9 31.3 0 17.3-13.4 31.3-29.9 31.3H123.7v15.6c0 8.6 6.3 15.6 14.1 15.6H578c16.5 0 29.9 14.1 29.9 31.3 0 17.4-13.4 31.4-29.9 31.4z m308.1 0h-176c-40.7 0-73.9-35.1-73.9-78.3V432.8c0-43.2 33.1-78.3 73.9-78.3h176.1c40.7 0 73.9 35.1 73.9 78.3v375.6c-0.1 43.1-33.2 78.2-74 78.2z m-176-469.4c-7.8 0-14.2 7-14.2 15.6v375.6c0 8.6 6.3 15.6 14.2 15.6h176.1c7.8 0 14.1-7 14.1-15.6V432.8c0-8.6-6.3-15.6-14.1-15.6H710.1z m88 374.1c-7.9 0-15.6-3.2-21.1-8.8-5.6-5.6-8.7-13.3-8.7-21.1 0-7.9 3.2-15.7 8.8-21.1 5.5-5.5 13.2-8.7 21-8.7 8 0 15.7 3.2 21.2 8.8 5.5 5.5 8.7 13.2 8.7 21 0 8-3.2 15.7-8.8 21.2-5.6 5.5-13.3 8.7-21.1 8.7zM578 669.5H225.9c-40.7 0-73.9-35.1-73.9-78.3V215.6c0-43.2 33.1-78.3 73.9-78.3h572.2c40.7 0 73.9 35.1 73.9 78.3v46.9c0 17.3-13.4 31.3-29.9 31.3s-29.9-14.1-29.9-31.3v-46.9c0-8.6-6.3-15.6-14.2-15.6H225.9c-7.8 0-14.1 7-14.1 15.6v375.6c0 8.6 6.3 15.6 14.1 15.6H578c16.5 0 29.9 14.1 29.9 31.3 0 17.3-13.4 31.4-29.9 31.4z",close:"M925.9 960c-9.1 0-17.7-3.5-24.1-10L512 560.2 122.2 950c-6.4 6.4-15 10-24.1 10-9.1 0-17.7-3.5-24.1-10-13.3-13.3-13.3-34.9 0-48.2L463.8 512 74 122.2C60.7 108.9 60.7 87.3 74 74c13.3-13.3 34.9-13.3 48.2 0L512 463.8 901.8 74c13.3-13.3 34.9-13.3 48.2 0 13.3 13.3 13.3 34.9 0 48.2L560.2 512 950 901.8c13.3 13.3 13.3 34.9 0 48.2-6.4 6.5-15 10-24.1 10z",color:"M512 64C283.2 64 96 265.6 96 512s187.2 448 416 448c39.3 0 69.3-32.3 69.3-74.7 0-19.9-6.9-37.3-18.5-49.8-11.6-12.4-18.5-29.9-18.5-49.8 0-42.3 30-74.7 69.3-74.7h83.2c127.1 0 231.1-112 231.1-248.9C928 243.2 740.8 64 512 64zM256 512c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z m128-192c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z m256 0c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z m128 192c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z","dbl-left":"M536.2 948.6L76.3 539.7l-0.3-0.3c-7.7-7.4-12-17.2-12-27.6 0-12.4 6.1-23.9 16.8-31.6L536.3 75.3c8.1-7.3 19-11.3 30.5-11.3 24.2 0 43.9 18.1 43.9 40.3 0 11.1-4.8 21.4-13.4 29L171.2 512l426.1 378.7c8.5 7.6 13.4 18.1 13.4 29 0 22.2-19.7 40.3-43.9 40.3-11.3 0-22.2-4-30.6-11.4z m349.4 0l-460-408.9-0.3-0.3c-7.7-7.4-12-17.2-12-27.6 0-12.4 6.1-23.9 16.8-31.6L885.6 75.3c8.2-7.3 19-11.3 30.5-11.3 24.2 0 43.9 18.1 43.9 40.3 0 11.1-4.8 21.4-13.4 29L520.5 512l426.1 378.7c8.5 7.6 13.4 18.1 13.4 29 0 22.2-19.7 40.3-43.9 40.3-11.3 0-22.2-4-30.5-11.4z","dbl-right":"M457.2 960c-24.2 0-43.9-18.1-43.9-40.3 0-10.9 4.9-21.4 13.4-29L852.8 512 426.7 133.2c-8.6-7.5-13.4-17.8-13.4-29 0-22.2 19.7-40.3 43.9-40.3 11.5 0 22.4 4 30.6 11.3l455.5 404.9c10.7 7.7 16.8 19.2 16.8 31.6 0 10.4-4.3 20.2-12 27.6l-0.3 0.3-460 409c-8.4 7.4-19.3 11.4-30.6 11.4z m-349.3 0C83.7 960 64 941.9 64 919.7c0-10.9 4.9-21.4 13.4-29L503.5 512 77.4 133.2c-8.6-7.5-13.4-17.8-13.4-29C64 82.1 83.7 64 107.9 64c11.5 0 22.4 4 30.6 11.3L594 480.2c10.7 7.7 16.8 19.2 16.8 31.6 0 10.4-4.3 20.2-12 27.6l-0.3 0.3-460.1 408.9c-8.3 7.4-19.2 11.4-30.5 11.4z",deny:"M321.8 540.6c-22.2 0.1-33.4-8.7-33.5-26.5-0.1-18.2 11-27.4 33.2-27.5l380.2-2.1c12.8-0.1 21.8 2.4 27.1 7.6 5.3 5.1 8 11.6 8 19.6 0 7.9-2.4 14.4-7.4 19.3s-14.1 7.4-27.5 7.5l-380.1 2.1zM512 120c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392z",doc:"M646.4 960H243.2C182.9 960 128 903.8 128 842.1V291.9c0-29.4 11.8-59 32.5-81.3 21.4-23.1 49.2-35.8 78.4-35.8l23.9-0.6c0.3-29 12.6-56.6 34.7-77.7C319.2 75.9 348.4 64 377.6 64c3.2 0 319.3 0.9 322.6 0.9h3.4L896 289.6v442.5c0 61.7-54.9 117.9-115.1 117.9l-19.3-0.2c-0.2 29.2-12.5 56.8-34.9 78-21.8 20.4-51 32.2-80.3 32.2zM240.6 232.3c-23.3 0-56.6 35.1-56.6 59.6v550.2c0 10.9 8.1 26.2 20.6 39.1 12.8 13.2 27.6 21.4 38.6 21.4h403.3c19.1 0 44.5-25.7 46.3-52.9l-315.2 0.3c-60.3 0-115.2-56.2-115.2-117.9V231.7l-21.8 0.6z m124-110.9c-22.9 0-46.2 35.2-46.2 60.5v550.2c0 25.3 23.3 60.5 46.2 60.5h416.3c11 0 25.8-8.2 38.6-21.4 12.5-12.9 20.6-28.3 20.6-39.1V341.5h-86c-61.1 0-102.2-41.7-102.2-103.9 0-0.5-0.4-56.4 0-116.2H364.6z m335.6 536.3h-242c-19 0-34.5-15.9-34.5-35.3 0-19.5 15.5-35.3 34.5-35.3h242c19 0 34.5 15.9 34.5 35.3s-15.5 35.3-34.5 35.3z m0-137.4h-242c-19 0-34.5-15.9-34.5-35.3 0-19.5 15.5-35.3 34.5-35.3h242c19 0 34.5 15.9 34.5 35.3s-15.5 35.3-34.5 35.3z m7.6-310.2c0 26.1 23.7 74.6 46.2 74.6h64.3L707.8 149.2v60.9z",download:"M639.8 187.8H384.2v60.8h255.7v-60.8z m0-59.4H384.2v31.8h255.7v-31.8z m224.6 237.3H639.8v-87.3H384.2v87.3H161.8l349 340.1 353.6-340.1z m19.4 289.6l-30.7 151.2H170.8l-30.6-151.2H64v240.3h896V655.3h-76.2z",edit:"M835 298.7L685.5 154.2l74.8-72.3c24.8-23.9 64.9-23.9 89.6 0l59.8 57.8c24.8 24 24.8 62.8 0 86.8L835 298.7zM400.8 718.5L251.4 574l406.3-389.8 149.4 144.5-406.3 389.8zM131.3 837l90.9-234.9 148.2 143.3L131.3 837z m791.4 123H101.3C80.8 960 64 943.2 64 922.7c0-20.5 16.8-37.3 37.3-37.3h821.3c20.5 0 37.3 16.8 37.3 37.3 0.1 20.5-16.7 37.3-37.2 37.3z",eye:"M512 210c-203.6 0-376.8 124.8-448 302 71.2 177.2 244.4 302 448 302s376.8-124.8 448-302c-71.2-177.2-244.4-302-448-302z m0 503.4c-112 0-203.6-90.6-203.6-201.4S400 310.6 512 310.6 715.6 401.2 715.6 512 624 713.4 512 713.4z m0-322.2c-67.2 0-122.2 54.4-122.2 120.8s55 120.8 122.2 120.8S634.2 578.4 634.2 512s-55-120.8-122.2-120.8z","eye-off":"M512.1 289.6c112.4 0 203.8 90.6 203.8 202.2 0 26.2-5.2 51-14.6 74l119 118c61.6-51 110-116.8 139.8-192-70.6-177.4-244.5-303.1-448.3-303.1-57 0-111.6 10.2-162.2 28.2l88 87.4c23.1-9.3 48.1-14.7 74.5-14.7zM104.8 179.5l93 92.2 18.8 18.6C148.8 342.2 95.8 411.8 64 491.8c70.4 177.4 244.3 303.1 448.1 303.1 63.2 0 123.4-12.2 178.4-34l17.2 17 119.4 118 51.8-51.4-722.5-716.4-51.6 51.4z m225.1 223.3l63.2 62.6c-2 8.4-3.2 17.4-3.2 26.2 0 67 54.6 121.2 122.2 121.2 9 0 18-1.2 26.4-3.2l63.2 62.6c-27.2 13.4-57.4 21.4-89.6 21.4-112.4 0-203.8-90.6-203.8-202.2 0-31.6 8.2-61.4 21.6-88.6z m175.6-31.4l128.4 127.4 0.8-6.4c0-67-54.6-121.2-122.2-121.2l-7 0.2z",face:"M327.9 690.6c-6.5-3.9-12.4-11.6-12.4-19.7 0-12.3 9.9-22.2 22.2-22.2 2 0 3.7 0.6 5.5 1.1h0.5c51.5 23.7 108.7 36.1 169.1 36.1 59.5 0 115.8-12.7 166.7-35.7h0.2c2.4-0.8 4.9-1.5 7.6-1.5 12.3 0 22.4 10 22.4 22.4 0 8.5-4.7 15.8-11.6 19.6-56.4 25.7-118.8 40.6-184.8 40.6-65.7 0-129.2-15.3-185.4-40.7-0.3-0.1-0.2-0.1 0 0zM512 120c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392zM394.6 391.6c0-25-20.3-45.3-45.3-45.3-25 0-45.3 20.3-45.3 45.3 0 25 20.3 45.3 45.3 45.3 25 0 45.3-20.3 45.3-45.3z m281.3-45.2c-25 0-45.3 20.3-45.3 45.3 0 25 20.3 45.3 45.3 45.3 25 0 45.3-20.3 45.3-45.3 0-25.1-20.3-45.3-45.3-45.3z","finger-print":"M156.2 411.2c-4.8 0-9.8-1.2-14.2-3.8-13.4-7.8-18-24.8-10.2-38.2C167.4 309.2 275.6 169 512 169c102.4 0 192.2 27.2 266.8 80.8 61.4 44 95.8 93.8 112.2 117.8 8.8 12.8 5.4 30-7.4 38.8-12.8 8.6-30.4 5.4-39.2-7.4-29.8-43.2-120.2-174.4-332.4-174.4-207.2 0-300.8 120.8-331.4 172.6-5.2 9.2-14.6 14-24.4 14zM631 960c12.6 0 24-8.4 27.4-21 3.8-14.8-5.2-30-20.4-33.8C501 870.8 443.8 729 439.4 717.8c-1.4-4.6-7.4-27.4-9.4-55.6-2-27-0.6-64.2 17.4-88 13.2-17.4 34.4-25.8 64.6-25.8 55 0 64.2 27.2 78.6 83.6 14 55 33.2 130.4 140 135.8 41 2 78-16.4 104-51.6 39-52.8 46.4-133.6 18.8-205.6-21.6-56.4-63.2-112.8-114-154.8-65.6-54-144.2-82.6-227.4-82.6-180 0-299.6 123.2-338.4 245.4C138 631.4 181.2 795 183 802c4 14.8 19.6 23.8 34.6 19.8 15-3.8 24-19.2 20-34-0.4-1.4-40.8-154.8-10-252.4 16.6-52.4 51.2-103.4 94.8-139.6C375 352.2 440.6 329 512 329c167.2 0 262 131.8 288.8 201.8 20.8 54 16 115.4-11.6 153-10.2 13.8-28.2 30-55.6 28.6-62.4-3.2-73.2-34.4-88.2-93.8-7.2-28.6-14.6-58.2-33-82.2-22.4-29.4-55-43.6-100.2-43.6-48.6 0-85.4 16.2-109.6 48-52.8 69.6-18.4 188.4-17 193.4l0.4 1.6c2.6 7.2 66.6 180.4 238 223.4 2.4 0.6 4.6 0.8 7 0.8z m-220-12.8c6.8 0 13.8-2.6 19-7.4 11.4-10.4 12-28.2 1.4-39.4-60.4-64-94.6-135.6-107.4-225.6-6.4-52.8 2.6-132.6 49-184.4 32.2-36 79-54.2 138.8-54.2 69.2 0 121.6 31.2 156 92.6 27.4 48.8 33 98.8 33 99.4 1.6 15.2 15.6 26.4 31 24.8s26.8-15.2 25.2-30.6c-0.2-2.4-6.6-60.6-38.8-119-44.4-80.4-115.6-123-206.2-123-76.6 0-137.6 24.6-181 73-58.8 65.6-70.8 161-62.6 228.4v0.6c14.6 101.8 53.4 183.2 122 256 5.6 5.8 13 8.8 20.6 8.8zM727 867c12.8 0 26.2-0.8 39.8-2.4 15.4-1.6 26.6-15.4 24.8-30.8-1.8-15.4-15.8-26.4-31.2-24.6-61.6 7-111.6-5-149-35.2-63.2-51.2-71.4-140.2-71.6-141.8-1.2-15.4-14.6-26.8-30.2-25.6s-27.2 14.6-26 30c0.4 4.6 9.6 113.4 91.6 180.2C616 850.2 667 867 727 867z m64.6-716c0 15.4-12.6 27.8-28.2 27.8-6.4 0-12.2-2-17-5.6l-0.4 0.4 0.2 0.2c-0.8-0.4-72.6-54-234.2-54s-233.4 53.4-234.2 54l0.2-0.2c-4.6 3.2-10.2 5.2-16.4 5.2-15.6 0-28.2-12.4-28.2-27.8 0-8.2 3.6-15.6 9.4-20.8 0 0 0.2 0 0.4-0.2 1-1 2.2-1.8 3.4-2.6C265 114.6 348.2 64 512 64c156 0 239 45.8 262.4 61.2 10.2 4.2 17.2 14.2 17.2 25.8z",fire:"M622.5 959.8c-29.2-27.3-63-64.1-77.5-99.5-35.2-86 0-170.6 0-170.6s-113.8 12-167.3 155c-15.6 41.7 4.2 84.7 27 115.4C245.3 918.4 129 787.8 129 632.8c0-85.6 69.4-139.2 128-199.1 33.8-34.5 64-170.6 64-170.6s49.6 59.6 64 142.2c19.3 111.3 0 142.2 0 142.2s94.4-64.9 96-199C482.7 197.2 385 64 385 64s223.5 111.6 279.9 255.2c67.1 171 40.1 342 40.1 342s65.6-38 96-85.3c33.5-52.1 32-113.7 32-113.7s62.5 92 64 170.6c2.9 154.7-115 285.2-274.5 327z",first:"M733.2 611.4c-4.8-10.3-18.1-15.2-29.8-10.8-11.6 4.3-17.2 16.3-12.4 26.6L771.9 801l-148.4-26.7c-9.1-1.6-18.5 1.9-23.7 8.9l-83.3 113.3-4.2 6.5-4.9-6.4L424.2 784c-5.1-6.9-14.5-10.4-23.7-8.6l-148.4 28.1 81.1-174.6c4.8-10.4-0.7-22.2-12.3-26.5-11.6-4.2-25 0.7-29.8 11.1l-97.6 210.2c-3.2 7-1.9 14.9 3.5 20.7 5.4 5.8 13.9 8.4 22.2 6.8L394.6 818l98.2 133c2.6 3.5 6.2 6.1 10.3 7.6 1.9 0.7 4 1.1 6.1 1.3 0.2 0 3.7 0.1 4.6 0.1h0.3c6.8-0.6 13-3.9 16.8-9.1L629.4 817l175.4 31.5c4.6 0.8 9.2 0.4 13.3-1.2 3.4-1.3 6.4-3.3 8.8-5.9 5.4-5.8 6.7-13.8 3.5-20.7l-97.2-209.3zM512 64c-156.9 0-284.5 127.6-284.5 284.5S355.1 632.9 512 632.9s284.5-127.6 284.5-284.5S668.9 64 512 64z m20.9 127.4v320.2h-42.8V284.3h-74.7v-31.9c27.6 0 46.9-3.5 57.8-10.5 12.4-8.2 21.9-25.1 28.2-50.6h31.5z",floppy:"M841.4 960H182.6c-30.1 0-54.6-28.4-54.6-63.4V127.4c0-34.9 24.5-63.4 54.6-63.4H728c6.3 0 12.5 3 16.9 8.1l144.2 168.5c4.4 5.1 6.8 11.9 6.8 19.1v637c0.1 34.9-24.4 63.3-54.5 63.3z m-69.9-54.4h69.8c4 0 7.3-4 7.3-9h4.6-4.6V270.8L718.1 118.4h-22.5v192.4c0 28.1-19.7 50.9-43.9 50.9H371.3c-24.2 0-43.9-22.8-43.9-50.9V118.4H182.6c-4 0-7.3 4-7.3 9v769.3c0 4.9 3.3 9 7.3 9h83.9v-271c0-79.1 55.3-143.5 123.3-143.5h258.4c68 0 123.3 64.4 123.3 143.5v270.9z m-457.6 0h410.3V634.7c0-49.1-34.1-89.1-75.9-89.1H389.8c-41.9 0-75.9 40-75.9 89.1v270.9z m284-128.7H426.1c-10.2 0-18.5-10.4-18.5-23.2 0-12.8 8.3-23.2 18.5-23.2h171.8c10.2 0 18.5 10.4 18.5 23.2 0 12.8-8.3 23.2-18.5 23.2z m0-80.6H426.1c-10.2 0-18.5-10.4-18.5-23.2 0-12.8 8.3-23.2 18.5-23.2h171.8c10.2 0 18.5 10.4 18.5 23.2 0 12.8-8.3 23.2-18.5 23.2z m5.3-389h45V118.4h-45v188.9z m-228.4 0h181.1V118.4H374.8v188.9z",fly:"M471.7 926.5h-57.9V728.6c0-16.6 3.4-39.9 29.6-72.3 13.7-16.9 285-330.6 383.7-444.7l-675 362.6 217.9 77-16.7 54.4-9.5-3.3c-9.6-3.3-236.2-81.6-258.3-91.9-12.9-6-21-17.9-21.5-31.8-0.6-16.6 9.2-32.2 26.3-41.7 26.9-15 765.6-403.4 809.7-426.6 4.6-3.8 22.3-17.2 41.3-11.4l1.2 0.4 1.1 0.7c18.5 11.5 16.9 28.5 16 38.7-0.2 2-0.4 3.9-0.4 5.3v2.5l-0.9 1.6c-5.1 16.6-50.8 251.5-84.3 423.4-27 138.8-43.9 225.1-46.5 235.5-3.8 20.4-14.1 36.9-28.5 45.2-11.7 6.7-25 7.7-38.6 2.8-25.3-6.2-242.8-78.3-252.2-81.4l-10-3.3 23.8-59 8.7 2.9c91.7 31 230.8 77.5 244.2 80.8h0.9c2.3-13.5 12.7-68.5 58.8-307.2 20.7-106.9 41.5-214.6 52.1-269.3C771 355.9 503.6 673 481 698.6c-5 9.3-9.3 17.6-9.3 29.9v198z","folder-open":"M107.6 845.9l10.9 1.2c1.3 0.1 2.6 0.2 3.9 0.2H783c14.3 0 27-9 30.7-21.9l120.9-417.9c2.6-9 0.6-18.3-5.5-25.7-6.1-7.3-15.2-11.5-25.2-11.5h-94.5v-43.2c0-17.3-15.2-31.4-33.9-31.4H375.3c-4.6 0-9-1.7-12.3-4.7l-54-50c-6.4-5.9-14.9-9.2-23.9-9.2H117.3c-18.7 0-33.8 14.1-33.8 31.4v552.6c0 14.2 10.2 26.2 24.1 30.1z m679.3 20.9H117.6C88 866.8 64 842.7 64 813.1V210.9c0-29.6 24-53.7 53.6-53.7h168.7c14.3 0 27.8 5.6 37.9 15.8l53.7 53.9h401.4c29.6 0 53.6 24.1 53.6 53.7v27.6h75.5c16.2 0 31.1 7.4 40.9 20.2 9.8 12.8 13 29.1 8.9 44.7L836.7 828.5c-6.1 22.5-26.5 38.3-49.8 38.3z m20-18.8H92.1c-5.2 0-9.9-2.4-13.1-6.5-3.1-4.1-4.1-9.3-2.8-14.3L207 334.6c1.9-7.2 8.5-12.3 15.9-12.3h714.8c5.2 0 10 2.4 13.1 6.5 3.1 4.1 4.1 9.3 2.8 14.3L822.8 835.8c-1.9 7.2-8.5 12.2-15.9 12.2zM83 804.5V203.6c0-10.2 8.3-18.5 18.4-18.5H280c4.9 0 9.6 1.9 13 5.4l57.5 58.1c6.8 6.9 15.8 10.6 25.5 10.6h426c10.2 0 18.4 8.3 18.4 18.5v50.1H235.5c-15.3 0-28.7 10.4-32.7 25.4L83 804.5zM119.5 213v413.2l74.3-279.8c6-22.5 26.3-38.3 49.5-38.3h530.1v-25.5h-398c-14.3 0-27.6-5.6-37.7-15.8L284.2 213H119.5z","folder-close":"M902.7 923.3h-776c-34.3 0-62.1-27.9-62.1-62.3V162.9c0-34.3 27.9-62.3 62.1-62.3h195.6c16.6 0 32.2 6.5 44 18.3l62.2 62.5h465.4c4.2 0.1 31.1 1 50.4 23.6 17.6 20.5 16.3 44.3 16 49v624.9c-6.9 26.2-30.6 44.4-57.6 44.4z m-607.9-452h332.4c7.1 0 12.8-5.2 12.8-11.7 0-6.5-5.7-11.7-12.8-11.7H294.8c-7.1 0-12.8 5.2-12.8 11.7 0 6.5 5.7 11.7 12.8 11.7z m0 128.3h434.4c7.1 0 12.8-5.2 12.8-11.7 0-6.5-5.7-11.7-12.8-11.7H294.8c-7.1 0-12.8 5.2-12.8 11.7 0 6.4 5.7 11.7 12.8 11.7z m0 128.1h434.4c7.1 0 12.8-5.2 12.8-11.7 0-6.5-5.7-11.7-12.8-11.7H294.8c-7.1 0-12.8 5.2-12.8 11.7 0 6.5 5.7 11.7 12.8 11.7z",get:"M958.3 414.3c-43.9-110.1-5.6-200.2 1.7-303.4-0.2-1.3-1-2.2-2.1-2.4-0.7-0.1-1.2 0.1-1.5 0.2-54.6 30.4-109.6 72.7-162.7 120.7l-62.9 60.4c-181 183.4-325.3 409.4-325.3 409.4L300.8 482.7c-0.1-0.2-0.8-1.1-2.1-1.2-0.7-0.1-1.2 0.1-1.5 0.3l-232 120.5c-1 1-1.4 2.3-1.1 3.5 0.3 1.1 1 1.7 1.3 1.9 101 41.4 251 175.1 351.6 306.7 0.6 0.9 1.6 1.3 2.6 1.1 1.2-0.2 1.7-1.3 1.7-1.4C483.6 795.9 691.6 588.4 840.5 482l59.1-38.5c22-12.7 41.3-21.6 57.1-25.8 0.3 0 0.9-0.2 1.3-0.7 0.6-0.7 0.7-1.8 0.3-2.7z",happy:"M699.7 960c-6.7 0-13.4-3-18-8.6-7.9-9.9-6.3-24.4 3.6-32.3 123.7-99 194.6-246.5 194.6-404.8 0-161-73-310.2-200.2-409.2-10-7.8-11.8-22.2-4-32.3 7.8-10 22.2-11.8 32.3-4C846.5 176.6 925.9 339 925.9 514.3c0 172.3-77.2 332.9-211.8 440.7-4.1 3.2-9.2 5-14.4 5zM207.9 347c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8S98.1 176.6 98.1 237.3c0 60.6 49.1 109.7 109.8 109.7z m0 547.6c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8-60.6 0-109.8 49.2-109.8 109.8 0 60.7 49.1 109.8 109.8 109.8z",headset:"M876.3 478.9v-4.8c0-195.2-148.2-354.1-330.4-354.1h-67.8c-182.2 0-330.4 158.8-330.4 354.1v4.8C99.8 490.7 64 536.7 64 591.6v196.7C64 852.2 112.3 904 171.9 904c59.6 0 107.9-51.8 107.9-115.7V591.6c0-55-35.8-101-83.7-112.7v-4.8c0-166.6 126.5-302.2 282-302.2h67.8c155.5 0 282 135.6 282 302.2v4.8c-47.9 11.8-83.7 57.8-83.7 112.7v196.7c0 63.9 48.3 115.7 107.9 115.7 59.6 0 107.9-51.8 107.9-115.7V591.6c0-54.9-35.8-100.9-83.7-112.7z",home:"M837.2 960H620.4c-18.2 0-33.1-15.1-33.1-33.6V693H436.7v233.3c0 18.5-14.8 33.6-33.1 33.6H186.8c-18.2 0-33.1-15.1-33.1-33.6v-356c0-18.5 14.8-33.6 33.1-33.6 18.2 0 33.1 15.1 33.1 33.6v322.3h150.7V659.4c0-18.5 14.8-33.6 33.1-33.6h216.8c18.2 0 33.1 15.1 33.1 33.6v233.3h150.7V570.4c0-18.5 14.8-33.6 33.1-33.6 18.2 0 33.1 15.1 33.1 33.6v356c-0.3 18.5-15.1 33.6-33.3 33.6zM97 557.1c-8.9 0-17.2-3.5-23.5-10-12.7-13-12.7-34.3 0-47.3L488.5 74c6.3-6.4 14.6-10 23.5-10s17.2 3.5 23.5 10l415 425.9c12.7 13.1 12.7 34.3 0 47.3-6.3 6.4-14.6 10-23.5 10s-17.2-3.5-23.5-10L512 145.4 120.5 547.2c-6.3 6.4-14.6 9.9-23.5 9.9z m710.5-258.3c-18.2 0-33.1-15.1-33.1-33.6v-55.4h-53.7c-18.2 0-33.1-15.1-33.1-33.6s14.8-33.6 33.1-33.6h86.7c18.2 0 33.1 15.1 33.1 33.6v89c0 18.5-14.8 33.6-33 33.6z",image:"M915.1 280.3l-165-8-9.6-107.6c-2-22.6-22.2-38.4-45.8-36.6l-591.8 48.6c-23.6 2-40.6 21-38.8 43.4l42.4 471.6c2 22.6 22.4 38.4 45.8 36.6l30-2.4-4.8 91.6c-1.2 25.2 18.4 45.6 44.8 47l660.2 31.4c26.4 1.2 48.2-17.2 49.6-42.4l27.8-526.6c1.2-25-18.6-45.4-44.8-46.6z m-709.8 10.6l-14.2 269.6-35 49.4-32.2-356v-2c2-10 8.8-18 19.2-18.8l522-42.8c10.4-0.8 19.4 6 21 15.8 0 0.4 0.6 0.4 0.6 0.8 0 0.2 0.6 0.4 0.6 0.8l5.4 61.6-438-21c-26.4-0.8-48.2 17.6-49.4 42.6z m668 473.8l-169.6-199-74.8 68.6-138.4-161.6-245.4 261.4 20.8-398.2v-0.8c2-10.8 12.4-18.6 23.8-18l582.4 28c11.6 0.6 20.6 9.4 20.8 20.4 0 0.4 0.6 0.6 0.6 1l-20.2 398.2z",info:"M475.2 251.1c0-10.3 3.6-19.1 10.7-26.4 7.1-7.3 16.2-11 27-11 10.4 0 19.1 3.7 26.3 11 7.1 7.3 10.7 16.1 10.7 26.4 0 10.3-3.6 19.1-10.7 26.4-7.2 7.3-15.9 11-26.3 11-10.9 0-19.9-3.7-27-11-7.1-7.4-10.7-16.2-10.7-26.4z m66.7 526.4c0 22.2-9.2 33.4-27.7 33.4-18.9 0-28.4-11.1-28.4-33.4V397.2c0-12.8 2.7-21.8 8-27.1 5.3-5.3 12.1-7.9 20.4-7.9 8.2 0 14.9 2.5 20 7.5s7.6 14.2 7.6 27.5v380.3zM512 120c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392z",key:"M497.4 443.1C466.8 356.5 378.7 288 281.5 288 158.3 288 64 388.8 64 512s98.6 224 221.8 224c97.1 0 181.1-68.5 211.5-155.1h221.4v137.8h148.8V580.9H960V443.1H497.4zM287.9 608.9c-52.9 0-96.1-43.2-96.1-96.1s43.2-96.1 96.1-96.1 96.1 43.2 96.1 96.1-43.2 96.1-96.1 96.1z",layout:"M909.9 851.2H114.1c-27.6 0-50.1-22.3-50.1-49.8V222.6c0-27.4 22.5-49.8 50.1-49.8h795.7c27.6 0 50.1 22.3 50.1 49.8v578.9c0.1 27.4-22.4 49.7-50 49.7zM384 783.5h256v-544H384v544z m-253.4-544c-1.4 0-2.6 1.2-2.6 2.6v538.4c0 1.4 1.3 2.6 2.6 2.6 63.1 0.1 126.2 0.3 189.4 0.4V240.4l-189.4-0.9z m573.4 0.9v543.1c63.1-0.1 126.2-0.3 189.4-0.4 1.4 0 2.6-1.2 2.6-2.6V242.1c0-1.4-1.3-2.6-2.6-2.6l-189.4 0.9z",left:"M710.9 948.6L251 539.7l-0.3-0.3c-7.7-7.4-12-17.2-12-27.6 0-12.4 6.1-23.9 16.8-31.6L710.9 75.3C719.1 68 730 64 741.5 64c24.2 0 43.9 18.1 43.9 40.3 0 11.1-4.8 21.4-13.4 29L345.8 512 772 890.8c8.5 7.6 13.4 18.1 13.4 29 0 22.2-19.7 40.3-43.9 40.3-11.4-0.1-22.2-4.1-30.6-11.5z",linux:"M460.4 269.5c-3.6 0.3-6.1 2.1-7.6 5.2-1.5 3.2-2.9 4.7-4.2 4.7-1.6 0.3-2.4-0.5-2.4-2.5 0-4 3.1-6.5 9.3-7.5h4.9z m42.7 7c-1.3 0.3-3.2-0.7-5.7-3.3-2.4-2.5-5.3-3.3-8.6-2.2 7.8-3.7 13.1-3.3 15.7 1 1 2 0.5 3.5-1.4 4.5zM330.8 489.9c-1.3-0.3-2.3 0.2-3 1.5-0.6 1.3-1.4 3.4-2.2 6.2-0.8 2.8-1.7 5.1-2.7 6.8-1 1.7-2.6 3.8-4.9 6.5-2.3 3.3-2.4 5.3-0.5 6 1.3 0.3 3.4-0.8 6.1-3.5 2.8-2.7 4.8-5.7 6.1-9 0.3-1 0.7-2.2 1-3.5 0.3-1.3 0.6-2.3 1-3 0.3-0.7 0.6-1.4 0.7-2.2 0.1-0.8 0.2-1.5 0.3-2v-1.5l-0.5-1.2c-0.3-0.9-0.8-1.2-1.4-1.1z m419.5 179.5c0-6-9-13-27-21 1.3-5 2.5-9.6 3.7-13.8 1.1-4.2 1.9-8.5 2.4-13s1-8.1 1.5-10.8c0.5-2.7 0.6-6.4 0.3-11.3-0.3-4.8-0.5-8.1-0.5-9.8 0-1.7-0.6-5.4-1.7-11-1.1-5.7-1.8-9.1-2-10.2-0.2-1.2-1-5.3-2.4-12.5s-2.3-11.6-2.7-13.2c-3.3-16-10.9-33.2-23-51.5-12.1-18.3-23.9-30.8-35.3-37.5 7.8 6.7 17.2 20.5 28 41.5 28.4 54 37.3 100.3 26.5 139-3.6 13.3-11.8 20.3-24.5 21-10.1 1.3-16.4-1.7-18.9-9.2-2.5-7.5-3.8-21.4-3.9-41.8-0.1-20.3-2-38.2-5.7-53.5-3-13-6.1-24.5-9.6-34.5-3.4-10-6.6-17.6-9.6-22.7-3-5.2-5.5-9.2-7.6-12.3-2.1-3-4.2-5.5-6.4-7.5-2.1-2-3.4-3.1-3.7-3.5-4.6-20.7-9.7-37.8-15.2-51.5-5.6-13.7-10.4-23-14.5-28s-7.9-10.5-11.5-16.5c-3.6-6-6-12.7-7.3-20-1.3-7-0.3-15.9 3-26.7 3.3-10.8 4-19.1 2.2-24.7-1.8-5.7-9.1-9.8-21.8-12.5-4.9-1-12.2-4-21.8-9-9.7-5-15.5-7.7-17.4-8-2.6-0.3-4.4-4.7-5.4-13s0.3-16.8 3.9-25.5 9.5-13.2 17.6-13.5c12.1-1 20.4 4 25 15 4.6 11 5.2 20.7 2 29-3.6 6.3-3.9 10.8-1 13.2 3 2.5 7.9 2.6 14.7 0.3 4.2-1.3 6.4-7.3 6.4-18v-18.5c-1.6-10-3.8-18.3-6.6-25-2.8-6.7-6.2-11.7-10.3-15.3-4.1-3.5-7.9-6-11.5-7.5-3.6-1.5-8-2.7-13.3-3.7-35 2.7-49.6 25-43.7 67 0 5-0.2 7.5-0.5 7.5-3-3-7.8-4.8-14.5-5.2-6.7-0.5-12.1-0.4-16.2 0.3s-6.6-0.2-7.6-2.5c0.3-19-2.3-34-7.8-45-5.6-11-12.9-16.7-22.1-17-8.8-0.3-15.6 4.2-20.3 13.8-4.7 9.5-7.4 19.4-8.1 29.8-0.3 5 0.2 11.2 1.7 18.5 1.5 7.3 3.6 13.6 6.4 18.8 2.8 5.2 5.3 7.4 7.6 6.8 3.3-1 5.9-3.3 7.8-7 1.3-3 0.2-4.3-3.4-4-2.3 0-4.8-2.4-7.6-7.3-2.8-4.8-4.3-10.4-4.6-16.7-0.3-7.3 1.1-13.5 4.4-18.5 3.3-5 8.8-7.3 16.7-7 5.6 0 10 3.5 13.3 10.5 3.3 7 4.8 13.5 4.6 19.5-0.2 6-0.4 9.7-0.7 11-7.2 5-12.3 9.8-15.2 14.5-2.6 4-7.1 7.9-13.5 11.7-6.4 3.8-9.7 5.9-10.1 6.2-4.2 4.7-6.8 9.2-7.6 13.5-0.8 4.3 0.4 7.3 3.7 9 4.6 2.7 8.7 5.9 12.3 9.8 3.6 3.8 6.2 7 7.8 9.5 1.6 2.5 4.7 4.7 9.1 6.5 4.4 1.8 10.2 2.9 17.4 3.3 15.4 0.7 32.1-1.8 50.1-7.5 0.7-0.3 4.4-1.5 11.3-3.5s12.5-3.7 16.9-5.2c4.4-1.5 9.2-3.7 14.5-6.5 5.2-2.8 8.7-5.7 10.3-8.7 3-4.7 6.2-6 9.8-4 1.6 1 2.7 2.4 3.2 4.3 0.5 1.8 0 3.8-1.5 6s-4.2 3.7-8.1 4.7c-6.6 2-15.8 5.6-27.7 10.8-11.9 5.2-19.4 8.4-22.3 9.8-14.4 6.3-25.9 10.2-34.4 11.5-8.2 1.7-21.1 1.3-38.7-1-3.3-0.7-4.7-0.3-4.4 1 0.3 1.3 3.1 4.5 8.4 9.5 8.2 7.7 19.1 11.3 32.9 11 5.6-0.3 11.4-1.5 17.6-3.5 6.2-2 12.1-4.3 17.6-7 5.6-2.7 11-5.6 16.4-8.7 5.4-3.1 10.3-6 14.7-8.5 4.4-2.5 8.4-4.5 12-6 3.6-1.5 6.4-1.9 8.6-1.3 2.1 0.6 3.5 2.5 4.2 5.5 0 0.7-0.2 1.4-0.5 2.2-0.3 0.8-1 1.7-2 2.5s-2 1.6-3 2.2c-1 0.7-2.4 1.5-4.2 2.5-1.8 1-3.3 1.7-4.4 2.2-1.2 0.5-2.8 1.3-4.9 2.5-2.1 1.2-3.7 1.9-4.6 2.2-9.2 4.7-20.2 12-33.1 22-12.9 10-23.8 17.2-32.6 21.5-8.8 4.3-16.8 4.5-24.1 0.5-6.9-3.7-17.2-15.8-30.9-36.5-7.2-10.3-11.3-14-12.3-11-0.3 1-0.5 2.7-0.5 5 0 8.3-2.4 17.8-7.3 28.3s-9.7 19.7-14.5 27.7c-4.7 8-8.2 17.7-10.3 29-2.1 11.3-0.2 21.8 5.7 31.5-7.5 2-17.7 17-30.7 45-12.9 28-20.7 51.5-23.3 70.5-0.7 6-0.9 17.5-0.7 34.5 0.2 17-0.7 26.8-2.7 29.5-2.6 8-7.4 8.5-14.2 1.5-10.5-10.3-16.4-26-17.6-47-0.7-9.3 0-18.7 2-28 1.3-6.3 1.2-9.3-0.5-9l-2 2.5c-11.8 21.7-10.1 49.3 4.9 83 1.6 4 5.7 8.7 12.3 14 6.5 5.4 10.5 8.7 11.8 10 6.6 7.7 23.6 22.7 51 45.2 27.5 22.5 42.7 35.3 45.6 38.2 5.2 5 8.1 11.3 8.6 19 0.5 7.7-1.8 14.8-6.9 21.5-5.1 6.7-12.5 10.5-22.3 11.5 2.6 5 7.4 12.4 14.2 22.2 6.9 9.8 11.4 18.8 13.8 27 2.3 8.2 3.4 19.9 3.4 35.3 15.1-8 16.2-23.3 3.4-46-1.3-2.7-3-5.3-5.1-8-2.1-2.7-3.7-4.7-4.6-6-1-1.3-1.3-2.3-1-3 1-1.7 3.1-3.2 6.4-4.7 3.3-1.5 6.5-1.1 9.8 1.3 15.1 17.3 42.2 23.3 81.5 18 43.5-5 72.5-19.5 86.9-43.5 7.5-12.7 13.1-17.7 16.7-15 3.9 2 5.5 10.7 4.9 26-0.3 8.3-4.1 23.7-11.3 46-3 7.7-3.9 13.9-3 18.8 1 4.8 4.9 7.4 11.8 7.7 1-6.3 3.4-19.2 7.1-38.5 3.8-19.3 6-34.3 6.6-45 0.6-7-0.4-19.2-3.2-36.7-2.8-17.5-4-33.7-3.7-48.5 0.3-14.8 4.1-26.6 11.3-35.3 4.9-6 13.2-9 25-9 0.3-12.3 6-21.2 16.9-26.5 10.9-5.3 22.8-7.1 35.6-5.2 12.4 1.6 22.2 5.4 29 10.9zM442.2 256c1-5.7 0.6-10.7-1.2-15-1.8-4.3-3.7-6.8-5.7-7.5-3-0.7-4.4 0.5-4.4 3.5 0.6 1.7 1.5 2.7 2.4 3 3.3 0 4.4 2.5 3.4 7.5-1 6.7 0.3 10 3.9 10 1.1 0 1.6-0.5 1.6-1.5z m205.6 98.4c-0.6-2.7-1.7-4.6-3.2-5.8-1.5-1.2-3.6-2-6.4-2.5-2.8-0.5-5.1-1.4-7.1-2.8-1.6-1-3.2-2.3-4.7-4-1.5-1.7-2.6-3-3.4-4-0.8-1-1.7-2.1-2.7-3.3-1-1.2-1.6-1.8-2-2-0.3-0.2-1 0.1-2 0.7-4.6 5.3-3.4 12.6 3.4 21.8 6.9 9.2 13.2 14.4 19.1 15.7 3 0.3 5.3-1 7.1-4 1.9-2.8 2.5-6.2 1.9-9.8zM560.5 248c0-3.7-0.8-6.9-2.4-9.8-1.6-2.8-3.4-4.9-5.4-6.2-2-1.3-3.4-1.8-4.4-1.5-4.6 0.3-5.7 1.5-3.4 3.5l2 1c4.6 1.3 7.5 6.5 8.8 15.5 0 1 1.3 0.7 3.9-1l0.9-1.5zM587 131.5c0-0.7-0.4-1.5-1.2-2.5-0.8-1-2.3-2.2-4.4-3.5-2.1-1.3-3.7-2.3-4.6-3-4.9-5-8.8-7.5-11.8-7.5-3 0.3-4.8 1.6-5.7 3.7-0.8 2.2-1 4.3-0.5 6.5s0.4 4.3-0.3 6.2c-0.3 1.3-1.3 3.1-3 5.2-1.6 2.2-2.6 3.7-3 4.5-0.3 0.9 0.2 2.3 1.5 4.3 1.3 1 2.6 1 3.9 0 1.3-1 3.1-2.5 5.4-4.5 2.3-2 4.8-3.5 7.4-4.5 0.3-0.3 1.8-0.5 4.4-0.5 2.6 0 5.1-0.3 7.3-1 2.4-0.6 3.9-1.8 4.6-3.4z m277.2 670.4c6.5 4 11.6 8.1 15.2 12.3 3.6 4.2 5.5 8.2 5.9 12 0.3 3.8-0.1 7.6-1.2 11.3-1.2 3.7-3.7 7.4-7.6 11-3.9 3.6-7.8 6.9-11.5 9.8-3.8 2.9-8.7 5.9-14.7 9.2-6 3.3-11.2 6.1-15.4 8.3-4.3 2.2-9.5 4.8-15.7 7.7-6.2 3-10.6 5.1-13.3 6.5-12.4 6.3-26.4 15.7-42 28-15.5 12.3-27.9 23-37.1 32-5.6 5.3-16.7 8.6-33.3 9.8-16.7 1.2-31.2-1.2-43.7-7.3-5.9-3-10.7-6.9-14.5-11.7-3.8-4.8-6.5-9.1-8.1-12.7-1.6-3.7-5.2-6.9-10.8-9.8-5.6-2.8-13.3-4.4-23-4.7-14.4-0.3-35.7-0.5-63.8-0.5-6.2 0-15.5 0.2-28 0.7-12.4 0.5-21.9 0.9-28.4 1.3-14.4 0.3-27.4 2.8-39 7.5-11.6 4.6-20.3 9.7-26.2 15-5.9 5.4-13 10.1-21.4 14.2-8.3 4.1-17.1 6.1-26.2 5.8-9.5-0.3-27.6-5.5-54.4-15.5-26.8-10-50.7-17.2-71.6-21.5-6.2-1.3-14.6-2.9-25-4.7-10.5-1.8-18.6-3.3-24.5-4.5-5.9-1.2-12.3-2.8-19.4-4.7-7-2-12.5-4.4-16.4-7.3-3.9-2.9-6.7-6.1-8.4-9.8-3.3-7.7-2.1-18.7 3.4-33.2 5.5-14.5 8.5-23.6 8.8-27.3 0.3-5.3-0.3-12-2-20s-3.3-15.1-4.9-21.2c-1.6-6.2-2.3-12.2-2.2-18.2 0.1-6 1.9-10.5 5.1-13.5 4.6-4 13.9-6.3 28-7 14.1-0.7 23.9-2.7 29.5-6 9.8-6 16.7-11.8 20.6-17.5 3.9-5.7 5.9-14.2 5.9-25.5 6.9 24.3 1.6 42-15.7 53-10.5 6.7-24 9.2-40.7 7.5-11.1-1-18.1 0.7-21.1 5-4.2 5-3.4 14.5 2.4 28.5 0.7 2 2 5 3.9 9 2 4 3.4 7 4.2 9 0.8 2 1.6 4.8 2.2 8.5 0.7 3.7 0.8 7.3 0.5 11 0 5-2.8 13.2-8.4 24.5-5.6 11.3-7.9 19.3-6.9 24 1 5.7 7 10 18.1 13 6.5 2 20.4 5.1 41.4 9.2 21.1 4.2 37.4 7.6 48.8 10.2 7.8 2 20 5.7 36.3 11 16.4 5.3 29.8 9.2 40.5 11.5 10.6 2.3 19.7 3 27.2 2 14.1-2 24.6-6.7 31.7-14 7-7.3 10.8-15.3 11.3-24s-0.7-18.4-3.7-29.2c-2.9-10.8-6-19.5-9.3-26s-6.6-12.6-9.8-18.2c-39.6-63.3-67.2-103.7-82.9-121-22.2-24.7-40.7-31.3-55.5-20-3.6 3-6 0.5-7.3-7.5-1-5.3-1.3-11.7-1-19 0.3-9.7 2-18.3 4.9-26 2.9-7.7 6.9-15.5 11.8-23.5s8.5-15 10.8-21c2.6-7 7-19 13-36s10.9-30 14.5-39c3.6-9 8.5-19.2 14.7-30.5 6.2-11.3 12.6-20.3 19.1-27 36-47.7 56.3-80.2 60.8-97.5-3.9-37.3-6.5-89-7.8-155-0.6-30 3.3-55.2 11.8-75.7s25.8-37.9 52-52.2c12.7-7 29.8-10.5 51-10.5 17.3-0.3 34.7 1.9 52 6.7 17.3 4.8 31.9 11.8 43.7 20.7 18.7 14 33.6 34.2 44.9 60.7 11.3 26.5 16.1 51.1 14.5 73.8-1.6 31.7 3.3 67.3 14.7 107 11.1 37.7 32.9 74 65.2 109 18 19.7 34.3 46.8 48.8 81.5 14.6 34.7 24.3 66.5 29.2 95.5 2.6 16.3 3.4 30.4 2.4 42.2-1 11.8-2.9 21.1-5.9 27.7-2.9 6.7-6.2 10.3-9.8 11-3.3 0.7-7.1 3.8-11.5 9.5s-8.8 11.6-13.3 17.8c-4.4 6.2-11 11.7-19.9 16.7-8.8 5-18.8 7.3-29.9 7-5.9-0.3-11-1.2-15.4-2.5s-8.1-3.6-11.1-6.7c-3-3.2-5.2-5.8-6.6-7.7-1.5-2-3.3-5.4-5.7-10.2-2.3-4.8-3.8-8.1-4.4-9.8-7.2-12.3-13.9-17.3-20.1-15-6.2 2.3-10.8 10.5-13.8 24.5s-1.8 30.2 3.4 48.5c6.6 23.3 6.7 55.8 0.5 97.5-3.3 21.7-0.3 38.4 8.8 50.2 9.1 11.8 21.1 17.3 35.8 16.5 14.7-0.8 28.6-6.7 41.7-17.8 19.3-16.3 33.9-27.4 43.9-33.2 10-5.8 26.9-12.9 50.8-21.2 17.3-6 29.9-12.1 37.8-18.2s10.9-11.9 9.1-17.2c-1.8-5.3-5.9-10.1-12.3-14.2-6.4-4.2-14.8-8.1-25.3-11.7-10.8-3.7-18.9-11.7-24.3-24-5.4-12.3-7.8-24.4-7.3-36.3 0.5-11.8 3-19.8 7.6-23.7 0.3 10.3 1.6 19.7 3.9 28.3 2.3 8.5 4.7 15.3 7.1 20.3 2.5 5 5.8 9.7 10 14.2s7.7 7.7 10.3 9.5c2.6 1.8 6.2 4 10.5 6.5 4.4 2.5 7.1 4.1 8.1 4.7l0.4-0.5z",live:"M869.8 898.8c0 15.6-10.6 28.2-23.6 28.2H177.8c-13 0-23.6-12.7-23.6-28.2 0-15.6 10.6-28.2 23.6-28.2h668.4c13-0.1 23.6 12.6 23.6 28.2zM960 146.4v575.2c0 27.2-26.7 49.4-59.5 49.4h-777C90.7 771 64 748.8 64 721.6V146.4C64 119.2 90.7 97 123.5 97h777.1c32.7 0 59.4 22.2 59.4 49.4z m-52.6 13.3c0-5.7-6.5-10.5-14.1-10.5H132.6c-7.7 0-14.1 4.8-14.1 10.5v549c0 5.7 6.5 10.5 14.1 10.5h760.7c7.7 0 14.1-4.8 14.1-10.5v-549zM486.7 613.8c0.2 0.2 1.4 1.3 3.3 1.2 1.6-0.1 2.7-1 2.9-1.3l243.7-299.1c0.1-0.1 1.6-1.5 1.3-3.6-0.2-1.6-1.4-2.4-1.6-2.6l-43.6-38.1c-0.2-0.2-1.7-1.6-3.8-1.2-1.9 0.3-2.9 1.7-3 1.9L484 522 348 380.6c-0.4-0.2-1.1-0.5-2-0.6-1.4-0.1-2.5 0.3-3 0.6l-38.9 38.9c-0.3 0.4-0.9 1.2-1.1 2.5-0.2 1.8 0.6 3.1 0.9 3.4l182.8 188.4z",load:"M587.6 587.9c25.3-25.3 202.5 88.6 234.2 120.2 31.7 31.6 38 88.5 6.4 120.1-31.6 31.6-82.2 31.6-113.9-0.1-31.7-31.6-152-215-126.7-240.2zM436 434.8c-25.3 25.3-202.5-88.6-234.2-120.2-31.7-31.6-38-88.5-6.4-120.1 31.6-31.6 82.2-31.6 113.9 0.1 31.7 31.6 152 214.9 126.7 240.2z m-31.8 77.7c0 35.7-205.9 80.4-250.7 80.4-44.8 0-89.5-35.7-89.5-80.4s35.8-80.4 80.6-80.4c44.7 0 259.6 44.7 259.6 80.4z m31.9 76.8c25.3 25.3-88.7 202.3-120.3 233.9-31.7 31.6-88.6 38-120.2 6.4-31.6-31.6-31.6-82.2 0-113.8 31.7-31.6 215.2-151.8 240.5-126.5z m75.9 30.9c35.8 0 80.5 205.7 80.5 250.4 0 44.7-35.8 89.4-80.5 89.4s-80.5-35.8-80.5-80.5 44.7-259.3 80.5-259.3z m107.8-107.7c0-35.7 205.9-80.4 250.7-80.4 44.8 0 89.5 35.7 89.5 80.4s-35.8 80.4-80.6 80.4c-44.7 0-259.6-44.7-259.6-80.4z m-33.6-75.9c-25.3-25.3 88.7-202.3 120.3-233.9 31.7-31.6 88.6-38 120.2-6.4 31.6 31.6 31.6 82.1-0.1 113.8-31.6 31.6-215.1 151.8-240.4 126.5zM512 403.8c-35.8 0-80.5-205.7-80.5-250.4 0-44.7 35.8-89.4 80.5-89.4s80.5 35.8 80.5 80.5-44.7 259.3-80.5 259.3z",loading:'',location:"M511.9 960h-0.1c-16.2-0.1-31.7-8.2-42.3-22.3-7.7-10-78-101.2-147.4-212.6C230 577.4 183.3 465.5 183.3 392.7 183.3 211.5 330.8 64 512 64s328.7 147.5 328.7 328.7c0 72.9-46.8 185-139.1 333.1-69.2 111-139.1 201.8-147.1 212.1-10.6 14.1-26 22.2-42.3 22.2l-0.3-0.1z m0.1-845.4c-153.3 0-278.1 124.8-278.1 278.1 0 63.9 47.2 172.4 136.4 313.9C439.9 816.9 508.9 906 509.6 906.8l0.2 0.3c1.1 1.4 1.9 2 2.3 2.2 0.4-0.2 1.1-0.8 2.1-2.1l0.1-0.1c2.8-3.6 275.8-357.8 275.8-514.4 0-153.3-124.8-278.1-278.1-278.1z m0.2 346.2c-55.1 0-99.9-44.8-99.9-99.9 0-55.1 44.8-99.9 99.9-99.9 55.1 0 99.9 44.8 99.9 99.9-0.1 55.1-44.9 99.9-99.9 99.9z m0-149.1c-27.2 0-49.3 22.1-49.3 49.3 0 27.2 22.1 49.3 49.3 49.3 27.2 0 49.3-22.1 49.3-49.3-0.1-27.2-22.2-49.3-49.3-49.3z",lock:"M811.1 960H212.9c-47.3 0-85.7-37.7-85.7-84V473.7c0-46.3 38.5-84 85.7-84h43.9l-0.5-77.1c0-66.2 26.5-128.6 74.6-175.7C379 89.9 442.7 64 510.2 64c67.6 0 131.3 25.9 179.4 72.9 48.1 47.1 74.6 109.4 74.6 175.6l-0.5 77.2h47.4c47.3 0 85.7 37.7 85.7 84V876c0 46.3-38.4 84-85.7 84zM208.9 447.1c-14.8 0-26.8 11.7-26.8 26.1v407.7c0 14.4 12 26.1 26.8 26.1h606.3c14.8 0 26.8-11.7 26.8-26.1V473.2c0-14.4-12-26.1-26.8-26.1H208.9z m301.9 346.3c-17.2 0-31.2-12.8-31.2-28.5V664.3c-22.4-11.4-36.7-34.2-36.7-59.1 0-36.7 30.5-66.5 67.9-66.5s67.9 29.9 67.9 66.5c0 24.9-14.3 47.7-36.7 59.1v100.6c0 15.7-14 28.5-31.2 28.5zM313.4 388.1H706l1.6-78.4c0-51.2-20.6-99.5-58-136-37.4-36.6-86.9-56.7-139.4-56.7s-102 20.1-139.4 56.7c-37.4 36.6-58 84.9-58 136.2l0.6 78.2z",mail:"M960 280.9v472.3c0 37.9-31 68.9-68.9 68.9H132.9c-37.9 0-68.9-31-68.9-68.9V280.9c0-3.9 4.5-5.8 7.3-3l232 236.1c1.5 1.7 1.5 4.3 0 6L141.1 692.7c-11 11-11 28.6 0 39.6 5.4 5.4 12.7 8.2 19.8 8.2s14.4-2.8 19.8-8.2l161.5-172.1c1.7-1.7 4.5-1.7 6.2 0l37.9 38.6c33.4 33.8 78.6 53.8 126.2 53.6 47-0.2 90.7-18.7 123.6-52.1l39.4-40.1c1.7-1.7 4.5-1.7 6.2 0l161.5 172.1c5.4 5.4 12.7 8.2 19.8 8.2s14.4-2.8 19.8-8.2c11-11 11-28.6 0-39.6L720.9 520c-1.7-1.7-1.7-4.3 0-6l231.8-236.1c2.6-2.6 7.3-0.9 7.3 3zM512 596.2c31.9 0 61.8-12.5 84.2-35.3l337.9-344c-11.8-9.5-26.5-15.1-42.6-15.1H132.7c-16.2 0-31 5.6-42.6 15.1l337.9 344c22.2 22.6 52.1 35.3 84 35.3z",menu:"M905 960H635.1c-30.3 0-55-24.7-55-55V635.1c0-30.3 24.7-55 55-55H905c30.3 0 55 24.7 55 55V905c0 30.3-24.7 55-55 55z m-516.1 0H119c-30.3 0-55-24.7-55-55V635.1c0-30.3 24.7-55 55-55h269.9c30.3 0 55 24.7 55 55V905c-0.1 30.3-24.7 55-55 55z m-263.4-61.2h258v-258h-258v258z m514.8-2.8h258V638h-258v258zM905 443.8H635.1c-30.3 0-55-24.7-55-55V119c0-30.3 24.7-55 55-55H905c30.3 0 55 24.7 55 55v269.9c0 30.3-24.7 54.9-55 54.9z m-516.1 0H119c-30.3 0-55-24.7-55-55V119c0-30.3 24.7-55 55-55h269.9c30.3 0 55 24.7 55 55v269.9c-0.1 30.3-24.7 54.9-55 54.9z m-263.4-61.1h258v-258h-258v258z","menu-dot":"M157.6 605.5c-51.6 0-93.5-41.9-93.5-93.5s41.9-93.5 93.5-93.5 93.5 41.9 93.5 93.5-41.9 93.5-93.5 93.5z m708.8 0c-51.6 0-93.5-41.9-93.5-93.5s41.9-93.5 93.5-93.5 93.5 41.9 93.5 93.5-42 93.5-93.5 93.5z m-354.3 0c-51.6 0-93.5-41.9-93.5-93.5s41.9-93.5 93.5-93.5 93.5 41.9 93.5 93.5-41.9 93.5-93.5 93.5z",mute:"M505.7 913.5c-18.9 0-39.5-9.5-59-27.7L257.2 705H141.4C92.2 705 64 676.8 64 627.7V396c0-49.9 27.5-77.4 77.4-77.4h115.9L446.7 138c26.5-24.8 56.4-33.5 80.1-23.2 25.1 10.9 39.4 40.7 39.4 82v630.1c0 41.4-14.4 71.4-39.5 82.3-6.7 2.8-13.7 4.3-21 4.3zM164.5 380.7c-29.8 0-38.5 8.6-38.5 38.5v185.3c0 30.6 7.9 38.5 38.5 38.5h126.7l2.3 2.5c80.5 85.6 141.6 149.1 176.7 183.7 14.3 14.1 23.2 17.4 26.6 16 1.2-0.5 7.3-4.4 7.3-30.8v-603c0-26.6-5.7-29.8-6.3-30-1-0.4-7.3-1.7-27.4 18-35.8 35-96 93.6-184.2 179.1l-2.3 2.2H164.5zM929 659c-8.3 0-16-3.2-21.9-9.1L800.9 543.7 695.1 649.5c-5.9 5.9-13.7 9.1-22 9.1s-16.1-3.2-21.9-9.1c-12.1-12.1-12.1-31.8 0-43.9L757 499.8 651.9 394.7c-12.1-12.1-12.1-31.7 0-43.8 5.9-5.9 13.6-9.1 21.9-9.1 8.3 0 16 3.2 21.9 9.1L800.8 456 907 349.8c5.9-5.9 13.7-9.1 21.9-9.1s16.1 3.2 21.9 9.1c5.9 5.9 9.1 13.7 9.1 21.9 0 8.3-3.2 16.1-9.1 21.9L844.7 499.9l106.2 106.2c12.1 12.1 12.1 31.7 0 43.8-5.8 5.9-13.6 9.1-21.9 9.1z",option:"M64 768h544v64H64v-64z m736 0h160v64H800v-64z m-32 127c0 35.9-28.7 65-64 65s-64-29.1-64-65V705c0-35.9 28.7-65 64-65s64 29.1 64 65v190zM64 480h160v64H64v-64z m352 0h544v64H416v-64z m-32 127c0 35.9-28.7 65-64 65s-64-29.1-64-65V417c0-35.9 28.7-65 64-65s64 29.1 64 65v190zM64 192h544v64H64v-64z m736 0h160v64H800v-64z m-32 127c0 35.9-28.7 65-64 65s-64-29.1-64-65V129c0-35.9 28.7-65 64-65s64 29.1 64 65v190z",phone:"M717.7 64H306.3C261 64 224 100.7 224 145.5v733.1c0 44.8 37 81.5 82.3 81.5h411.4c45.3 0 82.3-36.7 82.3-81.5V145.5c0-44.8-37-81.5-82.3-81.5zM728 832H296V163h432v669z m-168 64c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48z",pie:"M64 480C64 250.2 250.2 64 480 64c10.8 0 22 0.4 32 1.2V512H65.2c-0.8-10-1.2-21.2-1.2-32z m155.6 324.4C295.8 899.2 412.8 960 544 960c229.8 0 416-186.2 416-416 0-131.2-60.8-248.2-155.6-324.4-63.4-51-142.4-83.8-228.4-90.4V576H129.2c6.6 86 39.4 165 90.4 228.4z",pin:"M115.8 960c-13.7 0-26.6-5.4-36.4-15.2l-0.5 0.4 0.4-0.5c-18.3-18.4-20.4-46.7-5-67.2l179-242.4-138.8-138.8c-16.5-16.5-19.8-42.3-8-62.8l0.2-0.3c4.5-7.1 21.7-31.7 54.6-51.1 19.1-11.3 40.3-18.7 62.8-22.1 27.3-4.2 56.9-2.4 87.8 5.2 1.8 0.2 3.8 0.4 5.8 0.6h0.5c6 0.5 11.9 1.1 18.5 2.1 25.2 4.1 72.8-18 113.2-52.4 38.6-32.9 64.5-72 64.5-97.5 0-6.4-0.2-13.3-0.3-20-1.1-26.3-2.9-70.2 29.8-102.8 38.6-38.7 99.8-41.8 142.2-7.3 1 0.8 1.9 1.7 2.9 2.7l0.4 0.4c23.8 23.3 238 237.5 239.5 239 20.1 20.1 31.2 46.8 31.2 75.3 0 28.4-11 55.2-31.1 75.3-32.5 32.6-76.8 30.7-103.4 29.6h-1.4c-6-0.1-12.2-0.3-18.1-0.3-24.3 0-53.9 17.6-83.3 49.7-19.7 21.4-37.5 47.6-50 73.8-11.1 23.1-17.1 44.2-16.1 56.5 0.9 8.6 2.6 22.9 3 25.8 32.8 133.7-57.3 195.1-67.6 201.7l-0.1 0.1c-20.7 12.5-46.9 9.4-63.7-7.4L374.7 756.6c-11.6-11.6-11.6-30.6 0-42.2 5.6-5.6 13.1-8.8 21.1-8.8 8 0 15.5 3.1 21.1 8.8L565.4 863c6.5-5.2 17.3-15.3 26.2-31.2 16.2-29 19.3-64 9.5-104.2v-0.2c-0.6-2.8-3-23.4-3.9-31.8v-0.2c-1.9-22.6 5.5-53 20.7-85.6 15-32.1 36.6-64.3 60.9-90.7 28.9-31.5 74.5-69 127.2-69 7.1 0 15 0.2 21.4 0.3h0.2c26.5 1.1 46.2 0.9 59.2-12.1 8.8-8.8 13.6-20.5 13.6-33s-4.9-24.3-13.8-33.2C884.4 370 658 143.7 647.3 133.3c-17.8-14.2-44.6-12.5-61.2 4.1-13.1 13.2-13.4 32.6-12.3 58.7v0.1c0.2 7.2 0.3 14.7 0.3 21.8 0 43.9-31.9 97.3-85.5 142.9-23.9 20.4-51.2 38.1-76.8 49.8-31.9 14.6-60.3 20-84.6 16.1-5.1-0.8-9.9-1.2-14.1-1.6-2.7-0.2-5.4-0.5-8-0.8-2.6-0.1-5.1-0.6-7.7-1.4-83-20.4-123.9 20.5-136.1 36.1L313.6 611c10.5 10.5 11.8 26.9 2.9 38.9L152.7 871.6 316.2 752c6.4-4.7 14.3-6.6 22.2-5.4 7.9 1.2 14.8 5.5 19.5 11.9 9.7 13.3 6.7 32-6.5 41.7L146.2 949.9c-8.9 6.6-19.4 10.1-30.4 10.1z",plus:"M512 960c-21.2 0-38.4-17.2-38.4-38.4V550.3H102.3C81.2 550.4 64 533.2 64 512c0-21.2 17.2-38.4 38.4-38.4h371.3V102.3c0-21.1 17.2-38.4 38.4-38.4s38.4 17.2 38.4 38.4v371.3h371.3c21.1 0 38.4 17.2 38.4 38.4 0 10.3-4 19.9-11.2 27.1-7.2 7.2-16.9 11.2-27.1 11.2H550.6v371.3c0 10.3-4 19.9-11.2 27.1-7.5 7.3-17.1 11.3-27.4 11.3z",post:"M813.7 960H154.8c-0.7 0-17.2-0.1-33.7-8-16.1-7.7-35.3-24-35.3-58.3V130.3c0-34.1 19.2-50.4 35.3-58.2 16.5-7.9 33-8.1 33.6-8.1h658.9c0.7 0 17.2 0.2 33.7 8.1 16.1 7.7 35.3 24.1 35.3 58.2v32.5l-52.2 46.7v-79.9c-0.1-6.3-2.4-10.1-7.6-12.6-4.5-2.1-9.3-2.3-9.3-2.3H154.7s-5 0.1-9.6 2.4c-5.1 2.6-7.3 6.5-7.3 13.1v763.4c0 0.4 0.3 4.7 2.4 8.6 1.7 3 5 7 14.5 7h658.8c5.8 0 10.1-1.4 12.8-4.1 4.1-4.2 4.1-11 4.1-11.1V561.5l52.2-49.6v381.9c0 0.7-0.1 16.7-8.5 32.7-8 15.3-25 33.5-60.4 33.5zM424.4 655.6l-25.8 125.2 129.5-25.1L927.6 368l0.1-0.1c0.3-0.3 10.5-10 10.6-22.4 0.1-7.5-3.5-14.8-10.8-21.8L914.4 311c-15.2-14.8-23.4-22.7-44.2-42.9-7.3-7.1-15.1-10.7-23-10.5-13.1 0.2-23.2 10.3-23.3 10.4l-0.2 0.2-399.3 387.4z m18.7 37.3l-15.2 59.4 61-14.8-45.8-44.6z m81 29.2c-20-23-40-46.1-60.1-69.1l331-319c21.3 21.7 42.7 43.3 64 65-111.6 107.7-223.3 215.4-334.9 323.1z m52-312.8H257.5c-10.7 0-19.4-1.7-26-5.1-7.3-3.8-11.6-9.7-11.6-16.3 0-10.9 11.6-22 37.5-22h366l-47.3 43.4zM874 384c-21.7-21.3-43.3-42.7-65-64l38-38c21.7 21.3 43.3 42.7 65 64l-38 38zM607.2 270.3H257.7c-10.7 0-19.5-1.7-26.1-5.1-7.4-3.8-11.6-9.7-11.6-16.3 0-10.9 11.6-22 37.7-22h349.6c10.4 0 19.2 1.8 25.7 5.3 7.3 3.9 11.5 9.9 11.5 16.4-0.1 10.8-11.6 21.7-37.3 21.7z",qr:"M395 64H64v329.2h331V64z m-48.5 282.2h-235V111h235v235.2z m258.8 495.4h353.3v-46.9H605.3v46.9zM300.1 158.2H158.9V301h141.2V158.2zM629 64v330.7h331V64H629z m282.5 282.9h-235V111h235v235.9z m47.8 353.6h-165v46.8h164.9v-46.8zM723.9 464.4H512.1v94.7h211.8v-94.7z m-329.6-22.8H64.7v46.8h329.5v-46.8zM582.4 64.9h-46.9v211.8h46.9V64.9z m376.9 541.4H511.8v46.1h447.5v-46.1zM441.4 417.1h46.8V64.9h-46.8v352.2z m94 329.8h-46.8v165.3h-0.2v47.6h0.2v0.2h46.8v-0.2H700v-47.6H535.4V746.9z m331.1-589.4H723.9v142.8h142.6V157.5z m92.8 259.1H817.9v48.3H911V558h48.3V416.6z m-95 541.9h95v-94.3h-95v94.3z m-705.4-93.3h141.2V723.8H158.9v141.4z m117.9-283.1h164v-46.9h-164v46.9zM64 959.6h330.3V628.9H64v330.7z m47.5-283.7h235v235.9h-235V675.9z m93.9-93.8v-46.9H65v46.9h140.4z",quote:"M297.6 530.1h140.2V960H64V634.7C64 279.4 188.6 89.1 437.8 64v161.2c-93.4 30.1-140.2 116.1-140.2 258.5v46.4z m522.2 0H960V960H586.2V634.7c0-355.3 124.5-545.6 373.7-570.7v161.2c-93.4 30.1-140.2 116.1-140.2 258.5V530h0.1z","radio-on":"M512 288c-123.2 0-224 100.8-224 224s100.8 224 224 224 224-100.8 224-224-100.8-224-224-224z m0-224C265.6 64 64 265.6 64 512s201.6 448 448 448 448-201.6 448-448S758.4 64 512 64z m0 806.4c-197.1 0-358.4-161.3-358.4-358.4S314.9 153.6 512 153.6 870.4 314.9 870.4 512 709.1 870.4 512 870.4z","radio-off":"M512 64C265.6 64 64 265.6 64 512s201.6 448 448 448 448-201.6 448-448S758.4 64 512 64z m0 806.4c-197.1 0-358.4-161.3-358.4-358.4S314.9 153.6 512 153.6 870.4 314.9 870.4 512 709.1 870.4 512 870.4z",right:"M282.5 960c-24.2 0-43.9-18.1-43.9-40.3 0-10.9 4.9-21.4 13.4-29L678.2 512 252 133.2c-8.6-7.5-13.4-17.8-13.4-29 0-22.2 19.7-40.3 43.9-40.3 11.5 0 22.4 4 30.6 11.3l455.5 404.9c10.7 7.7 16.8 19.2 16.8 31.6 0 10.4-4.3 20.2-12 27.6l-0.3 0.3-460 409c-8.4 7.4-19.2 11.4-30.6 11.4z",sad:"M897.6 64c6.7 0 13.4 3 18 8.6 7.9 9.9 6.3 24.4-3.6 32.3-123.7 99-194.6 246.5-194.6 404.8 0 161 73 310.2 200.2 409.2 10 7.8 11.8 22.2 4 32.3-7.8 10-22.2 11.8-32.3 4C750.8 847.4 671.4 685 671.4 509.7c0-172.3 77.2-332.9 211.8-440.7 4.1-3.2 9.1-5 14.4-5zM207.4 348c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8S97.6 177.6 97.6 238.3c0 60.6 49.1 109.7 109.8 109.7z m0 546.6c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8-60.6 0-109.8 49.2-109.8 109.8 0 60.7 49.1 109.8 109.8 109.8z",search:"M914.4 957.9c12.4 4.6 26.5 1.5 35.8-7.9 9.2-9.3 12.2-23.1 7.7-35.4l-43.3-43.8-44.6-44.7L747.2 702c57-68.3 91.8-155.1 91.8-250.7C839 237.8 665.4 64 452.1 64 237.6 64 64 237.8 64 451.3 64 666 237.6 839.7 452.1 839.7c92.3 0.1 181.6-32.9 251.7-93.1l122.8 124.1 44.6 43.4 43.2 43.8zM452.1 777.7C272.3 777.7 126 632.5 126 451.3c0-180 146.3-325.2 326.1-325.2s326.1 145.2 326.1 325.2c0 179.9-146.3 326.4-326.1 326.4zM358 273c0.7 5.5-2.7 10.5-13.1 21.7-10.9 11.9-16.4 17.9-22.7 23-28.6 23.2-83.4 133.7-66.8 209.9 1.7 7.9 7.4 30.1-4.6 39.5-5.7 4.5-14.7 5.6-20.4 3.8-27.1-8.5-27.4-99.1 1.4-175.7 28.3-75.4 87.3-143.8 112-137 5.3 1.4 13.3 7.5 14.2 14.8z",second:"M512 64c-156.8 0-284.3 127.5-284.3 284.3S355.2 632.6 512 632.6s284.3-127.5 284.3-284.3S668.8 64 512 64z m-61.2 242.5h-40.1c0-45.5 14.1-77.7 42.3-96.5 18.2-12.1 41-18.2 68.3-18.2 28.5 0 52.3 8.7 71.5 25.9 19.1 17.3 28.7 40.5 28.7 69.6 0 26.4-8.2 48.3-24.6 65.5-11.2 11.8-31.6 25.6-61 41.4l-33.2 18.2c-19.4 10.6-33.8 22.3-43.2 35.1-6.7 8.8-10.6 17.6-11.8 26.4h173.9v37.8H402.5c0-30.9 7.1-57.2 21.4-78.7 12.1-18.2 30-34.3 53.7-48.2l42.3-24.6c21.8-12.8 36-22.3 42.3-28.7 10.9-11.5 16.4-26.9 16.4-46 0-15.2-4.5-27.9-13.7-38.2-11.5-13-28.1-19.6-49.6-19.6-20.3 0-36 6.2-46.9 18.7-11.7 13.7-17.6 33.7-17.6 60.1z m282.3 305.1c-4.8-10.3-18.1-15.2-29.7-10.8-11.6 4.3-17.2 16.2-12.4 26.6l80.8 173.8-148.3-26.7c-9.1-1.6-18.5 1.9-23.7 8.9l-83.3 113.3-4.2 6.5-4.9-6.4-83.1-112.5c-5.1-6.9-14.5-10.4-23.7-8.6l-148.3 28.1 81.1-174.5c4.8-10.4-0.7-22.2-12.3-26.5-11.6-4.2-24.9 0.7-29.8 11.1l-97.6 210c-3.2 7-1.9 14.9 3.5 20.7 5.4 5.8 13.9 8.4 22.2 6.8l175.3-33.2L492.9 951c2.6 3.5 6.2 6.1 10.3 7.6 1.9 0.7 4 1.1 6.1 1.3 0.2 0 3.7 0.1 4.6 0.1h0.3c6.8-0.6 13-3.9 16.8-9.1L629.3 817l175.3 31.5c4.6 0.8 9.2 0.4 13.3-1.2 3.4-1.3 6.4-3.3 8.8-5.9 5.4-5.8 6.7-13.8 3.5-20.7l-97.1-209.1z",setting:"M373.4 942.1c-2.9 0-5.7-0.5-8.6-1.5-53.7-19-102.6-47.6-145.6-85.2-7.8-6.8-10.8-17.6-7.9-27.5 13.4-44.6 8.3-91.3-14.6-131.5-22.9-40.1-60.2-68-105.1-78.5-10-2.3-17.8-10.5-19.7-20.7-5.2-28.7-7.9-57.3-7.9-85.2 0-27.9 2.7-56.5 8.1-85.1 1.9-10.3 9.6-18.4 19.7-20.8 44.9-10.4 82.2-38.3 105.1-78.5 22.8-40.1 28-86.8 14.6-131.4-3-9.9 0.1-20.8 7.9-27.6 42.9-37.6 91.9-66.3 145.6-85.2 9.8-3.5 20.6-0.8 27.7 6.9 31.4 34.1 73.8 52.9 119.4 52.9 45.7 0 88.1-18.8 119.5-52.9 7-7.6 17.9-10.4 27.6-6.9 53.6 18.9 102.6 47.6 145.6 85.2 7.8 6.8 10.8 17.6 7.9 27.5-13.5 44.7-8.3 91.4 14.6 131.5 22.9 40.1 60.2 68 105.1 78.5 10 2.4 17.8 10.5 19.7 20.8 5.4 28.6 8.1 57.3 8.1 85.1 0 27.8-2.7 56.4-8.1 85.1-1.9 10.3-9.7 18.4-19.7 20.7-44.9 10.5-82.2 38.4-105.1 78.5-22.9 40.2-28.1 86.9-14.6 131.5 3 9.9-0.1 20.8-7.9 27.6-43 37.7-92 66.3-145.6 85.2-9.8 3.4-20.6 0.6-27.6-7-31.3-34.1-73.7-52.9-119.4-52.9-45.6 0-88.1 18.8-119.5 52.9-5.1 5.4-12 8.5-19.3 8.5zM263.1 829.5c31 25 65.4 45.2 102.3 59.9 19.5-18 41.9-32.2 66.5-42.1 25.7-10.4 52.7-15.6 80.1-15.6 54.6 0 106.6 20.5 146.6 57.7 36.9-14.7 71.3-34.9 102.4-59.9-5.6-26.2-6.5-52.9-2.7-79.5 4-27.7 13-54 26.7-78.1 27.2-47.7 70.8-83.1 122.8-99.9 3-20.4 4.6-40.5 4.6-59.9s-1.5-39.6-4.6-60c-52.1-16.8-95.6-52.2-122.8-99.9-13.7-24.1-22.7-50.3-26.7-78.1-3.8-26.6-2.9-53.3 2.7-79.5-31-25.1-65.4-45.2-102.4-59.9-40.2 37.2-92.2 57.7-146.7 57.7-27.4 0-54.4-5.3-80.1-15.6-24.7-9.9-47-24.1-66.6-42.1-37 14.8-71.4 35-102.4 60 5.6 26.2 6.5 52.9 2.7 79.5-4 27.7-13 54-26.7 78.1-13.7 24.1-31.7 45.1-53.4 62.5-20.8 16.7-44.1 29.2-69.3 37.4-3 20.3-4.6 40.5-4.6 60 0 19.4 1.5 39.6 4.6 59.9 52.1 16.8 95.6 52.1 122.9 99.9 27.4 47.8 35.8 103.6 24.1 157.5zM512 668.2c-85 0-154.1-70.1-154.1-156.2S427 355.8 512 355.8c41.1 0 79.8 16.3 108.9 45.8C650 431.1 666.1 470.3 666 512c0 8.6-0.9 17.4-2.7 27.9-1.2 7-5.2 13.1-11 17.2-5.8 4-12.7 5.5-19.6 4.2-14.3-2.7-23.8-16.6-21.1-31 1.3-7.1 1.9-13 1.9-18.4C613.5 455.1 568 409 512 409c-55.9 0-101.5 46.2-101.5 102.9 0 56.8 45.5 102.9 101.5 102.9 5.4 0 11.1-0.6 18.1-1.9 6.8-1.3 13.7 0.2 19.4 4.1 5.9 4.1 9.9 10.2 11.2 17.4 2.6 14.4-6.9 28.3-21.2 30.9-10.2 2.1-19 2.9-27.5 2.9z",share:"M809.6 960c-82.9 0-150.4-67.5-150.4-150.4 0-6.2 0.4-12.2 1.1-18.2L337.1 615.2c-27.3 38.5-72.1 63.6-122.8 63.6-82.8 0-150.3-67.4-150.3-150.3s67.5-150.4 150.4-150.4c49.7 0 93.9 24.3 121.3 61.5l246.8-167.5c-7.4-17.8-11.5-37.3-11.5-57.7C571 131.5 638.5 64 721.4 64s150.4 67.5 150.4 150.4-67.5 150.4-150.4 150.4c-46 0-87.2-20.8-114.8-53.4L357 480.7c5 15 7.8 31.1 7.8 47.8 0 15.2-2.3 30-6.5 43.9l315.8 172.2c24.3-50.4 75.9-85.3 135.5-85.3 82.9 0 150.4 67.5 150.4 150.4S892.5 960 809.6 960z m-0.5-245.2c-52.8 0-95.8 42.9-95.8 95.7 0 52.8 43 95.7 95.8 95.7s95.7-42.9 95.7-95.7c0.1-52.8-42.9-95.7-95.7-95.7z m-88.7-598c-53.4 0-96.8 43.4-96.8 96.8s43.4 96.8 96.8 96.8 96.8-43.4 96.8-96.8-43.4-96.8-96.8-96.8zM214.3 433.6c-53 0-96.2 43.1-96.2 96.2 0 53 43.1 96.2 96.2 96.2 53 0 96.2-43.1 96.2-96.2 0-53-43.2-96.2-96.2-96.2z",star:"M891.9 355.6l-218.6-15.8c-4.6-0.4-8.6-3.1-10.2-7.5l-83.3-203.8C568.4 100.4 542.5 83 512.1 83c-30.3 0-56 17.4-67.7 45.7l-83.4 204c-1.8 4.2-5.7 7.2-10.2 7.5L132.5 356c-29.6 1.7-54.8 21.1-64.4 49.8-9.9 29-1.6 59.5 21.7 79.5l168.9 140.3c3.5 2.9 5.1 7.7 4 12.1l-51.5 211.9c-6 22-1.8 44.8 11.5 62.6 13.7 18 35.1 28.8 57.5 28.8 13.9 0 27.4-4.2 38.5-11.8l184.6-115.5c3.9-2.4 8.7-2.4 12.6 0l186.4 115.1c11.7 7.9 25.2 12.1 38.9 12.1 21 0 41.8-10.1 55.3-27.2 14.1-17.6 19.2-40.6 14.1-63.5L759 637.9c-1.1-4.5 0.5-9.3 4-12.3l171.4-140.7c23-19.8 31.2-50.3 21.5-79.3-9.4-28.7-34.8-48.3-64-50z m-4.8 97.5l-163 133.8a54.911 54.911 0 0 0-18.3 55.1L755 844c2.6 11.9-2.1 20.1-5.2 24-4.9 6.1-12.2 10-19.5 10-4.5 0-9-1.4-13.9-4.7L538.2 763c-8.5-5.3-18.3-8.1-28.3-8-10.1 0-20 2.8-28.5 8.2L304.8 873.5c-11.3 7.5-26.4 4.2-34.4-6.3-3.3-4.4-6.8-11.9-3.7-22.9L316 641.8c4.9-20.1-2.3-41.6-18.1-54.7L137.3 453.6c-12.7-11-9.2-25.2-7.8-29.2 1.4-4 7.1-17.5 23.8-18.4l208.2-15c20.5-1.5 38.4-14.5 46.1-33.6l79.5-194.3c6.4-15.7 20.9-17 25-17 4.2 0 18.6 1.2 25 17l79.5 194.3c7.7 19.1 25.6 32.1 46.1 33.6l208.5 15.2c16.3 0.9 22.1 14.3 23.5 18.4 1.1 3.6 4.6 17.8-7.6 28.5z","star-half":"M891.9 355.6l-218.6-15.8c-4.6-0.4-8.6-3.1-10.2-7.5l-83.3-203.8C568.4 100.4 542.5 83 512.1 83c-30.3 0-56 17.4-67.7 45.7l-83.4 204c-1.8 4.2-5.7 7.2-10.2 7.5L132.5 356c-29.6 1.7-54.8 21.1-64.4 49.8-9.9 29-1.6 59.5 21.7 79.5l168.9 140.3c3.5 2.9 5.1 7.7 4 12.1l-51.5 211.9c-6 22-1.8 44.8 11.5 62.6 13.7 18 35.1 28.8 57.5 28.8 13.9 0 27.4-4.2 38.5-11.8l184.6-115.5c3.9-2.4 8.7-2.4 12.6 0l186.4 115.1c11.7 7.9 25.2 12.1 38.9 12.1 21 0 41.8-10.1 55.3-27.2 14.1-17.6 19.2-40.6 14.1-63.5L759 637.9c-1.1-4.5 0.5-9.3 4-12.3l171.4-140.7c23-19.8 31.2-50.3 21.5-79.3-9.4-28.7-34.8-48.3-64-50z m-4.8 97.5l-163 133.8a54.911 54.911 0 0 0-18.3 55.1L755 844c2.6 11.9-2.1 20.1-5.2 24-4.9 6.1-12.2 10-19.5 10-4.5 0-9-1.4-13.9-4.7C648.3 831.1 580.2 789.1 512 747V147c-0.1-0.3-0.2-0.7 0-1 1.1-1.8 10.8 0.7 17.4 6.2 2 1.7 5.4 5 7.8 10.9l79.5 194.3c7.7 19.1 25.6 32.1 46.1 33.6l208.5 15.2c16.3 0.9 22.1 14.3 23.5 18.4 0.7 2.1 3.2 10.8-1.1 20-2.1 4.1-4.8 6.9-6.6 8.5z","star-full":"M891.9 355.6l-218.6-15.8c-4.6-0.4-8.6-3.1-10.2-7.5l-83.3-203.8C568.4 100.4 542.5 83 512.1 83c-30.3 0-56 17.4-67.7 45.7l-83.4 204c-1.8 4.2-5.7 7.2-10.2 7.5L132.5 356c-29.6 1.7-54.8 21.1-64.4 49.8-9.9 29-1.6 59.5 21.7 79.5l168.9 140.3c3.5 2.9 5.1 7.7 4 12.1l-51.5 211.9c-6 22-1.8 44.8 11.5 62.6 13.7 18 35.1 28.8 57.5 28.8 13.9 0 27.4-4.2 38.5-11.8l184.6-115.5c3.9-2.4 8.7-2.4 12.6 0l186.4 115.1c11.7 7.9 25.2 12.1 38.9 12.1 21 0 41.8-10.1 55.3-27.2 14.1-17.6 19.2-40.6 14.1-63.5L759 637.9c-1.1-4.5 0.5-9.3 4-12.3l171.4-140.7c23-19.8 31.2-50.3 21.5-79.3-9.4-28.7-34.8-48.3-64-50z",switch:"M512 960c-58 0-114.3-11.4-167.3-33.8-51.2-21.6-97.2-52.6-136.6-92.1-39.5-39.5-70.5-85.4-92.1-136.6-22.4-53-33.8-109.3-33.8-167.3 0-58.3 11.5-114.9 34.3-168.3l0.5-1.1c23.1-53.7 56.4-101.6 99.1-142.1 12.7-12 32.8-11.5 44.8 1.1 5.9 6.1 9 14.2 8.7 22.7-0.2 8.5-3.7 16.3-9.8 22.2-36.3 34.4-64.7 75.2-84.5 121.3l-1.8 4.1c-18.4 44.4-27.7 91.5-27.7 140.2 0 49.4 9.7 97.4 28.8 142.5 18.5 43.6 44.9 82.8 78.5 116.4 33.6 33.6 72.7 60 116.4 78.5 45.1 19.1 93.1 28.8 142.6 28.8 49.4 0 97.4-9.7 142.5-28.8 43.6-18.4 82.8-44.8 116.4-78.5 33.6-33.6 60.1-72.8 78.5-116.4 19.1-45.2 28.8-93.1 28.8-142.5 0-49.8-9.7-97.9-29-143.2l-0.5-1c-10.6-24.5-23.7-47.8-39-69.1-13.4-18.7-28.8-36.3-45.5-52.2l-0.2-0.2c-2.7-3-4.9-6.4-6.5-10.1-1.1-2.5-2.8-6.4-3.1-11.8-0.1-2.4 0-7.2 2.2-12.7 1.5-3.7 3.7-7.1 6.5-10.1 12.1-12.6 32.2-13.1 44.8-1.1 42.7 40.6 76 88.4 99.1 142.2l0.6 1.5c22.7 53.1 34.1 109.6 34.1 167.9 0 58-11.4 114.3-33.8 167.3-21.6 51.2-52.6 97.2-92.1 136.6-39.4 39.4-85.4 70.4-136.6 92.1C626.3 948.6 570 960 512 960z m0-452.1c-17.5 0-31.8-14.3-31.8-31.8V95.8c0-17.5 14.3-31.8 31.8-31.8s31.7 14.3 31.7 31.8V476c0.1 17.6-14.2 31.9-31.7 31.9z",tag:"M64 599.7c0-28.1 10.9-54.5 30.8-74.4L525.3 94.8c25.8-25.8 62.5-36.3 98-28.1l207.3 47.8c39 8.9 69.9 39.9 78.9 78.9l47.8 207.2c8.1 35.2-2.6 72.6-28.1 98.1L498.7 929.2c-19.9 19.9-46.3 30.8-74.4 30.8-28.1 0-54.5-10.9-74.4-30.8L94.8 674.1C74.9 654.2 64 627.8 64 599.7zM649.7 288c0 22.4 8.7 43.5 24.6 59.4 15.9 15.9 37 24.6 59.4 24.6s43.5-8.7 59.4-24.6c15.9-15.9 24.6-37 24.6-59.4 0-22.5-8.7-43.6-24.6-59.4-32.8-32.8-86-32.8-118.8 0-15.9 15.8-24.6 36.9-24.6 59.4z",talk:"M902.8 110H407.2c-31.5 0-57.2 25.1-57.2 55.9v391c0 30.8 25.6 55.9 57.2 55.9h344.7l60.2 92.1c11.5 13.2 33.5 5.2 33.5-12.1v-80h57.2c31.5 0 57.2-25.1 57.2-55.9v-391c0-30.9-25.6-55.9-57.2-55.9zM483.5 411.3c-21.1 0-38.1-16.7-38.1-37.2 0-20.6 17.1-37.2 38.1-37.2 21.1 0 38.1 16.7 38.1 37.2 0 20.5-17.1 37.2-38.1 37.2z m171.5 0c-21.1 0-38.1-16.7-38.1-37.2 0-20.6 17.1-37.2 38.1-37.2 21.1 0 38.1 16.7 38.1 37.2 0 20.5-17 37.2-38.1 37.2z m171.6 0c-21.1 0-38.1-16.7-38.1-37.2 0-20.6 17.1-37.2 38.1-37.2 21.1 0 38.1 16.7 38.1 37.2 0 20.5-17.1 37.2-38.1 37.2zM292.7 616.1V312.6H121.2c-31.5 0-57.2 25.1-57.2 55.9v391c0 30.8 25.7 55.9 57.2 55.9h57.2v80c0 17.3 22.1 25.2 33.5 12.1l60.2-92.1h344.7c31.5 0 57.2-25.1 57.2-55.9V672H349.9c-31.5-0.1-57.2-25.1-57.2-55.9z",third:"M512 64c-156.8 0-284.3 127.5-284.3 284.3S355.2 632.6 512 632.6s284.3-127.5 284.3-284.3S668.8 64 512 64z m-23.9 295.3v-33.2l20.4 0.9c17.1 0 30.7-3.5 40.8-10.6 12.4-8.9 18.6-22.3 18.6-40.3 0-12.4-3.7-22.9-11.1-31.5-10-11.8-25.6-17.7-46.5-17.7-23.9 0-40.9 8.4-51 25.3-6.5 10.9-9.8 24.8-9.8 41.7h-38.1c0-28.1 6.5-50.8 19.5-68.3 16.8-22.4 43.9-33.7 81.1-33.7 29.5 0 53 7.6 70.3 22.8 17.3 15.2 25.9 34.9 25.9 59.2 0 18.3-4.4 33.4-13.3 45.2-7.1 9.5-16 15.8-26.6 19.1 16.5 5.9 29 14.2 37.2 24.8 9.8 12.4 14.6 28.7 14.6 48.8 0 28.1-8.7 51.1-26.1 69.1-20.1 20.7-48.8 31-86 31-9.8 0-17.9-0.6-24.4-1.8-10.6-2.1-21.7-6.1-33.2-12-16.6-8.6-28.4-20.7-35.7-36.3-7.2-15.7-10.9-33.5-10.9-53.6h40.3c0 19.5 3.7 34.6 11.1 45.2 10.6 15.7 29.1 23.5 55.4 23.5 20.1 0 36.4-5.5 49-16.6 12.6-11.1 18.8-25.6 18.8-43.7 0-23-8.7-39.1-26.1-48.3-11.2-5.9-26.7-8.9-46.5-8.9h-17.7z m245 252.3c-4.8-10.3-18.1-15.2-29.7-10.8-11.6 4.3-17.2 16.2-12.4 26.6l80.8 173.8-148.3-26.7c-9.1-1.6-18.5 1.9-23.7 8.9l-83.3 113.3-4.2 6.5-4.9-6.4-83.1-112.5c-5.1-6.9-14.5-10.4-23.7-8.6l-148.3 28.1 81.1-174.5c4.8-10.4-0.7-22.2-12.3-26.5-11.6-4.2-24.9 0.7-29.8 11.1l-97.6 210c-3.2 7-1.9 14.9 3.5 20.7 5.4 5.8 13.9 8.4 22.2 6.8l175.3-33.2L492.9 951c2.6 3.5 6.2 6.1 10.3 7.6 1.9 0.7 4 1.1 6.1 1.3 0.2 0 3.7 0.1 4.6 0.1h0.3c6.8-0.6 13-3.9 16.8-9.1L629.3 817l175.3 31.5c4.6 0.8 9.2 0.4 13.3-1.2 3.4-1.3 6.4-3.3 8.8-5.9 5.4-5.8 6.7-13.8 3.5-20.7l-97.1-209.1z",time:"M512.3 544c-8.4 0-15.7-2.4-21.3-6.9-6.1-5-9.3-13.5-9.4-25.2L480 247.4c-0.1-19.8 11-31.3 30.6-31.4 10-0.1 17.8 2.6 23.3 8s8.3 13.1 8.4 23l1.6 233.9c65.9-0.9 168.5-2.1 179-0.8 3 0.4 5.9 1.1 6.2 1.2 4.3 1.2 13.2 3.7 19.3 12 2.7 3.7 5.8 9.9 5.5 19-0.3 10.5-4.8 16.9-8.4 20.5-5.6 5.5-12.1 7-16.8 8.1-2.2 0.5-5.7 1.1-9.6 1.2-45.2 0.8-91.2 1.1-135.6 1.4-23.2 0.2-47.2 0.3-70.8 0.6-0.1-0.1-0.2-0.1-0.4-0.1z m-0.3-424c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392z",track:"M738.3 425.3c1.2 1.1 2.5 2.2 3.9 3.2 24.5 18 63.2 8.4 92.1-22.8 30.4-32.7 35.7-75.4 12.3-97.2-24.1-21.9-65.5-13.3-96 19.6-13.2 14.2-22.3 31.1-25.6 47.5-4.1 19.9 0.7 38.1 13.3 49.7z m44.5-67.3c15.6-16.8 31.2-18.9 33.7-17.3 1.9 2.5 1 18.2-14.6 35-15.5 16.8-31.1 18.9-33.8 17.3-1.7-2.6-0.7-18.3 14.7-35z m34.4 158.2c2.1 2.4 4.4 4.6 7 6.5 19.7 14.4 49.6 10.6 72.8-9.2 26.5-22.7 33.1-57.2 15-78.4-17.8-20.8-53.5-19.7-79.7 2.7-26.7 22.7-33.3 57.2-15.1 78.4z m42.6-46c9.1-7.8 18-8.3 19.5-7.6 0.8 2-1.1 10.8-10.1 18.5-8.7 7.4-17.2 8.2-19.6 7.3-0.5-2.5 1.6-10.8 10.2-18.2z m79 110.6c-5.4-24-35.6-38.8-65.5-32-31.1 7-51.1 32.1-45.5 57 2.1 9.3 7.6 17.5 15.8 23.5 12.9 9.5 31.5 12.7 49.8 8.5 13.5-3.1 25.7-9.8 34.1-19.1 10.1-11 14.3-24.8 11.3-37.9z m-54.3 17.8c-7.7 1.7-14.3 0.3-17.1-1.7 1-2.3 5.7-6.9 14.7-9 7.8-1.7 14.3-0.3 17.5 1.1-0.4 1.9-5.2 7.4-15.1 9.6zM731.3 464.8l-139.6-151-3-2.8c-38.7-31-87.9-42.5-133.7-32.3-40.1 8.9-73.1 33.7-90.6 68-18.8 36.8-18.3 84.2-17.8 130.1 0.5 50.2 1.1 102.1-24.7 130.4-26 28.6-54 35.8-86.3 44.1-34.7 8.9-74 19-111.5 56.6-28.7 28.8-43.1 67.4-39.3 105.9 3 30.7 19.2 76.5 79.3 119.8l0.7 0.5c73 52.2 175.5 14.7 221.1-19.4 0.7-0.4 1.2-1 1.8-1.4 1.5-1.2 3.2-2.4 4.6-3.5l-0.2-0.3c0.6-0.7 1.4-1 2-1.7 8.6-11.3 5.8-27.5-6.1-36-9.9-7.1-22.8-6.3-31.8 0.5l-0.3-0.3c-59 34.1-114.1 55.2-161.1 21.6-35.2-25.4-55.2-54.2-58.1-83.4-2.3-24.1 6.9-48.5 25.4-67 27.8-27.8 55.7-35 88.1-43.3 35.2-9.1 75.2-19.3 111.3-59.1 38.5-42.4 37.9-103.9 37.2-163.4-0.5-41.9-0.9-81.4 12.5-107.7 10.8-21.1 31.4-36.5 56.6-42.1 28.2-6.3 58.7 0.3 83.6 18.2 1.1 0.8 2.3 1.6 3.4 2.5L692.3 497c49.3 57.6 48.2 110.2-3.4 165.6-61.9 65.9-124.7 96.7-180.2 123l0.1 0.2c-3.4 1.7-6.5 4-9 7.2-8.6 11.3-5.8 27.5 6.1 36 8.4 6 19.1 6.4 27.8 2.2l0.1 0.2c55.7-26.5 128.7-65.1 194-134.6 68.9-74 70.4-154 3.5-232zM524.1 242.4c4.1 3 8.6 5.4 13.3 7.2 37.4 13.9 81.5-15.2 100.5-66.3 16.2-43.6 8.2-88.3-19.6-108.7-4.1-3-8.6-5.4-13.3-7.2-18.8-7-40.8-3-60.1 11-17.5 12.6-31.8 32.2-40.4 55.3-16.2 43.6-8.2 88.3 19.6 108.7z m16.7-93.1c5.5-14.8 14.7-27.7 25.2-35.3 5-3.6 14.8-9.2 23.9-5.8 1.4 0.5 2.8 1.3 4 2.2 11.2 8.2 16.6 33.3 6.3 61-11.4 30.7-35.1 46.3-49.1 41.1-1.4-0.5-2.8-1.3-4-2.2-11.1-8.2-16.6-33.3-6.3-61z m104.8 181.2c27.5 20.4 71.3 5.7 99.7-33.5 28.4-39.2 29.1-85.8 1.6-106.2-27.5-20.4-71.3-5.7-99.7 33.5-28.4 39.1-29.1 85.8-1.6 106.2z m74.8-103.1c3.4 2.5 4.9 21.2-10.9 43s-33.9 26-37.3 23.5c-3.4-2.5-4.9-21.2 11-43.1 15.7-21.8 33.8-26 37.2-23.4z",trash:"M750.5 938.9H278.6c-53.3 0-96.6-39.8-96.6-88.7V255h-66.5C85.7 255 64 244.3 64 229.6s21.7-25.4 51.5-25.4h793c29.8 0 51.5 10.7 51.5 25.4S938.3 255 908.5 255h-61.4v595.2c0 48.9-43.3 88.7-96.6 88.7zM230.1 255v595.2c0 22.4 21.8 40.6 48.6 40.6h471.8c26.8 0 48.6-18.2 48.6-40.6V255h-569z m408.8 628.6c-15.8 0-27.3-21.7-27.3-51.6V513.2c0-29.9 11.5-51.6 27.3-51.6s27.3 21.7 27.3 51.6V832c0 29.9-11.5 51.6-27.3 51.6z m-127.4 0c-15.8 0-27.3-21.7-27.3-51.6V513.2c0-29.9 11.5-51.6 27.3-51.6s27.3 21.7 27.3 51.6V832c0 29.9-11.4 51.6-27.3 51.6z m-127.4-1c-15.8 0-27.3-21.7-27.3-51.6V512.2c0-29.9 11.5-51.6 27.3-51.6s27.3 21.7 27.3 51.6V831c0.1 29.9-11.4 51.6-27.3 51.6z m389.8-746.8H250.1c-29.8 0-51.5-10.7-51.5-25.4S220.3 85 250.1 85h523.8c29.8 0 51.5 10.7 51.5 25.4 0 14.8-21.7 25.4-51.5 25.4z","trigon-down":"M960 279.7c0-18-5.5-33.5-16.6-46.7-11.1-13.2-24.2-19.7-39.4-19.6H120c-15.2 0-28.3 6.6-39.4 19.6-11.1 13.1-16.7 28.7-16.6 46.7 0.1 18 5.6 33.6 16.6 46.7l392 464.6c11.1 13.1 24.2 19.6 39.4 19.6s28.4-6.6 39.4-19.6l392-464.6c11.1-13.1 16.6-28.6 16.6-46.7z","trigon-up":"M960 744.3c0 18-5.5 33.5-16.6 46.7-11.1 13.2-24.2 19.7-39.4 19.6H120c-15.2 0-28.3-6.6-39.4-19.6-11.1-13.1-16.7-28.7-16.6-46.7 0.1-18 5.6-33.6 16.6-46.7l392-464.6c11.1-13.1 24.2-19.6 39.4-19.6s28.4 6.6 39.4 19.6l392 464.6c11.1 13.1 16.6 28.6 16.6 46.7z",unmute:"M517.3 924.1c-19.4 0-40.5-9.8-60.4-28.4L262.3 710h-119C92.9 710 64 681.1 64 630.8V392.9c0-51.1 28.1-79.2 79.2-79.2h119L457 128c27.1-25.4 57.7-34.3 82-23.7 25.7 11.1 40.4 41.7 40.4 84v647.1c0 42.4-14.8 73.1-40.5 84.3-6.9 2.9-14.1 4.4-21.6 4.4zM167 377c-30.8 0-39.7 8.9-39.7 39.7V607c0 31.6 8.2 39.7 39.7 39.7h130.1l2.3 2.5c84.6 89.9 145.7 153.4 181.5 188.7 19 18.7 26.3 17 27.6 16.5 1.3-0.5 7.6-4.6 7.6-31.8V203.3c0-27.5-6-30.7-6.6-31-1.5-0.7-8.2-1.2-28.3 18.5-58.4 57.2-159.6 155.3-189.2 184l-2.3 2.2H167z m644.8 454.6c-14.8 9.1-33.4 5.6-42.8-6.6-7.6-9.9-8.1-24.4-1-36 1.3-1.4 3.2-3.3 5.4-5.8 27.2-29.1 47-49.6 64-76.1 10.2-15.9 19.3-32.6 27.1-49.9 22.4-49.6 33.7-102.5 33.7-157.3 0-99.6-38.1-194.4-107.4-266.7-1.6-1.7-3.3-3.5-4.9-5.2-6.9-12.4-4.9-28 5-38 10.2-10.3 26.3-12.5 39-5 3 3.2 6 6.4 9 9.5 78 83.5 121 191.8 121 305.4 0 63-13 124-38.6 181.1-24.6 55-59.7 103.9-104.2 145.5l-5.3 5.1z m-97.5-119.8c-11.9 7.3-27 6.5-37.3-1.8-11.9-9.6-15.2-27.3-7.2-41.5 1.6-1.9 3.2-3.7 4.9-5.6 36.5-42.1 56.7-95.7 56.7-151 0-56.6-20.9-111.1-58.8-153.6l-5.4-6c-6.4-13-3.2-28.8 7.8-38.2 11-9.5 27.1-10.3 39-2 3.1 3.4 6.3 6.8 9.4 10.2 45.2 53.1 70 120.3 70 189.6 0 71.3-26.2 140.1-73.7 193.8l-5.4 6.1z",upload:"M392 325.7s-54.2-68.6-127.7-12.6c-65.8 53.5-54.2 151.3-54.2 151.3S64 501.9 64 697.9c3.3 195.8 158.7 197.8 158.7 197.8l233.3 0.3V686.4H344.2L512 476.9l167.9 209.6H568V896l226.6-0.3s144.7 0.2 165-186.1c9.7-203.7-139.8-243.8-139.8-243.8s17-301.5-192.9-335.9C446.8 105.7 392 325.7 392 325.7z",user:"M929.2 960c-13.7 0-25.5-8.9-29.5-22-12.6-41.6-31.5-80.7-56.4-116.4-24.5-35.2-54.2-66.2-88.2-92-70.6-53.7-154.7-82.1-243.2-82.1-88.4 0-172.5 28.4-243 82-34 25.8-63.6 56.7-88.2 91.9-24.9 35.6-43.8 74.7-56.4 116.2-2.4 8-7.8 14.5-15.1 18.4-7.3 3.9-15.6 4.6-23.5 2.2-16.2-5-25.3-22.4-20.4-38.8 14.5-47.8 36.4-92.8 65-133.8 28.2-40.4 62.4-76 101.5-105.7 39.6-30.1 83.3-53.5 129.9-69.5 48.3-16.6 98.8-25 150.2-25 51.5 0 102 8.4 150.3 25.1 46.7 16.1 90.4 39.5 130 69.6 39.1 29.8 73.2 65.4 101.5 105.9 28.6 41 50.4 86.1 64.9 134 4.9 16.3-4.2 33.7-20.4 38.7-2.9 0.8-6 1.3-9 1.3zM512 569c-67.4 0-130.9-26.3-178.6-74-47.7-47.7-74-111.1-74-178.6s26.3-130.9 74-178.6C381.1 90.3 444.5 64 512 64c67.4 0 130.9 26.3 178.6 74 47.7 47.7 74 111.1 74 178.5s-26.3 130.9-74 178.6C642.9 542.8 579.4 569 512 569z m0-443.4c-51 0-98.9 19.9-135 55.9-36.1 36.1-55.9 84-55.9 135s19.9 98.9 55.9 135c36.1 36.1 84 55.9 135 55.9s99-19.9 135-55.9c36.1-36.1 55.9-84 55.9-135s-19.9-98.9-55.9-135c-36.1-36.1-84-55.9-135-55.9z",vip:"M511.9 946.7c-8.5 0-16.6-4-21.8-10.8L165 511.8c-6.1-7.7-7.6-18.2-3.9-27.3 3.7-9.2 12.1-15.6 22-16.9 8.2-1 16.3 1.7 22.2 7.2h0.5l306.1 399.3 222.7-290.6c4.5-5.8 10.9-9.5 18.2-10.5 7.3-1 14.5 1 20.3 5.4 12 9.2 14.3 26.5 5.1 38.5l-244.5 319c-5.1 6.7-13.3 10.8-21.8 10.8z m75.6-332h-1.7a16 16 0 0 1-3.9-0.5l-2.7-0.5-3.9-1.4-0.6-0.3c-7.5-4-11.7-11.4-11.7-20.7V432c0-19.9 12-31.3 32.8-31.3h57.5c21.6 0 38.3 5.4 49.6 16 11.5 10.8 17.3 26.7 17.3 47.3 0 21.6-7.5 38.4-22.3 49.9-12.1 9.2-27.2 13.9-45.1 13.9h-42.6v63.5c0 9.3-4.1 16.7-11.7 20.7l-0.6 0.3-3.9 1.4-2.7 0.5c-1.1 0.4-2.4 0.5-3.8 0.5z m22.8-118.2h33.8c5.9 0 10.7-1.2 14.4-3.5l0.1-0.1c3.2-1.9 5.6-4.5 7.4-8l0.1-0.2c1.8-3.2 3.1-6.9 3.9-11 0.6-3.4 0.8-6.9 0.8-10.4 0-1.5-0.1-3-0.2-4.6v-0.8c0-1.6-0.1-3.1-0.4-4.6-0.7-4.3-1.8-7.8-3.2-10.7-1.8-3.3-4-5.9-6.9-7.6-3.7-2.2-8.6-3.3-14.3-3.3h-35.5v64.8zM488 600c-0.6-137.8-0.9-183.2 0-187 2-8.1 10.6-19.4 24-19 11.6 0.3 21.5 9.3 23 21 0.1 61.8 0.1 123.6 0.2 185.3-1.6 11.7-11.6 20.5-23.2 20.7-12 0.2-22.5-8.9-24-21z m-100.9 14.7c-14 0-24.4-7.3-29.3-20.6l-60.2-169-0.1-0.7c-0.3-1.4-0.4-2.8-0.4-4.2 0-14.6 9.3-23.3 25-23.3 8.5 0 13.6 3.6 16.4 6.6l0.3 0.4c1.3 1.5 2.4 3.2 3.3 5.2l0.4 0.8 0.4 0.6 50.6 145.8L444.4 408c2.7-7 8.4-11 15.6-11 10.1 0 16.7 6.6 16.7 16.7v2.7l-61 177.5c-1.6 4.7-4.2 9-7.8 12.6l-0.1 0.1c-5.7 5.4-12.6 8.1-20.7 8.1z m422.5-56.2c-5.8 0-11.7-1.9-16.7-5.7-11.7-9-14.2-25.5-5.7-37.6l0.2-0.3L910.7 354c9.2-12 26.4-14.3 38.4-5.1 12 9.2 14.3 26.4 5.1 38.5l-123.4 161-0.1 0.1c-5.5 6.6-13.3 10-21.1 10z m-669-96.1c-7.9 0-15.7-3.4-21.1-9.9l-0.2-0.3-49.7-64.8c-4.5-5.8-6.4-13-5.4-20.3 1-7.3 4.7-13.7 10.5-18.2 12-9.2 29.3-6.9 38.5 5.1l49.8 65c8.5 12.1 6 28.6-5.7 37.6-5 3.9-10.8 5.8-16.7 5.8z m643.6-88.6h-545c-13.4 0-24.4-10.9-24.4-24.4 0-13.4 10.9-24.4 24.4-24.4h545c13.4 0 24.4 10.9 24.4 24.4-0.1 13.5-11 24.4-24.4 24.4z m148.4-48.6c-8.8 0-17.2-4.3-22.4-11.6l-45.6-62.8c-4.3-5.9-6.1-13.2-4.9-20.4 1.1-7.2 5-13.6 11-17.9 12.2-8.9 29.4-6.2 38.3 6.1l45.7 62.9c5.8 7.8 7 18.3 3 27.4-4 9-12.5 15.2-22.4 16.2-0.9 0.1-1.8 0.1-2.7 0.1zM91.4 315c-5.6 0-11.2-1.7-16.1-5.2-12.2-8.9-15-26.1-6.1-38.3L202 88.6c5.1-7.1 13.4-11.3 22.2-11.3h575.4c8.7 0 17 4.2 22.2 11.3l51.6 71c4.3 5.9 6 13.2 4.9 20.4-1.1 7.2-5.1 13.6-11 17.9-5.9 4.3-13.2 6-20.4 4.9-7.2-1.1-13.6-5.1-17.9-11l-43.4-59.7H238.2L113.6 303.7c-5.3 7.4-13.7 11.3-22.2 11.3z",warning:"M907.3 931H116.7c-20.2 0-36.9-8.4-46-23.2-9-14.7-8.9-33.5 0.3-51.5l363.3-711.7c13.5-26.4 45.6-48 76.2-51.3l2.7-0.3 2.7 0.3c30.7 3.3 62.7 24.9 76.2 51.4l361.2 711.5c9.1 18 9.2 36.8 0.2 51.6-9.3 14.7-26 23.2-46.2 23.2z m-791.8-50.7h793.1c-0.2-0.4-0.3-0.8-0.6-1.2l-0.9-1.7-360.3-709.8c-5.4-10.7-20.4-21.1-33.7-23.6-13.4 2.5-28.4 12.9-33.8 23.6L116 879.3c-0.2 0.3-0.3 0.7-0.5 1zM512 812c-24.3 0-44-19.7-44-44s19.7-44 44-44 44 19.7 44 44-19.7 44-44 44z m0-108c-16.5 0-30-13.5-30-30V330c0-16.5 13.5-30 30-30s30 13.5 30 30v344c0 16.5-13.5 30-30 30z",wallet:"M384.5 682.6V341.4c0-47 39.4-85.4 88.5-85.4h408.1v-42.6c0-47-39.2-85.4-87.6-85.4H155.2c-49.1 0-91.2 37-91.2 84v600c0 47 42.1 84 91.2 84h638.1c48.7 0 87.6-38.4 87.6-85.4V768H472.7c-48.9 0-88.2-38.4-88.2-85.4zM448 355.7v312.6c0 19.6 16.8 35.7 37.4 35.7h437.2c20.6 0 37.4-16.1 37.4-35.7V355.7c0-19.6-16.8-35.7-37.4-35.7H485.4c-20.6 0-37.4 16.1-37.4 35.7z m195.9 227.4c-43 2.7-78.4-32.8-75.8-75.8 2.2-35.4 31-64.2 66.6-66.7 43-2.7 78.4 32.8 75.8 75.8-2.5 35.7-31.2 64.5-66.6 66.7z",windows:"M431.2 491.5H64V187.3l367.2-50.6v354.8z m0 395.8L64 836.7V536.8h367.2v350.5zM960 491.5H471.6V131.3L960 64v427.5z m0 468.5l-488.4-67.3V536.8H960V960z"};var z=c;export{z as default}; diff --git a/src/lib/layer/index.js b/src/lib/layer/index.js deleted file mode 100644 index 3ccdbc2..0000000 --- a/src/lib/layer/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var k=Object.defineProperty,x=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var d=(s,e,t)=>e in s?k(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,f=(s,e)=>{for(var t in e||(e={}))w.call(e,t)&&d(s,t,e[t]);if(_)for(var t of _(e))v.call(e,t)&&d(s,t,e[t]);return s},u=(s,e)=>x(s,T(e));var m=(s,e,t)=>(d(s,typeof e!="symbol"?e+"":e,t),t);import"../form/input.js";import E from"../drag/core.js";import i from"../utils.js";const l={en:{TITLE:"Dialog",BTNS:["Cancel","OK"]},cn:{TITLE:"\u63D0\u793A",BTNS:["\u53D6\u6D88","\u786E\u5B9A"]}};l["zh-CN"]=l.cn;const a=l[window.__ENV_LANG__||navigator.language]||l.cn;let c=null,h=null;const p=["alert","confirm","prompt"];function C(s){var e="";return s.forEach((t,r)=>{e+=``}),e}class y extends HTMLElement{constructor(){super();m(this,"props",{left:"auto",right:"auto",top:"auto",bottom:"auto",from:Object.create(null),to:Object.create(null),btns:[],type:"",title:"",blur:!1,background:null,mask:!1,radius:null,"mask-close":!1,"mask-color":null,fixed:!0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__TITLE__=this.root.children[1].firstElementChild,this.__BODY__=this.root.children[1].children[1],this.__CTRL__=this.root.children[1].lastElementChild,this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r})}static get observedAttributes(){return["left","right","top","bottom","from","to","btns","type","title","blur","background","mask","radius","mask-close","mask-color","fixed"]}set title(t){this.props.title=t,t?(this.__TITLE__.firstElementChild?this.__TITLE__.insertBefore(document.createTextNode(t),this.__TITLE__.firstElementChild):this.__TITLE__.textContent=t,this.__TITLE__.style.display="flex"):this.__TITLE__.style.display=""}set type(t){var{btns:r}=this.props;if(!(!t||this._handleBtnClick)){switch(t){case"alert":for(;r.length>1;)r.shift();break;case"confirm":case"prompt":for(;r.length>2;)r.shift();break;case"toast":case"notify":case"frame":if(t==="notify"){var o=document.createElement("wc-icon");o.setAttribute("is","close"),this.__TITLE__.appendChild(o)}r=[];break;default:t="common";break}this.props.type=t,r.length?(this.__CTRL__.innerHTML=C(r),this.__CTRL__.style.display="flex"):this.__CTRL__.style.display="",this.setAttribute(t,"")}}set fixed(t){this.props.fixed=!!t,this._updateFixedStat()}_updateFixedStat(){p.includes(this.props.type)||(this.props.fixed?this._dragIns&&(this._dragIns.destroy(),this._dragIns=null):(this._dragIns=new E(this.root.children[1]).by(this.__TITLE__,{overflow:this.props.hasOwnProperty("overflow")?this.props.overflow:!1}),this.removeAttribute("fixed")))}_intercept(t){this.props.intercept?this.props.intercept(t,r=>{delete this.props.intercept,this.resolve(t),this.close()}):(this.resolve(t),this.close())}close(t){if(this.wrapped===!1)if(this._dragIns&&this._dragIns.destroy(),p.includes(this.props.type)&&(c=null),delete this.promise,i.unbind(this.__CTRL__,"click",this._handleBtnClick),this.props.from&&!t){let r="opacity:0;";for(let o in this.props.from)r+=`${o}:${this.props.from[o]};`;this.root.children[1].style.cssText+=r,this.timer=setTimeout(()=>{this.parentNode.removeChild(this),this.dispatchEvent(new CustomEvent("close"))},200)}else clearTimeout(this.timer),this.parentNode.removeChild(this),this.dispatchEvent(new CustomEvent("close"));else this.removeAttribute("common"),this.dispatchEvent(new CustomEvent("close"))}show(){this.wrapped!==!1&&this.setAttribute("common","")}moveTo(t={}){var r="";for(var o in t)r+=`${o}:${t[o]};`;this.root.children[1].style.cssText+=r}connectedCallback(){this.type=this.props.type,this.title=this.props.title,this._handleBtnClick=i.bind(this.__CTRL__,"click",r=>{if(r.target.tagName==="BUTTON"){var o=+r.target.dataset.idx,{type:n}=this.props;switch(n){case"alert":this.resolve(),this.close();break;case"confirm":case"prompt":if(o===0)this.reject(),this.close();else{let g=n==="prompt"?this.__INPUT__.value:null;this._intercept(g)}break;default:this._intercept(o);break}}}),this.props.type==="prompt"&&(this.__INPUT__=this.__BODY__.firstElementChild.assignedNodes().pop(),this._handleSubmit=i.bind(this.__INPUT__,"submit",r=>{this._intercept(r.detail)})),this.props.mask&&this.setAttribute("mask",""),this._updateFixedStat(),this.props.mask&&(this._handlMask=i.outside(this.root.children[1],r=>{r.target===this&&(this.props["mask-close"]?(this.wrapped===!1&&this.reject(null),this.close()):p.includes(this.props.type)&&(this.root.children[1].classList.toggle("scale",!0),setTimeout(o=>{this.root.children[1].classList.remove("scale")},100)))}),this.props["mask-color"]&&(this.style.backgroundColor=this.props["mask-color"])),this.props.blur&&this.root.children[1].classList.toggle("blur",!0);let t=this.props.from?"":"opacity:1;";if(this.props.background&&(t+=`background: ${this.props.background};`,this.props.background==="transparent"&&(t+="box-shadow:none;")),(this.props.radius||this.props.radius===0)&&(t+=`border-radius: ${this.props.radius};`),this.props.size)for(let r in this.props.size)t+=`${r}:${this.props.size[r]};`;if(this.props.from){for(let r in this.props.from)t+=`${r}:${this.props.from[r]};`;setTimeout(r=>{let o="opacity:1;";for(let n in this.props.to)o+=`${n}:${this.props.to[n]};`;this.root.children[1].style.cssText+=o},50)}t&&(this.root.children[1].style.cssText+=t),this.props.btns.length&&(this.__CTRL__.lastElementChild.setAttribute("autofocus",""),setTimeout(r=>this.__CTRL__.lastElementChild.focus(),10)),this.props.type==="toast"&&(this.timer=setTimeout(()=>{h=null,this.close()},3e3)),this.props.type==="notify"&&(this._handleClose=i.bind(this.__TITLE__,"click",r=>{r.target.tagName==="WC-ICON"&&this.close()}))}disconnectedCallback(){i.clearOutside(this._handlMask),i.unbind(this.__TITLE__,"click",this._handleClose),i.unbind(this.__CTRL__,"click",this._handleBtnClick),this._handleSubmit&&i.unbind(this.__INPUT__,"submit",this._handleSubmit)}attributeChangedCallback(t,r,o){if(r!==o)switch(t){case"title":case"type":this[t]=o;break;case"mask-color":case"background":this.props[t]=o;break;case"mask":case"mask-close":case"blur":this.props[t]=!0;break;case"radius":this.props.radius=o;break;case"left":case"right":case"top":case"bottom":this.props.from[t]=o,this.props.to=this.props.from,this.removeAttribute(t);break;case"fixed":this.fixed=!0;break}}}function b(s){var e=document.createElement("wc-layer");if(s.type||(s.type="common"),s.type==="toast"){var{type:t,content:r}=s;s={type:t,content:r,from:{top:0},to:{top:"30px"}},h&&h.close(!0),h=e}else e.props.mask=s.mask,s.btns===!1?e.props.btns=[]:s.btns&&s.btns.length?e.props.btns=s.btns:e.props.btns=a.BTNS.concat(),s.intercept&&typeof s.intercept=="function"&&(e.props.intercept=s.intercept),e.props.mask=s.mask,e.props["mask-close"]=s["mask-close"],s.hasOwnProperty("overflow")&&(e.props.overflow=s.overflow),e.props["mask-color"]=s["mask-color"],e.props.blur=s.blur,e.props.radius=s.radius,e.props.background=s.background,s.size&&typeof s.size=="object"&&(e.props.size=s.size),p.includes(s.type)&&(c&&c.close(!0),c=e);return s.to&&typeof s.to=="object"&&(e.props.to=s.to,s.from&&typeof s.from=="object"?e.props.from=s.from:e.props.from=s.to),e.props.type=s.type,e.props.title=s.title,s.hasOwnProperty("fixed")&&(e.props.fixed=s.fixed),e.innerHTML=s.content,e.wrapped=!1,document.body.appendChild(e),e.promise}Object.assign(b,{alert(s,e=a.TITLE,t){return typeof e=="object"&&(t=e,e=a.TITLE),this({type:"alert",title:e,content:s,mask:!0,btns:t})},confirm(s,e=a.TITLE,t){return typeof e=="object"&&(t=e,e=a.TITLE),this({type:"confirm",title:e,content:s,mask:!0,btns:t})},prompt(s=a.TITLE,e="",t){return typeof e=="function"&&(t=e,e=""),t||(t=function(r,o){r&&o()}),this({type:"prompt",title:s,content:``,mask:!0,intercept:t})},frame(s,e={}){return this(u(f({},e),{type:"frame",content:``,mask:!0,"mask-close":!0}))},notify(s){return this({type:"notify",title:"\u901A\u77E5",content:s,blur:!0,from:{right:"-300px",top:0},to:{right:0}})},toast(s,e="info"){var t=e;switch(e){case"info":case"warning":break;case"error":t="deny";break;case"success":t="get";break;default:t="info"}return this({content:` -
    - - ${s} -
    `,type:"toast"})}}),window.layer=b,customElements.get("wc-layer")||customElements.define("wc-layer",y);export{y as default}; - diff --git a/src/lib/scroll/index.js b/src/lib/scroll/index.js deleted file mode 100644 index 4dd88dc..0000000 --- a/src/lib/scroll/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * @authors yutent (yutent.io@gmail.com) - * @date 2022-06-23 15:46:28 - * @version v1.0.6 - * - */ - -var w=Object.defineProperty;var E=(g,f,t)=>f in g?w(g,f,{enumerable:!0,configurable:!0,writable:!0,value:t}):g[f]=t;var y=(g,f,t)=>(E(g,typeof f!="symbol"?f+"":f,t),t);import o from"../utils.js";const W=["x","y","xy"];class P extends HTMLElement{constructor(){super();y(this,"props",{axis:"xy",delay:1e3,distance:1});y(this,"state",{width:0,height:0,widthFixed:0,heightFixed:0,scrollWidth:0,scrollHeight:0,xBar:0,yBar:0,thumbX:0,thumbY:0});Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__WRAPPER__=this.root.children[1].children[0],this.__CONTENT__=this.__WRAPPER__.firstElementChild,this.__X__=this.root.children[2].children[0],this.__Y__=this.root.children[3].children[0],this.__last__=0}static get observedAttributes(){return["axis","delay","distance"]}get scrollTop(){return this.__WRAPPER__.scrollTop}set scrollTop(t){t=+t,t===t&&(this.__WRAPPER__.scrollTop=t)}get scrollLeft(){return this.__WRAPPER__.scrollLeft}set scrollLeft(t){t=+t,t===t&&(this.__WRAPPER__.scrollLeft=t)}get scrollHeight(){return this.__WRAPPER__.scrollHeight}get scrollWidth(){return this.__WRAPPER__.scrollWidth}_fetchScrollX(t){var{scrollWidth:s,width:i,xBar:r}=this.state;return t<0?t=0:t>i-r&&(t=i-r),this.__WRAPPER__.scrollLeft=(s-i)*(t/(i-r)),this.__X__.style.transform=`translateX(${t}px)`,t}_fetchScrollY(t){var{scrollHeight:s,height:i,yBar:r}=this.state;return t<0?t=0:t>i-r&&(t=i-r),this.__WRAPPER__.scrollTop=(s-i)*(t/(i-r)),this.__Y__.style.transform=`translateY(${t}px)`,t}_fireReachEnd(t="reach-bottom"){var{delay:s}=this.props,{scrollHeight:i,height:r}=this.state,m=this.__WRAPPER__.scrollTop,v=Date.now();if(v-this.__last__>s){if(t==="reach-bottom"){if(r+m0)return;this.__last__=v,this.dispatchEvent(new CustomEvent(t))}}connectedCallback(){this._initFn=a=>{let h=this.offsetWidth,l=this.offsetHeight,b=this.__WRAPPER__.clientWidth,R=this.__WRAPPER__.clientHeight,d=this.__WRAPPER__.scrollWidth,x=this.__WRAPPER__.scrollHeight,c=50,_=50,{widthFixed:n,heightFixed:p}=this.state,u=!1,e="";n>0?(u=x===R,n=u?0:n):x>R&&(u=!0,n=h+(h-b)),p>0?(u=d===b,p=u?0:p):d>b&&(u=!0,p=l+(l-R)),this.state.widthFixed=n,this.state.heightFixed=p,u&&(n>0&&(e+=`width:${n}px;`),p>0&&(e+=`height:${p}px;`),this.__WRAPPER__.style.cssText=e,d=this.__WRAPPER__.scrollWidth,x=this.__WRAPPER__.scrollHeight),this.__WRAPPER__.parentNode.scrollTop=0,c=l*(l/x)>>0,_=h*(h/d)>>0,c<50&&(c=50),_<50&&(_=50),_>=h&&(_=0),c>=l&&(c=0),this.state.height=l,this.state.width=h,this.state.scrollHeight=x,this.state.scrollWidth=d,this.state.yBar=c,this.state.xBar=_,this.__X__.style.width=_+"px",this.__Y__.style.height=c+"px"},this._scrollFn=o.catch(this.__WRAPPER__,"scroll",a=>{if(!this._active){var{axis:h}=this.props,{xBar:l,yBar:b,thumbX:R,thumbY:d,scrollHeight:x,scrollWidth:c,width:_,height:n}=this.state,p=this.__WRAPPER__.scrollTop,u=this.__WRAPPER__.scrollLeft;if(!(l===0&&b===0)){if((h==="y"||h==="xy")&&b){let e=p/(x-n)*(n-b);e=e>>0,e!==d&&(this.state.thumbY=e,this.__Y__.style.transform=`translateY(${e}px)`,Math.abs(e-d)>this.props.distance&&this._fireReachEnd(e>d?"reach-bottom":"reach-top"))}if((h==="x"||h==="xy")&&l){let e=u/(c-_)*(_-l);e=e>>0,e!==R&&(this.state.thumbX=e,this.__X__.style.transform=`translateX(${e}px)`)}this.dispatchEvent(new CustomEvent("scroll"))}}});let t,s,i,r,m=a=>{let{thumbY:h,thumbX:l}=this.state;t!==void 0&&(i=this._fetchScrollX(l+a.pageX-t)),s!==void 0&&(r=this._fetchScrollY(h+a.pageY-s))},v=a=>{Math.abs(a.pageY-s)>this.props.distance&&this._fireReachEnd(a.pageY>s?"reach-bottom":"reach-top"),t=void 0,s=void 0,this.state.thumbX=i||0,this.state.thumbY=r||0,delete this._active,o.unbind(document,"mousemove",m),o.unbind(document,"mouseup",v)};this._yBarFn=o.bind(this.__Y__,"mousedown",a=>{s=a.pageY,this._active=!0,o.bind(document,"mousemove",m),o.bind(document,"mouseup",v)}),this._xBarFn=o.bind(this.__X__,"mousedown",a=>{t=a.pageX,this._active=!0,o.bind(document,"mousemove",m),o.bind(document,"mouseup",v)}),this.__observer=new ResizeObserver(this._initFn),this.__observer.observe(this.__CONTENT__)}disconnectedCallback(){this.__observer.disconnect(),o.unbind(this.__X__,"mousedown",this._xBarFn),o.unbind(this.__Y__,"mousedown",this._yBarFn),o.unbind(this.__WRAPPER__,"scroll",this._scrollFn)}attributeChangedCallback(t,s,i){if(s!==i)switch(t){case"axis":i?W.includes(i)?this.props.axis=i:this.removeAttribute(t):this.props.axis="xy";break;case"delay":this.props.delay=+i||1e3;break;case"distance":this.props.distance=+i||1;break}}}customElements.get("wc-scroll")||customElements.define("wc-scroll",P);export{P as default}; - diff --git a/src/lib/utils.js b/src/lib/utils.js deleted file mode 100644 index 85e0dda..0000000 --- a/src/lib/utils.js +++ /dev/null @@ -1 +0,0 @@ -function l(){}var o={nextTick:function(){let t=[],n=document.createTextNode(""),e=!1;function r(){let i=t.length;for(let a=0;a{if(e)if(e.path){for(var r=e.path.concat();r.length>3;)if(r.shift()===t)return}else{var i=e.explicitOriginalTarget||e.target;if(t===i||t.contains(i)||t.root&&t.root.contains(i))return}n(e)})},clearOutside(t=l){this.unbind(document,"mousedown",t)}};export{o as default}; diff --git a/src/main.js b/src/main.js deleted file mode 100644 index 96a625a..0000000 --- a/src/main.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * - * @author yutent - * @date 2019/09/16 20:51:19 - */ - -const { app, BrowserWindow, protocol, Menu, ipcMain } = require('electron') -const { join, resolve, extname } = require('path') -const { cat, echo, isfile } = require('./tools/utils.js') -const os = require('os') -const createMenu = require('./tools/menu') - -const MIME_TYPES = { - '.js': 'text/javascript', - '.html': 'text/html', - '.htm': 'text/plain', - '.css': 'text/css', - '.jpg': 'image/jpg', - '.png': 'image/png', - '.gif': 'image/gif', - '.svg': 'image/svg+xml', - '.ico': 'image/ico' -} - -const ROOT = __dirname -const HOST_FILE = resolve(app.getPath('userData'), 'host.cache') -const LOCK_FILE = resolve(app.getPath('userData'), 'lock') - -/* ********** 修复环境变量 start *********** */ -let pathEnv = new Set() -process.env.PATH.split(':').forEach(_ => { - pathEnv.add(_) -}) -pathEnv.add('/usr/local/bin') -pathEnv.add('/usr/local/sbin') - -process.env.PATH = Array.from(pathEnv).join(':') -pathEnv = null - -/* ********** 修复环境变量 end *********** */ - -/* ----------------------------------------------------- */ -app.commandLine.appendSwitch('--lang', 'zh-CN') -app.commandLine.appendSwitch('--autoplay-policy', 'no-user-gesture-required') - -protocol.registerSchemesAsPrivileged([ - { scheme: 'app', privileges: { secure: true, standard: true } } -]) - -/* ----------------------------------------------------- */ - -if (!isfile(HOST_FILE)) { - echo('{}', HOST_FILE) -} - -ipcMain.on('ready', ev => { - ev.returnValue = { HOST_FILE, LOCK_FILE, HOST: os.hostname() } -}) - -// 初始化应用 -app.once('ready', () => { - // 注册协议 - protocol.registerBufferProtocol('app', (req, cb) => { - let file = req.url.replace(/^app:\/\/local\//, '') - let ext = extname(req.url) - let buff = cat(resolve(ROOT, file)) - cb({ data: buff, mimeType: MIME_TYPES[ext] }) - }) - - Menu.setApplicationMenu(null) - - // 创建浏览器窗口 - let win = new BrowserWindow({ - title: 'Hosts切换器', - width: 1000, - height: 640, - resizable: false, - maximizable: false, - icon: resolve(ROOT, './images/app.png'), - webPreferences: { - // webSecurity: false, - // experimentalFeatures: true, - // nodeIntegration: true, - preload: join(ROOT, './tools/inject.js') - } - }) - - win.on('closed', () => { - app.exit() - win = null - }) - - // win.openDevTools() - - // 然后加载应用的 index.html - win.loadURL('app://local/index.html') - - if (process.platform === 'darwin') { - createMenu(win) - } -}) diff --git a/src/tools/inject.js b/src/tools/inject.js deleted file mode 100644 index d44654e..0000000 --- a/src/tools/inject.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * {} - * @author yutent - * @date 2022/07/14 11:54:32 - */ - -const { ipcRenderer, shell, contextBridge } = require('electron') -const { resolve } = require('path') -const { cat, echo, isfile, writable } = require('./utils.js') - -const { HOST_FILE, LOCK_FILE, HOST } = ipcRenderer.sendSync('ready') - -let timer = null - -contextBridge.exposeInMainWorld('electron', { - hostname: HOST, - open(url) { - shell.openExternal(url) - }, - checkPermission() { - return writable('/etc/hosts') - }, - getHistory() { - if (isfile(LOCK_FILE)) { - var cache = cat(HOST_FILE) - return JSON.parse(cache) - } - - var cache = cat('/etc/hosts').toString() - var records = cache.split(/[\n\r]+/) - var list = [] - var dict = {} - records.forEach(str => { - str = str.trim() - let matches = str.match(/^(#*?)\s*(\d+\.\d+\.\d+\.\d+)\s+(.*)/) - - if (matches) { - let names = matches[3].split(/\s+/).map(it => it.trim()) - let name - while ((name = names.pop())) { - list.push({ ip: matches[2], enabled: !matches[1], name }) - } - } - }) - records = null - - list.forEach(it => { - it.name = it.name.split('.') - let domain = it.name.splice(-2, 2).join('.') - if (domain === 'com.cn' || domain === 'org.cn' || domain === 'net.cn') { - domain = it.name.pop() + '.' + domain - } - - if (dict[domain]) { - dict[domain].push({ - value: it.ip, - enabled: it.enabled, - record: it.name.join('.') || '@', - remark: '' - }) - } else { - dict[domain] = [ - { - value: it.ip, - enabled: it.enabled, - record: it.name.join('.') || '@', - remark: '' - } - ] - } - }) - list = null - echo(JSON.stringify(dict), HOST_FILE) - echo('', LOCK_FILE) - return dict - }, - - saveHosts(dict) { - clearTimeout(timer) - timer = setTimeout(() => { - var txt = '' - for (let k in dict) { - for (let it of dict[k]) { - if (it.enabled) { - var name = it.record === '@' ? '' : it.record - if (name) { - name += '.' - } - txt += `${it.value.padEnd(15, ' ')} ${name + k}\n` - } - } - txt += '\n' - } - echo(JSON.stringify(dict), HOST_FILE) - echo(txt, '/etc/hosts') - }, 1000) - } -}) diff --git a/src/tools/menu.js b/src/tools/menu.js deleted file mode 100644 index 58652cf..0000000 --- a/src/tools/menu.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 菜单项 - * @author yutent - * @date 2019/01/21 20:34:04 - */ - -const { Menu } = require('electron') - -module.exports = function (win) { - let menuList = Menu.buildFromTemplate([ - { - label: 'Hosts切换器', - submenu: [ - { role: 'about', label: '关于 Hosts切换器' }, - { type: 'separator' }, - { role: 'quit', label: '退出' } - ] - }, - { - label: '编辑', - submenu: [ - { role: 'undo', label: '撤消重做' }, - { role: 'redo', label: '重做' }, - { type: 'separator' }, - { role: 'cut', label: '剪切' }, - { role: 'copy', label: '复制' }, - { role: 'paste', label: '粘贴' }, - { role: 'selectall', label: '全选' } - ] - }, - { - label: '显示', - submenu: [ - { label: 'Hosts切换器' }, - { - type: 'separator' - }, - { label: 'Hosts切换器' } - ] - }, - { - label: '窗口', - submenu: [ - { - role: 'minimize', - label: '最小化', - click() { - win.minimize() - } - } - ] - }, - { - role: 'help', - label: '帮助', - submenu: [ - { - label: '官网', - click() {} - } - ] - } - ]) - Menu.setApplicationMenu(menuList) -} diff --git a/src/tools/utils.js b/src/tools/utils.js deleted file mode 100644 index 1e0a839..0000000 --- a/src/tools/utils.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * @author yutent - * @date 2022/07/14 11:06:47 - */ - -const fs = require('fs') -const { parse } = require('path') - -/** - * [stat 返回文件/目录的状态信息] - * @param {[string]} path [目标路径] - */ -function stat(path) { - try { - return fs.statSync(path) - } catch (err) { - return EMPTY_STAT - } -} - -/** - * [isdir 判断目标是否为目录] - * @param {String} path [目标路径] - */ -function isdir(path) { - try { - return stat(path).isDirectory() - } catch (err) {} -} - -/** - * [mkdir 新建目录] - * @param {String} dir [目标路径] - * @param {Number} mode [目录权限, node v10.12起支持] - */ -function mkdir(dir, mode = 0o755) { - try { - fs.mkdirSync(dir, { recursive: true, mode: mode }) - return true - } catch (err) {} -} - -// -exports.cat = function (file) { - try { - return fs.readFileSync(file) - } catch (e) {} -} - -exports.echo = function (data, file, append) { - if (!file) { - return data - } - - let updir = parse(file).dir - let opt = {} - - if (!isdir(updir)) { - mkdir(updir) - } - - try { - if (append) { - fs.appendFileSync(file, data, opt) - } else { - fs.writeFileSync(file, data, opt) - } - } catch (err) {} -} - -exports.isfile = function (path) { - try { - return stat(path).isFile() - } catch (err) { - return false - } -} - -exports.writable = function (file) { - try { - fs.accessSync('/etc/hosts', fs.constants.W_OK) - return true - } catch (e) { - return false - } -} diff --git a/usr/lib/hosts-switch/hosts-switch.py b/usr/lib/hosts-switch/hosts-switch.py index 168df67..ef5fcf8 100755 --- a/usr/lib/hosts-switch/hosts-switch.py +++ b/usr/lib/hosts-switch/hosts-switch.py @@ -6,7 +6,8 @@ gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, GLib, Gio, GObject, GdkPixbuf -from webengine.gtk3 import WebEngine, create_setting, create_hmr_server +from we.gtk3 import WebEngine, create_setting, create_hmr_server +# from webengine.gtk3 import WebEngine, create_setting, create_hmr_server from window import Window APP_ID = 'fun.wkit.hosts-switch' diff --git a/usr/lib/hosts-switch/webapp/app.js b/usr/lib/hosts-switch/webapp/app.js index 198b01f..f387aa2 100644 --- a/usr/lib/hosts-switch/webapp/app.js +++ b/usr/lib/hosts-switch/webapp/app.js @@ -8,6 +8,7 @@ import 'es.shim' import { html, css, Component } from 'wkit' import { createApp, createRouter } from 'wkitd' +import store from './store.js' import './components/home.js' createApp({ @@ -23,13 +24,6 @@ createApp({ width: 100%; height: 100vh; } - .app { - display: flex; - width: 100%; - } - router-view { - flex: 1; - } ` ], methods: { @@ -38,6 +32,8 @@ createApp({ } }, render() { - return html` ` + return html` ` } -}).mount() +}) + .use(store) + .mount() diff --git a/usr/lib/hosts-switch/webapp/components/home.js b/usr/lib/hosts-switch/webapp/components/home.js index 3837ad2..963e64e 100644 --- a/usr/lib/hosts-switch/webapp/components/home.js +++ b/usr/lib/hosts-switch/webapp/components/home.js @@ -3,34 +3,29 @@ * @author yutent * @date 2023/08/08 18:19:17 */ -import { html, css, Component, classMap, nextTick } from 'wkit' +import { html, css, Component, classMap, nextTick, outsideClick } from 'wkit' import 'ui/icon/index.js' import 'ui/scroll/index.js' import 'ui/layer/index.js' +// import 'local/layer/index.js' import 'ui/space/index.js' import 'ui/form/input.js' import 'ui/form/switch.js' import 'ui/form/button.js' import 'ui/form/link.js' +import './sidebar.js' import './permission.js' +import './records.js' -import { getHistory, saveHosts } from '../utils/index.js' +import { checkPermission, getHistory, saveHosts, noop } from '../utils/index.js' const HOST_DATA = await getHistory() -let tmp_records = Object.create(null) - -function noop() {} - class Home extends Component { static props = { - filter: '', - activeDomain: localStorage.getItem('last_domain') || '', //当前选中的域名 editDomain: '', // 当前临时要编辑的域名, 即右键菜单选择到的 - domains: Object.keys(HOST_DATA), - records: [], permissionShow: false } @@ -59,74 +54,14 @@ class Home extends Component { user-select: none; } `, + css` - .layout-left { - flex-shrink: 0; - display: flex; - flex-direction: column; - width: 180px; - height: 100vh; - background: var(--color-plain-2); - } - - wc-scroll { - flex: 1; - } - - .layout-left .domain-list { - width: 100%; - } - - .layout-left .domain-list .item { - display: flex; - justify-content: flex-end; - align-items: center; - height: 40px; - padding: 0 12px; - cursor: pointer; - transition: background 0.15s ease-in-out; - } - - .layout-left .item wc-icon { - --wc-icon-size: 12px; - margin-left: 8px; - color: var(--color-grey-2); - } - - .layout-left .item:hover, - .layout-left .item.active { - background: #fff; - } - .layout-left .item.active { - border-right: 2px solid var(--color-orange-1); - color: var(--color-orange-1); - } - .layout-left .item.active wc-icon { - color: var(--color-orange-1); - } - .layout-left .item.blank { - justify-content: center; - cursor: default; - } - - .layout-left .item.blank:hover { - background: none; - } - - .action { - display: flex; - align-items: center; - height: 50px; - padding: 0 10px; - } - `, - css` - .layout-right { + .main { flex: 1; display: flex; flex-direction: column; } - .layout-right .toolbar { + .main .toolbar { display: flex; align-items: center; justify-content: space-between; @@ -135,54 +70,9 @@ class Home extends Component { border-bottom: 1px solid var(--color-plain-3); background: var(--color-plain-1); } - `, - css` - .layout-right .main { + .main .list { overflow: hidden; flex: 1; - display: flex; - flex-direction: column; - padding: 8px; - background: #fff; - } - .layout-right .item { - display: flex; - align-items: center; - justify-content: center; - height: 40px; - padding: 0 4px; - border-bottom: 1px solid var(--color-plain-2); - text-align: center; - } - .layout-right .thead { - line-height: 40px; - } - .layout-right .item span { - flex: 1; - } - .layout-right .item .long { - flex: 1.5; - } - .layout-right wc-scroll { - overflow: hidden; - } - .layout-right .records { - flex: 1; - } - - .layout-right .item wc-input { - flex: 1; - min-width: 0; - --wc-input-border-color: transparent; - } - .layout-right .record-list .item .long { - flex: 1.5; - } - .layout-right .record-list .item wc-button { - margin-left: 5px; - } - .layout-right .record-list .item:last-child { - border-bottom: none; } `, @@ -208,59 +98,33 @@ class Home extends Component { ` ] - mounted() { + async mounted() { window.foo = this - // let hosts = getHistory() - // console.log(hosts) - // this.domains = Object.keys(hosts) - this.toggleDomain(null, this.activeDomain) - } - addDomain() { - layer - .prompt('请输入根域名', function (val, done) { - if ( - val === 'localhost' || - val === 'local' || - /^[\w.\-]+\.[a-z]+$/.test(val) - ) { - done() - } else { - layer.toast('域名格式错误', 'error') - } - }) - .then(val => { - this.domains.push(val) - HOST_DATA[val] = [] - if (!this.activeDomain) { - this.toggleDomain(null, val) - } - this.save() - }) - .catch(noop) - } + let writable = await checkPermission() - toggleDomain(ev, name) { - name = name || ev.currentTarget.dataset.name - this.activeDomain = name - - this.records = (HOST_DATA[name] || []).sort((a, b) => - a.record.localeCompare(b.record) - ) - - tmp_records = Object.create(null) - for (let it of this.records) { - if (tmp_records[it.record]) { - tmp_records[it.record].push(it) - } else { - tmp_records[it.record] = [it] - } + if (writable) { + this.$store.HOST_DATA = HOST_DATA + this.$store.domains = Object.keys(HOST_DATA) + this.$refs.domain.mounted() + outsideClick(this.$refs.context, _ => this.$refs.context.close()) + } else { + this.permissionShow = true + } + } + + addRecord() { + if (this.$store.activeDomain) { + this.$store.records.push({ + record: '', + value: '', + enabled: true, + remark: '' + }) + nextTick(_ => (this.$refs.list.scrollTop = 1e6)) + } else { + layer.toast('请先选择域名', 'warn') } - document.title = `伪域名解析 ${name} ` - localStorage.setItem('last_domain', name) - nextTick(() => { - this.$refs.records.scrollTop = 0 - }) } showMenu(ev) { @@ -276,7 +140,7 @@ class Home extends Component { elem = elem.parentNode } this.editDomain = elem.dataset.name - nextTick(_ => { + setTimeout(_ => { this.$refs.context.moveTo({ left: pageX + 'px', top: pageY + 'px' }) this.$refs.context.show() }) @@ -347,113 +211,39 @@ class Home extends Component { } } - // 同一个记录, 允许一条被激活 - recordChanges(item) { - if (item.enabled) { - if (tmp_records[item.record].length > 1) { - for (let it of tmp_records[item.record]) { - if (it.value !== item.value) { - it.enabled = false - } - } - } - } - } - save() { - if (this.activeDomain) { - HOST_DATA[this.activeDomain] = this.records + let { HOST_DATA, activeDomain, records } = this.$store + if (activeDomain) { + HOST_DATA[activeDomain] = records } - // electron.saveHosts(HOST_DATA) + saveHosts(HOST_DATA) layer.toast('保存成功', 'success') } render() { return html` -
    - -
      - ${this.domains.map( - it => html` -
    • - ${it} - -
    • - ` - )} - ${this.domains.length < 1 - ? html`
    • 没有域名
    • ` - : ''} -
    -
    -
    - -
    -
    + (this.$refs.list.scrollTop = 0)} + @show-menu=${ev => this.showMenu(ev.event)} + > -
    +
    - 新增记录 - 保存
    -
    -
    - 主机记录 - 类型 - 记录值 - 操作 - 备注 -
    - - ${this.records.map( - it => html` -
    - - A - - - 删除 - 克隆 - - - -
    - ` - )} -
    -
    -
    + + + * @date 2023/08/08 18:19:17 + */ +import { html, css, Component, classMap, nextTick } from 'wkit' + +import { noop } from '../utils/index.js' + +class Records extends Component { + static styles = css` + :host { + display: flex; + flex-direction: column; + padding: 8px; + background: #fff; + } + + .thead { + flex-shrink: 0; + } + + .records { + overflow: hidden; + flex: 1; + } + + .item { + display: flex; + align-items: center; + justify-content: center; + height: 40px; + padding: 0 4px; + border-bottom: 1px solid var(--color-plain-2); + text-align: center; + } + .thead { + line-height: 40px; + } + .item span { + flex: 1; + } + .item .long { + flex: 1.5; + } + + .item wc-input { + flex: 1; + min-width: 0; + --wc-input-border-color: transparent; + } + .item:last-child { + border-bottom: none; + } + ` + + set scrollTop(val) { + this.$refs.records.scrollTop = val + } + + // 同一个记录, 允许一条被激活 + recordChanges(ev, item) { + let { tmp_records } = this.$store + + item.enabled = ev.target.value + + if (item.enabled) { + if (tmp_records[item.record].length > 1) { + for (let it of tmp_records[item.record]) { + if (it.value !== item.value) { + it.enabled = false + } + } + } + } + } + + updateCacheDict(ev, item) { + let { records } = this.$store + let tmp_records = Object.create(null) + + item.record = ev.target.value + + for (let it of records) { + if (tmp_records[it.record]) { + tmp_records[it.record].push(it) + } else { + tmp_records[it.record] = [it] + } + } + this.$store.tmp_records = tmp_records + } + + clone(item) { + let { tmp_records, records } = this.$store + var params = { ...item } + params.enabled = false + + records.push(params) + tmp_records[params.record].push(records.at(-1)) + + nextTick(_ => (this.$refs.records.scrollTop = 1e6)) + } + + render() { + return html` +
    + 主机记录 + 类型 + 记录值 + 操作 + 备注 +
    + + ${this.$store.records.map( + (it, i) => html` +
    + this.updateCacheDict(ev, it)} + :value=${it.record} + label="根域请填 @" + > + A + (it.value = ev.target.value)} + label="请填写IP" + > + + this.$store.records.splice(i, 1)} + >删除 + this.clone(it)} + >克隆 + this.recordChanges(ev, it)} + > + + +
    + ` + )} +
    + ` + } +} + +Records.reg('records') diff --git a/usr/lib/hosts-switch/webapp/components/sidebar.js b/usr/lib/hosts-switch/webapp/components/sidebar.js new file mode 100644 index 0000000..97720a8 --- /dev/null +++ b/usr/lib/hosts-switch/webapp/components/sidebar.js @@ -0,0 +1,165 @@ +/** + * {} + * @author yutent + * @date 2023/08/08 18:19:17 + */ +import { html, css, Component, classMap, nextTick } from 'wkit' + +import { noop } from '../utils/index.js' + +class Sidebar extends Component { + static styles = css` + :host { + flex-shrink: 0; + display: flex; + flex-direction: column; + width: 180px; + height: 100vh; + background: var(--color-plain-2); + } + .noselect { + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; + } + + .domain-list { + overflow: hidden; + flex: 1; + width: 100%; + } + + .domain-list .item { + display: flex; + justify-content: flex-end; + align-items: center; + height: 40px; + padding: 0 12px; + cursor: pointer; + transition: background 0.15s ease-in-out; + } + + .item wc-icon { + --wc-icon-size: 12px; + margin-left: 8px; + color: var(--color-grey-2); + } + + .item:hover, + .item.active { + background: #fff; + } + .item.active { + border-right: 2px solid var(--color-orange-1); + color: var(--color-orange-1); + } + .item.active wc-icon { + color: var(--color-orange-1); + } + .item.blank { + justify-content: center; + cursor: default; + } + + .item.blank:hover { + background: none; + } + + .action { + flex-shrink: 0; + display: flex; + align-items: center; + height: 50px; + padding: 0 10px; + } + ` + + addDomain() { + layer + .prompt('请输入根域名', function (val, done) { + if ( + val === 'localhost' || + val === 'local' || + /^[\w.\-]+\.[a-z]+$/.test(val) + ) { + done() + } else { + layer.toast('域名格式错误', 'error') + } + }) + .then(val => { + this.$store.domains.push(val) + // HOST_DATA[val] = [] + // if (!this.$store.activeDomain) { + // this.toggleDomain(null, val) + // } + // this.save() + // this.$emit('save') + }) + .catch(noop) + } + + toggleDomain(ev, name) { + let { HOST_DATA, records } = this.$store + name = name || ev.currentTarget.dataset.name + this.$store.activeDomain = name + + this.$store.records = records = (HOST_DATA[name] || []).sort((a, b) => + a.record.localeCompare(b.record) + ) + + let tmp_records = Object.create(null) + for (let it of records) { + if (tmp_records[it.record]) { + tmp_records[it.record].push(it) + } else { + tmp_records[it.record] = [it] + } + } + this.$store.tmp_records = tmp_records + + document.title = `伪域名解析 ${name} ` + localStorage.setItem('last_domain', name) + nextTick(() => { + this.$emit('toggle-domain') + }) + } + + mounted() { + this.toggleDomain(null, this.$store.activeDomain) + } + + render() { + return html` + +
      this.$emit('show-menu', { event: ev })} + > + ${this.$store.domains.map( + it => html` +
    • + ${it} + +
    • + ` + )} + ${this.$store.domains.length < 1 + ? html`
    • 没有域名
    • ` + : ''} +
    +
    +
    + +
    + ` + } +} + +Sidebar.reg('sidebar') diff --git a/usr/lib/hosts-switch/webapp/index.html b/usr/lib/hosts-switch/webapp/index.html index 7891349..e8ff471 100644 --- a/usr/lib/hosts-switch/webapp/index.html +++ b/usr/lib/hosts-switch/webapp/index.html @@ -20,10 +20,12 @@ "imports":{ "es.shim":"app:///lib/es.shim.js", "wkit":"app:///lib/wkit.js", + "wkit":"http://127.0.0.1:9999/src/index.js", "wkitd":"app:///lib/wkitd.js", "fetch":"app:///lib/fetch.js", "crypto":"app:///lib/crypto.js", - "ui/":"app:///lib/ui/" + "ui/":"app:///lib/ui/", + "local/":"http://127.0.0.1:8090/dist/" } } diff --git a/usr/lib/hosts-switch/webapp/lib/ui/layer/index.js b/usr/lib/hosts-switch/webapp/lib/ui/layer/index.js index 707b92c..c84e0f6 100644 --- a/usr/lib/hosts-switch/webapp/lib/ui/layer/index.js +++ b/usr/lib/hosts-switch/webapp/lib/ui/layer/index.js @@ -1,4 +1,4 @@ -import{css as c,html as y,Component as x,bind as g,styleMap as d}from"wkit";import"../form/input.js";let s=null,p=null;const a="\u63D0\u793A",u=["\u53D6\u6D88","\u786E\u5B9A"],h=["alert","confirm","prompt"],k=h.concat(["toast"]);class w extends x{static animation={};static props={type:{type:String,default:null,observer(t){this.#t=!k.includes(t)}},left:{type:String,attribute:!1},right:{type:String,attribute:!1},top:{type:String,attribute:!1},bottom:{type:String,attribute:!1},background:{type:String,attribute:!1},maskColor:{type:String,attribute:!1},mask:!1,maskClose:!1,title:{type:String,default:"",attribute:!1},content:{type:String,default:"",attribute:!1},btns:[]};static styles=[c`:host{display:none;justify-content:center;align-items:center;position:fixed;z-index:65534;left:0;top:0;width:100%;height:0}:host([type]){display:flex}:host([type=toast]) .layer,:host([type=common]) .layer{position:absolute}.noselect{-webkit-touch-callout:none;user-select:none}.noselect img,.noselect a{-webkit-user-drag:none}`,c`.layer{flex:0 auto;position:relative;z-index:65535;border-radius:3px;color:#666;font-size:14px;background:rgba(255,255,255,.8);box-shadow:0 5px 20px rgba(0,0,0,.3);transition:opacity .2s ease-in-out,left .2s ease-in-out,right .2s ease-in-out,top .2s ease-in-out,bottom .2s ease-in-out}.layer:active{z-index:65536}`,c`.layer__title{display:flex;justify-content:space-between;align-items:center;width:100%;height:60px;padding:15px;font-size:16px;color:var(--color-dark-2)}.layer__title wc-icon{--wc-icon-size: 14px}.layer__title wc-icon:hover{color:var(--color-red-1)}.layer__content{display:flex;position:relative;width:100%;height:auto;min-height:50px;word-break:break-all;word-wrap:break-word}::slotted(.layer__content__input){flex:1}::slotted(.layer__content__toast){flex-shrink:0;flex:1;display:flex;align-items:center;width:300px;min-height:40px;margin-bottom:15px !important;padding:0 10px !important;border-radius:3px;font-weight:normal;text-indent:8px;--wc-icon-size: 16px;color:var(--color-dark-1);box-shadow:0 2px 12px rgba(0,0,0,.1)}::slotted(.layer__content__toast+.layer__content__toast){margin-top:30px}::slotted(.layer__content__toast.style-info){border:1px solid #ebeef5;background:#edf2fc;color:var(--color-grey-3)}::slotted(.layer__content__toast.style-success){border:1px solid #e1f3d8;background:#f0f9eb;color:var(--color-green-3)}::slotted(.layer__content__toast.style-warning){border:1px solid #faebb4;background:#faecd8;color:var(--color-red-1)}::slotted(.layer__content__toast.style-error){border:1px solid #f5c4c4;background:#fde2e2;color:var(--color-red-1)}.layer__ctrl{display:flex;justify-content:flex-end;width:100%;height:60px;padding:15px;line-height:30px;font-size:14px;color:#454545;text-align:right}.layer__ctrl button{min-width:64px;height:30px;padding:0 10px;margin:0 5px;border:1px solid var(--color-plain-3);border-radius:3px;white-space:nowrap;background:#fff;font-size:inherit;font-family:inherit;outline:none;color:inherit}.layer__ctrl button:hover{background:var(--color-plain-1)}.layer__ctrl button:active{border-color:var(--color-grey-1)}.layer__ctrl button:focus{box-shadow:0 0 0 2px var(--color-plain-a)}.layer__ctrl button:last-child{color:#fff;background:var(--color-teal-2);border-color:rgba(0,0,0,0)}.layer__ctrl button:last-child:hover{background:var(--color-teal-1)}.layer__ctrl button:last-child:active{background:var(--color-teal-3)}.layer__ctrl button:last-child:focus{box-shadow:0 0 0 2px var(--color-teal-a)}.layer__ctrl button::-moz-focus-inner{border:none}`,c`:host([mask]){height:100%;background:rgba(0,0,0,.2)}:host([type=alert]) .layer,:host([type=confirm]) .layer,:host([type=prompt]) .layer{max-width:600px;min-width:300px;background:#fff}:host([type=alert]) .layer__content,:host([type=confirm]) .layer__content,:host([type=prompt]) .layer__content{padding:0 15px}:host([type=toast]) .layer{box-shadow:none;background:none}:host([type=toast]) .layer__content{flex-direction:column;min-height:40px}:host([blurry]) .layer{backdrop-filter:blur(5px)}`];#t=!0;#o=null;#i=null;constructor(){super(),this.promise=new Promise((t,e)=>{this.#o=t,this.#i=e}),this.promise.host=this}#e(t){this.intercept?this.intercept(t,e=>{delete this.intercept,this.#o(t),this.$animate(!0),this.$refs.box.$animate(!0).then(o=>this.close())}):(this.#o(t),this.$animate(!0),this.$refs.box.$animate(!0).then(e=>this.close()))}#r(){switch(this.type){case"toast":let t=this.lastElementChild;t._anim=t.animate([{marginTop:"-30px",opacity:0},{marginTop:"0",opacity:1}],{duration:200,fill:"forwards"}),setTimeout(()=>{t._anim.reverse(),t._anim.onfinish=e=>{t.remove(),this.children.length===0&&(this.close(),p=null)}},3e3);break;default:this.$animate(),this.$refs.box.$animate();break}}mounted(){this.type==="prompt"?(this.$refs.input=this.firstElementChild,g(this.$refs.input,"submit",t=>{this.#e(t.target.value)})):this.type==="toast"&&(this.style.display=""),this.mask&&(this.$on("click",t=>{if(t.composedPath()[0]===t.currentTarget){if(h.includes(this.type))return;this.maskClose&&(this.#t===!1&&this.#i(),this.$refs.box.$animate(!0).then(o=>this.close()))}}),this.maskColor&&(this.style.backgroundColor=this.maskColor)),this.background&&(this.$refs.box.style.backgroundColor=this.background),this.#r()}updated(){this.#r()}moveTo(t={}){var e="";for(var o in t)e+=`${o}:${t[o]};`;this.$refs.box.style.cssText+=e}show(){this.#t&&(this.type="common")}close(){this.#t?(this.type=null,this.$emit("close")):(h.includes(this.type)&&(s=null),this.$emit("close"),this.remove())}handleBtnClick(t){if(t.target.tagName==="BUTTON"){let e=+t.target.dataset.idx||0;switch(this.type){case"alert":this.#e(null);break;case"confirm":case"prompt":if(e===0)this.#i(),this.$animate(!0),this.$refs.box.$animate(!0).then(o=>this.close());else{let o=this.type==="prompt"?this.$refs.input.value:null;this.#e(o)}break;default:this.#e(e);break}}}render(){let{type:t,mask:e,left:o,right:n,top:r,bottom:m}=this,f="";return t==="common"&&e===!1&&(r=r||0),f=d({left:o,right:n,top:r,bottom:m}),y` +import{css as c,html as y,Component as x,bind as g,styleMap as d}from"wkit";import"../form/input.js";let s=null,p=null;const a="\u63D0\u793A",u=["\u53D6\u6D88","\u786E\u5B9A"],h=["alert","confirm","prompt"],k=h.concat(["toast"]);class w extends x{static animation={};static props={type:{type:String,default:null,observer(t){this.#t=!k.includes(t)}},left:{type:String,attribute:!1},right:{type:String,attribute:!1},top:{type:String,attribute:!1},bottom:{type:String,attribute:!1},background:{type:String,attribute:!1},maskColor:{type:String,attribute:!1},mask:!1,maskClose:!1,title:{type:String,default:"",attribute:!1},content:{type:String,default:"",attribute:!1},btns:[]};static styles=[c`:host{display:none;justify-content:center;align-items:center;position:fixed;z-index:65534;left:0;top:0;width:100%;height:0}:host([type]){display:flex}:host([type=toast]) .layer,:host([type=common]) .layer{position:absolute}.noselect{-webkit-touch-callout:none;user-select:none}.noselect img,.noselect a{-webkit-user-drag:none}`,c`.layer{flex:0 auto;position:relative;z-index:65535;border-radius:3px;color:#666;font-size:14px;background:rgba(255,255,255,.8);box-shadow:0 5px 20px rgba(0,0,0,.3);transition:opacity .2s ease-in-out,left .2s ease-in-out,right .2s ease-in-out,top .2s ease-in-out,bottom .2s ease-in-out}.layer:active{z-index:65536}`,c`.layer__title{display:flex;justify-content:space-between;align-items:center;width:100%;height:60px;padding:15px;font-size:16px;color:var(--color-dark-2)}.layer__title wc-icon{--wc-icon-size: 14px}.layer__title wc-icon:hover{color:var(--color-red-1)}.layer__content{display:flex;position:relative;width:100%;height:auto;min-height:50px;word-break:break-all;word-wrap:break-word}::slotted(.layer__content__input){flex:1}::slotted(.layer__content__toast){flex-shrink:0;flex:1;display:flex;align-items:center;width:300px;min-height:40px;margin-bottom:15px !important;padding:0 10px !important;border-radius:3px;font-weight:normal;text-indent:8px;--wc-icon-size: 16px;color:var(--color-dark-1);box-shadow:0 2px 12px rgba(0,0,0,.1)}::slotted(.layer__content__toast+.layer__content__toast){margin-top:30px}::slotted(.layer__content__toast.style-info){border:1px solid #ebeef5;background:#edf2fc;color:var(--color-grey-3)}::slotted(.layer__content__toast.style-success){border:1px solid #e1f3d8;background:#f0f9eb;color:var(--color-green-3)}::slotted(.layer__content__toast.style-warning){border:1px solid #faebb4;background:#faecd8;color:var(--color-red-1)}::slotted(.layer__content__toast.style-error){border:1px solid #f5c4c4;background:#fde2e2;color:var(--color-red-1)}.layer__ctrl{display:flex;justify-content:flex-end;width:100%;height:60px;padding:15px;line-height:30px;font-size:14px;color:#454545;text-align:right}.layer__ctrl button{min-width:64px;height:30px;padding:0 10px;margin:0 5px;border:1px solid var(--color-plain-3);border-radius:3px;white-space:nowrap;background:#fff;font-size:inherit;font-family:inherit;outline:none;color:inherit}.layer__ctrl button:hover{background:var(--color-plain-1)}.layer__ctrl button:active{border-color:var(--color-grey-1)}.layer__ctrl button:focus{box-shadow:0 0 0 2px var(--color-plain-a)}.layer__ctrl button:last-child{color:#fff;background:var(--color-teal-2);border-color:rgba(0,0,0,0)}.layer__ctrl button:last-child:hover{background:var(--color-teal-1)}.layer__ctrl button:last-child:active{background:var(--color-teal-3)}.layer__ctrl button:last-child:focus{box-shadow:0 0 0 2px var(--color-teal-a)}.layer__ctrl button::-moz-focus-inner{border:none}`,c`:host([mask]){height:100%;background:rgba(0,0,0,.2)}:host([type=alert]) .layer,:host([type=confirm]) .layer,:host([type=prompt]) .layer{max-width:600px;min-width:300px;background:#fff}:host([type=alert]) .layer__content,:host([type=confirm]) .layer__content,:host([type=prompt]) .layer__content{padding:0 15px}:host([type=toast]) .layer{box-shadow:none;background:none}:host([type=toast]) .layer__content{flex-direction:column;min-height:40px}:host([blurry]) .layer{backdrop-filter:blur(5px)}`];#t=!0;#o=null;#i=null;constructor(){super(),this.promise=new Promise((t,e)=>{this.#o=t,this.#i=e}),this.promise.host=this}#e(t){this.intercept?this.intercept(t,e=>{delete this.intercept,this.#o(t),this.$animate(!0),this.$refs.box.$animate(!0).then(o=>this.close())}):(this.#o(t),this.$animate(!0),this.$refs.box.$animate(!0).then(e=>this.close()))}#r(){switch(this.type){case"toast":let t=this.lastElementChild;t._anim=t.animate([{marginTop:"-30px",opacity:0},{marginTop:"0",opacity:1}],{duration:200,fill:"forwards"}),setTimeout(()=>{t._anim.reverse(),t._anim.onfinish=e=>{t.remove(),this.children.length===0&&(this.close(),p=null)}},3e3);break;default:this.$animate(),this.$refs.box.$animate();break}}mounted(){this.type==="prompt"?(this.$refs.input=this.firstElementChild,g(this.$refs.input,"submit",t=>{this.#e(t.target.value)})):this.type==="toast"&&(this.style.display=""),this.mask&&(this.$on("click",t=>{if(t.composedPath()[0]===t.currentTarget){if(h.includes(this.type))return;this.maskClose&&(this.#t===!1&&this.#i(),this.$refs.box.$animate(!0).then(o=>this.close()))}}),this.maskColor&&(this.style.backgroundColor=this.maskColor)),this.background&&(this.$refs.box.style.backgroundColor=this.background),this.#r()}updated(t,e){e&&this.#r()}moveTo(t={}){var e="";for(var o in t)e+=`${o}:${t[o]};`;this.$refs.box.style.cssText+=e}show(){this.#t&&(this.type="common")}close(){this.#t?(this.type=null,this.$emit("close")):(h.includes(this.type)&&(s=null),this.$emit("close"),this.remove())}handleBtnClick(t){if(t.target.tagName==="BUTTON"){let e=+t.target.dataset.idx||0;switch(this.type){case"alert":this.#e(null);break;case"confirm":case"prompt":if(e===0)this.#i(),this.$animate(!0),this.$refs.box.$animate(!0).then(o=>this.close());else{let o=this.type==="prompt"?this.$refs.input.value:null;this.#e(o)}break;default:this.#e(e);break}}}render(){let{type:t,mask:e,left:o,right:n,top:r,bottom:m}=this,f="";return t==="common"&&e===!1&&(r=r||0),f=d({left:o,right:n,top:r,bottom:m}),y`
    y``)}
    - `}}function l(i={}){let{type:t="common",content:e=""}=i,o=t==="toast"&&p||document.createElement("wc-layer"),n=t==="toast"&&!!p;if(o.type=i.type,t==="toast"?(p=o,o.top="20px"):(i.btns&&i.btns.length&&(o.btns=i.btns),i.intercept&&typeof i.intercept=="function"&&(o.intercept=i.intercept),o.mask=i.mask,o.title=i.title,h.includes(t)&&(s?s.$animate(!0).then(r=>{s.close(),s=o}):s=o)),n){let r=document.createElement("template");r.innerHTML=e,o.appendChild(r.content.cloneNode(!0)),o.updated()}else o.innerHTML=e,document.body.appendChild(o);return o.promise}l.alert=function(i,t=a,e=u.slice(1)){return typeof t=="object"&&(e=t,t=a),this({type:"alert",title:t,content:i,mask:!0,btns:e})},l.confirm=function(i,t=a,e=u.concat()){return typeof t=="object"&&(e=t,t=a),this({type:"confirm",title:t,content:i,mask:!0,btns:e})},l.prompt=function(i=a,t="",e){return typeof t=="function"&&(e=t,t=""),e||(e=function(o,n){o&&n()}),this({type:"prompt",title:i,content:``,mask:!0,intercept:e,btns:u.concat()})},l.toast=function(i,t="info"){var e=t;switch(t){case"info":case"warning":break;case"error":e="deny";break;case"success":e="get";break;default:e="info"}return this({content:` + `}}function l(i={}){let{type:t="common",content:e=""}=i,o=t==="toast"&&p||document.createElement("wc-layer"),n=t==="toast"&&!!p;if(o.type=i.type,t==="toast"?(p=o,o.top="20px"):(i.btns&&i.btns.length&&(o.btns=i.btns),i.intercept&&typeof i.intercept=="function"&&(o.intercept=i.intercept),o.mask=i.mask,o.title=i.title,h.includes(t)&&(s?s.$animate(!0).then(r=>{s.close(),s=o}):s=o)),n){let r=document.createElement("template");r.innerHTML=e,o.appendChild(r.content.cloneNode(!0)),o.updated(null,!0)}else o.innerHTML=e,document.body.appendChild(o);return o.promise}l.alert=function(i,t=a,e=u.slice(1)){return typeof t=="object"&&(e=t,t=a),this({type:"alert",title:t,content:i,mask:!0,btns:e})},l.confirm=function(i,t=a,e=u.concat()){return typeof t=="object"&&(e=t,t=a),this({type:"confirm",title:t,content:i,mask:!0,btns:e})},l.prompt=function(i=a,t="",e){return typeof t=="function"&&(e=t,t=""),e||(e=function(o,n){o&&n()}),this({type:"prompt",title:i,content:``,mask:!0,intercept:e,btns:u.concat()})},l.toast=function(i,t="info"){var e=t;switch(t){case"info":case"warning":break;case"error":e="deny";break;case"success":e="get";break;default:e="info"}return this({content:`
    ${i} diff --git a/usr/lib/hosts-switch/webapp/lib/wkit.js b/usr/lib/hosts-switch/webapp/lib/wkit.js index 2bfd83b..54d6938 100644 --- a/usr/lib/hosts-switch/webapp/lib/wkit.js +++ b/usr/lib/hosts-switch/webapp/lib/wkit.js @@ -1,3 +1,3 @@ var g=Object.create(null);["autofocus","autoplay","async","allowTransparency","checked","controls","declare","disabled","defer","defaultChecked","defaultSelected","contentEditable","isMap","loop","multiple","noHref","noResize","noShade","open","readOnly","selected","loading"].forEach(function(i){g[i.toLowerCase()]=i});var z=Symbol("wc_path"),p=Symbol("wc-nothing"),B=Symbol("finalized"),x=Symbol("props"),_=Symbol("changed_props"),w=Symbol("mounted"),C=Symbol("pending"),O=Symbol("children"),oe="* {box-sizing: border-box;margin: 0;padding: 0;}::before,::after {box-sizing: border-box;}";function ne(i){switch(i){case Number:return 0;case Boolean:return!1;case Object:return{};case Array:return[];default:return""}}function Ee(i){switch(typeof i){case"number":return{type:Number,default:i};case"boolean":return{type:Boolean,default:i};case"object":return Array.isArray(i)?{type:Array,default:i}:{type:Object,default:i};case"string":let e=String,t=!0;if(i.includes("!")){i=i.split("!");let s=i.shift();s==="str"?i=i.join("!"):s==="num"?(e=Number,i=+i.shift()||0):s==="bool"&&(e=Boolean,i=i.shift(),i=i!=="false"&&i!==""),t=!1}return{type:e,default:i,attribute:t};default:return{type:String,default:i+""}}}function le(i){if(i&&typeof i=="object"&&i.hasOwnProperty("type"))return Object.assign({attribute:!0,default:ne(i.type)},i);switch(i){case Number:i={type:Number};break;case Boolean:i={type:Boolean};break;case Object:i={type:Object};break;case Array:i={type:Array};break;default:i=Ee(i);break}return i.default=i.hasOwnProperty("default")?i.default:ne(i.type),i.attribute=i.hasOwnProperty("attribute")?i.attribute:!0,i}function R(i,e){switch(e.type){case Number:return i===null?null:+i||0;case Boolean:return i===!1?!1:i!==null;case Object:if(typeof i=="object")return i;try{return JSON.parse(i)}catch{return{}}case Array:if(typeof i=="object")return i;try{return JSON.parse(i)}catch{return[]}default:return i==null?null:i+""}}var ae=CSSStyleSheet;document.adoptedStyleSheets||(ae=class{elem=document.createElement("style");replaceSync(i){this.elem.textContent=i.replace(/\s+/g," ")}});function Se(i,...e){let t="",s=Array.from(i);for(;s.length;)t+=s.shift()+(e.shift()||"");return t}function ce(i,e=""){let t=new ae;typeof e=="string"?e=[e]:e=e.flat(1/0),e=(oe+e.join(" ")).trim(),t.replaceSync(e),i.adoptedStyleSheets?i.adoptedStyleSheets=[t]:i.appendChild(t.elem)}function M(i=200,e=[],t=!1){t===!1&&(this.style.display="");let s=this.animate(e,{duration:i,direction:t?"reverse":"normal",fill:"forwards"});return new Promise(r=>{s.addEventListener("finish",n=>{t&&(this.style.display="none"),s.cancel(),r()},{once:!0})})}var N={fade:[{opacity:0},{opacity:1}],scale:[{transform:"scale(0)"},{transform:"scale(1)"}],"micro-bounce":[{opacity:0,transform:"scale(0.8)"},{transform:"scale(1.05)",opacity:1},{transform:"scale(1)"}],slide:[{opacity:0,transform:"translateY(-50px)"},{opacity:1,transform:"translateY(0)"}],bounce:[{transform:"scale(0)"},{transform:"scale(1.2)"},{transform:"scale(1)"}],rotate:[{transform:"rotate(0)"},{transform:"rotate(360deg)"}]};var Y="$wc$",b=`wc$${String(Math.random()).slice(9)}$`,ye="?"+b,Ce=`<${ye}>`,k=(i="")=>document.createComment(i),P=i=>i===null||typeof i!="object"&&typeof i!="function",ge=Array.isArray,Te=i=>ge(i)||typeof(i==null?!1:i[Symbol.iterator])=="function",D=`[ \f\r]`,ke=`[^ -\f\r"'\`<>=]`,Ve=`[^\\s"'>=/]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,he=1,q=2,Oe=3,fe=/-->/g,de=/>/g,$=new RegExp(`>|${D}(?:(${Ve}+)(${D}*=${D}*(?:${ke}|("|')|))|$)`,"g"),Re=0,ue=1,Me=2,pe=3,me=/'/g,_e=/"/g,$e=/^(?:script|style|textarea|title)$/i,Pe=1,j=2,F=1,L=2,je=5,K=6,Le=7,be=new Map,y=document.createTreeWalker(document,129,null,!1);function W(){}function Ie(i,e){let t=i.length-1,s=[],r=e===j?"":"",n,o=T;for(let a=0;a"?(o=n??T,u=-1):h[ue]===void 0?u=-2:(u=o.lastIndex-h[Me].length,d=h[ue],o=h[pe]===void 0?$:h[pe]==='"'?_e:me):o===_e||o===me?o=$:o===fe||o===de?o=T:(o=$,n=void 0);let v=o===$&&i[a+1].startsWith("/>")?" ":"";r+=o===T?c+Ce:u>=0?(s.push(d),c.slice(0,u)+Y+c.slice(u)+b+v):c+b+(u===-2?(s.push(void 0),a):v)}let l=r+(i[t]||"")+(e===j?"":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw new Error("invalid html ast");return[l,s]}var A=class{constructor({strings:e,["__dom_type__"]:t},s){this.parts=[];let r,n=0,o=0,l=e.length-1,a=this.parts,[c,u]=Ie(e,t);if(this.el=A.createElement(c),y.currentNode=this.el.content,t===j){let d=this.el.content,f=d.firstChild;f.remove(),d.append(...f.childNodes)}for(;(r=y.nextNode())!==null&&a.length0){r.textContent="";for(let h=0;h2||s[0]!==""||s[1]!==""?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=p}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e,t){let s=this.strings,r=!1;if(s===void 0)r=!P(e)||e!==this._$committedValue,r&&(this._$committedValue=e);else{let n=e;e=s[0];for(let o=0;oo.stopPropagation();break;case"prevent":this.#t=o=>o.preventDefault();break;case"self":this.#s=o=>o.target===this.element;break;case"capture":case"once":case"passive":s[n]=!0;break}let r=e!==this.#e;if(this.#e&&t.$events[this.name]){for(let n of t.$events[this.name])if(n.el===this.element){r=s.capture!==n.capture||s.once!==n.once||s.passive!==n.passive,r&&this.element.removeEventListener(this.name,n.listener,n.options);break}}e&&r&&(this.element.addEventListener(this.name,this,s),this.#e=e,t.$events[this.name]?t.$events[this.name].push({el:this.element,listener:this,options:s}):t.$events[this.name]=[{el:this.element,listener:this,options:s}])}handleEvent(e){this.#i(e),this.#t(e),this.#s(e)!==!1&&this.#e.call(this.options.host,e)}},X=class{constructor(e,t,s){this.element=e,this.type=K,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){}};function xe(i,e,t={}){let s=e[z];return s===void 0&&(s=new E(e.insertBefore(k(),null),null,void 0,t),e[z]=s),s._$setValue(i),s}function ee(i,...e){return{__dom_type__:Pe,strings:i,values:e}}function He(i,e=[]){let t=e.length?i.split("%s"):[i];return t.raw=!0,ee(t,...e)}function ve(i,...e){return{__dom_type__:j,strings:i,values:e}}function I(){}function te(i,e,t){let s=t?"querySelectorAll":"querySelector";return e?e[s](i):document.body[s](i)}function Ue(i,e){return te(i,e,!0)}var V=function(){let i=[],e=document.createTextNode(""),t=!1;function s(){let r=i.length;for(let n=0;nt.toUpperCase())}function ze(i){try{let e=i.getBoundingClientRect();if(e.width||e.height||i.getClientRects().length){let t=i.ownerDocument,s=t.documentElement,r=t.defaultView;return{top:e.top+r.pageYOffset-s.clientTop,left:e.left+r.pageXOffset-s.clientLeft}}}catch{return{left:0,top:0}}}function re(i,e,t,s,r=!0){let n=e.split(","),o,l=i.host===i,a=l?i:null;if(typeof t=="function"?(r=s,s=t,t=null):(typeof t!="string"&&(t=null),s=s||I),l===!1){let c=i;for(;c&&c!==document.body&&c!==document;){if(c.ownHost){l=!0,a=c.ownHost;break}c=c.parentNode}}return t?o=function(c){let u=te(t,i),d=c.target;if(u)for(;d!==i;)if(u.contains(d)){s(c);break}else d=d.parentNode}:o=s,n.forEach(function(c){c=c.trim(),l&&(a.$events[c]?a.$events[c].push({el:i,listener:o,options:r}):a.$events[c]=[{el:i,listener:o,options:r}]),i.addEventListener(c,o,r)}),o}function H(i,e,t=I,s=!1){e.split(",").forEach(function(n){i.removeEventListener(n.trim(),t,s)})}function Be(i,e=I){return re(document,"mousedown",t=>{let s=t.composedPath?t.composedPath():t.path;if(s){for(;s.length>3;)if(s.shift()===i)return}else{let r=t.explicitOriginalTarget||t.target;if(i===r||i.contains(r)||i.root&&i.root.contains(r))return}e(t)})}function De(i=I){H(document,"mousedown",i)}function we(i,e="click",t={},s){let r=new Event(e,{bubbles:!s,cancelable:!0});Object.assign(r,t),i.dispatchEvent(r)}function rt(i={}){let e="";for(let t in i)i[t]&&(e+=" "+t);return e.slice(1)}function nt(i={}){let e="";for(let t in i)(i[t]||i[t]===0)&&(e+=ie(t)+":"+i[t]+";");return e}var Ne=class extends HTMLElement{static get observedAttributes(){let e=[];return this.finalize(),this.parseAnim(),this[x].forEach((t,s)=>{e.push(t.attrName)}),e}static parseAnim(){if(this.hasOwnProperty("animation")){let{type:e="fade",duration:t,custom:s,immediate:r=!1}=this.animation,n=N[e]||N.fade;s&&(n=s),Object.defineProperty(this.prototype,"$animate",{value(o){if(this[w])return M.call(this,t,n,o)},enumerable:!1}),this.prototype.$animate.immediate=r,delete this.animation}}static finalize(){if(this[B])return!1;if(this[B]=!0,this[x]=new Map,this.hasOwnProperty("props"))for(let e in this.props){let t=le(this.props[e]),s=e.toLowerCase();t.attrName=s,g[s]?e=g[s]:(t.attrName=ie(e),e=se(e)),this[x].set(e,t)}delete this.props}static reg(e=""){e="wc-"+e,customElements.get(e)||customElements.define(e,this)}constructor(){super(),this[C]=!1,this[w]=!1,this[_]=new Map,this.host=this,this.root=this.shadowRoot||this.attachShadow({mode:"open"}),this.root.ownHost=this,Object.defineProperty(this,"$refs",{value:Object.create(null),enumerable:!1}),Object.defineProperty(this,"$events",{value:Object.create(null),enumerable:!1}),window.wkitd&&this.$store&&window.wkitd.assign(this);for(let[e,t]of this.constructor[x])this.createProperty(e,t),this[_].set(e,this[e]);this.created()}createProperty(e,t){let s=Symbol(e),r;if(t.type===Array||t.type===Object){let n=this.#e(e,t);r={get(){return n},set(o){n=this.#e(e,t,R(o,t)),this.$requestUpdate(e)},enumerable:!1}}else r={get(){return this[s]},set(n){let o=this[s];n=R(n,t),o!==n&&(this[s]=n,this.$requestUpdate(e),t.observer&&t.observer.call(this,n,o))},enumerable:!1},this[s]=t.default;Object.defineProperty(this,e,r)}#e(e,t,s){return new Proxy(s||t.default,{set:(r,n,o)=>{if(n==="length"&&t.type===Array)return!0;let l=r[n];return r[n]=o,this.$requestUpdate(e),t.observer&&t.observer.call(this,o,l),!0}})}#t(){for(let[e,t]of this[_])this.#s(e,t);this[_].clear(),this.$requestUpdate()}#i(e){return this.constructor[x].get(e)}connectedCallback(){this.$animate&&(this.style.display="none"),this.#t(),ce(this.root,this.constructor.styles),this[O]?.setConnected(!0)}disconnectedCallback(){if(this[O]?.setConnected(!1),!document.body?.contains(this)){let e=this.$events;if(e)for(let t in e)for(let s of e[t])H(s.el,t,s.listener,s.options);window.wkitd&&this.$store&&window.wkitd.deassign(this)}this.unmounted()}attributeChangedCallback(e,t,s){t!==s&&this.#r(e,s,t)}#s(e,t){let s=this.#i(e),r=s.attrName;if(s.attribute===!1){this.removeAttribute(r);return}switch(s.type){case Number:case String:t===null?this.removeAttribute(r):this.setAttribute(r,t);break;case Boolean:t===null||t===!1?this.removeAttribute(r):this.setAttribute(r,"");break}}#r(e,t,s){let r=g[e],n,o;if(r&&(e=r),o=se(e),n=this.#i(o),t=R(t,n),n.attribute===!1){if(t===null)return;if(t===this[o]){this.removeAttribute(e);return}}this[o]=t}$requestUpdate(e){e!==void 0&&(this[_].set(e,this[e]),this.#s(e,this[e])),this[C]===!1&&(this[C]=!0,V(t=>this.#n()))}#n(){let e=this[_];this.#a(),this.#o(e),this.#l()}#o(e){this[w]===!1?(this[w]=!0,this.$animate?.immediate&&this.$animate(),this.__keep_alive__&&V(t=>this.activated()),V(t=>this.mounted())):V(t=>this.updated(e))}#l(){this[_].clear(),this[C]=!1}#a(){let e=this.render();this[O]=xe(e,this.root,{host:this,isConnected:!this[w]&&this.isConnected})}created(){}mounted(){}activated(){}deactivated(){}unmounted(){}updated(){}render(){return ee``}$on(e,t,s){return re(this,e,t,s)}$off(e,t,s){H(this,e,t,s)}$emit(e,t={},s=!1){return we(this,e,t,s)}};export{te as $,Ue as $$,Ne as Component,re as bind,se as camelize,rt as classMap,De as clearOutsideClick,Se as css,we as fire,ee as html,ie as hyphen,V as nextTick,ze as offset,Be as outsideClick,He as raw,nt as styleMap,ve as svg,H as unbind}; +\f\r"'\`<>=]`,Ve=`[^\\s"'>=/]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,he=1,q=2,Oe=3,fe=/-->/g,de=/>/g,$=new RegExp(`>|${D}(?:(${Ve}+)(${D}*=${D}*(?:${ke}|("|')|))|$)`,"g"),Re=0,ue=1,Me=2,pe=3,me=/'/g,_e=/"/g,$e=/^(?:script|style|textarea|title)$/i,Pe=1,j=2,F=1,L=2,je=5,K=6,Le=7,be=new Map,y=document.createTreeWalker(document,129,null,!1);function W(){}function Ie(i,e){let t=i.length-1,s=[],r=e===j?"":"",n,o=T;for(let a=0;a"?(o=n??T,u=-1):h[ue]===void 0?u=-2:(u=o.lastIndex-h[Me].length,d=h[ue],o=h[pe]===void 0?$:h[pe]==='"'?_e:me):o===_e||o===me?o=$:o===fe||o===de?o=T:(o=$,n=void 0);let H=o===$&&i[a+1].startsWith("/>")?" ":"";r+=o===T?c+Ce:u>=0?(s.push(d),c.slice(0,u)+Y+c.slice(u)+b+H):c+b+(u===-2?(s.push(void 0),a):H)}let l=r+(i[t]||"")+(e===j?"":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw new Error("invalid html ast");return[l,s]}var A=class{constructor({strings:e,["__dom_type__"]:t},s){this.parts=[];let r,n=0,o=0,l=e.length-1,a=this.parts,[c,u]=Ie(e,t);if(this.el=A.createElement(c),y.currentNode=this.el.content,t===j){let d=this.el.content,f=d.firstChild;f.remove(),d.append(...f.childNodes)}for(;(r=y.nextNode())!==null&&a.length0){r.textContent="";for(let h=0;h2||s[0]!==""||s[1]!==""?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=p}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e,t){let s=this.strings,r=!1;if(s===void 0)r=!P(e)||e!==this._$committedValue,r&&(this._$committedValue=e);else{let n=e;e=s[0];for(let o=0;oo.stopPropagation();break;case"prevent":this.#t=o=>o.preventDefault();break;case"self":this.#s=o=>o.target===this.element;break;case"capture":case"once":case"passive":s[n]=!0;break}let r=e!==this.#e;if(this.#e&&t.$events[this.name]){for(let n of t.$events[this.name])if(n.el===this.element){r=s.capture!==n.capture||s.once!==n.once||s.passive!==n.passive,r&&this.element.removeEventListener(this.name,n.listener,n.options);break}}e&&r&&(this.element.addEventListener(this.name,this,s),this.#e=e,t.$events[this.name]?t.$events[this.name].push({el:this.element,listener:this,options:s}):t.$events[this.name]=[{el:this.element,listener:this,options:s}])}handleEvent(e){this.#i(e),this.#t(e),this.#s(e)!==!1&&this.#e.call(this.options.host,e)}},X=class{constructor(e,t,s){this.element=e,this.type=K,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){}};function xe(i,e,t={}){let s=e[z];return s===void 0&&(s=new E(e.insertBefore(k(),null),null,void 0,t),e[z]=s),s._$setValue(i),s}function ee(i,...e){return{__dom_type__:Pe,strings:i,values:e}}function ve(i,e=[]){let t=e.length?i.split("%s"):[i];return t.raw=!0,ee(t,...e)}function He(i,...e){return{__dom_type__:j,strings:i,values:e}}function I(){}function te(i,e,t){let s=t?"querySelectorAll":"querySelector";return e?e[s](i):document.body[s](i)}function Ue(i,e){return te(i,e,!0)}var V=function(){let i=[],e=document.createTextNode(""),t=!1;function s(){let r=i.length;for(let n=0;nt.toUpperCase())}function ze(i){try{let e=i.getBoundingClientRect();if(e.width||e.height||i.getClientRects().length){let t=i.ownerDocument,s=t.documentElement,r=t.defaultView;return{top:e.top+r.pageYOffset-s.clientTop,left:e.left+r.pageXOffset-s.clientLeft}}}catch{return{left:0,top:0}}}function re(i,e,t,s,r=!0){let n=e.split(","),o,l=i.host===i,a=l?i:null;if(typeof t=="function"?(r=s,s=t,t=null):(typeof t!="string"&&(t=null),s=s||I),l===!1){let c=i;for(;c&&c!==document.body&&c!==document;){if(c.ownHost){l=!0,a=c.ownHost;break}c=c.parentNode}}return t?o=function(c){let u=te(t,i),d=c.target;if(u)for(;d!==i;)if(u.contains(d)){s(c);break}else d=d.parentNode}:o=s,n.forEach(function(c){c=c.trim(),l&&(a.$events[c]?a.$events[c].push({el:i,listener:o,options:r}):a.$events[c]=[{el:i,listener:o,options:r}]),i.addEventListener(c,o,r)}),o}function v(i,e,t=I,s=!1){e.split(",").forEach(function(n){i.removeEventListener(n.trim(),t,s)})}function Be(i,e=I){return re(document,"mousedown",t=>{let s=t.composedPath?t.composedPath():t.path;if(s){for(;s.length>3;)if(s.shift()===i)return}else{let r=t.explicitOriginalTarget||t.target;if(i===r||i.contains(r)||i.root&&i.root.contains(r))return}e(t)})}function De(i=I){v(document,"mousedown",i)}function we(i,e="click",t={},s){let r=new Event(e,{bubbles:!s,cancelable:!0});Object.assign(r,t),i.dispatchEvent(r)}function rt(i={}){let e="";for(let t in i)i[t]&&(e+=" "+t);return e.slice(1)}function nt(i={}){let e="";for(let t in i)(i[t]||i[t]===0)&&(e+=ie(t)+":"+i[t]+";");return e}var Ne=class extends HTMLElement{static get observedAttributes(){let e=[];return this.finalize(),this.parseAnim(),this[x].forEach((t,s)=>{e.push(t.attrName)}),e}static parseAnim(){if(this.hasOwnProperty("animation")){let{type:e="fade",duration:t,custom:s,immediate:r=!1}=this.animation,n=N[e]||N.fade;s&&(n=s),Object.defineProperty(this.prototype,"$animate",{value(o){if(this[w])return M.call(this,t,n,o)},enumerable:!1}),this.prototype.$animate.immediate=r,delete this.animation}}static finalize(){if(this[B])return!1;if(this[B]=!0,this[x]=new Map,this.hasOwnProperty("props"))for(let e in this.props){let t=le(this.props[e]),s=e.toLowerCase();t.attrName=s,g[s]?e=g[s]:(t.attrName=ie(e),e=se(e)),this[x].set(e,t)}delete this.props}static reg(e=""){e="wc-"+e,customElements.get(e)||customElements.define(e,this)}constructor(){super(),this[C]=!1,this[w]=!1,this[_]=new Map,this.host=this,this.root=this.shadowRoot||this.attachShadow({mode:"open"}),this.root.ownHost=this,Object.defineProperty(this,"$refs",{value:Object.create(null),enumerable:!1}),Object.defineProperty(this,"$events",{value:Object.create(null),enumerable:!1}),window.wkitd&&this.$store&&window.wkitd.assign(this);for(let[e,t]of this.constructor[x])this.createProperty(e,t),this[_].set(e,this[e]);this.created()}createProperty(e,t){let s=Symbol(e),r;if(t.type===Array||t.type===Object){let n=this.#e(e,t);r={get(){return n},set(o){n=this.#e(e,t,R(o,t)),this.$requestUpdate(e)},enumerable:!1}}else r={get(){return this[s]},set(n){let o=this[s];n=R(n,t),o!==n&&(this[s]=n,this.$requestUpdate(e),t.observer&&t.observer.call(this,n,o))},enumerable:!1},this[s]=t.default;Object.defineProperty(this,e,r)}#e(e,t,s){return new Proxy(s||t.default,{get:(r,n,o)=>{let l=Reflect.get(r,n,o);return typeof l=="object"?this.#e(l):l},set:(r,n,o,l)=>{if(n==="length"&&t.type===Array)return!0;let a=r[n];return Reflect.set(r,key,o,l),this.$requestUpdate(e),t.observer&&t.observer.call(this,o,a),!0}})}#t(){for(let[e,t]of this[_])this.#s(e,t);this[_].clear(),this.$requestUpdate()}#i(e){return this.constructor[x].get(e)}connectedCallback(){this.$animate&&(this.style.display="none"),this.#t(),ce(this.root,this.constructor.styles),this[O]?.setConnected(!0)}disconnectedCallback(){if(this[O]?.setConnected(!1),!document.body?.contains(this)){let e=this.$events;if(e)for(let t in e)for(let s of e[t])v(s.el,t,s.listener,s.options);window.wkitd&&this.$store&&window.wkitd.deassign(this)}this.unmounted()}attributeChangedCallback(e,t,s){t!==s&&this.#r(e,s,t)}#s(e,t){let s=this.#i(e),r=s.attrName;if(s.attribute===!1){this.removeAttribute(r);return}switch(s.type){case Number:case String:t===null?this.removeAttribute(r):this.setAttribute(r,t);break;case Boolean:t===null||t===!1?this.removeAttribute(r):this.setAttribute(r,"");break}}#r(e,t,s){let r=g[e],n,o;if(r&&(e=r),o=se(e),n=this.#i(o),t=R(t,n),n.attribute===!1){if(t===null)return;if(t===this[o]){this.removeAttribute(e);return}}this[o]=t}$requestUpdate(e){e!==void 0&&(this[_].set(e,this[e]),this.#s(e,this[e])),this[C]===!1&&(this[C]=!0,V(t=>this.#n()))}#n(){let e=this[_];this.#a(),this.#o(e),this.#l()}#o(e){this[w]===!1?(this[w]=!0,this.$animate?.immediate&&this.$animate(),this.__keep_alive__&&V(t=>this.activated()),V(t=>this.mounted())):V(t=>this.updated(e))}#l(){this[_].clear(),this[C]=!1}#a(){try{let e=this.render();this[O]=xe(e,this.root,{host:this,isConnected:!this[w]&&this.isConnected})}catch(e){console.error(e)}}created(){}mounted(){}activated(){}deactivated(){}unmounted(){}updated(){}render(){return ee``}$on(e,t,s){return re(this,e,t,s)}$off(e,t,s){v(this,e,t,s)}$emit(e,t={},s=!1){return we(this,e,t,s)}};export{te as $,Ue as $$,Ne as Component,re as bind,se as camelize,rt as classMap,De as clearOutsideClick,Se as css,we as fire,ee as html,ie as hyphen,V as nextTick,ze as offset,Be as outsideClick,ve as raw,nt as styleMap,He as svg,v as unbind}; diff --git a/usr/lib/hosts-switch/webapp/lib/wkitd.js b/usr/lib/hosts-switch/webapp/lib/wkitd.js index 6b352e0..6db23b6 100644 --- a/usr/lib/hosts-switch/webapp/lib/wkitd.js +++ b/usr/lib/hosts-switch/webapp/lib/wkitd.js @@ -1,13 +1,13 @@ -var G=Object.defineProperty;var Z=(i,e,t)=>e in i?G(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>(Z(i,typeof e!="symbol"?e+"":e,t),t),q=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var E=(i,e,t)=>(q(i,e,"read from private field"),t?t.call(i):e.get(i)),m=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},T=(i,e,t,o)=>(q(i,e,"write to private field"),o?o.call(i,t):e.set(i,t),t);var C=(i,e,t)=>(q(i,e,"access private method"),t);import"wkit";var c=Symbol("router"),h=Symbol("router-view"),y=Symbol("store"),x=new Set;var P=class extends WeakMap{broadcast(){for(let e of x)e.$requestUpdate()}assign(e){x.add(e)}deassign(e){x.add(e)}},F=new P;Object.defineProperty(window,"wkitd",{get(){return F},set(i){console.error("Can not set readonly property wkitd of window")},enumerable:!1});import{html as K,css as oe,Component as ie}from"wkit";var J=encodeURIComponent,W=decodeURIComponent;function w(){}function U(i,e,t){var o;if(Array.isArray(e))e.forEach(function(r,s){o=i?`${i}[${Array.isArray(r)?s:""}]`:s,typeof r=="object"?U(o,r,t):t(o,r)});else for(let r in e)o=i?`${i}[${r}]`:r,typeof e[r]=="object"?U(o,e[r],t):t(o,e[r])}function H(i=""){let e=new URLSearchParams(i),t=Object.create(null);for(let[o,r]of e.entries()){let s=W(o),n=W(r),a=0;if(/(\w+)\[(\w*?)\]/.test(s)){let u=RegExp.$1,l=RegExp.$2;s=u,!l||+l==+l?(n=[n],a|=2):(a|=1,n={[l]:n})}t[s]?a&2?t[s]=t[s].concat(n):a&1?Object.assign(t[s],n):(Array.isArray(t[n])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n}return t}function k(i={}){if(i===null)return"";if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")return i;let e=[];return typeof i=="object"&&U("",i,function(o,r){e.push(o+"="+J(r))}),e.join("&")}import{Component as te}from"wkit";import{bind as V}from"wkit";var Y=/^(#!|#)[\/]+?/,B=/(\/[^/]*)(:[A-Za-z0-9_]+)(\?)?/g,v="hash",L="history",O=class{type=v;#e=new Map;#s=new Set;#n=new Map;#t=!1;#r=Object.create(null);#o;constructor(e=v){this.type=e,V(window,"popstate",this.#i.bind(this))}get route(){return this.#r}get views(){return Array.from(this.#s)}#i(e){this.#t&&this.#p()}#h(e){if(e.path==="!")e.regexp=null;else{let t=[],o;if(e.path.includes("?")&&e.path.at(-1)!=="?")throw new SyntaxError(`The exp "?" can only be used in the last. +var J=Object.defineProperty;var V=(i,e,t)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>(V(i,typeof e!="symbol"?e+"":e,t),t),q=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var b=(i,e,t)=>(q(i,e,"read from private field"),t?t.call(i):e.get(i)),m=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},T=(i,e,t,o)=>(q(i,e,"write to private field"),o?o.call(i,t):e.set(i,t),t);var C=(i,e,t)=>(q(i,e,"access private method"),t);import"wkit";var c=Symbol("router"),h=Symbol("router-view"),y=Symbol("store"),x=new Set;var P=class extends WeakMap{broadcast(){for(let e of x)e.$requestUpdate()}assign(e){x.add(e)}deassign(e){x.add(e)}},Y=new P;Object.defineProperty(window,"wkitd",{get(){return Y},set(i){console.error("Can not set readonly property wkitd of window")},enumerable:!1});import{html as Z,css as ne,Component as F}from"wkit";var B=encodeURIComponent,W=decodeURIComponent;function w(){}function H(i,e,t){Object.defineProperty(i,e,{get(){return t},set(o){},enumerable:!1})}function U(i,e,t){var o;if(Array.isArray(e))e.forEach(function(r,s){o=i?`${i}[${Array.isArray(r)?s:""}]`:s,typeof r=="object"?U(o,r,t):t(o,r)});else for(let r in e)o=i?`${i}[${r}]`:r,typeof e[r]=="object"?U(o,e[r],t):t(o,e[r])}function M(i=""){let e=new URLSearchParams(i),t=Object.create(null);for(let[o,r]of e.entries()){let s=W(o),n=W(r),a=0;if(/(\w+)\[(\w*?)\]/.test(s)){let u=RegExp.$1,l=RegExp.$2;s=u,!l||+l==+l?(n=[n],a|=2):(a|=1,n={[l]:n})}t[s]?a&2?t[s]=t[s].concat(n):a&1?Object.assign(t[s],n):(Array.isArray(t[n])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n}return t}function v(i={}){if(i===null)return"";if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")return i;let e=[];return typeof i=="object"&&U("",i,function(o,r){e.push(o+"="+B(r))}),e.join("&")}import{Component as ie}from"wkit";import{bind as L}from"wkit";var Q=/^(#!|#)[\/]+?/,ee=/(\/[^/]*)(:[A-Za-z0-9_]+)(\?)?/g,k="hash",te="history",R=class{type=k;#e=new Map;#s=new Set;#n=new Map;#t=!1;#r=Object.create(null);#o;constructor(e=k){this.type=e,L(window,"popstate",this.#i.bind(this))}get route(){return this.#r}get views(){return Array.from(this.#s)}#i(e){this.#t&&this.#p()}#h(e){if(e.path==="!")e.regexp=null;else{let t=[],o;if(e.path.includes("?")&&e.path.at(-1)!=="?")throw new SyntaxError(`The exp "?" can only be used in the last. ${JSON.stringify(e)} -`);o=e.path.replace(B,function(r,s,n,a){return t.push(n.slice(1)),s==="/"&&(s="/?"),s+"([A-Za-z0-9_]+)"+a}),o="^"+o+"$",e.regexp=new RegExp(o),e.vars=t}return e}#a(e){if(e.path!=="!"&&e.path[0]!=="/"){console.error('route path must start with "/"');return}e.path=e.path.replace(/^[\/]+|[\/]+$|\s+/g,"/"),this.#e.set(e.path,this.#h(e)),this.#s.add(e.name)}#p(){let e=this.type===v,t=window.wkitd.get(h),o=location.hash,r=e?location.hash:location.href.replace(location.origin,"").replace(o,""),s;if(r.includes("?")&&([r,s]=r.split("?")),r=r.replace(Y,"/"),!(!t||r===this.#r.path)){for(let[n,a]of this.#e){let u=r.match(a.regexp);if(u){let l=Object.create(null);for(let b=1;b{this.#l(A)}):this.#l(A)}}if(this.#e.get("!")){let n=this.#e.get("!");t.current=n.name,this.#r={path:r,name:n.name,params:{},query:{}}}}}#l(e){let t=window.wkitd.get(h);t.current=e.name,this.#r=e,this.#c()}#c(){for(let[e,t]of this.#n)t.call(e,this.route)}init(){this.#t=!0,this.#i()}rsync(e,t){this.#n.set(e,t),this.#t&&this.#c()}beforeEach(e=w){this.#o=e}addRoute(e){Array.isArray(e)?e.forEach(t=>{this.#a(t)}):this.#a(e),this.#t&&this.#i()}go(e=0){history.go(e)}back(){this.go(-1)}forward(){this.go(1)}push(e={path:"",query:{}},t=!1){let o="",r="";typeof e=="string"?o=e.trim():(r=k(e.query||""),o=e.path+(r?`?${r}`:"")),!(!o&&o===location.hash.slice(1))&&(this.type===v?t?location.replace(o.replace(/^\//,"#/")):location.hash=o:(t?window.history.replaceState({path:o},null,o+r):window.history.pushState({path:o},null,o+r),this.#p()))}replace(e={path:"",query:{}}){this.push(e,!0)}};function M(){return()=>new O}function Q(){return()=>new O(L)}import{Component as j,html as ee,css as D,raw as I}from"wkit";var $,_=class extends j{constructor(){super(...arguments);m(this,$,[])}created(){window.wkitd.set(h,this)}sync(t){T(this,$,t)}render(){let t={immediate:!0,custom:[{transform:"translateX(-32px)",opacity:0},{transform:"translateX(0)",opacity:1}]};if(this.keepAlive){let o=E(this,$).map(r=>[this.transition?`<${r} ref="${r}" :__keep_alive__="%s" #animation="%s" style="%s">`:`<${r} ref="${r}" :__keep_alive__="%s" style=%s>`,[this.current===r,{...t,immediate:this.current===r},this.current===r?"":"display:none"]]);return I(o.map(r=>r[0]).join(""),o.map(r=>r[1]).flat())}else if(this.current)return this.transition?I(`<${this.current} #animation="%s">`,[t]):I(`<${this.current}>`)}};$=new WeakMap,d(_,"props",{keepAlive:!1,transition:!1,current:{type:String,default:"",attribute:!1,observer(t,o){this.keepAlive&&t&&(o&&this.$refs[o]&&this.$refs[o].deactivated(),this.$refs[t]?.$requestUpdate(),this.$refs[t]?.$animate(),this.$refs[t]?.activated())}}}),d(_,"styles",D` +`);o=e.path.replace(ee,function(r,s,n,a){return t.push(n.slice(1)),s==="/"&&(s="/?"),s+"([A-Za-z0-9_]+)"+a}),o="^"+o+"$",e.regexp=new RegExp(o),e.vars=t}return e}#a(e){if(e.path!=="!"&&e.path[0]!=="/"){console.error('route path must start with "/"');return}e.path=e.path.replace(/^[\/]+|[\/]+$|\s+/g,"/"),this.#e.set(e.path,this.#h(e)),this.#s.add(e.name)}#p(){let e=this.type===k,t=window.wkitd.get(h),o=location.hash||"#/",r=e?o:location.href.replace(location.origin,"").replace(o,""),s;if(r.includes("?")&&([r,s]=r.split("?")),r=r.replace(Q,"/"),!(!t||r===this.#r.path)){for(let[n,a]of this.#e){let u=r.match(a.regexp);if(u){let l=Object.create(null);for(let E=1;E{this.#l(A)}):this.#l(A)}}if(this.#e.get("!")){let n=this.#e.get("!");t.current=n.name,this.#r={path:r,name:n.name,params:{},query:{}}}}}#l(e){let t=window.wkitd.get(h);t.current=e.name,this.#r=e,this.#c()}#c(){for(let[e,t]of this.#n)t.call(e,this.route)}init(){this.#t=!0,this.#i()}rsync(e,t){this.#n.set(e,t),this.#t&&this.#c()}beforeEach(e=w){this.#o=e}addRoute(e){Array.isArray(e)?e.forEach(t=>{this.#a(t)}):this.#a(e),this.#t&&this.#i()}go(e=0){history.go(e)}back(){this.go(-1)}forward(){this.go(1)}push(e={path:"",query:{}},t=!1){let o="",r="";typeof e=="string"?o=e.trim():(r=v(e.query||""),o=e.path+(r?`?${r}`:"")),!(!o&&o===location.hash.slice(1))&&(this.type===k?t?location.replace(o.replace(/^\//,"#/")):location.hash=o:(t?window.history.replaceState({path:o},null,o+r):window.history.pushState({path:o},null,o+r),this.#p()))}replace(e={path:"",query:{}}){this.push(e,!0)}};function j(){return()=>new R}function re(){return()=>new R(te)}import{Component as D,html as oe,css as N,raw as I}from"wkit";var $,_=class extends D{constructor(){super(...arguments);m(this,$,[])}created(){window.wkitd.set(h,this)}sync(t){T(this,$,t)}render(){let t={immediate:!0,custom:[{transform:"translateX(-32px)",opacity:0},{transform:"translateX(0)",opacity:1}]};if(this.keepAlive){let o=b(this,$).map(r=>[this.transition?`<${r} ref="${r}" :__keep_alive__="%s" #animation="%s" style="%s">`:`<${r} ref="${r}" :__keep_alive__="%s" style=%s>`,[this.current===r,{...t,immediate:this.current===r},this.current===r?"":"display:none"]]);return I(o.map(r=>r[0]).join(""),o.map(r=>r[1]).flat())}else if(this.current)return this.transition?I(`<${this.current} #animation="%s">`,[t]):I(`<${this.current}>`)}};$=new WeakMap,d(_,"props",{keepAlive:!1,transition:!1,current:{type:String,default:"",attribute:!1,observer(t,o){this.keepAlive&&t&&(o&&this.$refs[o]&&this.$refs[o].deactivated(),this.$refs[t]?.$requestUpdate(),this.$refs[t]?.$animate(),this.$refs[t]?.activated())}}}),d(_,"styles",N` :host { display: block; } - `);var f,R,N,S,X,g=class extends j{constructor(){super(...arguments);m(this,R);m(this,S);m(this,f,"")}mounted(){this.$router.rsync(this,t=>{this.classList.toggle("active",t.path===this.to.path)})}render(){return T(this,f,C(this,S,X).call(this)),ee` + `);var f,O,X,S,z,g=class extends D{constructor(){super(...arguments);m(this,O);m(this,S);m(this,f,"")}mounted(){this.$router.rsync(this,t=>{this.classList.toggle("active",t.path===this.to.path)})}render(){return T(this,f,C(this,S,z).call(this)),oe` `}};f=new WeakMap,R=new WeakSet,N=function(){let t=this.$router.type,{path:o}=this.to;this.disabled||(t==="hash"?location.hash=E(this,f):this.$router.push(this.to))},S=new WeakSet,X=function(){let t=this.$router.type,{path:o="",query:r={}}=this.to,s=typeof r=="string"?r.replaceAll("?",""):k(r);return o=o.replace(/^\//,""),s&&(o+="?"+s),"/"+o},d(g,"props",{to:Object,disabled:!1}),d(g,"styles",D` + >`}};f=new WeakMap,O=new WeakSet,X=function(){let t=this.$router.type,{path:o}=this.to;this.disabled||(t==="hash"?location.hash=b(this,f):this.$router.push(this.to))},S=new WeakSet,z=function(){let t=this.$router.type,{path:o="",query:r={}}=this.to,s=typeof r=="string"?r.replaceAll("?",""):v(r);return o=o.replace(/^\//,""),s&&(o+="?"+s),"/"+o},d(g,"props",{to:Object,disabled:!1}),d(g,"styles",N` :host { display: inline-flex; align-items: center; @@ -28,7 +28,7 @@ var G=Object.defineProperty;var Z=(i,e,t)=>e in i?G(i,e,{enumerable:!0,configura opacity: 0.6; cursor: not-allowed; } - `);customElements.get("router-view")||customElements.define("router-view",_);customElements.get("router-link")||customElements.define("router-link",g);function ke({history:i=M(),routes:e=[]}={}){let t=i();window.wkitd.set(c,t),t.addRoute(e);function o(){Object.defineProperty(te.prototype,"$router",{get(){return window.wkitd.get(c)},set(r){console.error("Can not set readonly property $router of Component")},enumerable:!1})}return o.beforeEach=t.beforeEach.bind(t),o}import{Component as z}from"wkit";function re(i={}){let e=!1;return function(){Object.defineProperty(z.prototype,"$store",{get(){return window.wkitd.get(y)},set(t){if(e)return console.error("Can not set readonly property $store of Component");window.wkitd.set(y,new Proxy(t,{set(o,r,s){return o[r]=s,window.wkitd.broadcast(),!0}})),e=!0},enumerable:!1}),z.prototype.$store=i}}var p=class extends ie{};function Pe({data:i={},styles:e=[],methods:t={},mounted:o=w,render:r}={}){return new function(){p.props=i,p.styles=e,Object.assign(p.prototype,t,{mounted:o}),this.use=function(s=w,...n){return s.apply(p.prototype,n),this},this.mount=function(){let s=window.wkitd.get(c);r?p.prototype.render=r:s?p.prototype.render=function(){return K``}:(p.styles=oe` + `);customElements.get("router-view")||customElements.define("router-view",_);customElements.get("router-link")||customElements.define("router-link",g);function Re({history:i=j(),routes:e=[]}={}){let t=i();window.wkitd.set(c,t),t.addRoute(e);function o(){Object.defineProperty(ie.prototype,"$router",{get(){return window.wkitd.get(c)},set(r){console.error("Can not set readonly property $router of Component")},enumerable:!1})}return o.beforeEach=t.beforeEach.bind(t),o}import{Component as K}from"wkit";function G(i){return i===null?i:new Proxy(i,{get(e,t,o){let r=Reflect.get(e,t,o);return typeof r=="object"?G(r):r},set(e,t,o,r){return Reflect.set(e,t,o,r),window.wkitd.broadcast(),!0}})}function se(i={}){let e=!1;return function(){Object.defineProperty(K.prototype,"$store",{get(){return window.wkitd.get(y)},set(t){if(e)return console.error("Can not set readonly property $store of Component");window.wkitd.set(y,G(t)),e=!0},enumerable:!1}),K.prototype.$store=i}}var p=class extends F{};function Ie({data:i={},styles:e=[],methods:t={},mounted:o=w,render:r}={}){return new function(){p.props=i,p.styles=e,Object.assign(p.prototype,t,{mounted:o,created(){H(F.prototype,"$app",this)}}),this.use=function(s=w,...n){return s.apply(p.prototype,n),this},this.mount=function(){let s=window.wkitd.get(c);r?p.prototype.render=r:s?p.prototype.render=function(){return Z``}:(p.styles=ne` :host { font-family: monospace; color: #647889; @@ -37,7 +37,7 @@ var G=Object.defineProperty;var Z=(i,e,t)=>e in i?G(i,e,{enumerable:!0,configura margin: 16px 0; background: #f7f8fb; } - `,p.prototype.render=function(){return K` + `,p.prototype.render=function(){return Z`

    It works!!!

    If you don't use router, you may define the @@ -51,4 +51,4 @@ var G=Object.defineProperty;var Z=(i,e,t)=>e in i?G(i,e,{enumerable:!0,configura
      })
      .mount()
    - `}),s&&(p.prototype.mounted=function(...n){let a=window.wkitd.get(h);if(a)a.sync(s.views),s.init(),o.call(this,...n);else throw new Error(' not found, "Router" works Unexpected.')}),p.reg("app")}}}function Ue(){return window.wkitd.get(y)}function Ie(){return window.wkitd.get(c)}function We(){return window.wkitd.get(c)?.route}export{Pe as createApp,ke as createRouter,re as createStore,M as createWebHashHistory,Q as createWebHistory,We as getCurrentPage,Ie as getRouter,Ue as getStore}; + `}),s&&(p.prototype.mounted=function(...n){let a=window.wkitd.get(h);if(a)a.sync(s.views),s.init(),o.call(this,...n);else throw new Error(' not found, "Router" works Unexpected.')}),p.reg("app")}}}function We(){return window.wkitd.get(y)}function He(){return window.wkitd.get(c)}function Me(){return window.wkitd.get(c)?.route}export{Ie as createApp,Re as createRouter,se as createStore,j as createWebHashHistory,re as createWebHistory,Me as getCurrentPage,He as getRouter,We as getStore}; diff --git a/usr/lib/hosts-switch/webapp/store.js b/usr/lib/hosts-switch/webapp/store.js new file mode 100644 index 0000000..5ff3f17 --- /dev/null +++ b/usr/lib/hosts-switch/webapp/store.js @@ -0,0 +1,15 @@ +/** + * {} + * @author yutent + * @date 2023/09/04 11:11:51 + */ + +import { createStore } from 'wkitd' + +export default createStore({ + HOST_DATA: {}, + activeDomain: localStorage.getItem('last_domain') || '', //当前选中的域名 + domains: [], + records: [], + tmp_records: [] +}) diff --git a/usr/lib/hosts-switch/webapp/utils/index.js b/usr/lib/hosts-switch/webapp/utils/index.js index 7e2b962..3385014 100644 --- a/usr/lib/hosts-switch/webapp/utils/index.js +++ b/usr/lib/hosts-switch/webapp/utils/index.js @@ -1,11 +1,21 @@ -const CONFIG_DIR = '/home/yutent/.config/hosts-switch' -const HOST_FILE = `${CONFIG_DIR}/host.cache` -const LOCK_FILE = `${CONFIG_DIR}/lock` +/** + * {} + * @author yutent + * @date 2023/09/04 19:18:28 + */ + +await native.init() + +const APP_CONFIG_DIR = `${native.env.CONFIG_DIR}/hosts-switch` +const HOST_FILE = `${APP_CONFIG_DIR}/host.cache` +const LOCK_FILE = `${APP_CONFIG_DIR}/lock` let timer +export function noop() {} + export function checkPermission() { - return writable('/etc/hosts') + return native.fs.access('/etc/hosts', 'w') } export async function getHistory() { @@ -79,7 +89,8 @@ export function saveHosts(dict) { } txt += '\n' } - native.fs.write(HOST_FILE, JSON.stringify(dict)) - native.fs.write('/etc/hosts', txt) - }, 1000) + console.log(txt) + // native.fs.write(HOST_FILE, JSON.stringify(dict)) + // native.fs.write('/etc/hosts', txt) + }, 500) }