mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
1 line
37 KiB
JavaScript
1 line
37 KiB
JavaScript
(function(window,document){var version="3.7.3";var options=window.html5||{};var reSkip=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;var saveClones=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;var supportsHtml5Styles;var expando="_html5shiv";var expanID=0;var expandoData={};var supportsUnknownElements;(function(){try{var a=document.createElement("a");a.innerHTML="<xyz></xyz>";supportsHtml5Styles="hidden"in a;supportsUnknownElements=a.childNodes.length==1||function(){document.createElement("a");var frag=document.createDocumentFragment();return typeof frag.cloneNode=="undefined"||typeof frag.createDocumentFragment=="undefined"||typeof frag.createElement=="undefined"}()}catch(e){supportsHtml5Styles=true;supportsUnknownElements=true}})();function addStyleSheet(ownerDocument,cssText){var p=ownerDocument.createElement("p"),parent=ownerDocument.getElementsByTagName("head")[0]||ownerDocument.documentElement;p.innerHTML="x<style>"+cssText+"</style>";return parent.insertBefore(p.lastChild,parent.firstChild)}function getElements(){var elements=html5.elements;return typeof elements=="string"?elements.split(" "):elements}function addElements(newElements,ownerDocument){var elements=html5.elements;if(typeof elements!="string"){elements=elements.join(" ")}if(typeof newElements!="string"){newElements=newElements.join(" ")}html5.elements=elements+" "+newElements;shivDocument(ownerDocument)}function getExpandoData(ownerDocument){var data=expandoData[ownerDocument[expando]];if(!data){data={};expanID++;ownerDocument[expando]=expanID;expandoData[expanID]=data}return data}function createElement(nodeName,ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createElement(nodeName)}if(!data){data=getExpandoData(ownerDocument)}var node;if(data.cache[nodeName]){node=data.cache[nodeName].cloneNode()}else if(saveClones.test(nodeName)){node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode()}else{node=data.createElem(nodeName)}return node.canHaveChildren&&!reSkip.test(nodeName)&&!node.tagUrn?data.frag.appendChild(node):node}function createDocumentFragment(ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createDocumentFragment()}data=data||getExpandoData(ownerDocument);var clone=data.frag.cloneNode(),i=0,elems=getElements(),l=elems.length;for(;i<l;i++){clone.createElement(elems[i])}return clone}function shivMethods(ownerDocument,data){if(!data.cache){data.cache={};data.createElem=ownerDocument.createElement;data.createFrag=ownerDocument.createDocumentFragment;data.frag=data.createFrag()}ownerDocument.createElement=function(nodeName){if(!html5.shivMethods){return data.createElem(nodeName)}return createElement(nodeName,ownerDocument,data)};ownerDocument.createDocumentFragment=Function("h,f","return function(){"+"var n=f.cloneNode(),c=n.createElement;"+"h.shivMethods&&("+getElements().join().replace(/[\w\-:]+/g,(function(nodeName){data.createElem(nodeName);data.frag.createElement(nodeName);return'c("'+nodeName+'")'}))+");return n}")(html5,data.frag)}function shivDocument(ownerDocument){if(!ownerDocument){ownerDocument=document}var data=getExpandoData(ownerDocument);if(html5.shivCSS&&!supportsHtml5Styles&&!data.hasCSS){data.hasCSS=!!addStyleSheet(ownerDocument,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}"+"mark{background:#FF0;color:#000}"+"template{display:none}")}if(!supportsUnknownElements){shivMethods(ownerDocument,data)}return ownerDocument}var html5={elements:options.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:version,shivCSS:options.shivCSS!==false,supportsUnknownElements:supportsUnknownElements,shivMethods:options.shivMethods!==false,type:"default",shivDocument:shivDocument,createElement:createElement,createDocumentFragment:createDocumentFragment,addElements:addElements};window.html5=html5;shivDocument(document);if(typeof module=="object"&&module.exports){module.exports=html5}})(window,document);(function(window){if(document.createEvent)return;var DUNNOABOUTDOMLOADED=true,READYEVENTDISPATCHED=false,ONREADYSTATECHANGE="onreadystatechange",DOMCONTENTLOADED="DOMContentLoaded",SECRET="__IE8__"+Math.random(),defineProperty=Object.defineProperty||function(object,property,descriptor){object[property]=descriptor.value},defineProperties=Object.defineProperties||function(object,descriptors){for(var key in descriptors){if(hasOwnProperty.call(descriptors,key)){try{defineProperty(object,key,descriptors[key])}catch(o_O){if(window.console){console.log(key+" failed on object:",object,o_O.message)}}}}},getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,hasOwnProperty=Object.prototype.hasOwnProperty,ElementPrototype=window.Element.prototype,TextPrototype=window.Text.prototype,possiblyNativeEvent=/^[a-z]+$/,readyStateOK=/loaded|complete/,types={},div=document.createElement("div"),html=document.documentElement,removeAttribute=html.removeAttribute,setAttribute=html.setAttribute,valueDesc=function(value){return{enumerable:true,writable:true,configurable:true,value:value}};function commonEventLoop(currentTarget,e,$handlers,synthetic){for(var handler,continuePropagation,handlers=$handlers.slice(),evt=enrich(e,currentTarget),i=0,length=handlers.length;i<length;i++){handler=handlers[i];if(typeof handler==="object"){if(typeof handler.handleEvent==="function"){handler.handleEvent(evt)}}else{handler.call(currentTarget,evt)}if(evt.stoppedImmediatePropagation)break}continuePropagation=!evt.stoppedPropagation;return synthetic&&continuePropagation&¤tTarget.parentNode?currentTarget.parentNode.dispatchEvent(evt):!evt.defaultPrevented}function commonDescriptor(get,set){return{configurable:true,get:get,set:set}}function commonTextContent(protoDest,protoSource,property){var descriptor=getOwnPropertyDescriptor(protoSource||protoDest,property);defineProperty(protoDest,"textContent",commonDescriptor((function(){return descriptor.get.call(this)}),(function(textContent){descriptor.set.call(this,textContent)})))}function enrich(e,currentTarget){e.currentTarget=currentTarget;e.eventPhase=e.target===e.currentTarget?2:3;return e}function find(array,value){var i=array.length;while(i--&&array[i]!==value);return i}function getTextContent(){if(this.tagName==="BR")return"\n";var textNode=this.firstChild,arrayContent=[];while(textNode){if(textNode.nodeType!==8&&textNode.nodeType!==7){arrayContent.push(textNode.textContent)}textNode=textNode.nextSibling}return arrayContent.join("")}function live(self){return self.nodeType!==9&&html.contains(self)}function onkeyup(e){var evt=document.createEvent("Event");evt.initEvent("input",true,true);(e.srcElement||e.fromElement||document).dispatchEvent(evt)}function onReadyState(e){if(!READYEVENTDISPATCHED&&readyStateOK.test(document.readyState)){READYEVENTDISPATCHED=!READYEVENTDISPATCHED;document.detachEvent(ONREADYSTATECHANGE,onReadyState);e=document.createEvent("Event");e.initEvent(DOMCONTENTLOADED,true,true);document.dispatchEvent(e)}}function getter(attr){return function(){return html[attr]||document.body&&document.body[attr]||0}}function setTextContent(textContent){var node;while(node=this.lastChild){this.removeChild(node)}if(textContent!=null){this.appendChild(document.createTextNode(textContent))}}function verify(self,e){if(!e){e=window.event}if(!e.target){e.target=e.srcElement||e.fromElement||document}if(!e.timeStamp){e.timeStamp=(new Date).getTime()}return e}commonTextContent(window.HTMLCommentElement.prototype,ElementPrototype,"nodeValue");commonTextContent(window.HTMLScriptElement.prototype,null,"text");commonTextContent(TextPrototype,null,"nodeValue");commonTextContent(window.HTMLTitleElement.prototype,null,"text");defineProperty(window.HTMLStyleElement.prototype,"textContent",function(descriptor){return commonDescriptor((function(){return descriptor.get.call(this.styleSheet)}),(function(textContent){descriptor.set.call(this.styleSheet,textContent)}))}(getOwnPropertyDescriptor(window.CSSStyleSheet.prototype,"cssText")));var opacityre=/\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;defineProperty(window.CSSStyleDeclaration.prototype,"opacity",{get:function(){var m=this.filter.match(opacityre);return m?(m[1]/100).toString():""},set:function(value){this.zoom=1;var found=false;if(value<1){value=" alpha(opacity="+Math.round(value*100)+")"}else{value=""}this.filter=this.filter.replace(opacityre,(function(){found=true;return value}));if(!found&&value){this.filter+=value}}});defineProperties(ElementPrototype,{textContent:{get:getTextContent,set:setTextContent},firstElementChild:{get:function(){for(var childNodes=this.childNodes||[],i=0,length=childNodes.length;i<length;i++){if(childNodes[i].nodeType==1)return childNodes[i]}}},lastElementChild:{get:function(){for(var childNodes=this.childNodes||[],i=childNodes.length;i--;){if(childNodes[i].nodeType==1)return childNodes[i]}}},oninput:{get:function(){return this._oninput||null},set:function(oninput){if(this._oninput){this.removeEventListener("input",this._oninput);this._oninput=oninput;if(oninput){this.addEventListener("input",oninput)}}}},previousElementSibling:{get:function(){var previousElementSibling=this.previousSibling;while(previousElementSibling&&previousElementSibling.nodeType!=1){previousElementSibling=previousElementSibling.previousSibling}return previousElementSibling}},nextElementSibling:{get:function(){var nextElementSibling=this.nextSibling;while(nextElementSibling&&nextElementSibling.nodeType!=1){nextElementSibling=nextElementSibling.nextSibling}return nextElementSibling}},childElementCount:{get:function(){for(var count=0,childNodes=this.childNodes||[],i=childNodes.length;i--;count+=childNodes[i].nodeType==1);return count}},addEventListener:valueDesc((function(type,handler,capture){if(typeof handler!=="function"&&typeof handler!=="object")return;var self=this,ontype="on"+type,temple=self[SECRET]||defineProperty(self,SECRET,{value:{}})[SECRET],currentType=temple[ontype]||(temple[ontype]={}),handlers=currentType.h||(currentType.h=[]),e,attr;if(!hasOwnProperty.call(currentType,"w")){currentType.w=function(e){return e[SECRET]||commonEventLoop(self,verify(self,e),handlers,false)};if(!hasOwnProperty.call(types,ontype)){if(possiblyNativeEvent.test(type)){try{e=document.createEventObject();e[SECRET]=true;if(self.nodeType!=9){if(self.parentNode==null){div.appendChild(self)}if(attr=self.getAttribute(ontype)){removeAttribute.call(self,ontype)}}self.fireEvent(ontype,e);types[ontype]=true}catch(meh){types[ontype]=false;while(div.hasChildNodes()){div.removeChild(div.firstChild)}}if(attr!=null){setAttribute.call(self,ontype,attr)}}else{types[ontype]=false}}if(currentType.n=types[ontype]){self.attachEvent(ontype,currentType.w)}}if(find(handlers,handler)<0){handlers[capture?"unshift":"push"](handler)}if(type==="input"){self.attachEvent("onkeyup",onkeyup)}})),dispatchEvent:valueDesc((function(e){var self=this,ontype="on"+e.type,temple=self[SECRET],currentType=temple&&temple[ontype],valid=!!currentType,parentNode;if(!e.target)e.target=self;return valid?currentType.n?self.fireEvent(ontype,e):commonEventLoop(self,e,currentType.h,true):(parentNode=self.parentNode)?parentNode.dispatchEvent(e):true,!e.defaultPrevented})),removeEventListener:valueDesc((function(type,handler,capture){if(typeof handler!=="function"&&typeof handler!=="object")return;var self=this,ontype="on"+type,temple=self[SECRET],currentType=temple&&temple[ontype],handlers=currentType&¤tType.h,i=handlers?find(handlers,handler):-1;if(-1<i)handlers.splice(i,1)}))});defineProperties(TextPrototype,{addEventListener:valueDesc(ElementPrototype.addEventListener),dispatchEvent:valueDesc(ElementPrototype.dispatchEvent),removeEventListener:valueDesc(ElementPrototype.removeEventListener)});defineProperties(window.XMLHttpRequest.prototype,{addEventListener:valueDesc((function(type,handler,capture){var self=this,ontype="on"+type,temple=self[SECRET]||defineProperty(self,SECRET,{value:{}})[SECRET],currentType=temple[ontype]||(temple[ontype]={}),handlers=currentType.h||(currentType.h=[]);if(find(handlers,handler)<0){if(!self[ontype]){self[ontype]=function(){var e=document.createEvent("Event");e.initEvent(type,true,true);self.dispatchEvent(e)}}handlers[capture?"unshift":"push"](handler)}})),dispatchEvent:valueDesc((function(e){var self=this,ontype="on"+e.type,temple=self[SECRET],currentType=temple&&temple[ontype],valid=!!currentType;return valid&&(currentType.n?self.fireEvent(ontype,e):commonEventLoop(self,e,currentType.h,true))})),removeEventListener:valueDesc(ElementPrototype.removeEventListener)});var buttonGetter=getOwnPropertyDescriptor(Event.prototype,"button").get;defineProperties(window.Event.prototype,{bubbles:valueDesc(true),cancelable:valueDesc(true),preventDefault:valueDesc((function(){if(this.cancelable){this.returnValue=false}})),stopPropagation:valueDesc((function(){this.stoppedPropagation=true;this.cancelBubble=true})),stopImmediatePropagation:valueDesc((function(){this.stoppedImmediatePropagation=true;this.stopPropagation()})),initEvent:valueDesc((function(type,bubbles,cancelable){this.type=type;this.bubbles=!!bubbles;this.cancelable=!!cancelable;if(!this.bubbles){this.stopPropagation()}})),pageX:{get:function(){return this._pageX||(this._pageX=this.clientX+window.scrollX-(html.clientLeft||0))}},pageY:{get:function(){return this._pageY||(this._pageY=this.clientY+window.scrollY-(html.clientTop||0))}},which:{get:function(){return this.keyCode?this.keyCode:isNaN(this.button)?undefined:this.button+1}},charCode:{get:function(){return this.keyCode&&this.type=="keypress"?this.keyCode:0}},buttons:{get:function(){return buttonGetter.call(this)}},button:{get:function(){var buttons=this.buttons;return buttons&1?0:buttons&2?2:buttons&4?1:undefined}},defaultPrevented:{get:function(){var returnValue=this.returnValue,undef;return!(returnValue===undef||returnValue)}},relatedTarget:{get:function(){var type=this.type;if(type==="mouseover"){return this.fromElement}else if(type==="mouseout"){return this.toElement}else{return null}}}});defineProperties(window.HTMLDocument.prototype,{defaultView:{get:function(){return this.parentWindow}},textContent:{get:function(){return this.nodeType===11?getTextContent.call(this):null},set:function(textContent){if(this.nodeType===11){setTextContent.call(this,textContent)}}},addEventListener:valueDesc((function(type,handler,capture){var self=this;ElementPrototype.addEventListener.call(self,type,handler,capture);if(DUNNOABOUTDOMLOADED&&type===DOMCONTENTLOADED&&!readyStateOK.test(self.readyState)){DUNNOABOUTDOMLOADED=false;self.attachEvent(ONREADYSTATECHANGE,onReadyState);if(window==top){(function gonna(e){try{self.documentElement.doScroll("left");onReadyState()}catch(o_O){setTimeout(gonna,50)}})()}}})),dispatchEvent:valueDesc(ElementPrototype.dispatchEvent),removeEventListener:valueDesc(ElementPrototype.removeEventListener),createEvent:valueDesc((function(Class){var e;if(Class!=="Event")throw new Error("unsupported "+Class);e=document.createEventObject();e.timeStamp=(new Date).getTime();return e}))});defineProperties(window.Window.prototype,{getComputedStyle:valueDesc(function(){var notpixel=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,position=/^(top|right|bottom|left)$/,re=/\-([a-z])/g,place=function(match,$1){return $1.toUpperCase()};function ComputedStyle(_){this._=_}ComputedStyle.prototype.getPropertyValue=function(name){var el=this._,style=el.style,currentStyle=el.currentStyle,runtimeStyle=el.runtimeStyle,result,left,rtLeft;if(name=="opacity"){return style.opacity||"1"}name=(name==="float"?"style-float":name).replace(re,place);result=currentStyle?currentStyle[name]:style[name];if(notpixel.test(result)&&!position.test(name)){left=style.left;rtLeft=runtimeStyle&&runtimeStyle.left;if(rtLeft){runtimeStyle.left=currentStyle.left}style.left=name==="fontSize"?"1em":result;result=style.pixelLeft+"px";style.left=left;if(rtLeft){runtimeStyle.left=rtLeft}}return result==null?result:result+""||"auto"};function PseudoComputedStyle(){}PseudoComputedStyle.prototype.getPropertyValue=function(){return null};return function(el,pseudo){return pseudo?new PseudoComputedStyle(el):new ComputedStyle(el)}}()),addEventListener:valueDesc((function(type,handler,capture){var self=window,ontype="on"+type,handlers;if(!self[ontype]){self[ontype]=function(e){return commonEventLoop(self,verify(self,e),handlers,false)&&undefined}}handlers=self[ontype][SECRET]||(self[ontype][SECRET]=[]);if(find(handlers,handler)<0){handlers[capture?"unshift":"push"](handler)}})),dispatchEvent:valueDesc((function(e){var method=window["on"+e.type];return method?method.call(window,e)!==false&&!e.defaultPrevented:true})),removeEventListener:valueDesc((function(type,handler,capture){var ontype="on"+type,handlers=(window[ontype]||Object)[SECRET],i=handlers?find(handlers,handler):-1;if(-1<i)handlers.splice(i,1)})),pageXOffset:{get:getter("scrollLeft")},pageYOffset:{get:getter("scrollTop")},scrollX:{get:getter("scrollLeft")},scrollY:{get:getter("scrollTop")},innerWidth:{get:getter("clientWidth")},innerHeight:{get:getter("clientHeight")}});window.HTMLElement=window.Element;(function(styleSheets,HTML5Element,i){for(i=0;i<HTML5Element.length;i++)document.createElement(HTML5Element[i]);if(!styleSheets.length)document.createStyleSheet("");styleSheets[0].addRule(HTML5Element.join(","),"display:block;")})(document.styleSheets,["header","nav","section","article","aside","footer"]);(function(){if(document.createRange)return;document.createRange=function createRange(){return new Range};function getContents(start,end){var nodes=[start];while(start!==end){nodes.push(start=start.nextSibling)}return nodes}function Range(){}var proto=Range.prototype;proto.cloneContents=function cloneContents(){for(var fragment=this._start.ownerDocument.createDocumentFragment(),nodes=getContents(this._start,this._end),i=0,length=nodes.length;i<length;i++){fragment.appendChild(nodes[i].cloneNode(true))}return fragment};proto.cloneRange=function cloneRange(){var range=new Range;range._start=this._start;range._end=this._end;return range};proto.deleteContents=function deleteContents(){for(var parentNode=this._start.parentNode,nodes=getContents(this._start,this._end),i=0,length=nodes.length;i<length;i++){parentNode.removeChild(nodes[i])}};proto.extractContents=function extractContents(){for(var fragment=this._start.ownerDocument.createDocumentFragment(),nodes=getContents(this._start,this._end),i=0,length=nodes.length;i<length;i++){fragment.appendChild(nodes[i])}return fragment};proto.setEndAfter=function setEndAfter(node){this._end=node};proto.setEndBefore=function setEndBefore(node){this._end=node.previousSibling};proto.setStartAfter=function setStartAfter(node){this._start=node.nextSibling};proto.setStartBefore=function setStartBefore(node){this._start=node}})()})(window);(function(window){"use strict";function createDocumentFragment(){return document.createDocumentFragment()}function createElement(nodeName){return document.createElement(nodeName)}function enoughArguments(length,name){if(!length)throw new Error("Failed to construct "+name+": 1 argument required, but only 0 present.")}function mutationMacro(nodes){if(nodes.length===1){return textNodeIfPrimitive(nodes[0])}for(var fragment=createDocumentFragment(),list=slice.call(nodes),i=0;i<nodes.length;i++){fragment.appendChild(textNodeIfPrimitive(list[i]))}return fragment}function textNodeIfPrimitive(node){return typeof node==="object"?node:document.createTextNode(node)}for(var head,property,TemporaryPrototype,TemporaryTokenList,wrapVerifyToken,document=window.document,hOP=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty||function(object,property,descriptor){if(hOP.call(descriptor,"value")){object[property]=descriptor.value}else{if(hOP.call(descriptor,"get"))object.__defineGetter__(property,descriptor.get);if(hOP.call(descriptor,"set"))object.__defineSetter__(property,descriptor.set)}return object},indexOf=[].indexOf||function indexOf(value){var length=this.length;while(length--){if(this[length]===value){break}}return length},verifyToken=function(token){if(!token){throw"SyntaxError"}else if(spaces.test(token)){throw"InvalidCharacterError"}return token},DOMTokenList=function(node){var noClassName=typeof node.className==="undefined",className=noClassName?node.getAttribute("class")||"":node.className,isSVG=noClassName||typeof className==="object",value=(isSVG?noClassName?className:className.baseVal:className).replace(trim,"");if(value.length){properties.push.apply(this,value.split(spaces))}this._isSVG=isSVG;this._=node},classListDescriptor={get:function get(){return new DOMTokenList(this)},set:function(){}},trim=/^\s+|\s+$/g,spaces=/\s+/,SPACE=" ",CLASS_LIST="classList",toggle=function toggle(token,force){if(this.contains(token)){if(!force){this.remove(token)}}else if(force===undefined||force){force=true;this.add(token)}return!!force},DocumentFragmentPrototype=window.DocumentFragment&&DocumentFragment.prototype,Node=window.Node,NodePrototype=(Node||Element).prototype,CharacterData=window.CharacterData||Node,CharacterDataPrototype=CharacterData&&CharacterData.prototype,DocumentType=window.DocumentType,DocumentTypePrototype=DocumentType&&DocumentType.prototype,ElementPrototype=(window.Element||Node||window.HTMLElement).prototype,HTMLSelectElement=window.HTMLSelectElement||createElement("select").constructor,selectRemove=HTMLSelectElement.prototype.remove,SVGElement=window.SVGElement,properties=["matches",ElementPrototype.matchesSelector||ElementPrototype.webkitMatchesSelector||ElementPrototype.khtmlMatchesSelector||ElementPrototype.mozMatchesSelector||ElementPrototype.msMatchesSelector||ElementPrototype.oMatchesSelector||function matches(selector){var parentNode=this.parentNode;return!!parentNode&&-1<indexOf.call(parentNode.querySelectorAll(selector),this)},"closest",function closest(selector){var parentNode=this,matches;while((matches=parentNode&&parentNode.matches)&&!parentNode.matches(selector)){parentNode=parentNode.parentNode}return matches?parentNode:null},"prepend",function prepend(){var firstChild=this.firstChild,node=mutationMacro(arguments);if(firstChild){this.insertBefore(node,firstChild)}else{this.appendChild(node)}},"append",function append(){this.appendChild(mutationMacro(arguments))},"before",function before(){var parentNode=this.parentNode;if(parentNode){parentNode.insertBefore(mutationMacro(arguments),this)}},"after",function after(){var parentNode=this.parentNode,nextSibling=this.nextSibling,node=mutationMacro(arguments);if(parentNode){if(nextSibling){parentNode.insertBefore(node,nextSibling)}else{parentNode.appendChild(node)}}},"toggleAttribute",function toggleAttribute(name,force){var had=this.hasAttribute(name);if(1<arguments.length){if(had&&!force)this.removeAttribute(name);else if(force&&!had)this.setAttribute(name,"")}else if(had)this.removeAttribute(name);else this.setAttribute(name,"");return this.hasAttribute(name)},"replace",function replace(){this.replaceWith.apply(this,arguments)},"replaceWith",function replaceWith(){var parentNode=this.parentNode;if(parentNode){parentNode.replaceChild(mutationMacro(arguments),this)}},"remove",function remove(){var parentNode=this.parentNode;if(parentNode){parentNode.removeChild(this)}}],slice=properties.slice,i=properties.length;i;i-=2){property=properties[i-2];if(!(property in ElementPrototype)){ElementPrototype[property]=properties[i-1]}if(property==="remove"&&!selectRemove._dom4){(HTMLSelectElement.prototype[property]=function(){return 0<arguments.length?selectRemove.apply(this,arguments):ElementPrototype.remove.call(this)})._dom4=true}if(/^(?:before|after|replace|replaceWith|remove)$/.test(property)){if(CharacterData&&!(property in CharacterDataPrototype)){CharacterDataPrototype[property]=properties[i-1]}if(DocumentType&&!(property in DocumentTypePrototype)){DocumentTypePrototype[property]=properties[i-1]}}if(/^(?:append|prepend)$/.test(property)){if(DocumentFragmentPrototype){if(!(property in DocumentFragmentPrototype)){DocumentFragmentPrototype[property]=properties[i-1]}}else{try{createDocumentFragment().constructor.prototype[property]=properties[i-1]}catch(o_O){}}}}if(!createElement("a").matches("a")){ElementPrototype[property]=function(matches){return function(selector){return matches.call(this.parentNode?this:createDocumentFragment().appendChild(this),selector)}}(ElementPrototype[property])}DOMTokenList.prototype={length:0,add:function add(){for(var j=0,token;j<arguments.length;j++){token=arguments[j];if(!this.contains(token)){properties.push.call(this,property)}}if(this._isSVG){this._.setAttribute("class",""+this)}else{this._.className=""+this}},contains:function(indexOf){return function contains(token){i=indexOf.call(this,property=verifyToken(token));return-1<i}}([].indexOf||function(token){i=this.length;while(i--&&this[i]!==token){}return i}),item:function item(i){return this[i]||null},remove:function remove(){for(var j=0,token;j<arguments.length;j++){token=arguments[j];if(this.contains(token)){properties.splice.call(this,i,1)}}if(this._isSVG){this._.setAttribute("class",""+this)}else{this._.className=""+this}},toggle:toggle,toString:function toString(){return properties.join.call(this,SPACE)}};if(SVGElement&&!(CLASS_LIST in SVGElement.prototype)){defineProperty(SVGElement.prototype,CLASS_LIST,classListDescriptor)}if(!(CLASS_LIST in document.documentElement)){defineProperty(ElementPrototype,CLASS_LIST,classListDescriptor)}else{TemporaryTokenList=createElement("div")[CLASS_LIST];TemporaryTokenList.add("a","b","a");if("a b"!=TemporaryTokenList){TemporaryPrototype=TemporaryTokenList.constructor.prototype;if(!("add"in TemporaryPrototype)){TemporaryPrototype=window.TemporaryTokenList.prototype}wrapVerifyToken=function(original){return function(){var i=0;while(i<arguments.length){original.call(this,arguments[i++])}}};TemporaryPrototype.add=wrapVerifyToken(TemporaryPrototype.add);TemporaryPrototype.remove=wrapVerifyToken(TemporaryPrototype.remove);TemporaryPrototype.toggle=toggle}}if(!("contains"in NodePrototype)){defineProperty(NodePrototype,"contains",{value:function(el){while(el&&el!==this)el=el.parentNode;return this===el}})}if(!("head"in document)){defineProperty(document,"head",{get:function(){return head||(head=document.getElementsByTagName("head")[0])}})}(function(){for(var raf,rAF=window.requestAnimationFrame,cAF=window.cancelAnimationFrame,prefixes=["o","ms","moz","webkit"],i=prefixes.length;!cAF&&i--;){rAF=rAF||window[prefixes[i]+"RequestAnimationFrame"];cAF=window[prefixes[i]+"CancelAnimationFrame"]||window[prefixes[i]+"CancelRequestAnimationFrame"]}if(!cAF){if(rAF){raf=rAF;rAF=function(callback){var goOn=true;raf((function(){if(goOn)callback.apply(this,arguments)}));return function(){goOn=false}};cAF=function(id){id()}}else{rAF=function(callback){return setTimeout(callback,15,15)};cAF=function(id){clearTimeout(id)}}}window.requestAnimationFrame=rAF;window.cancelAnimationFrame=cAF})();try{new window.CustomEvent("?")}catch(o_O){window.CustomEvent=function(eventName,defaultInitDict){function CustomEvent(type,eventInitDict){var event=document.createEvent(eventName);if(typeof type!="string"){throw new Error("An event name must be provided")}if(eventName=="Event"){event.initCustomEvent=initCustomEvent}if(eventInitDict==null){eventInitDict=defaultInitDict}event.initCustomEvent(type,eventInitDict.bubbles,eventInitDict.cancelable,eventInitDict.detail);return event}function initCustomEvent(type,bubbles,cancelable,detail){this.initEvent(type,bubbles,cancelable);this.detail=detail}return CustomEvent}(window.CustomEvent?"CustomEvent":"Event",{bubbles:false,cancelable:false,detail:null})}try{new Event("_")}catch(o_O){o_O=function($Event){function Event(type,init){enoughArguments(arguments.length,"Event");var out=document.createEvent("Event");if(!init)init={};out.initEvent(type,!!init.bubbles,!!init.cancelable);return out}Event.prototype=$Event.prototype;return Event}(window.Event||function Event(){});defineProperty(window,"Event",{value:o_O});if(Event!==o_O)Event=o_O}try{new KeyboardEvent("_",{})}catch(o_O){o_O=function($KeyboardEvent){var initType=0,defaults={char:"",key:"",location:0,ctrlKey:false,shiftKey:false,altKey:false,metaKey:false,altGraphKey:false,repeat:false,locale:navigator.language,detail:0,bubbles:false,cancelable:false,keyCode:0,charCode:0,which:0},eventType;try{var e=document.createEvent("KeyboardEvent");e.initKeyboardEvent("keyup",false,false,window,"+",3,true,false,true,false,false);initType=(e.keyIdentifier||e.key)=="+"&&(e.keyLocation||e.location)==3&&(e.ctrlKey?e.altKey?1:3:e.shiftKey?2:4)||9}catch(o_O){}eventType=0<initType?"KeyboardEvent":"Event";function getModifier(init){for(var out=[],keys=["ctrlKey","Control","shiftKey","Shift","altKey","Alt","metaKey","Meta","altGraphKey","AltGraph"],i=0;i<keys.length;i+=2){if(init[keys[i]])out.push(keys[i+1])}return out.join(" ")}function withDefaults(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!source.hasOwnProperty.call(target,key))target[key]=source[key]}return target}function withInitValues(key,out,init){try{out[key]=init[key]}catch(o_O){}}function KeyboardEvent(type,init){enoughArguments(arguments.length,"KeyboardEvent");init=withDefaults(init||{},defaults);var out=document.createEvent(eventType),ctrlKey=init.ctrlKey,shiftKey=init.shiftKey,altKey=init.altKey,metaKey=init.metaKey,altGraphKey=init.altGraphKey,modifiers=initType>3?getModifier(init):null,key=String(init.key),chr=String(init.char),location=init.location,keyCode=init.keyCode||(init.keyCode=key)&&key.charCodeAt(0)||0,charCode=init.charCode||(init.charCode=chr)&&chr.charCodeAt(0)||0,bubbles=init.bubbles,cancelable=init.cancelable,repeat=init.repeat,locale=init.locale,view=init.view||window,args;if(!init.which)init.which=init.keyCode;if("initKeyEvent"in out){out.initKeyEvent(type,bubbles,cancelable,view,ctrlKey,altKey,shiftKey,metaKey,keyCode,charCode)}else if(0<initType&&"initKeyboardEvent"in out){args=[type,bubbles,cancelable,view];switch(initType){case 1:args.push(key,location,ctrlKey,shiftKey,altKey,metaKey,altGraphKey);break;case 2:args.push(ctrlKey,altKey,shiftKey,metaKey,keyCode,charCode);break;case 3:args.push(key,location,ctrlKey,altKey,shiftKey,metaKey,altGraphKey);break;case 4:args.push(key,location,modifiers,repeat,locale);break;default:args.push(char,key,location,modifiers,repeat,locale)}out.initKeyboardEvent.apply(out,args)}else{out.initEvent(type,bubbles,cancelable)}for(key in out){if(defaults.hasOwnProperty(key)&&out[key]!==init[key]){withInitValues(key,out,init)}}return out}KeyboardEvent.prototype=$KeyboardEvent.prototype;return KeyboardEvent}(window.KeyboardEvent||function KeyboardEvent(){});defineProperty(window,"KeyboardEvent",{value:o_O});if(KeyboardEvent!==o_O)KeyboardEvent=o_O}try{new MouseEvent("_",{})}catch(o_O){o_O=function($MouseEvent){function MouseEvent(type,init){enoughArguments(arguments.length,"MouseEvent");var out=document.createEvent("MouseEvent");if(!init)init={};out.initMouseEvent(type,!!init.bubbles,!!init.cancelable,init.view||window,init.detail||1,init.screenX||0,init.screenY||0,init.clientX||0,init.clientY||0,!!init.ctrlKey,!!init.altKey,!!init.shiftKey,!!init.metaKey,init.button||0,init.relatedTarget||null);return out}MouseEvent.prototype=$MouseEvent.prototype;return MouseEvent}(window.MouseEvent||function MouseEvent(){});defineProperty(window,"MouseEvent",{value:o_O});if(MouseEvent!==o_O)MouseEvent=o_O}if(!document.querySelectorAll("*").forEach){(function(){function patch(what){var querySelectorAll=what.querySelectorAll;what.querySelectorAll=function qSA(css){var result=querySelectorAll.call(this,css);result.forEach=Array.prototype.forEach;return result}}patch(document);patch(Element.prototype)})()}try{document.querySelector(":scope *")}catch(o_O){(function(){var dataScope="data-scope-"+(Math.random()*1e9>>>0);var proto=Element.prototype;var querySelector=proto.querySelector;var querySelectorAll=proto.querySelectorAll;proto.querySelector=function qS(css){return find(this,querySelector,css)};proto.querySelectorAll=function qSA(css){return find(this,querySelectorAll,css)};function find(node,method,css){node.setAttribute(dataScope,null);var result=method.call(node,String(css).replace(/(^|,\s*)(:scope([ >]|$))/g,(function($0,$1,$2,$3){return $1+"["+dataScope+"]"+($3||" ")})));node.removeAttribute(dataScope);return result}})()}})(window);(function(global){"use strict";var DOMMap=global.WeakMap||function(){var counter=0,dispatched=false,drop=false,value;function dispatch(key,ce,shouldDrop){drop=shouldDrop;dispatched=false;value=undefined;key.dispatchEvent(ce)}function Handler(value){this.value=value}Handler.prototype.handleEvent=function handleEvent(e){dispatched=true;if(drop){e.currentTarget.removeEventListener(e.type,this,false)}else{value=this.value}};function DOMMap(){counter++;this.__ce__=new Event("@DOMMap:"+counter+Math.random())}DOMMap.prototype={constructor:DOMMap,"delete":function del(key){return dispatch(key,this.__ce__,true),dispatched},get:function get(key){dispatch(key,this.__ce__,false);var v=value;value=undefined;return v},has:function has(key){return dispatch(key,this.__ce__,false),dispatched},set:function set(key,value){dispatch(key,this.__ce__,true);key.addEventListener(this.__ce__.type,new Handler(value),false);return this}};return DOMMap}();function Dict(){}Dict.prototype=(Object.create||Object)(null);function createEventListener(type,callback,options){function eventListener(e){if(eventListener.once){e.currentTarget.removeEventListener(e.type,callback,eventListener);eventListener.removed=true}if(eventListener.passive){e.preventDefault=createEventListener.preventDefault}if(typeof eventListener.callback==="function"){eventListener.callback.call(this,e)}else if(eventListener.callback){eventListener.callback.handleEvent(e)}if(eventListener.passive){delete e.preventDefault}}eventListener.type=type;eventListener.callback=callback;eventListener.capture=!!options.capture;eventListener.passive=!!options.passive;eventListener.once=!!options.once;eventListener.removed=false;return eventListener}createEventListener.preventDefault=function preventDefault(){};var Event=global.CustomEvent,dE=global.dispatchEvent,aEL=global.addEventListener,rEL=global.removeEventListener,counter=0,increment=function(){counter++},indexOf=[].indexOf||function indexOf(value){var length=this.length;while(length--){if(this[length]===value){break}}return length},getListenerKey=function(options){return"".concat(options.capture?"1":"0",options.passive?"1":"0",options.once?"1":"0")},augment;try{aEL("_",increment,{once:true});dE(new Event("_"));dE(new Event("_"));rEL("_",increment,{once:true})}catch(o_O){}if(counter!==1){(function(){var dm=new DOMMap;function createAEL(aEL){return function addEventListener(type,handler,options){if(options&&typeof options!=="boolean"){var info=dm.get(this),key=getListenerKey(options),i,tmp,wrap;if(!info)dm.set(this,info=new Dict);if(!(type in info))info[type]={handler:[],wrap:[]};tmp=info[type];i=indexOf.call(tmp.handler,handler);if(i<0){i=tmp.handler.push(handler)-1;tmp.wrap[i]=wrap=new Dict}else{wrap=tmp.wrap[i]}if(!(key in wrap)){wrap[key]=createEventListener(type,handler,options);aEL.call(this,type,wrap[key],wrap[key].capture)}}else{aEL.call(this,type,handler,options)}}}function createREL(rEL){return function removeEventListener(type,handler,options){if(options&&typeof options!=="boolean"){var info=dm.get(this),key,i,tmp,wrap;if(info&&type in info){tmp=info[type];i=indexOf.call(tmp.handler,handler);if(-1<i){key=getListenerKey(options);wrap=tmp.wrap[i];if(key in wrap){rEL.call(this,type,wrap[key],wrap[key].capture);delete wrap[key];for(key in wrap)return;tmp.handler.splice(i,1);tmp.wrap.splice(i,1);if(tmp.handler.length===0)delete info[type]}}}}else{rEL.call(this,type,handler,options)}}}augment=function(Constructor){if(!Constructor)return;var proto=Constructor.prototype;proto.addEventListener=createAEL(proto.addEventListener);proto.removeEventListener=createREL(proto.removeEventListener)};if(global.EventTarget){augment(EventTarget)}else{augment(global.Text);augment(global.Element||global.HTMLElement);augment(global.HTMLDocument);augment(global.Window||{prototype:global});augment(global.XMLHttpRequest)}})()}})(window);(function(Proto){"use strict";if(typeof Proto.setAttribute!=="undefined"){function toAttr(prop){return prop.replace(/-[a-z]/g,(function(bit){return bit[1].toUpperCase()}))}Proto.setProperty=function(prop,value){var attr=toAttr(prop);if(!value){return this.removeAttribute(attr)}var str=String(value);return this.setAttribute(attr,str)};Proto.getPropertyValue=function(prop){var attr=toAttr(prop);return this.getAttribute(attr)||null};Proto.removeProperty=function(prop){var attr=toAttr(prop);var value=this.getAttribute(attr);this.removeAttribute(attr);return value}}})(CSSStyleDeclaration.prototype);(function(){"use strict";if(!Function.prototype.bind)(function(){var slice=Array.prototype.slice;Function.prototype.bind=function(){var thatFunc=this,thatArg=arguments[0];var args=slice.call(arguments,1);if(typeof thatFunc!=="function"){throw new TypeError("Function.prototype.bind - "+"what is trying to be bound is not callable")}return function(){var funcArgs=args.concat(slice.call(arguments));return thatFunc.apply(thatArg,funcArgs)}}})();if(!Array.prototype["forEach"]){Array.prototype.forEach=function(callback,thisArg){if(this==null){throw new TypeError("Array.prototype.forEach called on null or undefined")}var T,k;var O=Object(this);var len=O.length>>>0;if(typeof callback!=="function"){throw new TypeError(callback+" is not a function")}if(arguments.length>1){T=thisArg}k=0;while(k<len){var kValue;if(k in O){kValue=O[k];callback.call(T,kValue,k,O)}k++}}}if(!window.Int32Array){window.Int32Array=Array}})(); |