-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmin.js
1 lines (1 loc) · 14.9 KB
/
min.js
1
var uce=function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}function r(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function a(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},f.apply(this,arguments)}function s(t,e,n){return s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&u(o,n.prototype),o},s.apply(null,arguments)}function p(t){var e="function"==typeof Map?new Map:void 0;return p=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return s(t,arguments,l(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},p(t)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}var d=function(t){c(n,t);var e=v(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"set",value:function(t,e){return f(l(n.prototype),"set",this).call(this,t,e),e}}]),n}(p(Map)),y=function(t){c(n,t);var e=v(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"set",value:function(t,e){return f(l(n.prototype),"set",this).call(this,t,e),e}}]),n}(p(WeakMap)),h=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,b=/<([a-z]+[a-z0-9:._-]*)([^>]*?)(\/?)>/g,g=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,m=/[\x01\x02]/g;function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var A,j=function(t,e){return 111===t.nodeType?1/e<0?e?(r=(n=t).firstChild,o=n.lastChild,(i=document.createRange()).setStartAfter(r),i.setEndAfter(o),i.deleteContents(),r):t.lastChild:e?t.valueOf():t.firstChild:t;var n,r,o,i},k=Array.isArray,x=function(t){return null==t?t:t.valueOf()},S=function(t,e){var n,r,o=e.slice(2);return!(e in t)&&(r=e.toLowerCase())in t&&(o=r.slice(2)),function(e){var r=k(e)?e:[e,!1];n!==r[0]&&(n&&t.removeEventListener(o,n,r[1]),(n=r[0])&&t.addEventListener(o,n,r[1]))}},E=Array.isArray,C=Array.prototype.indexOf,N=new Proxy(document,{get:function(t,e){return t[e].bind(t)}}),R=N.createDocumentFragment,P=N.createElement,T=N.createElementNS,M=N.createTextNode,_=N.createTreeWalker,B=N.importNode,L=function(t,e){return e?function(t){A||(A=T("http://www.w3.org/2000/svg","svg")),A.innerHTML=t;var e=R();return e.append.apply(e,O(A.childNodes)),e}(t):function(t){var e=P("template");return e.innerHTML=t,e.content}(t)},$=function(t,e){return t.childNodes[e]},D=function(t,e,n){return function(t,e,n,r,o){for(var i=n.length,u=e.length,c=i,a=0,l=0,f=null;a<u||l<c;)if(u===a)for(var s=c<i?l?r(n[l-1],-0).nextSibling:r(n[c-l],0):o;l<c;)t.insertBefore(r(n[l++],1),s);else if(c===l)for(;a<u;)f&&f.has(e[a])||t.removeChild(r(e[a],-1)),a++;else if(e[a]===n[l])a++,l++;else if(e[u-1]===n[c-1])u--,c--;else if(e[a]===n[c-1]&&n[l]===e[u-1]){var p=r(e[--u],-1).nextSibling;t.insertBefore(r(n[l++],1),r(e[a++],-1).nextSibling),t.insertBefore(r(n[--c],1),p),e[u]=n[c]}else{if(!f){f=new Map;for(var v=l;v<c;)f.set(n[v],v++)}if(f.has(e[a])){var d=f.get(e[a]);if(l<d&&d<c){for(var y=a,h=1;++y<u&&y<c&&f.get(e[y])===d+h;)h++;if(h>d-l)for(var b=r(e[a],0);l<d;)t.insertBefore(r(n[l++],1),b);else t.replaceChild(r(n[l++],1),r(e[a++],-1))}else a++}else t.removeChild(r(e[a++],-1))}return n}(t.parentNode,e,n,j,t)},W=function(t,e){switch(e[0]){case"?":return function(t,e,n){return function(r){var o=!!x(r);n!==o&&((n=o)?t.setAttribute(e,""):t.removeAttribute(e))}}(t,e.slice(1),!1);case".":return function(t,e){return"dataset"===e?(n=t.dataset,function(t){for(var e in t){var r=t[e];null==r?delete n[e]:n[e]=r}}):function(n){t[e]=n};var n}(t,e.slice(1));case"@":return S(t,"on"+e.slice(1));case"o":if("n"===e[1])return S(t,e)}switch(e){case"ref":return function(t){var e;return function(n){e!==n&&(e=n,"function"==typeof n?n(t):n.current=t)}}(t);case"aria":return function(t){return function(e){for(var n in e){var r="role"===n?n:"aria-".concat(n),o=e[n];null==o?t.removeAttribute(r):t.setAttribute(r,o)}}}(t)}return function(t,e){var n,r=!0,o=document.createAttributeNS(null,e);return function(e){var i=x(e);n!==i&&(null==(n=i)?r||(t.removeAttributeNode(o),r=!0):(o.value=i,r&&(t.setAttributeNodeNS(o),r=!1)))}}(t,e)};function F(t){var n=t.type,r=t.path.reduceRight($,this);return"node"===n?function(t){var n,r,o=[];return function i(u){switch(e(u)){case"string":case"number":case"boolean":n!==u&&(n=u,r||(r=M("")),r.data=u,o=D(t,o,[r]));break;case"object":case"undefined":if(null==u){n!=u&&(n=u,o=D(t,o,[]));break}if(E(u)){n=u,0===u.length?o=D(t,o,[]):"object"===e(u[0])?o=D(t,o,u):i(String(u));break}if(n!==u)if("ELEMENT_NODE"in u)n=u,o=D(t,o,11===u.nodeType?O(u.childNodes):[u]);else{var c=u.valueOf();c!==u&&i(c)}break;case"function":i(u(t))}}}(r):"attr"===n?W(r,t.name):function(t){var e;return function(n){var r=x(n);e!=r&&(e=r,t.textContent=null==r?"":r)}}(r)}var H=function(t){for(var e=[],n=t.parentNode;n;){e.push(C.call(n.childNodes,t)),n=(t=n).parentNode}return e},I="isµ",z=new y,J=/^(?:textarea|script|style|title|plaintext|xmp)$/,U=function(t,e){for(var n="svg"===t,r=function(t,e,n){var r=0;return t.join("").trim().replace(b,(function(t,e,r,o){var i=e+r.replace(g,"=$2$1").trimEnd();return o.length&&(i+=n||h.test(e)?" /":"></"+e),"<"+i+">"})).replace(m,(function(t){return""===t?"\x3c!--"+e+r+++"--\x3e":e+r++}))}(e,I,n),o=L(r,n),i=_(o,129),u=[],c=e.length-1,a=0,l="".concat(I).concat(a);a<c;){var f=i.nextNode();if(!f)throw"bad template: ".concat(r);if(8===f.nodeType)f.data===l&&(u.push({type:"node",path:H(f)}),l="".concat(I).concat(++a));else{for(;f.hasAttribute(l);)u.push({type:"attr",path:H(f),name:f.getAttribute(l)}),f.removeAttribute(l),l="".concat(I).concat(++a);J.test(f.localName)&&f.textContent.trim()==="\x3c!--".concat(l,"--\x3e")&&(f.textContent="",u.push({type:"text",path:H(f)}),l="".concat(I).concat(++a))}}return{content:o,nodes:u}},q=function(t,e){var n=z.get(e)||z.set(e,U(t,e)),r=n.content,o=n.nodes,i=B(r,!0);return{content:i,updates:o.map(F,i)}},G=function(t,e){var n=e.type,r=e.template,o=e.values,i=K(t,o),u=t.entry;u&&u.template===r&&u.type===n||(t.entry=u=function(t,e){var n=q(t,e);return{type:t,template:e,content:n.content,updates:n.updates,wire:null}}(n,r));for(var c=u,a=c.content,l=c.updates,f=c.wire,s=0;s<i;s++)l[s](o[s]);return f||(u.wire=function(t){var e=t.firstChild,n=t.lastChild;if(e===n)return n||t;var r=t.childNodes,o=O(r);return{ELEMENT_NODE:1,nodeType:111,firstChild:e,lastChild:n,valueOf:function(){return r.length!==o.length&&t.append.apply(t,O(o)),t}}}(a))},K=function t(e,n){for(var r=e.stack,o=n.length,i=0;i<o;i++){var u=n[i];u instanceof Q?n[i]=G(r[i]||(r[i]={stack:[],entry:null,wire:null}),u):E(u)?t(r[i]||(r[i]={stack:[],entry:null,wire:null}),u):r[i]=null}return o<r.length&&r.splice(o),o},Q=o((function t(e,n,r){i(this,t),this.type=e,this.template=n,this.values=r})),V=function(t){var e=new y;return Object.assign((function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new Q(t,e,r)}),{for:function(n,r){var o=e.get(n)||e.set(n,new d);return o.get(r)||o.set(r,function(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return G(e,{type:t,template:n,values:o})}}({stack:[],entry:null,wire:null}))},node:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return G({stack:[],entry:null,wire:null},new Q(t,e,r)).valueOf()}})},X=new y,Y=function(t,e){var n="function"==typeof e?e():e,r=X.get(t)||X.set(t,{stack:[],entry:null,wire:null}),o=n instanceof Q?G(r,n):n;return o!==r.wire&&(r.wire=o,t.replaceChildren(o.valueOf())),t},Z=V("html"),tt=V("svg");function et(t){for(var e=t[0],n=1,r=arguments.length;n<r;n++)e+=arguments[n]+t[n];return e}var nt=Object.defineProperties,rt=Object.keys,ot=function(t,n,r,o,i){return{configurable:!0,get:function(){return o},set:function(u){(t||u!==o||n&&"object"===e(u)&&u)&&(o=u,r?i.call(this,o):i.call(this))}}},it=function(){};function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}var ct,at=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.all,r=void 0!==n&&n,o=t.shallow,i=void 0===o||o,u=t.useState,c=void 0===u?it:u,a=t.getAttribute,l=void 0===a?function(t,e){return t.getAttribute(e)}:a;return function(t,n,o){var u=function(t,e,n,r,o,i){for(var u={},c=o!==it,a=[n,r,c],l=rt(t),f=0;f<l.length;f++){var s=e(t,l[f]),p=c?o(s):[s,o];i&&(p[1]=i),u[l[f]]=ot.apply(null,a.concat(p))}return u}(n,(function(n,r){var o=n[r],i=e(o);return t.hasOwnProperty(r)?(o=t[r],delete t[r]):t.hasAttribute(r)&&(o=l(t,r),"number"==i?o=+o:"boolean"==i&&(o=!/^(?:false|0|)$/.test(o))),o}),r,i,c,o);return nt(t,u)}}({dom:!0}),lt=customElements,ft=lt.define,st=JSON.parse,pt=JSON.stringify,vt=Object.create,dt=Object.defineProperties,yt=Object.getOwnPropertyDescriptor,ht=Object.keys,bt="element",gt=new WeakMap,mt=(ct=new Map([[bt,{c:HTMLElement,e:bt}]]),{get:function(t){return ct.get(t)},set:function(t,e){return ct.set(t,e),e}}),wt=function(t){return document.createElement(t)},Ot=function(t){return mt.get(t)||mt.set(t,{c:wt(t).constructor,e:t})},At=function(t,n){for(var r=n.attachShadow,u=n.attributeChanged,a=n.bound,l=n.connected,f=n.disconnected,s=n.formAssociated,p=n.handleEvent,v=n.init,d=n.observedAttributes,y=n.props,h=n.render,b=n.style,g=new WeakMap,m={},w={},O=[],A=vt(null),j=function(t,n,o){if(!g.has(t)){g.set(t,0),dt(t,{html:{configurable:!0,value:kt.bind(r?t.attachShadow(r):t)}});for(var i=0;i<P;i++){var u=O[i],c=u.type,l=u.options;t.addEventListener(c,t,l)}if(a&&a.forEach(jt,t),y){for(var f={},s=ht(y),p=0;p<s.length;p++){var d=s[p],b=y[d];f[d]="object"===e(b)?st(pt(b)):b}gt.set(t,f),at(t,f,h)}(v||h)&&(v||h).call(t),n&&(t[n]=o)}},k=ht(n),x=0,S=k.length;x<S;x++){var E=k[x];if(/^on./.test(E)&&!/Options$/.test(E)){var C=n[E+"Options"]||!1,N=E.toLowerCase(),R=N.slice(2);O.push({type:R,options:C}),A[R]=E,N!==E&&(R=N.slice(2,3)+E.slice(3),A[R]=E,O.push({type:R,options:C}))}switch(E){case"attachShadow":case"constructor":case"observedAttributes":case"style":break;default:w[E]=yt(n,E)}}var P=O.length;if(P&&!p&&(w.handleEvent={value:function(t){this[A[t.type]](t)}}),null!==y)if(y)for(var T=function(){var t=M[_];w[t]={get:function(){return j(this),gt.get(this)[t]},set:function(e){j(this,t,e)}}},M=ht(y),_=0;_<M.length;_++)T();else w.props={get:function(){for(var t={},e=this.attributes,n=e.length,r=0;r<n;r++){var o=e[r],i=o.name,u=o.value;t[i]=u}return t}};d&&(m.observedAttributes={value:d}),w.attributeChangedCallback={value:function(){j(this),u&&u.apply(this,arguments)}},s&&(m.formAssociated={value:s}),w.connectedCallback={value:function(){j(this),l&&l.call(this)}},f&&(w.disconnectedCallback={value:f});var B=Ot(n.extends||bt),L=B.c,$=B.e,D=function(t){c(n,t);var e=ut(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n)}(L);dt(D,m),dt(D.prototype,w);var W=[t,D];return $!==bt&&W.push({extends:$}),ft.apply(lt,W),mt.set(t,{c:D,e:$}),b&&(document.head.appendChild(wt("style")).textContent=b($===bt?t:$+'[is="'+t+'"]')),D};function jt(t){this[t]=this[t].bind(this)}function kt(){return Y(this,Z.apply(null,arguments))}return lt.get("uce-lib")||lt.define("uce-lib",function(t){c(n,t);var e=ut(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,null,[{key:"define",get:function(){return At}},{key:"render",get:function(){return Y}},{key:"html",get:function(){return Z}},{key:"svg",get:function(){return tt}},{key:"css",get:function(){return et}}]),n}(Ot(bt).c)),t.css=et,t.define=At,t.html=Z,t.render=Y,t.svg=tt,t}({});