fullstack.web/swa/token/layx.min.js

5 lines
104 KiB
JavaScript
Raw Permalink Normal View History

2023-08-09 05:57:49 +00:00
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.layx=e():t.layx=e()}(window,function(){return(d=[function(t,e,n){(function(d){t.exports=function(){"use strict";var t=function(t){var e=t.id,n=t.viewBox,i=t.content;this.id=e,this.viewBox=n,this.content=i};t.prototype.stringify=function(){return this.content},t.prototype.toString=function(){return this.stringify()},t.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach(function(t){return delete e[t]})};"undefined"!=typeof window?window:void 0!==d||"undefined"!=typeof self&&self;function e(t,e){return t(e={exports:{}},e.exports),e.exports}var o=e(function(t,e){t.exports=function(){function r(t){var e=t&&"object"==typeof t;return e&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function s(t,e){var n,i=e&&!0===e.clone;return i&&r(t)?u((n=t,Array.isArray(n)?[]:{}),t,e):t}function a(n,t,i){var o=n.slice();return t.forEach(function(t,e){void 0===o[e]?o[e]=s(t,i):r(t)?o[e]=u(n[e],t,i):-1===n.indexOf(t)&&o.push(s(t,i))}),o}function d(e,n,i){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=s(e[t],i)}),Object.keys(n).forEach(function(t){r(n[t])&&e[t]?o[t]=u(e[t],n[t],i):o[t]=s(n[t],i)}),o}function u(t,e,n){var i=Array.isArray(e),o=n||{arrayMerge:a},r=o.arrayMerge||a;return i?Array.isArray(t)?r(t,e,n):s(e,n):d(t,e,n)}return u.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return u(t,e,n)})},u}()}),n=e(function(t,e){e.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},t.exports=e.default}),i=n.svg,r=n.xlink,s={};s[i.name]=i.uri,s[r.name]=r.uri;var a=function(t,e){void 0===t&&(t="");var n=o(s,e||{}),i=function(n){return Object.keys(n).map(function(t){var e=n[t].toString().replace(/"/g,"&quot;");return t+'="'+e+'"'}).join(" ")}(n);return"<svg "+i+">"+t+"</svg>"};return function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},e.createFromExistingNode=function(t){return new e({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},e.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},e.prototype.mount=function(t){if(this.isMounted)return this.node;var e="string"==typeof t?document.querySelector(t):t,n=this.render();return this.node=n,e.appendChild(n),n},e.prototype.render=function(){var t=this.stringify();return function(t){var e=!!document.importNode,n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(e){return document.importNode(n,true)}return n}(a(t)).childNodes[0]},e.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(e.prototype,n),e}(t)}()}).call(this,n(14))},function(t,e,n){(function(H){t.exports=function(){"use strict";"undefined"!=typeof window?window:void 0!==H||"undefined"!=typeof self&&self;function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(t,e){t.exports=function(){function r(t){var e=t&&"object"==typeof t;return e&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function s(t,e){var n,i=e&&!0===e.clone;return i&&r(t)?u((n=t,Array.isArray(n)?[]:{}),t,e):t}function a(n,t,i){var o=n.slice();return t.forEach(function(t,e){void 0===o[e]?o[e]=s(t,i):r(t)?o[e]=u(n[e],t,i):-1===n.indexOf(t)&&o.push(s(t,i))}),o}function d(e,n,i){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=s(e[t],i)}),Object.keys(n).forEach(function(t){r(n[t])&&e[t]?o[t]=u(e[t],n[t],i):o[t]=s(n[t],i)}),o}function u(t,e,n){var i=Array.isArray(e),o=n||{arrayMerge:a},r=o.arrayMerge||a;return i?Array.isArray(t)?r(t,e,n):s(e,n):d(t,e,n)}return u.all=functi
/*!
* domready (c) Dustin Diaz 2014 - License MIT
*/
t.exports=function(){var t,e=[],n=document,i=n.documentElement.doScroll,o="DOMContentLoaded",r=(i?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return r||n.addEventListener(o,t=function(){for(n.removeEventListener(o,t),r=1;t=e.shift();)t()}),function(t){r?setTimeout(t,0):e.push(t)}}()}),P="__SVG_SPRITE_NODE__",k="__SVG_SPRITE__";window[k]?O=window[k]:(O=new j({attrs:{id:P}}),window[k]=O);var T=function(){var t=document.getElementById(P);t?O.attach(t):O.mount(document.body,!0)};return document.body?T():A(T),O}()}).call(this,n(14))},function(t,e,n){"use strict";function o(t,i,o){void 0===o&&(o="layx-");for(var e=[],n=3;n<arguments.length;n++)e[n-3]=arguments[n];var r=t.className.split(/\s+/g);return e.forEach(function(t){if(t){var e=o+t,n=r.indexOf(e);i(r,n,e)}}),t.className=r.join(" ").trim(),t}Object.defineProperty(e,"__esModule",{value:!0}),e.createFragment=function(){return document.createDocumentFragment()},e.createElement=function(t){return document.createElement(t)},e.createElementNS=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e.addStyles=function(t,e){if(null===t)return t;for(var n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];t.style[o]=e[o]}return t},e.updateClasses=o,e.addClasses=function(t,e){void 0===e&&(e="layx-");for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return null===t?t:o.apply(void 0,[t,function(t,e,n){~e||t.push(n)},e].concat(n))},e.removeClasses=function(t,e){void 0===e&&(e="layx-");for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return null===t?t:o.apply(void 0,[t,function(t,e){~e&&t.splice(e,1)},e].concat(n))},e.containClass=function(t,e,n){return void 0===e&&(e="layx-"),null!==t&&!!~t.className.split(/\s+/g).indexOf(e+n)},e.removeElement=function(t){t&&t.parentElement&&t.parentElement.removeChild(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),s=n(8),o=n(18);e.numberCast=function(t,e){return void 0===t?e:"number"==typeof t?t:/^(([1-9][0-9]*(\.\d{1,2})?)|(0\.\d{1,2}))$/.test(t)?Number(t):s.assertNumber(t)},e.stringCast=function(t){return r.isStringWithNotEmpty(t)?t:s.assertString(t)},e.booleanCast=function(t,e){return void 0===t?e:("boolean"!=typeof t&&s.assertBoolean(t),t)},e.stringOrBooleanStyleCast=function(t,e,n){return void 0===t?e:!0===t?void 0===n?e:n:!1===t?null:t},e.typeOrBooleanCast=function(t,e,n,i){return void 0===t?e:!0===t?void 0===n?e:n:!1===t?void 0!==i&&i:t},e.undefinedCast=function(t,e){return void 0===t?e:t},e.stringOrUndefinedCast=function(t){if(void 0!==t)return r.isStringWithNotEmpty(t)?t:s.assertString(t)},e.windowModeCast=function(t,e){return void 0===t?e:(r.isWindowMode(t),t)},e.borderCast=function(t,e){if("string"==typeof t)return[t,null];if(!1===t)return[null,null];var n=[null,null],i={};return"number"==typeof(i=void 0===t||!0===t?o.merge({},e):o.merge(e,t)).width&&"string"==typeof i.color&&"string"==typeof i.style&&-1<["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","inherit"].indexOf(i.style)&&(n[0]=i.width+"px "+i.style+" "+i.color),"number"==typeof i.radius&&(n[1]=i.radius+"px"),n},e.offsetCast=function(t,e,n){if(void 0===t)return[(innerWidth-e)/2,(innerHeight-n)/2];if(r.isWindowCoord(t)){var i=t;return[i[0],i[1]]}var o=[0,0];switch(t){case"leftTop":break;case"leftCenter":o[0]=0,o[1]=(innerHeight-n)/2;break;case"leftBottom":o[0]=0,o[1]=innerHeight-n;break;case"topCenter":o[0]=(innerWidth-e)/2,o[1]=0;case"center":o[0]=(innerWidth-e)/2,o[1]=(innerHeight-n)/2;break;case"bottomCenter":o[0]=(innerWidth-e)/2,o[1]=innerHeight-n;break;case"rightTop":o[0]=innerWidth-e,o[1]=0;break;case"rightCenter":o[0]=innerWidth-e,o[1]=(innerHeight-n)/2;break;case"rightBottom":o[0]=innerWidth-e,o[1]=innerHeight-n;break;default:return s.assertNever(t)}return o},e.windowAnimateCast=function(t,e,n,i){return void 0===t?e:!0===t?void 0===n?"zoom":n:!1===t?void 0===i?"none":i:(r.isWindowAnimate(t),t)},e.jsonOrBooleanCast=function(t,e,n,i){return void 0===t?e:!0===t?void 0===n?e:n:!1===t?void 0!==i&&i:!1===e?t:o.merge(e,t)},e.contextMenuButtonsCast=funct