forked from inexorabletash/polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.min.js
2 lines (2 loc) · 39 KB
/
web.min.js
1
2
!function(e){"window"in e&&"document"in e&&(document.head=document.head||document.getElementsByTagName("head")[0],["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"].forEach(function(e){document.createElement(e)}),!("dataset"in document.createElement("span"))&&"Element"in e&&Element.prototype&&Object.defineProperty&&Object.defineProperty(Element.prototype,"dataset",{get:function(){for(var e=Object.create(null),t=0;t<this.attributes.length;++t){var r=this.attributes[t];r.specified&&"data-"===r.name.substring(0,5)&&!function(t,r){var n=r.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});e[n]=t.getAttribute("data-"+r),Object.defineProperty(e,n,{get:function(){return t.getAttribute("data-"+r)},set:function(e){t.setAttribute("data-"+r,e)}})}(this,r.name.substring(5))}return e}}),function(){function t(e){e=String(e);var t,r=0,i=[],o=0,s=0;if(e=e.replace(/\s/g,""),e.length%4===0&&(e=e.replace(/=+$/,"")),e.length%4===1)throw Error("InvalidCharacterError");if(/[^+\/0-9A-Za-z]/.test(e))throw Error("InvalidCharacterError");for(;r<e.length;)t=n.indexOf(e.charAt(r)),o=o<<6|t,s+=6,24===s&&(i.push(String.fromCharCode(o>>16&255)),i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o)),s=0,o=0),r+=1;return 12===s?(o>>=4,i.push(String.fromCharCode(255&o))):18===s&&(o>>=2,i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o))),i.join("")}function r(e){e=String(e);var t,r,i,o,s,a,u,c=0,l=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;c<e.length;)t=e.charCodeAt(c++),r=e.charCodeAt(c++),i=e.charCodeAt(c++),o=t>>2,s=(3&t)<<4|r>>4,a=(15&r)<<2|i>>6,u=63&i,c===e.length+2?(a=64,u=64):c===e.length+1&&(u=64),l.push(n.charAt(o),n.charAt(s),n.charAt(a),n.charAt(u));return l.join("")}if(!("atob"in e&&"btoa"in e)){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.atob=t,e.btoa=r}}(),function(){function t(e){return e.offsetWidth>0&&e.offsetHeight>0}function r(){var e=s;s=Object.create(null),u=-1,Object.keys(e).forEach(function(r){var n=e[r];n.element&&!t(n.element)||n.callback(Date.now())})}function n(t,n){var i=++a;return s[i]={callback:t,element:n},-1===u&&(u=e.setTimeout(r,1e3/o)),i}function i(t){delete s[t],0===Object.keys(s).length&&(e.clearTimeout(u),u=-1)}if(!("requestAnimationFrame"in e)){var o=60,s=Object.create(null),a=0,u=-1;e.requestAnimationFrame=n,e.cancelAnimationFrame=i}}())}(self),function(e){function t(e,t){Object.keys(t).forEach(function(r){r in e||r in e.prototype||Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(t,r))})}function r(e){var t=null;return e=e.map(function(e){return e instanceof Node?e:document.createTextNode(e)}),1===e.length?t=e[0]:(t=document.createDocumentFragment(),e.forEach(function(e){t.appendChild(e)})),t}if("window"in e&&"document"in e){document.querySelectorAll||(document.querySelectorAll=function(e){var t,r=document.createElement("style"),n=[];for(document.documentElement.firstChild.appendChild(r),document._qsa=[],r.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),r.parentNode.removeChild(r);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),n.push(t);return document._qsa=null,n}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),document.querySelectorAll(e)}),e.Node=e.Node||function(){throw TypeError("Illegal constructor")},Node.ELEMENT_NODE=1,Node.ATTRIBUTE_NODE=2,Node.TEXT_NODE=3,Node.CDATA_SECTION_NODE=4,Node.ENTITY_REFERENCE_NODE=5,Node.ENTITY_NODE=6,Node.PROCESSING_INSTRUCTION_NODE=7,Node.COMMENT_NODE=8,Node.DOCUMENT_NODE=9,Node.DOCUMENT_TYPE_NODE=10,Node.DOCUMENT_FRAGMENT_NODE=11,Node.NOTATION_NODE=12,e.DOMException=e.DOMException||function(){throw TypeError("Illegal constructor")},DOMException.INDEX_SIZE_ERR=1,DOMException.DOMSTRING_SIZE_ERR=2,DOMException.HIERARCHY_REQUEST_ERR=3,DOMException.WRONG_DOCUMENT_ERR=4,DOMException.INVALID_CHARACTER_ERR=5,DOMException.NO_DATA_ALLOWED_ERR=6,DOMException.NO_MODIFICATION_ALLOWED_ERR=7,DOMException.NOT_FOUND_ERR=8,DOMException.NOT_SUPPORTED_ERR=9,DOMException.INUSE_ATTRIBUTE_ERR=10,DOMException.INVALID_STATE_ERR=11,DOMException.SYNTAX_ERR=12,DOMException.INVALID_MODIFICATION_ERR=13,DOMException.NAMESPACE_ERR=14,DOMException.INVALID_ACCESS_ERR=15,function(){function t(e,t,r){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var n=this,i=function(e){e._timeStamp=Date.now(),e._currentTarget=n,t.call(this,e),e._currentTarget=null};this["_"+e+t]=i,this.attachEvent("on"+e,i)}}function r(e,t,r){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var n=this["_"+e+t];n&&(this.detachEvent("on"+e,n),this["_"+e+t]=null)}}"Element"in e&&!Element.prototype.addEventListener&&Object.defineProperty&&(Event.CAPTURING_PHASE=1,Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Object.defineProperties(Event.prototype,{CAPTURING_PHASE:{get:function(){return 1}},AT_TARGET:{get:function(){return 2}},BUBBLING_PHASE:{get:function(){return 3}},target:{get:function(){return this.srcElement}},currentTarget:{get:function(){return this._currentTarget}},eventPhase:{get:function(){return this.srcElement===this.currentTarget?Event.AT_TARGET:Event.BUBBLING_PHASE}},bubbles:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"resize":case"scroll":case"select":case"change":case"submit":case"reset":return!0}return!1}},cancelable:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"submit":return!0}return!1}},timeStamp:{get:function(){return this._timeStamp}},stopPropagation:{value:function(){this.cancelBubble=!0}},preventDefault:{value:function(){this.returnValue=!1}},defaultPrevented:{get:function(){return this.returnValue===!1}}}),[Window,HTMLDocument,Element].forEach(function(e){e.prototype.addEventListener=t,e.prototype.removeEventListener=r}))}(),window.addEvent=function(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&(e["e"+t+r]=r,e[t+r]=function(){var n=window.event;n.currentTarget=e,n.preventDefault=function(){n.returnValue=!1},n.stopPropagation=function(){n.cancelBubble=!0},n.target=n.srcElement,n.timeStamp=Date.now(),e["e"+t+r].call(this,n)},e.attachEvent("on"+t,e[t+r]))},window.removeEvent=function(e,t,r){e.removeEventListener?e.removeEventListener(t,r,!1):e.detachEvent&&(e.detachEvent("on"+t,e[t+r]),e[t+r]=null,e["e"+t+r]=null)},function(){function t(e,t){function r(e){return e.length?e.split(/\s+/g):[]}function n(e,t){var n=r(t),i=n.indexOf(e);return-1!==i&&n.splice(i,1),n.join(" ")}if(Object.defineProperties(this,{length:{get:function(){return r(e[t]).length}},item:{value:function(n){var i=r(e[t]);return n>=0&&n<i.length?i[n]:null}},contains:{value:function(n){if(n=String(n),0===n.length)throw SyntaxError();if(/\s/.test(n))throw Error("InvalidCharacterError");var i=r(e[t]);return-1!==i.indexOf(n)}},add:{value:function(){var n=Array.prototype.slice.call(arguments).map(String);if(n.some(function(e){return 0===e.length}))throw SyntaxError();if(n.some(function(e){return/\s/.test(e)}))throw Error("InvalidCharacterError");try{var i=e[t],o=r(i);if(n=n.filter(function(e){return-1===o.indexOf(e)}),0===n.length)return;0===i.length||/\s$/.test(i)||(i+=" "),i+=n.join(" "),e[t]=i}finally{var s=r(e[t]).length;this.length!==s&&(this.length=s)}}},remove:{value:function(){var i=Array.prototype.slice.call(arguments).map(String);if(i.some(function(e){return 0===e.length}))throw SyntaxError();if(i.some(function(e){return/\s/.test(e)}))throw Error("InvalidCharacterError");try{var o=e[t];i.forEach(function(e){o=n(e,o)}),e[t]=o}finally{var s=r(e[t]).length;this.length!==s&&(this.length=s)}}},toggle:{value:function(i){var o=arguments[1];try{if(i=String(i),0===i.length)throw SyntaxError();if(/\s/.test(i))throw Error("InvalidCharacterError");var s=r(e[t]),a=s.indexOf(i);if(-1!==a&&(!o||void 0===o))return e[t]=n(i,e[t]),!1;if(-1!==a&&o)return!0;var u=e[t];return 0===u.length||/\s$/.test(u)||(u+=" "),u+=i,e[t]=u,!0}finally{var c=r(e[t]).length;this.length!==c&&(this.length=c)}}},toString:{value:function(){return e[t]}}}),"length"in this)for(var i=0;100>i;++i)Object.defineProperty(this,String(i),{get:function(e){return function(){return this.item(e)}}(i)});else this.length=r(e[t]).length}function r(t,r){"Element"in e&&Element.prototype&&Object.defineProperty&&Object.defineProperty(Element.prototype,t,{get:r})}"classList"in document.createElement("span")?window.getClassList=function(e){return e.classList}:(window.getClassList=function(e){return new t(e,"className")},r("classList",function(){return new t(this,"className")})),"relList"in document.createElement("link")?window.getRelList=function(e){return e.relList}:(window.getRelList=function(e){return new t(e,"rel")},r("relList",function(){return new t(this,"rel")})),function(){if("DOMTokenList"in e){var t=document.createElement("span");"classList"in t&&(t.classList.toggle("x",!1),t.classList.contains("x")&&(e.DOMTokenList.prototype.toggle=function(e){var t=arguments[1];if(void 0===t){var r=!this.contains(e);return this[r?"add":"remove"](e),r}return t=!!t,this[t?"add":"remove"](e),t}))}}(),"previousElementSibling"in document.documentElement||r("previousElementSibling",function(){for(var e=this.previousSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}),"nextElementSibling"in document.documentElement||r("nextElementSibling",function(){for(var e=this.nextSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e})}(),"Element"in e&&!Element.prototype.matches&&(Element.prototype.msMatchesSelector?Element.prototype.matches=Element.prototype.msMatchesSelector:Element.prototype.oMatchesSelector?Element.prototype.matches=Element.prototype.oMatchesSelector:Element.prototype.mozMatchesSelector?Element.prototype.matches=Element.prototype.mozMatchesSelector:Element.prototype.webkitMatchesSelector?Element.prototype.matches=Element.prototype.webkitMatchesSelector:document.querySelectorAll&&(Element.prototype.matches=function o(e){for(var o=(this.document||this.ownerDocument).querySelectorAll(e),t=o.length;--t>=0&&o.item(t)!==this;);return t>-1}));var n={prepend:function(){var e=[].slice.call(arguments);e=r(e),this.insertBefore(e,this.firstChild)},append:function(){var e=[].slice.call(arguments);e=r(e),this.appendChild(e)}};t(Document,n),t(DocumentFragment,n),t(Element,n);var i={before:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var n=this.previousSibling;-1!==e.indexOf(n);)n=n.previousSibling;var i=r(e);t.insertBefore(i,n?n.nextSibling:t.firstChild)}},after:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var n=this.nextSibling;-1!==e.indexOf(n);)n=n.nextSibling;var i=r(e);t.insertBefore(i,n)}},replaceWith:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var n=this.nextSibling;-1!==e.indexOf(n);)n=n.nextSibling;var i=r(e);this.parentNode===t?t.replaceChild(i,this):t.insertBefore(i,n)}},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}};t(DocumentType,i),t(Element,i),t(CharacterData,i)}}(self),function(e){"window"in e&&"document"in e&&(e.XMLHttpRequest=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("This browser does not support XMLHttpRequest.")},XMLHttpRequest.UNSENT=0,XMLHttpRequest.OPENED=1,XMLHttpRequest.HEADERS_RECEIVED=2,XMLHttpRequest.LOADING=3,XMLHttpRequest.DONE=4,function(){function t(e){if(this._data=[],e)for(var t=0;t<e.elements.length;++t){var r=e.elements[t];""!==r.name&&this.append(r.name,r.value)}}if(!("FormData"in e)){t.prototype={append:function(t,r){if("Blob"in e&&r instanceof e.Blob)throw TypeError("Blob not supported");t=String(t),this._data.push([t,r])},toString:function(){return this._data.map(function(e){return encodeURIComponent(e[0])+"="+encodeURIComponent(e[1])}).join("&")}},e.FormData=t;var r=e.XMLHttpRequest.prototype.send;e.XMLHttpRequest.prototype.send=function(e){return e instanceof t&&(this.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),arguments[0]=e.toString()),r.apply(this,arguments)}}}())}(self),function(e){"use strict";function t(e){var t="",r=!0;return e.forEach(function(e){var n=encodeURIComponent(e.name),i=encodeURIComponent(e.value);r||(t+="&"),t+=n+"="+i,r=!1}),t.replace(/%20/g,"+")}function r(e,t){var r=e.split("&");t&&-1===r[0].indexOf("=")&&(r[0]="="+r[0]);var n=[];r.forEach(function(e){if(0!==e.length){var t=e.indexOf("=");if(-1!==t)var r=e.substring(0,t),i=e.substring(t+1);else r=e,i="";r=r.replace(/\+/g," "),i=i.replace(/\+/g," "),n.push({name:r,value:i})}});var i=[];return n.forEach(function(e){i.push({name:decodeURIComponent(e.name),value:decodeURIComponent(e.value)})}),i}function n(e){if(s)return new a(e);var t=document.createElement("a");return t.href=e,t}function i(e){var n=this;this._list=[],void 0!==e&&null!==e||(e=""),(Object(e)!==e||e instanceof i)&&(e=String(e)),"string"==typeof e&&("?"===e.substring(0,1)&&(e=e.substring(1)),this._list=r(e)),this._url_object=null,this._setList=function(e){o||(n._list=e)};var o=!1;this._update_steps=function(){o||(o=!0,n._url_object&&("about:"===n._url_object.protocol&&-1!==n._url_object.pathname.indexOf("?")&&(n._url_object.pathname=n._url_object.pathname.split("?")[0]),n._url_object.search=t(n._list),o=!1))}}function o(t,o){function u(){var e=l.href.replace(/#$|\?$|\?(?=#)/g,"");l.href!==e&&(l.href=e)}function c(){d._setList(l.search?r(l.search.substring(1)):[]),d._update_steps()}if(!(this instanceof e.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");o&&(t=function(){if(s)return new a(t,o).href;var e;if(document.implementation&&document.implementation.createHTMLDocument?e=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(e=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),e.documentElement.appendChild(e.createElement("head")),e.documentElement.appendChild(e.createElement("body"))):window.ActiveXObject&&(e=new window.ActiveXObject("htmlfile"),e.write("<head></head><body></body>"),e.close()),!e)throw Error("base not supported");var r=e.createElement("base");r.href=o,e.getElementsByTagName("head")[0].appendChild(r);var n=e.createElement("a");return n.href=t,n.href}());var l=n(t||""),h=function(){if(!("defineProperties"in Object))return!1;try{var e={};return Object.defineProperties(e,{prop:{get:function(){return!0}}}),e.prop}catch(t){return!1}}(),f=h?this:document.createElement("a"),d=new i(l.search?l.search.substring(1):null);return d._url_object=f,Object.defineProperties(f,{href:{get:function(){return l.href},set:function(e){l.href=e,u(),c()},enumerable:!0,configurable:!0},origin:{get:function(){return"origin"in l?l.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return l.protocol},set:function(e){l.protocol=e},enumerable:!0,configurable:!0},username:{get:function(){return l.username},set:function(e){l.username=e},enumerable:!0,configurable:!0},password:{get:function(){return l.password},set:function(e){l.password=e},enumerable:!0,configurable:!0},host:{get:function(){var e={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[l.protocol];return e?l.host.replace(e,""):l.host},set:function(e){l.host=e},enumerable:!0,configurable:!0},hostname:{get:function(){return l.hostname},set:function(e){l.hostname=e},enumerable:!0,configurable:!0},port:{get:function(){return l.port},set:function(e){l.port=e},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==l.pathname.charAt(0)?"/"+l.pathname:l.pathname},set:function(e){l.pathname=e},enumerable:!0,configurable:!0},search:{get:function(){return l.search},set:function(e){l.search!==e&&(l.search=e,u(),c())},enumerable:!0,configurable:!0},searchParams:{get:function(){return d},enumerable:!0,configurable:!0},hash:{get:function(){return l.hash},set:function(e){l.hash=e,u()},enumerable:!0,configurable:!0},toString:{value:function(){return l.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return l.valueOf()},enumerable:!1,configurable:!0}}),f}var s,a=e.URL;try{if(a){if(s=new e.URL("http://example.com"),"searchParams"in s)return;"href"in s||(s=void 0)}}catch(u){}if(Object.defineProperties(i.prototype,{append:{value:function(e,t){this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(e){for(var t=0;t<this._list.length;)this._list[t].name===e?this._list.splice(t,1):++t;this._update_steps()},writable:!0,enumerable:!0,configurable:!0},get:{value:function(e){for(var t=0;t<this._list.length;++t)if(this._list[t].name===e)return this._list[t].value;return null},writable:!0,enumerable:!0,configurable:!0},getAll:{value:function(e){for(var t=[],r=0;r<this._list.length;++r)this._list[r].name===e&&t.push(this._list[r].value);return t},writable:!0,enumerable:!0,configurable:!0},has:{value:function(e){for(var t=0;t<this._list.length;++t)if(this._list[t].name===e)return!0;return!1},writable:!0,enumerable:!0,configurable:!0},set:{value:function(e,t){for(var r=!1,n=0;n<this._list.length;)this._list[n].name===e?r?this._list.splice(n,1):(this._list[n].value=t,r=!0,++n):++n;r||this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},entries:{value:function(){var e=this,t=0;return{next:function(){if(t>=e._list.length)return{done:!0,value:void 0};var r=e._list[t++];return{done:!1,value:[r.name,r.value]}}}},writable:!0,enumerable:!0,configurable:!0},keys:{value:function(){var e=this,t=0;return{next:function(){if(t>=e._list.length)return{done:!0,value:void 0};var r=e._list[t++];return{done:!1,value:r.name}}}},writable:!0,enumerable:!0,configurable:!0},values:{value:function(){var e=this,t=0;return{next:function(){if(t>=e._list.length)return{done:!0,value:void 0};var r=e._list[t++];return{done:!1,value:r.value}}}},writable:!0,enumerable:!0,configurable:!0},forEach:{value:function(e){var t=arguments.length>1?arguments[1]:void 0;this._list.forEach(function(r,n){e.call(t,r.value,r.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return t(this._list)},writable:!0,enumerable:!1,configurable:!0}}),"Symbol"in e&&"iterator"in e.Symbol&&Object.defineProperty(i.prototype,e.Symbol.iterator,{value:i.prototype.entries,writable:!0,enumerable:!0,configurable:!0}),a)for(var c in a)a.hasOwnProperty(c)&&"function"==typeof a[c]&&(o[c]=a[c]);e.URL=o,e.URLSearchParams=i}(self),function(e){function t(e){if(e=String(e),e.match(/[^\x00-\xFF]/))throw TypeError("Not a valid ByteString");return e}function r(e){return e=String(e),e.replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g,function(e){return/^[\uD800-\uDFFF]$/.test(e)?"�":e})}function n(e){return 65535&e}function i(e){return String(e).replace(/[a-z]/g,function(e){return e.toUpperCase()})}function o(e){return e=i(e),"CONNECT"===e||"TRACE"===e||"TRACK"===e}function s(e){var t=i(e);return"DELETE"===t||"GET"===t||"HEAD"===t||"OPTIONS"===t||"POST"===t||"PUT"===t?t:e}function a(e){return/^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(e)}function u(e){return!0}function c(e){e=String(e).toLowerCase();var t={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0};return t[e]||"proxy-"===e.substring(0,6)||"sec-"===e.substring(0,4)}function l(e){e=String(e).toLowerCase();var t={"set-cookie":!0,"set-cookie2":!0};return t[e]}function h(e,t){return e=String(e).toLowerCase(),"accept"===e||"accept-language"===e||"content-language"===e||"content-type"===e&&-1!==["application/x-www-form-encoded","multipart/form-data","text/plain"].indexOf(t)}function f(e){this._guard="none",this._headerList=[],e&&d(this,e)}function d(e,t){t instanceof f?t._headerList.forEach(function(t){e.append(t[0],t[1])}):Array.isArray(t)?t.forEach(function(t){if(!Array.isArray(t)||2!==t.length)throw TypeError();e.append(t[0],t[1])}):(t=Object(t),Object.keys(t).forEach(function(r){e.append(r,t[r])}))}function p(e){this._headers=e,this._index=0}function m(e){this._stream=e,this.bodyUsed=!1}function g(e,n){if(arguments.length<1)throw TypeError("Not enough arguments");if(m.call(this,null),this.method="GET",this.url="",this.headers=new f,this.headers._guard="request",this.referrer=null,this.mode=null,this.credentials="omit",e instanceof g){if(e.bodyUsed)throw TypeError();e.bodyUsed=!0,this.method=e.method,this.url=e.url,this.headers=new f(e.headers),this.headers._guard=e.headers._guard,this.credentials=e.credentials,this._stream=e._stream}else e=r(e),this.url=String(new URL(e,self.location));if(n=Object(n),"method"in n){var i=t(n.method);if(o(i))throw TypeError();this.method=s(i)}"headers"in n&&(this.headers=new f,d(this.headers,n.headers)),"body"in n&&(this._stream=n.body),"credentials"in n&&-1!==["omit","same-origin","include"].indexOf(n.credentials)&&(this.credentials=n.credentials)}function v(e,t){if(arguments.length<1&&(e=""),this.headers=new f,this.headers._guard="response",e instanceof XMLHttpRequest&&"_url"in e){var i=e;return this.type="basic",this.url=r(i._url),this.status=i.status,this.ok=200<=this.status&&this.status<=299,this.statusText=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).filter(function(e){return e.length}).forEach(function(e){var t=e.indexOf(":");this.headers.append(e.substring(0,t),e.substring(t+2))},this),void m.call(this,i.responseText)}m.call(this,e),t=Object(t)||{},this.url="";var o="status"in t?n(t.status):200;if(200>o||o>599)throw RangeError();this.status=o,this.ok=200<=this.status&&this.status<=299;var s="statusText"in t?String(t.statusText):"OK";if(/[^\x00-\xFF]/.test(s))throw TypeError();this.statusText=s,"headers"in t&&d(this.headers,t),this.type="basic"}function b(e,t){return new Promise(function(r,n){var i=new g(e,t),o=new XMLHttpRequest,s=!0;o._url=i.url;try{o.open(i.method,i.url,s)}catch(a){throw TypeError(a.message)}for(var u=i.headers[Symbol.iterator](),c=u.next();!c.done;c=u.next())o.setRequestHeader(c.value[0],c.value[1]);"include"===i.credentials&&(o.withCredentials=!0),o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(0===o.status?n(new TypeError("Network error")):r(new v(o)))},o.send(i._stream)})}f.prototype={append:function(e,r){if(e=t(e),!a(e)||!u(r))throw TypeError();if("immutable"===this._guard)throw TypeError();"request"===this._guard&&c(e)||("request-no-CORS"!==this._guard||h(e,r))&&("response"===this._guard&&l(e)||(e=e.toLowerCase(),this._headerList.push([e,r])))},"delete":function(e){if(e=t(e),!a(e))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!c(e))&&("request-no-CORS"!==this._guard||h(e,"invalid"))&&("response"!==this._guard||!l(e))){e=e.toLowerCase();for(var r=0;r<this._headerList.length;)this._headerList[r][0]===e?this._headerList.splice(r,1):++r}},get:function(e){if(e=t(e),!a(e))throw TypeError();e=e.toLowerCase();for(var r=0;r<this._headerList.length;++r)if(this._headerList[r][0]===e)return this._headerList[r][1];return null},getAll:function(e){if(e=t(e),!a(e))throw TypeError();e=e.toLowerCase();for(var r=[],n=0;n<this._headerList.length;++n)this._headerList[n][0]===e&&r.push(this._headerList[n][1]);return r},has:function(e){if(e=t(e),!a(e))throw TypeError();e=e.toLowerCase();for(var r=0;r<this._headerList.length;++r)if(this._headerList[r][0]===e)return!0;return!1},set:function(e,r){if(e=t(e),!a(e)||!u(r))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!c(e))&&("request-no-CORS"!==this._guard||h(e,r))&&("response"!==this._guard||!l(e))){e=e.toLowerCase();for(var n=0;n<this._headerList.length;++n)if(this._headerList[n][0]===e){for(this._headerList[n++][1]=r;n<this._headerList.length;)this._headerList[n][0]===e?this._headerList.splice(n,1):++n;return}this._headerList.push([e,r])}}},f.prototype[Symbol.iterator]=function(){return new p(this)},p.prototype={},p.prototype.next=function(){return this._index>=this._headers._headerList.length?{value:void 0,done:!0}:{value:this._headers._headerList[this._index++],done:!1}},p.prototype[Symbol.iterator]=function(){return this},m.prototype={arrayBuffer:function(){if(this.bodyUsed)return Promise.reject(TypeError());if(this.bodyUsed=!0,this._stream instanceof ArrayBuffer)return Promise.resolve(this._stream);var e=this._stream;return new Promise(function(t,r){var n=unescape(encodeURIComponent(e)).split("").map(function(e){return e.charCodeAt(0)});t(new Uint8Array(n).buffer)})},blob:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof Blob?Promise.resolve(this._stream):Promise.resolve(new Blob([this._stream])))},formData:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof FormData?Promise.resolve(this._stream):Promise.reject(Error("Not yet implemented")))},json:function(){if(this.bodyUsed)return Promise.reject(TypeError());this.bodyUsed=!0;var e=this;return new Promise(function(t,r){t(JSON.parse(e._stream))})},text:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,Promise.resolve(String(this._stream)))}},g.prototype=m.prototype,v.prototype=m.prototype,v.redirect=function(){throw Error("Not supported")},"fetch"in e||(e.Headers=f,e.Request=g,e.Response=v,e.fetch=b)}(self),function(e){"window"in e&&"document"in e&&"TextRectangle"in this&&!("width"in TextRectangle.prototype)&&Object.defineProperties(TextRectangle.prototype,{width:{get:function(){return this.right-this.left}},height:{get:function(){return this.bottom-this.top}}})}(this),function(e){"use strict";function t(e){var t="",r=!0;return e.forEach(function(e){var n=encodeURIComponent(e.name),i=encodeURIComponent(e.value);r||(t+="&"),t+=n+"="+i,r=!1}),t.replace(/%20/g,"+")}function r(e,t){var r=e.split("&");t&&-1===r[0].indexOf("=")&&(r[0]="="+r[0]);var n=[];r.forEach(function(e){if(0!==e.length){var t=e.indexOf("=");if(-1!==t)var r=e.substring(0,t),i=e.substring(t+1);else r=e,i="";r=r.replace(/\+/g," "),i=i.replace(/\+/g," "),n.push({name:r,value:i})}});var i=[];return n.forEach(function(e){i.push({name:decodeURIComponent(e.name),value:decodeURIComponent(e.value)})}),i}function n(e){if(s)return new a(e);var t=document.createElement("a");return t.href=e,t}function i(e){var n=this;this._list=[],void 0!==e&&null!==e||(e=""),(Object(e)!==e||e instanceof i)&&(e=String(e)),"string"==typeof e&&("?"===e.substring(0,1)&&(e=e.substring(1)),this._list=r(e)),this._url_object=null,this._setList=function(e){o||(n._list=e)};var o=!1;this._update_steps=function(){o||(o=!0,n._url_object&&("about:"===n._url_object.protocol&&-1!==n._url_object.pathname.indexOf("?")&&(n._url_object.pathname=n._url_object.pathname.split("?")[0]),n._url_object.search=t(n._list),o=!1))}}function o(t,o){function u(){var e=l.href.replace(/#$|\?$|\?(?=#)/g,"");l.href!==e&&(l.href=e)}function c(){d._setList(l.search?r(l.search.substring(1)):[]),d._update_steps()}if(!(this instanceof e.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");o&&(t=function(){if(s)return new a(t,o).href;var e;if(document.implementation&&document.implementation.createHTMLDocument?e=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(e=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),e.documentElement.appendChild(e.createElement("head")),e.documentElement.appendChild(e.createElement("body"))):window.ActiveXObject&&(e=new window.ActiveXObject("htmlfile"),e.write("<head></head><body></body>"),e.close()),!e)throw Error("base not supported");var r=e.createElement("base");r.href=o,e.getElementsByTagName("head")[0].appendChild(r);var n=e.createElement("a");return n.href=t,n.href}());var l=n(t||""),h=function(){if(!("defineProperties"in Object))return!1;try{var e={};return Object.defineProperties(e,{prop:{get:function(){return!0}}}),e.prop}catch(t){return!1}}(),f=h?this:document.createElement("a"),d=new i(l.search?l.search.substring(1):null);return d._url_object=f,Object.defineProperties(f,{href:{get:function(){return l.href},set:function(e){l.href=e,u(),c()},enumerable:!0,configurable:!0},origin:{get:function(){return"origin"in l?l.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return l.protocol},set:function(e){l.protocol=e},enumerable:!0,configurable:!0},username:{get:function(){return l.username},set:function(e){l.username=e},enumerable:!0,configurable:!0},password:{get:function(){return l.password},set:function(e){l.password=e},enumerable:!0,configurable:!0},host:{get:function(){var e={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[l.protocol];return e?l.host.replace(e,""):l.host},set:function(e){l.host=e},enumerable:!0,configurable:!0},hostname:{get:function(){return l.hostname},set:function(e){l.hostname=e},enumerable:!0,configurable:!0},port:{get:function(){return l.port},set:function(e){l.port=e},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==l.pathname.charAt(0)?"/"+l.pathname:l.pathname},set:function(e){l.pathname=e},enumerable:!0,configurable:!0},search:{get:function(){return l.search},set:function(e){l.search!==e&&(l.search=e,u(),c())},enumerable:!0,configurable:!0},searchParams:{get:function(){return d},enumerable:!0,configurable:!0},hash:{get:function(){return l.hash},set:function(e){l.hash=e,u()},enumerable:!0,configurable:!0},toString:{value:function(){return l.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return l.valueOf()},enumerable:!1,configurable:!0}}),f}var s,a=e.URL;try{if(a){if(s=new e.URL("http://example.com"),"searchParams"in s)return;"href"in s||(s=void 0)}}catch(u){}if(Object.defineProperties(i.prototype,{append:{value:function(e,t){this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(e){for(var t=0;t<this._list.length;)this._list[t].name===e?this._list.splice(t,1):++t;this._update_steps()},writable:!0,enumerable:!0,configurable:!0},get:{value:function(e){for(var t=0;t<this._list.length;++t)if(this._list[t].name===e)return this._list[t].value;return null},writable:!0,enumerable:!0,configurable:!0},getAll:{value:function(e){for(var t=[],r=0;r<this._list.length;++r)this._list[r].name===e&&t.push(this._list[r].value);return t},writable:!0,enumerable:!0,configurable:!0},has:{value:function(e){for(var t=0;t<this._list.length;++t)if(this._list[t].name===e)return!0;return!1},writable:!0,enumerable:!0,configurable:!0},set:{value:function(e,t){for(var r=!1,n=0;n<this._list.length;)this._list[n].name===e?r?this._list.splice(n,1):(this._list[n].value=t,r=!0,++n):++n;r||this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},entries:{value:function(){var e=this,t=0;return{next:function(){if(t>=e._list.length)return{done:!0,value:void 0};var r=e._list[t++];return{done:!1,value:[r.name,r.value]}}}},writable:!0,enumerable:!0,configurable:!0},keys:{value:function(){var e=this,t=0;return{next:function(){if(t>=e._list.length)return{
done:!0,value:void 0};var r=e._list[t++];return{done:!1,value:r.name}}}},writable:!0,enumerable:!0,configurable:!0},values:{value:function(){var e=this,t=0;return{next:function(){if(t>=e._list.length)return{done:!0,value:void 0};var r=e._list[t++];return{done:!1,value:r.value}}}},writable:!0,enumerable:!0,configurable:!0},forEach:{value:function(e){var t=arguments.length>1?arguments[1]:void 0;this._list.forEach(function(r,n){e.call(t,r.value,r.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return t(this._list)},writable:!0,enumerable:!1,configurable:!0}}),"Symbol"in e&&"iterator"in e.Symbol&&Object.defineProperty(i.prototype,e.Symbol.iterator,{value:i.prototype.entries,writable:!0,enumerable:!0,configurable:!0}),a)for(var c in a)a.hasOwnProperty(c)&&"function"==typeof a[c]&&(o[c]=a[c]);e.URL=o,e.URLSearchParams=i}(self),function(e){function t(e){if(e=String(e),e.match(/[^\x00-\xFF]/))throw TypeError("Not a valid ByteString");return e}function r(e){return e=String(e),e.replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g,function(e){return/^[\uD800-\uDFFF]$/.test(e)?"�":e})}function n(e){return 65535&e}function i(e){return String(e).replace(/[a-z]/g,function(e){return e.toUpperCase()})}function o(e){return e=i(e),"CONNECT"===e||"TRACE"===e||"TRACK"===e}function s(e){var t=i(e);return"DELETE"===t||"GET"===t||"HEAD"===t||"OPTIONS"===t||"POST"===t||"PUT"===t?t:e}function a(e){return/^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(e)}function u(e){return!0}function c(e){e=String(e).toLowerCase();var t={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0};return t[e]||"proxy-"===e.substring(0,6)||"sec-"===e.substring(0,4)}function l(e){e=String(e).toLowerCase();var t={"set-cookie":!0,"set-cookie2":!0};return t[e]}function h(e,t){return e=String(e).toLowerCase(),"accept"===e||"accept-language"===e||"content-language"===e||"content-type"===e&&-1!==["application/x-www-form-encoded","multipart/form-data","text/plain"].indexOf(t)}function f(e){this._guard="none",this._headerList=[],e&&d(this,e)}function d(e,t){t instanceof f?t._headerList.forEach(function(t){e.append(t[0],t[1])}):Array.isArray(t)?t.forEach(function(t){if(!Array.isArray(t)||2!==t.length)throw TypeError();e.append(t[0],t[1])}):(t=Object(t),Object.keys(t).forEach(function(r){e.append(r,t[r])}))}function p(e){this._headers=e,this._index=0}function m(e){this._stream=e,this.bodyUsed=!1}function g(e,n){if(arguments.length<1)throw TypeError("Not enough arguments");if(m.call(this,null),this.method="GET",this.url="",this.headers=new f,this.headers._guard="request",this.referrer=null,this.mode=null,this.credentials="omit",e instanceof g){if(e.bodyUsed)throw TypeError();e.bodyUsed=!0,this.method=e.method,this.url=e.url,this.headers=new f(e.headers),this.headers._guard=e.headers._guard,this.credentials=e.credentials,this._stream=e._stream}else e=r(e),this.url=String(new URL(e,self.location));if(n=Object(n),"method"in n){var i=t(n.method);if(o(i))throw TypeError();this.method=s(i)}"headers"in n&&(this.headers=new f,d(this.headers,n.headers)),"body"in n&&(this._stream=n.body),"credentials"in n&&-1!==["omit","same-origin","include"].indexOf(n.credentials)&&(this.credentials=n.credentials)}function v(e,t){if(arguments.length<1&&(e=""),this.headers=new f,this.headers._guard="response",e instanceof XMLHttpRequest&&"_url"in e){var i=e;return this.type="basic",this.url=r(i._url),this.status=i.status,this.ok=200<=this.status&&this.status<=299,this.statusText=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).filter(function(e){return e.length}).forEach(function(e){var t=e.indexOf(":");this.headers.append(e.substring(0,t),e.substring(t+2))},this),void m.call(this,i.responseText)}m.call(this,e),t=Object(t)||{},this.url="";var o="status"in t?n(t.status):200;if(200>o||o>599)throw RangeError();this.status=o,this.ok=200<=this.status&&this.status<=299;var s="statusText"in t?String(t.statusText):"OK";if(/[^\x00-\xFF]/.test(s))throw TypeError();this.statusText=s,"headers"in t&&d(this.headers,t),this.type="basic"}function b(e,t){return new Promise(function(r,n){var i=new g(e,t),o=new XMLHttpRequest,s=!0;o._url=i.url;try{o.open(i.method,i.url,s)}catch(a){throw TypeError(a.message)}for(var u=i.headers[Symbol.iterator](),c=u.next();!c.done;c=u.next())o.setRequestHeader(c.value[0],c.value[1]);"include"===i.credentials&&(o.withCredentials=!0),o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(0===o.status?n(new TypeError("Network error")):r(new v(o)))},o.send(i._stream)})}f.prototype={append:function(e,r){if(e=t(e),!a(e)||!u(r))throw TypeError();if("immutable"===this._guard)throw TypeError();"request"===this._guard&&c(e)||("request-no-CORS"!==this._guard||h(e,r))&&("response"===this._guard&&l(e)||(e=e.toLowerCase(),this._headerList.push([e,r])))},"delete":function(e){if(e=t(e),!a(e))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!c(e))&&("request-no-CORS"!==this._guard||h(e,"invalid"))&&("response"!==this._guard||!l(e))){e=e.toLowerCase();for(var r=0;r<this._headerList.length;)this._headerList[r][0]===e?this._headerList.splice(r,1):++r}},get:function(e){if(e=t(e),!a(e))throw TypeError();e=e.toLowerCase();for(var r=0;r<this._headerList.length;++r)if(this._headerList[r][0]===e)return this._headerList[r][1];return null},getAll:function(e){if(e=t(e),!a(e))throw TypeError();e=e.toLowerCase();for(var r=[],n=0;n<this._headerList.length;++n)this._headerList[n][0]===e&&r.push(this._headerList[n][1]);return r},has:function(e){if(e=t(e),!a(e))throw TypeError();e=e.toLowerCase();for(var r=0;r<this._headerList.length;++r)if(this._headerList[r][0]===e)return!0;return!1},set:function(e,r){if(e=t(e),!a(e)||!u(r))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!c(e))&&("request-no-CORS"!==this._guard||h(e,r))&&("response"!==this._guard||!l(e))){e=e.toLowerCase();for(var n=0;n<this._headerList.length;++n)if(this._headerList[n][0]===e){for(this._headerList[n++][1]=r;n<this._headerList.length;)this._headerList[n][0]===e?this._headerList.splice(n,1):++n;return}this._headerList.push([e,r])}}},f.prototype[Symbol.iterator]=function(){return new p(this)},p.prototype={},p.prototype.next=function(){return this._index>=this._headers._headerList.length?{value:void 0,done:!0}:{value:this._headers._headerList[this._index++],done:!1}},p.prototype[Symbol.iterator]=function(){return this},m.prototype={arrayBuffer:function(){if(this.bodyUsed)return Promise.reject(TypeError());if(this.bodyUsed=!0,this._stream instanceof ArrayBuffer)return Promise.resolve(this._stream);var e=this._stream;return new Promise(function(t,r){var n=unescape(encodeURIComponent(e)).split("").map(function(e){return e.charCodeAt(0)});t(new Uint8Array(n).buffer)})},blob:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof Blob?Promise.resolve(this._stream):Promise.resolve(new Blob([this._stream])))},formData:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof FormData?Promise.resolve(this._stream):Promise.reject(Error("Not yet implemented")))},json:function(){if(this.bodyUsed)return Promise.reject(TypeError());this.bodyUsed=!0;var e=this;return new Promise(function(t,r){t(JSON.parse(e._stream))})},text:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,Promise.resolve(String(this._stream)))}},g.prototype=m.prototype,v.prototype=m.prototype,v.redirect=function(){throw Error("Not supported")},"fetch"in e||(e.Headers=f,e.Request=g,e.Response=v,e.fetch=b)}(self);