/usr/share/javascript/es6-promise/es6-promise.min.js is in libjs-es6-promise 4.2.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 | (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else{var a=factory();for(var i in a)(typeof exports==="object"?exports:root)[i]=a[i]}})(this,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=6)}([function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handleMaybeThenable=exports.PENDING=exports.REJECTED=exports.FULFILLED=exports.invokeCallback=exports.initializePromise=exports.publishRejection=exports.publish=exports.subscribe=exports.fulfill=exports.reject=exports.resolve=exports.noop=exports.getThen=exports.makePromise=exports.nextId=exports.PROMISE_ID=undefined;var _utils=__webpack_require__(1);var _asap=__webpack_require__(3);var _then=__webpack_require__(4);var _then2=_interopRequireDefault(_then);var _resolve=__webpack_require__(5);var _resolve2=_interopRequireDefault(_resolve);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var PROMISE_ID=exports.PROMISE_ID=Math.random().toString(36).substring(2);function noop(){}var PENDING=void 0;var FULFILLED=1;var REJECTED=2;var TRY_CATCH_ERROR={error:null};function selfFulfillment(){return new TypeError("You cannot resolve a promise with itself")}function cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.")}function getThen(promise){try{return promise.then}catch(error){TRY_CATCH_ERROR.error=error;return TRY_CATCH_ERROR}}function tryThen(then,value,fulfillmentHandler,rejectionHandler){try{then.call(value,fulfillmentHandler,rejectionHandler)}catch(e){return e}}function handleForeignThenable(promise,thenable,then){(0,_asap.asap)(function(promise){var sealed=false;var error=tryThen(then,thenable,function(value){if(sealed){return}sealed=true;if(thenable!==value){resolve(promise,value)}else{fulfill(promise,value)}},function(reason){if(sealed){return}sealed=true;reject(promise,reason)},"Settle: "+(promise._label||" unknown promise"));if(!sealed&&error){sealed=true;reject(promise,error)}},promise)}function handleOwnThenable(promise,thenable){if(thenable._state===FULFILLED){fulfill(promise,thenable._result)}else if(thenable._state===REJECTED){reject(promise,thenable._result)}else{subscribe(thenable,undefined,function(value){return resolve(promise,value)},function(reason){return reject(promise,reason)})}}function handleMaybeThenable(promise,maybeThenable,then){if(maybeThenable.constructor===promise.constructor&&then===_then2.default&&maybeThenable.constructor.resolve===_resolve2.default){handleOwnThenable(promise,maybeThenable)}else{if(then===TRY_CATCH_ERROR){reject(promise,TRY_CATCH_ERROR.error);TRY_CATCH_ERROR.error=null}else if(then===undefined){fulfill(promise,maybeThenable)}else if((0,_utils.isFunction)(then)){handleForeignThenable(promise,maybeThenable,then)}else{fulfill(promise,maybeThenable)}}}function resolve(promise,value){if(promise===value){reject(promise,selfFulfillment())}else if((0,_utils.objectOrFunction)(value)){handleMaybeThenable(promise,value,getThen(value))}else{fulfill(promise,value)}}function publishRejection(promise){if(promise._onerror){promise._onerror(promise._result)}publish(promise)}function fulfill(promise,value){if(promise._state!==PENDING){return}promise._result=value;promise._state=FULFILLED;if(promise._subscribers.length!==0){(0,_asap.asap)(publish,promise)}}function reject(promise,reason){if(promise._state!==PENDING){return}promise._state=REJECTED;promise._result=reason;(0,_asap.asap)(publishRejection,promise)}function subscribe(parent,child,onFulfillment,onRejection){var _subscribers=parent._subscribers;var length=_subscribers.length;parent._onerror=null;_subscribers[length]=child;_subscribers[length+FULFILLED]=onFulfillment;_subscribers[length+REJECTED]=onRejection;if(length===0&&parent._state){(0,_asap.asap)(publish,parent)}}function publish(promise){var subscribers=promise._subscribers;var settled=promise._state;if(subscribers.length===0){return}var child=void 0,callback=void 0,detail=promise._result;for(var i=0;i<subscribers.length;i+=3){child=subscribers[i];callback=subscribers[i+settled];if(child){invokeCallback(settled,child,callback,detail)}else{callback(detail)}}promise._subscribers.length=0}function tryCatch(callback,detail){try{return callback(detail)}catch(e){TRY_CATCH_ERROR.error=e;return TRY_CATCH_ERROR}}function invokeCallback(settled,promise,callback,detail){var hasCallback=(0,_utils.isFunction)(callback),value=void 0,error=void 0,succeeded=void 0,failed=void 0;if(hasCallback){value=tryCatch(callback,detail);if(value===TRY_CATCH_ERROR){failed=true;error=value.error;value.error=null}else{succeeded=true}if(promise===value){reject(promise,cannotReturnOwn());return}}else{value=detail;succeeded=true}if(promise._state!==PENDING){}else if(hasCallback&&succeeded){resolve(promise,value)}else if(failed){reject(promise,error)}else if(settled===FULFILLED){fulfill(promise,value)}else if(settled===REJECTED){reject(promise,value)}}function initializePromise(promise,resolver){try{resolver(function resolvePromise(value){resolve(promise,value)},function rejectPromise(reason){reject(promise,reason)})}catch(e){reject(promise,e)}}var id=0;function nextId(){return id++}function makePromise(promise){promise[PROMISE_ID]=id++;promise._state=undefined;promise._result=undefined;promise._subscribers=[]}exports.nextId=nextId;exports.makePromise=makePromise;exports.getThen=getThen;exports.noop=noop;exports.resolve=resolve;exports.reject=reject;exports.fulfill=fulfill;exports.subscribe=subscribe;exports.publish=publish;exports.publishRejection=publishRejection;exports.initializePromise=initializePromise;exports.invokeCallback=invokeCallback;exports.FULFILLED=FULFILLED;exports.REJECTED=REJECTED;exports.PENDING=PENDING;exports.handleMaybeThenable=handleMaybeThenable},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.objectOrFunction=objectOrFunction;exports.isFunction=isFunction;exports.isMaybeThenable=isMaybeThenable;function objectOrFunction(x){var type=typeof x==="undefined"?"undefined":_typeof(x);return x!==null&&(type==="object"||type==="function")}function isFunction(x){return typeof x==="function"}function isMaybeThenable(x){return x!==null&&(typeof x==="undefined"?"undefined":_typeof(x))==="object"}var _isArray=void 0;if(Array.isArray){_isArray=Array.isArray}else{_isArray=function _isArray(x){return Object.prototype.toString.call(x)==="[object Array]"}}var isArray=exports.isArray=_isArray},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _utils=__webpack_require__(1);var _internal=__webpack_require__(0);var _asap=__webpack_require__(3);var _all=__webpack_require__(8);var _all2=_interopRequireDefault(_all);var _race=__webpack_require__(10);var _race2=_interopRequireDefault(_race);var _resolve=__webpack_require__(5);var _resolve2=_interopRequireDefault(_resolve);var _reject=__webpack_require__(11);var _reject2=_interopRequireDefault(_reject);var _then=__webpack_require__(4);var _then2=_interopRequireDefault(_then);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function needsResolver(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function needsNew(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Promise=function(){function Promise(resolver){_classCallCheck(this,Promise);this[_internal.PROMISE_ID]=(0,_internal.nextId)();this._result=this._state=undefined;this._subscribers=[];if(_internal.noop!==resolver){typeof resolver!=="function"&&needsResolver();this instanceof Promise?(0,_internal.initializePromise)(this,resolver):needsNew()}}_createClass(Promise,[{key:"catch",value:function _catch(onRejection){return this.then(null,onRejection)}},{key:"finally",value:function _finally(callback){var promise=this;var constructor=promise.constructor;return promise.then(function(value){return constructor.resolve(callback()).then(function(){return value})},function(reason){return constructor.resolve(callback()).then(function(){throw reason})})}}]);return Promise}();Promise.prototype.then=_then2.default;exports.default=Promise;Promise.all=_all2.default;Promise.race=_race2.default;Promise.resolve=_resolve2.default;Promise.reject=_reject2.default;Promise._setScheduler=_asap.setScheduler;Promise._setAsap=_asap.setAsap;Promise._asap=_asap.asap;module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";(function(process){Object.defineProperty(exports,"__esModule",{value:true});exports.setScheduler=setScheduler;exports.setAsap=setAsap;var len=0;var vertxNext=void 0;var customSchedulerFn=void 0;var asap=exports.asap=function asap(callback,arg){queue[len]=callback;queue[len+1]=arg;len+=2;if(len===2){if(customSchedulerFn){customSchedulerFn(flush)}else{scheduleFlush()}}};function setScheduler(scheduleFn){customSchedulerFn=scheduleFn}function setAsap(asapFn){exports.asap=asap=asapFn}var browserWindow=typeof window!=="undefined"?window:undefined;var browserGlobal=browserWindow||{};var BrowserMutationObserver=browserGlobal.MutationObserver||browserGlobal.WebKitMutationObserver;var isNode=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var isWorker=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function useNextTick(){return function(){return process.nextTick(flush)}}function useVertxTimer(){if(typeof vertxNext!=="undefined"){return function(){vertxNext(flush)}}return useSetTimeout()}function useMutationObserver(){var iterations=0;var observer=new BrowserMutationObserver(flush);var node=document.createTextNode("");observer.observe(node,{characterData:true});return function(){node.data=iterations=++iterations%2}}function useMessageChannel(){var channel=new MessageChannel;channel.port1.onmessage=flush;return function(){return channel.port2.postMessage(0)}}function useSetTimeout(){var globalSetTimeout=setTimeout;return function(){return globalSetTimeout(flush,1)}}var queue=new Array(1e3);function flush(){for(var i=0;i<len;i+=2){var callback=queue[i];var arg=queue[i+1];callback(arg);queue[i]=undefined;queue[i+1]=undefined}len=0}function attemptVertx(){try{var vertx=Function("return this")().require("vertx");vertxNext=vertx.runOnLoop||vertx.runOnContext;return useVertxTimer()}catch(e){return useSetTimeout()}}var scheduleFlush=void 0;if(isNode){scheduleFlush=useNextTick()}else if(BrowserMutationObserver){scheduleFlush=useMutationObserver()}else if(isWorker){scheduleFlush=useMessageChannel()}else if(browserWindow===undefined&&"function"==="function"){scheduleFlush=attemptVertx()}else{scheduleFlush=useSetTimeout()}}).call(exports,__webpack_require__(7))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=then;var _internal=__webpack_require__(0);var _asap=__webpack_require__(3);function then(onFulfillment,onRejection){var parent=this;var child=new this.constructor(_internal.noop);if(child[_internal.PROMISE_ID]===undefined){(0,_internal.makePromise)(child)}var _state=parent._state;if(_state){var callback=arguments[_state-1];(0,_asap.asap)(function(){return(0,_internal.invokeCallback)(_state,child,callback,parent._result)})}else{(0,_internal.subscribe)(parent,child,onFulfillment,onRejection)}return child}module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.default=resolve;var _internal=__webpack_require__(0);function resolve(object){var Constructor=this;if(object&&(typeof object==="undefined"?"undefined":_typeof(object))==="object"&&object.constructor===Constructor){return object}var promise=new Constructor(_internal.noop);(0,_internal.resolve)(promise,object);return promise}module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _promise=__webpack_require__(2);var _promise2=_interopRequireDefault(_promise);var _polyfill=__webpack_require__(12);var _polyfill2=_interopRequireDefault(_polyfill);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_promise2.default.polyfill=_polyfill2.default;_promise2.default.Promise=_promise2.default;exports.default=_promise2.default;module.exports=exports["default"]},function(module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=all;var _enumerator=__webpack_require__(9);var _enumerator2=_interopRequireDefault(_enumerator);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function all(entries){return new _enumerator2.default(this,entries).promise}module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _utils=__webpack_require__(1);var _internal=__webpack_require__(0);var _then2=__webpack_require__(4);var _then3=_interopRequireDefault(_then2);var _promise=__webpack_require__(2);var _promise2=_interopRequireDefault(_promise);var _resolve=__webpack_require__(5);var _resolve2=_interopRequireDefault(_resolve);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function validationError(){return new Error("Array Methods must be provided an Array")}var Enumerator=function(){function Enumerator(Constructor,input){_classCallCheck(this,Enumerator);this._instanceConstructor=Constructor;this.promise=new Constructor(_internal.noop);if(!this.promise[_internal.PROMISE_ID]){(0,_internal.makePromise)(this.promise)}if((0,_utils.isArray)(input)){this.length=input.length;this._remaining=input.length;this._result=new Array(this.length);if(this.length===0){(0,_internal.fulfill)(this.promise,this._result)}else{this.length=this.length||0;this._enumerate(input);if(this._remaining===0){(0,_internal.fulfill)(this.promise,this._result)}}}else{(0,_internal.reject)(this.promise,validationError())}}_createClass(Enumerator,[{key:"_enumerate",value:function _enumerate(input){for(var i=0;this._state===_internal.PENDING&&i<input.length;i++){this._eachEntry(input[i],i)}}},{key:"_eachEntry",value:function _eachEntry(entry,i){var c=this._instanceConstructor;var resolve=c.resolve;if(resolve===_resolve2.default){var _then=(0,_internal.getThen)(entry);if(_then===_then3.default&&entry._state!==_internal.PENDING){this._settledAt(entry._state,i,entry._result)}else if(typeof _then!=="function"){this._remaining--;this._result[i]=entry}else if(c===_promise2.default){var promise=new c(_internal.noop);(0,_internal.handleMaybeThenable)(promise,entry,_then);this._willSettleAt(promise,i)}else{this._willSettleAt(new c(function(resolve){return resolve(entry)}),i)}}else{this._willSettleAt(resolve(entry),i)}}},{key:"_settledAt",value:function _settledAt(state,i,value){var promise=this.promise;if(promise._state===_internal.PENDING){this._remaining--;if(state===_internal.REJECTED){(0,_internal.reject)(promise,value)}else{this._result[i]=value}}if(this._remaining===0){(0,_internal.fulfill)(promise,this._result)}}},{key:"_willSettleAt",value:function _willSettleAt(promise,i){var enumerator=this;(0,_internal.subscribe)(promise,undefined,function(value){return enumerator._settledAt(_internal.FULFILLED,i,value)},function(reason){return enumerator._settledAt(_internal.REJECTED,i,reason)})}}]);return Enumerator}();exports.default=Enumerator;module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=race;var _utils=__webpack_require__(1);function race(entries){var Constructor=this;if(!(0,_utils.isArray)(entries)){return new Constructor(function(_,reject){return reject(new TypeError("You must pass an array to race."))})}else{return new Constructor(function(resolve,reject){var length=entries.length;for(var i=0;i<length;i++){Constructor.resolve(entries[i]).then(resolve,reject)}})}}module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=reject;var _internal=__webpack_require__(0);function reject(reason){var Constructor=this;var promise=new Constructor(_internal.noop);(0,_internal.reject)(promise,reason);return promise}module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";(function(global){Object.defineProperty(exports,"__esModule",{value:true});exports.default=polyfill;var _promise=__webpack_require__(2);var _promise2=_interopRequireDefault(_promise);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function polyfill(){var local=void 0;if(typeof global!=="undefined"){local=global}else if(typeof self!=="undefined"){local=self}else{try{local=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}}var P=local.Promise;if(P){var promiseToString=null;try{promiseToString=Object.prototype.toString.call(P.resolve())}catch(e){}if(promiseToString==="[object Promise]"&&!P.cast){return}}local.Promise=_promise2.default}module.exports=exports["default"]}).call(exports,__webpack_require__(13))},function(module,exports){var g;g=function(){return this}();try{g=g||Function("return this")()||(1,eval)("this")}catch(e){if(typeof window==="object")g=window}module.exports=g}])});
|