@haxtheweb/haxcms-nodejs
Version:
HAXcms single and multisite nodejs server, api, and administration
10 lines • 8.83 kB
JavaScript
/**
@license @nocompile
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
(function(){function aa(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function h(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:aa(e)}}var e=document.createEvent("Event");if(e.initEvent("foo",!0,!0),e.preventDefault(),!e.defaultPrevented){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var n=/Trident/.test(navigator.userAgent);if(!window.Event||n&&"function"!=typeof window.Event){var o=window.Event;if(window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,!!t.bubbles,!!t.cancelable),n},o){for(var r in o)window.Event[r]=o[r];window.Event.prototype=o.prototype}}if((!window.CustomEvent||n&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.MouseEvent||n&&"function"!=typeof window.MouseEvent){var i=window.MouseEvent;if(window.MouseEvent=function(e,t){t=t||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(e,!!t.bubbles,!!t.cancelable,t.view||window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),n},i)for(var l in i)window.MouseEvent[l]=i[l];window.MouseEvent.prototype=i.prototype}var c,p=function(){function a(){o++}var e=!1,t=!1,n={get capture(){return e=!0},get once(){return t=!0}},o=0,r=document.createElement("div");r.addEventListener("click",a,n);var i=e&&t;return i&&(r.dispatchEvent(new Event("click")),r.dispatchEvent(new Event("click")),i=1==o),r.removeEventListener("click",a,n),i}(),d=null!==(c=window.EventTarget)&&void 0!==c?c:window.Node;if(!p&&"addEventListener"in d.prototype){var u=function(e){if(!e||"object"!=typeof e&&"function"!=typeof e){var t=!!e;e=!1}else t=!!e.capture,e=!!e.once;return{capture:t,once:e}},v=d.prototype.addEventListener,s=d.prototype.removeEventListener,f=new WeakMap,y=new WeakMap,w=function(e,t,n){var o=n?f:y;return void 0===(n=o.get(e))&&o.set(e,n=new Map),void 0===(e=n.get(t))&&n.set(t,e=new WeakMap),e};d.prototype.addEventListener=function(e,t,n){var o=this;if(null!=t){var r=(n=u(n)).capture;n=n.once;var i=w(this,e,r);if(!i.has(t)){var l=n?function(n){return i.delete(t),s.call(o,e,l,r),"function"==typeof t?t.call(o,n):"function"==typeof(null==t?void 0:t.handleEvent)?t.handleEvent(n):void 0}:null;i.set(t,l),v.call(this,e,null!=l?l:t,r)}}},d.prototype.removeEventListener=function(e,t,n){if(null!=t){n=u(n).capture;var o=w(this,e,n),r=o.get(t);void 0!==r&&(o.delete(t),s.call(this,e,null!=r?r:t,n))}}}Object.getOwnPropertyDescriptor(Node.prototype,"baseURI")||Object.defineProperty(Node.prototype,"baseURI",{get:function(){var e=(this.ownerDocument||this).querySelector("base[href]");return e&&e.href||window.location.href},configurable:!0,enumerable:!0});var b,m,g=Element.prototype,E=null!==(b=Object.getOwnPropertyDescriptor(g,"attributes"))&&void 0!==b?b:Object.getOwnPropertyDescriptor(Node.prototype,"attributes"),N=null!==(m=null==E?void 0:E.get)&&void 0!==m?m:function(){return this.attributes},P=Array.prototype.map;g.hasOwnProperty("getAttributeNames")||(g.getAttributeNames=function(){return P.call(N.call(this),(function(e){return e.name}))});var j,x=Element.prototype;x.hasOwnProperty("matches")||(x.matches=null!==(j=x.webkitMatchesSelector)&&void 0!==j?j:x.msMatchesSelector);var C=Node.prototype.appendChild;function D(e){(e=e.prototype).hasOwnProperty("append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(n=(t=h(t)).next();!n.done;n=t.next())n=n.value,C.call(this,"string"==typeof n?document.createTextNode(n):n)}})}D(Document),D(DocumentFragment),D(Element);var M,L,T=Node.prototype.insertBefore,A=null!==(L=null===(M=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))||void 0===M?void 0:M.get)&&void 0!==L?L:function(){return this.firstChild};function G(e){(e=e.prototype).hasOwnProperty("prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];n=A.call(this);for(var o=(t=h(t)).next();!o.done;o=t.next())o=o.value,T.call(this,"string"==typeof o?document.createTextNode(o):o,n)}})}G(Document),G(DocumentFragment),G(Element);var S,k,W=Node.prototype.appendChild,B=Node.prototype.removeChild,K=null!==(k=null===(S=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))||void 0===S?void 0:S.get)&&void 0!==k?k:function(){return this.firstChild};function J(e){(e=e.prototype).hasOwnProperty("replaceChildren")||Object.defineProperty(e,"replaceChildren",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(;null!==(n=K.call(this));)B.call(this,n);for(n=(t=h(t)).next();!n.done;n=t.next())n=n.value,W.call(this,"string"==typeof n?document.createTextNode(n):n)}})}J(Document),J(DocumentFragment),J(Element);var F,I,U,X,q=Node.prototype.insertBefore,H=null!==(I=null===(F=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===F?void 0:F.get)&&void 0!==I?I:function(){return this.parentNode},z=null!==(X=null===(U=Object.getOwnPropertyDescriptor(Node.prototype,"nextSibling"))||void 0===U?void 0:U.get)&&void 0!==X?X:function(){return this.nextSibling};function O(e){(e=e.prototype).hasOwnProperty("after")||Object.defineProperty(e,"after",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=H.call(this)))for(var o=z.call(this),r=(t=h(t)).next();!r.done;r=t.next())r=r.value,q.call(n,"string"==typeof r?document.createTextNode(r):r,o)}})}O(CharacterData),O(Element);var Q,Z,$=Node.prototype.insertBefore,_=null!==(Z=null===(Q=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===Q?void 0:Q.get)&&void 0!==Z?Z:function(){return this.parentNode};function R(e){(e=e.prototype).hasOwnProperty("before")||Object.defineProperty(e,"before",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=_.call(this)))for(var o=(t=h(t)).next();!o.done;o=t.next())o=o.value,$.call(n,"string"==typeof o?document.createTextNode(o):o,this)}})}R(CharacterData),R(Element);var ee,te,ne=Node.prototype.removeChild,oe=null!==(te=null===(ee=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===ee?void 0:ee.get)&&void 0!==te?te:function(){return this.parentNode};function V(e){(e=e.prototype).hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=oe.call(this);e&&ne.call(e,this)}})}V(CharacterData),V(Element);var re,ie,ae=Node.prototype.insertBefore,le=Node.prototype.removeChild,ce=null!==(ie=null===(re=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===re?void 0:re.get)&&void 0!==ie?ie:function(){return this.parentNode};function Y(e){(e=e.prototype).hasOwnProperty("replaceWith")||Object.defineProperty(e,"replaceWith",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=ce.call(this))){for(var o=(t=h(t)).next();!o.done;o=t.next())o=o.value,ae.call(n,"string"==typeof o?document.createTextNode(o):o,this);le.call(n,this)}}})}Y(CharacterData),Y(Element);var pe=window.Element.prototype,ue=window.HTMLElement.prototype,de=window.SVGElement.prototype;!ue.hasOwnProperty("classList")||pe.hasOwnProperty("classList")||de.hasOwnProperty("classList")||Object.defineProperty(pe,"classList",Object.getOwnPropertyDescriptor(ue,"classList"));var ve=Element.prototype,se=Element.prototype.hasAttribute,fe=Element.prototype.setAttribute,ye=Element.prototype.removeAttribute;ve.hasOwnProperty("toggleAttribute")||(ve.toggleAttribute=function(e,t){return void 0===t?se.call(this,e)?(ye.call(this,e),!1):(fe.call(this,e,""),!0):t?(se.call(this,e)||fe.call(this,e,""),!0):(ye.call(this,e),!1)})}).call(this);