You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gosuv/res/js/promise-polyfill.min.js

3 lines
11 KiB

/* Disable minification (remove `.min` from URL path) for more info */
(function(undefined) {!function(){function e(e){var n,t=!1,r=[];if("function"==typeof e.next)for(;!t&&(n=e.next(),n.hasOwnProperty("value")&&n.hasOwnProperty("done"));){if(n.done===!0){t=!0;break}if(n.done!==!1)break;r.push(n.value)}return!!t&&r}Object.defineProperty(Array,"from",{configurable:!0,value:function(n){if(n===undefined||null===n)throw new TypeError(n+" is not an object");if(1 in arguments&&!(arguments[1]instanceof Function))throw new TypeError(arguments[1]+" is not a function");var t,r,o="string"==typeof n?n.split(""):Object(n),i=arguments[1],a=arguments[2],f=[],u=-1,c=Math.min(Math.max(Number(o.length)||0,0),9007199254740991);r=e(o),"function"==typeof o.entries&&"function"==typeof o.values&&("Set"===o.constructor.name&&"values"in Set.prototype&&(r=e(o.values())),"Map"===o.constructor.name&&"entries"in Map.prototype&&(r=e(o.entries()))),r&&(o=r,c=r.length);for(;++u<c;)t=o[u],f[u]=i?i.call(a,t,u):t;return f.length=c,f},writable:!0})}();!function(){"use strict";var r=function(){try{var r={},e=Object.defineProperty,n=e(r,r,r)&&e}catch(t){}return n}(),e=function(r){try{return!!new r}catch(e){return!1}},n=function(){for(var n,t=arguments,a=t.length,u=this,c=e(u)?new u(a):new Array(a),i=0;i<a;)n=t[i],r?r(c,i,{value:n,writable:!0,enumerable:!0,configurable:!0}):c[i]=n,i+=1;return c.length=a,c};r?r(Array,"of",{value:n,configurable:!0,writable:!0}):Array.of=n}();Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===undefined||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments?parseInt(Number(arguments[1]),10)||0:0;r=r<0?Math.max(n+r,0):Math.min(r,n);var a=2 in arguments&&arguments[2]!==undefined?parseInt(Number(arguments[2]),10)||0:n;for(a=a<0?Math.max(n+arguments[2],0):Math.min(a,n);r<a;)e[r]=t,++r;return e},writable:!0});function _mutation(e){if(e.length){if(1===e.length)return"string"==typeof e[0]?document.createTextNode(e[0]):e[0];for(var t,n=document.createDocumentFragment(),r=e.length,o=-1;++o<r;)t=e[o],n.appendChild("string"==typeof t?document.createTextNode(t):t);return n}throw new Error("DOM Exception 8")}Document.prototype.after=Element.prototype.after=function(){this.parentNode&&this.parentNode.insertBefore(_mutation(arguments),this.nextSibling)},"Text"in this&&(Text.prototype.after=Element.prototype.after);Document.prototype.append=Element.prototype.append=function(){this.appendChild(_mutation(arguments))};Document.prototype.before=Element.prototype.before=function(){this.parentNode&&this.parentNode.insertBefore(_mutation(arguments),this)},"Text"in this&&(Text.prototype.before=Element.prototype.before);Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e=e.parentElement}return null};Document.prototype.prepend=Element.prototype.prepend=function(){this.insertBefore(_mutation(arguments),this.firstChild)};Document.prototype.replaceWith=Element.prototype.replaceWith=function(){this.parentNode&&this.parentNode.replaceChild(_mutation(arguments),this)},"Text"in this&&(Text.prototype.replaceWith=Element.prototype.replaceWith);!function(n){function h(){a!==n.location.hash&&(a=n.location.hash,n.dispatchEvent(new Event("hashchange"))),setTimeout(h,500)}var a=n.location.hash;n.onhashchange=function(){},h()}(this);Object.assign=function(r,t){for(var n,e,o=1;o<arguments.length;++o){e=arguments[o];for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r};!function(e){"use strict";function t(t){return!!t&&("Symbol"in e&&"iterator"in e.Symbol&&"function"==typeof t[Symbol.iterator]||!!Array.isArray(t))}function n(e){return"from"in Array?Array.from(e):Array.prototype.slice.call(e)}!function(){function r(e){var t="",n=!0;return e.forEach(function(e){var r=encodeURIComponent(e.name),a=encodeURIComponent(e.value);n||(t+="&"),t+=r+"="+a,n=!1}),t.replace(/%20/g,"+")}function a(e,t){var n=e.split("&");t&&n[0].indexOf("=")===-1&&(n[0]="="+n[0]);var r=[];n.forEach(function(e){if(0!==e.length){var t=e.indexOf("=");if(t!==-1)var n=e.substring(0,t),a=e.subst