!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";__webpack_require__(389),__webpack_require__(399),__webpack_require__(413);var Promise=__webpack_require__(414);window.Promise=Promise;var TreeModel=__webpack_require__(450),URL=__webpack_require__(453),Querystring=__webpack_require__(463),Msgboxes=__webpack_require__(466),IrsaReactComps=__webpack_require__(467),IrsaReactSubschemaComps=__webpack_require__(468),Notifications=__webpack_require__(470),IrsaReactDropdown=__webpack_require__(514),IrsaReactTimePicker=__webpack_require__(469),IrsaReactTabstrip=__webpack_require__(515),IrsaReactModal=__webpack_require__(516),IrsaReactUpload=__webpack_require__(517),IrsaEditableText=__webpack_require__(527),IrsaErrorTooltip=__webpack_require__(528),IrsaErrorSummary=__webpack_require__(529),ModulesCommons=__webpack_require__(26),IrsaReactAssetPreview=__webpack_require__(530),IrsaBreadcrumbModule=__webpack_require__(531),IrsaReactSwitch=__webpack_require__(533),ScriptCache=__webpack_require__(534).ScriptCache,IrsaReactEsriMapComp=__webpack_require__(535),CheckboxListDropdown=__webpack_require__(538),IrsaReactLoader=__webpack_require__(539),IrsaReactSlider=__webpack_require__(540),KDatePicker=__webpack_require__(544),KDateTimePicker=__webpack_require__(545);window.classNames=__webpack_require__(93),window.ScriptCache=ScriptCache,window.TreeModel=TreeModel,window.URLParser=URL,window.QuerystringParser=Querystring,window.showSuccessMsg=Msgboxes.showSuccessMsg,window.showMsg=Msgboxes.showMsg,window.showMsgDialog=Msgboxes.showMsgDialog,window.showErrorMsg=Msgboxes.showErrorMsg,window.showConfirmDialog=Msgboxes.showConfirmDialog,window.initializeNotifications=Notifications.initializeNotifications,window.addNotification=Notifications.addNotification,window.addNotificationRange=Notifications.addNotificationRange,window.IrsaReactVTabs=IrsaReactComps.IrsaReactVTabs,window.IrsaPopoverListElement=IrsaReactComps.IrsaPopoverListElement,window.IrsaPopoverList=IrsaReactComps.IrsaPopoverList,window.IrsaPopover=IrsaReactComps.IrsaPopover,window.IrsaReactForm=IrsaReactSubschemaComps.IrsaReactForm,window.SubSchemaFormVMMixin=IrsaReactSubschemaComps.SubSchemaFormVMMixin,window.IrsaReactDropdown=IrsaReactDropdown.Dropdown,window.IrsaReactTimePicker=IrsaReactTimePicker,window.IrsaReactSwitch=IrsaReactSwitch,window.IrsaReactTabstrip=IrsaReactTabstrip,window.IrsaReactModal=IrsaReactModal,window.IrsaReactUpload=IrsaReactUpload,window.IrsaEditableText=IrsaEditableText,window.IrsaErrorTooltip=IrsaErrorTooltip,window.IrsaErrorSummary=IrsaErrorSummary,window.IrsaModulesUtil=ModulesCommons.Util,window.IrsaReactAssetPreview=IrsaReactAssetPreview,window.createBreadcrumb=IrsaBreadcrumbModule.createBreadcrumb,window.saveBreadCrumbInfoAndRedirect=IrsaBreadcrumbModule.saveBreadCrumbInfoAndRedirect,window.IrsaReactEsriMap=IrsaReactEsriMapComp.IrsaReactEsriMap,window.CheckboxListDropdown=CheckboxListDropdown,window.IrsaReactLoader=IrsaReactLoader,window.IrsaReactSlider=IrsaReactSlider,window.KDatePicker=KDatePicker,window.KDateTimePicker=KDateTimePicker},function(module,exports){module.exports=React},,,,,,function(module,exports){/* object-assign (c) Sindre Sorhus @license MIT */ "use strict";function toObject(val){if(null===val||void 0===val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}function shouldUseNative(){try{if(!Object.assign)return!1;var test1=new String("abc");if(test1[5]="de","5"===Object.getOwnPropertyNames(test1)[0])return!1;for(var test2={},i=0;i<10;i++)test2["_"+String.fromCharCode(i)]=i;var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if("0123456789"!==order2.join(""))return!1;var test3={};return"abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},test3)).join("")}catch(err){return!1}}var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=shouldUseNative()?Object.assign:function(target,source){for(var from,symbols,to=toObject(target),s=1;s3&&void 0!==arguments[3]&&arguments[3],result=[].concat(_toConsumableArray(array));return result.sort(function(a,b){return dateIsInTicks===!0?dateKeywordFormat===!1?new Date(b[datePropName])-new Date(a[datePropName]):new Date(parseInt(b[datePropName].substr(6)))-new Date(parseInt(a[datePropName].substr(6))):b[datePropName]-a[datePropName]}),result}},{key:"orderByAscendingDate",value:function(array,datePropName,dateIsInTicks){var result=[].concat(_toConsumableArray(array));return result.sort(function(a,b){return dateIsInTicks===!0?new Date(a[datePropName])-new Date(b[datePropName]):a[datePropName]-b[datePropName]}),result}},{key:"detectLeftButtonPress",value:function(evt){evt=evt||window.event;var button=evt.which||evt.button;return 1==button}},{key:"findWithRegex",value:function(regex,contentBlock,callback){for(var text=contentBlock.getText(),matchArr=void 0,start=void 0;null!==(matchArr=regex.exec(text));)start=matchArr.index,callback(start,start+matchArr[0].length)}},{key:"shortenMonth",value:function(date){if(!date)return"";var m=_MONTHS.find(function(e){return date.indexOf(e)>-1});return m?date.replace(m,m.substring(0,3)):date}},{key:"validateUserInputSection",value:function($inputSection){var errorsInfo=($inputSection.find("input[type=text],input[type=email],input[type=number],input[type=search],input[type=tel],input[type=url],textarea"),[]);return $("input[type=text]").map(function(idx,input){var $input=$(input);if($input.is("input[type=text],input[type=email],input[type=number],input[type=search],input[type=tel],input[type=url],textarea")){var fieldName=$input.data("fieldName");fieldName=fieldName?fieldName:"";var inputVal=$.trim($input.val()),result=checkForValidInputContent(inputVal,fieldName);result&&result.length>0&&errorsInfo.push(result)}}),errorsInfo}},{key:"getValueFromWindowHistory",value:function(key){if(!window.history||"function"!=typeof window.history.replaceState)throw new Error("Your Browser does not support History API to be used by this module");if("string"!=typeof key)throw new Error('"key" argument for getValueFromWindowHistory function must be a string');if(null==key||void 0==key)throw new Error('"key" argument for getValueFromWindowHistory function is required');var valueObj=null,wState=window.history.state;if(wState){var strState=wState[key];strState&&(valueObj=JSON.parse(strState))}return valueObj}},{key:"getValueFromWindowHistoryAsync",value:function(key){if(!window.history||"function"!=typeof window.history.replaceState)throw new Error("Your Browser does not support History API to be used by this module");if("string"!=typeof key)throw new Error('"key" argument for getValueFromWindowHistoryAsync function must be a string');if(null==key||void 0==key)throw new Error('"key" argument for getValueFromWindowHistoryAsync function is required');return locker.lock(function(){var valueObj=null,wState=window.history.state;if(wState){var strState=wState[this.key];strState&&strState.length>0&&(valueObj=JSON.parse(strState))}return Promise.resolve(valueObj)},{key:key})}},{key:"writeValueToWindowHistory",value:function(key,value,url){if(!window.history||"function"!=typeof window.history.replaceState)throw new Error("Your Browser does not support History API to be used by this module");if("string"!=typeof key)throw new Error('"key" argument for writeValueToWindowHistory function must be a string');if(null==key||void 0==key)throw new Error('"key" argument for writeValueToWindowHistory function is required');if("string"!=typeof url)throw new Error('"url" argument for writeValueToWindowHistory function must be a string');if(null==url||void 0==url)throw new Error('"url" argument for writeValueToWindowHistory function is required');return locker.lock(function(){var vlu=void 0;if("object"==_typeof(this.value))vlu=JSON.stringify(this.value);else{if("string"!=typeof this.value)throw new Error('"value" argument for writeValueToWindowHistory function must either be a string, object or an array');vlu=this.value}var wState=window.history.state;return wState||(wState={}),"string"==typeof wState&&(wState={}),wState[this.key]=vlu,window.history.replaceState(wState,null,this.url),Promise.resolve()},{key:key,value:value,url:url})}},{key:"clearWindowHistory",value:function(queryKeys){if(!Array.isArray(queryKeys))throw new Error('Argument "queryKeys" for clearWindowHistory function must be an array');return locker.lock(function(){var url=document.location.href;return queryKeys.map(function(e){url=updateQueryStringParameter(url,e,"")}),window.history.replaceState(null,null,url),Promise.resolve()})}},{key:"scrollToElement",value:function(elm,callback,scope){if(elm){var parentElm=null,arr=$(elm).closest(".k-window-content.k-content");arr.length>0&&(parentElm=arr.get(0));var bodyTopMargin=115,offset=void 0,body=void 0;parentElm?(bodyTopMargin=0,offset=$(elm).position(),body=$(parentElm)):(bodyTopMargin=115,offset=$(elm).offset(),body=$("html, body"));var scrollTop=offset.top-bodyTopMargin;scrollTop=scrollTop>0?scrollTop:0,body.stop().animate({scrollTop:scrollTop},"500","swing",function(){"function"==typeof callback&&callback.apply(scope?scope:window,[])})}}}]),Util}();Util.LettersIncrement=function(){function isLetters(arr){for(var i=0;i1&&(p=u.substring(0,u.length-1),q=String.fromCharCode(p.slice(-1).charCodeAt(0)));var l=u.slice(-1).charCodeAt(0),z=nextLetter(l);return"A"===z?p.slice(0,-1)+nextLetter(q.slice(-1).charCodeAt(0))+z:p+z}function nextLetter(l){return l<90?String.fromCharCode(l+1):"A"}function same(str,char){for(var i=str.length;i--;)if(str[i]!==char)return!1;return!0}var pub={},letterArray=[];return pub.increment=function(c){if(letterArray=c.split(""),isLetters(letterArray))return next(c);throw new Error("Letters Only")},pub}(),module.exports={Util:Util,StoreError:StoreError}},function(module,exports,__webpack_require__){function Locker(){return this instanceof Locker?(this.locked=!1,this.busy=!1,this.running=0,void(this.queue=[])):new Locker}function joinQueue(fn,ctx,exclusive){fn=promisify(fn,0);var deferred=defer();return this.queue.push({fn:fn,ctx:ctx,deferred:deferred,exclusive:exclusive}),runQueue.call(this),deferred.promise}function runQueue(){for(this.busy=this.running||this.queue.length;;){var again=runNext.call(this);if(!again)return}}function runNext(){if(this.locked)return!1;var item=this.queue[0];if(!item)return!1;if(item.exclusive){if(this.running)return!1;this.locked=!0}this.queue.shift(),this.running++;var self=this;return item.fn.call(item.ctx).then(function(res){runDone.call(self,item,!0,res)},function(err){runDone.call(self,item,!1,err)}),!0}function runDone(item,resolved,res){this.running--,this.locked&&(this.locked=!1),item.deferred[resolved?"resolve":"reject"](res),runQueue.call(this)}var promisify=__webpack_require__(28),defer=__webpack_require__(37);module.exports=Locker,Locker.prototype.run=function(fn,ctx){return joinQueue.call(this,fn,ctx,!1)},Locker.prototype.lock=function(fn,ctx){return joinQueue.call(this,fn,ctx,!0)}},function(module,exports,__webpack_require__){function makePromisify(Promise){var co=coBluebird.use(Promise),promisify=function(fn,options){return"number"==typeof options?options={numArgs:options}:(void 0===options&&(options={}),void 0===options.numArgs&&(options.numArgs=0)),isGeneratorFn(fn)?co.wrap(fn):fn.length>options.numArgs?Promise.promisify(fn):Promise.method(fn)};return promisify.generators=function(obj){for(var name in obj){var fn=obj[name];isGeneratorFn(fn)&&(obj[name]=co.wrap(fn))}return obj},promisify.use=makePromisify,promisify}var Promise=__webpack_require__(29),coBluebird=__webpack_require__(33),isGeneratorFn=__webpack_require__(36).fn;module.exports=makePromisify(Promise)},function(module,exports,__webpack_require__){(function(process,global,setImmediate){/* @preserve * The MIT License (MIT) * * Copyright (c) 2013-2015 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ !function(e){module.exports=e()}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof _dereq_&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof _dereq_&&_dereq_,o=0;o0},Async.prototype.throwLater=function(fn,arg){if(1===arguments.length&&(arg=fn,fn=function(){throw arg}),"undefined"!=typeof setTimeout)setTimeout(function(){fn(arg)},0);else try{this._schedule(function(){fn(arg)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},util.hasDevTools?(schedule.isStatic&&(schedule=function(fn){setTimeout(fn,0)}),Async.prototype.invokeLater=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvokeLater.call(this,fn,receiver,arg):this._schedule(function(){setTimeout(function(){fn.call(receiver,arg)},100)})},Async.prototype.invoke=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvoke.call(this,fn,receiver,arg):this._schedule(function(){fn.call(receiver,arg)})},Async.prototype.settlePromises=function(promise){this._trampolineEnabled?AsyncSettlePromises.call(this,promise):this._schedule(function(){promise._settlePromises()})}):(Async.prototype.invokeLater=AsyncInvokeLater,Async.prototype.invoke=AsyncInvoke,Async.prototype.settlePromises=AsyncSettlePromises),Async.prototype.invokeFirst=function(fn,receiver,arg){this._normalQueue.unshift(fn,receiver,arg),this._queueTick()},Async.prototype._drainQueue=function(queue){for(;queue.length()>0;){var fn=queue.shift();if("function"==typeof fn){var receiver=queue.shift(),arg=queue.shift();fn.call(receiver,arg)}else fn._settlePromises()}},Async.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},Async.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},Async.prototype._reset=function(){this._isTickUsed=!1},module.exports=new Async,module.exports.firstLineError=firstLineError},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise){var rejectThis=function(_,e){this._reject(e)},targetRejected=function(e,context){context.promiseRejectionQueued=!0,context.bindingPromise._then(rejectThis,rejectThis,null,this,e)},bindingResolved=function(thisArg,context){this._isPending()&&this._resolveCallback(context.target)},bindingRejected=function(e,context){context.promiseRejectionQueued||this._reject(e)};Promise.prototype.bind=function(thisArg){var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);ret._propagateFrom(this,1);var target=this._target();if(ret._setBoundTo(maybePromise),maybePromise instanceof Promise){var context={promiseRejectionQueued:!1,promise:ret,target:target,bindingPromise:maybePromise};target._then(INTERNAL,targetRejected,ret._progress,ret,context),maybePromise._then(bindingResolved,bindingRejected,ret._progress,ret,context)}else ret._resolveCallback(target);return ret},Promise.prototype._setBoundTo=function(obj){void 0!==obj?(this._bitField=131072|this._bitField,this._boundTo=obj):this._bitField=this._bitField&-131073},Promise.prototype._isBound=function(){return 131072===(131072&this._bitField)},Promise.bind=function(thisArg,value){var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);return ret._setBoundTo(maybePromise),maybePromise instanceof Promise?maybePromise._then(function(){ret._resolveCallback(value)},ret._reject,ret._progress,ret,null):ret._resolveCallback(value),ret}}},{}],4:[function(_dereq_,module,exports){"use strict";function noConflict(){try{Promise===bluebird&&(Promise=old)}catch(e){}return bluebird}var old;"undefined"!=typeof Promise&&(old=Promise);var bluebird=_dereq_("./promise.js")();bluebird.noConflict=noConflict,module.exports=bluebird},{"./promise.js":23}],5:[function(_dereq_,module,exports){"use strict";var cr=Object.create;if(cr){var callerCache=cr(null),getterCache=cr(null);callerCache[" size"]=getterCache[" size"]=0}module.exports=function(Promise){function ensureMethod(obj,methodName){var fn;if(null!=obj&&(fn=obj[methodName]),"function"!=typeof fn){var message="Object "+util.classString(obj)+" has no method '"+util.toString(methodName)+"'";throw new Promise.TypeError(message)}return fn}function caller(obj){var methodName=this.pop(),fn=ensureMethod(obj,methodName);return fn.apply(obj,this)}function namedGetter(obj){return obj[this]}function indexedGetter(obj){var index=+this;return index<0&&(index=Math.max(0,index+obj.length)),obj[index]}var getGetter,util=_dereq_("./util.js"),canEvaluate=util.canEvaluate;util.isIdentifier;Promise.prototype.call=function(methodName){for(var $_len=arguments.length,args=new Array($_len-1),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];return args.push(methodName),this._then(caller,void 0,void 0,args,void 0)},Promise.prototype.get=function(propertyName){var getter,isIndex="number"==typeof propertyName;if(isIndex)getter=indexedGetter;else if(canEvaluate){var maybeGetter=getGetter(propertyName);getter=null!==maybeGetter?maybeGetter:namedGetter}else getter=namedGetter;return this._then(getter,void 0,void 0,propertyName,void 0)}}},{"./util.js":38}],6:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise){var errors=_dereq_("./errors.js"),async=_dereq_("./async.js"),CancellationError=errors.CancellationError;Promise.prototype._cancel=function(reason){if(!this.isCancellable())return this;for(var parent,promiseToReject=this;void 0!==(parent=promiseToReject._cancellationParent)&&parent.isCancellable();)promiseToReject=parent;this._unsetCancellable(),promiseToReject._target()._rejectCallback(reason,!1,!0)},Promise.prototype.cancel=function(reason){return this.isCancellable()?(void 0===reason&&(reason=new CancellationError),async.invokeLater(this._cancel,this,reason),this):this},Promise.prototype.cancellable=function(){return this._cancellable()?this:(async.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},Promise.prototype.uncancellable=function(){var ret=this.then();return ret._unsetCancellable(),ret},Promise.prototype.fork=function(didFulfill,didReject,didProgress){var ret=this._then(didFulfill,didReject,didProgress,void 0,void 0);return ret._setCancellable(),ret._cancellationParent=void 0,ret}}},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){"use strict";module.exports=function(){function CapturedTrace(parent){this._parent=parent;var length=this._length=1+(void 0===parent?0:parent._length);captureStackTrace(this,CapturedTrace),length>32&&this.uncycle()}function reconstructStack(message,stacks){for(var i=0;i=0;--j)if(prev[j]===currentLastLine){commonRootMeetPoint=j;break}for(var j=commonRootMeetPoint;j>=0;--j){var line=prev[j];if(current[currentLastIndex]!==line)break;current.pop(),currentLastIndex--}current=prev}}function cleanStack(stack){for(var ret=[],i=0;i0&&(stack=stack.slice(i)),stack}function formatNonError(obj){var str;if("function"==typeof obj)str="[function "+(obj.name||"anonymous")+"]";else{str=obj.toString();var ruselessToString=/\[object [a-zA-Z0-9$_]+\]/;if(ruselessToString.test(str))try{var newStr=JSON.stringify(obj);str=newStr}catch(e){}0===str.length&&(str="(empty array)")}return"(<"+snip(str)+">, no stack trace)"}function snip(str){var maxChars=41;return str.length=0;--i){var stack=nodes[i].stack;void 0===stackToIndex[stack]&&(stackToIndex[stack]=i)}for(var i=0;i0&&(nodes[index-1]._parent=void 0,nodes[index-1]._length=1),nodes[i]._parent=void 0,nodes[i]._length=1;var cycleEdgeNode=i>0?nodes[i-1]:this;index=0;--j)nodes[j]._length=currentChildLength,currentChildLength++;return}}}},CapturedTrace.prototype.parent=function(){return this._parent},CapturedTrace.prototype.hasParent=function(){return void 0!==this._parent},CapturedTrace.prototype.attachExtraTrace=function(error){if(!error.__stackCleaned__){this.uncycle();for(var parsed=CapturedTrace.parseStackAndMessage(error),message=parsed.message,stacks=[parsed.stack],trace=this;void 0!==trace;)stacks.push(cleanStack(trace.stack.split("\n"))),trace=trace._parent;removeCommonRoots(stacks),removeDuplicateOrEmptyJumps(stacks),util.notEnumerableProp(error,"stack",reconstructStack(message,stacks)),util.notEnumerableProp(error,"__stackCleaned__",!0)}},CapturedTrace.parseStackAndMessage=function(error){var stack=error.stack,message=error.toString();return stack="string"==typeof stack&&stack.length>0?stackFramesAsArray(error):[" (No stack trace)"],{message:message,stack:cleanStack(stack)}},CapturedTrace.formatAndLogError=function(error,title){if("undefined"!=typeof console){var message;if("object"==typeof error||"function"==typeof error){var stack=error.stack;message=title+formatStack(stack,error)}else message=title+String(error);"function"==typeof warn?warn(message):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(message)}},CapturedTrace.unhandledRejection=function(reason){CapturedTrace.formatAndLogError(reason,"^--- With additional stack trace: ")},CapturedTrace.isSupported=function(){return"function"==typeof captureStackTrace},CapturedTrace.fireRejectionEvent=function(name,localHandler,reason,promise){var localEventFired=!1;try{"function"==typeof localHandler&&(localEventFired=!0,"rejectionHandled"===name?localHandler(promise):localHandler(reason,promise))}catch(e){async.throwLater(e)}var globalEventFired=!1;try{globalEventFired=fireGlobalEvent(name,reason,promise)}catch(e){globalEventFired=!0,async.throwLater(e)}var domEventFired=!1;if(fireDomEvent)try{domEventFired=fireDomEvent(name.toLowerCase(),{reason:reason,promise:promise})}catch(e){domEventFired=!0,async.throwLater(e)}globalEventFired||localEventFired||domEventFired||"unhandledRejection"!==name||CapturedTrace.formatAndLogError(reason,"Unhandled rejection ")};var shouldIgnore=function(){return!1},parseLineInfoRegex=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;CapturedTrace.setBounds=function(firstLineError,lastLineError){if(CapturedTrace.isSupported()){for(var firstFileName,lastFileName,firstStackLines=firstLineError.stack.split("\n"),lastStackLines=lastLineError.stack.split("\n"),firstIndex=-1,lastIndex=-1,i=0;i=lastIndex||(shouldIgnore=function(line){if(bluebirdFramePattern.test(line))return!0;var info=parseLineInfo(line);return!!(info&&info.fileName===firstFileName&&firstIndex<=info.line&&info.line<=lastIndex)})}};var fireDomEvent,captureStackTrace=function(){var v8stackFramePattern=/^\s*at\s*/,v8stackFormatter=function(stack,error){return"string"==typeof stack?stack:void 0!==error.name&&void 0!==error.message?error.toString():formatNonError(error)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter;var captureStackTrace=Error.captureStackTrace;return shouldIgnore=function(line){return bluebirdFramePattern.test(line)},function(receiver,ignoreUntil){Error.stackTraceLimit=Error.stackTraceLimit+6,captureStackTrace(receiver,ignoreUntil),Error.stackTraceLimit=Error.stackTraceLimit-6}}var err=new Error;if("string"==typeof err.stack&&err.stack.split("\n")[0].indexOf("stackDetection@")>=0)return stackFramePattern=/@/,formatStack=v8stackFormatter,indentStackFrames=!0,function(o){o.stack=(new Error).stack};var hasStackAfterThrow;try{throw new Error}catch(e){hasStackAfterThrow="stack"in e}return"stack"in err||!hasStackAfterThrow||"number"!=typeof Error.stackTraceLimit?(formatStack=function(stack,error){return"string"==typeof stack?stack:"object"!=typeof error&&"function"!=typeof error||void 0===error.name||void 0===error.message?formatNonError(error):error.toString()},null):(stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter,function(o){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){o.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),fireGlobalEvent=function(){if(util.isNode)return function(name,reason,promise){return"rejectionHandled"===name?process.emit(name,promise):process.emit(name,reason,promise)};var customEventWorks=!1,anyEventWorks=!0;try{var ev=new self.CustomEvent("test");customEventWorks=ev instanceof CustomEvent}catch(e){}if(!customEventWorks)try{var event=document.createEvent("CustomEvent");event.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(event)}catch(e){anyEventWorks=!1}anyEventWorks&&(fireDomEvent=function(type,detail){var event;return customEventWorks?event=new self.CustomEvent(type,{detail:detail,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(event=document.createEvent("CustomEvent"),event.initCustomEvent(type,!1,!0,detail)),!!event&&!self.dispatchEvent(event)});var toWindowMethodNameMap={};return toWindowMethodNameMap.unhandledRejection="onunhandledRejection".toLowerCase(),toWindowMethodNameMap.rejectionHandled="onrejectionHandled".toLowerCase(),function(name,reason,promise){var methodName=toWindowMethodNameMap[name],method=self[methodName];return!!method&&("rejectionHandled"===name?method.call(self,promise):method.call(self,reason,promise),!0)}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(warn=function(message){console.warn(message)},util.isNode&&process.stderr.isTTY?warn=function(message){process.stderr.write(""+message+"\n")}:util.isNode||"string"!=typeof(new Error).stack||(warn=function(message){console.warn("%c"+message,"color: red")})),CapturedTrace}},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){"use strict";module.exports=function(NEXT_FILTER){function CatchFilter(instances,callback,promise){this._instances=instances,this._callback=callback,this._promise=promise}function safePredicate(predicate,e){var safeObject={},retfilter=tryCatch(predicate).call(safeObject,e);if(retfilter===errorObj)return retfilter;var safeKeys=keys(safeObject);return safeKeys.length?(errorObj.e=new TypeError("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),errorObj):retfilter}var util=_dereq_("./util.js"),errors=_dereq_("./errors.js"),tryCatch=util.tryCatch,errorObj=util.errorObj,keys=_dereq_("./es5.js").keys,TypeError=errors.TypeError;return CatchFilter.prototype.doFilter=function(e){for(var cb=this._callback,promise=this._promise,boundTo=promise._boundValue(),i=0,len=this._instances.length;i=0)return contextStack[lastIndex]}var contextStack=[];return Context.prototype._pushContext=function(){isDebugging()&&void 0!==this._trace&&contextStack.push(this._trace)},Context.prototype._popContext=function(){isDebugging()&&void 0!==this._trace&&contextStack.pop()},Promise.prototype._peekContext=peekContext,Promise.prototype._pushContext=Context.prototype._pushContext,Promise.prototype._popContext=Context.prototype._popContext,createContext}},{}],10:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,CapturedTrace){var unhandledRejectionHandled,possiblyUnhandledRejection,getDomain=Promise._getDomain,async=_dereq_("./async.js"),Warning=_dereq_("./errors.js").Warning,util=_dereq_("./util.js"),canAttachTrace=util.canAttachTrace,debugging=util.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return util.isNode&&0==process.env.BLUEBIRD_DEBUG&&(debugging=!1),debugging&&async.disableTrampolineIfNecessary(),Promise.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},Promise.prototype._ensurePossibleRejectionHandled=function(){0===(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),async.invokeLater(this._notifyUnhandledRejection,this,void 0))},Promise.prototype._notifyUnhandledRejectionIsHandled=function(){CapturedTrace.fireRejectionEvent("rejectionHandled",unhandledRejectionHandled,void 0,this)},Promise.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var reason=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),CapturedTrace.fireRejectionEvent("unhandledRejection",possiblyUnhandledRejection,reason,this)}},Promise.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},Promise.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-524289},Promise.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},Promise.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},Promise.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-2097153,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},Promise.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},Promise.prototype._setCarriedStackTrace=function(capturedTrace){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=capturedTrace},Promise.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},Promise.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},Promise.prototype._captureStackTrace=function(){return debugging&&(this._trace=new CapturedTrace(this._peekContext())),this},Promise.prototype._attachExtraTrace=function(error,ignoreSelf){if(debugging&&canAttachTrace(error)){var trace=this._trace;if(void 0!==trace&&ignoreSelf&&(trace=trace._parent),void 0!==trace)trace.attachExtraTrace(error);else if(!error.__stackCleaned__){var parsed=CapturedTrace.parseStackAndMessage(error);util.notEnumerableProp(error,"stack",parsed.message+"\n"+parsed.stack.join("\n")),util.notEnumerableProp(error,"__stackCleaned__",!0)}}},Promise.prototype._warn=function(message){var warning=new Warning(message),ctx=this._peekContext();if(ctx)ctx.attachExtraTrace(warning);else{var parsed=CapturedTrace.parseStackAndMessage(warning);warning.stack=parsed.message+"\n"+parsed.stack.join("\n")}CapturedTrace.formatAndLogError(warning,"")},Promise.onPossiblyUnhandledRejection=function(fn){var domain=getDomain();possiblyUnhandledRejection="function"==typeof fn?null===domain?fn:domain.bind(fn):void 0},Promise.onUnhandledRejectionHandled=function(fn){var domain=getDomain();unhandledRejectionHandled="function"==typeof fn?null===domain?fn:domain.bind(fn):void 0},Promise.longStackTraces=function(){if(async.haveItemsQueued()&&debugging===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");debugging=CapturedTrace.isSupported(),debugging&&async.disableTrampolineIfNecessary()},Promise.hasLongStackTraces=function(){return debugging&&CapturedTrace.isSupported()},CapturedTrace.isSupported()||(Promise.longStackTraces=function(){},debugging=!1),function(){return debugging}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){"use strict";var util=_dereq_("./util.js"),isPrimitive=util.isPrimitive;module.exports=function(Promise){var returner=function(){return this},thrower=function(){throw this},returnUndefined=function(){},throwUndefined=function(){throw void 0},wrapper=function(value,action){return 1===action?function(){throw value}:2===action?function(){return value}:void 0};Promise.prototype.return=Promise.prototype.thenReturn=function(value){return void 0===value?this.then(returnUndefined):isPrimitive(value)?this._then(wrapper(value,2),void 0,void 0,void 0,void 0):(value instanceof Promise&&value._ignoreRejections(),this._then(returner,void 0,void 0,value,void 0))},Promise.prototype.throw=Promise.prototype.thenThrow=function(reason){return void 0===reason?this.then(throwUndefined):isPrimitive(reason)?this._then(wrapper(reason,1),void 0,void 0,void 0,void 0):this._then(thrower,void 0,void 0,reason,void 0)}}},{"./util.js":38}],12:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){var PromiseReduce=Promise.reduce;Promise.prototype.each=function(fn){return PromiseReduce(this,fn,null,INTERNAL)},Promise.each=function(promises,fn){return PromiseReduce(promises,fn,null,INTERNAL)}}},{}],13:[function(_dereq_,module,exports){"use strict";function subError(nameProperty,defaultMessage){function SubError(message){return this instanceof SubError?(notEnumerableProp(this,"message","string"==typeof message?message:defaultMessage),notEnumerableProp(this,"name",nameProperty),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new SubError(message)}return inherits(SubError,Error),SubError}function OperationalError(message){return this instanceof OperationalError?(notEnumerableProp(this,"name","OperationalError"),notEnumerableProp(this,"message",message),this.cause=message,this.isOperational=!0,void(message instanceof Error?(notEnumerableProp(this,"message",message.message),notEnumerableProp(this,"stack",message.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new OperationalError(message)}var _TypeError,_RangeError,es5=_dereq_("./es5.js"),Objectfreeze=es5.freeze,util=_dereq_("./util.js"),inherits=util.inherits,notEnumerableProp=util.notEnumerableProp,Warning=subError("Warning","warning"),CancellationError=subError("CancellationError","cancellation error"),TimeoutError=subError("TimeoutError","timeout error"),AggregateError=subError("AggregateError","aggregate error");try{_TypeError=TypeError,_RangeError=RangeError}catch(e){_TypeError=subError("TypeError","type error"),_RangeError=subError("RangeError","range error")}for(var methods="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),i=0;i0&&"function"==typeof arguments[last]){fn=arguments[last];var ret}for(var $_len=arguments.length,args=new Array($_len),$_i=0;$_i<$_len;++$_i)args[$_i]=arguments[$_i];fn&&args.pop();var ret=new PromiseArray(args).promise();return void 0!==fn?ret.spread(fn):ret}}},{"./util.js":38}],19:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL){function MappingPromiseArray(promises,fn,limit,_filter){this.constructor$(promises),this._promise._captureStackTrace();var domain=getDomain();this._callback=null===domain?fn:domain.bind(fn),this._preservedValues=_filter===INTERNAL?new Array(this.length()):null,this._limit=limit,this._inFlight=0,this._queue=limit>=1?[]:EMPTY_ARRAY,async.invoke(init,this,void 0)}function init(){this._init$(void 0,-2)}function map(promises,fn,options,_filter){var limit="object"==typeof options&&null!==options?options.concurrency:0;return limit="number"==typeof limit&&isFinite(limit)&&limit>=1?limit:0,new MappingPromiseArray(promises,fn,limit,_filter)}var getDomain=Promise._getDomain,async=_dereq_("./async.js"),util=_dereq_("./util.js"),tryCatch=util.tryCatch,errorObj=util.errorObj,PENDING={},EMPTY_ARRAY=[];util.inherits(MappingPromiseArray,PromiseArray),MappingPromiseArray.prototype._init=function(){},MappingPromiseArray.prototype._promiseFulfilled=function(value,index){var values=this._values,length=this.length(),preservedValues=this._preservedValues,limit=this._limit;if(values[index]===PENDING){if(values[index]=value,limit>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(limit>=1&&this._inFlight>=limit)return values[index]=value,void this._queue.push(index);null!==preservedValues&&(preservedValues[index]=value);var callback=this._callback,receiver=this._promise._boundValue();this._promise._pushContext();var ret=tryCatch(callback).call(receiver,value,index,length);if(this._promise._popContext(),ret===errorObj)return this._reject(ret.e);var maybePromise=tryConvertToPromise(ret,this._promise);if(maybePromise instanceof Promise){if(maybePromise=maybePromise._target(),maybePromise._isPending())return limit>=1&&this._inFlight++,values[index]=PENDING,maybePromise._proxyPromiseArray(this,index);if(!maybePromise._isFulfilled())return this._reject(maybePromise._reason());ret=maybePromise._value()}values[index]=ret}var totalResolved=++this._totalResolved;totalResolved>=length&&(null!==preservedValues?this._filter(values,preservedValues):this._resolve(values))},MappingPromiseArray.prototype._drainQueue=function(){for(var queue=this._queue,limit=this._limit,values=this._values;queue.length>0&&this._inFlight1){var i,catchInstances=new Array(len-1),j=0;for(i=0;i0&&"function"!=typeof didFulfill&&"function"!=typeof didReject){var msg=".then() only accepts functions but was passed: "+util.classString(didFulfill);arguments.length>1&&(msg+=", "+util.classString(didReject)),this._warn(msg)}return this._then(didFulfill,didReject,didProgress,void 0,void 0)},Promise.prototype.done=function(didFulfill,didReject,didProgress){var promise=this._then(didFulfill,didReject,didProgress,void 0,void 0);promise._setIsFinal()},Promise.prototype.spread=function(didFulfill,didReject){return this.all()._then(didFulfill,didReject,void 0,APPLY,void 0)},Promise.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},Promise.prototype.toJSON=function(){var ret={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(ret.fulfillmentValue=this.value(),ret.isFulfilled=!0):this.isRejected()&&(ret.rejectionReason=this.reason(),ret.isRejected=!0),ret},Promise.prototype.all=function(){return new PromiseArray(this).promise()},Promise.prototype.error=function(fn){return this.caught(util.originatesFromRejection,fn)},Promise.getNewLibraryCopy=module.exports,Promise.is=function(val){return val instanceof Promise},Promise.fromNode=function(fn){var ret=new Promise(INTERNAL),result=tryCatch(fn)(nodebackForPromise(ret));return result===errorObj&&ret._rejectCallback(result.e,!0,!0),ret},Promise.all=function(promises){return new PromiseArray(promises).promise()},Promise.defer=Promise.pending=function(){var promise=new Promise(INTERNAL);return new PromiseResolver(promise)},Promise.cast=function(obj){var ret=tryConvertToPromise(obj);if(!(ret instanceof Promise)){var val=ret;ret=new Promise(INTERNAL),ret._fulfillUnchecked(val)}return ret},Promise.resolve=Promise.fulfilled=Promise.cast,Promise.reject=Promise.rejected=function(reason){var ret=new Promise(INTERNAL);return ret._captureStackTrace(),ret._rejectCallback(reason,!0),ret},Promise.setScheduler=function(fn){if("function"!=typeof fn)throw new TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");var prev=async._schedule;return async._schedule=fn,prev},Promise.prototype._then=function(didFulfill,didReject,didProgress,receiver,internalData){var haveInternalData=void 0!==internalData,ret=haveInternalData?internalData:new Promise(INTERNAL);haveInternalData||(ret._propagateFrom(this,5),ret._captureStackTrace());var target=this._target();target!==this&&(void 0===receiver&&(receiver=this._boundTo),haveInternalData||ret._setIsMigrated());var callbackIndex=target._addCallbacks(didFulfill,didReject,didProgress,ret,receiver,getDomain());return target._isResolved()&&!target._isSettlePromisesQueued()&&async.invoke(target._settlePromiseAtPostResolution,target,callbackIndex),ret},Promise.prototype._settlePromiseAtPostResolution=function(index){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(index)},Promise.prototype._length=function(){return 131071&this._bitField},Promise.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},Promise.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},Promise.prototype._setLength=function(len){this._bitField=this._bitField&-131072|131071&len},Promise.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},Promise.prototype._setRejected=function(){this._bitField=134217728|this._bitField},Promise.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},Promise.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},Promise.prototype._isFinal=function(){return(33554432&this._bitField)>0},Promise.prototype._cancellable=function(){return(67108864&this._bitField)>0},Promise.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},Promise.prototype._unsetCancellable=function(){this._bitField=this._bitField&-67108865},Promise.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},Promise.prototype._unsetIsMigrated=function(){this._bitField=this._bitField&-4194305},Promise.prototype._isMigrated=function(){return(4194304&this._bitField)>0},Promise.prototype._receiverAt=function(index){var ret=0===index?this._receiver0:this[5*index-5+4];if(ret!==UNDEFINED_BINDING)return void 0===ret&&this._isBound()?this._boundValue():ret},Promise.prototype._promiseAt=function(index){return 0===index?this._promise0:this[5*index-5+3]},Promise.prototype._fulfillmentHandlerAt=function(index){return 0===index?this._fulfillmentHandler0:this[5*index-5+0]},Promise.prototype._rejectionHandlerAt=function(index){return 0===index?this._rejectionHandler0:this[5*index-5+1]},Promise.prototype._boundValue=function(){var ret=this._boundTo;return void 0!==ret&&ret instanceof Promise?ret.isFulfilled()?ret.value():void 0:ret},Promise.prototype._migrateCallbacks=function(follower,index){var fulfill=follower._fulfillmentHandlerAt(index),reject=follower._rejectionHandlerAt(index),progress=follower._progressHandlerAt(index),promise=follower._promiseAt(index),receiver=follower._receiverAt(index);promise instanceof Promise&&promise._setIsMigrated(),void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,progress,promise,receiver,null)},Promise.prototype._addCallbacks=function(fulfill,reject,progress,promise,receiver,domain){var index=this._length();if(index>=131066&&(index=0,this._setLength(0)),0===index)this._promise0=promise,void 0!==receiver&&(this._receiver0=receiver),"function"!=typeof fulfill||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===domain?fulfill:domain.bind(fulfill)),"function"==typeof reject&&(this._rejectionHandler0=null===domain?reject:domain.bind(reject)),"function"==typeof progress&&(this._progressHandler0=null===domain?progress:domain.bind(progress));else{var base=5*index-5;this[base+3]=promise,this[base+4]=receiver,"function"==typeof fulfill&&(this[base+0]=null===domain?fulfill:domain.bind(fulfill)),"function"==typeof reject&&(this[base+1]=null===domain?reject:domain.bind(reject)),"function"==typeof progress&&(this[base+2]=null===domain?progress:domain.bind(progress))}return this._setLength(index+1),index},Promise.prototype._setProxyHandlers=function(receiver,promiseSlotValue){var index=this._length();if(index>=131066&&(index=0,this._setLength(0)),0===index)this._promise0=promiseSlotValue,this._receiver0=receiver;else{var base=5*index-5;this[base+3]=promiseSlotValue,this[base+4]=receiver}this._setLength(index+1)},Promise.prototype._proxyPromiseArray=function(promiseArray,index){this._setProxyHandlers(promiseArray,index)},Promise.prototype._resolveCallback=function(value,shouldBind){if(!this._isFollowingOrFulfilledOrRejected()){if(value===this)return this._rejectCallback(makeSelfResolutionError(),!1,!0);var maybePromise=tryConvertToPromise(value,this);if(!(maybePromise instanceof Promise))return this._fulfill(value);var propagationFlags=1|(shouldBind?4:0);this._propagateFrom(maybePromise,propagationFlags);var promise=maybePromise._target();if(promise._isPending()){for(var len=this._length(),i=0;i0&&parent._cancellable()&&(this._setCancellable(),this._cancellationParent=parent),(4&flags)>0&&parent._isBound()&&this._setBoundTo(parent._boundTo)},Promise.prototype._fulfill=function(value){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(value)},Promise.prototype._reject=function(reason,carriedStackTrace){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(reason,carriedStackTrace)},Promise.prototype._settlePromiseAt=function(index){var promise=this._promiseAt(index),isPromise=promise instanceof Promise;if(isPromise&&promise._isMigrated())return promise._unsetIsMigrated(),async.invoke(this._settlePromiseAt,this,index);var handler=this._isFulfilled()?this._fulfillmentHandlerAt(index):this._rejectionHandlerAt(index),carriedStackTrace=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,value=this._settledValue,receiver=this._receiverAt(index);this._clearCallbackDataAtIndex(index),"function"==typeof handler?isPromise?this._settlePromiseFromHandler(handler,receiver,value,promise):handler.call(receiver,value,promise):receiver instanceof PromiseArray?receiver._isResolved()||(this._isFulfilled()?receiver._promiseFulfilled(value,promise):receiver._promiseRejected(value,promise)):isPromise&&(this._isFulfilled()?promise._fulfill(value):promise._reject(value,carriedStackTrace)),index>=4&&4===(31&index)&&async.invokeLater(this._setLength,this,0)},Promise.prototype._clearCallbackDataAtIndex=function(index){if(0===index)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var base=5*index-5;this[base+3]=this[base+4]=this[base+0]=this[base+1]=this[base+2]=void 0}},Promise.prototype._isSettlePromisesQueued=function(){return(this._bitField&-1073741824)===-1073741824},Promise.prototype._setSettlePromisesQueued=function(){this._bitField=this._bitField|-1073741824},Promise.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},Promise.prototype._queueSettlePromises=function(){async.settlePromises(this),this._setSettlePromisesQueued()},Promise.prototype._fulfillUnchecked=function(value){if(value===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._rejectUnchecked(err,void 0)}this._setFulfilled(),this._settledValue=value,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},Promise.prototype._rejectUncheckedCheckError=function(reason){var trace=util.ensureErrorObject(reason);this._rejectUnchecked(reason,trace===reason?void 0:trace)},Promise.prototype._rejectUnchecked=function(reason,trace){if(reason===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._rejectUnchecked(err)}return this._setRejected(),this._settledValue=reason,this._cleanValues(),this._isFinal()?void async.throwLater(function(e){throw"stack"in e&&async.invokeFirst(CapturedTrace.unhandledRejection,void 0,e),e},void 0===trace?reason:trace):(void 0!==trace&&trace!==reason&&this._setCarriedStackTrace(trace),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},Promise.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var len=this._length(),i=0;i=this._length&&this._resolve(this._values)},PromiseArray.prototype._promiseRejected=function(reason,index){this._totalResolved++,this._reject(reason)},PromiseArray.prototype.shouldCopyValues=function(){return!0},PromiseArray.prototype.getActualLength=function(len){return len},PromiseArray}},{"./util.js":38}],25:[function(_dereq_,module,exports){"use strict";function isUntypedError(obj){return obj instanceof Error&&es5.getPrototypeOf(obj)===Error.prototype}function wrapAsOperationalError(obj){var ret;if(isUntypedError(obj)){ret=new OperationalError(obj),ret.name=obj.name,ret.message=obj.message,ret.stack=obj.stack;for(var keys=es5.keys(obj),i=0;i2){for(var $_len=arguments.length,args=new Array($_len-1),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];promise._fulfill(args)}else promise._fulfill(value);promise=null}}}var PromiseResolver,util=_dereq_("./util.js"),maybeWrapAsError=util.maybeWrapAsError,errors=_dereq_("./errors.js"),TimeoutError=errors.TimeoutError,OperationalError=errors.OperationalError,haveGetters=util.haveGetters,es5=_dereq_("./es5.js"),rErrorKey=/^(?:name|message|stack|cause)$/;if(PromiseResolver=haveGetters?function(promise){this.promise=promise}:function(promise){this.promise=promise,this.asCallback=nodebackForPromise(promise),this.callback=this.asCallback},haveGetters){var prop={get:function(){return nodebackForPromise(this.promise)}};es5.defineProperty(PromiseResolver.prototype,"asCallback",prop),es5.defineProperty(PromiseResolver.prototype,"callback",prop)}PromiseResolver._nodebackForPromise=nodebackForPromise,PromiseResolver.prototype.toString=function(){return"[object PromiseResolver]"},PromiseResolver.prototype.resolve=PromiseResolver.prototype.fulfill=function(value){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(value)},PromiseResolver.prototype.reject=function(reason){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(reason)},PromiseResolver.prototype.progress=function(value){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(value)},PromiseResolver.prototype.cancel=function(err){this.promise.cancel(err)},PromiseResolver.prototype.timeout=function(){this.reject(new TimeoutError("timeout"))},PromiseResolver.prototype.isResolved=function(){return this.promise.isResolved()},PromiseResolver.prototype.toJSON=function(){return this.promise.toJSON()},module.exports=PromiseResolver},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function propsFilter(key){return!noCopyPropsPattern.test(key)}function isPromisified(fn){try{return fn.__isPromisified__===!0}catch(e){return!1}}function hasPromisified(obj,key,suffix){var val=util.getDataPropertyOrDefault(obj,key+suffix,defaultPromisified);return!!val&&isPromisified(val)}function checkValid(ret,suffix,suffixRegexp){for(var i=0;i=this._length){for(var val={},keyOffset=this.length(),i=0,len=this.length();i>1},Promise.prototype.props=function(){return props(this)},Promise.props=function(promises){return props(promises)}}},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){"use strict";function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j=this._length&&this._resolve(this._values)},SettledPromiseArray.prototype._promiseFulfilled=function(value,index){var ret=new PromiseInspection;ret._bitField=268435456,ret._settledValue=value,this._promiseResolved(index,ret)},SettledPromiseArray.prototype._promiseRejected=function(reason,index){var ret=new PromiseInspection;ret._bitField=134217728,ret._settledValue=reason,this._promiseResolved(index,ret)},Promise.settle=function(promises){return new SettledPromiseArray(promises).promise()},Promise.prototype.settle=function(){return new SettledPromiseArray(this).promise()}}},{"./util.js":38}],33:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection){function SomePromiseArray(values){this.constructor$(values),this._howMany=0,this._unwrap=!1,this._initialized=!1}function some(promises,howMany){if((0|howMany)!==howMany||howMany<0)return apiRejection("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(howMany),ret.init(),promise}var util=_dereq_("./util.js"),RangeError=_dereq_("./errors.js").RangeError,AggregateError=_dereq_("./errors.js").AggregateError,isArray=util.isArray;util.inherits(SomePromiseArray,PromiseArray),SomePromiseArray.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var isArrayResolved=isArray(this._values);!this._isResolved()&&isArrayResolved&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},SomePromiseArray.prototype.init=function(){this._initialized=!0,this._init()},SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=!0},SomePromiseArray.prototype.howMany=function(){return this._howMany},SomePromiseArray.prototype.setHowMany=function(count){this._howMany=count},SomePromiseArray.prototype._promiseFulfilled=function(value){this._addFulfilled(value),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},SomePromiseArray.prototype._promiseRejected=function(reason){if(this._addRejected(reason),this.howMany()>this._canPossiblyFulfill()){for(var e=new AggregateError,i=this.length();i0},PromiseInspection.prototype.isRejected=Promise.prototype._isRejected=function(){return(134217728&this._bitField)>0},PromiseInspection.prototype.isPending=Promise.prototype._isPending=function(){return 0===(402653184&this._bitField)},PromiseInspection.prototype.isResolved=Promise.prototype._isResolved=function(){return(402653184&this._bitField)>0},Promise.prototype.isPending=function(){return this._target()._isPending()},Promise.prototype.isRejected=function(){return this._target()._isRejected()},Promise.prototype.isFulfilled=function(){return this._target()._isFulfilled()},Promise.prototype.isResolved=function(){return this._target()._isResolved()},Promise.prototype._value=function(){return this._settledValue},Promise.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},Promise.prototype.value=function(){var target=this._target();if(!target.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return target._settledValue},Promise.prototype.reason=function(){var target=this._target();if(!target.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return target._unsetRejectionIsUnhandled(),target._settledValue},Promise.PromiseInspection=PromiseInspection}},{}],35:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function tryConvertToPromise(obj,context){if(isObject(obj)){if(obj instanceof Promise)return obj;if(isAnyBluebirdPromise(obj)){var ret=new Promise(INTERNAL);return obj._then(ret._fulfillUnchecked,ret._rejectUncheckedCheckError,ret._progressUnchecked,ret,null),ret}var then=util.tryCatch(getThen)(obj);if(then===errorObj){context&&context._pushContext();var ret=Promise.reject(then.e);return context&&context._popContext(),ret}if("function"==typeof then)return doThenable(obj,then,context)}return obj}function getThen(obj){return obj.then}function isAnyBluebirdPromise(obj){return hasProp.call(obj,"_promise0")}function doThenable(x,then,context){function resolveFromThenable(value){promise&&(promise._resolveCallback(value),promise=null)}function rejectFromThenable(reason){promise&&(promise._rejectCallback(reason,synchronous,!0),promise=null)}function progressFromThenable(value){promise&&"function"==typeof promise._progress&&promise._progress(value)}var promise=new Promise(INTERNAL),ret=promise;context&&context._pushContext(),promise._captureStackTrace(),context&&context._popContext();var synchronous=!0,result=util.tryCatch(then).call(x,resolveFromThenable,rejectFromThenable,progressFromThenable);return synchronous=!1,promise&&result===errorObj&&(promise._rejectCallback(result.e,!0,!0),promise=null),ret}var util=_dereq_("./util.js"),errorObj=util.errorObj,isObject=util.isObject,hasProp={}.hasOwnProperty;return tryConvertToPromise}},{"./util.js":38}],36:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function successClear(value){var handle=this;return handle instanceof Number&&(handle=+handle),clearTimeout(handle),value}function failureClear(reason){var handle=this;throw handle instanceof Number&&(handle=+handle),clearTimeout(handle),reason}var util=_dereq_("./util.js"),TimeoutError=Promise.TimeoutError,afterTimeout=function(promise,message){if(promise.isPending()){var err;!util.isPrimitive(message)&&message instanceof Error?err=message:("string"!=typeof message&&(message="operation timed out"),err=new TimeoutError(message)),util.markAsOriginatingFromRejection(err),promise._attachExtraTrace(err),promise._cancel(err)}},afterValue=function(value){return delay(+this).thenReturn(value)},delay=Promise.delay=function(value,ms){if(void 0===ms){ms=value,value=void 0;var ret=new Promise(INTERNAL);return setTimeout(function(){ret._fulfill()},ms),ret}return ms=+ms,Promise.resolve(value)._then(afterValue,null,null,ms,void 0)};Promise.prototype.delay=function(ms){return delay(this,ms)},Promise.prototype.timeout=function(ms,message){ms=+ms;var ret=this.then().cancellable();ret._cancellationParent=this;var handle=setTimeout(function(){afterTimeout(ret,message)},ms);return ret._then(successClear,failureClear,void 0,handle,void 0)}}},{"./util.js":38}],37:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,apiRejection,tryConvertToPromise,createContext){function inspectionMapper(inspections){for(var len=inspections.length,i=0;i=len)return ret.resolve();var maybePromise=castPreservingDisposable(resources[i++]);if(maybePromise instanceof Promise&&maybePromise._isDisposable()){try{maybePromise=tryConvertToPromise(maybePromise._getDisposer().tryDispose(inspection),resources.promise)}catch(e){return thrower(e)}if(maybePromise instanceof Promise)return maybePromise._then(iterator,thrower,null,null,null)}iterator()}var i=0,len=resources.length,ret=Promise.defer();return iterator(),ret.promise}function disposerSuccess(value){var inspection=new PromiseInspection;return inspection._settledValue=value,inspection._bitField=268435456,dispose(this,inspection).thenReturn(value)}function disposerFail(reason){var inspection=new PromiseInspection;return inspection._settledValue=reason,inspection._bitField=134217728,dispose(this,inspection).thenThrow(reason)}function Disposer(data,promise,context){this._data=data,this._promise=promise,this._context=context}function FunctionDisposer(fn,promise,context){this.constructor$(fn,promise,context)}function maybeUnwrapDisposer(value){return Disposer.isDisposer(value)?(this.resources[this.index]._setDisposable(value),value.promise()):value}var TypeError=_dereq_("./errors.js").TypeError,inherits=_dereq_("./util.js").inherits,PromiseInspection=Promise.PromiseInspection;Disposer.prototype.data=function(){return this._data},Disposer.prototype.promise=function(){return this._promise},Disposer.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},Disposer.prototype.tryDispose=function(inspection){var resource=this.resource(),context=this._context;void 0!==context&&context._pushContext();var ret=null!==resource?this.doDispose(resource,inspection):null;return void 0!==context&&context._popContext(),this._promise._unsetDisposable(),this._data=null,ret},Disposer.isDisposer=function(d){return null!=d&&"function"==typeof d.resource&&"function"==typeof d.tryDispose},inherits(FunctionDisposer,Disposer),FunctionDisposer.prototype.doDispose=function(resource,inspection){var fn=this.data();return fn.call(resource,resource,inspection)},Promise.using=function(){var len=arguments.length;if(len<2)return apiRejection("you must pass at least 2 arguments to Promise.using");var fn=arguments[len-1];if("function"!=typeof fn)return apiRejection("fn must be a function\n\n See http://goo.gl/916lJJ\n");var input,spreadArgs=!0;2===len&&Array.isArray(arguments[0])?(input=arguments[0],len=input.length,spreadArgs=!1):(input=arguments,len--);for(var resources=new Array(len),i=0;i0},Promise.prototype._getDisposer=function(){return this._disposer},Promise.prototype._unsetDisposable=function(){this._bitField=this._bitField&-262145,this._disposer=void 0},Promise.prototype.disposer=function(fn){if("function"==typeof fn)return new FunctionDisposer(fn,this,createContext());throw new TypeError}}},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){"use strict";function tryCatcher(){try{var target=tryCatchTarget;return tryCatchTarget=null,target.apply(this,arguments)}catch(e){return errorObj.e=e,errorObj}}function tryCatch(fn){return tryCatchTarget=fn,tryCatcher}function isPrimitive(val){return null==val||val===!0||val===!1||"string"==typeof val||"number"==typeof val}function isObject(value){return!isPrimitive(value)}function maybeWrapAsError(maybeError){return isPrimitive(maybeError)?new Error(safeToString(maybeError)):maybeError}function withAppended(target,appendee){var i,len=target.length,ret=new Array(len+1);for(i=0;i1,hasMethodsOtherThanConstructor=keys.length>0&&!(1===keys.length&&"constructor"===keys[0]),hasThisAssignmentAndStaticMethods=thisAssignmentPattern.test(fn+"")&&es5.names(fn).length>0;if(hasMethods||hasMethodsOtherThanConstructor||hasThisAssignmentAndStaticMethods)return!0}return!1}catch(e){return!1}}function toFastProperties(obj){function f(){}f.prototype=obj;for(var l=8;l--;)new f;return obj}function isIdentifier(str){return rident.test(str)}function filledRange(count,prefix,suffix){for(var ret=new Array(count),i=0;i10||version[0]>0}(),ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(exports,__webpack_require__(30),function(){return this}(),__webpack_require__(31).setImmediate)},function(module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,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)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i=0&&(item._idleTimeoutId=setTimeout(function(){item._onTimeout&&item._onTimeout()},msecs))},__webpack_require__(32),exports.setImmediate="undefined"!=typeof self&&self.setImmediate||"undefined"!=typeof global&&global.setImmediate||this&&this.setImmediate,exports.clearImmediate="undefined"!=typeof self&&self.clearImmediate||"undefined"!=typeof global&&global.clearImmediate||this&&this.clearImmediate}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){(function(global,process){!function(global,undefined){"use strict";function setImmediate(callback){"function"!=typeof callback&&(callback=new Function(""+callback));for(var args=new Array(arguments.length-1),i=0;i2&&(res=slice.call(arguments,1)),void resolve(res))})})}function arrayToPromise(obj){return Promise.all(obj.map(toPromise,this))}function objectToPromise(obj){function defer(promise,key){results[key]=void 0,promises.push(promise.then(function(res){results[key]=res}))}for(var results=new obj.constructor,keys=Object.keys(obj),promises=[],i=0;i0},Async.prototype.throwLater=function(fn,arg){if(1===arguments.length&&(arg=fn,fn=function(){throw arg}),"undefined"!=typeof setTimeout)setTimeout(function(){fn(arg)},0);else try{this._schedule(function(){fn(arg)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},util.hasDevTools?(schedule.isStatic&&(schedule=function(fn){setTimeout(fn,0)}),Async.prototype.invokeLater=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvokeLater.call(this,fn,receiver,arg):this._schedule(function(){setTimeout(function(){fn.call(receiver,arg)},100)})},Async.prototype.invoke=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvoke.call(this,fn,receiver,arg):this._schedule(function(){fn.call(receiver,arg)})},Async.prototype.settlePromises=function(promise){this._trampolineEnabled?AsyncSettlePromises.call(this,promise):this._schedule(function(){promise._settlePromises()})}):(Async.prototype.invokeLater=AsyncInvokeLater,Async.prototype.invoke=AsyncInvoke,Async.prototype.settlePromises=AsyncSettlePromises),Async.prototype.invokeFirst=function(fn,receiver,arg){this._normalQueue.unshift(fn,receiver,arg),this._queueTick()},Async.prototype._drainQueue=function(queue){for(;queue.length()>0;){var fn=queue.shift();if("function"==typeof fn){var receiver=queue.shift(),arg=queue.shift();fn.call(receiver,arg)}else fn._settlePromises()}},Async.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},Async.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},Async.prototype._reset=function(){this._isTickUsed=!1},module.exports=new Async,module.exports.firstLineError=firstLineError},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise){var rejectThis=function(_,e){this._reject(e)},targetRejected=function(e,context){context.promiseRejectionQueued=!0,context.bindingPromise._then(rejectThis,rejectThis,null,this,e)},bindingResolved=function(thisArg,context){this._isPending()&&this._resolveCallback(context.target)},bindingRejected=function(e,context){context.promiseRejectionQueued||this._reject(e)};Promise.prototype.bind=function(thisArg){var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);ret._propagateFrom(this,1);var target=this._target();if(ret._setBoundTo(maybePromise),maybePromise instanceof Promise){var context={promiseRejectionQueued:!1,promise:ret,target:target,bindingPromise:maybePromise};target._then(INTERNAL,targetRejected,ret._progress,ret,context),maybePromise._then(bindingResolved,bindingRejected,ret._progress,ret,context)}else ret._resolveCallback(target);return ret},Promise.prototype._setBoundTo=function(obj){void 0!==obj?(this._bitField=131072|this._bitField,this._boundTo=obj):this._bitField=this._bitField&-131073},Promise.prototype._isBound=function(){return 131072===(131072&this._bitField)},Promise.bind=function(thisArg,value){var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);return ret._setBoundTo(maybePromise),maybePromise instanceof Promise?maybePromise._then(function(){ret._resolveCallback(value)},ret._reject,ret._progress,ret,null):ret._resolveCallback(value),ret}}},{}],4:[function(_dereq_,module,exports){"use strict";function noConflict(){try{Promise===bluebird&&(Promise=old)}catch(e){}return bluebird}var old;"undefined"!=typeof Promise&&(old=Promise);var bluebird=_dereq_("./promise.js")();bluebird.noConflict=noConflict,module.exports=bluebird},{"./promise.js":23}],5:[function(_dereq_,module,exports){"use strict";var cr=Object.create;if(cr){var callerCache=cr(null),getterCache=cr(null);callerCache[" size"]=getterCache[" size"]=0}module.exports=function(Promise){function ensureMethod(obj,methodName){var fn;if(null!=obj&&(fn=obj[methodName]),"function"!=typeof fn){var message="Object "+util.classString(obj)+" has no method '"+util.toString(methodName)+"'";throw new Promise.TypeError(message)}return fn}function caller(obj){var methodName=this.pop(),fn=ensureMethod(obj,methodName);return fn.apply(obj,this)}function namedGetter(obj){return obj[this]}function indexedGetter(obj){var index=+this;return index<0&&(index=Math.max(0,index+obj.length)),obj[index]}var getGetter,util=_dereq_("./util.js"),canEvaluate=util.canEvaluate;util.isIdentifier;Promise.prototype.call=function(methodName){for(var $_len=arguments.length,args=new Array($_len-1),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];return args.push(methodName),this._then(caller,void 0,void 0,args,void 0)},Promise.prototype.get=function(propertyName){var getter,isIndex="number"==typeof propertyName;if(isIndex)getter=indexedGetter;else if(canEvaluate){var maybeGetter=getGetter(propertyName);getter=null!==maybeGetter?maybeGetter:namedGetter}else getter=namedGetter;return this._then(getter,void 0,void 0,propertyName,void 0)}}},{"./util.js":38}],6:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise){var errors=_dereq_("./errors.js"),async=_dereq_("./async.js"),CancellationError=errors.CancellationError;Promise.prototype._cancel=function(reason){if(!this.isCancellable())return this;for(var parent,promiseToReject=this;void 0!==(parent=promiseToReject._cancellationParent)&&parent.isCancellable();)promiseToReject=parent;this._unsetCancellable(),promiseToReject._target()._rejectCallback(reason,!1,!0)},Promise.prototype.cancel=function(reason){return this.isCancellable()?(void 0===reason&&(reason=new CancellationError),async.invokeLater(this._cancel,this,reason),this):this},Promise.prototype.cancellable=function(){return this._cancellable()?this:(async.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},Promise.prototype.uncancellable=function(){var ret=this.then();return ret._unsetCancellable(),ret},Promise.prototype.fork=function(didFulfill,didReject,didProgress){var ret=this._then(didFulfill,didReject,didProgress,void 0,void 0);return ret._setCancellable(),ret._cancellationParent=void 0,ret}}},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){"use strict";module.exports=function(){function CapturedTrace(parent){this._parent=parent;var length=this._length=1+(void 0===parent?0:parent._length);captureStackTrace(this,CapturedTrace),length>32&&this.uncycle()}function reconstructStack(message,stacks){for(var i=0;i=0;--j)if(prev[j]===currentLastLine){commonRootMeetPoint=j;break}for(var j=commonRootMeetPoint;j>=0;--j){var line=prev[j];if(current[currentLastIndex]!==line)break;current.pop(),currentLastIndex--}current=prev}}function cleanStack(stack){for(var ret=[],i=0;i0&&(stack=stack.slice(i)),stack}function formatNonError(obj){var str;if("function"==typeof obj)str="[function "+(obj.name||"anonymous")+"]";else{str=obj.toString();var ruselessToString=/\[object [a-zA-Z0-9$_]+\]/;if(ruselessToString.test(str))try{var newStr=JSON.stringify(obj);str=newStr}catch(e){}0===str.length&&(str="(empty array)")}return"(<"+snip(str)+">, no stack trace)"}function snip(str){var maxChars=41;return str.length=0;--i){var stack=nodes[i].stack;void 0===stackToIndex[stack]&&(stackToIndex[stack]=i)}for(var i=0;i0&&(nodes[index-1]._parent=void 0,nodes[index-1]._length=1),nodes[i]._parent=void 0,nodes[i]._length=1;var cycleEdgeNode=i>0?nodes[i-1]:this;index=0;--j)nodes[j]._length=currentChildLength,currentChildLength++;return}}}},CapturedTrace.prototype.parent=function(){return this._parent},CapturedTrace.prototype.hasParent=function(){return void 0!==this._parent},CapturedTrace.prototype.attachExtraTrace=function(error){if(!error.__stackCleaned__){this.uncycle();for(var parsed=CapturedTrace.parseStackAndMessage(error),message=parsed.message,stacks=[parsed.stack],trace=this;void 0!==trace;)stacks.push(cleanStack(trace.stack.split("\n"))),trace=trace._parent;removeCommonRoots(stacks),removeDuplicateOrEmptyJumps(stacks),util.notEnumerableProp(error,"stack",reconstructStack(message,stacks)),util.notEnumerableProp(error,"__stackCleaned__",!0)}},CapturedTrace.parseStackAndMessage=function(error){var stack=error.stack,message=error.toString();return stack="string"==typeof stack&&stack.length>0?stackFramesAsArray(error):[" (No stack trace)"],{message:message,stack:cleanStack(stack)}},CapturedTrace.formatAndLogError=function(error,title){if("undefined"!=typeof console){var message;if("object"==typeof error||"function"==typeof error){var stack=error.stack;message=title+formatStack(stack,error)}else message=title+String(error);"function"==typeof warn?warn(message):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(message)}},CapturedTrace.unhandledRejection=function(reason){CapturedTrace.formatAndLogError(reason,"^--- With additional stack trace: ")},CapturedTrace.isSupported=function(){return"function"==typeof captureStackTrace},CapturedTrace.fireRejectionEvent=function(name,localHandler,reason,promise){var localEventFired=!1;try{"function"==typeof localHandler&&(localEventFired=!0,"rejectionHandled"===name?localHandler(promise):localHandler(reason,promise))}catch(e){async.throwLater(e)}var globalEventFired=!1;try{globalEventFired=fireGlobalEvent(name,reason,promise)}catch(e){globalEventFired=!0,async.throwLater(e)}var domEventFired=!1;if(fireDomEvent)try{domEventFired=fireDomEvent(name.toLowerCase(),{reason:reason,promise:promise})}catch(e){domEventFired=!0,async.throwLater(e)}globalEventFired||localEventFired||domEventFired||"unhandledRejection"!==name||CapturedTrace.formatAndLogError(reason,"Unhandled rejection ")};var shouldIgnore=function(){return!1},parseLineInfoRegex=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;CapturedTrace.setBounds=function(firstLineError,lastLineError){if(CapturedTrace.isSupported()){for(var firstFileName,lastFileName,firstStackLines=firstLineError.stack.split("\n"),lastStackLines=lastLineError.stack.split("\n"),firstIndex=-1,lastIndex=-1,i=0;i=lastIndex||(shouldIgnore=function(line){if(bluebirdFramePattern.test(line))return!0;var info=parseLineInfo(line);return!!(info&&info.fileName===firstFileName&&firstIndex<=info.line&&info.line<=lastIndex)})}};var fireDomEvent,captureStackTrace=function(){var v8stackFramePattern=/^\s*at\s*/,v8stackFormatter=function(stack,error){return"string"==typeof stack?stack:void 0!==error.name&&void 0!==error.message?error.toString():formatNonError(error)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter;var captureStackTrace=Error.captureStackTrace;return shouldIgnore=function(line){return bluebirdFramePattern.test(line)},function(receiver,ignoreUntil){Error.stackTraceLimit=Error.stackTraceLimit+6,captureStackTrace(receiver,ignoreUntil),Error.stackTraceLimit=Error.stackTraceLimit-6}}var err=new Error;if("string"==typeof err.stack&&err.stack.split("\n")[0].indexOf("stackDetection@")>=0)return stackFramePattern=/@/,formatStack=v8stackFormatter,indentStackFrames=!0,function(o){o.stack=(new Error).stack};var hasStackAfterThrow;try{throw new Error}catch(e){hasStackAfterThrow="stack"in e}return"stack"in err||!hasStackAfterThrow||"number"!=typeof Error.stackTraceLimit?(formatStack=function(stack,error){return"string"==typeof stack?stack:"object"!=typeof error&&"function"!=typeof error||void 0===error.name||void 0===error.message?formatNonError(error):error.toString()},null):(stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter,function(o){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){o.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),fireGlobalEvent=function(){if(util.isNode)return function(name,reason,promise){return"rejectionHandled"===name?process.emit(name,promise):process.emit(name,reason,promise)};var customEventWorks=!1,anyEventWorks=!0;try{var ev=new self.CustomEvent("test");customEventWorks=ev instanceof CustomEvent}catch(e){}if(!customEventWorks)try{var event=document.createEvent("CustomEvent");event.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(event)}catch(e){anyEventWorks=!1}anyEventWorks&&(fireDomEvent=function(type,detail){var event;return customEventWorks?event=new self.CustomEvent(type,{detail:detail,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(event=document.createEvent("CustomEvent"),event.initCustomEvent(type,!1,!0,detail)),!!event&&!self.dispatchEvent(event)});var toWindowMethodNameMap={};return toWindowMethodNameMap.unhandledRejection="onunhandledRejection".toLowerCase(),toWindowMethodNameMap.rejectionHandled="onrejectionHandled".toLowerCase(),function(name,reason,promise){var methodName=toWindowMethodNameMap[name],method=self[methodName];return!!method&&("rejectionHandled"===name?method.call(self,promise):method.call(self,reason,promise),!0)}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(warn=function(message){console.warn(message)},util.isNode&&process.stderr.isTTY?warn=function(message){process.stderr.write(""+message+"\n")}:util.isNode||"string"!=typeof(new Error).stack||(warn=function(message){console.warn("%c"+message,"color: red")})),CapturedTrace}},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){"use strict";module.exports=function(NEXT_FILTER){function CatchFilter(instances,callback,promise){this._instances=instances,this._callback=callback,this._promise=promise}function safePredicate(predicate,e){var safeObject={},retfilter=tryCatch(predicate).call(safeObject,e);if(retfilter===errorObj)return retfilter;var safeKeys=keys(safeObject);return safeKeys.length?(errorObj.e=new TypeError("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),errorObj):retfilter}var util=_dereq_("./util.js"),errors=_dereq_("./errors.js"),tryCatch=util.tryCatch,errorObj=util.errorObj,keys=_dereq_("./es5.js").keys,TypeError=errors.TypeError;return CatchFilter.prototype.doFilter=function(e){for(var cb=this._callback,promise=this._promise,boundTo=promise._boundValue(),i=0,len=this._instances.length;i=0)return contextStack[lastIndex]}var contextStack=[];return Context.prototype._pushContext=function(){isDebugging()&&void 0!==this._trace&&contextStack.push(this._trace)},Context.prototype._popContext=function(){isDebugging()&&void 0!==this._trace&&contextStack.pop()},Promise.prototype._peekContext=peekContext,Promise.prototype._pushContext=Context.prototype._pushContext,Promise.prototype._popContext=Context.prototype._popContext,createContext}},{}],10:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,CapturedTrace){var unhandledRejectionHandled,possiblyUnhandledRejection,getDomain=Promise._getDomain,async=_dereq_("./async.js"),Warning=_dereq_("./errors.js").Warning,util=_dereq_("./util.js"),canAttachTrace=util.canAttachTrace,debugging=util.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return util.isNode&&0==process.env.BLUEBIRD_DEBUG&&(debugging=!1),debugging&&async.disableTrampolineIfNecessary(),Promise.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},Promise.prototype._ensurePossibleRejectionHandled=function(){0===(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),async.invokeLater(this._notifyUnhandledRejection,this,void 0))},Promise.prototype._notifyUnhandledRejectionIsHandled=function(){CapturedTrace.fireRejectionEvent("rejectionHandled",unhandledRejectionHandled,void 0,this)},Promise.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var reason=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),CapturedTrace.fireRejectionEvent("unhandledRejection",possiblyUnhandledRejection,reason,this)}},Promise.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},Promise.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-524289},Promise.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},Promise.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},Promise.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-2097153,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},Promise.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},Promise.prototype._setCarriedStackTrace=function(capturedTrace){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=capturedTrace},Promise.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},Promise.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},Promise.prototype._captureStackTrace=function(){return debugging&&(this._trace=new CapturedTrace(this._peekContext())),this},Promise.prototype._attachExtraTrace=function(error,ignoreSelf){if(debugging&&canAttachTrace(error)){var trace=this._trace;if(void 0!==trace&&ignoreSelf&&(trace=trace._parent),void 0!==trace)trace.attachExtraTrace(error);else if(!error.__stackCleaned__){var parsed=CapturedTrace.parseStackAndMessage(error);util.notEnumerableProp(error,"stack",parsed.message+"\n"+parsed.stack.join("\n")),util.notEnumerableProp(error,"__stackCleaned__",!0)}}},Promise.prototype._warn=function(message){var warning=new Warning(message),ctx=this._peekContext();if(ctx)ctx.attachExtraTrace(warning);else{var parsed=CapturedTrace.parseStackAndMessage(warning);warning.stack=parsed.message+"\n"+parsed.stack.join("\n")}CapturedTrace.formatAndLogError(warning,"")},Promise.onPossiblyUnhandledRejection=function(fn){var domain=getDomain();possiblyUnhandledRejection="function"==typeof fn?null===domain?fn:domain.bind(fn):void 0},Promise.onUnhandledRejectionHandled=function(fn){var domain=getDomain();unhandledRejectionHandled="function"==typeof fn?null===domain?fn:domain.bind(fn):void 0},Promise.longStackTraces=function(){if(async.haveItemsQueued()&&debugging===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");debugging=CapturedTrace.isSupported(),debugging&&async.disableTrampolineIfNecessary()},Promise.hasLongStackTraces=function(){return debugging&&CapturedTrace.isSupported()},CapturedTrace.isSupported()||(Promise.longStackTraces=function(){},debugging=!1),function(){return debugging}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){"use strict";var util=_dereq_("./util.js"),isPrimitive=util.isPrimitive;module.exports=function(Promise){var returner=function(){return this},thrower=function(){throw this},returnUndefined=function(){},throwUndefined=function(){throw void 0},wrapper=function(value,action){return 1===action?function(){throw value}:2===action?function(){return value}:void 0};Promise.prototype.return=Promise.prototype.thenReturn=function(value){return void 0===value?this.then(returnUndefined):isPrimitive(value)?this._then(wrapper(value,2),void 0,void 0,void 0,void 0):(value instanceof Promise&&value._ignoreRejections(),this._then(returner,void 0,void 0,value,void 0))},Promise.prototype.throw=Promise.prototype.thenThrow=function(reason){return void 0===reason?this.then(throwUndefined):isPrimitive(reason)?this._then(wrapper(reason,1),void 0,void 0,void 0,void 0):this._then(thrower,void 0,void 0,reason,void 0)}}},{"./util.js":38}],12:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){var PromiseReduce=Promise.reduce;Promise.prototype.each=function(fn){return PromiseReduce(this,fn,null,INTERNAL)},Promise.each=function(promises,fn){return PromiseReduce(promises,fn,null,INTERNAL)}}},{}],13:[function(_dereq_,module,exports){"use strict";function subError(nameProperty,defaultMessage){function SubError(message){return this instanceof SubError?(notEnumerableProp(this,"message","string"==typeof message?message:defaultMessage),notEnumerableProp(this,"name",nameProperty),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new SubError(message)}return inherits(SubError,Error),SubError}function OperationalError(message){return this instanceof OperationalError?(notEnumerableProp(this,"name","OperationalError"),notEnumerableProp(this,"message",message),this.cause=message,this.isOperational=!0,void(message instanceof Error?(notEnumerableProp(this,"message",message.message),notEnumerableProp(this,"stack",message.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new OperationalError(message)}var _TypeError,_RangeError,es5=_dereq_("./es5.js"),Objectfreeze=es5.freeze,util=_dereq_("./util.js"),inherits=util.inherits,notEnumerableProp=util.notEnumerableProp,Warning=subError("Warning","warning"),CancellationError=subError("CancellationError","cancellation error"),TimeoutError=subError("TimeoutError","timeout error"),AggregateError=subError("AggregateError","aggregate error");try{_TypeError=TypeError,_RangeError=RangeError}catch(e){_TypeError=subError("TypeError","type error"),_RangeError=subError("RangeError","range error")}for(var methods="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),i=0;i0&&"function"==typeof arguments[last]){fn=arguments[last];var ret}for(var $_len=arguments.length,args=new Array($_len),$_i=0;$_i<$_len;++$_i)args[$_i]=arguments[$_i];fn&&args.pop();var ret=new PromiseArray(args).promise();return void 0!==fn?ret.spread(fn):ret}}},{"./util.js":38}],19:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL){function MappingPromiseArray(promises,fn,limit,_filter){this.constructor$(promises),this._promise._captureStackTrace();var domain=getDomain();this._callback=null===domain?fn:domain.bind(fn),this._preservedValues=_filter===INTERNAL?new Array(this.length()):null,this._limit=limit,this._inFlight=0,this._queue=limit>=1?[]:EMPTY_ARRAY,async.invoke(init,this,void 0)}function init(){this._init$(void 0,-2)}function map(promises,fn,options,_filter){var limit="object"==typeof options&&null!==options?options.concurrency:0;return limit="number"==typeof limit&&isFinite(limit)&&limit>=1?limit:0,new MappingPromiseArray(promises,fn,limit,_filter)}var getDomain=Promise._getDomain,async=_dereq_("./async.js"),util=_dereq_("./util.js"),tryCatch=util.tryCatch,errorObj=util.errorObj,PENDING={},EMPTY_ARRAY=[];util.inherits(MappingPromiseArray,PromiseArray),MappingPromiseArray.prototype._init=function(){},MappingPromiseArray.prototype._promiseFulfilled=function(value,index){var values=this._values,length=this.length(),preservedValues=this._preservedValues,limit=this._limit;if(values[index]===PENDING){if(values[index]=value,limit>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(limit>=1&&this._inFlight>=limit)return values[index]=value,void this._queue.push(index);null!==preservedValues&&(preservedValues[index]=value);var callback=this._callback,receiver=this._promise._boundValue();this._promise._pushContext();var ret=tryCatch(callback).call(receiver,value,index,length);if(this._promise._popContext(),ret===errorObj)return this._reject(ret.e);var maybePromise=tryConvertToPromise(ret,this._promise);if(maybePromise instanceof Promise){if(maybePromise=maybePromise._target(),maybePromise._isPending())return limit>=1&&this._inFlight++,values[index]=PENDING,maybePromise._proxyPromiseArray(this,index);if(!maybePromise._isFulfilled())return this._reject(maybePromise._reason());ret=maybePromise._value()}values[index]=ret}var totalResolved=++this._totalResolved;totalResolved>=length&&(null!==preservedValues?this._filter(values,preservedValues):this._resolve(values))},MappingPromiseArray.prototype._drainQueue=function(){for(var queue=this._queue,limit=this._limit,values=this._values;queue.length>0&&this._inFlight1){var i,catchInstances=new Array(len-1),j=0;for(i=0;i0&&"function"!=typeof didFulfill&&"function"!=typeof didReject){var msg=".then() only accepts functions but was passed: "+util.classString(didFulfill);arguments.length>1&&(msg+=", "+util.classString(didReject)),this._warn(msg)}return this._then(didFulfill,didReject,didProgress,void 0,void 0)},Promise.prototype.done=function(didFulfill,didReject,didProgress){var promise=this._then(didFulfill,didReject,didProgress,void 0,void 0);promise._setIsFinal()},Promise.prototype.spread=function(didFulfill,didReject){return this.all()._then(didFulfill,didReject,void 0,APPLY,void 0)},Promise.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},Promise.prototype.toJSON=function(){var ret={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(ret.fulfillmentValue=this.value(),ret.isFulfilled=!0):this.isRejected()&&(ret.rejectionReason=this.reason(),ret.isRejected=!0),ret},Promise.prototype.all=function(){return new PromiseArray(this).promise()},Promise.prototype.error=function(fn){return this.caught(util.originatesFromRejection,fn)},Promise.getNewLibraryCopy=module.exports,Promise.is=function(val){return val instanceof Promise},Promise.fromNode=function(fn){var ret=new Promise(INTERNAL),result=tryCatch(fn)(nodebackForPromise(ret));return result===errorObj&&ret._rejectCallback(result.e,!0,!0),ret},Promise.all=function(promises){return new PromiseArray(promises).promise()},Promise.defer=Promise.pending=function(){var promise=new Promise(INTERNAL);return new PromiseResolver(promise)},Promise.cast=function(obj){var ret=tryConvertToPromise(obj);if(!(ret instanceof Promise)){var val=ret;ret=new Promise(INTERNAL),ret._fulfillUnchecked(val)}return ret},Promise.resolve=Promise.fulfilled=Promise.cast,Promise.reject=Promise.rejected=function(reason){var ret=new Promise(INTERNAL);return ret._captureStackTrace(),ret._rejectCallback(reason,!0),ret},Promise.setScheduler=function(fn){if("function"!=typeof fn)throw new TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");var prev=async._schedule;return async._schedule=fn,prev},Promise.prototype._then=function(didFulfill,didReject,didProgress,receiver,internalData){var haveInternalData=void 0!==internalData,ret=haveInternalData?internalData:new Promise(INTERNAL);haveInternalData||(ret._propagateFrom(this,5),ret._captureStackTrace());var target=this._target();target!==this&&(void 0===receiver&&(receiver=this._boundTo),haveInternalData||ret._setIsMigrated());var callbackIndex=target._addCallbacks(didFulfill,didReject,didProgress,ret,receiver,getDomain());return target._isResolved()&&!target._isSettlePromisesQueued()&&async.invoke(target._settlePromiseAtPostResolution,target,callbackIndex),ret},Promise.prototype._settlePromiseAtPostResolution=function(index){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(index)},Promise.prototype._length=function(){return 131071&this._bitField},Promise.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},Promise.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},Promise.prototype._setLength=function(len){this._bitField=this._bitField&-131072|131071&len},Promise.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},Promise.prototype._setRejected=function(){this._bitField=134217728|this._bitField},Promise.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},Promise.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},Promise.prototype._isFinal=function(){return(33554432&this._bitField)>0},Promise.prototype._cancellable=function(){return(67108864&this._bitField)>0},Promise.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},Promise.prototype._unsetCancellable=function(){this._bitField=this._bitField&-67108865},Promise.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},Promise.prototype._unsetIsMigrated=function(){this._bitField=this._bitField&-4194305},Promise.prototype._isMigrated=function(){return(4194304&this._bitField)>0},Promise.prototype._receiverAt=function(index){var ret=0===index?this._receiver0:this[5*index-5+4];if(ret!==UNDEFINED_BINDING)return void 0===ret&&this._isBound()?this._boundValue():ret},Promise.prototype._promiseAt=function(index){return 0===index?this._promise0:this[5*index-5+3]},Promise.prototype._fulfillmentHandlerAt=function(index){return 0===index?this._fulfillmentHandler0:this[5*index-5+0]},Promise.prototype._rejectionHandlerAt=function(index){return 0===index?this._rejectionHandler0:this[5*index-5+1]},Promise.prototype._boundValue=function(){var ret=this._boundTo;return void 0!==ret&&ret instanceof Promise?ret.isFulfilled()?ret.value():void 0:ret},Promise.prototype._migrateCallbacks=function(follower,index){var fulfill=follower._fulfillmentHandlerAt(index),reject=follower._rejectionHandlerAt(index),progress=follower._progressHandlerAt(index),promise=follower._promiseAt(index),receiver=follower._receiverAt(index);promise instanceof Promise&&promise._setIsMigrated(),void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,progress,promise,receiver,null)},Promise.prototype._addCallbacks=function(fulfill,reject,progress,promise,receiver,domain){var index=this._length();if(index>=131066&&(index=0,this._setLength(0)),0===index)this._promise0=promise,void 0!==receiver&&(this._receiver0=receiver),"function"!=typeof fulfill||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===domain?fulfill:domain.bind(fulfill)),"function"==typeof reject&&(this._rejectionHandler0=null===domain?reject:domain.bind(reject)),"function"==typeof progress&&(this._progressHandler0=null===domain?progress:domain.bind(progress));else{var base=5*index-5;this[base+3]=promise,this[base+4]=receiver,"function"==typeof fulfill&&(this[base+0]=null===domain?fulfill:domain.bind(fulfill)),"function"==typeof reject&&(this[base+1]=null===domain?reject:domain.bind(reject)),"function"==typeof progress&&(this[base+2]=null===domain?progress:domain.bind(progress))}return this._setLength(index+1),index},Promise.prototype._setProxyHandlers=function(receiver,promiseSlotValue){var index=this._length();if(index>=131066&&(index=0,this._setLength(0)),0===index)this._promise0=promiseSlotValue,this._receiver0=receiver;else{var base=5*index-5;this[base+3]=promiseSlotValue,this[base+4]=receiver}this._setLength(index+1)},Promise.prototype._proxyPromiseArray=function(promiseArray,index){this._setProxyHandlers(promiseArray,index)},Promise.prototype._resolveCallback=function(value,shouldBind){if(!this._isFollowingOrFulfilledOrRejected()){if(value===this)return this._rejectCallback(makeSelfResolutionError(),!1,!0);var maybePromise=tryConvertToPromise(value,this);if(!(maybePromise instanceof Promise))return this._fulfill(value);var propagationFlags=1|(shouldBind?4:0);this._propagateFrom(maybePromise,propagationFlags);var promise=maybePromise._target();if(promise._isPending()){for(var len=this._length(),i=0;i0&&parent._cancellable()&&(this._setCancellable(),this._cancellationParent=parent),(4&flags)>0&&parent._isBound()&&this._setBoundTo(parent._boundTo)},Promise.prototype._fulfill=function(value){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(value)},Promise.prototype._reject=function(reason,carriedStackTrace){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(reason,carriedStackTrace)},Promise.prototype._settlePromiseAt=function(index){var promise=this._promiseAt(index),isPromise=promise instanceof Promise;if(isPromise&&promise._isMigrated())return promise._unsetIsMigrated(),async.invoke(this._settlePromiseAt,this,index);var handler=this._isFulfilled()?this._fulfillmentHandlerAt(index):this._rejectionHandlerAt(index),carriedStackTrace=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,value=this._settledValue,receiver=this._receiverAt(index);this._clearCallbackDataAtIndex(index),"function"==typeof handler?isPromise?this._settlePromiseFromHandler(handler,receiver,value,promise):handler.call(receiver,value,promise):receiver instanceof PromiseArray?receiver._isResolved()||(this._isFulfilled()?receiver._promiseFulfilled(value,promise):receiver._promiseRejected(value,promise)):isPromise&&(this._isFulfilled()?promise._fulfill(value):promise._reject(value,carriedStackTrace)),index>=4&&4===(31&index)&&async.invokeLater(this._setLength,this,0)},Promise.prototype._clearCallbackDataAtIndex=function(index){if(0===index)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var base=5*index-5;this[base+3]=this[base+4]=this[base+0]=this[base+1]=this[base+2]=void 0}},Promise.prototype._isSettlePromisesQueued=function(){return(this._bitField&-1073741824)===-1073741824},Promise.prototype._setSettlePromisesQueued=function(){this._bitField=this._bitField|-1073741824},Promise.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},Promise.prototype._queueSettlePromises=function(){async.settlePromises(this),this._setSettlePromisesQueued()},Promise.prototype._fulfillUnchecked=function(value){if(value===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._rejectUnchecked(err,void 0)}this._setFulfilled(),this._settledValue=value,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},Promise.prototype._rejectUncheckedCheckError=function(reason){var trace=util.ensureErrorObject(reason);this._rejectUnchecked(reason,trace===reason?void 0:trace)},Promise.prototype._rejectUnchecked=function(reason,trace){if(reason===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._rejectUnchecked(err)}return this._setRejected(),this._settledValue=reason,this._cleanValues(),this._isFinal()?void async.throwLater(function(e){throw"stack"in e&&async.invokeFirst(CapturedTrace.unhandledRejection,void 0,e),e},void 0===trace?reason:trace):(void 0!==trace&&trace!==reason&&this._setCarriedStackTrace(trace),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},Promise.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var len=this._length(),i=0;i=this._length&&this._resolve(this._values)},PromiseArray.prototype._promiseRejected=function(reason,index){this._totalResolved++,this._reject(reason)},PromiseArray.prototype.shouldCopyValues=function(){return!0},PromiseArray.prototype.getActualLength=function(len){return len},PromiseArray}},{"./util.js":38}],25:[function(_dereq_,module,exports){"use strict";function isUntypedError(obj){return obj instanceof Error&&es5.getPrototypeOf(obj)===Error.prototype}function wrapAsOperationalError(obj){var ret;if(isUntypedError(obj)){ret=new OperationalError(obj),ret.name=obj.name,ret.message=obj.message,ret.stack=obj.stack;for(var keys=es5.keys(obj),i=0;i2){for(var $_len=arguments.length,args=new Array($_len-1),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];promise._fulfill(args)}else promise._fulfill(value);promise=null}}}var PromiseResolver,util=_dereq_("./util.js"),maybeWrapAsError=util.maybeWrapAsError,errors=_dereq_("./errors.js"),TimeoutError=errors.TimeoutError,OperationalError=errors.OperationalError,haveGetters=util.haveGetters,es5=_dereq_("./es5.js"),rErrorKey=/^(?:name|message|stack|cause)$/;if(PromiseResolver=haveGetters?function(promise){this.promise=promise}:function(promise){this.promise=promise,this.asCallback=nodebackForPromise(promise),this.callback=this.asCallback},haveGetters){var prop={get:function(){return nodebackForPromise(this.promise)}};es5.defineProperty(PromiseResolver.prototype,"asCallback",prop),es5.defineProperty(PromiseResolver.prototype,"callback",prop)}PromiseResolver._nodebackForPromise=nodebackForPromise,PromiseResolver.prototype.toString=function(){return"[object PromiseResolver]"},PromiseResolver.prototype.resolve=PromiseResolver.prototype.fulfill=function(value){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(value)},PromiseResolver.prototype.reject=function(reason){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(reason)},PromiseResolver.prototype.progress=function(value){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(value)},PromiseResolver.prototype.cancel=function(err){this.promise.cancel(err)},PromiseResolver.prototype.timeout=function(){this.reject(new TimeoutError("timeout"))},PromiseResolver.prototype.isResolved=function(){return this.promise.isResolved()},PromiseResolver.prototype.toJSON=function(){return this.promise.toJSON()},module.exports=PromiseResolver},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function propsFilter(key){return!noCopyPropsPattern.test(key)}function isPromisified(fn){try{return fn.__isPromisified__===!0}catch(e){return!1}}function hasPromisified(obj,key,suffix){var val=util.getDataPropertyOrDefault(obj,key+suffix,defaultPromisified);return!!val&&isPromisified(val)}function checkValid(ret,suffix,suffixRegexp){for(var i=0;i=this._length){for(var val={},keyOffset=this.length(),i=0,len=this.length();i>1},Promise.prototype.props=function(){return props(this)},Promise.props=function(promises){return props(promises)}}},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){"use strict";function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j=this._length&&this._resolve(this._values)},SettledPromiseArray.prototype._promiseFulfilled=function(value,index){var ret=new PromiseInspection;ret._bitField=268435456,ret._settledValue=value,this._promiseResolved(index,ret)},SettledPromiseArray.prototype._promiseRejected=function(reason,index){var ret=new PromiseInspection;ret._bitField=134217728,ret._settledValue=reason,this._promiseResolved(index,ret)},Promise.settle=function(promises){return new SettledPromiseArray(promises).promise()},Promise.prototype.settle=function(){return new SettledPromiseArray(this).promise()}}},{"./util.js":38}],33:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection){function SomePromiseArray(values){this.constructor$(values),this._howMany=0,this._unwrap=!1,this._initialized=!1}function some(promises,howMany){if((0|howMany)!==howMany||howMany<0)return apiRejection("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(howMany),ret.init(),promise}var util=_dereq_("./util.js"),RangeError=_dereq_("./errors.js").RangeError,AggregateError=_dereq_("./errors.js").AggregateError,isArray=util.isArray;util.inherits(SomePromiseArray,PromiseArray),SomePromiseArray.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var isArrayResolved=isArray(this._values);!this._isResolved()&&isArrayResolved&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},SomePromiseArray.prototype.init=function(){this._initialized=!0,this._init()},SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=!0},SomePromiseArray.prototype.howMany=function(){return this._howMany},SomePromiseArray.prototype.setHowMany=function(count){this._howMany=count},SomePromiseArray.prototype._promiseFulfilled=function(value){this._addFulfilled(value),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},SomePromiseArray.prototype._promiseRejected=function(reason){if(this._addRejected(reason),this.howMany()>this._canPossiblyFulfill()){for(var e=new AggregateError,i=this.length();i0},PromiseInspection.prototype.isRejected=Promise.prototype._isRejected=function(){return(134217728&this._bitField)>0},PromiseInspection.prototype.isPending=Promise.prototype._isPending=function(){return 0===(402653184&this._bitField)},PromiseInspection.prototype.isResolved=Promise.prototype._isResolved=function(){return(402653184&this._bitField)>0},Promise.prototype.isPending=function(){return this._target()._isPending()},Promise.prototype.isRejected=function(){return this._target()._isRejected()},Promise.prototype.isFulfilled=function(){return this._target()._isFulfilled()},Promise.prototype.isResolved=function(){return this._target()._isResolved()},Promise.prototype._value=function(){return this._settledValue},Promise.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},Promise.prototype.value=function(){var target=this._target();if(!target.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return target._settledValue},Promise.prototype.reason=function(){var target=this._target();if(!target.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return target._unsetRejectionIsUnhandled(),target._settledValue},Promise.PromiseInspection=PromiseInspection}},{}],35:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function tryConvertToPromise(obj,context){if(isObject(obj)){if(obj instanceof Promise)return obj;if(isAnyBluebirdPromise(obj)){var ret=new Promise(INTERNAL);return obj._then(ret._fulfillUnchecked,ret._rejectUncheckedCheckError,ret._progressUnchecked,ret,null),ret}var then=util.tryCatch(getThen)(obj);if(then===errorObj){context&&context._pushContext();var ret=Promise.reject(then.e);return context&&context._popContext(),ret}if("function"==typeof then)return doThenable(obj,then,context)}return obj}function getThen(obj){return obj.then}function isAnyBluebirdPromise(obj){return hasProp.call(obj,"_promise0")}function doThenable(x,then,context){function resolveFromThenable(value){promise&&(promise._resolveCallback(value),promise=null)}function rejectFromThenable(reason){promise&&(promise._rejectCallback(reason,synchronous,!0),promise=null)}function progressFromThenable(value){promise&&"function"==typeof promise._progress&&promise._progress(value)}var promise=new Promise(INTERNAL),ret=promise;context&&context._pushContext(),promise._captureStackTrace(),context&&context._popContext();var synchronous=!0,result=util.tryCatch(then).call(x,resolveFromThenable,rejectFromThenable,progressFromThenable);return synchronous=!1,promise&&result===errorObj&&(promise._rejectCallback(result.e,!0,!0),promise=null),ret}var util=_dereq_("./util.js"),errorObj=util.errorObj,isObject=util.isObject,hasProp={}.hasOwnProperty;return tryConvertToPromise}},{"./util.js":38}],36:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function successClear(value){var handle=this;return handle instanceof Number&&(handle=+handle),clearTimeout(handle),value}function failureClear(reason){var handle=this;throw handle instanceof Number&&(handle=+handle),clearTimeout(handle),reason}var util=_dereq_("./util.js"),TimeoutError=Promise.TimeoutError,afterTimeout=function(promise,message){if(promise.isPending()){var err;!util.isPrimitive(message)&&message instanceof Error?err=message:("string"!=typeof message&&(message="operation timed out"),err=new TimeoutError(message)),util.markAsOriginatingFromRejection(err),promise._attachExtraTrace(err),promise._cancel(err)}},afterValue=function(value){return delay(+this).thenReturn(value)},delay=Promise.delay=function(value,ms){if(void 0===ms){ms=value,value=void 0;var ret=new Promise(INTERNAL);return setTimeout(function(){ret._fulfill()},ms),ret}return ms=+ms,Promise.resolve(value)._then(afterValue,null,null,ms,void 0)};Promise.prototype.delay=function(ms){return delay(this,ms)},Promise.prototype.timeout=function(ms,message){ms=+ms;var ret=this.then().cancellable();ret._cancellationParent=this;var handle=setTimeout(function(){afterTimeout(ret,message)},ms);return ret._then(successClear,failureClear,void 0,handle,void 0)}}},{"./util.js":38}],37:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,apiRejection,tryConvertToPromise,createContext){function inspectionMapper(inspections){for(var len=inspections.length,i=0;i=len)return ret.resolve();var maybePromise=castPreservingDisposable(resources[i++]);if(maybePromise instanceof Promise&&maybePromise._isDisposable()){try{maybePromise=tryConvertToPromise(maybePromise._getDisposer().tryDispose(inspection),resources.promise)}catch(e){return thrower(e)}if(maybePromise instanceof Promise)return maybePromise._then(iterator,thrower,null,null,null)}iterator()}var i=0,len=resources.length,ret=Promise.defer();return iterator(),ret.promise}function disposerSuccess(value){var inspection=new PromiseInspection;return inspection._settledValue=value,inspection._bitField=268435456,dispose(this,inspection).thenReturn(value)}function disposerFail(reason){var inspection=new PromiseInspection;return inspection._settledValue=reason,inspection._bitField=134217728,dispose(this,inspection).thenThrow(reason)}function Disposer(data,promise,context){this._data=data,this._promise=promise,this._context=context}function FunctionDisposer(fn,promise,context){this.constructor$(fn,promise,context)}function maybeUnwrapDisposer(value){return Disposer.isDisposer(value)?(this.resources[this.index]._setDisposable(value),value.promise()):value}var TypeError=_dereq_("./errors.js").TypeError,inherits=_dereq_("./util.js").inherits,PromiseInspection=Promise.PromiseInspection;Disposer.prototype.data=function(){return this._data},Disposer.prototype.promise=function(){return this._promise},Disposer.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},Disposer.prototype.tryDispose=function(inspection){var resource=this.resource(),context=this._context;void 0!==context&&context._pushContext();var ret=null!==resource?this.doDispose(resource,inspection):null;return void 0!==context&&context._popContext(),this._promise._unsetDisposable(),this._data=null,ret},Disposer.isDisposer=function(d){return null!=d&&"function"==typeof d.resource&&"function"==typeof d.tryDispose},inherits(FunctionDisposer,Disposer),FunctionDisposer.prototype.doDispose=function(resource,inspection){var fn=this.data();return fn.call(resource,resource,inspection)},Promise.using=function(){var len=arguments.length;if(len<2)return apiRejection("you must pass at least 2 arguments to Promise.using");var fn=arguments[len-1];if("function"!=typeof fn)return apiRejection("fn must be a function\n\n See http://goo.gl/916lJJ\n");var input,spreadArgs=!0;2===len&&Array.isArray(arguments[0])?(input=arguments[0],len=input.length,spreadArgs=!1):(input=arguments,len--);for(var resources=new Array(len),i=0;i0},Promise.prototype._getDisposer=function(){return this._disposer},Promise.prototype._unsetDisposable=function(){this._bitField=this._bitField&-262145,this._disposer=void 0},Promise.prototype.disposer=function(fn){if("function"==typeof fn)return new FunctionDisposer(fn,this,createContext());throw new TypeError}}},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){"use strict";function tryCatcher(){try{var target=tryCatchTarget;return tryCatchTarget=null,target.apply(this,arguments)}catch(e){return errorObj.e=e,errorObj}}function tryCatch(fn){return tryCatchTarget=fn,tryCatcher}function isPrimitive(val){return null==val||val===!0||val===!1||"string"==typeof val||"number"==typeof val}function isObject(value){return!isPrimitive(value)}function maybeWrapAsError(maybeError){return isPrimitive(maybeError)?new Error(safeToString(maybeError)):maybeError}function withAppended(target,appendee){var i,len=target.length,ret=new Array(len+1);for(i=0;i1,hasMethodsOtherThanConstructor=keys.length>0&&!(1===keys.length&&"constructor"===keys[0]),hasThisAssignmentAndStaticMethods=thisAssignmentPattern.test(fn+"")&&es5.names(fn).length>0;if(hasMethods||hasMethodsOtherThanConstructor||hasThisAssignmentAndStaticMethods)return!0}return!1}catch(e){return!1}}function toFastProperties(obj){function f(){}f.prototype=obj;for(var l=8;l--;)new f;return obj}function isIdentifier(str){return rident.test(str)}function filledRange(count,prefix,suffix){for(var ret=new Array(count),i=0;i10||version[0]>0}(),ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(exports,__webpack_require__(30),function(){return this}(),__webpack_require__(31).setImmediate)},function(module,exports){function isGenerator(obj){return obj&&"function"==typeof obj.next&&"function"==typeof obj.throw}function isGeneratorFunction(fn){return"function"==typeof fn&&fn.constructor&&"GeneratorFunction"===fn.constructor.name}module.exports=isGenerator,module.exports.fn=isGeneratorFunction},function(module,exports,__webpack_require__){var Promise=__webpack_require__(38);module.exports=function(){var deferred={};return deferred.promise=new Promise(function(resolve,reject){deferred.resolve=resolve,deferred.reject=reject}),deferred}},function(module,exports,__webpack_require__){(function(process,global,setImmediate){/* @preserve * The MIT License (MIT) * * Copyright (c) 2013-2015 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ !function(e){module.exports=e()}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof _dereq_&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof _dereq_&&_dereq_,o=0;o0},Async.prototype.throwLater=function(fn,arg){if(1===arguments.length&&(arg=fn,fn=function(){throw arg}),"undefined"!=typeof setTimeout)setTimeout(function(){fn(arg)},0);else try{this._schedule(function(){fn(arg)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},util.hasDevTools?(schedule.isStatic&&(schedule=function(fn){setTimeout(fn,0)}),Async.prototype.invokeLater=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvokeLater.call(this,fn,receiver,arg):this._schedule(function(){setTimeout(function(){fn.call(receiver,arg)},100)})},Async.prototype.invoke=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvoke.call(this,fn,receiver,arg):this._schedule(function(){fn.call(receiver,arg)})},Async.prototype.settlePromises=function(promise){this._trampolineEnabled?AsyncSettlePromises.call(this,promise):this._schedule(function(){promise._settlePromises()})}):(Async.prototype.invokeLater=AsyncInvokeLater,Async.prototype.invoke=AsyncInvoke,Async.prototype.settlePromises=AsyncSettlePromises),Async.prototype.invokeFirst=function(fn,receiver,arg){this._normalQueue.unshift(fn,receiver,arg),this._queueTick()},Async.prototype._drainQueue=function(queue){for(;queue.length()>0;){var fn=queue.shift();if("function"==typeof fn){var receiver=queue.shift(),arg=queue.shift();fn.call(receiver,arg)}else fn._settlePromises()}},Async.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},Async.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},Async.prototype._reset=function(){this._isTickUsed=!1},module.exports=new Async,module.exports.firstLineError=firstLineError},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise){var rejectThis=function(_,e){this._reject(e)},targetRejected=function(e,context){context.promiseRejectionQueued=!0,context.bindingPromise._then(rejectThis,rejectThis,null,this,e)},bindingResolved=function(thisArg,context){this._isPending()&&this._resolveCallback(context.target)},bindingRejected=function(e,context){context.promiseRejectionQueued||this._reject(e)};Promise.prototype.bind=function(thisArg){var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);ret._propagateFrom(this,1);var target=this._target();if(ret._setBoundTo(maybePromise),maybePromise instanceof Promise){var context={promiseRejectionQueued:!1,promise:ret,target:target,bindingPromise:maybePromise};target._then(INTERNAL,targetRejected,ret._progress,ret,context),maybePromise._then(bindingResolved,bindingRejected,ret._progress,ret,context)}else ret._resolveCallback(target);return ret},Promise.prototype._setBoundTo=function(obj){void 0!==obj?(this._bitField=131072|this._bitField,this._boundTo=obj):this._bitField=this._bitField&-131073},Promise.prototype._isBound=function(){return 131072===(131072&this._bitField)},Promise.bind=function(thisArg,value){var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);return ret._setBoundTo(maybePromise),maybePromise instanceof Promise?maybePromise._then(function(){ret._resolveCallback(value)},ret._reject,ret._progress,ret,null):ret._resolveCallback(value),ret}}},{}],4:[function(_dereq_,module,exports){"use strict";function noConflict(){try{Promise===bluebird&&(Promise=old)}catch(e){}return bluebird}var old;"undefined"!=typeof Promise&&(old=Promise);var bluebird=_dereq_("./promise.js")();bluebird.noConflict=noConflict,module.exports=bluebird},{"./promise.js":23}],5:[function(_dereq_,module,exports){"use strict";var cr=Object.create;if(cr){var callerCache=cr(null),getterCache=cr(null);callerCache[" size"]=getterCache[" size"]=0}module.exports=function(Promise){function ensureMethod(obj,methodName){var fn;if(null!=obj&&(fn=obj[methodName]),"function"!=typeof fn){var message="Object "+util.classString(obj)+" has no method '"+util.toString(methodName)+"'";throw new Promise.TypeError(message)}return fn}function caller(obj){var methodName=this.pop(),fn=ensureMethod(obj,methodName);return fn.apply(obj,this)}function namedGetter(obj){return obj[this]}function indexedGetter(obj){var index=+this;return index<0&&(index=Math.max(0,index+obj.length)),obj[index]}var getGetter,util=_dereq_("./util.js"),canEvaluate=util.canEvaluate;util.isIdentifier;Promise.prototype.call=function(methodName){for(var $_len=arguments.length,args=new Array($_len-1),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];return args.push(methodName),this._then(caller,void 0,void 0,args,void 0)},Promise.prototype.get=function(propertyName){var getter,isIndex="number"==typeof propertyName;if(isIndex)getter=indexedGetter;else if(canEvaluate){var maybeGetter=getGetter(propertyName);getter=null!==maybeGetter?maybeGetter:namedGetter}else getter=namedGetter;return this._then(getter,void 0,void 0,propertyName,void 0)}}},{"./util.js":38}],6:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise){var errors=_dereq_("./errors.js"),async=_dereq_("./async.js"),CancellationError=errors.CancellationError;Promise.prototype._cancel=function(reason){if(!this.isCancellable())return this;for(var parent,promiseToReject=this;void 0!==(parent=promiseToReject._cancellationParent)&&parent.isCancellable();)promiseToReject=parent;this._unsetCancellable(),promiseToReject._target()._rejectCallback(reason,!1,!0)},Promise.prototype.cancel=function(reason){return this.isCancellable()?(void 0===reason&&(reason=new CancellationError),async.invokeLater(this._cancel,this,reason),this):this},Promise.prototype.cancellable=function(){return this._cancellable()?this:(async.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},Promise.prototype.uncancellable=function(){var ret=this.then();return ret._unsetCancellable(),ret},Promise.prototype.fork=function(didFulfill,didReject,didProgress){var ret=this._then(didFulfill,didReject,didProgress,void 0,void 0);return ret._setCancellable(),ret._cancellationParent=void 0,ret}}},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){"use strict";module.exports=function(){function CapturedTrace(parent){this._parent=parent;var length=this._length=1+(void 0===parent?0:parent._length);captureStackTrace(this,CapturedTrace),length>32&&this.uncycle()}function reconstructStack(message,stacks){for(var i=0;i=0;--j)if(prev[j]===currentLastLine){commonRootMeetPoint=j;break}for(var j=commonRootMeetPoint;j>=0;--j){var line=prev[j];if(current[currentLastIndex]!==line)break;current.pop(),currentLastIndex--}current=prev}}function cleanStack(stack){for(var ret=[],i=0;i0&&(stack=stack.slice(i)),stack}function formatNonError(obj){var str;if("function"==typeof obj)str="[function "+(obj.name||"anonymous")+"]";else{str=obj.toString();var ruselessToString=/\[object [a-zA-Z0-9$_]+\]/;if(ruselessToString.test(str))try{var newStr=JSON.stringify(obj);str=newStr}catch(e){}0===str.length&&(str="(empty array)")}return"(<"+snip(str)+">, no stack trace)"}function snip(str){var maxChars=41;return str.length=0;--i){var stack=nodes[i].stack;void 0===stackToIndex[stack]&&(stackToIndex[stack]=i)}for(var i=0;i0&&(nodes[index-1]._parent=void 0,nodes[index-1]._length=1),nodes[i]._parent=void 0,nodes[i]._length=1;var cycleEdgeNode=i>0?nodes[i-1]:this;index=0;--j)nodes[j]._length=currentChildLength,currentChildLength++;return}}}},CapturedTrace.prototype.parent=function(){return this._parent},CapturedTrace.prototype.hasParent=function(){return void 0!==this._parent},CapturedTrace.prototype.attachExtraTrace=function(error){if(!error.__stackCleaned__){this.uncycle();for(var parsed=CapturedTrace.parseStackAndMessage(error),message=parsed.message,stacks=[parsed.stack],trace=this;void 0!==trace;)stacks.push(cleanStack(trace.stack.split("\n"))),trace=trace._parent;removeCommonRoots(stacks),removeDuplicateOrEmptyJumps(stacks),util.notEnumerableProp(error,"stack",reconstructStack(message,stacks)),util.notEnumerableProp(error,"__stackCleaned__",!0)}},CapturedTrace.parseStackAndMessage=function(error){var stack=error.stack,message=error.toString();return stack="string"==typeof stack&&stack.length>0?stackFramesAsArray(error):[" (No stack trace)"],{message:message,stack:cleanStack(stack)}},CapturedTrace.formatAndLogError=function(error,title){if("undefined"!=typeof console){var message;if("object"==typeof error||"function"==typeof error){var stack=error.stack;message=title+formatStack(stack,error)}else message=title+String(error);"function"==typeof warn?warn(message):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(message)}},CapturedTrace.unhandledRejection=function(reason){CapturedTrace.formatAndLogError(reason,"^--- With additional stack trace: ")},CapturedTrace.isSupported=function(){return"function"==typeof captureStackTrace},CapturedTrace.fireRejectionEvent=function(name,localHandler,reason,promise){var localEventFired=!1;try{"function"==typeof localHandler&&(localEventFired=!0,"rejectionHandled"===name?localHandler(promise):localHandler(reason,promise))}catch(e){async.throwLater(e)}var globalEventFired=!1;try{globalEventFired=fireGlobalEvent(name,reason,promise)}catch(e){globalEventFired=!0,async.throwLater(e)}var domEventFired=!1;if(fireDomEvent)try{domEventFired=fireDomEvent(name.toLowerCase(),{reason:reason,promise:promise})}catch(e){domEventFired=!0,async.throwLater(e)}globalEventFired||localEventFired||domEventFired||"unhandledRejection"!==name||CapturedTrace.formatAndLogError(reason,"Unhandled rejection ")};var shouldIgnore=function(){return!1},parseLineInfoRegex=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;CapturedTrace.setBounds=function(firstLineError,lastLineError){if(CapturedTrace.isSupported()){for(var firstFileName,lastFileName,firstStackLines=firstLineError.stack.split("\n"),lastStackLines=lastLineError.stack.split("\n"),firstIndex=-1,lastIndex=-1,i=0;i=lastIndex||(shouldIgnore=function(line){if(bluebirdFramePattern.test(line))return!0;var info=parseLineInfo(line);return!!(info&&info.fileName===firstFileName&&firstIndex<=info.line&&info.line<=lastIndex)})}};var fireDomEvent,captureStackTrace=function(){var v8stackFramePattern=/^\s*at\s*/,v8stackFormatter=function(stack,error){return"string"==typeof stack?stack:void 0!==error.name&&void 0!==error.message?error.toString():formatNonError(error)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter;var captureStackTrace=Error.captureStackTrace;return shouldIgnore=function(line){return bluebirdFramePattern.test(line)},function(receiver,ignoreUntil){Error.stackTraceLimit=Error.stackTraceLimit+6,captureStackTrace(receiver,ignoreUntil),Error.stackTraceLimit=Error.stackTraceLimit-6}}var err=new Error;if("string"==typeof err.stack&&err.stack.split("\n")[0].indexOf("stackDetection@")>=0)return stackFramePattern=/@/,formatStack=v8stackFormatter,indentStackFrames=!0,function(o){o.stack=(new Error).stack};var hasStackAfterThrow;try{throw new Error}catch(e){hasStackAfterThrow="stack"in e}return"stack"in err||!hasStackAfterThrow||"number"!=typeof Error.stackTraceLimit?(formatStack=function(stack,error){return"string"==typeof stack?stack:"object"!=typeof error&&"function"!=typeof error||void 0===error.name||void 0===error.message?formatNonError(error):error.toString()},null):(stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter,function(o){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){o.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),fireGlobalEvent=function(){if(util.isNode)return function(name,reason,promise){return"rejectionHandled"===name?process.emit(name,promise):process.emit(name,reason,promise)};var customEventWorks=!1,anyEventWorks=!0;try{var ev=new self.CustomEvent("test");customEventWorks=ev instanceof CustomEvent}catch(e){}if(!customEventWorks)try{var event=document.createEvent("CustomEvent");event.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(event)}catch(e){anyEventWorks=!1}anyEventWorks&&(fireDomEvent=function(type,detail){var event;return customEventWorks?event=new self.CustomEvent(type,{detail:detail,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(event=document.createEvent("CustomEvent"),event.initCustomEvent(type,!1,!0,detail)),!!event&&!self.dispatchEvent(event)});var toWindowMethodNameMap={};return toWindowMethodNameMap.unhandledRejection="onunhandledRejection".toLowerCase(),toWindowMethodNameMap.rejectionHandled="onrejectionHandled".toLowerCase(),function(name,reason,promise){var methodName=toWindowMethodNameMap[name],method=self[methodName];return!!method&&("rejectionHandled"===name?method.call(self,promise):method.call(self,reason,promise),!0)}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(warn=function(message){console.warn(message)},util.isNode&&process.stderr.isTTY?warn=function(message){process.stderr.write(""+message+"\n")}:util.isNode||"string"!=typeof(new Error).stack||(warn=function(message){console.warn("%c"+message,"color: red")})),CapturedTrace}},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){"use strict";module.exports=function(NEXT_FILTER){function CatchFilter(instances,callback,promise){this._instances=instances,this._callback=callback,this._promise=promise}function safePredicate(predicate,e){var safeObject={},retfilter=tryCatch(predicate).call(safeObject,e);if(retfilter===errorObj)return retfilter;var safeKeys=keys(safeObject);return safeKeys.length?(errorObj.e=new TypeError("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),errorObj):retfilter}var util=_dereq_("./util.js"),errors=_dereq_("./errors.js"),tryCatch=util.tryCatch,errorObj=util.errorObj,keys=_dereq_("./es5.js").keys,TypeError=errors.TypeError;return CatchFilter.prototype.doFilter=function(e){for(var cb=this._callback,promise=this._promise,boundTo=promise._boundValue(),i=0,len=this._instances.length;i=0)return contextStack[lastIndex]}var contextStack=[];return Context.prototype._pushContext=function(){isDebugging()&&void 0!==this._trace&&contextStack.push(this._trace)},Context.prototype._popContext=function(){isDebugging()&&void 0!==this._trace&&contextStack.pop()},Promise.prototype._peekContext=peekContext,Promise.prototype._pushContext=Context.prototype._pushContext,Promise.prototype._popContext=Context.prototype._popContext,createContext}},{}],10:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,CapturedTrace){var unhandledRejectionHandled,possiblyUnhandledRejection,getDomain=Promise._getDomain,async=_dereq_("./async.js"),Warning=_dereq_("./errors.js").Warning,util=_dereq_("./util.js"),canAttachTrace=util.canAttachTrace,debugging=util.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return util.isNode&&0==process.env.BLUEBIRD_DEBUG&&(debugging=!1),debugging&&async.disableTrampolineIfNecessary(),Promise.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},Promise.prototype._ensurePossibleRejectionHandled=function(){0===(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),async.invokeLater(this._notifyUnhandledRejection,this,void 0))},Promise.prototype._notifyUnhandledRejectionIsHandled=function(){CapturedTrace.fireRejectionEvent("rejectionHandled",unhandledRejectionHandled,void 0,this)},Promise.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var reason=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),CapturedTrace.fireRejectionEvent("unhandledRejection",possiblyUnhandledRejection,reason,this)}},Promise.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},Promise.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-524289},Promise.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},Promise.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},Promise.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-2097153,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},Promise.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},Promise.prototype._setCarriedStackTrace=function(capturedTrace){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=capturedTrace},Promise.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},Promise.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},Promise.prototype._captureStackTrace=function(){return debugging&&(this._trace=new CapturedTrace(this._peekContext())),this},Promise.prototype._attachExtraTrace=function(error,ignoreSelf){if(debugging&&canAttachTrace(error)){var trace=this._trace;if(void 0!==trace&&ignoreSelf&&(trace=trace._parent),void 0!==trace)trace.attachExtraTrace(error);else if(!error.__stackCleaned__){var parsed=CapturedTrace.parseStackAndMessage(error);util.notEnumerableProp(error,"stack",parsed.message+"\n"+parsed.stack.join("\n")),util.notEnumerableProp(error,"__stackCleaned__",!0)}}},Promise.prototype._warn=function(message){var warning=new Warning(message),ctx=this._peekContext();if(ctx)ctx.attachExtraTrace(warning);else{var parsed=CapturedTrace.parseStackAndMessage(warning);warning.stack=parsed.message+"\n"+parsed.stack.join("\n")}CapturedTrace.formatAndLogError(warning,"")},Promise.onPossiblyUnhandledRejection=function(fn){var domain=getDomain();possiblyUnhandledRejection="function"==typeof fn?null===domain?fn:domain.bind(fn):void 0},Promise.onUnhandledRejectionHandled=function(fn){var domain=getDomain();unhandledRejectionHandled="function"==typeof fn?null===domain?fn:domain.bind(fn):void 0},Promise.longStackTraces=function(){if(async.haveItemsQueued()&&debugging===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");debugging=CapturedTrace.isSupported(),debugging&&async.disableTrampolineIfNecessary()},Promise.hasLongStackTraces=function(){return debugging&&CapturedTrace.isSupported()},CapturedTrace.isSupported()||(Promise.longStackTraces=function(){},debugging=!1),function(){return debugging}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){"use strict";var util=_dereq_("./util.js"),isPrimitive=util.isPrimitive;module.exports=function(Promise){var returner=function(){return this},thrower=function(){throw this},returnUndefined=function(){},throwUndefined=function(){throw void 0},wrapper=function(value,action){return 1===action?function(){throw value}:2===action?function(){return value}:void 0};Promise.prototype.return=Promise.prototype.thenReturn=function(value){return void 0===value?this.then(returnUndefined):isPrimitive(value)?this._then(wrapper(value,2),void 0,void 0,void 0,void 0):(value instanceof Promise&&value._ignoreRejections(),this._then(returner,void 0,void 0,value,void 0))},Promise.prototype.throw=Promise.prototype.thenThrow=function(reason){return void 0===reason?this.then(throwUndefined):isPrimitive(reason)?this._then(wrapper(reason,1),void 0,void 0,void 0,void 0):this._then(thrower,void 0,void 0,reason,void 0)}}},{"./util.js":38}],12:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){var PromiseReduce=Promise.reduce;Promise.prototype.each=function(fn){return PromiseReduce(this,fn,null,INTERNAL)},Promise.each=function(promises,fn){return PromiseReduce(promises,fn,null,INTERNAL)}}},{}],13:[function(_dereq_,module,exports){"use strict";function subError(nameProperty,defaultMessage){function SubError(message){return this instanceof SubError?(notEnumerableProp(this,"message","string"==typeof message?message:defaultMessage),notEnumerableProp(this,"name",nameProperty),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new SubError(message)}return inherits(SubError,Error),SubError}function OperationalError(message){return this instanceof OperationalError?(notEnumerableProp(this,"name","OperationalError"),notEnumerableProp(this,"message",message),this.cause=message,this.isOperational=!0,void(message instanceof Error?(notEnumerableProp(this,"message",message.message),notEnumerableProp(this,"stack",message.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new OperationalError(message)}var _TypeError,_RangeError,es5=_dereq_("./es5.js"),Objectfreeze=es5.freeze,util=_dereq_("./util.js"),inherits=util.inherits,notEnumerableProp=util.notEnumerableProp,Warning=subError("Warning","warning"),CancellationError=subError("CancellationError","cancellation error"),TimeoutError=subError("TimeoutError","timeout error"),AggregateError=subError("AggregateError","aggregate error");try{_TypeError=TypeError,_RangeError=RangeError}catch(e){_TypeError=subError("TypeError","type error"),_RangeError=subError("RangeError","range error")}for(var methods="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),i=0;i0&&"function"==typeof arguments[last]){fn=arguments[last];var ret}for(var $_len=arguments.length,args=new Array($_len),$_i=0;$_i<$_len;++$_i)args[$_i]=arguments[$_i];fn&&args.pop();var ret=new PromiseArray(args).promise();return void 0!==fn?ret.spread(fn):ret}}},{"./util.js":38}],19:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL){function MappingPromiseArray(promises,fn,limit,_filter){this.constructor$(promises),this._promise._captureStackTrace();var domain=getDomain();this._callback=null===domain?fn:domain.bind(fn),this._preservedValues=_filter===INTERNAL?new Array(this.length()):null,this._limit=limit,this._inFlight=0,this._queue=limit>=1?[]:EMPTY_ARRAY,async.invoke(init,this,void 0)}function init(){this._init$(void 0,-2)}function map(promises,fn,options,_filter){var limit="object"==typeof options&&null!==options?options.concurrency:0;return limit="number"==typeof limit&&isFinite(limit)&&limit>=1?limit:0,new MappingPromiseArray(promises,fn,limit,_filter)}var getDomain=Promise._getDomain,async=_dereq_("./async.js"),util=_dereq_("./util.js"),tryCatch=util.tryCatch,errorObj=util.errorObj,PENDING={},EMPTY_ARRAY=[];util.inherits(MappingPromiseArray,PromiseArray),MappingPromiseArray.prototype._init=function(){},MappingPromiseArray.prototype._promiseFulfilled=function(value,index){var values=this._values,length=this.length(),preservedValues=this._preservedValues,limit=this._limit;if(values[index]===PENDING){if(values[index]=value,limit>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(limit>=1&&this._inFlight>=limit)return values[index]=value,void this._queue.push(index);null!==preservedValues&&(preservedValues[index]=value);var callback=this._callback,receiver=this._promise._boundValue();this._promise._pushContext();var ret=tryCatch(callback).call(receiver,value,index,length);if(this._promise._popContext(),ret===errorObj)return this._reject(ret.e);var maybePromise=tryConvertToPromise(ret,this._promise);if(maybePromise instanceof Promise){if(maybePromise=maybePromise._target(),maybePromise._isPending())return limit>=1&&this._inFlight++,values[index]=PENDING,maybePromise._proxyPromiseArray(this,index);if(!maybePromise._isFulfilled())return this._reject(maybePromise._reason());ret=maybePromise._value()}values[index]=ret}var totalResolved=++this._totalResolved;totalResolved>=length&&(null!==preservedValues?this._filter(values,preservedValues):this._resolve(values))},MappingPromiseArray.prototype._drainQueue=function(){for(var queue=this._queue,limit=this._limit,values=this._values;queue.length>0&&this._inFlight1){var i,catchInstances=new Array(len-1),j=0;for(i=0;i0&&"function"!=typeof didFulfill&&"function"!=typeof didReject){var msg=".then() only accepts functions but was passed: "+util.classString(didFulfill);arguments.length>1&&(msg+=", "+util.classString(didReject)),this._warn(msg)}return this._then(didFulfill,didReject,didProgress,void 0,void 0)},Promise.prototype.done=function(didFulfill,didReject,didProgress){var promise=this._then(didFulfill,didReject,didProgress,void 0,void 0);promise._setIsFinal()},Promise.prototype.spread=function(didFulfill,didReject){return this.all()._then(didFulfill,didReject,void 0,APPLY,void 0)},Promise.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},Promise.prototype.toJSON=function(){var ret={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(ret.fulfillmentValue=this.value(),ret.isFulfilled=!0):this.isRejected()&&(ret.rejectionReason=this.reason(),ret.isRejected=!0),ret},Promise.prototype.all=function(){return new PromiseArray(this).promise()},Promise.prototype.error=function(fn){return this.caught(util.originatesFromRejection,fn)},Promise.getNewLibraryCopy=module.exports,Promise.is=function(val){return val instanceof Promise},Promise.fromNode=function(fn){var ret=new Promise(INTERNAL),result=tryCatch(fn)(nodebackForPromise(ret));return result===errorObj&&ret._rejectCallback(result.e,!0,!0),ret},Promise.all=function(promises){return new PromiseArray(promises).promise()},Promise.defer=Promise.pending=function(){var promise=new Promise(INTERNAL);return new PromiseResolver(promise)},Promise.cast=function(obj){var ret=tryConvertToPromise(obj);if(!(ret instanceof Promise)){var val=ret;ret=new Promise(INTERNAL),ret._fulfillUnchecked(val)}return ret},Promise.resolve=Promise.fulfilled=Promise.cast,Promise.reject=Promise.rejected=function(reason){var ret=new Promise(INTERNAL);return ret._captureStackTrace(),ret._rejectCallback(reason,!0),ret},Promise.setScheduler=function(fn){if("function"!=typeof fn)throw new TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");var prev=async._schedule;return async._schedule=fn,prev},Promise.prototype._then=function(didFulfill,didReject,didProgress,receiver,internalData){var haveInternalData=void 0!==internalData,ret=haveInternalData?internalData:new Promise(INTERNAL);haveInternalData||(ret._propagateFrom(this,5),ret._captureStackTrace());var target=this._target();target!==this&&(void 0===receiver&&(receiver=this._boundTo),haveInternalData||ret._setIsMigrated());var callbackIndex=target._addCallbacks(didFulfill,didReject,didProgress,ret,receiver,getDomain());return target._isResolved()&&!target._isSettlePromisesQueued()&&async.invoke(target._settlePromiseAtPostResolution,target,callbackIndex),ret},Promise.prototype._settlePromiseAtPostResolution=function(index){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(index)},Promise.prototype._length=function(){return 131071&this._bitField},Promise.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},Promise.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},Promise.prototype._setLength=function(len){this._bitField=this._bitField&-131072|131071&len},Promise.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},Promise.prototype._setRejected=function(){this._bitField=134217728|this._bitField},Promise.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},Promise.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},Promise.prototype._isFinal=function(){return(33554432&this._bitField)>0},Promise.prototype._cancellable=function(){return(67108864&this._bitField)>0},Promise.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},Promise.prototype._unsetCancellable=function(){this._bitField=this._bitField&-67108865},Promise.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},Promise.prototype._unsetIsMigrated=function(){this._bitField=this._bitField&-4194305},Promise.prototype._isMigrated=function(){return(4194304&this._bitField)>0},Promise.prototype._receiverAt=function(index){var ret=0===index?this._receiver0:this[5*index-5+4];if(ret!==UNDEFINED_BINDING)return void 0===ret&&this._isBound()?this._boundValue():ret},Promise.prototype._promiseAt=function(index){return 0===index?this._promise0:this[5*index-5+3]},Promise.prototype._fulfillmentHandlerAt=function(index){return 0===index?this._fulfillmentHandler0:this[5*index-5+0]},Promise.prototype._rejectionHandlerAt=function(index){return 0===index?this._rejectionHandler0:this[5*index-5+1]},Promise.prototype._boundValue=function(){var ret=this._boundTo;return void 0!==ret&&ret instanceof Promise?ret.isFulfilled()?ret.value():void 0:ret},Promise.prototype._migrateCallbacks=function(follower,index){var fulfill=follower._fulfillmentHandlerAt(index),reject=follower._rejectionHandlerAt(index),progress=follower._progressHandlerAt(index),promise=follower._promiseAt(index),receiver=follower._receiverAt(index);promise instanceof Promise&&promise._setIsMigrated(),void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,progress,promise,receiver,null)},Promise.prototype._addCallbacks=function(fulfill,reject,progress,promise,receiver,domain){var index=this._length();if(index>=131066&&(index=0,this._setLength(0)),0===index)this._promise0=promise,void 0!==receiver&&(this._receiver0=receiver),"function"!=typeof fulfill||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===domain?fulfill:domain.bind(fulfill)),"function"==typeof reject&&(this._rejectionHandler0=null===domain?reject:domain.bind(reject)),"function"==typeof progress&&(this._progressHandler0=null===domain?progress:domain.bind(progress));else{var base=5*index-5;this[base+3]=promise,this[base+4]=receiver,"function"==typeof fulfill&&(this[base+0]=null===domain?fulfill:domain.bind(fulfill)),"function"==typeof reject&&(this[base+1]=null===domain?reject:domain.bind(reject)),"function"==typeof progress&&(this[base+2]=null===domain?progress:domain.bind(progress))}return this._setLength(index+1),index},Promise.prototype._setProxyHandlers=function(receiver,promiseSlotValue){var index=this._length();if(index>=131066&&(index=0,this._setLength(0)),0===index)this._promise0=promiseSlotValue,this._receiver0=receiver;else{var base=5*index-5;this[base+3]=promiseSlotValue,this[base+4]=receiver}this._setLength(index+1)},Promise.prototype._proxyPromiseArray=function(promiseArray,index){this._setProxyHandlers(promiseArray,index)},Promise.prototype._resolveCallback=function(value,shouldBind){if(!this._isFollowingOrFulfilledOrRejected()){if(value===this)return this._rejectCallback(makeSelfResolutionError(),!1,!0);var maybePromise=tryConvertToPromise(value,this);if(!(maybePromise instanceof Promise))return this._fulfill(value);var propagationFlags=1|(shouldBind?4:0);this._propagateFrom(maybePromise,propagationFlags);var promise=maybePromise._target();if(promise._isPending()){for(var len=this._length(),i=0;i0&&parent._cancellable()&&(this._setCancellable(),this._cancellationParent=parent),(4&flags)>0&&parent._isBound()&&this._setBoundTo(parent._boundTo)},Promise.prototype._fulfill=function(value){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(value)},Promise.prototype._reject=function(reason,carriedStackTrace){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(reason,carriedStackTrace)},Promise.prototype._settlePromiseAt=function(index){var promise=this._promiseAt(index),isPromise=promise instanceof Promise;if(isPromise&&promise._isMigrated())return promise._unsetIsMigrated(),async.invoke(this._settlePromiseAt,this,index);var handler=this._isFulfilled()?this._fulfillmentHandlerAt(index):this._rejectionHandlerAt(index),carriedStackTrace=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,value=this._settledValue,receiver=this._receiverAt(index);this._clearCallbackDataAtIndex(index),"function"==typeof handler?isPromise?this._settlePromiseFromHandler(handler,receiver,value,promise):handler.call(receiver,value,promise):receiver instanceof PromiseArray?receiver._isResolved()||(this._isFulfilled()?receiver._promiseFulfilled(value,promise):receiver._promiseRejected(value,promise)):isPromise&&(this._isFulfilled()?promise._fulfill(value):promise._reject(value,carriedStackTrace)),index>=4&&4===(31&index)&&async.invokeLater(this._setLength,this,0)},Promise.prototype._clearCallbackDataAtIndex=function(index){if(0===index)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var base=5*index-5;this[base+3]=this[base+4]=this[base+0]=this[base+1]=this[base+2]=void 0}},Promise.prototype._isSettlePromisesQueued=function(){return(this._bitField&-1073741824)===-1073741824},Promise.prototype._setSettlePromisesQueued=function(){this._bitField=this._bitField|-1073741824},Promise.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},Promise.prototype._queueSettlePromises=function(){async.settlePromises(this),this._setSettlePromisesQueued()},Promise.prototype._fulfillUnchecked=function(value){if(value===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._rejectUnchecked(err,void 0)}this._setFulfilled(),this._settledValue=value,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},Promise.prototype._rejectUncheckedCheckError=function(reason){var trace=util.ensureErrorObject(reason);this._rejectUnchecked(reason,trace===reason?void 0:trace)},Promise.prototype._rejectUnchecked=function(reason,trace){if(reason===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._rejectUnchecked(err)}return this._setRejected(),this._settledValue=reason,this._cleanValues(),this._isFinal()?void async.throwLater(function(e){throw"stack"in e&&async.invokeFirst(CapturedTrace.unhandledRejection,void 0,e),e},void 0===trace?reason:trace):(void 0!==trace&&trace!==reason&&this._setCarriedStackTrace(trace),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},Promise.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var len=this._length(),i=0;i=this._length&&this._resolve(this._values)},PromiseArray.prototype._promiseRejected=function(reason,index){this._totalResolved++,this._reject(reason)},PromiseArray.prototype.shouldCopyValues=function(){return!0},PromiseArray.prototype.getActualLength=function(len){return len},PromiseArray}},{"./util.js":38}],25:[function(_dereq_,module,exports){"use strict";function isUntypedError(obj){return obj instanceof Error&&es5.getPrototypeOf(obj)===Error.prototype}function wrapAsOperationalError(obj){var ret;if(isUntypedError(obj)){ret=new OperationalError(obj),ret.name=obj.name,ret.message=obj.message,ret.stack=obj.stack;for(var keys=es5.keys(obj),i=0;i2){for(var $_len=arguments.length,args=new Array($_len-1),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];promise._fulfill(args)}else promise._fulfill(value);promise=null}}}var PromiseResolver,util=_dereq_("./util.js"),maybeWrapAsError=util.maybeWrapAsError,errors=_dereq_("./errors.js"),TimeoutError=errors.TimeoutError,OperationalError=errors.OperationalError,haveGetters=util.haveGetters,es5=_dereq_("./es5.js"),rErrorKey=/^(?:name|message|stack|cause)$/;if(PromiseResolver=haveGetters?function(promise){this.promise=promise}:function(promise){this.promise=promise,this.asCallback=nodebackForPromise(promise),this.callback=this.asCallback},haveGetters){var prop={get:function(){return nodebackForPromise(this.promise)}};es5.defineProperty(PromiseResolver.prototype,"asCallback",prop),es5.defineProperty(PromiseResolver.prototype,"callback",prop)}PromiseResolver._nodebackForPromise=nodebackForPromise,PromiseResolver.prototype.toString=function(){return"[object PromiseResolver]"},PromiseResolver.prototype.resolve=PromiseResolver.prototype.fulfill=function(value){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(value)},PromiseResolver.prototype.reject=function(reason){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(reason)},PromiseResolver.prototype.progress=function(value){if(!(this instanceof PromiseResolver))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(value)},PromiseResolver.prototype.cancel=function(err){this.promise.cancel(err)},PromiseResolver.prototype.timeout=function(){this.reject(new TimeoutError("timeout"))},PromiseResolver.prototype.isResolved=function(){return this.promise.isResolved()},PromiseResolver.prototype.toJSON=function(){return this.promise.toJSON()},module.exports=PromiseResolver},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function propsFilter(key){return!noCopyPropsPattern.test(key)}function isPromisified(fn){try{return fn.__isPromisified__===!0}catch(e){return!1}}function hasPromisified(obj,key,suffix){var val=util.getDataPropertyOrDefault(obj,key+suffix,defaultPromisified);return!!val&&isPromisified(val)}function checkValid(ret,suffix,suffixRegexp){for(var i=0;i=this._length){for(var val={},keyOffset=this.length(),i=0,len=this.length();i>1},Promise.prototype.props=function(){return props(this)},Promise.props=function(promises){return props(promises)}}},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){"use strict";function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j=this._length&&this._resolve(this._values)},SettledPromiseArray.prototype._promiseFulfilled=function(value,index){var ret=new PromiseInspection;ret._bitField=268435456,ret._settledValue=value,this._promiseResolved(index,ret)},SettledPromiseArray.prototype._promiseRejected=function(reason,index){var ret=new PromiseInspection;ret._bitField=134217728,ret._settledValue=reason,this._promiseResolved(index,ret)},Promise.settle=function(promises){return new SettledPromiseArray(promises).promise()},Promise.prototype.settle=function(){return new SettledPromiseArray(this).promise()}}},{"./util.js":38}],33:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection){function SomePromiseArray(values){this.constructor$(values),this._howMany=0,this._unwrap=!1,this._initialized=!1}function some(promises,howMany){if((0|howMany)!==howMany||howMany<0)return apiRejection("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(howMany),ret.init(),promise}var util=_dereq_("./util.js"),RangeError=_dereq_("./errors.js").RangeError,AggregateError=_dereq_("./errors.js").AggregateError,isArray=util.isArray;util.inherits(SomePromiseArray,PromiseArray),SomePromiseArray.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var isArrayResolved=isArray(this._values);!this._isResolved()&&isArrayResolved&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},SomePromiseArray.prototype.init=function(){this._initialized=!0,this._init()},SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=!0},SomePromiseArray.prototype.howMany=function(){return this._howMany},SomePromiseArray.prototype.setHowMany=function(count){this._howMany=count},SomePromiseArray.prototype._promiseFulfilled=function(value){this._addFulfilled(value),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},SomePromiseArray.prototype._promiseRejected=function(reason){if(this._addRejected(reason),this.howMany()>this._canPossiblyFulfill()){for(var e=new AggregateError,i=this.length();i0},PromiseInspection.prototype.isRejected=Promise.prototype._isRejected=function(){return(134217728&this._bitField)>0},PromiseInspection.prototype.isPending=Promise.prototype._isPending=function(){return 0===(402653184&this._bitField)},PromiseInspection.prototype.isResolved=Promise.prototype._isResolved=function(){return(402653184&this._bitField)>0},Promise.prototype.isPending=function(){return this._target()._isPending()},Promise.prototype.isRejected=function(){return this._target()._isRejected()},Promise.prototype.isFulfilled=function(){return this._target()._isFulfilled()},Promise.prototype.isResolved=function(){return this._target()._isResolved()},Promise.prototype._value=function(){return this._settledValue},Promise.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},Promise.prototype.value=function(){var target=this._target();if(!target.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return target._settledValue},Promise.prototype.reason=function(){var target=this._target();if(!target.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return target._unsetRejectionIsUnhandled(),target._settledValue},Promise.PromiseInspection=PromiseInspection}},{}],35:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function tryConvertToPromise(obj,context){if(isObject(obj)){if(obj instanceof Promise)return obj;if(isAnyBluebirdPromise(obj)){var ret=new Promise(INTERNAL);return obj._then(ret._fulfillUnchecked,ret._rejectUncheckedCheckError,ret._progressUnchecked,ret,null),ret}var then=util.tryCatch(getThen)(obj);if(then===errorObj){context&&context._pushContext();var ret=Promise.reject(then.e);return context&&context._popContext(),ret}if("function"==typeof then)return doThenable(obj,then,context)}return obj}function getThen(obj){return obj.then}function isAnyBluebirdPromise(obj){return hasProp.call(obj,"_promise0")}function doThenable(x,then,context){function resolveFromThenable(value){promise&&(promise._resolveCallback(value),promise=null)}function rejectFromThenable(reason){promise&&(promise._rejectCallback(reason,synchronous,!0),promise=null)}function progressFromThenable(value){promise&&"function"==typeof promise._progress&&promise._progress(value)}var promise=new Promise(INTERNAL),ret=promise;context&&context._pushContext(),promise._captureStackTrace(),context&&context._popContext();var synchronous=!0,result=util.tryCatch(then).call(x,resolveFromThenable,rejectFromThenable,progressFromThenable);return synchronous=!1,promise&&result===errorObj&&(promise._rejectCallback(result.e,!0,!0),promise=null),ret}var util=_dereq_("./util.js"),errorObj=util.errorObj,isObject=util.isObject,hasProp={}.hasOwnProperty;return tryConvertToPromise}},{"./util.js":38}],36:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function successClear(value){var handle=this;return handle instanceof Number&&(handle=+handle),clearTimeout(handle),value}function failureClear(reason){var handle=this;throw handle instanceof Number&&(handle=+handle),clearTimeout(handle),reason}var util=_dereq_("./util.js"),TimeoutError=Promise.TimeoutError,afterTimeout=function(promise,message){if(promise.isPending()){var err;!util.isPrimitive(message)&&message instanceof Error?err=message:("string"!=typeof message&&(message="operation timed out"),err=new TimeoutError(message)),util.markAsOriginatingFromRejection(err),promise._attachExtraTrace(err),promise._cancel(err)}},afterValue=function(value){return delay(+this).thenReturn(value)},delay=Promise.delay=function(value,ms){if(void 0===ms){ms=value,value=void 0;var ret=new Promise(INTERNAL);return setTimeout(function(){ret._fulfill()},ms),ret}return ms=+ms,Promise.resolve(value)._then(afterValue,null,null,ms,void 0)};Promise.prototype.delay=function(ms){return delay(this,ms)},Promise.prototype.timeout=function(ms,message){ms=+ms;var ret=this.then().cancellable();ret._cancellationParent=this;var handle=setTimeout(function(){afterTimeout(ret,message)},ms);return ret._then(successClear,failureClear,void 0,handle,void 0)}}},{"./util.js":38}],37:[function(_dereq_,module,exports){"use strict";module.exports=function(Promise,apiRejection,tryConvertToPromise,createContext){function inspectionMapper(inspections){for(var len=inspections.length,i=0;i=len)return ret.resolve();var maybePromise=castPreservingDisposable(resources[i++]);if(maybePromise instanceof Promise&&maybePromise._isDisposable()){try{maybePromise=tryConvertToPromise(maybePromise._getDisposer().tryDispose(inspection),resources.promise)}catch(e){return thrower(e)}if(maybePromise instanceof Promise)return maybePromise._then(iterator,thrower,null,null,null)}iterator()}var i=0,len=resources.length,ret=Promise.defer();return iterator(),ret.promise}function disposerSuccess(value){var inspection=new PromiseInspection;return inspection._settledValue=value,inspection._bitField=268435456,dispose(this,inspection).thenReturn(value)}function disposerFail(reason){var inspection=new PromiseInspection;return inspection._settledValue=reason,inspection._bitField=134217728,dispose(this,inspection).thenThrow(reason)}function Disposer(data,promise,context){this._data=data,this._promise=promise,this._context=context}function FunctionDisposer(fn,promise,context){this.constructor$(fn,promise,context)}function maybeUnwrapDisposer(value){return Disposer.isDisposer(value)?(this.resources[this.index]._setDisposable(value),value.promise()):value}var TypeError=_dereq_("./errors.js").TypeError,inherits=_dereq_("./util.js").inherits,PromiseInspection=Promise.PromiseInspection;Disposer.prototype.data=function(){return this._data},Disposer.prototype.promise=function(){return this._promise},Disposer.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},Disposer.prototype.tryDispose=function(inspection){var resource=this.resource(),context=this._context;void 0!==context&&context._pushContext();var ret=null!==resource?this.doDispose(resource,inspection):null;return void 0!==context&&context._popContext(),this._promise._unsetDisposable(),this._data=null,ret},Disposer.isDisposer=function(d){return null!=d&&"function"==typeof d.resource&&"function"==typeof d.tryDispose},inherits(FunctionDisposer,Disposer),FunctionDisposer.prototype.doDispose=function(resource,inspection){var fn=this.data();return fn.call(resource,resource,inspection)},Promise.using=function(){var len=arguments.length;if(len<2)return apiRejection("you must pass at least 2 arguments to Promise.using");var fn=arguments[len-1];if("function"!=typeof fn)return apiRejection("fn must be a function\n\n See http://goo.gl/916lJJ\n");var input,spreadArgs=!0;2===len&&Array.isArray(arguments[0])?(input=arguments[0],len=input.length,spreadArgs=!1):(input=arguments,len--);for(var resources=new Array(len),i=0;i0},Promise.prototype._getDisposer=function(){return this._disposer},Promise.prototype._unsetDisposable=function(){this._bitField=this._bitField&-262145,this._disposer=void 0},Promise.prototype.disposer=function(fn){if("function"==typeof fn)return new FunctionDisposer(fn,this,createContext());throw new TypeError}}},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){"use strict";function tryCatcher(){try{var target=tryCatchTarget;return tryCatchTarget=null,target.apply(this,arguments)}catch(e){return errorObj.e=e,errorObj}}function tryCatch(fn){return tryCatchTarget=fn,tryCatcher}function isPrimitive(val){return null==val||val===!0||val===!1||"string"==typeof val||"number"==typeof val}function isObject(value){return!isPrimitive(value)}function maybeWrapAsError(maybeError){return isPrimitive(maybeError)?new Error(safeToString(maybeError)):maybeError}function withAppended(target,appendee){var i,len=target.length,ret=new Array(len+1);for(i=0;i1,hasMethodsOtherThanConstructor=keys.length>0&&!(1===keys.length&&"constructor"===keys[0]),hasThisAssignmentAndStaticMethods=thisAssignmentPattern.test(fn+"")&&es5.names(fn).length>0;if(hasMethods||hasMethodsOtherThanConstructor||hasThisAssignmentAndStaticMethods)return!0}return!1}catch(e){return!1}}function toFastProperties(obj){function f(){}f.prototype=obj;for(var l=8;l--;)new f;return obj}function isIdentifier(str){return rident.test(str)}function filledRange(count,prefix,suffix){for(var ret=new Array(count),i=0;i10||version[0]>0}(),ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(exports,__webpack_require__(30),function(){return this}(),__webpack_require__(31).setImmediate)},,,,,,,,function(module,exports){"use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var obj={},sym=Symbol("test"),symObj=Object(sym);if("string"==typeof sym)return!1;if("[object Symbol]"!==Object.prototype.toString.call(sym))return!1;if("[object Symbol]"!==Object.prototype.toString.call(symObj))return!1;var symVal=42;obj[sym]=symVal;for(sym in obj)return!1;if("function"==typeof Object.keys&&0!==Object.keys(obj).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(obj).length)return!1;var syms=Object.getOwnPropertySymbols(obj);if(1!==syms.length||syms[0]!==sym)return!1;if(!Object.prototype.propertyIsEnumerable.call(obj,sym))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==!0)return!1}return!0}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(48),callBind=__webpack_require__(61),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")>-1?callBind(intrinsic):intrinsic}},function(module,exports,__webpack_require__){"use strict";var undefined,$Error=__webpack_require__(49),$EvalError=__webpack_require__(50),$RangeError=__webpack_require__(51),$ReferenceError=__webpack_require__(52),$SyntaxError=__webpack_require__(53),$TypeError=__webpack_require__(54),$URIError=__webpack_require__(55),$Function=Function,getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch(e){$gOPD=null}var throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError,hasSymbols=__webpack_require__(56)(),hasProto=__webpack_require__(57)(),getProto=Object.getPrototypeOf||(hasProto?function(x){return x.__proto__}:null),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet};if(getProto)try{null.error}catch(e){var errorProto=getProto(getProto(e));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function doEval(name){var value;if("%AsyncFunction%"===name)value=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===name)value=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===name)value=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===name){var fn=doEval("%AsyncGeneratorFunction%");fn&&(value=fn.prototype)}else if("%AsyncIteratorPrototype%"===name){var gen=doEval("%AsyncGenerator%");gen&&getProto&&(value=getProto(gen.prototype))}return INTRINSICS[name]=value,value},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=__webpack_require__(58),hasOwn=__webpack_require__(60),$concat=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(string){var first=$strSlice(string,0,1),last=$strSlice(string,-1);if("%"===first&&"%"!==last)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===last&&"%"!==first)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var result=[];return $replace(string,rePropName,function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match}),result},getBaseIntrinsic=function(name,allowMissing){var alias,intrinsicName=name;if(hasOwn(LEGACY_ALIASES,intrinsicName)&&(alias=LEGACY_ALIASES[intrinsicName],intrinsicName="%"+alias[0]+"%"),hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(value===needsEval&&(value=doEval(intrinsicName)),"undefined"==typeof value&&!allowMissing)throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return{alias:alias,name:intrinsicName,value:value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function(name,allowMissing){if("string"!=typeof name||0===name.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,name))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var parts=stringToPath(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i=parts.length){var desc=$gOPD(value,part);isOwn=!!desc,value=isOwn&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value[part]}else isOwn=hasOwn(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value}},function(module,exports){"use strict";module.exports=Error},function(module,exports){"use strict";module.exports=EvalError},function(module,exports){"use strict";module.exports=RangeError},function(module,exports){"use strict";module.exports=ReferenceError},function(module,exports){"use strict";module.exports=SyntaxError},function(module,exports){"use strict";module.exports=TypeError},function(module,exports){"use strict";module.exports=URIError},function(module,exports,__webpack_require__){"use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=__webpack_require__(46);module.exports=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}},function(module,exports){"use strict";var test={__proto__:null,foo:{}},$Object=Object;module.exports=function(){return{__proto__:test}.foo===test.foo&&!(test instanceof $Object)}},function(module,exports,__webpack_require__){"use strict";var implementation=__webpack_require__(59);module.exports=Function.prototype.bind||implementation},function(module,exports){"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function(a,b){for(var arr=[],i=0;i4294967295||$floor(length)!==length)throw new $TypeError("`length` must be a positive 32-bit integer");var loose=arguments.length>2&&!!arguments[2],functionLengthIsConfigurable=!0,functionLengthIsWritable=!0;if("length"in fn&&gOPD){var desc=gOPD(fn,"length");desc&&!desc.configurable&&(functionLengthIsConfigurable=!1),desc&&!desc.writable&&(functionLengthIsWritable=!1)}return(functionLengthIsConfigurable||functionLengthIsWritable||!loose)&&(hasDescriptors?define(fn,"length",length,!0,!0):define(fn,"length",length)),fn}},function(module,exports,__webpack_require__){"use strict";var $defineProperty=__webpack_require__(64),$SyntaxError=__webpack_require__(53),$TypeError=__webpack_require__(54),gopd=__webpack_require__(65);module.exports=function(obj,property,value){if(!obj||"object"!=typeof obj&&"function"!=typeof obj)throw new $TypeError("`obj` must be an object or a function`");if("string"!=typeof property&&"symbol"!=typeof property)throw new $TypeError("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new $TypeError("`loose`, if provided, must be a boolean");var nonEnumerable=arguments.length>3?arguments[3]:null,nonWritable=arguments.length>4?arguments[4]:null,nonConfigurable=arguments.length>5?arguments[5]:null,loose=arguments.length>6&&arguments[6],desc=!!gopd&&gopd(obj,property);if($defineProperty)$defineProperty(obj,property,{configurable:null===nonConfigurable&&desc?desc.configurable:!nonConfigurable,enumerable:null===nonEnumerable&&desc?desc.enumerable:!nonEnumerable,value:value,writable:null===nonWritable&&desc?desc.writable:!nonWritable});else{if(!loose&&(nonEnumerable||nonWritable||nonConfigurable))throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");obj[property]=value}}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(48),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0)||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(48),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0);if($gOPD)try{$gOPD([],"length")}catch(e){$gOPD=null}module.exports=$gOPD},function(module,exports,__webpack_require__){"use strict";var $defineProperty=__webpack_require__(64),hasPropertyDescriptors=function(){return!!$defineProperty};hasPropertyDescriptors.hasArrayLengthDefineBug=function(){if(!$defineProperty)return null;try{return 1!==$defineProperty([],"length",{value:1}).length}catch(e){return!0}},module.exports=hasPropertyDescriptors},,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function classNames(){for(var classes="",i=0;i=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(recurseTimes<0)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n"))):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"),path||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;i/g,REGEXP_QUOTE=/"/g,REGEXP_QUOTE_2=/"/g,REGEXP_ATTR_VALUE_1=/&#([a-zA-Z0-9]*);?/gim,REGEXP_ATTR_VALUE_COLON=/:?/gim,REGEXP_ATTR_VALUE_NEWLINE=/&newline;?/gim,REGEXP_DEFAULT_ON_TAG_ATTR_4=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,REGEXP_DEFAULT_ON_TAG_ATTR_7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,REGEXP_DEFAULT_ON_TAG_ATTR_8=/u\s*r\s*l\s*\(.*/gi,STRIP_COMMENT_TAG_REGEXP=//g;exports.whiteList=getDefaultWhiteList(),exports.getDefaultWhiteList=getDefaultWhiteList,exports.onTag=onTag,exports.onIgnoreTag=onIgnoreTag,exports.onTagAttr=onTagAttr,exports.onIgnoreTagAttr=onIgnoreTagAttr,exports.safeAttrValue=safeAttrValue,exports.escapeHtml=escapeHtml,exports.escapeQuote=escapeQuote,exports.unescapeQuote=unescapeQuote,exports.escapeHtmlEntities=escapeHtmlEntities,exports.escapeDangerHtml5Entities=escapeDangerHtml5Entities,exports.clearNonPrintableCharacter=clearNonPrintableCharacter,exports.friendlyAttrValue=friendlyAttrValue,exports.escapeAttrValue=escapeAttrValue,exports.onIgnoreTagStripAll=onIgnoreTagStripAll,exports.StripTagBody=StripTagBody,exports.stripCommentTag=stripCommentTag,exports.stripBlankChar=stripBlankChar,exports.cssFilter=defaultCSSFilter,exports.getDefaultCSSWhiteList=getDefaultCSSWhiteList},function(module,exports,__webpack_require__){function filterCSS(html,options){var xss=new FilterCSS(options);return xss.process(html)}var DEFAULT=__webpack_require__(392),FilterCSS=__webpack_require__(393);exports=module.exports=filterCSS,exports.FilterCSS=FilterCSS;for(var i in DEFAULT)exports[i]=DEFAULT[i];"undefined"!=typeof window&&(window.filterCSS=module.exports)},function(module,exports){function getDefaultWhiteList(){var whiteList={};return whiteList["align-content"]=!1,whiteList["align-items"]=!1,whiteList["align-self"]=!1,whiteList["alignment-adjust"]=!1,whiteList["alignment-baseline"]=!1,whiteList.all=!1,whiteList["anchor-point"]=!1,whiteList.animation=!1,whiteList["animation-delay"]=!1,whiteList["animation-direction"]=!1,whiteList["animation-duration"]=!1,whiteList["animation-fill-mode"]=!1,whiteList["animation-iteration-count"]=!1,whiteList["animation-name"]=!1,whiteList["animation-play-state"]=!1,whiteList["animation-timing-function"]=!1,whiteList.azimuth=!1,whiteList["backface-visibility"]=!1,whiteList.background=!0,whiteList["background-attachment"]=!0,whiteList["background-clip"]=!0,whiteList["background-color"]=!0,whiteList["background-image"]=!0,whiteList["background-origin"]=!0,whiteList["background-position"]=!0,whiteList["background-repeat"]=!0,whiteList["background-size"]=!0,whiteList["baseline-shift"]=!1,whiteList.binding=!1,whiteList.bleed=!1,whiteList["bookmark-label"]=!1,whiteList["bookmark-level"]=!1,whiteList["bookmark-state"]=!1,whiteList.border=!0,whiteList["border-bottom"]=!0,whiteList["border-bottom-color"]=!0,whiteList["border-bottom-left-radius"]=!0,whiteList["border-bottom-right-radius"]=!0,whiteList["border-bottom-style"]=!0,whiteList["border-bottom-width"]=!0,whiteList["border-collapse"]=!0,whiteList["border-color"]=!0,whiteList["border-image"]=!0,whiteList["border-image-outset"]=!0,whiteList["border-image-repeat"]=!0,whiteList["border-image-slice"]=!0,whiteList["border-image-source"]=!0,whiteList["border-image-width"]=!0,whiteList["border-left"]=!0,whiteList["border-left-color"]=!0,whiteList["border-left-style"]=!0,whiteList["border-left-width"]=!0,whiteList["border-radius"]=!0,whiteList["border-right"]=!0,whiteList["border-right-color"]=!0,whiteList["border-right-style"]=!0,whiteList["border-right-width"]=!0,whiteList["border-spacing"]=!0,whiteList["border-style"]=!0,whiteList["border-top"]=!0,whiteList["border-top-color"]=!0,whiteList["border-top-left-radius"]=!0,whiteList["border-top-right-radius"]=!0,whiteList["border-top-style"]=!0,whiteList["border-top-width"]=!0,whiteList["border-width"]=!0,whiteList.bottom=!1,whiteList["box-decoration-break"]=!0,whiteList["box-shadow"]=!0,whiteList["box-sizing"]=!0,whiteList["box-snap"]=!0,whiteList["box-suppress"]=!0,whiteList["break-after"]=!0,whiteList["break-before"]=!0,whiteList["break-inside"]=!0,whiteList["caption-side"]=!1,whiteList.chains=!1,whiteList.clear=!0,whiteList.clip=!1,whiteList["clip-path"]=!1,whiteList["clip-rule"]=!1,whiteList.color=!0,whiteList["color-interpolation-filters"]=!0,whiteList["column-count"]=!1,whiteList["column-fill"]=!1,whiteList["column-gap"]=!1,whiteList["column-rule"]=!1,whiteList["column-rule-color"]=!1,whiteList["column-rule-style"]=!1,whiteList["column-rule-width"]=!1,whiteList["column-span"]=!1,whiteList["column-width"]=!1,whiteList.columns=!1,whiteList.contain=!1,whiteList.content=!1,whiteList["counter-increment"]=!1,whiteList["counter-reset"]=!1,whiteList["counter-set"]=!1,whiteList.crop=!1,whiteList.cue=!1,whiteList["cue-after"]=!1,whiteList["cue-before"]=!1,whiteList.cursor=!1,whiteList.direction=!1,whiteList.display=!0,whiteList["display-inside"]=!0,whiteList["display-list"]=!0,whiteList["display-outside"]=!0,whiteList["dominant-baseline"]=!1,whiteList.elevation=!1,whiteList["empty-cells"]=!1,whiteList.filter=!1,whiteList.flex=!1,whiteList["flex-basis"]=!1,whiteList["flex-direction"]=!1,whiteList["flex-flow"]=!1,whiteList["flex-grow"]=!1,whiteList["flex-shrink"]=!1,whiteList["flex-wrap"]=!1,whiteList.float=!1,whiteList["float-offset"]=!1,whiteList["flood-color"]=!1,whiteList["flood-opacity"]=!1,whiteList["flow-from"]=!1,whiteList["flow-into"]=!1,whiteList.font=!0,whiteList["font-family"]=!0,whiteList["font-feature-settings"]=!0,whiteList["font-kerning"]=!0,whiteList["font-language-override"]=!0,whiteList["font-size"]=!0,whiteList["font-size-adjust"]=!0,whiteList["font-stretch"]=!0,whiteList["font-style"]=!0,whiteList["font-synthesis"]=!0,whiteList["font-variant"]=!0,whiteList["font-variant-alternates"]=!0,whiteList["font-variant-caps"]=!0,whiteList["font-variant-east-asian"]=!0,whiteList["font-variant-ligatures"]=!0,whiteList["font-variant-numeric"]=!0,whiteList["font-variant-position"]=!0,whiteList["font-weight"]=!0,whiteList.grid=!1,whiteList["grid-area"]=!1,whiteList["grid-auto-columns"]=!1,whiteList["grid-auto-flow"]=!1,whiteList["grid-auto-rows"]=!1,whiteList["grid-column"]=!1,whiteList["grid-column-end"]=!1,whiteList["grid-column-start"]=!1,whiteList["grid-row"]=!1,whiteList["grid-row-end"]=!1,whiteList["grid-row-start"]=!1,whiteList["grid-template"]=!1,whiteList["grid-template-areas"]=!1,whiteList["grid-template-columns"]=!1,whiteList["grid-template-rows"]=!1,whiteList["hanging-punctuation"]=!1,whiteList.height=!0,whiteList.hyphens=!1,whiteList.icon=!1,whiteList["image-orientation"]=!1,whiteList["image-resolution"]=!1,whiteList["ime-mode"]=!1,whiteList["initial-letters"]=!1,whiteList["inline-box-align"]=!1,whiteList["justify-content"]=!1,whiteList["justify-items"]=!1,whiteList["justify-self"]=!1,whiteList.left=!1,whiteList["letter-spacing"]=!0,whiteList["lighting-color"]=!0,whiteList["line-box-contain"]=!1,whiteList["line-break"]=!1,whiteList["line-grid"]=!1,whiteList["line-height"]=!1,whiteList["line-snap"]=!1,whiteList["line-stacking"]=!1,whiteList["line-stacking-ruby"]=!1,whiteList["line-stacking-shift"]=!1,whiteList["line-stacking-strategy"]=!1,whiteList["list-style"]=!0,whiteList["list-style-image"]=!0,whiteList["list-style-position"]=!0,whiteList["list-style-type"]=!0,whiteList.margin=!0,whiteList["margin-bottom"]=!0,whiteList["margin-left"]=!0,whiteList["margin-right"]=!0,whiteList["margin-top"]=!0,whiteList["marker-offset"]=!1,whiteList["marker-side"]=!1,whiteList.marks=!1,whiteList.mask=!1,whiteList["mask-box"]=!1,whiteList["mask-box-outset"]=!1,whiteList["mask-box-repeat"]=!1,whiteList["mask-box-slice"]=!1,whiteList["mask-box-source"]=!1,whiteList["mask-box-width"]=!1,whiteList["mask-clip"]=!1,whiteList["mask-image"]=!1,whiteList["mask-origin"]=!1,whiteList["mask-position"]=!1,whiteList["mask-repeat"]=!1,whiteList["mask-size"]=!1,whiteList["mask-source-type"]=!1,whiteList["mask-type"]=!1,whiteList["max-height"]=!0,whiteList["max-lines"]=!1,whiteList["max-width"]=!0,whiteList["min-height"]=!0,whiteList["min-width"]=!0,whiteList["move-to"]=!1,whiteList["nav-down"]=!1,whiteList["nav-index"]=!1,whiteList["nav-left"]=!1,whiteList["nav-right"]=!1,whiteList["nav-up"]=!1,whiteList["object-fit"]=!1,whiteList["object-position"]=!1,whiteList.opacity=!1,whiteList.order=!1,whiteList.orphans=!1,whiteList.outline=!1,whiteList["outline-color"]=!1,whiteList["outline-offset"]=!1,whiteList["outline-style"]=!1,whiteList["outline-width"]=!1,whiteList.overflow=!1,whiteList["overflow-wrap"]=!1,whiteList["overflow-x"]=!1,whiteList["overflow-y"]=!1,whiteList.padding=!0,whiteList["padding-bottom"]=!0,whiteList["padding-left"]=!0,whiteList["padding-right"]=!0,whiteList["padding-top"]=!0,whiteList.page=!1,whiteList["page-break-after"]=!1,whiteList["page-break-before"]=!1,whiteList["page-break-inside"]=!1,whiteList["page-policy"]=!1,whiteList.pause=!1,whiteList["pause-after"]=!1,whiteList["pause-before"]=!1,whiteList.perspective=!1,whiteList["perspective-origin"]=!1,whiteList.pitch=!1,whiteList["pitch-range"]=!1,whiteList["play-during"]=!1,whiteList.position=!1,whiteList["presentation-level"]=!1,whiteList.quotes=!1,whiteList["region-fragment"]=!1,whiteList.resize=!1,whiteList.rest=!1,whiteList["rest-after"]=!1,whiteList["rest-before"]=!1,whiteList.richness=!1,whiteList.right=!1,whiteList.rotation=!1,whiteList["rotation-point"]=!1,whiteList["ruby-align"]=!1,whiteList["ruby-merge"]=!1,whiteList["ruby-position"]=!1,whiteList["shape-image-threshold"]=!1,whiteList["shape-outside"]=!1,whiteList["shape-margin"]=!1,whiteList.size=!1,whiteList.speak=!1,whiteList["speak-as"]=!1,whiteList["speak-header"]=!1,whiteList["speak-numeral"]=!1,whiteList["speak-punctuation"]=!1,whiteList["speech-rate"]=!1,whiteList.stress=!1,whiteList["string-set"]=!1,whiteList["tab-size"]=!1,whiteList["table-layout"]=!1,whiteList["text-align"]=!0,whiteList["text-align-last"]=!0,whiteList["text-combine-upright"]=!0,whiteList["text-decoration"]=!0,whiteList["text-decoration-color"]=!0,whiteList["text-decoration-line"]=!0,whiteList["text-decoration-skip"]=!0,whiteList["text-decoration-style"]=!0,whiteList["text-emphasis"]=!0,whiteList["text-emphasis-color"]=!0,whiteList["text-emphasis-position"]=!0,whiteList["text-emphasis-style"]=!0,whiteList["text-height"]=!0,whiteList["text-indent"]=!0,whiteList["text-justify"]=!0,whiteList["text-orientation"]=!0,whiteList["text-overflow"]=!0,whiteList["text-shadow"]=!0,whiteList["text-space-collapse"]=!0,whiteList["text-transform"]=!0,whiteList["text-underline-position"]=!0,whiteList["text-wrap"]=!0,whiteList.top=!1,whiteList.transform=!1,whiteList["transform-origin"]=!1,whiteList["transform-style"]=!1,whiteList.transition=!1,whiteList["transition-delay"]=!1,whiteList["transition-duration"]=!1,whiteList["transition-property"]=!1,whiteList["transition-timing-function"]=!1,whiteList["unicode-bidi"]=!1,whiteList["vertical-align"]=!1,whiteList.visibility=!1,whiteList["voice-balance"]=!1,whiteList["voice-duration"]=!1,whiteList["voice-family"]=!1,whiteList["voice-pitch"]=!1,whiteList["voice-range"]=!1,whiteList["voice-rate"]=!1,whiteList["voice-stress"]=!1,whiteList["voice-volume"]=!1,whiteList.volume=!1,whiteList["white-space"]=!1,whiteList.widows=!1,whiteList.width=!0,whiteList["will-change"]=!1,whiteList["word-break"]=!0,whiteList["word-spacing"]=!0,whiteList["word-wrap"]=!0,whiteList["wrap-flow"]=!1,whiteList["wrap-through"]=!1,whiteList["writing-mode"]=!1,whiteList["z-index"]=!1,whiteList}function onAttr(name,value,options){}function onIgnoreAttr(name,value,options){}exports.whiteList=getDefaultWhiteList(),exports.getDefaultWhiteList=getDefaultWhiteList,exports.onAttr=onAttr,exports.onIgnoreAttr=onIgnoreAttr},function(module,exports,__webpack_require__){function isNull(obj){return void 0===obj||null===obj}function FilterCSS(options){options=options||{},options.whiteList=options.whiteList||DEFAULT.whiteList,options.onAttr=options.onAttr||DEFAULT.onAttr,options.onIgnoreAttr=options.onIgnoreAttr||DEFAULT.onIgnoreAttr,this.options=options}var DEFAULT=__webpack_require__(392),parseStyle=__webpack_require__(394);__webpack_require__(395);FilterCSS.prototype.process=function(css){if(css=css||"",css=css.toString(),!css)return"";var me=this,options=me.options,whiteList=options.whiteList,onAttr=options.onAttr,onIgnoreAttr=options.onIgnoreAttr,retCSS=parseStyle(css,function(sourcePosition,position,name,value,source){var check=whiteList[name],isWhite=!1;check===!0?isWhite=check:"function"==typeof check?isWhite=check(value):check instanceof RegExp&&(isWhite=check.test(value)),isWhite!==!0&&(isWhite=!1);var opts={position:position,sourcePosition:sourcePosition,source:source,isWhite:isWhite};if(isWhite){var ret=onAttr(name,value,opts);return isNull(ret)?name+":"+value:ret}var ret=onIgnoreAttr(name,value,opts);if(!isNull(ret))return ret});return retCSS},module.exports=FilterCSS},function(module,exports,__webpack_require__){function parseStyle(css,onAttr){function addNewAttr(){if(!isParenthesisOpen){var source=_.trim(css.slice(lastPos,i)),j=source.indexOf(":"); if(j!==-1){var name=_.trim(source.slice(0,j)),value=_.trim(source.slice(j+1));if(name){var ret=onAttr(lastPos,retCSS.length,name,value,source);ret&&(retCSS+=ret+"; ")}}}lastPos=i+1}css=_.trimRight(css),";"!==css[css.length-1]&&(css+=";");for(var cssLength=css.length,isParenthesisOpen=!1,lastPos=0,i=0,retCSS="";i"===c){rethtml+=escapeHtml(html.slice(lastPos,tagStart)),currentHtml=html.slice(tagStart,currentPos+1),currentTagName=getTagName(currentHtml),rethtml+=onTag(tagStart,rethtml.length,currentTagName,currentHtml,isClosing(currentHtml)),lastPos=currentPos+1,tagStart=!1;continue}if(('"'===c||"'"===c)&&"="===html.charAt(currentPos-1)){quoteStart=c;continue}}else if(c===quoteStart){quoteStart=!1;continue}}return lastPos0;i--){var c=str[i];if(" "!==c)return"="===c?i:-1}}function isQuoteWrapString(text){return'"'===text[0]&&'"'===text[text.length-1]||"'"===text[0]&&"'"===text[text.length-1]}function stripQuoteWrap(text){return isQuoteWrapString(text)?text.substr(1,text.length-2):text}var _=__webpack_require__(396),REGEXP_ATTR_NAME=/[^a-zA-Z0-9_:\.\-]/gim;exports.parseTag=parseTag,exports.parseAttr=parseAttr},function(module,exports,__webpack_require__){function isNull(obj){return void 0===obj||null===obj}function getAttrs(html){var i=html.indexOf(" ");if(i===-1)return{html:"",closing:"/"===html[html.length-2]};html=_.trim(html.slice(i+1,-1));var isClosing="/"===html[html.length-1];return isClosing&&(html=_.trim(html.slice(0,-1))),{html:html,closing:isClosing}}function FilterXSS(options){options=options||{},options.stripIgnoreTag&&(options.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),options.onIgnoreTag=DEFAULT.onIgnoreTagStripAll),options.whiteList=options.whiteList||DEFAULT.whiteList,options.onTag=options.onTag||DEFAULT.onTag,options.onTagAttr=options.onTagAttr||DEFAULT.onTagAttr,options.onIgnoreTag=options.onIgnoreTag||DEFAULT.onIgnoreTag,options.onIgnoreTagAttr=options.onIgnoreTagAttr||DEFAULT.onIgnoreTagAttr,options.safeAttrValue=options.safeAttrValue||DEFAULT.safeAttrValue,options.escapeHtml=options.escapeHtml||DEFAULT.escapeHtml,this.options=options,options.css===!1?this.cssFilter=!1:(options.css=options.css||{},this.cssFilter=new FilterCSS(options.css))}var FilterCSS=__webpack_require__(391).FilterCSS,DEFAULT=__webpack_require__(390),parser=__webpack_require__(397),parseTag=parser.parseTag,parseAttr=parser.parseAttr,_=__webpack_require__(396);FilterXSS.prototype.process=function(html){if(html=html||"",html=html.toString(),!html)return"";var me=this,options=me.options,whiteList=options.whiteList,onTag=options.onTag,onIgnoreTag=options.onIgnoreTag,onTagAttr=options.onTagAttr,onIgnoreTagAttr=options.onIgnoreTagAttr,safeAttrValue=options.safeAttrValue,escapeHtml=options.escapeHtml,cssFilter=me.cssFilter;options.stripBlankChar&&(html=DEFAULT.stripBlankChar(html)),options.allowCommentTag||(html=DEFAULT.stripCommentTag(html));var stripIgnoreTagBody=!1;if(options.stripIgnoreTagBody){var stripIgnoreTagBody=DEFAULT.StripTagBody(options.stripIgnoreTagBody,onIgnoreTag);onIgnoreTag=stripIgnoreTagBody.onIgnoreTag}var retHtml=parseTag(html,function(sourcePosition,position,tag,html,isClosing){var info={sourcePosition:sourcePosition,position:position,isClosing:isClosing,isWhite:tag in whiteList},ret=onTag(tag,html,info);if(!isNull(ret))return ret;if(info.isWhite){if(info.isClosing)return"";var attrs=getAttrs(html),whiteAttrList=whiteList[tag],attrsHtml=parseAttr(attrs.html,function(name,value){var isWhiteAttr=_.indexOf(whiteAttrList,name)!==-1,ret=onTagAttr(tag,name,value,isWhiteAttr);if(!isNull(ret))return ret;if(isWhiteAttr)return value=safeAttrValue(tag,name,value,cssFilter),value?name+'="'+value+'"':name;var ret=onIgnoreTagAttr(tag,name,value,isWhiteAttr);return isNull(ret)?void 0:ret}),html="<"+tag;return attrsHtml&&(html+=" "+attrsHtml),attrs.closing&&(html+=" /"),html+=">"}var ret=onIgnoreTag(tag,html,info);return isNull(ret)?escapeHtml(html):ret},escapeHtml);return stripIgnoreTagBody&&(retHtml=stripIgnoreTagBody.remove(retHtml)),retHtml},module.exports=FilterXSS},function(module,exports,__webpack_require__){(function(module){var colors=__webpack_require__(401);module.exports=colors,__webpack_require__(412)()}).call(exports,__webpack_require__(400)(module))},function(module,exports){module.exports=function(module){return module.webpackPolyfill||(module.deprecate=function(){},module.paths=[],module.children=[],module.webpackPolyfill=1),module}},function(module,exports,__webpack_require__){(function(module){function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};return builder._styles=_styles,builder.__proto__=proto,builder}function applyStyle(){var args=Array.prototype.slice.call(arguments),str=args.map(function(arg){return null!=arg&&arg.constructor===String?arg:util.inspect(arg)}).join(" ");if(!colors.enabled||!str)return str;for(var newLinesPresent=str.indexOf("\n")!=-1,nestedStyles=this._styles,i=nestedStyles.length;i--;){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close,newLinesPresent&&(str=str.replace(newLineRegex,function(match){return code.close+match+code.open}))}return str}function init(){var ret={};return Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build([name])}}}),ret}var colors={};module.exports=colors,colors.themes={};var util=__webpack_require__(136),ansiStyles=colors.styles=__webpack_require__(402),defineProps=Object.defineProperties,newLineRegex=new RegExp(/[\r\n]+/g);colors.supportsColor=__webpack_require__(403).supportsColor,"undefined"==typeof colors.enabled&&(colors.enabled=colors.supportsColor()!==!1),colors.enable=function(){colors.enabled=!0},colors.disable=function(){colors.enabled=!1},colors.stripColors=colors.strip=function(str){return(""+str).replace(/\x1B\[\d+m/g,"")};var matchOperatorsRe=(colors.stylize=function(str,style){if(!colors.enabled)return str+"";var styleMap=ansiStyles[style];return!styleMap&&style in colors?colors[style](str):styleMap.open+str+styleMap.close},/[|\\{}()[\]^$+*?.]/g),escapeStringRegexp=function(str){if("string"!=typeof str)throw new TypeError("Expected a string");return str.replace(matchOperatorsRe,"\\$&")},styles=function(){var ret={};return ansiStyles.grey=ansiStyles.gray,Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g"),ret[key]={get:function(){return build(this._styles.concat(key))}}}),ret}(),proto=defineProps(function(){},styles);colors.setTheme=function(theme){if("string"==typeof theme)return void console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");for(var style in theme)!function(style){colors[style]=function(str){if("object"==typeof theme[style]){var out=str;for(var i in theme[style])out=colors[theme[style][i]](out);return out}return colors[theme[style]](str)}}(style)};var sequencer=function(map,str){var exploded=str.split("");return exploded=exploded.map(map),exploded.join("")};colors.trap=__webpack_require__(406),colors.zalgo=__webpack_require__(407),colors.maps={},colors.maps.america=__webpack_require__(408)(colors),colors.maps.zebra=__webpack_require__(409)(colors),colors.maps.rainbow=__webpack_require__(410)(colors),colors.maps.random=__webpack_require__(411)(colors);for(var map in colors.maps)!function(map){colors[map]=function(str){return sequencer(colors.maps[map],str)}}(map);defineProps(colors,init())}).call(exports,__webpack_require__(400)(module))},function(module,exports,__webpack_require__){(function(module){var styles={};module.exports=styles;var codes={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(codes).forEach(function(key){var val=codes[key],style=styles[key]=[];style.open="["+val[0]+"m",style.close="["+val[1]+"m"})}).call(exports,__webpack_require__(400)(module))},function(module,exports,__webpack_require__){(function(process){"use strict";function translateLevel(level){return 0!==level&&{level:level,hasBasic:!0,has256:level>=2,has16m:level>=3}}function supportsColor(stream){if(forceColor===!1)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(stream&&!stream.isTTY&&forceColor!==!0)return 0;var min=forceColor?1:0;if("win32"===process.platform){var osRelease=os.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(osRelease[0])>=10&&Number(osRelease[2])>=10586?Number(osRelease[2])>=14931?3:2:1}if("CI"in env)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(sign){return sign in env})||"codeship"===env.CI_NAME?1:min;if("TEAMCITY_VERSION"in env)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in env){var version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)?1:"COLORTERM"in env?1:"dumb"===env.TERM?min:min}function getSupportLevel(stream){var level=supportsColor(stream);return translateLevel(level)}var os=__webpack_require__(404),hasFlag=__webpack_require__(405),env=process.env,forceColor=void 0;hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")?forceColor=!1:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=!0),"FORCE_COLOR"in env&&(forceColor=0===env.FORCE_COLOR.length||0!==parseInt(env.FORCE_COLOR,10)),module.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}}).call(exports,__webpack_require__(30))},function(module,exports){exports.endianness=function(){return"LE"},exports.hostname=function(){return"undefined"!=typeof location?location.hostname:""},exports.loadavg=function(){return[]},exports.uptime=function(){return 0},exports.freemem=function(){return Number.MAX_VALUE},exports.totalmem=function(){return Number.MAX_VALUE},exports.cpus=function(){return[]},exports.type=function(){return"Browser"},exports.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}},exports.arch=function(){return"javascript"},exports.platform=function(){return"browser"},exports.tmpdir=exports.tmpDir=function(){return"/tmp"},exports.EOL="\n"},function(module,exports,__webpack_require__){(function(process){"use strict";module.exports=function(flag,argv){argv=argv||process.argv;var terminatorPos=argv.indexOf("--"),prefix=/^-{1,2}/.test(flag)?"":"--",pos=argv.indexOf(prefix+flag);return pos!==-1&&(terminatorPos===-1||pos1){var i,catchInstances=new Array(len-1),j=0;for(i=0;i0&&"function"!=typeof didFulfill&&"function"!=typeof didReject){var msg=".then() only accepts functions but was passed: "+util.classString(didFulfill);arguments.length>1&&(msg+=", "+util.classString(didReject)),this._warn(msg)}return this._then(didFulfill,didReject,void 0,void 0,void 0)},Promise.prototype.done=function(didFulfill,didReject){var promise=this._then(didFulfill,didReject,void 0,void 0,void 0);promise._setIsFinal()},Promise.prototype.spread=function(fn){return"function"!=typeof fn?apiRejection("expecting a function but got "+util.classString(fn)):this.all()._then(fn,void 0,void 0,APPLY,void 0)},Promise.prototype.toJSON=function(){var ret={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(ret.fulfillmentValue=this.value(),ret.isFulfilled=!0):this.isRejected()&&(ret.rejectionReason=this.reason(),ret.isRejected=!0),ret},Promise.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new PromiseArray(this).promise()},Promise.prototype.error=function(fn){return this.caught(util.originatesFromRejection,fn)},Promise.getNewLibraryCopy=module.exports,Promise.is=function(val){return val instanceof Promise},Promise.fromNode=Promise.fromCallback=function(fn){var ret=new Promise(INTERNAL);ret._captureStackTrace();var multiArgs=arguments.length>1&&!!Object(arguments[1]).multiArgs,result=tryCatch(fn)(nodebackForPromise(ret,multiArgs));return result===errorObj&&ret._rejectCallback(result.e,!0),ret._isFateSealed()||ret._setAsyncGuaranteed(),ret},Promise.all=function(promises){return new PromiseArray(promises).promise()},Promise.cast=function(obj){var ret=tryConvertToPromise(obj);return ret instanceof Promise||(ret=new Promise(INTERNAL),ret._captureStackTrace(),ret._setFulfilled(),ret._rejectionHandler0=obj),ret},Promise.resolve=Promise.fulfilled=Promise.cast,Promise.reject=Promise.rejected=function(reason){var ret=new Promise(INTERNAL);return ret._captureStackTrace(),ret._rejectCallback(reason,!0),ret},Promise.setScheduler=function(fn){if("function"!=typeof fn)throw new TypeError("expecting a function but got "+util.classString(fn));return async.setScheduler(fn)},Promise.prototype._then=function(didFulfill,didReject,_,receiver,internalData){var haveInternalData=void 0!==internalData,promise=haveInternalData?internalData:new Promise(INTERNAL),target=this._target(),bitField=target._bitField;haveInternalData||(promise._propagateFrom(this,3),promise._captureStackTrace(),void 0===receiver&&0!==(2097152&this._bitField)&&(receiver=0!==(50397184&bitField)?this._boundValue():target===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,promise));var domain=getDomain();if(0!==(50397184&bitField)){var handler,value,settler=target._settlePromiseCtx;0!==(33554432&bitField)?(value=target._rejectionHandler0,handler=didFulfill):0!==(16777216&bitField)?(value=target._fulfillmentHandler0,handler=didReject,target._unsetRejectionIsUnhandled()):(settler=target._settlePromiseLateCancellationObserver,value=new CancellationError("late cancellation observer"),target._attachExtraTrace(value),handler=didReject),async.invoke(settler,target,{handler:null===domain?handler:"function"==typeof handler&&util.domainBind(domain,handler),promise:promise,receiver:receiver,value:value})}else target._addCallbacks(didFulfill,didReject,promise,receiver,domain);return promise},Promise.prototype._length=function(){return 65535&this._bitField},Promise.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},Promise.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},Promise.prototype._setLength=function(len){this._bitField=this._bitField&-65536|65535&len},Promise.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},Promise.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},Promise.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},Promise.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},Promise.prototype._isFinal=function(){return(4194304&this._bitField)>0},Promise.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},Promise.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},Promise.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},Promise.prototype._setAsyncGuaranteed=function(){async.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},Promise.prototype._receiverAt=function(index){var ret=0===index?this._receiver0:this[4*index-4+3];if(ret!==UNDEFINED_BINDING)return void 0===ret&&this._isBound()?this._boundValue():ret},Promise.prototype._promiseAt=function(index){return this[4*index-4+2]},Promise.prototype._fulfillmentHandlerAt=function(index){return this[4*index-4+0]},Promise.prototype._rejectionHandlerAt=function(index){return this[4*index-4+1]},Promise.prototype._boundValue=function(){},Promise.prototype._migrateCallback0=function(follower){var fulfill=(follower._bitField,follower._fulfillmentHandler0),reject=follower._rejectionHandler0,promise=follower._promise0,receiver=follower._receiverAt(0);void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,promise,receiver,null)},Promise.prototype._migrateCallbackAt=function(follower,index){var fulfill=follower._fulfillmentHandlerAt(index),reject=follower._rejectionHandlerAt(index),promise=follower._promiseAt(index),receiver=follower._receiverAt(index);void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,promise,receiver,null)},Promise.prototype._addCallbacks=function(fulfill,reject,promise,receiver,domain){var index=this._length();if(index>=65531&&(index=0,this._setLength(0)),0===index)this._promise0=promise,this._receiver0=receiver,"function"==typeof fulfill&&(this._fulfillmentHandler0=null===domain?fulfill:util.domainBind(domain,fulfill)),"function"==typeof reject&&(this._rejectionHandler0=null===domain?reject:util.domainBind(domain,reject));else{var base=4*index-4;this[base+2]=promise,this[base+3]=receiver,"function"==typeof fulfill&&(this[base+0]=null===domain?fulfill:util.domainBind(domain,fulfill)), "function"==typeof reject&&(this[base+1]=null===domain?reject:util.domainBind(domain,reject))}return this._setLength(index+1),index},Promise.prototype._proxy=function(proxyable,arg){this._addCallbacks(void 0,void 0,arg,proxyable,null)},Promise.prototype._resolveCallback=function(value,shouldBind){if(0===(117506048&this._bitField)){if(value===this)return this._rejectCallback(makeSelfResolutionError(),!1);var maybePromise=tryConvertToPromise(value,this);if(!(maybePromise instanceof Promise))return this._fulfill(value);shouldBind&&this._propagateFrom(maybePromise,2);var promise=maybePromise._target();if(promise===this)return void this._reject(makeSelfResolutionError());var bitField=promise._bitField;if(0===(50397184&bitField)){var len=this._length();len>0&&promise._migrateCallback0(this);for(var i=1;i>>16)){if(value===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._reject(err)}this._setFulfilled(),this._rejectionHandler0=value,(65535&bitField)>0&&(0!==(134217728&bitField)?this._settlePromises():async.settlePromises(this),this._dereferenceTrace())}},Promise.prototype._reject=function(reason){var bitField=this._bitField;if(!((117506048&bitField)>>>16))return this._setRejected(),this._fulfillmentHandler0=reason,this._isFinal()?async.fatalError(reason,util.isNode):void((65535&bitField)>0?async.settlePromises(this):this._ensurePossibleRejectionHandled())},Promise.prototype._fulfillPromises=function(len,value){for(var i=1;i0){if(0!==(16842752&bitField)){var reason=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,reason,bitField),this._rejectPromises(len,reason)}else{var value=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,value,bitField),this._fulfillPromises(len,value)}this._setLength(0)}this._clearCancellationData()},Promise.prototype._settledValue=function(){var bitField=this._bitField;return 0!==(33554432&bitField)?this._rejectionHandler0:0!==(16777216&bitField)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&es5.defineProperty(Promise.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),Promise.defer=Promise.pending=function(){debug.deprecated("Promise.defer","new Promise");var promise=new Promise(INTERNAL);return{promise:promise,resolve:deferResolve,reject:deferReject}},util.notEnumerableProp(Promise,"_makeSelfResolutionError",makeSelfResolutionError),__webpack_require__(429)(Promise,INTERNAL,tryConvertToPromise,apiRejection,debug),__webpack_require__(430)(Promise,INTERNAL,tryConvertToPromise,debug),__webpack_require__(431)(Promise,PromiseArray,apiRejection,debug),__webpack_require__(432)(Promise),__webpack_require__(433)(Promise),__webpack_require__(434)(Promise,PromiseArray,tryConvertToPromise,INTERNAL,async,getDomain),Promise.Promise=Promise,Promise.version="3.5.5",__webpack_require__(435)(Promise),__webpack_require__(436)(Promise,apiRejection,INTERNAL,tryConvertToPromise,Proxyable,debug),__webpack_require__(437)(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL,debug),__webpack_require__(438)(Promise),__webpack_require__(439)(Promise,INTERNAL),__webpack_require__(440)(Promise,PromiseArray,tryConvertToPromise,apiRejection),__webpack_require__(441)(Promise,INTERNAL,tryConvertToPromise,apiRejection),__webpack_require__(442)(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL,debug),__webpack_require__(443)(Promise,PromiseArray,debug),__webpack_require__(444)(Promise,PromiseArray,apiRejection),__webpack_require__(445)(Promise,INTERNAL,debug),__webpack_require__(446)(Promise,apiRejection,tryConvertToPromise,createContext,INTERNAL,debug),__webpack_require__(447)(Promise),__webpack_require__(448)(Promise,INTERNAL),__webpack_require__(449)(Promise,INTERNAL),util.toFastProperties(Promise),util.toFastProperties(Promise.prototype),fillTypes({a:1}),fillTypes({b:2}),fillTypes({c:3}),fillTypes(1),fillTypes(function(){}),fillTypes(void 0),fillTypes(!1),fillTypes(new Promise(INTERNAL)),debug.setBounds(Async.firstLineError,util.lastLineError),Promise}}).call(exports,__webpack_require__(30))},function(module,exports,__webpack_require__){(function(global,process){"use strict";function tryCatcher(){try{var target=tryCatchTarget;return tryCatchTarget=null,target.apply(this,arguments)}catch(e){return errorObj.e=e,errorObj}}function tryCatch(fn){return tryCatchTarget=fn,tryCatcher}function isPrimitive(val){return null==val||val===!0||val===!1||"string"==typeof val||"number"==typeof val}function isObject(value){return"function"==typeof value||"object"==typeof value&&null!==value}function maybeWrapAsError(maybeError){return isPrimitive(maybeError)?new Error(safeToString(maybeError)):maybeError}function withAppended(target,appendee){var i,len=target.length,ret=new Array(len+1);for(i=0;i1,hasMethodsOtherThanConstructor=keys.length>0&&!(1===keys.length&&"constructor"===keys[0]),hasThisAssignmentAndStaticMethods=thisAssignmentPattern.test(fn+"")&&es5.names(fn).length>0;if(hasMethods||hasMethodsOtherThanConstructor||hasThisAssignmentAndStaticMethods)return!0}return!1}catch(e){return!1}}function toFastProperties(obj){function FakeConstructor(){}function ic(){return typeof receiver.foo}FakeConstructor.prototype=obj;var receiver=new FakeConstructor;return ic(),ic(),obj}function isIdentifier(str){return rident.test(str)}function filledRange(count,prefix,suffix){for(var ret=new Array(count),i=0;i10||version[0]>0}(),ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret}).call(exports,function(){return this}(),__webpack_require__(30))},function(module,exports){var isES5=function(){"use strict";return void 0===this}();if(isES5)module.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:isES5,propertyIsWritable:function(obj,prop){var descriptor=Object.getOwnPropertyDescriptor(obj,prop);return!(descriptor&&!descriptor.writable&&!descriptor.set)}};else{var has={}.hasOwnProperty,str={}.toString,proto={}.constructor.prototype,ObjectKeys=function(o){var ret=[];for(var key in o)has.call(o,key)&&ret.push(key);return ret},ObjectGetDescriptor=function(o,key){return{value:o[key]}},ObjectDefineProperty=function(o,key,desc){return o[key]=desc.value,o},ObjectFreeze=function(obj){return obj},ObjectGetPrototypeOf=function(obj){try{return Object(obj).constructor.prototype}catch(e){return proto}},ArrayIsArray=function(obj){try{return"[object Array]"===str.call(obj)}catch(e){return!1}};module.exports={isArray:ArrayIsArray,keys:ObjectKeys,names:ObjectKeys,defineProperty:ObjectDefineProperty,getDescriptor:ObjectGetDescriptor,freeze:ObjectFreeze,getPrototypeOf:ObjectGetPrototypeOf,isES5:isES5,propertyIsWritable:function(){return!0}}}},function(module,exports,__webpack_require__){(function(process){"use strict";function Async(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new Queue(16),this._normalQueue=new Queue(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var self=this;this.drainQueues=function(){self._drainQueues()},this._schedule=schedule}function AsyncInvokeLater(fn,receiver,arg){this._lateQueue.push(fn,receiver,arg),this._queueTick()}function AsyncInvoke(fn,receiver,arg){this._normalQueue.push(fn,receiver,arg),this._queueTick()}function AsyncSettlePromises(promise){this._normalQueue._pushOne(promise),this._queueTick()}function _drainQueue(queue){for(;queue.length()>0;)_drainQueueStep(queue)}function _drainQueueStep(queue){var fn=queue.shift();if("function"!=typeof fn)fn._settlePromises();else{var receiver=queue.shift(),arg=queue.shift();fn.call(receiver,arg)}}var firstLineError;try{throw new Error}catch(e){firstLineError=e}var schedule=__webpack_require__(419),Queue=__webpack_require__(420),util=__webpack_require__(416);Async.prototype.setScheduler=function(fn){var prev=this._schedule;return this._schedule=fn,this._customScheduler=!0,prev},Async.prototype.hasCustomScheduler=function(){return this._customScheduler},Async.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},Async.prototype.disableTrampolineIfNecessary=function(){util.hasDevTools&&(this._trampolineEnabled=!1)},Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},Async.prototype.fatalError=function(e,isNode){isNode?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},Async.prototype.throwLater=function(fn,arg){if(1===arguments.length&&(arg=fn,fn=function(){throw arg}),"undefined"!=typeof setTimeout)setTimeout(function(){fn(arg)},0);else try{this._schedule(function(){fn(arg)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},util.hasDevTools?(Async.prototype.invokeLater=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvokeLater.call(this,fn,receiver,arg):this._schedule(function(){setTimeout(function(){fn.call(receiver,arg)},100)})},Async.prototype.invoke=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvoke.call(this,fn,receiver,arg):this._schedule(function(){fn.call(receiver,arg)})},Async.prototype.settlePromises=function(promise){this._trampolineEnabled?AsyncSettlePromises.call(this,promise):this._schedule(function(){promise._settlePromises()})}):(Async.prototype.invokeLater=AsyncInvokeLater,Async.prototype.invoke=AsyncInvoke,Async.prototype.settlePromises=AsyncSettlePromises),Async.prototype._drainQueues=function(){_drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,_drainQueue(this._lateQueue)},Async.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},Async.prototype._reset=function(){this._isTickUsed=!1},module.exports=Async,module.exports.firstLineError=firstLineError}).call(exports,__webpack_require__(30))},function(module,exports,__webpack_require__){(function(global,process,setImmediate){"use strict";var schedule,util=__webpack_require__(416),noAsyncScheduler=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},NativePromise=util.getNativePromise();if(util.isNode&&"undefined"==typeof MutationObserver){var GlobalSetImmediate=global.setImmediate,ProcessNextTick=process.nextTick;schedule=util.isRecentNode?function(fn){GlobalSetImmediate.call(global,fn)}:function(fn){ProcessNextTick.call(process,fn)}}else if("function"==typeof NativePromise&&"function"==typeof NativePromise.resolve){var nativePromise=NativePromise.resolve();schedule=function(fn){nativePromise.then(fn)}}else schedule="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var div=document.createElement("div"),opts={attributes:!0},toggleScheduled=!1,div2=document.createElement("div"),o2=new MutationObserver(function(){div.classList.toggle("foo"),toggleScheduled=!1});o2.observe(div2,opts);var scheduleToggle=function(){toggleScheduled||(toggleScheduled=!0,div2.classList.toggle("foo"))};return function(fn){var o=new MutationObserver(function(){o.disconnect(),fn()});o.observe(div,opts),scheduleToggle()}}():"undefined"!=typeof setImmediate?function(fn){setImmediate(fn)}:"undefined"!=typeof setTimeout?function(fn){setTimeout(fn,0)}:noAsyncScheduler;module.exports=schedule}).call(exports,function(){return this}(),__webpack_require__(30),__webpack_require__(31).setImmediate)},function(module,exports){"use strict";function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j=this._length&&(this._resolve(this._values),!0)},PromiseArray.prototype._promiseCancelled=function(){return this._cancel(),!0},PromiseArray.prototype._promiseRejected=function(reason){return this._totalResolved++,this._reject(reason),!0},PromiseArray.prototype._resultCancelled=function(){if(!this._isResolved()){var values=this._values;if(this._cancel(),values instanceof Promise)values.cancel();else for(var i=0;i=0)return contextStack[lastIndex]}var longStackTraces=!1,contextStack=[];return Promise.prototype._promiseCreated=function(){},Promise.prototype._pushContext=function(){},Promise.prototype._popContext=function(){return null},Promise._peekContext=Promise.prototype._peekContext=function(){},Context.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,contextStack.push(this._trace))},Context.prototype._popContext=function(){if(void 0!==this._trace){var trace=contextStack.pop(),ret=trace._promiseCreated;return trace._promiseCreated=null, ret}return null},Context.CapturedTrace=null,Context.create=createContext,Context.deactivateLongStackTraces=function(){},Context.activateLongStackTraces=function(){var Promise_pushContext=Promise.prototype._pushContext,Promise_popContext=Promise.prototype._popContext,Promise_PeekContext=Promise._peekContext,Promise_peekContext=Promise.prototype._peekContext,Promise_promiseCreated=Promise.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){Promise.prototype._pushContext=Promise_pushContext,Promise.prototype._popContext=Promise_popContext,Promise._peekContext=Promise_PeekContext,Promise.prototype._peekContext=Promise_peekContext,Promise.prototype._promiseCreated=Promise_promiseCreated,longStackTraces=!1},longStackTraces=!0,Promise.prototype._pushContext=Context.prototype._pushContext,Promise.prototype._popContext=Context.prototype._popContext,Promise._peekContext=Promise.prototype._peekContext=peekContext,Promise.prototype._promiseCreated=function(){var ctx=this._peekContext();ctx&&null==ctx._promiseCreated&&(ctx._promiseCreated=this)}},Context}},function(module,exports,__webpack_require__){(function(process){"use strict";module.exports=function(Promise,Context){function generatePromiseLifecycleEventObject(name,promise){return{promise:promise}}function defaultFireEvent(){return!1}function cancellationExecute(executor,resolve,reject){var promise=this;try{executor(resolve,reject,function(onCancel){if("function"!=typeof onCancel)throw new TypeError("onCancel must be a function, got: "+util.toString(onCancel));promise._attachCancellationCallback(onCancel)})}catch(e){return e}}function cancellationAttachCancellationCallback(onCancel){if(!this._isCancellable())return this;var previousOnCancel=this._onCancel();void 0!==previousOnCancel?util.isArray(previousOnCancel)?previousOnCancel.push(onCancel):this._setOnCancel([previousOnCancel,onCancel]):this._setOnCancel(onCancel)}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(onCancel){this._onCancelField=onCancel}function cancellationClearCancellationData(){this._cancellationParent=void 0,this._onCancelField=void 0}function cancellationPropagateFrom(parent,flags){if(0!==(1&flags)){this._cancellationParent=parent;var branchesRemainingToCancel=parent._branchesRemainingToCancel;void 0===branchesRemainingToCancel&&(branchesRemainingToCancel=0),parent._branchesRemainingToCancel=branchesRemainingToCancel+1}0!==(2&flags)&&parent._isBound()&&this._setBoundTo(parent._boundTo)}function bindingPropagateFrom(parent,flags){0!==(2&flags)&&parent._isBound()&&this._setBoundTo(parent._boundTo)}function boundValueFunction(){var ret=this._boundTo;return void 0!==ret&&ret instanceof Promise?ret.isFulfilled()?ret.value():void 0:ret}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(error,ignoreSelf){if(canAttachTrace(error)){var trace=this._trace;if(void 0!==trace&&ignoreSelf&&(trace=trace._parent),void 0!==trace)trace.attachExtraTrace(error);else if(!error.__stackCleaned__){var parsed=parseStackAndMessage(error);util.notEnumerableProp(error,"stack",parsed.message+"\n"+parsed.stack.join("\n")),util.notEnumerableProp(error,"__stackCleaned__",!0)}}}function longStackTracesDereferenceTrace(){this._trace=void 0}function checkForgottenReturns(returnValue,promiseCreated,name,promise,parent){if(void 0===returnValue&&null!==promiseCreated&&wForgottenReturn){if(void 0!==parent&&parent._returnedNonUndefined())return;if(0===(65535&promise._bitField))return;name&&(name+=" ");var handlerLine="",creatorLine="";if(promiseCreated._trace){for(var traceLines=promiseCreated._trace.stack.split("\n"),stack=cleanStack(traceLines),i=stack.length-1;i>=0;--i){var line=stack[i];if(!nodeFramePattern.test(line)){var lineMatches=line.match(parseLinePattern);lineMatches&&(handlerLine="at "+lineMatches[1]+":"+lineMatches[2]+":"+lineMatches[3]+" ");break}}if(stack.length>0)for(var firstUserLine=stack[0],i=0;i0&&(creatorLine="\n"+traceLines[i-1]);break}}var msg="a promise was created in a "+name+"handler "+handlerLine+"but was not returned from it, see http://goo.gl/rRqMUw"+creatorLine;promise._warn(msg,!0,promiseCreated)}}function deprecated(name,replacement){var message=name+" is deprecated and will be removed in a future version.";return replacement&&(message+=" Use "+replacement+" instead."),warn(message)}function warn(message,shouldUseOwnTrace,promise){if(config.warnings){var ctx,warning=new Warning(message);if(shouldUseOwnTrace)promise._attachExtraTrace(warning);else if(config.longStackTraces&&(ctx=Promise._peekContext()))ctx.attachExtraTrace(warning);else{var parsed=parseStackAndMessage(warning);warning.stack=parsed.message+"\n"+parsed.stack.join("\n")}activeFireEvent("warning",warning)||formatAndLogError(warning,"",!0)}}function reconstructStack(message,stacks){for(var i=0;i=0;--j)if(prev[j]===currentLastLine){commonRootMeetPoint=j;break}for(var j=commonRootMeetPoint;j>=0;--j){var line=prev[j];if(current[currentLastIndex]!==line)break;current.pop(),currentLastIndex--}current=prev}}function cleanStack(stack){for(var ret=[],i=0;i0&&"SyntaxError"!=error.name&&(stack=stack.slice(i)),stack}function parseStackAndMessage(error){var stack=error.stack,message=error.toString();return stack="string"==typeof stack&&stack.length>0?stackFramesAsArray(error):[" (No stack trace)"],{message:message,stack:"SyntaxError"==error.name?stack:cleanStack(stack)}}function formatAndLogError(error,title,isSoft){if("undefined"!=typeof console){var message;if(util.isObject(error)){var stack=error.stack;message=title+formatStack(stack,error)}else message=title+String(error);"function"==typeof printWarning?printWarning(message,isSoft):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(message)}}function fireRejectionEvent(name,localHandler,reason,promise){var localEventFired=!1;try{"function"==typeof localHandler&&(localEventFired=!0,"rejectionHandled"===name?localHandler(promise):localHandler(reason,promise))}catch(e){async.throwLater(e)}"unhandledRejection"===name?activeFireEvent(name,reason,promise)||localEventFired||formatAndLogError(reason,"Unhandled rejection "):activeFireEvent(name,promise)}function formatNonError(obj){var str;if("function"==typeof obj)str="[function "+(obj.name||"anonymous")+"]";else{str=obj&&"function"==typeof obj.toString?obj.toString():util.toString(obj);var ruselessToString=/\[object [a-zA-Z0-9$_]+\]/;if(ruselessToString.test(str))try{var newStr=JSON.stringify(obj);str=newStr}catch(e){}0===str.length&&(str="(empty array)")}return"(<"+snip(str)+">, no stack trace)"}function snip(str){var maxChars=41;return str.length=lastIndex||(shouldIgnore=function(line){if(bluebirdFramePattern.test(line))return!0;var info=parseLineInfo(line);return!!(info&&info.fileName===firstFileName&&firstIndex<=info.line&&info.line<=lastIndex)})}}function CapturedTrace(parent){this._parent=parent,this._promisesCreated=0;var length=this._length=1+(void 0===parent?0:parent._length);captureStackTrace(this,CapturedTrace),length>32&&this.uncycle()}var unhandledRejectionHandled,possiblyUnhandledRejection,printWarning,getDomain=Promise._getDomain,async=Promise._async,Warning=__webpack_require__(421).Warning,util=__webpack_require__(416),es5=__webpack_require__(417),canAttachTrace=util.canAttachTrace,bluebirdFramePattern=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,nodeFramePattern=/\((?:timers\.js):\d+:\d+\)/,parseLinePattern=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,stackFramePattern=null,formatStack=null,indentStackFrames=!1,debugging=!(0==util.env("BLUEBIRD_DEBUG")||!util.env("BLUEBIRD_DEBUG")&&"development"!==util.env("NODE_ENV")),warnings=!(0==util.env("BLUEBIRD_WARNINGS")||!debugging&&!util.env("BLUEBIRD_WARNINGS")),longStackTraces=!(0==util.env("BLUEBIRD_LONG_STACK_TRACES")||!debugging&&!util.env("BLUEBIRD_LONG_STACK_TRACES")),wForgottenReturn=0!=util.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(warnings||!!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));Promise.prototype.suppressUnhandledRejections=function(){var target=this._target();target._bitField=target._bitField&-1048577|524288},Promise.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var self=this;setTimeout(function(){self._notifyUnhandledRejection()},1)}},Promise.prototype._notifyUnhandledRejectionIsHandled=function(){fireRejectionEvent("rejectionHandled",unhandledRejectionHandled,void 0,this)},Promise.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},Promise.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},Promise.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var reason=this._settledValue();this._setUnhandledRejectionIsNotified(),fireRejectionEvent("unhandledRejection",possiblyUnhandledRejection,reason,this)}},Promise.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},Promise.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},Promise.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},Promise.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},Promise.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},Promise.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},Promise.prototype._warn=function(message,shouldUseOwnTrace,promise){return warn(message,shouldUseOwnTrace,promise||this)},Promise.onPossiblyUnhandledRejection=function(fn){var domain=getDomain();possiblyUnhandledRejection="function"==typeof fn?null===domain?fn:util.domainBind(domain,fn):void 0},Promise.onUnhandledRejectionHandled=function(fn){var domain=getDomain();unhandledRejectionHandled="function"==typeof fn?null===domain?fn:util.domainBind(domain,fn):void 0};var disableLongStackTraces=function(){};Promise.longStackTraces=function(){if(async.haveItemsQueued()&&!config.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!config.longStackTraces&&longStackTracesIsSupported()){var Promise_captureStackTrace=Promise.prototype._captureStackTrace,Promise_attachExtraTrace=Promise.prototype._attachExtraTrace,Promise_dereferenceTrace=Promise.prototype._dereferenceTrace;config.longStackTraces=!0,disableLongStackTraces=function(){if(async.haveItemsQueued()&&!config.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");Promise.prototype._captureStackTrace=Promise_captureStackTrace,Promise.prototype._attachExtraTrace=Promise_attachExtraTrace,Promise.prototype._dereferenceTrace=Promise_dereferenceTrace,Context.deactivateLongStackTraces(),async.enableTrampoline(),config.longStackTraces=!1},Promise.prototype._captureStackTrace=longStackTracesCaptureStackTrace,Promise.prototype._attachExtraTrace=longStackTracesAttachExtraTrace,Promise.prototype._dereferenceTrace=longStackTracesDereferenceTrace,Context.activateLongStackTraces(),async.disableTrampolineIfNecessary()}},Promise.hasLongStackTraces=function(){return config.longStackTraces&&longStackTracesIsSupported()};var fireDomEvent=function(){try{if("function"==typeof CustomEvent){var event=new CustomEvent("CustomEvent");return util.global.dispatchEvent(event),function(name,event){var eventData={detail:event,cancelable:!0};es5.defineProperty(eventData,"promise",{value:event.promise}),es5.defineProperty(eventData,"reason",{value:event.reason});var domEvent=new CustomEvent(name.toLowerCase(),eventData);return!util.global.dispatchEvent(domEvent)}}if("function"==typeof Event){var event=new Event("CustomEvent");return util.global.dispatchEvent(event),function(name,event){var domEvent=new Event(name.toLowerCase(),{cancelable:!0});return domEvent.detail=event,es5.defineProperty(domEvent,"promise",{value:event.promise}),es5.defineProperty(domEvent,"reason",{value:event.reason}),!util.global.dispatchEvent(domEvent)}}var event=document.createEvent("CustomEvent");return event.initCustomEvent("testingtheevent",!1,!0,{}),util.global.dispatchEvent(event),function(name,event){var domEvent=document.createEvent("CustomEvent");return domEvent.initCustomEvent(name.toLowerCase(),!1,!0,event),!util.global.dispatchEvent(domEvent)}}catch(e){}return function(){return!1}}(),fireGlobalEvent=function(){return util.isNode?function(){return process.emit.apply(process,arguments)}:util.global?function(name){var methodName="on"+name.toLowerCase(),method=util.global[methodName];return!!method&&(method.apply(util.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),eventToObjectGenerator={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(name,promise,child){return{promise:promise,child:child}},warning:function(name,warning){return{warning:warning}},unhandledRejection:function(name,reason,promise){return{reason:reason,promise:promise}},rejectionHandled:generatePromiseLifecycleEventObject},activeFireEvent=function(name){var globalEventFired=!1;try{globalEventFired=fireGlobalEvent.apply(null,arguments)}catch(e){async.throwLater(e),globalEventFired=!0}var domEventFired=!1;try{domEventFired=fireDomEvent(name,eventToObjectGenerator[name].apply(null,arguments))}catch(e){async.throwLater(e),domEventFired=!0}return domEventFired||globalEventFired};Promise.config=function(opts){if(opts=Object(opts),"longStackTraces"in opts&&(opts.longStackTraces?Promise.longStackTraces():!opts.longStackTraces&&Promise.hasLongStackTraces()&&disableLongStackTraces()),"warnings"in opts){var warningsOption=opts.warnings;config.warnings=!!warningsOption,wForgottenReturn=config.warnings,util.isObject(warningsOption)&&"wForgottenReturn"in warningsOption&&(wForgottenReturn=!!warningsOption.wForgottenReturn)}if("cancellation"in opts&&opts.cancellation&&!config.cancellation){if(async.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");Promise.prototype._clearCancellationData=cancellationClearCancellationData,Promise.prototype._propagateFrom=cancellationPropagateFrom,Promise.prototype._onCancel=cancellationOnCancel,Promise.prototype._setOnCancel=cancellationSetOnCancel,Promise.prototype._attachCancellationCallback=cancellationAttachCancellationCallback,Promise.prototype._execute=cancellationExecute,propagateFromFunction=cancellationPropagateFrom,config.cancellation=!0}return"monitoring"in opts&&(opts.monitoring&&!config.monitoring?(config.monitoring=!0,Promise.prototype._fireEvent=activeFireEvent):!opts.monitoring&&config.monitoring&&(config.monitoring=!1,Promise.prototype._fireEvent=defaultFireEvent)),Promise},Promise.prototype._fireEvent=defaultFireEvent,Promise.prototype._execute=function(executor,resolve,reject){try{executor(resolve,reject)}catch(e){return e}},Promise.prototype._onCancel=function(){},Promise.prototype._setOnCancel=function(handler){},Promise.prototype._attachCancellationCallback=function(onCancel){},Promise.prototype._captureStackTrace=function(){},Promise.prototype._attachExtraTrace=function(){},Promise.prototype._dereferenceTrace=function(){},Promise.prototype._clearCancellationData=function(){},Promise.prototype._propagateFrom=function(parent,flags){};var propagateFromFunction=bindingPropagateFrom,shouldIgnore=function(){return!1},parseLineInfoRegex=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;util.inherits(CapturedTrace,Error),Context.CapturedTrace=CapturedTrace,CapturedTrace.prototype.uncycle=function(){var length=this._length;if(!(length<2)){for(var nodes=[],stackToIndex={},i=0,node=this;void 0!==node;++i)nodes.push(node),node=node._parent;length=this._length=i;for(var i=length-1;i>=0;--i){var stack=nodes[i].stack;void 0===stackToIndex[stack]&&(stackToIndex[stack]=i)}for(var i=0;i0&&(nodes[index-1]._parent=void 0,nodes[index-1]._length=1),nodes[i]._parent=void 0,nodes[i]._length=1;var cycleEdgeNode=i>0?nodes[i-1]:this;index=0;--j)nodes[j]._length=currentChildLength,currentChildLength++;return}}}},CapturedTrace.prototype.attachExtraTrace=function(error){if(!error.__stackCleaned__){this.uncycle();for(var parsed=parseStackAndMessage(error),message=parsed.message,stacks=[parsed.stack],trace=this;void 0!==trace;)stacks.push(cleanStack(trace.stack.split("\n"))),trace=trace._parent;removeCommonRoots(stacks),removeDuplicateOrEmptyJumps(stacks),util.notEnumerableProp(error,"stack",reconstructStack(message,stacks)),util.notEnumerableProp(error,"__stackCleaned__",!0)}};var captureStackTrace=function(){var v8stackFramePattern=/^\s*at\s*/,v8stackFormatter=function(stack,error){return"string"==typeof stack?stack:void 0!==error.name&&void 0!==error.message?error.toString():formatNonError(error)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter;var captureStackTrace=Error.captureStackTrace;return shouldIgnore=function(line){return bluebirdFramePattern.test(line)},function(receiver,ignoreUntil){Error.stackTraceLimit+=6,captureStackTrace(receiver,ignoreUntil),Error.stackTraceLimit-=6}}var err=new Error;if("string"==typeof err.stack&&err.stack.split("\n")[0].indexOf("stackDetection@")>=0)return stackFramePattern=/@/,formatStack=v8stackFormatter,indentStackFrames=!0,function(o){o.stack=(new Error).stack};var hasStackAfterThrow;try{throw new Error}catch(e){hasStackAfterThrow="stack"in e}return"stack"in err||!hasStackAfterThrow||"number"!=typeof Error.stackTraceLimit?(formatStack=function(stack,error){return"string"==typeof stack?stack:"object"!=typeof error&&"function"!=typeof error||void 0===error.name||void 0===error.message?formatNonError(error):error.toString()},null):(stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter,function(o){Error.stackTraceLimit+=6;try{throw new Error}catch(e){o.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(printWarning=function(message){console.warn(message)},util.isNode&&process.stderr.isTTY?printWarning=function(message,isSoft){var color=isSoft?"":"";console.warn(color+message+"\n")}:util.isNode||"string"!=typeof(new Error).stack||(printWarning=function(message,isSoft){console.warn("%c"+message,isSoft?"color: darkorange":"color: red")}));var config={warnings:warnings,longStackTraces:!1,cancellation:!1,monitoring:!1};return longStackTraces&&Promise.longStackTraces(),{longStackTraces:function(){return config.longStackTraces},warnings:function(){return config.warnings},cancellation:function(){return config.cancellation},monitoring:function(){return config.monitoring},propagateFromFunction:function(){return propagateFromFunction},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:fireDomEvent,fireGlobalEvent:fireGlobalEvent}}}).call(exports,__webpack_require__(30))},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,tryConvertToPromise,NEXT_FILTER){function PassThroughHandlerContext(promise,type,handler){this.promise=promise,this.type=type,this.handler=handler,this.called=!1,this.cancelPromise=null}function FinallyHandlerCancelReaction(finallyHandler){this.finallyHandler=finallyHandler}function checkCancel(ctx,reason){return null!=ctx.cancelPromise&&(arguments.length>1?ctx.cancelPromise._reject(reason):ctx.cancelPromise._cancel(),ctx.cancelPromise=null,!0)}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(reason){if(!checkCancel(this,reason))return errorObj.e=reason,errorObj}function finallyHandler(reasonOrValue){var promise=this.promise,handler=this.handler;if(!this.called){this.called=!0;var ret=this.isFinallyHandler()?handler.call(promise._boundValue()):handler.call(promise._boundValue(),reasonOrValue);if(ret===NEXT_FILTER)return ret;if(void 0!==ret){promise._setReturnedNonUndefined();var maybePromise=tryConvertToPromise(ret,promise);if(maybePromise instanceof Promise){if(null!=this.cancelPromise){if(maybePromise._isCancelled()){var reason=new CancellationError("late cancellation observer");return promise._attachExtraTrace(reason),errorObj.e=reason,errorObj}maybePromise.isPending()&&maybePromise._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}return maybePromise._then(succeed,fail,void 0,this,void 0)}}}return promise.isRejected()?(checkCancel(this),errorObj.e=reasonOrValue,errorObj):(checkCancel(this),reasonOrValue)}var util=__webpack_require__(416),CancellationError=Promise.CancellationError,errorObj=util.errorObj,catchFilter=__webpack_require__(427)(NEXT_FILTER);return PassThroughHandlerContext.prototype.isFinallyHandler=function(){return 0===this.type},FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)},Promise.prototype._passThrough=function(handler,type,success,fail){return"function"!=typeof handler?this.then():this._then(success,fail,void 0,new PassThroughHandlerContext(this,type,handler),void 0)},Promise.prototype.lastly=Promise.prototype.finally=function(handler){return this._passThrough(handler,0,finallyHandler,finallyHandler)},Promise.prototype.tap=function(handler){return this._passThrough(handler,1,finallyHandler)},Promise.prototype.tapCatch=function(handlerOrPredicate){var len=arguments.length;if(1===len)return this._passThrough(handlerOrPredicate,1,void 0,finallyHandler);var i,catchInstances=new Array(len-1),j=0;for(i=0;i1){debug.deprecated("calling Promise.try with more than 1 argument");var arg=arguments[1],ctx=arguments[2];value=util.isArray(arg)?tryCatch(fn).apply(ctx,arg):tryCatch(fn).call(ctx,arg)}else value=tryCatch(fn)();var promiseCreated=ret._popContext();return debug.checkForgottenReturns(value,promiseCreated,"Promise.try",ret),ret._resolveFromSyncValue(value),ret},Promise.prototype._resolveFromSyncValue=function(value){value===util.errorObj?this._rejectCallback(value.e,!1):this._resolveCallback(value,!0)}}},function(module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise,debug){var calledBind=!1,rejectThis=function(_,e){this._reject(e)},targetRejected=function(e,context){context.promiseRejectionQueued=!0,context.bindingPromise._then(rejectThis,rejectThis,null,this,e)},bindingResolved=function(thisArg,context){0===(50397184&this._bitField)&&this._resolveCallback(context.target)},bindingRejected=function(e,context){context.promiseRejectionQueued||this._reject(e)};Promise.prototype.bind=function(thisArg){calledBind||(calledBind=!0,Promise.prototype._propagateFrom=debug.propagateFromFunction(),Promise.prototype._boundValue=debug.boundValueFunction());var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);ret._propagateFrom(this,1);var target=this._target();if(ret._setBoundTo(maybePromise),maybePromise instanceof Promise){var context={promiseRejectionQueued:!1,promise:ret,target:target,bindingPromise:maybePromise};target._then(INTERNAL,targetRejected,void 0,ret,context),maybePromise._then(bindingResolved,bindingRejected,void 0,ret,context),ret._setOnCancel(maybePromise)}else ret._resolveCallback(target);return ret},Promise.prototype._setBoundTo=function(obj){void 0!==obj?(this._bitField=2097152|this._bitField,this._boundTo=obj):this._bitField=this._bitField&-2097153},Promise.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},Promise.bind=function(thisArg,value){return Promise.resolve(value).bind(thisArg)}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,debug){var util=__webpack_require__(416),tryCatch=util.tryCatch,errorObj=util.errorObj,async=Promise._async;Promise.prototype.break=Promise.prototype.cancel=function(){if(!debug.cancellation())return this._warn("cancellation is disabled");for(var promise=this,child=promise;promise._isCancellable();){if(!promise._cancelBy(child)){child._isFollowing()?child._followee().cancel():child._cancelBranched();break}var parent=promise._cancellationParent;if(null==parent||!parent._isCancellable()){promise._isFollowing()?promise._followee().cancel():promise._cancelBranched();break}promise._isFollowing()&&promise._followee().cancel(),promise._setWillBeCancelled(),child=promise,promise=parent}},Promise.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},Promise.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},Promise.prototype._cancelBy=function(canceller){return canceller===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},Promise.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},Promise.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),async.invoke(this._cancelPromises,this,void 0))},Promise.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},Promise.prototype._unsetOnCancel=function(){this._onCancelField=void 0},Promise.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},Promise.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},Promise.prototype._doInvokeOnCancel=function(onCancelCallback,internalOnly){if(util.isArray(onCancelCallback))for(var i=0;i0&&"function"==typeof arguments[last]&&(fn=arguments[last],last<=8&&canEvaluate)){var ret=new Promise(INTERNAL);ret._captureStackTrace();for(var HolderClass=holderClasses[last-1],holder=new HolderClass(fn),callbacks=thenCallbacks,i=0;i512){for(var keys=Object.keys(cache),i=0;i<256;++i)delete cache[keys[i]];cache[" size"]=keys.length-256}}return ret};getMethodCaller=function(name){return getCompiled(name,makeMethodCaller,callerCache)},getGetter=function(name){return getCompiled(name,makeGetter,getterCache)},Promise.prototype.call=function(methodName){for(var $_len=arguments.length,args=new Array(Math.max($_len-1,0)),$_i=1;$_i<$_len;++$_i)args[$_i-1]=arguments[$_i];if(canEvaluate){var maybeCaller=getMethodCaller(methodName);if(null!==maybeCaller)return this._then(maybeCaller,void 0,void 0,args,void 0)}return args.push(methodName),this._then(caller,void 0,void 0,args,void 0)},Promise.prototype.get=function(propertyName){var getter,isIndex="number"==typeof propertyName;if(isIndex)getter=indexedGetter;else if(canEvaluate){var maybeGetter=getGetter(propertyName);getter=null!==maybeGetter?maybeGetter:namedGetter}else getter=namedGetter;return this._then(getter,void 0,void 0,propertyName,void 0)}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,apiRejection,INTERNAL,tryConvertToPromise,Proxyable,debug){function promiseFromYieldHandler(value,yieldHandlers,traceParent){for(var i=0;i=1?limit:0,new MappingPromiseArray(promises,fn,limit,_filter).promise()}var getDomain=Promise._getDomain,util=__webpack_require__(416),tryCatch=util.tryCatch,errorObj=util.errorObj,async=Promise._async;util.inherits(MappingPromiseArray,PromiseArray),MappingPromiseArray.prototype._asyncInit=function(){this._init$(void 0,-2)},MappingPromiseArray.prototype._init=function(){},MappingPromiseArray.prototype._promiseFulfilled=function(value,index){var values=this._values,length=this.length(),preservedValues=this._preservedValues,limit=this._limit;if(index<0){if(index=index*-1-1,values[index]=value,limit>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(limit>=1&&this._inFlight>=limit)return values[index]=value,this._queue.push(index),!1;null!==preservedValues&&(preservedValues[index]=value);var promise=this._promise,callback=this._callback,receiver=promise._boundValue();promise._pushContext();var ret=tryCatch(callback).call(receiver,value,index,length),promiseCreated=promise._popContext();if(debug.checkForgottenReturns(ret,promiseCreated,null!==preservedValues?"Promise.filter":"Promise.map",promise),ret===errorObj)return this._reject(ret.e),!0;var maybePromise=tryConvertToPromise(ret,this._promise);if(maybePromise instanceof Promise){maybePromise=maybePromise._target();var bitField=maybePromise._bitField;if(0===(50397184&bitField))return limit>=1&&this._inFlight++,values[index]=maybePromise,maybePromise._proxy(this,(index+1)*-1),!1;if(0===(33554432&bitField))return 0!==(16777216&bitField)?(this._reject(maybePromise._reason()),!0):(this._cancel(),!0);ret=maybePromise._value()}values[index]=ret}var totalResolved=++this._totalResolved;return totalResolved>=length&&(null!==preservedValues?this._filter(values,preservedValues):this._resolve(values),!0)},MappingPromiseArray.prototype._drainQueue=function(){for(var queue=this._queue,limit=this._limit,values=this._values;queue.length>0&&this._inFlight=min;--i)ret.push(i);for(var i=likelyArgumentCount+1;i<=3;++i)ret.push(i);return ret},argumentSequence=function(argumentCount){return util.filledRange(argumentCount,"_arg","")},parameterDeclaration=function(parameterCount){return util.filledRange(Math.max(parameterCount,3),"_arg","")},parameterCount=function(fn){return"number"==typeof fn.length?Math.max(Math.min(fn.length,1024),0):0};makeNodePromisifiedEval=function(callback,receiver,originalName,fn,_,multiArgs){function generateCallForArgumentCount(count){var ret,args=argumentSequence(count).join(", "),comma=count>0?", ":"";return ret=shouldProxyThis?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===receiver?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",ret.replace("{{args}}",args).replace(", ",comma)}function generateArgumentSwitchCase(){for(var ret="",i=0;i=this._length){var val;if(this._isMap)val=entriesToMap(this._values);else{val={};for(var keyOffset=this.length(),i=0,len=this.length();i>1},Promise.prototype.props=function(){return props(this)},Promise.props=function(promises){return props(promises)}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise,apiRejection){function race(promises,parent){var maybePromise=tryConvertToPromise(promises);if(maybePromise instanceof Promise)return raceLater(maybePromise);if(promises=util.asArray(promises),null===promises)return apiRejection("expecting an array or an iterable object but got "+util.classString(promises));var ret=new Promise(INTERNAL);void 0!==parent&&ret._propagateFrom(parent,3);for(var fulfill=ret._fulfill,reject=ret._reject,i=0,len=promises.length;i=this._length&&(this._resolve(this._values),!0)},SettledPromiseArray.prototype._promiseFulfilled=function(value,index){var ret=new PromiseInspection;return ret._bitField=33554432,ret._settledValueField=value,this._promiseResolved(index,ret)},SettledPromiseArray.prototype._promiseRejected=function(reason,index){var ret=new PromiseInspection;return ret._bitField=16777216,ret._settledValueField=reason,this._promiseResolved(index,ret)},Promise.settle=function(promises){return debug.deprecated(".settle()",".reflect()"),new SettledPromiseArray(promises).promise()},Promise.prototype.settle=function(){return Promise.settle(this)}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,PromiseArray,apiRejection){function SomePromiseArray(values){this.constructor$(values),this._howMany=0,this._unwrap=!1,this._initialized=!1}function some(promises,howMany){if((0|howMany)!==howMany||howMany<0)return apiRejection("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(howMany),ret.init(),promise}var util=__webpack_require__(416),RangeError=__webpack_require__(421).RangeError,AggregateError=__webpack_require__(421).AggregateError,isArray=util.isArray,CANCELLATION={};util.inherits(SomePromiseArray,PromiseArray),SomePromiseArray.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var isArrayResolved=isArray(this._values);!this._isResolved()&&isArrayResolved&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},SomePromiseArray.prototype.init=function(){this._initialized=!0,this._init()},SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=!0},SomePromiseArray.prototype.howMany=function(){return this._howMany},SomePromiseArray.prototype.setHowMany=function(count){this._howMany=count},SomePromiseArray.prototype._promiseFulfilled=function(value){return this._addFulfilled(value),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},SomePromiseArray.prototype._promiseRejected=function(reason){return this._addRejected(reason),this._checkOutcome()},SomePromiseArray.prototype._promiseCancelled=function(){return this._values instanceof Promise||null==this._values?this._cancel():(this._addRejected(CANCELLATION),this._checkOutcome())},SomePromiseArray.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new AggregateError,i=this.length();i0?this._reject(e):this._cancel(),!0}return!1},SomePromiseArray.prototype._fulfilled=function(){return this._totalResolved},SomePromiseArray.prototype._rejected=function(){return this._values.length-this.length()},SomePromiseArray.prototype._addRejected=function(reason){this._values.push(reason)},SomePromiseArray.prototype._addFulfilled=function(value){this._values[this._totalResolved++]=value},SomePromiseArray.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},SomePromiseArray.prototype._getRangeError=function(count){var message="Input array must contain at least "+this._howMany+" items but contains only "+count+" items";return new RangeError(message)},SomePromiseArray.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},Promise.some=function(promises,howMany){return some(promises,howMany)},Promise.prototype.some=function(howMany){return some(this,howMany)},Promise._SomePromiseArray=SomePromiseArray}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,INTERNAL,debug){function HandleWrapper(handle){this.handle=handle}function successClear(value){return clearTimeout(this.handle),value}function failureClear(reason){throw clearTimeout(this.handle),reason}var util=__webpack_require__(416),TimeoutError=Promise.TimeoutError;HandleWrapper.prototype._resultCancelled=function(){clearTimeout(this.handle)};var afterValue=function(value){return delay(+this).thenReturn(value)},delay=Promise.delay=function(ms,value){var ret,handle;return void 0!==value?(ret=Promise.resolve(value)._then(afterValue,null,null,ms,void 0),debug.cancellation()&&value instanceof Promise&&ret._setOnCancel(value)):(ret=new Promise(INTERNAL),handle=setTimeout(function(){ret._fulfill()},+ms),debug.cancellation()&&ret._setOnCancel(new HandleWrapper(handle)),ret._captureStackTrace()),ret._setAsyncGuaranteed(),ret};Promise.prototype.delay=function(ms){return delay(ms,this)};var afterTimeout=function(promise,message,parent){var err;err="string"!=typeof message?message instanceof Error?message:new TimeoutError("operation timed out"):new TimeoutError(message),util.markAsOriginatingFromRejection(err),promise._attachExtraTrace(err),promise._reject(err),null!=parent&&parent.cancel()};Promise.prototype.timeout=function(ms,message){ms=+ms;var ret,parent,handleWrapper=new HandleWrapper(setTimeout(function(){ret.isPending()&&afterTimeout(ret,message,parent)},ms));return debug.cancellation()?(parent=this.then(),ret=parent._then(successClear,failureClear,void 0,handleWrapper,void 0),ret._setOnCancel(handleWrapper)):ret=this._then(successClear,failureClear,void 0,handleWrapper,void 0),ret}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Promise,apiRejection,tryConvertToPromise,createContext,INTERNAL,debug){function thrower(e){setTimeout(function(){throw e},0)}function castPreservingDisposable(thenable){var maybePromise=tryConvertToPromise(thenable);return maybePromise!==thenable&&"function"==typeof thenable._isDisposable&&"function"==typeof thenable._getDisposer&&thenable._isDisposable()&&maybePromise._setDisposable(thenable._getDisposer()),maybePromise}function dispose(resources,inspection){function iterator(){if(i>=len)return ret._fulfill();var maybePromise=castPreservingDisposable(resources[i++]);if(maybePromise instanceof Promise&&maybePromise._isDisposable()){try{maybePromise=tryConvertToPromise(maybePromise._getDisposer().tryDispose(inspection),resources.promise)}catch(e){return thrower(e)}if(maybePromise instanceof Promise)return maybePromise._then(iterator,thrower,null,null,null)}iterator()}var i=0,len=resources.length,ret=new Promise(INTERNAL);return iterator(),ret}function Disposer(data,promise,context){this._data=data,this._promise=promise,this._context=context}function FunctionDisposer(fn,promise,context){this.constructor$(fn,promise,context)}function maybeUnwrapDisposer(value){return Disposer.isDisposer(value)?(this.resources[this.index]._setDisposable(value),value.promise()):value}function ResourceList(length){this.length=length,this.promise=null,this[length-1]=null}var util=__webpack_require__(416),TypeError=__webpack_require__(421).TypeError,inherits=__webpack_require__(416).inherits,errorObj=util.errorObj,tryCatch=util.tryCatch,NULL={};Disposer.prototype.data=function(){return this._data},Disposer.prototype.promise=function(){return this._promise},Disposer.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():NULL},Disposer.prototype.tryDispose=function(inspection){var resource=this.resource(),context=this._context;void 0!==context&&context._pushContext();var ret=resource!==NULL?this.doDispose(resource,inspection):null;return void 0!==context&&context._popContext(),this._promise._unsetDisposable(),this._data=null,ret},Disposer.isDisposer=function(d){return null!=d&&"function"==typeof d.resource&&"function"==typeof d.tryDispose},inherits(FunctionDisposer,Disposer),FunctionDisposer.prototype.doDispose=function(resource,inspection){var fn=this.data();return fn.call(resource,resource,inspection)},ResourceList.prototype._resultCancelled=function(){for(var len=this.length,i=0;i0},Promise.prototype._getDisposer=function(){return this._disposer},Promise.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},Promise.prototype.disposer=function(fn){if("function"==typeof fn)return new FunctionDisposer(fn,this,createContext());throw new TypeError}}},function(module,exports){"use strict";module.exports=function(Promise){function any(promises){var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(1),ret.setUnwrap(),ret.init(),promise}var SomePromiseArray=Promise._SomePromiseArray;Promise.any=function(promises){return any(promises)},Promise.prototype.any=function(){return any(this)}}},function(module,exports){"use strict";module.exports=function(Promise,INTERNAL){function promiseAllThis(){return PromiseAll(this)}function PromiseMapSeries(promises,fn){return PromiseReduce(promises,fn,INTERNAL,INTERNAL)}var PromiseReduce=Promise.reduce,PromiseAll=Promise.all;Promise.prototype.each=function(fn){return PromiseReduce(this,fn,INTERNAL,0)._then(promiseAllThis,void 0,void 0,this,void 0)},Promise.prototype.mapSeries=function(fn){return PromiseReduce(this,fn,INTERNAL,INTERNAL)},Promise.each=function(promises,fn){return PromiseReduce(promises,fn,INTERNAL,0)._then(promiseAllThis,void 0,void 0,promises,void 0)},Promise.mapSeries=PromiseMapSeries}},function(module,exports){"use strict";module.exports=function(Promise,INTERNAL){var PromiseMap=Promise.map;Promise.prototype.filter=function(fn,options){return PromiseMap(this,fn,options,INTERNAL)},Promise.filter=function(promises,fn,options){return PromiseMap(promises,fn,options,INTERNAL)}}},function(module,exports,__webpack_require__){var mergeSort,findInsertIndex;mergeSort=__webpack_require__(451),findInsertIndex=__webpack_require__(452),module.exports=function(){"use strict";function k(result){return function(){return result}}function TreeModel(config){config=config||{},this.config=config,this.config.childrenPropertyName=config.childrenPropertyName||"children",this.config.modelComparatorFn=config.modelComparatorFn}function addChildToNode(node,child){return child.parent=node,node.children.push(child),child}function Node(config,model){this.config=config,this.model=model,this.children=[]}function hasComparatorFunction(node){return"function"==typeof node.config.modelComparatorFn}function addChild(self,child,insertIndex){var index;if(!(child instanceof Node))throw new TypeError("Child must be of type Node.");if(child.parent=self,self.model[self.config.childrenPropertyName]instanceof Array||(self.model[self.config.childrenPropertyName]=[]),hasComparatorFunction(self))index=findInsertIndex(self.config.modelComparatorFn,self.model[self.config.childrenPropertyName],child.model),self.model[self.config.childrenPropertyName].splice(index,0,child.model),self.children.splice(index,0,child);else if(void 0===insertIndex)self.model[self.config.childrenPropertyName].push(child.model),self.children.push(child);else{if(insertIndex<0||insertIndex>self.children.length)throw new Error("Invalid index.");self.model[self.config.childrenPropertyName].splice(insertIndex,0,child.model),self.children.splice(insertIndex,0,child)}return child}function parseArgs(){var args={};if(1===arguments.length?"function"==typeof arguments[0]?args.fn=arguments[0]:args.options=arguments[0]:2===arguments.length?"function"==typeof arguments[0]?(args.fn=arguments[0],args.ctx=arguments[1]):(args.options=arguments[0],args.fn=arguments[1]):(args.options=arguments[0],args.fn=arguments[1],args.ctx=arguments[2]),args.options=args.options||{},args.options.strategy||(args.options.strategy="pre"),!walkStrategies[args.options.strategy])throw new Error("Unknown tree walk strategy. Valid strategies are 'pre' [default], 'post' and 'breadth'.");return args}var walkStrategies;return walkStrategies={},TreeModel.prototype.parse=function(model){var i,childCount,node;if(!(model instanceof Object))throw new TypeError("Model must be of type object.");if(node=new Node(this.config,model),model[this.config.childrenPropertyName]instanceof Array)for(this.config.modelComparatorFn&&(model[this.config.childrenPropertyName]=mergeSort(this.config.modelComparatorFn,model[this.config.childrenPropertyName])),i=0,childCount=model[this.config.childrenPropertyName].length;i0},Node.prototype.addChild=function(child){return addChild(this,child)},Node.prototype.addChildAtIndex=function(child,index){if(hasComparatorFunction(this))throw new Error("Cannot add child at index when using a comparator function.");return addChild(this,child,index)},Node.prototype.setIndex=function(index){if(hasComparatorFunction(this))throw new Error("Cannot set node index when using a comparator function.");if(this.isRoot()){if(0===index)return this;throw new Error("Invalid index.")}if(index<0||index>=this.parent.children.length)throw new Error("Invalid index.");var oldIndex=this.parent.children.indexOf(this);return this.parent.children.splice(index,0,this.parent.children.splice(oldIndex,1)[0]),this.parent.model[this.parent.config.childrenPropertyName].splice(index,0,this.parent.model[this.parent.config.childrenPropertyName].splice(oldIndex,1)[0]),this},Node.prototype.getPath=function(){var path=[];return function addToPath(node){path.unshift(node),node.isRoot()||addToPath(node.parent)}(this),path},Node.prototype.getIndex=function(){return this.isRoot()?0:this.parent.children.indexOf(this)},Node.prototype.walk=function(){var args;args=parseArgs.apply(this,arguments),walkStrategies[args.options.strategy].call(this,args.fn,args.ctx)},walkStrategies.pre=function depthFirstPreOrder(callback,context){var i,childCount,keepGoing;for(keepGoing=callback.call(context,this),i=0,childCount=this.children.length;i=2?(firstHalf=arr.slice(0,len/2),secondHalf=arr.slice(len/2,len),merge(comparatorFn,mergeSort(comparatorFn,firstHalf),mergeSort(comparatorFn,secondHalf))):arr.slice()}function merge(comparatorFn,arr1,arr2){for(var result=[],left1=arr1.length,left2=arr2.length;left1>0&&left2>0;)comparatorFn(arr1[0],arr2[0])<=0?(result.push(arr1.shift()),left1--):(result.push(arr2.shift()),left2--);return left1>0?result.push.apply(result,arr1):result.push.apply(result,arr2),result}return mergeSort}()},function(module,exports){module.exports=function(){"use strict";function findInsertIndex(comparatorFn,arr,el){var i,len;for(i=0,len=arr.length;i0);i++);return i}return findInsertIndex}()},function(module,exports,__webpack_require__){"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&"object"==typeof url&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}function urlFormat(obj){return"string"==typeof obj&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}var punycode=__webpack_require__(454),protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=__webpack_require__(455);Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if("string"!=typeof url)throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.hostname=authInHost.shift(),result.host=result.hostname)}return result.search=relative.search,result.query=relative.query,null===result.pathname&&null===result.search||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],"."===last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=isAbsolute?"":srcPath.length?srcPath.shift():"",result.host=result.hostname;var authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.hostname=authInHost.shift(),result.host=result.hostname)}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length>0?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),null===result.pathname&&null===result.search||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)},exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;(function(module,global){!function(root){function error(type){throw new RangeError(errors[type])}function map(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";parts.length>1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter=55296&&value<=56319&&counter65535&&(value-=65536,output+=stringFromCharCode(value>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function basicToDigit(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias;for(basic=input.lastIndexOf(delimiter),basic<0&&(basic=0),j=0;j=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index=inputLength&&error("invalid-input"),digit=basicToDigit(input.charCodeAt(index++)),(digit>=base||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(digitfloor(maxInt/baseMinusT)&&error("overflow"),w*=baseMinusT;out=output.length+1,bias=adapt(i-oldi,out,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(input=ucs2decode(input),inputLength=input.length,n=initialN,delta=0,bias=initialBias,j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(q= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode},__WEBPACK_AMD_DEFINE_RESULT__=function(){return punycode}.call(exports,__webpack_require__,exports,module),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}(this)}).call(exports,__webpack_require__(400)(module),function(){return this}())},function(module,exports,__webpack_require__){"use strict";var stringify=__webpack_require__(456),parse=__webpack_require__(462),formats=__webpack_require__(461);module.exports={formats:formats,parse:parse,stringify:stringify}},function(module,exports,__webpack_require__){"use strict";var getSideChannel=__webpack_require__(457),utils=__webpack_require__(460),formats=__webpack_require__(461),has=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(prefix){return prefix+"[]"},comma:"comma",indices:function(prefix,key){return prefix+"["+key+"]"},repeat:function(prefix){return prefix}},isArray=Array.isArray,push=Array.prototype.push,pushToArray=function(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray])},toISO=Date.prototype.toISOString,defaultFormat=formats.default,defaults={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils.encode,encodeValuesOnly:!1,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:!1,serializeDate:function(date){return toISO.call(date)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function(v){return"string"==typeof v||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v},sentinel={},stringify=function stringify(object,prefix,generateArrayPrefix,commaRoundTrip,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,sideChannel){for(var obj=object,tmpSc=sideChannel,step=0,findFlag=!1;void 0!==(tmpSc=tmpSc.get(sentinel))&&!findFlag;){var pos=tmpSc.get(object);if(step+=1,"undefined"!=typeof pos){if(pos===step)throw new RangeError("Cyclic object value");findFlag=!0}"undefined"==typeof tmpSc.get(sentinel)&&(step=0)}if("function"==typeof filter?obj=filter(prefix,obj):obj instanceof Date?obj=serializeDate(obj):"comma"===generateArrayPrefix&&isArray(obj)&&(obj=utils.maybeMap(obj,function(value){return value instanceof Date?serializeDate(value):value})),null===obj){if(strictNullHandling)return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset,"key",format):prefix;obj=""}if(isNonNullishPrimitive(obj)||utils.isBuffer(obj)){if(encoder){var keyValue=encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset,"key",format);return[formatter(keyValue)+"="+formatter(encoder(obj,defaults.encoder,charset,"value",format))]}return[formatter(prefix)+"="+formatter(String(obj))]}var values=[];if("undefined"==typeof obj)return values;var objKeys;if("comma"===generateArrayPrefix&&isArray(obj))encodeValuesOnly&&encoder&&(obj=utils.maybeMap(obj,encoder)),objKeys=[{value:obj.length>0?obj.join(",")||null:void 0}];else if(isArray(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var adjustedPrefix=commaRoundTrip&&isArray(obj)&&1===obj.length?prefix+"[]":prefix,j=0;j0?prefix+joined:""}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(48),callBound=__webpack_require__(47),inspect=__webpack_require__(458),$TypeError=__webpack_require__(54),$WeakMap=GetIntrinsic("%WeakMap%",!0),$Map=GetIntrinsic("%Map%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),listGetNode=function(list,key){for(var curr,prev=list;null!==(curr=prev.next);prev=curr)if(curr.key===key)return prev.next=curr.next,curr.next=list.next,list.next=curr,curr},listGet=function(objects,key){var node=listGetNode(objects,key);return node&&node.value},listSet=function(objects,key,value){var node=listGetNode(objects,key);node?node.value=value:objects.next={key:key,next:objects.next,value:value}},listHas=function(objects,key){return!!listGetNode(objects,key)};module.exports=function(){var $wm,$m,$o,channel={assert:function(key){if(!channel.has(key))throw new $TypeError("Side channel does not contain "+inspect(key))},get:function(key){if($WeakMap&&key&&("object"==typeof key||"function"==typeof key)){if($wm)return $weakMapGet($wm,key)}else if($Map){if($m)return $mapGet($m,key)}else if($o)return listGet($o,key)},has:function(key){if($WeakMap&&key&&("object"==typeof key||"function"==typeof key)){if($wm)return $weakMapHas($wm,key)}else if($Map){if($m)return $mapHas($m,key)}else if($o)return listHas($o,key);return!1},set:function(key,value){$WeakMap&&key&&("object"==typeof key||"function"==typeof key)?($wm||($wm=new $WeakMap),$weakMapSet($wm,key,value)):$Map?($m||($m=new $Map),$mapSet($m,key,value)):($o||($o={key:{},next:null}),listSet($o,key,value))}};return channel}},function(module,exports,__webpack_require__){(function(global){function addNumericSeparator(num,str){if(num===1/0||num===-(1/0)||num!==num||num&&num>-1e3&&num<1e3||$test.call(/e/,str))return str;var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof num){var int=num<0?-$floor(-num):$floor(num);if(int!==num){var intStr=String(int),dec=$slice.call(str,intStr.length+1);return $replace.call(intStr,sepRegex,"$&_")+"."+$replace.call($replace.call(dec,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(str,sepRegex,"$&_")}function wrapQuotes(s,defaultStyle,opts){var quoteChar="double"===(opts.quoteStyle||defaultStyle)?'"':"'";return quoteChar+s+quoteChar}function quote(s){return $replace.call(String(s),/"/g,""")}function isArray(obj){return!("[object Array]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isDate(obj){return!("[object Date]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isRegExp(obj){return!("[object RegExp]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isError(obj){return!("[object Error]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isString(obj){return!("[object String]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isNumber(obj){return!("[object Number]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isBoolean(obj){return!("[object Boolean]"!==toStr(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isSymbol(obj){if(hasShammedSymbols)return obj&&"object"==typeof obj&&obj instanceof Symbol;if("symbol"==typeof obj)return!0;if(!obj||"object"!=typeof obj||!symToString)return!1;try{return symToString.call(obj),!0}catch(e){}return!1}function isBigInt(obj){if(!obj||"object"!=typeof obj||!bigIntValueOf)return!1;try{return bigIntValueOf.call(obj),!0}catch(e){}return!1}function has(obj,key){return hasOwn.call(obj,key)}function toStr(obj){return objectToString.call(obj)}function nameOf(f){if(f.name)return f.name;var m=$match.call(functionToString.call(f),/^function\s*([\w$]+)/);return m?m[1]:null}function indexOf(xs,x){if(xs.indexOf)return xs.indexOf(x);for(var i=0,l=xs.length;iopts.maxStringLength){var remaining=str.length-opts.maxStringLength,trailer="... "+remaining+" more character"+(remaining>1?"s":"");return inspectString($slice.call(str,0,opts.maxStringLength),opts)+trailer}var s=$replace.call($replace.call(str,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(s,"single",opts)}function lowbyte(c){var n=c.charCodeAt(0),x={8:"b",9:"t",10:"n",12:"f",13:"r"}[n];return x?"\\"+x:"\\x"+(n<16?"0":"")+$toUpperCase.call(n.toString(16))}function markBoxed(str){return"Object("+str+")"}function weakCollectionOf(type){return type+" { ? }"}function collectionOf(type,size,entries,indent){var joinedEntries=indent?indentedJoin(entries,indent):$join.call(entries,", ");return type+" ("+size+") {"+joinedEntries+"}"}function singleLineValues(xs){for(var i=0;i=0)return!1;return!0}function getIndent(opts,depth){var baseIndent;if("\t"===opts.indent)baseIndent="\t";else{if(!("number"==typeof opts.indent&&opts.indent>0))return null;baseIndent=$join.call(Array(opts.indent+1)," ")}return{base:baseIndent,prev:$join.call(Array(depth+1),baseIndent)}}function indentedJoin(xs,indent){if(0===xs.length)return"";var lineJoiner="\n"+indent.prev+indent.base;return lineJoiner+$join.call(xs,","+lineJoiner)+"\n"+indent.prev}function arrObjKeys(obj,inspect){var isArr=isArray(obj),xs=[];if(isArr){xs.length=obj.length;for(var i=0;i0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(opts,"numericSeparator")&&"boolean"!=typeof opts.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var numericSeparator=opts.numericSeparator;if("undefined"==typeof obj)return"undefined";if(null===obj)return"null";if("boolean"==typeof obj)return obj?"true":"false";if("string"==typeof obj)return inspectString(obj,opts);if("number"==typeof obj){if(0===obj)return 1/0/obj>0?"0":"-0";var str=String(obj);return numericSeparator?addNumericSeparator(obj,str):str}if("bigint"==typeof obj){var bigIntStr=String(obj)+"n";return numericSeparator?addNumericSeparator(obj,bigIntStr):bigIntStr}var maxDepth="undefined"==typeof opts.depth?5:opts.depth;if("undefined"==typeof depth&&(depth=0),depth>=maxDepth&&maxDepth>0&&"object"==typeof obj)return isArray(obj)?"[Array]":"[Object]";var indent=getIndent(opts,depth);if("undefined"==typeof seen)seen=[];else if(indexOf(seen,obj)>=0)return"[Circular]";if("function"==typeof obj&&!isRegExp(obj)){var name=nameOf(obj),keys=arrObjKeys(obj,inspect);return"[Function"+(name?": "+name:" (anonymous)")+"]"+(keys.length>0?" { "+$join.call(keys,", ")+" }":"")}if(isSymbol(obj)){var symString=hasShammedSymbols?$replace.call(String(obj),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(obj);return"object"!=typeof obj||hasShammedSymbols?symString:markBoxed(symString)}if(isElement(obj)){for(var s="<"+$toLowerCase.call(String(obj.nodeName)),attrs=obj.attributes||[],i=0;i"}if(isArray(obj)){if(0===obj.length)return"[]";var xs=arrObjKeys(obj,inspect);return indent&&!singleLineValues(xs)?"["+indentedJoin(xs,indent)+"]":"[ "+$join.call(xs,", ")+" ]"}if(isError(obj)){var parts=arrObjKeys(obj,inspect);return"cause"in Error.prototype||!("cause"in obj)||isEnumerable.call(obj,"cause")?0===parts.length?"["+String(obj)+"]":"{ ["+String(obj)+"] "+$join.call(parts,", ")+" }":"{ ["+String(obj)+"] "+$join.call($concat.call("[cause]: "+inspect(obj.cause),parts),", ")+" }"}if("object"==typeof obj&&customInspect){if(inspectSymbol&&"function"==typeof obj[inspectSymbol]&&utilInspect)return utilInspect(obj,{depth:maxDepth-depth});if("symbol"!==customInspect&&"function"==typeof obj.inspect)return obj.inspect()}if(isMap(obj)){var mapParts=[];return mapForEach&&mapForEach.call(obj,function(value,key){mapParts.push(inspect(key,obj,!0)+" => "+inspect(value,obj))}),collectionOf("Map",mapSize.call(obj),mapParts,indent)}if(isSet(obj)){var setParts=[];return setForEach&&setForEach.call(obj,function(value){setParts.push(inspect(value,obj))}),collectionOf("Set",setSize.call(obj),setParts,indent)}if(isWeakMap(obj))return weakCollectionOf("WeakMap");if(isWeakSet(obj))return weakCollectionOf("WeakSet");if(isWeakRef(obj))return weakCollectionOf("WeakRef");if(isNumber(obj))return markBoxed(inspect(Number(obj)));if(isBigInt(obj))return markBoxed(inspect(bigIntValueOf.call(obj)));if(isBoolean(obj))return markBoxed(booleanValueOf.call(obj));if(isString(obj))return markBoxed(inspect(String(obj)));if("undefined"!=typeof window&&obj===window)return"{ [object Window] }";if(obj===global)return"{ [object globalThis] }";if(!isDate(obj)&&!isRegExp(obj)){var ys=arrObjKeys(obj,inspect),isPlainObject=gPO?gPO(obj)===Object.prototype:obj instanceof Object||obj.constructor===Object,protoTag=obj instanceof Object?"":"null prototype",stringTag=!isPlainObject&&toStringTag&&Object(obj)===obj&&toStringTag in obj?$slice.call(toStr(obj),8,-1):protoTag?"Object":"",constructorTag=isPlainObject||"function"!=typeof obj.constructor?"":obj.constructor.name?obj.constructor.name+" ":"",tag=constructorTag+(stringTag||protoTag?"["+$join.call($concat.call([],stringTag||[],protoTag||[]),": ")+"] ":""); return 0===ys.length?tag+"{}":indent?tag+"{"+indentedJoin(ys,indent)+"}":tag+"{ "+$join.call(ys,", ")+" }"}return String(obj)};var hasOwn=Object.prototype.hasOwnProperty||function(key){return key in this}}).call(exports,function(){return this}())},function(module,exports){},function(module,exports,__webpack_require__){"use strict";var formats=__webpack_require__(461),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}(),compactQueue=function(queue){for(;queue.length>1;){var item=queue.pop(),obj=item.obj[item.prop];if(isArray(obj)){for(var compacted=[],j=0;j=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||format===formats.RFC1738&&(40===c||41===c)?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},compact=function(value){for(var queue=[{obj:{o:value},prop:"o"}],refs=[],i=0;i-1?val.split(","):val},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(str,options){var i,obj={__proto__:null},cleanStr=options.ignoreQueryPrefix?str.replace(/^\?/,""):str,limit=options.parameterLimit===1/0?void 0:options.parameterLimit,parts=cleanStr.split(options.delimiter,limit),skipIndex=-1,charset=options.charset;if(options.charsetSentinel)for(i=0;i-1&&(val=isArray(val)?[val]:val),has.call(obj,key)?obj[key]=utils.combine(obj[key],val):obj[key]=val}return obj},parseObject=function(chain,val,options,valuesParsed){for(var leaf=valuesParsed?val:parseArrayValue(val,options),i=chain.length-1;i>=0;--i){var obj,root=chain[i];if("[]"===root&&options.parseArrays)obj=[].concat(leaf);else{obj=options.plainObjects?Object.create(null):{};var cleanRoot="["===root.charAt(0)&&"]"===root.charAt(root.length-1)?root.slice(1,-1):root,index=parseInt(cleanRoot,10);options.parseArrays||""!==cleanRoot?!isNaN(index)&&root!==cleanRoot&&String(index)===cleanRoot&&index>=0&&options.parseArrays&&index<=options.arrayLimit?(obj=[],obj[index]=leaf):"__proto__"!==cleanRoot&&(obj[cleanRoot]=leaf):obj={0:leaf}}leaf=obj}return leaf},parseKeys=function(givenKey,val,options,valuesParsed){if(givenKey){var key=options.allowDots?givenKey.replace(/\.([^.[]+)/g,"[$1]"):givenKey,brackets=/(\[[^[\]]*])/,child=/(\[[^[\]]*])/g,segment=options.depth>0&&brackets.exec(key),parent=segment?key.slice(0,segment.index):key,keys=[];if(parent){if(!options.plainObjects&&has.call(Object.prototype,parent)&&!options.allowPrototypes)return;keys.push(parent)}for(var i=0;options.depth>0&&null!==(segment=child.exec(key))&&i0&&len>maxKeys&&(len=maxKeys);for(var i=0;i=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},function(module,exports){"use strict";function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i=scrollTopAdjustmentCheckForFlyer?container.setAttribute("style","top: "+(scrollTop+scrollTopAdjustmentForFlyer)+"px"):container.setAttribute("style","top: 0px")}}function _showMsgbox(options,appendToMsgboxesContainer,isIFrame){var container=null;if(appendToMsgboxesContainer!==!0||(_createFlyersContainer(),container=document.getElementById(_flyers_containerId))){var mountNode=document.createElement("div");mountNode.id="mb-"+Util.generateUUID(),mountNode.classList.add(_messagebox_element_className),appendToMsgboxesContainer===!0?container.appendChild(mountNode):document.body.appendChild(mountNode),options.id=mountNode.id;var pageScrollReset=options.pageScrollSet;if(ReactDOM.render(React.createElement(Messagebox,options),mountNode),$("body").scrollTop(pageScrollReset),(options.msgType==type_success||options.msgType==type_general||options.msgType==type_error||options.msgType==type_info)&&options.msg&&options.msg.length>0){var msbBox=document.getElementById("MsgBoxesContainer");msbBox&&(msbBox.style.top=pageScrollReset+"px"),isIFrame?window.parent.addNotification({category:options.title?options.title:"",message:options.msg,type:options.msgType,time:(new Date).getTime()}):window.addNotification({category:options.title?options.title:"",message:options.msg,type:options.msgType,time:(new Date).getTime()})}}}function _createMsgboxOptions(objOrString,title){var options=void 0;if("string"==typeof objOrString)options={msg:objOrString},options.title=title?title:null;else{if("object"!=("undefined"==typeof objOrString?"undefined":_typeof(objOrString)))throw new Error("Invalid options provided for Messagebox component");options=objOrString||{}}return options}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_AppConstants=__webpack_require__(14),_AppConstants2=_interopRequireDefault(_AppConstants),ModulesCommons=__webpack_require__(26),Util=ModulesCommons.Util,type_success=_AppConstants2.default.NOTIFICATION_SUCCESS,type_error=_AppConstants2.default.NOTIFICATION_ERROR,type_general=_AppConstants2.default.NOTIFICATION_GENERAL,type_info=_AppConstants2.default.NOTIFICATION_INFO,_flyers_containerId="MsgBoxesContainer",_flyers_container_className="messageboxes-container",_messagebox_element_className="messagebox-element",DEF_CLASSNAME="react-msgbox",SUCCESS_CLASSNAME="success-msg",ERROR_CLASSNAME="error-msg",GENERAL_CLASSNAME="general-msg",INFO_CLASSNAME="info-msg",FLAG_CLASSNAME="msg-flag",SUCCESS_FLAG_CLASSNAME="success-flag",ERROR_FLAG_CLASSNAME="error-flag",INFO_FLAG_CLASSNAME="info-flag",GENERAL_FLAG_CLASSNAME="general-flag",SUCCESS_FLAG_ICON="icon-ok",ERROR_FLAG_ICON="icon-exclamation-sign",INFO_FLAG_ICON="icon-info-sign",GENERAL_FLAG_ICON="icon-info-sign",BUTTONS_BASED_DIALOG_CLASSNAME="buttons-based-msg",CONFIRM_CLASSNAME="confirm-msg",CONFIRM_FLAG_CLASSNAME="confirm-flag",scrollTopAdjustmentCheckForFlyer=106,scrollTopAdjustmentForFlyer=3,Messagebox=React.createClass({displayName:"Messagebox",propTypes:{id:React.PropTypes.string,msg:React.PropTypes.string.isRequired,msgType:React.PropTypes.oneOf(_AppConstants2.default.NOTIFICATION_TYPES).isRequired,title:React.PropTypes.string,extraCls:React.PropTypes.string,callback:React.PropTypes.func,callbackParams:React.PropTypes.array,scope:React.PropTypes.any,removeTimer:React.PropTypes.number,lockWindowScrolling:React.PropTypes.bool,pageScrollSet:React.PropTypes.number},getDefaultProps:function(){return{removeTimer:5e3,lockWindowScrolling:!0,pageScrollSet:0}},getInitialState:function(){return{show:!0}},_getDialogClassName:function(){var props=this.props,dialogClassName="";return props.msgType==type_success?dialogClassName=SUCCESS_CLASSNAME:props.msgType==type_error?dialogClassName=ERROR_CLASSNAME+" "+BUTTONS_BASED_DIALOG_CLASSNAME:props.msgType==type_general?dialogClassName=GENERAL_CLASSNAME:props.msgType==type_info&&(dialogClassName=INFO_CLASSNAME+" "+BUTTONS_BASED_DIALOG_CLASSNAME),props.extraCls&&props.extraCls.length>0&&(dialogClassName+=" "+props.extraCls),dialogClassName},open:function(){this.setState({show:!0})},close:function(){this.setState({show:!1})},_componentWillHide:function(){if(this.props.msgType==type_error||this.props.msgType==type_info)try{1==this.props.lockWindowScrolling&&UnlockWindowScrolling(__lockWindowScrollId_messageBoxes)}catch(e){console.log(e)}this.props;setTimeout(function(){var containerNode=document.getElementById(this.id);if(containerNode){var divNext=document.querySelector("#"+this.id+"+div");containerNode.parentNode.removeChild(containerNode),setTimeout(function(){divNext&&divNext.parentNode.removeChild(divNext)},100)}}.bind({id:this.props.id,msgType:this.props.msgType}),100)},okClick:function(){var props=this.props;"function"==typeof props.callback&&props.callback.apply(props.scope?props.scope:window,props.callbackParams?props.callbackParams:[]),this.setState({show:!1})},componentDidMount:function(){var props=this.props;props.msgType!=type_error&&props.msgType!=type_info||1==this.state.show&&1==props.lockWindowScrolling&&LockWindowScrolling(__lockWindowScrollId_messageBoxes),props.msgType!=type_success&&props.msgType!=type_general||setInterval(function(){this.props.msgType!=type_success&&this.props.msgType!=type_general||this.setState({show:!1})}.bind(this),props.removeTimer)},render:function(){var props=this.props,dialogClassName=this._getDialogClassName(),backdrop="static",dialogFlagUI="";1!=this.state.show&&this._componentWillHide();var resetScroll=props.pageScrollSet;resetScroll&&setTimeout(function(){$(window.parent).scrollTop(resetScroll)},.5);var dialogFlagUITypeClassName="",dialogFlagUITypeIconClassName="";if(props.msgType==type_success?(dialogFlagUITypeClassName=SUCCESS_FLAG_CLASSNAME,dialogFlagUITypeIconClassName=SUCCESS_FLAG_ICON):props.msgType==type_general?(dialogFlagUITypeClassName=GENERAL_FLAG_CLASSNAME,dialogFlagUITypeIconClassName=GENERAL_FLAG_ICON):props.msgType==type_error?(dialogFlagUITypeClassName=ERROR_FLAG_CLASSNAME,dialogFlagUITypeIconClassName=ERROR_FLAG_ICON):props.msgType==type_info&&(dialogFlagUITypeClassName=INFO_FLAG_CLASSNAME,dialogFlagUITypeIconClassName=INFO_FLAG_ICON),dialogFlagUI=React.createElement("div",{className:FLAG_CLASSNAME+" "+dialogFlagUITypeClassName},React.createElement("i",{className:dialogFlagUITypeIconClassName})),props.msgType==type_success||props.msgType==type_general){backdrop=!1;var enforceFocus=!1,container=document.getElementById(_flyers_containerId),slideOutClassName=1!=this.state.show?"flyer-slide-out":"";return React.createElement(ReactBootstrap.Modal,{ref:"rbModal",animation:!1,backdrop:backdrop,autoFocus:!1,enforceFocus:enforceFocus,bsClass:DEF_CLASSNAME,container:container,className:dialogClassName,dialogClassName:slideOutClassName,show:!0,onHide:this.close},dialogFlagUI,React.createElement(ReactBootstrap.ModalHeader,{closeButton:!0}),React.createElement(ReactBootstrap.ModalBody,null,React.createElement("p",null,props.msg)))}return props.msgType==type_error||props.msgType==type_info?React.createElement(ReactBootstrap.Modal,{ref:"rbModal",animation:!1,backdrop:backdrop,bsClass:DEF_CLASSNAME+" modal",className:dialogClassName,show:this.state.show,onHide:this.close},dialogFlagUI,React.createElement(ReactBootstrap.ModalHeader,{closeButton:!0}),React.createElement(ReactBootstrap.ModalBody,null,React.createElement("p",null,props.msg)),React.createElement(ReactBootstrap.ModalFooter,null,React.createElement(ReactBootstrap.Button,{onClick:this.okClick},"OK"))):""}}),__lockWindowScrollId_messageBoxes="irsa.messageBoxes",ConfirmDialog=React.createClass({displayName:"ConfirmDialog",propTypes:{id:React.PropTypes.string,msg:React.PropTypes.string.isRequired,title:React.PropTypes.string,extraCls:React.PropTypes.string,yesButtonTitle:React.PropTypes.string,noButtonTitle:React.PropTypes.string,callbackYes:React.PropTypes.func,callbackYesParams:React.PropTypes.array,callbackNo:React.PropTypes.func,callbackNoParams:React.PropTypes.array,scope:React.PropTypes.any,lockWindowScrolling:React.PropTypes.bool,onOpen:React.PropTypes.func,pageScrollSet:React.PropTypes.number,isCancelButtonShow:React.PropTypes.bool},getDefaultProps:function(){return{msg:"Are you sure to perform this operation?",title:"Confirm",yesButtonTitle:"OK",noButtonTitle:"Cancel",lockWindowScrolling:!0,pageScrollSet:0,isCancelButtonShow:!0}},getInitialState:function(){return{show:!0,pageScrollSet:0}},_getDialogClassName:function(){var props=this.props,dialogClassName=dialogClassName=CONFIRM_CLASSNAME+" "+BUTTONS_BASED_DIALOG_CLASSNAME;return props.extraCls&&props.extraCls.length>0&&(dialogClassName+=" "+props.extraCls),dialogClassName},open:function(){this.setState({show:!0})},close:function(){var props=this.props;"function"==typeof props.callbackNo&&props.callbackNo.apply(props.scope?props.scope:window,props.callbackNoParams?props.callbackNoParams:[]),this.setState({show:!1,pageScrollSet:props.pageScrollSet})},_componentWillHide:function(){setTimeout(function(){var containerNode=document.getElementById(this.id);containerNode&&containerNode.parentNode.removeChild(containerNode);try{1==this.lockWindowScrolling&&UnlockWindowScrolling(__lockWindowScrollId_messageBoxes)}catch(e){console.log(e)}}.bind({id:this.props.id,lockWindowScrolling:this.props.lockWindowScrolling}),150)},okClick:function(){var props=this.props;"function"==typeof props.callbackYes&&props.callbackYes.apply(props.scope?props.scope:window,props.callbackYesParams?props.callbackYesParams:[]),this.setState({show:!1,pageScrollSet:props.pageScrollSet});props.pageScrollSet},componentDidMount:function(){var props=this.props;1==this.state.show&&"function"==typeof props.onOpen&&props.onOpen(),1==this.state.show&&1==props.lockWindowScrolling&&LockWindowScrolling(__lockWindowScrollId_messageBoxes)},render:function(){var props=this.props,dialogClassName=this._getDialogClassName(),backdrop="static",dialogFlagUI=React.createElement("div",{className:FLAG_CLASSNAME+" "+CONFIRM_FLAG_CLASSNAME});1!=this.state.show&&this._componentWillHide();var resetScroll=props.pageScrollSet;return setTimeout(function(){$("body").scrollTop(resetScroll),window.scrollTo("0",resetScroll)},5),props.isCancelButtonShow?React.createElement(ReactBootstrap.Modal,{animation:!1,backdrop:backdrop,bsClass:DEF_CLASSNAME+" modal",className:dialogClassName,show:this.state.show,onHide:this.close},dialogFlagUI,React.createElement(ReactBootstrap.ModalHeader,{closeButton:!0}),React.createElement(ReactBootstrap.ModalBody,null,React.createElement("p",{dangerouslySetInnerHTML:{__html:props.msg}})),React.createElement(ReactBootstrap.ModalFooter,null,React.createElement(ReactBootstrap.Button,{bsClass:"btn-glow inverse",onClick:this.okClick},props.yesButtonTitle),React.createElement(ReactBootstrap.Button,{bsClass:"btn-glow",onClick:this.close},props.noButtonTitle))):React.createElement(ReactBootstrap.Modal,{animation:!1,backdrop:backdrop,bsClass:DEF_CLASSNAME+" modal",className:dialogClassName,show:this.state.show,onHide:this.close},dialogFlagUI,React.createElement(ReactBootstrap.ModalHeader,{closeButton:!0}),React.createElement(ReactBootstrap.ModalBody,null,React.createElement("p",{dangerouslySetInnerHTML:{__html:props.msg}})),React.createElement(ReactBootstrap.ModalFooter,null,React.createElement(ReactBootstrap.Button,{bsClass:"btn-glow inverse",onClick:this.okClick},props.yesButtonTitle)))}}),_containerCreationInProgress=!1;module.exports={showSuccessMsg:function(objOrString,title,isIFrame){var options=_createMsgboxOptions(objOrString,title);options.msgType=type_success,_showMsgbox(options,!0,isIFrame)},showMsg:function(objOrString,title,isIFrame){var options=_createMsgboxOptions(objOrString,title);options.msgType=type_general,_showMsgbox(options,!0,isIFrame)},showMsgDialog:function(objOrString,title,isIFrame){var options=_createMsgboxOptions(objOrString,title);options.msgType=type_info,_showMsgbox(options,!1,isIFrame)},showErrorMsg:function(objOrString,title,isIFrame){var options=_createMsgboxOptions(objOrString,title);options.msgType=type_error,_showMsgbox(options,!1,isIFrame)},showConfirmDialog:function(options){var mountNode=document.createElement("div");mountNode.id="cd-"+Util.generateUUID(),mountNode.classList.add(_messagebox_element_className),document.body.appendChild(mountNode),options.id=mountNode.id,ReactDOM.render(React.createElement(ConfirmDialog,options),mountNode)}}},function(module,exports){"use strict";var IrsaReactVTabs=React.createClass({displayName:"IrsaReactVTabs",propTypes:{id:React.PropTypes.string,selectedTab:React.PropTypes.number,tabWidth:React.PropTypes.number,animation:React.PropTypes.bool,tabs:React.PropTypes.arrayOf(React.PropTypes.shape({key:React.PropTypes.string.isRequired,title:React.PropTypes.string.isRequired,content:React.PropTypes.element,tabClassName:React.PropTypes.string,disabled:React.PropTypes.bool,animation:React.PropTypes.bool})).isRequired,onSelect:React.PropTypes.func,context:React.PropTypes.any},getInitialState:function(){return{key:1}},getDefaultProps:function(){return{selectedTab:1,tabWidth:2,animation:!1,onSelect:function(key,idx){}}},handleSelect:function(tabNum){this.setState({key:tabNum}),"function"==typeof this.props.onSelect&&this.props.onSelect.apply(this.props.context?this.props.context:window,[this.props.tabs[tabNum-1].key,tabNum-1])},_emptyUI:function(msgHTML){return React.createElement("span",{className:"no-content-react-v-tabs"},msgHTML)},componentWillMount:function(){this._id=this.props.id?this.props.id:IrsaModulesUtil.generateUUID()},componentWillReceiveProps:function(nextProps){this._id=nextProps.id?nextProps.id:this._id},render:function(){var props=this.props;if("undefined"==typeof props.tabs||null==props.tabs||0==props.tabs.length)return this._emptyUI("tabs prop is required for IrsaReactVTabs");var tabs=[],eventKeyCnt=0;return props.tabs.map(function(m){var cls=m.tabClassName?"react-v-tab "+m.tabClassName:"react-v-tab";eventKeyCnt+=1;var tab=React.createElement(ReactBootstrap.Tab,{key:m.key,eventKey:eventKeyCnt,title:m.title,className:cls}," ",m.content?m.content:""," ");tabs.push(tab)}),React.createElement("div",{className:"react-v-tabs-wrapper"},React.createElement(ReactBootstrap.Tabs,{id:this._id,activeKey:this.state.key,defaultActiveKey:props.selectedTab,animation:props.animation,onSelect:this.handleSelect,position:"left",tabWidth:props.tabWidth},tabs))}}),IrsaPopoverListElement=React.createClass({displayName:"IrsaPopoverListElement",propTypes:{template:React.PropTypes.string},render:function(){var props=this.props,data=props.data;if(props.template){if(!$.tmpl)return console.log("$.tmpl is undefined. Please add dependency file jquery.tmpl.js to page header"),React.createElement("li",{className:"list-group-item"},data);var $html=$.tmpl(props.template,data),html=$("
").append($html).html();return React.createElement("li",{className:"list-group-item",dangerouslySetInnerHTML:{__html:html}})}return React.createElement("li",{className:"list-group-item"},data)}}),IrsaPopoverList=React.createClass({displayName:"IrsaPopoverList",propTypes:{data:React.PropTypes.array,template:React.PropTypes.string},render:function(){var props=this.props;return React.createElement("ul",{className:"list-group"},this.props.data.map(function(element,i){return React.createElement(IrsaPopoverListElement,{key:i,data:element,template:props.template})}))}}),IrsaPopover=React.createClass({displayName:"IrsaPopover",propTypes:{id:React.PropTypes.string.isRequired,text:React.PropTypes.oneOfType([React.PropTypes.string,React.PropTypes.element]).isRequired,textIsHtml:React.PropTypes.bool,content:React.PropTypes.oneOfType([React.PropTypes.string,React.PropTypes.element,React.PropTypes.func]).isRequired,template:React.PropTypes.string,context:React.PropTypes.any,trigger:React.PropTypes.oneOf(["hover","click"]),loadDataOnce:React.PropTypes.bool,title:React.PropTypes.string,placement:React.PropTypes.oneOf(["top","left","bottom","right"]),bsStyle:React.PropTypes.oneOf(["success","warning","danger","info","default","primary","link"]),wrapperClass:React.PropTypes.string},getInitialState:function(){return{_id:generateUniqueId(),show:!1,data:null,dataLoaded:!1}},getDefaultProps:function(){return{content:"",trigger:"click",loadDataOnce:!1,placement:"bottom",bsStyle:"link",wrapperClass:"",textIsHtml:!1}},_handleTrigger:function(e,triggerFired){var props=this.props,showState=!1;if("click"==props.trigger&&"click"!=triggerFired)return!1;if("hover"==props.trigger&&"hover"!=triggerFired&&"leave"!=triggerFired)return!1;if("click"==props.trigger?showState=!this.state.show:"hover"==props.trigger&&"hover"==triggerFired&&(showState=!0),"click"==props.trigger&&showState===!0){var ev=new CustomEvent("closePopover",{detail:{id:this.state._id}});window.dispatchEvent(ev)}if("function"==typeof props.content&&this.state.show===!1)if(props.loadDataOnce===!0)if(this.state.dataLoaded)this.setState({target:e.target,show:showState});else{var data=props.content.apply(props.context?props.context:window,[e,triggerFired]);this.setState({data:data,dataLoaded:!0,target:e.target,show:showState})}else{var data=props.content.apply(props.context?props.context:window,[e,triggerFired]);this.setState({data:data,target:e.target,show:showState})}else this.setState({target:e.target,show:showState})},onBodyHandler:function(){this.setState({show:!1})},hideAllOtherPopovers:function(e){"closePopover"==e.type&&e.detail.id!=this.state._id&&this.setState({show:!1})},componentDidMount:function(){"click"==this.props.trigger&&window.addEventListener("closePopover",this.hideAllOtherPopovers,!1),document.body.addEventListener("click",this.onBodyHandler)},componentWillUnmount:function(){"click"==this.props.trigger&&window.removeEventListener("closePopover",this.hideAllOtherPopovers),document.body.removeEventListener("click",this.onBodyHandler)},render:function(){var _this=this,props=this.props,style={};"link"==props.bsStyle&&(style.textDecoration="none");var ct=props.content;if("function"==typeof this.props.content){var data=this.state.data;ct=data&&0!=data.length?React.createElement(IrsaPopoverList,{data:data,template:props.template}):""}var closeButton="";"click"==props.trigger&&(closeButton=React.createElement("a",{href:"#",onClick:function(e){_this.setState({show:!1}),e.preventDefault()},style:{float:"right",color:"#bbb",fontSize:"1.12em",position:"absolute",right:"7px",top:"4px"}},React.createElement("i",{className:"icon-remove","aria-hidden":"true"})));var btnUI;return btnUI=props.textIsHtml?React.createElement("div",{onMouseOver:function(e){_this._handleTrigger(e,"hover")},onMouseOut:function(e){_this._handleTrigger(e,"leave")}},props.text):React.createElement(ReactBootstrap.Button,{bsStyle:props.bsStyle,style:style,onClick:function(e){_this._handleTrigger(e,"click")},onMouseOver:function(e){_this._handleTrigger(e,"hover")},onMouseOut:function(e){_this._handleTrigger(e,"leave")}},props.text),React.createElement("div",null,btnUI,React.createElement(ReactBootstrap.Overlay,{show:this.state.show,target:function(){return ReactDOM.findDOMNode(_this.state.target)},placement:props.placement},React.createElement(ReactBootstrap.Popover,{className:props.wrapperClass,id:this.state._id, title:props.title},closeButton,ct)))}});module.exports={IrsaReactVTabs:IrsaReactVTabs,IrsaPopoverListElement:IrsaPopoverListElement,IrsaPopoverList:IrsaPopoverList,IrsaPopover:IrsaPopover}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var ObjectType,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_extends=Object.assign||function(target){for(var i=1;i0&&this.props.listenOnlyToFieldsForValueChange.indexOf(fieldName)==-1||this.props.onValueChange.apply(this.props.scope?this.props.scope:this,[newValueObj,oldValueObj,fieldName])}.bind(this)),this._vm.addErrorListener(function(){this.props.onFieldError.apply(this.props.scope?this.props.scope:this,arguments)}.bind(this)),this._vm.addValidateListener(function(){this.handleValidate.apply(this,arguments)}.bind(this))},componentWillUnmount:function(){this._values={},this._errors={},this._vm.removeAll()}};"undefined"!=typeof Subschema&&(Subschema.loader.addType("CheckboxSelect",React.createClass({displayName:"CheckboxSelect",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,value:React.PropTypes.any},componentWillMount:function(){var fieldName=this.props.name.split("CheckboxSelect")[0],val=this.props.field.subSchema[fieldName].value;this.setState({value:val}),this._listener=this.context.valueManager.addListener(this.props.path,this.onUpdate,this,!0)},componentDidMount:function(){var fieldName=this.props.name.split("CheckboxSelect")[0],val=this.props.field.subSchema[fieldName].value;this.refs.val.refs[fieldName].setValue(val)},componenWillUnmount:function(){this._listener.remove()},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},render:function(){var props=this.props;return React.createElement("div",{className:"checkbox-select-wrapper"},React.createElement("input",{id:"chkCheckboxSelectField_"+props.name,type:"checkbox",ref:"checkboxSelectStatus",className:"checkbox-select-checkbox",title:"Click to apply this option"}),React.createElement("div",{className:"checkbox-select-field-control"},React.createElement(ObjectType,_extends({ref:"val"},this.props))))}})),Subschema.loader.addType("NumberBW",React.createClass({displayName:"NumberBW",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,value:React.PropTypes.number},componentWillMount:function(){var props=this.props;0==this.context.valueManager.value[this.props.name]?(this.setState({value:props.DefaultValue}),this.update(props.DefaultValue)):this.setState({value:this.context.valueManager.value[this.props.name]})},componenWillUnmount:function(){},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},onChange:function(e){var props=this.props;e.target.value<1&&0!=e.target.value.length?(this.setState({value:props.DefaultValue}),this.update(props.DefaultValue)):(this.setState({value:e.target.value}),this.update(e.target.value))},render:function(){var _this=this,props=this.props;return React.createElement("div",null,React.createElement("input",{id:props.name,type:"Number",min:"1",className:"beepDurinput",value:this.state.value,onChange:function(e){return _this.onChange(e)}}))}})),Subschema.loader.addTemplate("CheckboxSelectTemplate",React.createClass({displayName:"CheckboxSelectTemplate",render:function(){var _props=this.props,children=(_props.name,_props.title,_props.help,_props.errorClassName,_props.message,_props.fieldClass,_props.children);return React.createElement("div",null,children)}})),Subschema.loader.addType("SwitchButton",React.createClass({displayName:"SwitchButton",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,name:React.PropTypes.string,onText:React.PropTypes.string,offText:React.PropTypes.string,value:React.PropTypes.oneOfType([React.PropTypes.bool,React.PropTypes.number,React.PropTypes.string])},getInitialState:function(){return{value:!1}},getDefaultProps:function(){return{onText:"ON",offText:"OFF",value:!1}},getValue:function(){var val=this.refs.val.getValue();return this._resolveValue(val)},setValue:function(state){this.setState({value:this._resolveValue(state)})},_resolveValue:function(value){var val="lRes("+value+")";return value===!0||1==value||"ON"==val},componentWillMount:function(){this.setState({value:this._resolveValue(this.props.value)}),this._listener=this.context.valueManager.addListener(this.props.path,this.onUpdate,this,!0)},componenWillUnmount:function(){this._listener.remove()},handleClick:function(){this.update(!this.state.value)},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},render:function(){var props=this.props,isChecked=this._resolveValue(this.state.value);return React.createElement("div",{id:props.name,className:"form-group field-name switchbutton"+(props.className?" "+props.className:"")},React.createElement("div",{className:"col-sm-10"},React.createElement("div",{className:"slider-frame primary",onClick:this.handleClick},React.createElement("input",{id:props.id,name:props.name,className:"form-control",type:"hidden",ref:"val",value:isChecked===!0?"1":"0"}),React.createElement("span",{className:"slider-button"+(isChecked===!0?" on":""),"data-off-text":this.props.onText,"data-on-text":this.props.offText},isChecked===!0?this.props.onText:this.props.offText),React.createElement("p",{className:"help-block"}))))}})),Subschema.loader.addTemplate("IrsaReactHorizontalFormTemplate",React.createClass({displayName:"IrsaReactHorizontalFormTemplate",render:function(){var props=this.props,cls=_CIrsaReactFormClassName+" "+_CIrsaReactHFormClassName;return cls=props.className&&props.className.length>0?cls+" "+props.className:cls,React.createElement("form",{className:cls},props.children)}})),Subschema.loader.addValidator("numberRange",function(options){var opts=(0,_objectAssign2.default)({message:"Value must be in range"},options);return function(val){if(null==val||void 0==val||0==val.length)return null;if(isNaN(val)||isNaN(parseInt(val)))return{type:"numberRange",message:opts.message};if("decimal"!==opts.numberType&&val.toString().indexOf(".")!=-1)return{type:"numberRange",message:String.format("{0}. Value cannot be a decimal number",opts.message)};var num=parseInt($.trim(val));return numopts.max?{type:"numberRange",message:opts.message}:void 0}}),Subschema.loader.addValidator("textLength",function(options){var opts=(0,_objectAssign2.default)({message:"Length for text is invalid"},options);return function(val){var text=val?val.trim():"";if(opts.min>0&&text.length0&&text.length>opts.max)return{type:"textLength",message:opts.message}}}),Subschema.loader.addValidator("IPaddress",function(options){var opts=(0,_objectAssign2.default)({message:"Invalid IP Address"},options);return function(val){var text=val?val.trim():"";if(text&&text.length>0&&!isValidIPaddress(text))return{type:"IPaddress",message:opts.message}}}),Subschema.loader.addValidator("compare",function(options){var opts=(0,_objectAssign2.default)({message:"Comparison failed"},options);return function(val,e){var text=val?opts.ignoreCase===!0?val.toLowerCase():val:"",compareToText=e.value[opts.to];if(compareToText=compareToText?opts.ignoreCase===!0?compareToText.toLowerCase():compareToText:" ",text!=compareToText)return opts.ignoreIfEmptyOfCompared!==!0||0!=text.length||null!=e.value[opts.to]&&0!=e.value[opts.to].length?{type:"compare",message:opts.message}:null}}),Subschema.loader.addValidator("spaceNotAllowed",function(options){var opts=(0,_objectAssign2.default)({message:"Spaces are not allowed."},options);return function(val){var text=val;if(/\s/g.test(text)||text.indexOf(" ")>=0)return{type:"spaceNotAllowed",message:opts.message}}}),Subschema.loader.addValidator("specialCharactersNotAllowed",function(options){var opts=(0,_objectAssign2.default)({message:"Invalid Name. Special Characters not allowed"},options);return function(val){var text=val;if(0==/^[-a-zA-Z0-9_]*$/.test(text))return{type:"specialCharactersNotAllowed",message:opts.message}}}),Subschema.loader.addValidator("validValueCheck",function(options){var opts=(0,_objectAssign2.default)({message:"Invalid value"},options);return function(val){var result=checkForValidInputContent(val,options.name);if(result&&result.length>0)return{type:"validValueCheck",message:opts.message}}}),Subschema.loader.addValidator("RequireFTP",function(options){var opts=(0,_objectAssign2.default)({message:"FTP configuration not selected, "},options);return function(val){if(void 0!==val&&null!==val)if(void 0!==val.FTPID&&null!==val.FTPID){if("0"==val.FTPID||"-1"==val.FTPID)return{type:"ERROR",message:opts.message}}else if("0"==val||"-1"==val)return{type:"ERROR",message:opts.message}}}),Subschema.loader.addType("ReactSelect",React.createClass({displayName:"ReactSelect",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,name:React.PropTypes.string,options:React.PropTypes.array,onValueClick:React.PropTypes.func,value:React.PropTypes.any,multi:React.PropTypes.bool,simpleValue:React.PropTypes.bool,delimiter:React.PropTypes.string,joinValues:React.PropTypes.bool,onChange:React.PropTypes.func,placeholder:React.PropTypes.string,searchable:React.PropTypes.bool,clearable:React.PropTypes.bool,disabled:React.PropTypes.bool,className:React.PropTypes.string,labelKey:React.PropTypes.string,valueKey:React.PropTypes.string},getInitialState:function(){return{value:null}},getDefaultProps:function(){return{options:[],onValueClick:function(value,event){},value:null,multi:!0,simpleValue:!1,delimiter:",",joinValues:!1,clearable:!0,searchable:!0,disabled:!1,placeholder:"Select",onChange:function(value){}}},getValue:function(){return this.state.value},setValue:function(state){this.setState({value:state.value})},componentWillMount:function(){this.setState({value:this.props.value}),this._listener=this.context.valueManager.addListener(this.props.path,this.onUpdate,this,!0)},componentWillReceiveProps:function(nextProps){},componenWillUnmount:function(){this._listener.remove()},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},onChange:function(value){this.update(value),this.props.onChange.apply(window,[value])},onValueClick:function(value,event){this.props.onValueClick.apply(this,[value,event])},render:function(){var _props2=this.props,name=_props2.name,options=_props2.options,multi=_props2.multi,simpleValue=_props2.simpleValue,delimiter=_props2.delimiter,joinValues=_props2.joinValues,placeholder=_props2.placeholder,searchable=_props2.searchable,clearable=_props2.clearable,disabled=_props2.disabled,valueKey=_props2.valueKey,labelKey=_props2.labelKey,value=this.state.value;return React.createElement("div",{className:"form-group field-name"+(this.props.className?" "+this.props.className:"")},React.createElement("div",{className:"Irsa-reactSelect","data-control-name":name},React.createElement(Select,{ref:"reactSelect",name:name,options:options,value:value,multi:multi,simpleValue:simpleValue,delimiter:delimiter,joinValues:joinValues,placeholder:placeholder,searchable:searchable,clearable:clearable,disabled:disabled,onChange:this.onChange,onValueClick:this.onValueClick,labelKey:labelKey,valueKey:valueKey}),React.createElement("p",{className:"help-block"})))}})),Subschema.loader.addType("ReactSelectLimited",React.createClass({displayName:"ReactSelectLimited",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,name:React.PropTypes.string,options:React.PropTypes.array,onValueClick:React.PropTypes.func,value:React.PropTypes.any,multi:React.PropTypes.bool,simpleValue:React.PropTypes.bool,delimiter:React.PropTypes.string,joinValues:React.PropTypes.bool,onChange:React.PropTypes.func,placeholder:React.PropTypes.string,searchable:React.PropTypes.bool,clearable:React.PropTypes.bool,disabled:React.PropTypes.bool,className:React.PropTypes.string,labelKey:React.PropTypes.string,valueKey:React.PropTypes.string,maxLength:React.PropTypes.number},getInitialState:function(){return{value:null}},getDefaultProps:function(){return{options:[],onValueClick:function(value,event){},value:null,multi:!0,simpleValue:!1,delimiter:",",joinValues:!1,clearable:!0,searchable:!0,disabled:!1,placeholder:"Select",onChange:function(value){}}},getValue:function(){return this.state.value},setValue:function(state){this.setState({value:state.value})},componentWillMount:function(){this.setState({value:this.props.value}),this._listener=this.context.valueManager.addListener(this.props.path,this.onUpdate,this,!0)},componentWillReceiveProps:function(nextProps){},componenWillUnmount:function(){this._listener.remove()},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},onChange:function(value){if(null!==value&&""!==value&&value.split(",").length>this.props.maxLength){var errMsg=String.format("You can select {0} category maximum",this.props.maxLength);showErrorMsg(errMsg),value=this.state.value}this.update(value),this.props.onChange.apply(window,[value])},onValueClick:function(value,event){this.props.onValueClick.apply(this,[value,event])},render:function(){var _props3=this.props,name=_props3.name,options=_props3.options,multi=_props3.multi,simpleValue=_props3.simpleValue,delimiter=_props3.delimiter,joinValues=_props3.joinValues,placeholder=_props3.placeholder,searchable=_props3.searchable,clearable=_props3.clearable,disabled=_props3.disabled,valueKey=_props3.valueKey,labelKey=_props3.labelKey,value=this.state.value;return React.createElement("div",{className:"form-group field-name"+(this.props.className?" "+this.props.className:"")},React.createElement("div",{className:"Irsa-reactSelect","data-control-name":name},React.createElement(Select,{ref:"reactSelect",name:name,options:options,value:value,multi:multi,simpleValue:simpleValue,delimiter:delimiter,joinValues:joinValues,placeholder:placeholder,searchable:searchable,clearable:clearable,disabled:disabled,onChange:this.onChange,onValueClick:this.onValueClick,labelKey:labelKey,valueKey:valueKey}),React.createElement("p",{className:"help-block"})))}})),Subschema.loader.addType("ReactTimePicker",React.createClass({displayName:"ReactTimePicker",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,name:React.PropTypes.string,value:React.PropTypes.string,onTimeChanged:React.PropTypes.func,position:React.PropTypes.shape({top:React.PropTypes.number,left:React.PropTypes.number})},getInitialState:function(){return{value:"00:00"}},getDefaultProps:function(){return{value:"00:00",position:{top:36,left:16},onTimeChanged:function(value){}}},getValue:function(){return this.state.value},setValue:function(value){this.setState({value:value})},_pad:function(value){return null==value||void 0==value?"00":(value=value.toString(),1===value.length?"0"+value:value)},getValueAsStringIn24HourFormat:function(value){var hr=value.hour;if(12==hr&&1==value.am?hr=0:12==hr&&0==value.am&&(hr=12),!value.am)switch(value.hour){case 1:hr=13;break;case 2:hr=14;break;case 3:hr=15;break;case 4:hr=16;break;case 5:hr=17;break;case 6:hr=18;break;case 7:hr=19;break;case 8:hr=20;break;case 9:hr=21;break;case 10:hr=22;break;case 11:hr=23;break;default:hr=value.hour}var min=null!=value.minute&&void 0!=value.minute?value.minute:0;return this._pad(hr)+":"+this._pad(min)},getHourMinuteAMPMCompsFromValue:function(value){if(!value||0==value.length)return{hour:0,minute:0,am:!0};var arr=value.split(":"),hr=parseInt(arr[0]),min=0;arr.length>1&&null!=arr[1]&&void 0!=arr[1]&&(min=parseInt(arr[1]));var am=!(hr>=12);if(!am)switch(hr){case 13:hr=1;break;case 14:hr=2;break;case 15:hr=3;break;case 16:hr=4;break;case 17:hr=5;break;case 18:hr=6;break;case 19:hr=7;break;case 20:hr=8;break;case 21:hr=9;break;case 22:hr=10;break;case 23:hr=11;break;default:hr=hr}return 0==hr&&1==am&&(hr=12),{hour:hr,minute:min,am:am}},componentWillMount:function(){this.setState({value:this.props.value}),this._listener=this.context.valueManager.addListener(this.props.path,this.onUpdate,this,!0)},componenWillUnmount:function(){this._listener.remove()},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},onTimeChanged:function(value){var convertedValue=this.getValueAsStringIn24HourFormat(value);this.update(convertedValue),this.props.onTimeChanged.apply(window,[convertedValue])},render:function(){var _getHourMinuteAMPMCom=this.getHourMinuteAMPMCompsFromValue(this.state.value),hour=_getHourMinuteAMPMCom.hour,minute=_getHourMinuteAMPMCom.minute,am=_getHourMinuteAMPMCom.am,top=this.props.position.top,left=this.props.position.left;return React.createElement("div",{className:"form-group field-name"+(this.props.className?" "+this.props.className:"")},React.createElement("input",{type:"hidden",name:this.props.name,className:"form-control",value:this.state.value}),React.createElement("div",{className:"col-sm-10"},React.createElement(_IrsaReactTimePicker2.default,{hour:hour,minute:minute,am:am,onTimeChanged:this.onTimeChanged,top:top,left:left}),React.createElement("p",{className:"help-block"})))}})),Subschema.loader.addType("ReactUpload",React.createClass({displayName:"ReactUpload",contextTypes:{valueManager:Subschema.PropTypes.valueManager,loader:Subschema.PropTypes.loader},propTypes:{id:React.PropTypes.string,url:React.PropTypes.string.isRequired,value:React.PropTypes.shape({GUID:React.PropTypes.string,OtherContentId:React.PropTypes.number,BlobURI:React.PropTypes.string,StationId:React.PropTypes.number,FileName:React.PropTypes.string,Size:React.PropTypes.number,UploadedFileName:React.PropTypes.string,fileLogSysSerial:React.PropTypes.number}).isRequired,accept:React.PropTypes.string,maxSize:React.PropTypes.number,onBeforeSend:React.PropTypes.func,requestEnded:React.PropTypes.func},getInitialState:function(){return{value:{FileName:""}}},getDefaultProps:function(){return{value:{FileName:""},maxSize:5242880,autoUpload:!0}},onUpdate:function(value){this.setState({value:value})},update:function(value){this.context.valueManager.update(this.props.path,value)},requestEnded:function(err,result){if((!err||0==err.length)&&result.uploadedFiles&&result.uploadedFiles.length>0){var uploadedFile=result.uploadedFiles[0];this.update({GUID:uploadedFile.GUID,OtherContentId:0,BlobURI:uploadedFile.BlobURI,StationId:uploadedFile.StationId,FileName:uploadedFile.FileName,Size:uploadedFile.Size,UploadedFileName:uploadedFile.ServerFileName,fileLogSysSerial:uploadedFile.fileLogSysSerial})}this.props.requestEnded(err,result)},componentWillMount:function(){this.setState({value:this.props.value}),this._listener=this.context.valueManager.addListener(this.props.path,this.onUpdate,this,!0)},componenWillUnmount:function(){this._listener.remove()},onCancel:function(){this.context.valueManager.update(this.props.path,null)},render:function(){var vlu=this.state.value;vlu=vlu?vlu:{};var fileName=vlu.FileName?vlu.FileName:"";return React.createElement("div",{className:"form-group field-name"+(this.props.className?" "+this.props.className:"")},React.createElement("div",{className:"col-sm-10"},React.createElement(IrsaReactUpload,{dropzone:!1,maxSize:this.props.maxSize,url:this.props.url,autoUpload:!0,multiple:!1,onBeforeSend:this.props.onBeforeSend,requestEnded:this.requestEnded,accept:this.props.accept,async:!1,existingFileNames:fileName}),React.createElement("div",{className:"close-button-btn btn btn-danger",onClick:this.onCancel},React.createElement("i",{className:"fa fa-times"}," ")),React.createElement("p",{className:"help-block"})))}}))),window._showFieldHint=function(e){$(document.body).append($('"));var pos=$(e).offset(),left=pos.left+15,top=pos.top-9;$(".field-hint-tooltip").css({left:left+"px",top:top+"px",opacity:1})},window._hideFieldHint=function(e){$(".field-hint-tooltip").remove()};var IrsaReactForm=React.createClass({displayName:"IrsaReactForm",mixins:[SubSchemaFormVMMixin],propTypes:{id:React.PropTypes.string,schema:React.PropTypes.any.isRequired,title:React.PropTypes.string,data:React.PropTypes.any,isCheckboxSelectBased:React.PropTypes.bool,layout:React.PropTypes.oneOf(["horizontal","vertical"]),componentWillMount:React.PropTypes.func,componentDidMount:React.PropTypes.func,onValueChange:React.PropTypes.func,listenOnlyToFieldsForValueChange:React.PropTypes.arrayOf(React.PropTypes.string),onFieldError:React.PropTypes.func,scope:React.PropTypes.any},getDefaultProps:function(){return{data:{},title:"",layout:"horizontal",isCheckboxSelectBased:!1,componentWillMount:function(formComp){},componentDidMount:function(formComp){},onValueChange:function(){},listenOnlyToFieldsForValueChange:[],onFieldError:function(){}}},getInitialState:function(){return{schema:{schema:{}}}},validate:function(){var vm=this.getValueManager();vm.validate();var errors=vm.getErrors();return!errors||0==Object.keys(errors).length},_getFieldTitle:function(fieldName){var field=this.state.schema.schema[fieldName];return field?field.title?field.title:fieldName:(console.log('Field "'+fieldName+'" not found in Form Schema'),"")},getErrors:function(){var vm=this.getValueManager(),errors=vm.getErrors(),myErrors={},form=this;for(var fieldName in errors)errors.hasOwnProperty(fieldName)&&(myErrors[fieldName]={fieldName:fieldName},myErrors[fieldName].title=form._getFieldTitle(fieldName),myErrors[fieldName].errors=errors[fieldName]);return myErrors},handleValidate:function(){},getValues:function(){var vm=this.getValueManager();return vm.getValue()},handleSubmit:function(e){vm.validate();var errors=vm.getErrors(),hasErrors=Object.keys(errors).length>0;hasErrors&&e.preventDefault()},componentWillMount:function(){this._id=this.props.id?this.props.id:IrsaModulesUtil.generateUUID();var tempSchema=(0,_objectAssign2.default)({},this.props.schema.schema),alteredSchema=this._modifySchemaForXSSCheck(tempSchema);this.setState({schema:{schema:alteredSchema}}),this.props.componentWillMount.apply(this.props.scope?this.props.scope:this,[this])},componentDidMount:function(){var _this2=this,schema=this.state.schema;setTimeout(function(){_this2._setupHints(schema.schema)},30),this.props.componentDidMount.apply(this.props.scope?this.props.scope:this,[this])},componentDidUpdate:function(){var _this3=this,schema=this.state.schema;setTimeout(function(){_this3._setupHints(schema.schema)},30)},componentWillUnmount:function(){$(this.refs.formComp).remove(".field-hint"),$(".field-hint-tooltip").remove()},componentWillReceiveProps:function(nextProps){this._id=nextProps.id?nextProps.id:this._id;var tempSchema=(0,_objectAssign2.default)({},nextProps.schema.schema),alteredSchema=this._modifySchemaForXSSCheck(tempSchema);this.setState({schema:{schema:alteredSchema}})},setSchema:function(newSchema){this.setState({schema:newSchema})},_addValueValueCheckValidatorForTextBasedFields:function(field,fieldKey){if(!field.type||"Text"==field.type||"Number"==field.type||"TextArea"==field.type){field.validators&&0!=field.validators.length||(field.validators=[]);var msg=(field.title?field.title:fieldKey)+" - Invalid value. Special Characters not allowed";field.validators.push({type:"validValueCheck",message:msg,name:field.name?field.name:""})}return field},_modifySchemaForXSSCheck:function(schema){for(var keys=Object.keys(schema),i=0;i0){var input=arr[0],ctr=$(input).closest("div.form-group.field-name");0==ctr.find(".field-hint").length&&ctr.append('')}}}},render:function(){var props=this.props,data=props.data,vm=this.getValueManager();if("horizontal"==props.layout)return React.createElement("div",null,React.createElement("div",{className:"text-info"},props.title),React.createElement(Subschema.Form,{id:this._id,ref:"formComp",template:"IrsaReactHorizontalFormTemplate",action:props.action&&props.action.length>0?props.action:"/",method:"POST",className:props.className,value:data,schema:this.state.schema,onSubmit:this.handleSubmit,valueManager:vm}));var cls=props.className&&props.className.length>0?_CIrsaReactFormClassName+" "+props.className:_CIrsaReactFormClassName;return React.createElement("div",null,React.createElement("div",{className:"text-info"},props.title),React.createElement(Subschema.Form,{id:this._id,ref:"formComp",action:props.action&&props.action.length>0?props.action:"/",method:"POST",className:cls,value:data,schema:this.state.schema,onSubmit:this.handleSubmit,valueManager:vm}))}});module.exports={IrsaReactForm:IrsaReactForm,SubSchemaFormVMMixin:SubSchemaFormVMMixin}},function(module,exports){"use strict";var _extends=Object.assign||function(target){for(var i=1;iwindow.innerHeight/2;this.setState({visible:!0,position:{top:isTopHalf?rect.top+window.scrollY-CLOCK_SIZE-3:rect.top+trigger.clientHeight+window.scrollY+3,left:rect.left}})},hide:function(){this.setState({visible:!1})},hideOnDocumentClick:function(e){this.parentsHaveClassName(e.target,"time-picker")||this.hide()},parentsHaveClassName:function(element,className){for(var parent=element;parent;){if(parent.className&&parent.className.indexOf(className)>-1)return!0;parent=parent.parentNode}return!1},onTimeChanged:function(hour,minute,am){this.setState({hour:hour,minute:minute,am:am}),this.props.onTimeChanged.apply(window,[{hour:hour,minute:minute,am:am}])},onDone:function(){this.hide()},render:function(){return React.createElement("div",{className:"time-picker form-control"},React.createElement("input",{ref:"trigger",type:"text",readOnly:"true",value:_getTimeString(this.state.hour,this.state.minute,this.state.am),onClick:this.show}),React.createElement(Clock,{visible:this.state.visible,position:this.props.position,onTimeChanged:this.onTimeChanged,onDone:this.onDone,hour:this.state.hour,minute:this.state.minute,am:this.state.am}))}}),Clock=React.createClass({displayName:"Clock",getInitialState:function(){return{hoursVisible:!0,minutesVisible:!1,position:"below"}},componentWillReceiveProps:function(props){this.props.visible&&!props.visible&&this.setState({hoursVisible:!0,minutesVisible:!1,amPmVisible:!1})},getTime:function(){return{hour:this.props.hour,minute:this.props.minute,am:this.props.am}},onHourChanged:function(hour){this._hour=hour,this.setState({hoursVisible:!1,minutesVisible:!0})},onHoursHidden:function(){this.props.onTimeChanged(this._hour,this.props.minute,this.props.am)},onMinuteChanged:function(minute){this.props.onDone(),this._minute=minute,this.setState({minutesVisible:!1,amPmVisible:!0})},onMinutesHidden:function(){this.props.onTimeChanged(this.props.hour,this._minute,this.props.am)},onAmPmChanged:function(am){this.props.onTimeChanged(this.props.hour,this.props.minute,am)},style:function(){return{top:this.props.position.top,left:this.props.position.left}},render:function(){return React.createElement("div",{className:"clock "+(this.props.visible?"clock-show":"clock-hide"),style:this.style()},React.createElement("div",{className:"clock-face-wrapper"},React.createElement(Hours,{visible:this.state.hoursVisible,time:this.getTime(),onClick:this.onHourChanged,onHidden:this.onHoursHidden}),React.createElement(Minutes,{visible:this.state.minutesVisible,time:this.getTime(),onClick:this.onMinuteChanged,onHidden:this.onMinutesHidden})),React.createElement(AmPmInfo,{time:this.getTime(),onChange:this.onAmPmChanged}))}}),AmPmInfo=React.createClass({displayName:"AmPmInfo",render:function(){var time=this.props.time;return React.createElement("div",{className:"am-pm-info"},React.createElement("div",{className:"am"+(time.am?" selected":""),onClick:this.props.onChange.bind(null,!0)},"AM"),React.createElement("div",{className:"time"},_getTimeString(time.hour,time.minute,time.am)),React.createElement("div",{ className:"pm"+(time.am?"":" selected"),onClick:this.props.onChange.bind(null,!1)},"PM"))}}),Hours=React.createClass({displayName:"Hours",buildHours:function(){for(var hours=[],i=1;i<=12;i++)hours.push(i);return hours},render:function(){return React.createElement(Face,_extends({},this.props,{type:"hours",values:this.buildHours(),selected:this.props.time.hour}))}}),Minutes=React.createClass({displayName:"Minutes",buildMinutes:function(){for(var minutes=[],i=1;i<=12;i++)minutes.push(_pad(5*(12===i?0:i)));return minutes},render:function(){return React.createElement(Face,_extends({},this.props,{type:"minutes",values:this.buildMinutes(),selected:this.props.time.minute}))}}),Face=React.createClass({displayName:"Face",componentDidMount:function(){this.refs.face.addEventListener("transitionend",this.onTransitionEnd)},componentWillUnmount:function(){this.refs.face.removeEventListener("transitionend",this.onTransitionEnd)},onTransitionEnd:function(e){"opacity"===e.propertyName&&e.target.className.indexOf("face-hide")>-1&&this.props.onHidden()},render:function(){return React.createElement("div",{ref:"face",className:"face "+this.props.type+(this.props.visible?" face-show":" face-hide")},this.props.values.map(function(value,i){return React.createElement("div",{key:i,className:"position position-"+(i+1)+(parseInt(this.props.selected)===parseInt(value)?" selected":""),onClick:this.props.onClick.bind(null,value)},_pad(value))}.bind(this)),React.createElement(LongHand,{type:this.props.type,selected:this.props.selected}),React.createElement("div",{className:"inner-face"}),React.createElement(Ticks,null))}}),LongHand=React.createClass({displayName:"LongHand",render:function(){var deg=this.props.selected/("hours"===this.props.type?12:60)*360;return React.createElement("div",null,React.createElement("div",{className:"long-hand",style:{transform:"rotate("+deg+"deg) scale(1, 0.8)",WebkitTransform:"rotate("+deg+"deg) scale(1, 0.8)"}}),React.createElement("div",{className:"long-hand-attachment"}))}}),Ticks=React.createClass({displayName:"Ticks",buildTick:function(index){return React.createElement("div",{key:index,className:"tick "+(index%5===0?"big ":""),style:{transform:"rotate("+6*index+"deg)",WebkitTransform:"rotate("+6*index+"deg)"}},React.createElement("div",null))},render:function(){for(var ticks=[],i=0;i<60;i++)ticks.push(this.buildTick(i));return React.createElement("div",{className:"ticks"},ticks)}});module.exports=TimePicker},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _reactReduxNoreact=__webpack_require__(471),_notificationApp=__webpack_require__(497),_notificationApp2=_interopRequireDefault(_notificationApp),_configureStore=__webpack_require__(502),_configureStore2=_interopRequireDefault(_configureStore),_notifications=__webpack_require__(498),_AppConstants=__webpack_require__(14),_AppConstants2=_interopRequireDefault(_AppConstants),_Storage=window.localStorage,notificationsStore=null,getNotificationsStorageKeyForUser=function(userId){return _AppConstants2.default.STORAGE_KEY_NAME+"_"+userId.toString()},getStateFromStorage=function(userId){var items=[];if("undefined"!=typeof _Storage){var strItems=_Storage.getItem(getNotificationsStorageKeyForUser(userId));try{strItems&&strItems.length>0&&(items=JSON.parse(strItems))}catch(e){}}return items},saveStateToStorage=function(items,userId){"undefined"!=typeof _Storage&&_Storage.setItem(getNotificationsStorageKeyForUser(userId),JSON.stringify(items))},getItemsFromState=function(){return notificationsStore.getState().notifications.items},markAsDiscardedExpiredNotificationsForUser=function(ids){window.makeAjaxRequest({params:{ids:ids.toString()},type:"POST",async:!1,url:"/Notification/MarkAsDiscardedExpiredNotificationsForUser",cache:!1,onComplete:function(resp){var json=JSON.parse(resp.responseText);json.sessionExpired===!0},onError:function(){console.log("Some unknown error occurred while deleting persistent notifications from Server")}})},initializeStore=function(userId){var storageItems=getStateFromStorage(userId),expiredServerItemIds=[],validItems=storageItems.filter(function(m){var dtCreation=new Date(m.time);return!(dtCreation.clone().addDays(_AppConstants2.default.NOTIFICATION_EXPIRES_AFTER_DAYS).compareTo(new Date)<=0)||(m.tagId>0&&expiredServerItemIds.push(m.tagId),!1)});expiredServerItemIds.length>0&&markAsDiscardedExpiredNotificationsForUser(expiredServerItemIds);var initialState={notifications:{isFetching:!1,removingItems:!1,items:validItems,activePage:1,userId:userId}};notificationsStore=(0,_configureStore2.default)(initialState),notificationsStore.subscribe(function(){var currentItems=getItemsFromState();saveStateToStorage(currentItems,userId)}),window.notiifcationsStore=notificationsStore,notificationsStore.dispatch((0,_notifications.fetchServerNotificationsIfAllowed)(getItemsFromState(),userId))},renderNotifications=function(userId,items,container){null==notificationsStore&&initializeStore(userId),items.length>0&¬ificationsStore.dispatch((0,_notifications.addNotifications)(items,userId)),ReactDOM.render(React.createElement(_reactReduxNoreact.Provider,{store:notificationsStore},React.createElement(_notificationApp2.default,{userId:userId})),container)},__userId=0,__buttonContainer=null;module.exports={initializeNotifications:function(userId,buttonContainer){return userId<=0||!buttonContainer?void console.error("initializeNotifications: Missing or invalid parameters."):(__userId=userId,__buttonContainer=buttonContainer,void renderNotifications(__userId,[],__buttonContainer))},addNotification:function(item){if(!(__userId<=0)){var items=[item];renderNotifications(__userId,items,__buttonContainer)}},addNotificationRange:function(items){__userId<=0||renderNotifications(__userId,items,__buttonContainer)}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.__esModule=!0,exports.connect=exports.Provider=void 0;var _Provider=__webpack_require__(472),_Provider2=_interopRequireDefault(_Provider),_connect=__webpack_require__(474),_connect2=_interopRequireDefault(_connect);exports.Provider=_Provider2.default,exports.connect=_connect2.default},function(module,exports,__webpack_require__){"use strict";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 _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}exports.__esModule=!0,exports.default=void 0;var _storeShape=__webpack_require__(473),_storeShape2=_interopRequireDefault(_storeShape),Component=React.Component,PropTypes=React.PropTypes,Children=React.Children,Provider=function(_Component){function Provider(props,context){_classCallCheck(this,Provider);var _this=_possibleConstructorReturn(this,_Component.call(this,props,context));return _this.store=props.store,_this}return _inherits(Provider,_Component),Provider.prototype.getChildContext=function(){return{store:this.store}},Provider.prototype.render=function(){var children=this.props.children;return Children.only(children)},Provider}(Component);exports.default=Provider,Provider.propTypes={store:_storeShape2.default.isRequired,children:PropTypes.element.isRequired},Provider.childContextTypes={store:_storeShape2.default.isRequired}},function(module,exports){"use strict";exports.__esModule=!0;var PropTypes=React.PropTypes;exports.default=PropTypes.shape({subscribe:PropTypes.func.isRequired,dispatch:PropTypes.func.isRequired,getState:PropTypes.func.isRequired})},function(module,exports,__webpack_require__){"use strict";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 _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function getDisplayName(WrappedComponent){return WrappedComponent.displayName||WrappedComponent.name||"Component"}function checkStateShape(stateProps,dispatch){return(0,_invariant2.default)((0,_isPlainObject2.default)(stateProps),"`%sToProps` must return an object. Instead received %s.",dispatch?"mapDispatch":"mapState",stateProps),stateProps}function connect(mapStateToProps,mapDispatchToProps,mergeProps){function computeMergedProps(stateProps,dispatchProps,parentProps){var mergedProps=finalMergeProps(stateProps,dispatchProps,parentProps);return(0,_invariant2.default)((0,_isPlainObject2.default)(mergedProps),"`mergeProps` must return an object. Instead received %s.",mergedProps),mergedProps}var options=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],shouldSubscribe=Boolean(mapStateToProps),mapState=mapStateToProps||defaultMapStateToProps,mapDispatch=(0,_isPlainObject2.default)(mapDispatchToProps)?(0,_wrapActionCreators2.default)(mapDispatchToProps):mapDispatchToProps||defaultMapDispatchToProps,finalMergeProps=mergeProps||defaultMergeProps,checkMergedEquals=finalMergeProps!==defaultMergeProps,_options$pure=options.pure,pure=void 0===_options$pure||_options$pure,_options$withRef=options.withRef,withRef=void 0!==_options$withRef&&_options$withRef,version=nextVersion++;return function(WrappedComponent){var Connect=function(_Component){function Connect(props,context){_classCallCheck(this,Connect);var _this=_possibleConstructorReturn(this,_Component.call(this,props,context));_this.version=version,_this.store=props.store||context.store,(0,_invariant2.default)(_this.store,'Could not find "store" in either the context or '+('props of "'+_this.constructor.displayName+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+_this.constructor.displayName+'".'));var storeState=_this.store.getState();return _this.state={storeState:storeState},_this.clearCache(),_this}return _inherits(Connect,_Component),Connect.prototype.shouldComponentUpdate=function(){return!pure||this.haveOwnPropsChanged||this.hasStoreStateChanged},Connect.prototype.computeStateProps=function(store,props){if(!this.finalMapStateToProps)return this.configureFinalMapState(store,props);var state=store.getState(),stateProps=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(state,props):this.finalMapStateToProps(state);return checkStateShape(stateProps)},Connect.prototype.configureFinalMapState=function(store,props){var mappedState=mapState(store.getState(),props),isFactory="function"==typeof mappedState;return this.finalMapStateToProps=isFactory?mappedState:mapState,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,isFactory?this.computeStateProps(store,props):checkStateShape(mappedState)},Connect.prototype.computeDispatchProps=function(store,props){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(store,props);var dispatch=store.dispatch,dispatchProps=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(dispatch,props):this.finalMapDispatchToProps(dispatch);return checkStateShape(dispatchProps,!0)},Connect.prototype.configureFinalMapDispatch=function(store,props){var mappedDispatch=mapDispatch(store.dispatch,props),isFactory="function"==typeof mappedDispatch;return this.finalMapDispatchToProps=isFactory?mappedDispatch:mapDispatch,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,isFactory?this.computeDispatchProps(store,props):checkStateShape(mappedDispatch,!0)},Connect.prototype.updateStatePropsIfNeeded=function(){var nextStateProps=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,_shallowEqual2.default)(nextStateProps,this.stateProps))&&(this.stateProps=nextStateProps,!0)},Connect.prototype.updateDispatchPropsIfNeeded=function(){var nextDispatchProps=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,_shallowEqual2.default)(nextDispatchProps,this.dispatchProps))&&(this.dispatchProps=nextDispatchProps,!0)},Connect.prototype.updateMergedPropsIfNeeded=function(){var nextMergedProps=computeMergedProps(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&checkMergedEquals&&(0,_shallowEqual2.default)(nextMergedProps,this.mergedProps))&&(this.mergedProps=nextMergedProps,!0)},Connect.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},Connect.prototype.trySubscribe=function(){shouldSubscribe&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},Connect.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},Connect.prototype.componentDidMount=function(){this.trySubscribe()},Connect.prototype.componentWillReceiveProps=function(nextProps){pure&&(0,_shallowEqual2.default)(nextProps,this.props)||(this.haveOwnPropsChanged=!0)},Connect.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},Connect.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},Connect.prototype.handleChange=function(){if(this.unsubscribe){var prevStoreState=this.state.storeState,storeState=this.store.getState();pure&&prevStoreState===storeState||(this.hasStoreStateChanged=!0,this.setState({storeState:storeState}))}},Connect.prototype.getWrappedInstance=function(){return(0,_invariant2.default)(withRef,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},Connect.prototype.render=function(){var haveOwnPropsChanged=this.haveOwnPropsChanged,hasStoreStateChanged=this.hasStoreStateChanged,renderedElement=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var shouldUpdateStateProps=!0,shouldUpdateDispatchProps=!0;pure&&renderedElement&&(shouldUpdateStateProps=hasStoreStateChanged||haveOwnPropsChanged&&this.doStatePropsDependOnOwnProps,shouldUpdateDispatchProps=haveOwnPropsChanged&&this.doDispatchPropsDependOnOwnProps);var haveStatePropsChanged=!1,haveDispatchPropsChanged=!1;shouldUpdateStateProps&&(haveStatePropsChanged=this.updateStatePropsIfNeeded()),shouldUpdateDispatchProps&&(haveDispatchPropsChanged=this.updateDispatchPropsIfNeeded());var haveMergedPropsChanged=!0;return haveMergedPropsChanged=!!(haveStatePropsChanged||haveDispatchPropsChanged||haveOwnPropsChanged)&&this.updateMergedPropsIfNeeded(),!haveMergedPropsChanged&&renderedElement?renderedElement:(withRef?this.renderedElement=createElement(WrappedComponent,_extends({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=createElement(WrappedComponent,this.mergedProps),this.renderedElement)},Connect}(Component);return Connect.displayName="Connect("+getDisplayName(WrappedComponent)+")",Connect.WrappedComponent=WrappedComponent,Connect.contextTypes={store:_storeShape2.default},Connect.propTypes={store:_storeShape2.default},(0,_hoistNonReactStatics2.default)(Connect,WrappedComponent)}}exports.__esModule=!0;var _extends=Object.assign||function(target){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{},action=arguments[1];if(shapeAssertionError)throw shapeAssertionError;for(var hasChanged=!1,nextState={},_i=0;_i0&&tagIds.push(item.tagId)}),tagIds}),onUpdatedNotificationAsViewed=function(id){return{type:_AppConstants2.default.UPDATED_NOTIFICATION_AS_VIEWED,tagId:id}},updateViewedMsgStatusOnServer=function(resolve,reject,tagId){try{window.makeAjaxRequest({params:{id:tagId},type:"POST",url:"/Notification/MarkNotificationAsViewed",cache:!1,doNotShow403Error:!0,onComplete:function(resp){var json=JSON.parse(resp.responseText);return json.sessionExpired===!0?void reject(json.msg):void(1==json.success?resolve(tagId):reject(String.format("Error occurred while marking notification as viewed. {0}",json.msg)))},onError:function(e){var msg="Error occurred while marking notification as viewed. ";reject(e.status?String.format("{0}Status: {1}, StatusText: {2}",msg,e.status,e.statusText):msg)}})}catch(e){reject("Error occurred while marking notification as viewed. ",e.toString())}},getNotificationsForUser=function(resolve,reject,items){try{items=items?items:[];var currentTagIds=extractNotificationsTagIds(items);window.makeAjaxRequest({params:{existingIds:currentTagIds&¤tTagIds.length>0?currentTagIds.toString():""},type:"POST",url:"/Notification/GetNotificationsForUser",cache:!1,doNotShow403Error:!0,onComplete:function(resp){var json=JSON.parse(resp.responseText);return json.sessionExpired===!0?void reject(json.msg):void resolve({items:json.items,hasNotViewedMsgs:json.hasNotViewedMsgs})},onError:function(e){var msg="Some unknown error occurred while fetching persistent notifications from Server. ";reject(e.status?String.format("lRes(0status1Statustext2)",msg,e.status,e.statusText):msg)}})}catch(e){throw new Error(String.format("Error occurred while fetching persistent notifications from Server. {0}",e.toString()))}},removeNotificationsFromServer=function(resolve,reject,tagIds){try{window.makeAjaxRequest({params:{ids:tagIds.toString()},type:"POST",url:"/Notification/DiscardNotifications",doNotShow403Error:!0,cache:!1,onComplete:function(resp){var json=JSON.parse(resp.responseText);return json.sessionExpired===!0?void reject(json.msg):void(1==json.success?resolve():reject(json.msg))},onError:function(e){var msg="Some unknown error occurred while deleting persistent notifications from Server. ";reject(e.status?String.format("lRes(0status1Statustext2)",msg,e.status,e.statusText):msg)}})}catch(e){reject("Error occurred while deleting persistent notifications from Server. ",e.toString())}},removingNotifications=function(){return{type:_AppConstants2.default.REMOVING_NOTIFICATIONS}},removeNotificationFromState=function(id){return{type:_AppConstants2.default.REMOVE_NOTIFICATION,id:id}},removeAllNotificationFromState=function(){return{type:_AppConstants2.default.REMOVE_ALL_NOTIFICATIONS}},removeNotifications=function(items,removeAll){return function(dispatch){if(dispatch(removingNotifications()),removeAll!==!0){var item=items[0];if(item.tagId>0)return new Promise(function(resolve,reject){removeNotificationsFromServer(resolve,reject,[item.tagId])}).then(function(){return dispatch(removeNotificationFromState(item.id))});dispatch(removeNotificationFromState(item.id))}else{var tagIds=extractNotificationsTagIds(items);if(tagIds.length>0)return new Promise(function(resolve,reject){removeNotificationsFromServer(resolve,reject,tagIds)}).then(function(){return dispatch(removeAllNotificationFromState())});dispatch(removeAllNotificationFromState())}}};exports.removeNotification=function(item){return function(dispatch,getState){return dispatch(removeNotifications([item],!1))}},exports.removeAllNotifications=function(){return function(dispatch,getState){var items=getState().notifications.items;return dispatch(removeNotifications(items,!0))}},exports.changePage=function(activePage){return{type:_AppConstants2.default.CHANGE_PAGE,activePage:activePage}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i0?props.activePage:1,totalButtons=this.calculateTotalPagesCount(props.items.length),sortedItems=Util.orderByDescendingDate(props.items,"time",!0),hasNotViewedMsgs=!1;sortedItems.map(function(m){m.tagId>0&&1!=m.viewed&&(hasNotViewedMsgs=!0)});var slicedItems=this.sliceItemsForPage(sortedItems,activePage),notificationList=[];slicedItems.forEach(function(item,index){var msg=item.message;msg&&msg.length>_AppConstants2.default.NOTIFICATION_MESSAGE_MAX_LENGTH&&(msg=msg.substring(0,_AppConstants2.default.NOTIFICATION_MESSAGE_MAX_LENGTH));var itemUI=React.createElement(_Notification2.default,{key:item.id,item:item,containmentClassName:"notification-window",onChangeVisibility:props.onNotificationVisibility,onRemove:function(){return props.onRemove(item)}});notificationList.push(itemUI)});var pagerUI="";totalButtons>1&&(pagerUI=React.createElement(Pager,{totalButtons:totalButtons,activePage:activePage,maxButtonsToShow:_AppConstants2.default.PAGER_MAX_BUTTONS_TO_SHOW,handlePageChanged:props.handlePageChanged}));var progressUI="";1==inProgress&&(progressUI=React.createElement("span",{className:"sync-message"},"Synching..."));var buttonClassName="icon-th-list";return hasNotViewedMsgs===!0&&(buttonClassName="icon-bell-alt"),buttonClassName+=" notifications-trigger",React.createElement("div",{className:"irsaReactNotifications-trigger-wrapper"},React.createElement(Button,{ref:"target",className:buttonClassName,onClick:this._onTriggerButtonPress,onDoubleClick:function(e){return e.preventDefault()}}),React.createElement(Overlay,{rootClose:rootClose,show:this.state.show,onHide:function(){return setTimeout(function(){return _this2.setState({show:!1})},100)},placement:"bottom",container:overlayContainer,target:function(){return ReactDOM.findDOMNode(_this2.refs.target)}},React.createElement("div",{className:"notification-window "},React.createElement("div",{className:"notification-window-header"},React.createElement("h3",{className:"main-title"},"Notifications"),progressUI,React.createElement("a",{href:"#",className:"refresh-notifications",onClick:function(){return props.onRefresh()}},React.createElement("i",{className:"fa fa-refresh",style:{color:"#FFFFFF"}})),React.createElement("a",{href:"#",className:"clear-all",onClick:function(){return props.onRemoveAll()}},"Clear All"),pagerUI,React.createElement("hr",{className:"hr-main"})),React.createElement("table",{className:"table borderless"},React.createElement("tbody",null,notificationList)))))}});exports.default=Notifications},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _AppConstants=__webpack_require__(14),_AppConstants2=_interopRequireDefault(_AppConstants),_reactVisibilitySensor=__webpack_require__(501),_reactVisibilitySensor2=_interopRequireDefault(_reactVisibilitySensor),Util=__webpack_require__(26).Util,NotificationRemoveLink=function(_ref){var item=_ref.item,onRemove=_ref.onRemove;return React.createElement("a",{href:"#",title:"Remove",onClick:function(){return onRemove(item)}},React.createElement("i",{className:"icon-remove-sign"}))};NotificationRemoveLink.propTypes={item:React.PropTypes.object.isRequired,onRemove:React.PropTypes.func.isRequired};var Notification=React.createClass({displayName:"Notification",propTypes:{item:React.PropTypes.shape({id:React.PropTypes.string.isRequired,category:React.PropTypes.string,message:React.PropTypes.string.isRequired,isHTML:React.PropTypes.bool,type:React.PropTypes.oneOf(_AppConstants2.default.NOTIFICATION_TYPES).isRequired,time:React.PropTypes.number.isRequired,tagId:React.PropTypes.number,viewed:React.PropTypes.bool}).isRequired,onRemove:React.PropTypes.func.isRequired,containmentClassName:React.PropTypes.string.isRequired,onChangeVisibility:React.PropTypes.func.isRequired},onChangeVisibility:function(isVisible){var _props$item=this.props.item,tagId=_props$item.tagId,viewed=_props$item.viewed;1==isVisible&&tagId>0&&1!=viewed&&this.props.onChangeVisibility(tagId)},render:function(){var props=this.props,item=props.item,category=item.category,message=item.message,isHTML=item.isHTML,type=(item.time,item.type),tagId=item.tagId,viewed=item.viewed,msgContainerClassName="col-sm-8 category-and-message";tagId&&tagId>0&&(msgContainerClassName+=" server-msg",msgContainerClassName+=1==viewed?" viewed":" unviewed");var iconType="info icon-info-sign";"SUCCESS"==type?iconType="success icon-ok-circle":"ERROR"==type?iconType="error icon-exclamation-sign":"INFO"==type?iconType="info icon-info-sign":"WARNING"==type&&(iconType="warning icon-warning-sign");var cat="";category&&category.length>0&&(cat=React.createElement("div",{className:"notification-category"},category));var dtMsgTime=new Date(item.time),formattedTime="";formattedTime=0==new Date(Date.now()).clearTime().compareTo(dtMsgTime.clone().clearTime())?Util.formatDate(dtMsgTime,"hh:mm:ss tt"):Util.formatDate(dtMsgTime,"MMM dd, hh:mm:ss tt");var msgUI=void 0;return msgUI=isHTML!==!0?React.createElement("p",null,message):React.createElement("p",{className:"message-is-html",dangerouslySetInnerHTML:{__html:message}}),React.createElement("tr",null,React.createElement("td",{className:"col-sm-1 cell-notification-type"},React.createElement("span",{className:"notification-type"},React.createElement("i",{className:iconType}))),React.createElement("td",{"data-tag-id":tagId,className:msgContainerClassName},React.createElement(_reactVisibilitySensor2.default,{onChange:this.onChangeVisibility},React.createElement("div",null,cat,React.createElement("div",{className:"notification-message"},msgUI)))),React.createElement("td",{className:"notification-time"},React.createElement("span",{className:"formatted-time"},formattedTime)),React.createElement("td",{className:"remove-icon"},React.createElement(NotificationRemoveLink,{item:item,onRemove:props.onRemove})))}});exports.default=Notification},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var containmentPropType=React.PropTypes.any;"undefined"!=typeof window&&(containmentPropType=React.PropTypes.instanceOf(Element));var VisibilitySensor=React.createClass({displayName:"VisibilitySensor",propTypes:{onChange:React.PropTypes.func.isRequired,active:React.PropTypes.bool,partialVisibility:React.PropTypes.bool,delay:React.PropTypes.number,containment:containmentPropType,children:React.PropTypes.element},getDefaultProps:function(){return{active:!0,partialVisibility:!1,delay:1e3,containment:null,children:React.createElement("span")}},getInitialState:function(){return{isVisible:null,visibilityRect:{}}},componentDidMount:function(){this.props.active&&this.startWatching()},componentWillUnmount:function(){this.stopWatching()},componentWillReceiveProps:function(nextProps){nextProps.active?(this.setState(this.getInitialState()),this.startWatching()):this.stopWatching()},startWatching:function(){this.interval||(this.interval=setInterval(this.check,this.props.delay),this.check())},stopWatching:function(){this.interval=clearInterval(this.interval)},check:function(){var containmentRect,el=ReactDOM.findDOMNode(this),rect=el.getBoundingClientRect();containmentRect=this.props.containment?this.props.containment.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var visibilityRect={top:rect.top>=containmentRect.top,left:rect.left>=containmentRect.left,bottom:rect.bottom<=containmentRect.bottom,right:rect.right<=containmentRect.right},fullVisible=visibilityRect.top&&visibilityRect.left&&visibilityRect.bottom&&visibilityRect.right,partialVertical=rect.top>=containmentRect.top&&rect.top<=containmentRect.bottom||rect.bottom>=containmentRect.top&&rect.bottom<=containmentRect.bottom,partialHorizontal=rect.left>=containmentRect.left&&rect.left<=containmentRect.right||rect.right>=containmentRect.left&&rect.right<=containmentRect.right,partialVisible=partialVertical&&partialHorizontal,isVisible=this.props.partialVisibility?partialVisible:fullVisible;return this.state.isVisible!==isVisible&&(this.setState({isVisible:isVisible,visibilityRect:visibilityRect}),this.props.onChange(isVisible,visibilityRect)),this.state},render:function(){return React.Children.only(this.props.children)}});exports.default=VisibilitySensor},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function configureStore(initialState){var middleWare=(0,_redux.applyMiddleware)(_reduxThunk2.default),store=(0,_redux.createStore)(_notifications2.default,initialState,middleWare);return store}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=configureStore;var _redux=__webpack_require__(477),_reduxThunk=__webpack_require__(503),_reduxThunk2=_interopRequireDefault(_reduxThunk),_reduxLogger=__webpack_require__(504),_notifications=(_interopRequireDefault(_reduxLogger),__webpack_require__(510)),_notifications2=_interopRequireDefault(_notifications)},function(module,exports){"use strict";function thunkMiddleware(_ref){var dispatch=_ref.dispatch,getState=_ref.getState;return function(next){return function(action){return"function"==typeof action?action(dispatch,getState):next(action)}}}module.exports=thunkMiddleware},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function createLogger(){var options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},loggerOptions=_extends({},_defaults2.default,options),logger=loggerOptions.logger,transformer=loggerOptions.transformer,stateTransformer=loggerOptions.stateTransformer,errorTransformer=loggerOptions.errorTransformer,predicate=loggerOptions.predicate,logErrors=loggerOptions.logErrors,diffPredicate=loggerOptions.diffPredicate;if("undefined"==typeof logger)return function(){return function(next){return function(action){return next(action)}}};if(transformer&&console.error("Option 'transformer' is deprecated, use 'stateTransformer' instead!"),options.getState&&options.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n\n\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\n\nconst logger = createLogger({\n // ...options\n});\n\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(next){return function(action){return next(action)}}};var logBuffer=[];return function(_ref){var getState=_ref.getState;return function(next){return function(action){if("function"==typeof predicate&&!predicate(getState,action))return next(action);var logEntry={};logBuffer.push(logEntry),logEntry.started=_helpers.timer.now(),logEntry.startedTime=new Date,logEntry.prevState=stateTransformer(getState()),logEntry.action=action;var returnedValue=void 0;if(logErrors)try{returnedValue=next(action)}catch(e){logEntry.error=errorTransformer(e)}else returnedValue=next(action);logEntry.took=_helpers.timer.now()-logEntry.started,logEntry.nextState=stateTransformer(getState());var diff=loggerOptions.diff&&"function"==typeof diffPredicate?diffPredicate(getState,action):loggerOptions.diff;if((0,_core.printBuffer)(logBuffer,_extends({},loggerOptions,{diff:diff})),logBuffer.length=0,logEntry.error)throw logEntry.error;return returnedValue}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.logger=exports.defaults=void 0;var _extends=Object.assign||function(target){for(var i=1;i=rhs.length?changes(new DiffArray(currentPath,i,new DiffDeleted(undefined,lhs[i]))):deepDiff(lhs[i],rhs[i],changes,prefilter,currentPath,i,stack);for(;i=0?(deepDiff(lhs[k],rhs[k],changes,prefilter,currentPath,k,stack),pkeys=arrayRemove(pkeys,other)):deepDiff(lhs[k],undefined,changes,prefilter,currentPath,k,stack)}),pkeys.forEach(function(k){deepDiff(undefined,rhs[k],changes,prefilter,currentPath,k,stack)})}stack.length=stack.length-1}}else lhs!==rhs&&("number"===ltype&&isNaN(lhs)&&isNaN(rhs)||changes(new DiffEdit(currentPath,lhs,rhs)))}function accumulateDiff(lhs,rhs,prefilter,accum){return accum=accum||[],deepDiff(lhs,rhs,function(diff){diff&&accum.push(diff)},prefilter),accum.length?accum:undefined}function applyArrayChange(arr,index,change){if(change.path&&change.path.length){var i,it=arr[index],u=change.path.length-1;for(i=0;i0?item.id:Util.generateUUID();newItems.push((0,_objectAssign2.default)({},item,{id:id}))})}catch(e){console.log(e)}return newItems;default:return state.items}},serverNotifications=function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isFetching:!1,removingItems:!1,activePage:1,items:[],userId:0},action=arguments[1];switch(action.type){case _AppConstants2.default.RECEIVE_SERVER_NOTIFICATIONS:return(0,_objectAssign2.default)({},state,{isFetching:!1,removingItems:!1,activePage:1,items:validateNotificationsAndAssignId(state,action),lastUpdated:action.receivedAt,userId:action.userId});default:return state}},notifications=function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isFetching:!1,removingItems:!1,activePage:1,items:[],userId:0},action=arguments[1];switch(action.type){case _AppConstants2.default.ADD_NOTIFICATIONS:var newState=[].concat(_toConsumableArray(state.items),_toConsumableArray(validateNotificationsAndAssignId(state,action)));return{isFetching:!1,removingItems:!1,activePage:1,items:newState,userId:action.userId};case _AppConstants2.default.REMOVING_NOTIFICATIONS:return{isFetching:!1,removingItems:!0,activePage:state.activePage,items:state.items,userId:state.userId};case _AppConstants2.default.REMOVE_NOTIFICATION:var afterRemovalState=state.items.filter(function(n){return n.id!=action.id});return{isFetching:!1,removingItems:!1,activePage:state.activePage,items:afterRemovalState,userId:state.userId};case _AppConstants2.default.REMOVE_ALL_NOTIFICATIONS:return{isFetching:!1,removingItems:!1,activePage:1,items:[],userId:state.userId};case _AppConstants2.default.UPDATED_NOTIFICATION_AS_VIEWED:var itemsAfterViewedUpdate=[];return state.items.forEach(function(item){if(item.tagId>0&&item.tagId==action.tagId){var updatedItem=(0,_objectAssign2.default)({},item,{viewed:!0});itemsAfterViewedUpdate.push(updatedItem)}else itemsAfterViewedUpdate.push(item)}),{isFetching:state.isFetching,removingItems:state.removingItems,activePage:state.activePage,items:itemsAfterViewedUpdate,userId:state.userId};case _AppConstants2.default.REQUEST_SERVER_NOTIFICATIONS:return{isFetching:!0,removingItems:!1,activePage:state.activePage,items:state.items,userId:action.userId};case _AppConstants2.default.RECEIVE_SERVER_NOTIFICATIONS:var obj=serverNotifications(state,action),items=[].concat(_toConsumableArray(obj.items),_toConsumableArray(state.items));return(0,_objectAssign2.default)({},state,{items:items,isFetching:obj.isFetching,removingItems:!1,activePage:state.activePage,lastUpdated:obj.lastUpdated,userId:action.userId});case _AppConstants2.default.CHANGE_PAGE:return{isFetching:!1,removingItems:!1,activePage:action.activePage,items:state.items,userId:state.userId};default:return state}},rootReducer=(0,_redux.combineReducers)({notifications:notifications});exports.default=rootReducer},function(module,exports,__webpack_require__){module.exports=__webpack_require__(512)},function(module,exports,__webpack_require__){!function(){function _extend(origin,add){if(!add||"object"!=typeof add)return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}function _merge(){var ret={},args=Array.prototype.slice.call(arguments),keys=null,i=null;return args.forEach(function(arg){if(arg&&arg.constructor===Object)for(keys=Object.keys(arg),i=keys.length;i--;)ret[keys[i]]=arg[keys[i]]}),ret}function Customisable(){this.custom={},this.extend=function(custom){return _extend(this.custom,custom)},this.reset=function(){this.custom={}},this.remove=function(fields){_typeIs.array(fields)||(fields=[fields]),fields.forEach(function(field){delete this.custom[field]},this)}}function Inspection(schema,custom){var _stack=["@"];if(this._schema=schema,this._custom={},null!=custom)for(var key in custom)custom.hasOwnProperty(key)&&(this._custom["$"+key]=custom[key]);this._getDepth=function(){return _stack.length},this._dumpStack=function(){return _stack.map(function(i){return i.replace(/^\[/g,"")}).join(".").replace(/\.\033\034\035\036/g,"[")},this._deeperObject=function(name){return _stack.push(/^[a-z$_][a-z0-9$_]*$/i.test(name)?name:'["'+name+'"]'),this},this._deeperArray=function(i){return _stack.push("["+i+"]"),this},this._back=function(){return _stack.pop(),this}}function _simpleType(type,candidate){return"function"==typeof type?candidate instanceof type:(type=type in _typeIs?type:"any",_typeIs[type](candidate))}function _realType(candidate){for(var i in _typeIs)if(_simpleType(i,candidate))return"any"!==i?i:"an instance of "+candidate.constructor.name}function getIndexes(a,value){for(var indexes=[],i=a.indexOf(value);i!==-1;)indexes.push(i),i=a.indexOf(value,i+1);return indexes}function Validation(schema,custom){Inspection.prototype.constructor.call(this,schema,_merge(Validation.custom,custom));var _error=[];this._basicFields=Object.keys(_validationAttribut),this._customFields=Object.keys(this._custom),this.origin=null,this.report=function(message,code){var newErr={code:code||this.userCode||null,message:this.userError||message||"is invalid",property:this.userAlias?this.userAlias+" ("+this._dumpStack()+")":this._dumpStack()};return _error.push(newErr),this},this.result=function(){return{error:_error,valid:0===_error.length,format:function(){return this.valid===!0?"Candidate is valid":this.error.map(function(i){return"Property "+i.property+": "+i.message}).join("\n")}}}}function Sanitization(schema,custom){Inspection.prototype.constructor.call(this,schema,_merge(Sanitization.custom,custom));var _reporting=[];this._basicFields=Object.keys(_sanitizationAttribut),this._customFields=Object.keys(this._custom),this.origin=null,this.report=function(message){var newNot={message:message||"was sanitized",property:this.userAlias?this.userAlias+" ("+this._dumpStack()+")":this._dumpStack()};_reporting.some(function(e){return e.property===newNot.property})||_reporting.push(newNot)},this.result=function(data){return{data:data,reporting:_reporting,format:function(){return this.reporting.map(function(i){return"Property "+i.property+" "+i.message}).join("\n")}}}}function _getLimits(schema){var min=INT_MIN,max=INT_MAX;return null!=schema.gte?min=schema.gte:null!=schema.gt&&(min=schema.gt+1),null!=schema.lte?max=schema.lte:null!=schema.lt&&(max=schema.lt-1),{min:min,max:max}}function CandidateGenerator(){}var root={};if(root.async=__webpack_require__(513),"object"!=typeof root.async)throw new Error("Module async is required (https://github.com/caolan/async)");var async=root.async,_typeIs={function:function(element){return"function"==typeof element},string:function(element){return"string"==typeof element},number:function(element){return"number"==typeof element&&!isNaN(element)},integer:function(element){return"number"==typeof element&&element%1===0},NaN:function(element){return"number"==typeof element&&isNaN(element)},boolean:function(element){return"boolean"==typeof element},null:function(element){return null===element},date:function(element){return null!=element&&element instanceof Date},object:function(element){return null!=element&&element.constructor===Object},array:function(element){return null!=element&&element.constructor===Array},any:function(element){return!0}},_formats={void:/^$/,url:/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)?(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,"date-time":/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z?|(-|\+)\d{2}:\d{2})$/,date:/^\d{4}-\d{2}-\d{2}$/,coolDateTime:/^\d{4}(-|\/)\d{2}(-|\/)\d{2}(T| )\d{2}:\d{2}:\d{2}(\.\d{3})?Z?$/,time:/^\d{2}\:\d{2}\:\d{2}$/,color:/^#([0-9a-f])+$/i,email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,numeric:/^[0-9]+$/,integer:/^\-?[0-9]+$/,decimal:/^\-?[0-9]*\.?[0-9]+$/,alpha:/^[a-z]+$/i,alphaNumeric:/^[a-z0-9]+$/i,alphaDash:/^[a-z0-9_-]+$/i,javascript:/^[a-z_\$][a-z0-9_\$]*$/i,upperString:/^[A-Z ]*$/,lowerString:/^[a-z ]*$/},_validationAttribut={optional:function(schema,candidate){var opt="boolean"==typeof schema.optional?schema.optional:"true"===schema.optional;opt!==!0&&"undefined"==typeof candidate&&this.report("is missing and not optional")},type:function(schema,candidate){if("undefined"!=typeof candidate&&("string"==typeof schema.type||schema.type instanceof Array||"function"==typeof schema.type)){var types=_typeIs.array(schema.type)?schema.type:[schema.type],typeIsValid=types.some(function(type){return _simpleType(type,candidate)});typeIsValid||(types=types.map(function(t){return"function"==typeof t?"and instance of "+t.name:t}),this.report("must be "+types.join(" or ")+", but is "+_realType(candidate)))}},uniqueness:function(schema,candidate){if("string"==typeof schema.uniqueness&&(schema.uniqueness="true"===schema.uniqueness),"boolean"==typeof schema.uniqueness&&schema.uniqueness!==!1&&(_typeIs.array(candidate)||"string"==typeof candidate))for(var reported=[],i=0;i=0)){var indexes=getIndexes(candidate,candidate[i]);indexes.length>1&&(reported.push(candidate[i]),this.report("has value ["+candidate[i]+"] more than once at indexes ["+indexes.join(", ")+"]"))}},pattern:function(schema,candidate){var self=this,regexs=schema.pattern;if("string"==typeof candidate){var matches=!1;_typeIs.array(regexs)||(regexs=[regexs]),regexs.forEach(function(regex){"string"==typeof regex&®ex in _formats&&(regex=_formats[regex]),regex instanceof RegExp&®ex.test(candidate)&&(matches=!0)}),matches||self.report("must match ["+regexs.join(" or ")+'], but is equal to "'+candidate+'"')}},validDate:function(schema,candidate){"true"===String(schema.validDate)&&candidate instanceof Date&&isNaN(candidate.getTime())&&this.report("must be a valid date")},minLength:function(schema,candidate){if("string"==typeof candidate||_typeIs.array(candidate)){var minLength=Number(schema.minLength);isNaN(minLength)||candidate.lengthmaxLength&&this.report("must be shorter than "+maxLength+" elements, but it has "+candidate.length)}},exactLength:function(schema,candidate){if("string"==typeof candidate||_typeIs.array(candidate)){var exactLength=Number(schema.exactLength);isNaN(exactLength)||candidate.length!==exactLength&&this.report("must have exactly "+exactLength+" elements, but it have "+candidate.length)}},lt:function(schema,candidate){var limit=Number(schema.lt);"number"!=typeof candidate||isNaN(limit)||candidate>=limit&&this.report("must be less than "+limit+', but is equal to "'+candidate+'"')},lte:function(schema,candidate){var limit=Number(schema.lte);"number"!=typeof candidate||isNaN(limit)||candidate>limit&&this.report("must be less than or equal to "+limit+', but is equal to "'+candidate+'"')},gt:function(schema,candidate){var limit=Number(schema.gt);"number"!=typeof candidate||isNaN(limit)||candidate<=limit&&this.report("must be greater than "+limit+', but is equal to "'+candidate+'"')},gte:function(schema,candidate){var limit=Number(schema.gte);"number"!=typeof candidate||isNaN(limit)||candidate0){var msg="should not contains "+(intruder.length>1?"properties":"property")+" ["+intruder.map(function(i){return'"'+i+'"'}).join(", ")+"]";self.report(msg)}}}},exec:function(schema,candidate,callback){var self=this;return"function"==typeof callback?this.asyncExec(schema,candidate,callback):void(_typeIs.array(schema.exec)?schema.exec:[schema.exec]).forEach(function(exec){"function"==typeof exec&&exec.call(self,schema,candidate)})},properties:function(schema,candidate,callback){if("function"==typeof callback)return this.asyncProperties(schema,candidate,callback);if(schema.properties instanceof Object&&candidate instanceof Object){var i,properties=schema.properties;if(null!=properties["*"])for(i in candidate)i in properties||(this._deeperObject(i),this._validate(properties["*"],candidate[i]),this._back());for(i in properties)"*"!==i&&(this._deeperObject(i),this._validate(properties[i],candidate[i]),this._back())}},items:function(schema,candidate,callback){if("function"==typeof callback)return this.asyncItems(schema,candidate,callback);if(schema.items instanceof Object&&candidate instanceof Object){var i,l,items=schema.items;if(_typeIs.array(items)&&_typeIs.array(candidate))for(i=0,l=items.length;i2)return exec.call(self,schema,candidate,done);exec.call(self,schema,candidate)}async.nextTick(done)},callback)},asyncProperties:function(schema,candidate,callback){if(!(schema.properties instanceof Object&&_typeIs.object(candidate)))return callback();var self=this,properties=schema.properties;async.series([function(next){return null==properties["*"]?next():void async.eachSeries(Object.keys(candidate),function(i,done){return i in properties?async.nextTick(done):(self._deeperObject(i),void self._asyncValidate(properties["*"],candidate[i],function(err){self._back(),done(err)}))},next)},function(next){async.eachSeries(Object.keys(properties),function(i,done){return"*"===i?async.nextTick(done):(self._deeperObject(i),void self._asyncValidate(properties[i],candidate[i],function(err){self._back(),done(err)}))},next)}],callback)},asyncItems:function(schema,candidate,callback){if(!(schema.items instanceof Object&&candidate instanceof Object))return callback();var self=this,items=schema.items;_typeIs.array(items)&&_typeIs.array(candidate)?async.timesSeries(items.length,function(i,done){self._deeperArray(i),self._asyncValidate(items[i],candidate[i],function(err,res){self._back(),done(err,res)}),self._back()},callback):async.eachSeries(Object.keys(candidate),function(key,done){self._deeperArray(key),self._asyncValidate(items,candidate[key],function(err,res){self._back(),done(err,res)})},callback)}};_extend(Validation.prototype,_validationAttribut),_extend(Validation.prototype,_asyncValidationAttribut),_extend(Validation,new Customisable),Validation.prototype.validate=function(candidate,callback){if(this.origin=candidate,"function"==typeof callback){var self=this;return async.nextTick(function(){self._asyncValidate(self._schema,candidate,function(err){self.origin=null,callback(err,self.result())})})}return this._validate(this._schema,candidate).result()},Validation.prototype._validate=function(schema,candidate,callback){return this.userCode=schema.code||null,this.userError=schema.error||null,this.userAlias=schema.alias||null,this._basicFields.forEach(function(i){(i in schema||"optional"===i)&&"function"==typeof this[i]&&this[i](schema,candidate)},this),this._customFields.forEach(function(i){i in schema&&"function"==typeof this._custom[i]&&this._custom[i].call(this,schema,candidate)},this),this},Validation.prototype._asyncValidate=function(schema,candidate,callback){var self=this;this.userCode=schema.code||null,this.userError=schema.error||null,this.userAlias=schema.alias||null,async.series([function(next){async.eachSeries(Object.keys(_validationAttribut),function(i,done){ async.nextTick(function(){if((i in schema||"optional"===i)&&"function"==typeof self[i]){if(self[i].length>2)return self[i](schema,candidate,done);self[i](schema,candidate)}done()})},next)},function(next){async.eachSeries(Object.keys(self._custom),function(i,done){async.nextTick(function(){if(i in schema&&"function"==typeof self._custom[i]){if(self._custom[i].length>2)return self._custom[i].call(self,schema,candidate,done);self._custom[i].call(self,schema,candidate)}done()})},next)}],callback)};var _forceType={number:function(post,schema){var n;if("number"==typeof post)return post;if(""===post)return"undefined"!=typeof schema.def?schema.def:null;if("string"==typeof post){if(n=parseFloat(post.replace(/,/g,".").replace(/ /g,"")),"number"==typeof n)return n}else if(post instanceof Date)return+post;return null},integer:function(post,schema){var n;if("number"==typeof post&&post%1===0)return post;if(""===post)return"undefined"!=typeof schema.def?schema.def:null;if("string"==typeof post){if(n=parseInt(post.replace(/ /g,""),10),"number"==typeof n)return n}else{if("number"==typeof post)return parseInt(post,10);if("boolean"==typeof post)return post?1:0;if(post instanceof Date)return+post}return null},string:function(post,schema){return"boolean"==typeof post||"number"==typeof post||post instanceof Date?post.toString():_typeIs.array(post)?schema.items||schema.properties?post:post.join(String(schema.joinWith||",")):post instanceof Object?schema.items||schema.properties?post:JSON.stringify(post):"string"==typeof post&&post.length?post:null},date:function(post,schema){if(post instanceof Date)return post;var d=new Date(post);return isNaN(d.getTime())?null:d},boolean:function(post,schema){return"undefined"==typeof post?null:("string"!=typeof post||"false"!==post.toLowerCase())&&!!post},object:function(post,schema){if("string"!=typeof post||_typeIs.object(post))return post;try{return JSON.parse(post)}catch(e){return null}},array:function(post,schema){if(_typeIs.array(post))return post;if("undefined"==typeof post)return null;if("string"==typeof post){if("["===post.substring(0,1)&&"]"===post.slice(-1))try{return JSON.parse(post)}catch(e){return null}return post.split(String(schema.splitWith||","))}return _typeIs.array(post)?null:[post]}},_applyRules={upper:function(post){return post.toUpperCase()},lower:function(post){return post.toLowerCase()},title:function(post){return post.replace(/\S*/g,function(txt){return txt.charAt(0).toUpperCase()+txt.substr(1).toLowerCase()})},capitalize:function(post){return post.charAt(0).toUpperCase()+post.substr(1).toLowerCase()},ucfirst:function(post){return post.charAt(0).toUpperCase()+post.substr(1)},trim:function(post){return post.trim()}},_sanitizationAttribut={strict:function(schema,post){if("string"==typeof schema.strict&&(schema.strict="true"===schema.strict),schema.strict!==!0)return post;if(!_typeIs.object(schema.properties))return post;if(!_typeIs.object(post))return post;return Object.keys(post).forEach(function(key){key in schema.properties||delete post[key]}),post},optional:function(schema,post){var opt="boolean"==typeof schema.optional?schema.optional:"false"!==schema.optional;return opt===!0?post:"undefined"!=typeof post?post:(this.report(),schema.def===Date?new Date:schema.def)},type:function(schema,post){if("string"!=typeof schema.type||"function"!=typeof _forceType[schema.type])return post;var n,opt="boolean"!=typeof schema.optional||schema.optional;return"function"==typeof _forceType[schema.type]?(n=_forceType[schema.type](post,schema),(null===n&&!opt||!n&&isNaN(n)||null===n&&"string"===schema.type)&&(n=schema.def)):opt||(n=schema.def),(null!=n||"undefined"!=typeof schema.def&&schema.def===n)&&n!==post?(this.report(),n):post},rules:function(schema,post){var rules=schema.rules;if("string"!=typeof post||"string"!=typeof rules&&!_typeIs.array(rules))return post;var modified=!1;return(_typeIs.array(rules)?rules:[rules]).forEach(function(rule){"function"==typeof _applyRules[rule]&&(post=_applyRules[rule](post),modified=!0)}),modified&&this.report(),post},min:function(schema,post){var postTest=Number(post);if(isNaN(postTest))return post;var min=Number(schema.min);return isNaN(min)?post:postTestmax?(this.report(),max):post},minLength:function(schema,post){var limit=Number(schema.minLength);if("string"!=typeof post||isNaN(limit)||limit<0)return post;var str="",gap=limit-post.length;if(gap>0){for(var i=0;ilimit?(this.report(),post.slice(0,limit)):post},properties:function(schema,post,callback){if("function"==typeof callback)return this.asyncProperties(schema,post,callback);if(!post||"object"!=typeof post)return post;var tmp,i,properties=schema.properties;if("undefined"!=typeof properties["*"])for(i in post)i in properties||(this._deeperObject(i),tmp=this._sanitize(schema.properties["*"],post[i]),"undefined"!=typeof tmp&&(post[i]=tmp),this._back());for(i in schema.properties)"*"!==i&&(this._deeperObject(i),tmp=this._sanitize(schema.properties[i],post[i]),"undefined"!=typeof tmp&&(post[i]=tmp),this._back());return post},items:function(schema,post,callback){if("function"==typeof callback)return this.asyncItems(schema,post,callback);if(!(schema.items instanceof Object&&post instanceof Object))return post;var i;if(_typeIs.array(schema.items)&&_typeIs.array(post)){var minLength=schema.items.length2)return exec.call(self,schema,post,function(err,res){return err?done(err):(post=res,void done())});post=exec.call(self,schema,post)}done()},function(err){callback(err,post)})},asyncProperties:function(schema,post,callback){if(!post||"object"!=typeof post)return callback(null,post);var self=this,properties=schema.properties;async.series([function(next){if(null==properties["*"])return next();var globing=properties["*"];async.eachSeries(Object.keys(post),function(i,next){return i in properties?next():(self._deeperObject(i),void self._asyncSanitize(globing,post[i],function(err,res){"undefined"!=typeof res&&(post[i]=res),self._back(),next()}))},next)},function(next){async.eachSeries(Object.keys(properties),function(i,next){return"*"===i?next():(self._deeperObject(i),void self._asyncSanitize(properties[i],post[i],function(err,res){return err?next(err):("undefined"!=typeof res&&(post[i]=res),self._back(),void next())}))},next)}],function(err){return callback(err,post)})},asyncItems:function(schema,post,callback){if(!(schema.items instanceof Object&&post instanceof Object))return callback(null,post);var self=this,items=schema.items;if(_typeIs.array(items)&&_typeIs.array(post)){var minLength=items.length2)return self[i](schema,value,next);value=self[i](schema,value)}next(null,value)})},next)},function(inter,next){async.reduce(self._customFields,inter,function(value,i,next){async.nextTick(function(){if(i in schema&&"function"==typeof self._custom[i]){if(self._custom[i].length>2)return self._custom[i].call(self,schema,value,next);value=self._custom[i].call(self,schema,value)}next(null,value)})},next)}],callback)};var INT_MIN=-2147483648,INT_MAX=2147483647,_rand={int:function(min,max){return min+(0|Math.random()*(max-min+1))},float:function(min,max){return Math.random()*(max-min)+min},bool:function(){return Math.random()>.5},char:function(min,max){return String.fromCharCode(this.int(min,max))},fromList:function(list){return list[this.int(0,list.length-1)]}},_formatSample={"date-time":function(){return(new Date).toISOString()},date:function(){return(new Date).toISOString().replace(/T.*$/,"")},time:function(){return(new Date).toLocaleTimeString({},{hour12:!1})},color:function(min,max){var s="#";min<1&&(min=1);for(var i=0,l=_rand.int(min,max);imaxLength&&(size=maxLength),candidate=new Array(size),type=null,i=0;i=0&&arr.length%1===0}function _arrayEach(arr,iterator){for(var index=-1,length=arr.length;++index3?eachfn(arr,limit,iteratee,done):(cb=iterator,iterator=limit,eachfn(arr,iteratee,done))}}function _findGetResult(v,x){return x}function _parallel(eachfn,tasks,callback){callback=callback||noop;var results=_isArrayLike(tasks)?[]:{};eachfn(tasks,function(task,key,callback){task(_restParam(function(err,args){args.length<=1&&(args=args[0]),results[key]=args,callback(err)}))},function(err){callback(err,results)})}function _concat(eachfn,arr,fn,callback){var result=[];eachfn(arr,function(x,index,cb){fn(x,function(err,y){result=result.concat(y||[]),cb(err)})},function(err){callback(err,result)})}function _queue(worker,concurrency,payload){function _insert(q,data,pos,callback){if(null!=callback&&"function"!=typeof callback)throw new Error("task callback must be a function");return q.started=!0,_isArray(data)||(data=[data]),0===data.length&&q.idle()?async.setImmediate(function(){q.drain()}):(_arrayEach(data,function(task){var item={data:task,callback:callback||noop};pos?q.tasks.unshift(item):q.tasks.push(item),q.tasks.length===q.concurrency&&q.saturated()}),void async.setImmediate(q.process))}function _next(q,tasks){return function(){workers-=1;var removed=!1,args=arguments;_arrayEach(tasks,function(task){_arrayEach(workersList,function(worker,index){worker!==task||removed||(workersList.splice(index,1),removed=!0)}),task.callback.apply(task,args)}),q.tasks.length+workers===0&&q.drain(),q.process()}}if(null==concurrency)concurrency=1;else if(0===concurrency)throw new Error("Concurrency must not be zero");var workers=0,workersList=[],q={tasks:[],concurrency:concurrency,payload:payload,saturated:noop,empty:noop,drain:noop,started:!1,paused:!1,push:function(data,callback){_insert(q,data,!1,callback)},kill:function(){q.drain=noop,q.tasks=[]},unshift:function(data,callback){_insert(q,data,!0,callback)},process:function(){for(;!q.paused&&workersb?1:0}async.map(arr,function(x,callback){iterator(x,function(err,criteria){err?callback(err):callback(null,{value:x,criteria:criteria})})},function(err,results){return err?callback(err):void callback(null,_map(results.sort(comparator),function(x){return x.value}))})},async.auto=function(tasks,concurrency,callback){function addListener(fn){listeners.unshift(fn)}function removeListener(fn){var idx=_indexOf(listeners,fn);idx>=0&&listeners.splice(idx,1)}function taskComplete(){remainingTasks--,_arrayEach(listeners.slice(0),function(fn){fn()})}"function"==typeof arguments[1]&&(callback=concurrency,concurrency=null),callback=_once(callback||noop);var keys=_keys(tasks),remainingTasks=keys.length;if(!remainingTasks)return callback(null);concurrency||(concurrency=remainingTasks);var results={},runningTasks=0,hasError=!1,listeners=[];addListener(function(){remainingTasks||callback(null,results)}),_arrayEach(keys,function(k){function ready(){return runningTasks=0)throw new Error("Has cyclic dependencies")}ready()?(runningTasks++,task[task.length-1](taskCallback,results)):addListener(listener)}})},async.retry=function(times,task,callback){function parseTimes(acc,t){if("number"==typeof t)acc.times=parseInt(t,10)||DEFAULT_TIMES;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);acc.times=parseInt(t.times,10)||DEFAULT_TIMES,acc.interval=parseInt(t.interval,10)||DEFAULT_INTERVAL}}function wrappedTask(wrappedCallback,wrappedResults){function retryAttempt(task,finalAttempt){return function(seriesCallback){task(function(err,result){seriesCallback(!err||finalAttempt,{err:err,result:result})},wrappedResults)}}function retryInterval(interval){return function(seriesCallback){setTimeout(function(){seriesCallback(null)},interval)}}for(;opts.times;){var finalAttempt=!(opts.times-=1);attempts.push(retryAttempt(opts.task,finalAttempt)),!finalAttempt&&opts.interval>0&&attempts.push(retryInterval(opts.interval))}async.series(attempts,function(done,data){data=data[data.length-1],(wrappedCallback||opts.callback)(data.err,data.result)})}var DEFAULT_TIMES=5,DEFAULT_INTERVAL=0,attempts=[],opts={times:DEFAULT_TIMES,interval:DEFAULT_INTERVAL},length=arguments.length;if(length<1||length>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return length<=2&&"function"==typeof times&&(callback=task,task=times),"function"!=typeof times&&parseTimes(opts,times),opts.callback=callback,opts.task=task,opts.callback?wrappedTask():wrappedTask},async.waterfall=function(tasks,callback){function wrapIterator(iterator){return _restParam(function(err,args){if(err)callback.apply(null,[err].concat(args));else{var next=iterator.next();next?args.push(wrapIterator(next)):args.push(callback),ensureAsync(iterator).apply(null,args)}})}if(callback=_once(callback||noop),!_isArray(tasks)){var err=new Error("First argument to waterfall must be an array of functions");return callback(err)}return tasks.length?void wrapIterator(async.iterator(tasks))():callback()},async.parallel=function(tasks,callback){_parallel(async.eachOf,tasks,callback)},async.parallelLimit=function(tasks,limit,callback){_parallel(_eachOfLimit(limit),tasks,callback)},async.series=function(tasks,callback){_parallel(async.eachOfSeries,tasks,callback)},async.iterator=function(tasks){function makeCallback(index){function fn(){return tasks.length&&tasks[index].apply(null,arguments),fn.next()}return fn.next=function(){return index>>1);compare(item,sequence[mid])>=0?beg=mid:end=mid-1}return beg}function _insert(q,data,priority,callback){if(null!=callback&&"function"!=typeof callback)throw new Error("task callback must be a function");return q.started=!0,_isArray(data)||(data=[data]),0===data.length?async.setImmediate(function(){q.drain()}):void _arrayEach(data,function(task){var item={data:task,priority:priority,callback:"function"==typeof callback?callback:noop};q.tasks.splice(_binarySearch(q.tasks,item,_compareTasks)+1,0,item),q.tasks.length===q.concurrency&&q.saturated(),async.setImmediate(q.process)})}var q=async.queue(worker,concurrency);return q.push=function(data,priority,callback){_insert(q,data,priority,callback)},delete q.unshift,q},async.cargo=function(worker,payload){return _queue(worker,1,payload)},async.log=_console_fn("log"),async.dir=_console_fn("dir"),async.memoize=function(fn,hasher){var memo={},queues={},has=Object.prototype.hasOwnProperty;hasher=hasher||identity;var memoized=_restParam(function(args){var callback=args.pop(),key=hasher.apply(null,args);has.call(memo,key)?async.setImmediate(function(){callback.apply(null,memo[key])}):has.call(queues,key)?queues[key].push(callback):(queues[key]=[callback],fn.apply(null,args.concat([_restParam(function(args){memo[key]=args;var q=queues[key];delete queues[key];for(var i=0,l=q.length;i0)renderUI=React.createElement("span",null,optionLabel);else if("string"==typeof toRender)renderUI=React.createElement("div",{dangerouslySetInnerHTML:{__html:toRender}});else if(React.isValidElement(toRender)){var clonedElm=React.cloneElement(toRender,{className:classNames("dropdown-value-element",toRender.props.className)});renderUI=clonedElm}}else(null==value||void 0==value||0==$.trim(value).length)&&optionLabel&&optionLabel.length>0&&(selectedText=optionLabel,isOptionLabelSet=!0),selectedText=null==selectedText||0==selectedText.length?"":selectedText,renderUI=React.createElement("span",{title:selectedText},selectedText);return React.createElement(ToggleSkin,{value:value,disabled:disabled,isOptionLabelSet:isOptionLabelSet},renderUI)}function _getOptionLink(item){var _this=this,_props2=this.props,onOptionRender=_props2.onOptionRender,context=_props2.context,dataValueField=_props2.dataValueField,dataTextField=_props2.dataTextField,value=this.state.value,itemText=item[dataTextField],itemValue=item[dataValueField],renderUI=void 0;if(item.isOptionLabel!==!0&&"function"==typeof onOptionRender){var toRender=onOptionRender.apply(context,[item]);renderUI="string"==typeof toRender?React.createElement("div",{className:"option-text",dangerouslySetInnerHTML:{__html:toRender}}):React.createElement("div",{className:"option-text"},toRender)}else renderUI=React.createElement("div",{className:"option-text",title:itemText},itemText);var linkClassName="option-link";return item.itemClassName&&(linkClassName+=" "+item.itemClassName),React.createElement("a",{href:"#","data-value":itemValue,className:""+linkClassName,onClick:function(e){e.preventDefault(),itemValue!=value&&item.disabled!==!0&&_onChange.apply(_this,[itemValue,value])}},renderUI)}function _getListUI(){var _this2=this,_props3=this.props,disabled=_props3.disabled,dataValueField=(_props3.optionLabel,_props3.dataValueField),_state=(_props3.dataTextField,this.state),value=_state.value,listUI=(_state.proxyDS,void 0),filteredList=this.props.data.filter(function(e){return e[dataValueField]!=value});if(disabled!==!0){var cnt=0,listItems=filteredList.map(function(m){cnt+=1;var optionComp=_getOptionLink.apply(_this2,[m]);return React.createElement("li",{key:cnt,className:m.disabled===!0?"disabled":""},optionComp)});listUI=React.createElement("ul",{className:"dropdown-menu"},listItems)}return listUI}function _onChange(newValue,value){var _this3=this,_props4=this.props,onBeforeChange=_props4.onBeforeChange,change=_props4.change,context=_props4.context;onBeforeChange.apply(context,[newValue,value,this])!==!1&&this.setState({value:newValue},function(){setTimeout(function(){var item=_this3.getSelectedItem();change.apply(context,[newValue,_this3,item])},150)})}function _onListShown(){var _props5=this.props,onListShown=_props5.onListShown,context=_props5.context;"function"==typeof onListShown&&onListShown.apply(context)}function _createProxyDataSource(addOptionLabel){var _props6=this.props,data=_props6.data,optionLabel=_props6.optionLabel,dataValueField=_props6.dataValueField,dataTextField=_props6.dataTextField,proxyDS=[].concat(_toConsumableArray(data));if(addOptionLabel===!0){var optionLabelItem={};optionLabelItem[dataValueField]=null,optionLabelItem[dataTextField]=optionLabel,optionLabelItem.isOptionLabel=!0,optionLabelItem.itemClassName="irsa-react-dropdown-optionLabel",proxyDS.unshift(optionLabelItem)}return proxyDS}function _initializeComponent(props,isCompWillMountCall){var id=props.id,value=props.value,data=props.data,dataValueField=props.dataValueField,optionLabel=(props.dataTextField,props.optionLabel);isCompWillMountCall===!0?this._id=id?id:_ModulesCommons.Util.generateUUID():this._id=id?id:this._id;var addOptionLabel=data.length>0&&optionLabel&&optionLabel.length>0,proxyDS=_createProxyDataSource.apply(this,[addOptionLabel]),vlu=value;(null==vlu||void 0==vlu)&&data.length>0&&(null!=optionLabel&&void 0!=optionLabel||(vlu=data[0][dataValueField])),this.setState({value:vlu,proxyDS:proxyDS})}var _objectAssign=__webpack_require__(7),_objectAssign2=_interopRequireDefault(_objectAssign),_ModulesCommons=__webpack_require__(26),ToggleSkin=React.createClass({displayName:"ToggleSkin",propTypes:{value:React.PropTypes.oneOfType([React.PropTypes.number,React.PropTypes.string]),disabled:React.PropTypes.bool,isOptionLabelSet:React.PropTypes.bool},render:function(){var props=this.props,value=props.value,disabled=props.disabled,isOptionLabelSet=props.isOptionLabelSet,buttonClassName="btn btn-default dropdown-toggle",clsOptionLabelFlag="";return isOptionLabelSet===!0&&(clsOptionLabelFlag=" is-option-label"),disabled!==!0?React.createElement("button",{type:"button",className:""+buttonClassName+clsOptionLabelFlag,"data-toggle":"dropdown","data-selected-value":value},props.children," ",React.createElement("span",{className:"caret"})):React.createElement("label",{className:"disabled-dropdown","data-selected-value":value},props.children)}}),IrsaReactDropdown=React.createClass({displayName:"IrsaReactDropdown",propTypes:{id:React.PropTypes.string,name:React.PropTypes.string,data:React.PropTypes.array,dataTextField:React.PropTypes.string,dataValueField:React.PropTypes.string,value:React.PropTypes.oneOfType([React.PropTypes.number,React.PropTypes.string]),onValueRender:React.PropTypes.func,onOptionRender:React.PropTypes.func,onBeforeChange:React.PropTypes.func,change:React.PropTypes.func,onListShown:React.PropTypes.func,context:React.PropTypes.object,optionLabel:React.PropTypes.string,disabled:React.PropTypes.bool,className:React.PropTypes.string},getInitialState:function(){return{value:null,proxyDS:[],_element:null,_domNode:null}},getDefaultProps:function(){return{data:[],value:null,dataTextField:"text",dataValueField:"value",className:"",disabled:!1,context:window,onBeforeChange:function(newValue,oldValue,comp){return!0},change:function(value,comp){}}},value:function value(){var value=this.state.value,vlu=value;return vlu},getText:function(){var dataTextField=this.props.dataTextField,value=this.state.value,found=_getDataItem.apply(this,[value]);return found?found[dataTextField]:null},getSelectedItem:function(){var value=this.state.value;return _getDataItem.apply(this,[value])},setValue:function(value,raiseEvent){var _this4=this,_props7=this.props,change=_props7.change,context=_props7.context;return this.setState({value:value},function(){raiseEvent===!0&&setTimeout(function(){change.apply(context,[value,_this4])},150)}),this},setReadOnly:function(state){this.setState({disabled:1==state})},getDataSource:function(){return[].concat(_toConsumableArray(this.props.data))},componentWillMount:function(){_initializeComponent.apply(this,[this.props,!0])},componentWillReceiveProps:function(nextProps){_initializeComponent.apply(this,[nextProps,!1])},componentDidMount:function(){var domNode=ReactDOM.findDOMNode(this),element=$(domNode).parent().get(0);this.setState({_element:element,_domNode:domNode});var $elm=$(element);$elm.css({display:"inline-block","margin-bottom":"8px"}).data("irsaDropdown",this),$elm.on("shown.bs.dropdown",_onListShown.bind(this));var $domNode=$(domNode),$dropdownLabel=$domNode.siblings("label[for='"+this.props.id+"']");$dropdownLabel.length>0&&($dropdownLabel.attr("data-bound-to-control","1"),$dropdownLabel.on("click",function(e){e.preventDefault(),e.stopPropagation(),$domNode.find("[data-toggle=dropdown]").trigger("click")}))},componentWillUnmount:function(){var _state2=this.state,_element=_state2._element,_domNode=_state2._domNode,$elm=$(_element),$domNode=$(_domNode);$elm.off("shown.bs.dropdown",_onListShown),$domNode.find("label[data-bound-to-control='1']").off()},render:function(){var _props8=this.props,name=_props8.name,className=_props8.className,_state3=this.state,value=_state3.value,_element=_state3._element,toggleUI=_getToggleButtonUI.apply(this),listUI=_getListUI.apply(this),cls="dropdown irsa-react-dropdown";className&&className.length>0&&(cls+=" "+className);var $elm=$(_element),nm=name||$elm.attr("name"),attrRequiredMsg=$elm.data("requiredMsg");return React.createElement("div",{id:this._id,className:cls},toggleUI,listUI,React.createElement("input",{type:"hidden",name:nm,"data-required-msg":attrRequiredMsg,className:"irsa-react-dropdown-value",value:null!=value&&void 0!=value?value:""}))}}),_createIrsaDropdown=function(options,mountNode){ReactDOM.render(React.createElement(IrsaReactDropdown,options),mountNode)};module.exports={Dropdown:IrsaReactDropdown},$.fn.extend({irsaDropdown:function(options){options=options||{};for(var i=0;i=400?width.toString()+"px":"inherit",ht=height>=100?height.toString()+"px":"inherit",header=void 0;hideHeader||(header=React.createElement(Header,{closeButton:!0},React.createElement(Title,null,title)));var cnt=0,btns=buttons.map(function(m){var cls=m.className?m.className:"",w=m.width>70?m.width.toString():"70",h=m.height>32?m.height.toString():"32";return React.createElement("button",{key:++cnt,id:m.id,className:cls,style:{minWidth:w+"px",height:h+"px"},onClick:function(e){return _this.onClickButton(e,m)}},m.text)}),checkBoxUI=React.createElement("div",null);tagAssetsPopup&&(checkBoxUI=React.createElement("div",{className:"checkbox-block"},React.createElement("input",{id:"chkUnTagAsset",className:"Untagcheck",type:"checkbox",checked:chkUnTagAssetValue,onChange:this._onUnchecked}),React.createElement("label",null,"Automatically tag child assets")));var footer=React.createElement("span",null);return btns.length>0&&(footer=React.createElement(Footer,{style:{textAlign:buttonsAligment}},checkBoxUI,btns)),React.createElement(Modal,{id:this._id,show:this.state.show,onHide:this._onHide,onUnchecked:function(e){return _this._onUnchecked(e)},keyboard:allowEscape,ref:"rbModalWindow",animation:!1,backdrop:"static",autoFocus:!0,enforceFocus:enforceFocus,bsClass:DEFAULT_MODAL_WINDOW_CLASS_NAME+" modal",className:dialogClassName},header,React.createElement(Body,null,React.createElement("div",{className:"content-wrapper",style:{width:wid,height:ht}},content)),footer)}});module.exports=IrsaReactModal},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _attrAccept=__webpack_require__(518),_reactDropzoneCode=(_interopRequireDefault(_attrAccept),__webpack_require__(519)),_reactDropzoneCode2=_interopRequireDefault(_reactDropzoneCode),IRSAReactUpload=(__webpack_require__(520),__webpack_require__(522),React.createClass({displayName:"IRSAReactUpload",propTypes:{id:React.PropTypes.string,dropzone:React.PropTypes.bool,multiple:React.PropTypes.bool,accept:React.PropTypes.string,minSize:React.PropTypes.number,maxSize:React.PropTypes.number,url:React.PropTypes.string.isRequired,autoUpload:React.PropTypes.bool,async:React.PropTypes.bool,onBeforeSend:React.PropTypes.func,requestEnded:React.PropTypes.func,existingFileNames:React.PropTypes.string,dropzoneStyle:React.PropTypes.object,buttonStyle:React.PropTypes.object,textboxStyle:React.PropTypes.object},getInitialState:function(){return{_id:null,files:[],existingFileNames:"",showSpinner:!1}},getDefaultProps:function(){return{multiple:!1,dropzone:!1,async:!1,autoUpload:!0,minSize:10,maxSize:52428800,existingFileNames:"",dropzoneStyle:{},buttonStyle:{},textboxStyle:{},onBeforeSend:function(file){return null},requestEnded:function(err,res){err&&console.error("IrsaReactUpload Error: ",err)}}},onOpenClick:function(){this.refs.dropzone.open()},onDrop:function(acceptedFiles,rejectedFiles){var _this=this,autoUpload=this.props.autoUpload;if(rejectedFiles.length>0)return showErrorMsg(String.format("Some invalid file type selected. Only files of types [{0}] are allowed. Maximum file size is {1}",this.props.accept,window.getFileSize(this.props.maxSize))),!1;var fileNames=this._getFileNames(acceptedFiles);this.setState({files:acceptedFiles,existingFileNames:fileNames}),autoUpload===!0&&setTimeout(function(){_this.upload()},200)},upload:function(){var _props=this.props,url=_props.url,onBeforeSend=(_props.async,_props.onBeforeSend);if(!url||0==url.length)return void console.error("Cannot upload. url prop not specified for IRSAReactUpload");var hasError=!1,files=this.state.files;if(0==files.length)return!1;for(var data=new FormData,filesMetaInfo=[],i=0;i0?o(e(t),9007199254740991):0}},function(t,n,r){"use strict";n.__esModule=!0,n.default=function(t,n){if(t&&n){var r=Array.isArray(n)?n:n.split(","),e=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return r.some(function(t){var n=t.trim();return"."===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):n.endsWith("/*")?i===n.replace(/\/.*$/,""):o===n})}return!0},r(14),r(34)},function(t,n,r){r(15),t.exports=r(2).Array.some},function(t,n,r){"use strict";var e=r(7),o=r(25)(3);e(e.P+e.F*!r(33)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,n,r){var e=r(17),o=r(18),i=r(20),u=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(1);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){t.exports=!r(3)&&!r(4)(function(){return 7!=Object.defineProperty(r(19)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(1),o=r(0).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){var e=r(1);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(0),o=r(8),i=r(23),u=r(9)("src"),c=Function.toString,f=(""+c).split("toString");r(2).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,c){var a="function"==typeof r;a&&(i(r,"name")||o(r,"name",n)),t[n]!==r&&(a&&(i(r,u)||o(r,u,t[n]?""+t[n]:f.join(String(n)))),t===e?t[n]=r:c?t[n]?t[n]=r:o(t,n,r):(delete t[n],o(t,n,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(10),o=r(26),i=r(27),u=r(12),c=r(29);t.exports=function(t,n){var r=1==t,f=2==t,a=3==t,s=4==t,p=6==t,l=5==t||p,v=n||c;return function(n,c,y){for(var h,d,x=i(n),g=o(x),m=e(c,y,3),b=u(g.length),_=0,w=r?v(n,b):f?v(n,0):void 0;b>_;_++)if((l||_ in g)&&(h=g[_],d=m(h,_,x),t))if(r)w[_]=d;else if(d)switch(t){case 3:return!0;case 5:return h;case 6:return _;case 2:w.push(h)}else if(s)return!1;return p?-1:a||s?s:w}}},function(t,n,r){var e=r(5);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){var e=r(11);t.exports=function(t){return Object(e(t))}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(30);t.exports=function(t,n){return new(e(t))(n)}},function(t,n,r){var e=r(1),o=r(31),i=r(6)("species");t.exports=function(t){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)||(n=void 0),e(n)&&null===(n=n[i])&&(n=void 0)),void 0===n?Array:n}},function(t,n,r){var e=r(5);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){var e=r(0),o=e["__core-js_shared__"]||(e["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n,r){"use strict";var e=r(4);t.exports=function(t,n){return!!t&&e(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,r){r(35),t.exports=r(2).String.endsWith},function(t,n,r){"use strict";var e=r(7),o=r(12),i=r(36),u="".endsWith;e(e.P+e.F*r(38)("endsWith"),"String",{endsWith:function(t){var n=i(this,t,"endsWith"),r=arguments.length>1?arguments[1]:void 0,e=o(n.length),c=void 0===r?e:Math.min(o(r),e),f=String(t);return u?u.call(n,f,c):n.slice(c-f.length,c)===f}})},function(t,n,r){var e=r(37),o=r(11);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},function(t,n,r){var e=r(1),o=r(5),i=r(6)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n,r){var e=r(6)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,!"/./"[t](n)}catch(t){}}return!0}}])},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj)keys.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(obj,i)&&(target[i]=obj[i]);return target}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i0||(this.setState({isDragActive:!1,isDragReject:!1}),this.props.onDragLeave&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){e.preventDefault(),this.enterCounter=0,this.setState({isDragActive:!1,isDragReject:!1});for(var droppedFiles=e.dataTransfer?e.dataTransfer.files:e.target.files,max=this.props.multiple?droppedFiles.length:Math.min(droppedFiles.length,1),acceptedFiles=[],rejectedFiles=[],i=0;i0?this.props.onDropRejected&&this.props.onDropRejected.call(this,rejectedFiles,e):acceptedFiles.length>0&&this.props.onDropAccepted&&this.props.onDropAccepted.call(this,acceptedFiles,e),this.setState({isFileDialogActive:!1})}},{key:"onClick",value:function(){this.props.disableClick||this.setState({isFileDialogActive:!0},this.open())}},{key:"onFileDialogCancel",value:function onFileDialogCancel(){var _this2=this,onFileDialogCancel=this.props.onFileDialogCancel,fileInputEl=this.fileInputEl;onFileDialogCancel&&this.state.isFileDialogActive&&setTimeout(function(){var FileList=fileInputEl.files;FileList.length||_this2.setState({isFileDialogActive:!1},onFileDialogCancel())},100)}},{key:"fileAccepted",value:function(file){return(0,_attrAccept2.default)(file,this.props.accept)}},{key:"fileMatchSize",value:function(file){return file.size<=this.props.maxSize&&file.size>=this.props.minSize}},{key:"allFilesAccepted",value:function(files){return files.every(this.fileAccepted)}},{key:"open",value:function(){this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var _this3=this,_props=this.props,accept=_props.accept,activeClassName=_props.activeClassName,inputProps=_props.inputProps,multiple=_props.multiple,name=_props.name,rejectClassName=_props.rejectClassName,rest=_objectWithoutProperties(_props,["accept","activeClassName","inputProps","multiple","name","rejectClassName"]),activeStyle=rest.activeStyle,className=rest.className,rejectStyle=rest.rejectStyle,style=rest.style,props=_objectWithoutProperties(rest,["activeStyle","className","rejectStyle","style"]),_state=this.state,isDragActive=_state.isDragActive,isDragReject=_state.isDragReject;className=className||"",isDragActive&&activeClassName&&(className+=" "+activeClassName),isDragReject&&rejectClassName&&(className+=" "+rejectClassName),className||style||activeStyle||rejectStyle||(style={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5},activeStyle={borderStyle:"solid",backgroundColor:"#eee"},rejectStyle={borderStyle:"solid",backgroundColor:"#ffdddd"});var appliedStyle=void 0;appliedStyle=activeStyle&&isDragActive?_extends({},style,activeStyle):rejectStyle&&isDragReject?_extends({},style,rejectStyle):_extends({},style);var inputAttributes={accept:accept,type:"file",style:{display:"none"},multiple:supportMultiple&&multiple,ref:function(el){return _this3.fileInputEl=el},onChange:this.onDrop};name&&name.length&&(inputAttributes.name=name);var customProps=["disablePreview","disableClick","onDropAccepted","onDropRejected","maxSize","minSize","onFileDialogCancel"],divProps=_extends({},props);return customProps.forEach(function(prop){return delete divProps[prop]}),React.createElement("div",_extends({className:className,style:appliedStyle},divProps,{onClick:this.onClick,onDragStart:this.onDragStart,onDragEnter:this.onDragEnter,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop}),this.props.children,React.createElement("input",_extends({},inputProps,inputAttributes)))}}]),Dropzone}(React.Component);Dropzone.defaultProps={disablePreview:!1,disableClick:!1,multiple:!0,maxSize:1/0,minSize:0},Dropzone.propTypes={onDrop:React.PropTypes.func,onDropAccepted:React.PropTypes.func,onDropRejected:React.PropTypes.func,onDragStart:React.PropTypes.func,onDragEnter:React.PropTypes.func,onDragLeave:React.PropTypes.func,children:React.PropTypes.node,style:React.PropTypes.object,activeStyle:React.PropTypes.object,rejectStyle:React.PropTypes.object,className:React.PropTypes.string,activeClassName:React.PropTypes.string,rejectClassName:React.PropTypes.string,disablePreview:React.PropTypes.bool,disableClick:React.PropTypes.bool,onFileDialogCancel:React.PropTypes.func,inputProps:React.PropTypes.object,multiple:React.PropTypes.bool,accept:React.PropTypes.string,name:React.PropTypes.string,maxSize:React.PropTypes.number,minSize:React.PropTypes.number},module.exports=Dropzone},function(module,exports,__webpack_require__){function with_query_strings(request){var timestamp=Date.now().toString();return void 0!==request._query&&request._query[0]?request._query[0]+="&"+timestamp:request._query=[timestamp],request}var ie=__webpack_require__(521);module.exports=function(request,mockIE){return request.set("X-Requested-With","XMLHttpRequest"),request.set("Expires","-1"),request.set("Cache-Control","no-cache,no-store,must-revalidate,max-age=-1,private"),(ie||mockIE)&&with_query_strings(request),request}},function(module,exports){function ie(){for(var v=3,el=document.createElement("b"),all=el.all||[];el.innerHTML="",all[0];);return v>4?v:document.documentMode}module.exports=ie()},function(module,exports,__webpack_require__){function noop(){}function serialize(obj){if(!isObject(obj))return obj;var pairs=[];for(var key in obj)pushEncodedKeyValuePair(pairs,key,obj[key]);return pairs.join("&")}function pushEncodedKeyValuePair(pairs,key,val){if(null!=val)if(Array.isArray(val))val.forEach(function(v){pushEncodedKeyValuePair(pairs,key,v)});else if(isObject(val))for(var subkey in val)pushEncodedKeyValuePair(pairs,key+"["+subkey+"]",val[subkey]);else pairs.push(encodeURIComponent(key)+"="+encodeURIComponent(val));else null===val&&pairs.push(encodeURIComponent(key))}function parseString(str){for(var pair,pos,obj={},pairs=str.split("&"),i=0,len=pairs.length;i=300)&&(new_err=new Error(res.statusText||"Unsuccessful HTTP response"),new_err.original=err,new_err.response=res,new_err.status=res.status)}catch(e){new_err=e}new_err?self.callback(new_err,res):self.callback(null,res)})}function del(url,fn){var req=request("DELETE",url);return fn&&req.end(fn),req}var root;"undefined"!=typeof window?root=window:"undefined"!=typeof self?root=self:(console.warn("Using browser-only version of superagent in non-browser environment"),root=this);var Emitter=__webpack_require__(523),requestBase=__webpack_require__(524),isObject=__webpack_require__(525),request=module.exports=__webpack_require__(526).bind(null,Request);request.getXHR=function(){if(!(!root.XMLHttpRequest||root.location&&"file:"==root.location.protocol&&root.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}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("Browser-only verison of superagent could not find XHR")};var trim="".trim?function(s){return s.trim()}:function(s){return s.replace(/(^\s*|\s*$)/g,"")};request.serializeObject=serialize,request.parseString=parseString,request.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},request.serialize={"application/x-www-form-urlencoded":serialize,"application/json":JSON.stringify},request.parse={"application/x-www-form-urlencoded":parseString,"application/json":JSON.parse},Response.prototype.get=function(field){return this.header[field.toLowerCase()]},Response.prototype._setHeaderProperties=function(header){var ct=this.header["content-type"]||"";this.type=type(ct);var obj=params(ct);for(var key in obj)this[key]=obj[key]},Response.prototype._parseBody=function(str){var parse=request.parse[this.type];return!parse&&isJSON(this.type)&&(parse=request.parse["application/json"]),parse&&str&&(str.length||str instanceof Object)?parse(str):null},Response.prototype._setStatusProperties=function(status){1223===status&&(status=204);var type=status/100|0;this.status=this.statusCode=status,this.statusType=type,this.info=1==type,this.ok=2==type,this.clientError=4==type,this.serverError=5==type,this.error=(4==type||5==type)&&this.toError(),this.accepted=202==status,this.noContent=204==status,this.badRequest=400==status,this.unauthorized=401==status,this.notAcceptable=406==status,this.notFound=404==status,this.forbidden=403==status},Response.prototype.toError=function(){var req=this.req,method=req.method,url=req.url,msg="cannot "+method+" "+url+" ("+this.status+")",err=new Error(msg);return err.status=this.status,err.method=method,err.url=url,err},request.Response=Response,Emitter(Request.prototype);for(var key in requestBase)Request.prototype[key]=requestBase[key];Request.prototype.type=function(type){return this.set("Content-Type",request.types[type]||type),this},Request.prototype.responseType=function(val){return this._responseType=val,this},Request.prototype.accept=function(type){return this.set("Accept",request.types[type]||type),this},Request.prototype.auth=function(user,pass,options){switch(options||(options={type:"basic"}),options.type){case"basic":var str=btoa(user+":"+pass);this.set("Authorization","Basic "+str);break;case"auto":this.username=user,this.password=pass}return this},Request.prototype.query=function(val){return"string"!=typeof val&&(val=serialize(val)),val&&this._query.push(val),this},Request.prototype.attach=function(field,file,filename){return this._getFormData().append(field,file,filename||file.name),this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.callback=function(err,res){var fn=this._callback;this.clearTimeout(),fn(err,res)},Request.prototype.crossDomainError=function(){var err=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");err.crossDomain=!0,err.status=this.status,err.method=this.method,err.url=this.url,this.callback(err)},Request.prototype._timeoutError=function(){var timeout=this._timeout,err=new Error("timeout of "+timeout+"ms exceeded");err.timeout=timeout,this.callback(err)},Request.prototype._appendQueryString=function(){ var query=this._query.join("&");query&&(this.url+=~this.url.indexOf("?")?"&"+query:"?"+query)},Request.prototype.end=function(fn){var self=this,xhr=this.xhr=request.getXHR(),timeout=this._timeout,data=this._formData||this._data;this._callback=fn||noop,xhr.onreadystatechange=function(){if(4==xhr.readyState){var status;try{status=xhr.status}catch(e){status=0}if(0==status){if(self.timedout)return self._timeoutError();if(self._aborted)return;return self.crossDomainError()}self.emit("end")}};var handleProgress=function(direction,e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction=direction,self.emit("progress",e)};if(this.hasListeners("progress"))try{xhr.onprogress=handleProgress.bind(null,"download"),xhr.upload&&(xhr.upload.onprogress=handleProgress.bind(null,"upload"))}catch(e){}if(timeout&&!this._timer&&(this._timer=setTimeout(function(){self.timedout=!0,self.abort()},timeout)),this._appendQueryString(),this.username&&this.password?xhr.open(this.method,this.url,!0,this.username,this.password):xhr.open(this.method,this.url,!0),this._withCredentials&&(xhr.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof data&&!this._isHost(data)){var contentType=this._header["content-type"],serialize=this._serializer||request.serialize[contentType?contentType.split(";")[0]:""];!serialize&&isJSON(contentType)&&(serialize=request.serialize["application/json"]),serialize&&(data=serialize(data))}for(var field in this.header)null!=this.header[field]&&xhr.setRequestHeader(field,this.header[field]);return this._responseType&&(xhr.responseType=this._responseType),this.emit("request",this),xhr.send("undefined"!=typeof data?data:null),this},request.Request=Request,request.get=function(url,data,fn){var req=request("GET",url);return"function"==typeof data&&(fn=data,data=null),data&&req.query(data),fn&&req.end(fn),req},request.head=function(url,data,fn){var req=request("HEAD",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.options=function(url,data,fn){var req=request("OPTIONS",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.del=del,request.delete=del,request.patch=function(url,data,fn){var req=request("PATCH",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.post=function(url,data,fn){var req=request("POST",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.put=function(url,data,fn){var req=request("PUT",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req}},function(module,exports,__webpack_require__){function Emitter(obj){if(obj)return mixin(obj)}function mixin(obj){for(var key in Emitter.prototype)obj[key]=Emitter.prototype[key];return obj}module.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){return this._callbacks=this._callbacks||{},(this._callbacks["$"+event]=this._callbacks["$"+event]||[]).push(fn),this},Emitter.prototype.once=function(event,fn){function on(){this.off(event,on),fn.apply(this,arguments)}return on.fn=fn,this.on(event,on),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(event,fn){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var callbacks=this._callbacks["$"+event];if(!callbacks)return this;if(1==arguments.length)return delete this._callbacks["$"+event],this;for(var cb,i=0;i0&&this._doValidationChecks(e.target.value)},_onFocusOut:function(e){this.props.onFocusOut(e);var validation=this.props.validation;validation&&validation.length>0&&this._doValidationChecks(e.target.value)},validate:function(){this._doValidationChecks(this.props.value)},_doValidationChecks:function(v){var validation=this.props.validation;this.setState({error:null});for(var vlu=$.trim(v),i=0;ivld.value)return this.setState({error:vld.description}),!1}},render:function(){var _props=this.props,value=_props.value,maxlength=_props.maxlength,placeholder=_props.placeholder,className=_props.className,disabled=_props.disabled,fieldName=_props.fieldName,title=_props.title,isTextArea=_props.isTextArea,error=this.state.error,inputUI=void 0,errorUI=void 0;error&&(errorUI=React.createElement("div",{style:{width:"600px",lineHeight:"0.25px"},className:"alert alert-danger",role:"alert"},error)),inputUI=disabled===!0?React.createElement("span",{className:"disabled"},value):isTextArea?React.createElement("div",null,React.createElement("div",{className:"input-group"},React.createElement("textarea",{className:"form-control sentenceArea",rows:"4",value:value,"data-field-name":fieldName,onChange:this._onChange,maxLength:maxlength,onBlur:this._onFocusOut,placeholder:placeholder,title:title}),React.createElement("span",{className:"input-group-btn"},React.createElement("button",{className:"btn btn-default",type:"button"},React.createElement("i",{className:"fa fa-pencil"})))),errorUI):React.createElement("div",null,React.createElement("div",{className:"input-group"},React.createElement("input",{type:"text",className:"form-control",value:value,"data-field-name":fieldName,onChange:this._onChange,maxLength:maxlength,onBlur:this._onFocusOut,placeholder:placeholder,title:title}),React.createElement("span",{className:"input-group-btn"},React.createElement("button",{className:"btn btn-default",type:"button"},React.createElement("i",{className:"fa fa-pencil"})))),errorUI);var bootstrapClassToAdd=isTextArea?"col-md-12":"col-md-4";return React.createElement("div",{className:bootstrapClassToAdd+" irsa-editable-text "+className},inputUI)}});module.exports=IrsaEditableText},function(module,exports){"use strict";var IrsaErrorTooltip=React.createClass({displayName:"IrsaErrorTooltip",propTypes:{text:React.PropTypes.string.isRequired},render:function(){return React.createElement("div",{className:"irsa-error-tooltip"},React.createElement("span",null,React.createElement("i",{className:"fa fa-exclamation"})),React.createElement("label",{className:"alert alert-warning error-text"},this.props.text))}});module.exports=IrsaErrorTooltip},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _objectAssign=__webpack_require__(7),_objectAssign2=_interopRequireDefault(_objectAssign),IrsaErrorSummary=React.createClass({displayName:"IrsaErrorSummary",propTypes:{title:React.PropTypes.string,errors:React.PropTypes.arrayOf(React.PropTypes.shape({msg:React.PropTypes.string.isRequired}))},getInitialState:function(){return{title:"Some missing or invalid data. Please correct",errors:[]}},setErrors:function(errors){this.setState({errors:errors})},getErrors:function(){return(0,_objectAssign2.default)({},this.state.errors)},componentWillMount:function(){this.setState({title:this.props.title,errors:this.props.errors})},componentWillReceiveProps:function(nextProps){this.setState({title:nextProps.title,errors:nextProps.errors})},render:function(){var _state=this.state,title=_state.title,errors=_state.errors,liCnt=0,errs=errors.map(function(err){return React.createElement("li",{key:++liCnt},React.createElement("span",{className:"error"},err.msg))});return errors.length>0?React.createElement("div",{className:"irsa-error-summary"},React.createElement("div",{className:"panel panel-danger"},React.createElement("div",{className:"panel-heading"},React.createElement("h6",{className:"panel-title"},React.createElement("strong",null,title)))),React.createElement("div",null,React.createElement("ul",{className:"error-list"},errs))):React.createElement("span",null)}});module.exports=IrsaErrorSummary},function(module,exports){"use strict";var ERROR_IMAGE_PATH=gAppBaseURL+"Content/Images/no-media-irsa-logo.png",IrsaReactAssetPreview=React.createClass({displayName:"IrsaReactAssetPreview",propTypes:{url:React.PropTypes.string.isRequired,width:React.PropTypes.number,height:React.PropTypes.number,title:React.PropTypes.string},getDefaultProps:function(){return{width:650,height:450,title:"Preview"}},getInitialState:function(){return{url:"",show:!0}},_onErrorImage:function(){this.setState({url:ERROR_IMAGE_PATH})},_getImageHTML:function(){return React.createElement("img",{src:this.state.url,style:{width:this.state.width,height:this.state.height},onError:this._onErrorImage,alt:"Preview"})},_onHide:function(){this.setState({show:!1})},componentWillMount:function(){this.setState({url:this.props.url,title:this.props.title,show:!0,width:this.props.width,height:this.props.height})},componentWillReceiveProps:function(nextProps){this.setState({url:nextProps.url,title:nextProps.title,show:!0,width:nextProps.width,height:nextProps.height})},render:function(){return React.createElement(IrsaReactModal,{ref:"irsaReactAssetPreviewModal",title:this.state.title,show:this.state.show,onHide:this._onHide,content:this._getImageHTML(),width:this.state.width,height:this.state.height,buttons:[]})}});module.exports=IrsaReactAssetPreview},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _otherBreadcrumbsInfo=__webpack_require__(532),_otherBreadcrumbsInfo2=_interopRequireDefault(_otherBreadcrumbsInfo),TreeModel=__webpack_require__(450),URL=__webpack_require__(453),Querystring=__webpack_require__(463),_treeModel=(__webpack_require__(196),new TreeModel),_breadCrumbtorageKey="breadcrumbNode",_wsBreadCrumbKeyPrefix="bcrArray_",_breadcrumbQueryKey=getBreadCrumbQueryKey(),NavigationType={MainMenuLink:1,OtherLink:2,BreadcrumbLink:3},_breadCrumbComp=null,IrsaBreadcrumb=React.createClass({displayName:"IrsaBreadcrumb",propTypes:{menuRoot:React.PropTypes.any.isRequired,onComponentInitialized:React.PropTypes.func.isRequired},getInitialState:function(){return{bcArray:[]}},_getTreeNode:function(id){var node=this.bcRoot.first(function(nd){return nd.model.id==id});return node},_createTreeNode:function(elm){var $elm=$(elm),id=$elm.data("bcId"),href=$elm.attr("href"),text=$elm.text(),node=_treeModel.parse({id:id,href:href,text:text,element:elm});return node},_createBreadCrumbSystem:function(){var menuRoot=this.props.menuRoot;this.bcRoot=_treeModel.parse({id:"0",href:null,text:"",element:menuRoot}),this._traverseNodeChildren("> li > a[data-bc-id]",this.bcRoot),this._getOtherCommonLinksAndAppendToBCRoot(),this._appendOtherLinksDataToBCRoot(),this._displayBreadCrumb()},_traverseNodeChildren:function(selector,parentNode){var _this=this;$(parentNode.model.element).find(selector).each(function(idx,elm){var node=_this._createTreeNode(elm);parentNode.addChild(node),node.model.href&&"#"!=node.model.href&&_this._bindMainMenuNodeElementForClick(elm,node);var hasChildren=$(elm).find("+ul.dropdown-menu").length>0;1==hasChildren&&_this._traverseNodeChildren("+ul.dropdown-menu > li > a",node)})},_getOtherCommonLinksAndAppendToBCRoot:function(){var _this2=this;$("[data-bc-link=1]").each(function(idx,elm){var node=_this2._createTreeNode(elm);_this2.bcRoot.addChild(node),node.model.href&&"#"!=node.model.href&&_this2._bindMainMenuNodeElementForClick(elm,node)})},_appendOtherLinksDataToBCRoot:function(){if(this.otherBCRoot=_treeModel.parse(_otherBreadcrumbsInfo2.default),this.otherBCRoot)for(var nodesWithParents=this.otherBCRoot.all(function(node){return null!=node.model.parentId&&void 0!=node.model.parentId&&node.model.parentId.length>0}),nCnt=0;nCnt0&&bcWinStateFlagValue&&bcWinStateFlagValue.length>0;if(hasBCWinState)this.isHistoryPage=!0,this._writeToStorageArray(bcArray);else if(bcArray=this._getBCNodeArrayFromStorage(),bcArray&&bcArray.length>0)return void Promise.resolve().bind(this).then(function(){return this._saveBCNodeArrayToHistory(bcArray)}).then(function(){bcArray.length>0&&(this.activeNodeInfo=bcArray[bcArray.length-1]),this.setState({bcArray:bcArray})});bcArray.length>0&&(this.activeNodeInfo=bcArray[bcArray.length-1]),this.setState({bcArray:bcArray})})},_bindMainMenuNodeElementForClick:function(element,node){var _this3=this;$(element).attr("data-bc-bound","1"),$(element).on("click",function(e){e&&(e.preventDefault(),e.stopPropagation());var href=node.model.href;_this3._saveBCNodeToStorageArray(node,NavigationType.MainMenuLink,href),e&&e.ctrlKey?window.open(href):window.location.href=href})},_onBreadCrumbClick:function(nodeId,href){var bcArray=this._getBCNodeArrayFromStorage();Promise.resolve().bind(this).then(function(){return this._saveBCNodeArrayToHistory(bcArray)}).then(function(){var node=this._getTreeNode(nodeId);node&&this._saveBCNodeToStorageArray(node,NavigationType.BreadcrumbLink,href),window.location.href=href})},_getNodeBasicInfo:function(node){var model=node.model,objInfo={id:model.id,href:model.href,text:model.text};return objInfo},_getBCNodeArrayFromStorage:function(){var bcArray=[];if("undefined"!=typeof Storage){var storageInfo=window.sessionStorage.getItem(_breadCrumbtorageKey);storageInfo&&storageInfo.length>0&&(bcArray=JSON.parse(storageInfo))}return bcArray},_saveBCNodeToStorageArray:function(node,navigationType,href){if("undefined"!=typeof window.sessionStorage){var bcArray=[],storageInfo=window.sessionStorage.getItem(_breadCrumbtorageKey);if(storageInfo&&storageInfo.length>0&&(bcArray=JSON.parse(storageInfo)),navigationType==NavigationType.MainMenuLink){bcArray=[];var objInfo=this._getNodeBasicInfo(node);objInfo.openedHref=href,bcArray.push(objInfo),this._writeToStorageArray(bcArray)}else if(navigationType==NavigationType.BreadcrumbLink){for(var truncatedArray=[],y=0;y0){result+="?";var objQ=Querystring.parse(search),qry="";Object.keys(objQ).map(function(k){if("bbh"!=k&&k!=_breadcrumbQueryKey){var v=objQ[k];qry+=0==qry.length?k+"="+v:"&"+k+"="+v}}),result+=qry}return"?"==result.substr(-1)&&(result=result.substr(0,result.length-1)),result},_getBCList:function(){var _this4=this,bcArray=this.state.bcArray;if(0==bcArray.length)return[];var path=document.location.pathname;if("/"==path)return[];var arr=path.split("/");if(arr.length>1&&"Dashboard"==arr[1])return[];if(!this.isHistoryPage&&this.activeNodeInfo){var activeNodeHref=this._getURLWithoutIrsaParams(this.activeNodeInfo.openedHref),pageHref=this._getURLWithoutIrsaParams(document.location.href);if(activeNodeHref!=pageHref)return[]}var bcList=[],firstNode=this._getTreeNode(this.activeNodeInfo.id),nodeArr=firstNode.getPath();nodeArr.reverse(),nodeArr.map(function(m){"0"!=m.model.id&&null==bcArray.find(function(a){return a.id==m.model.id})&&bcArray.unshift(_this4._getNodeBasicInfo(m))});for(var _loop=function(n){var entry=bcArray[n];if("0"==entry.id)return"continue";var href=entry.href,cls="",isLast=n==bcArray.length-1;href&&0!=href.length&&"#"!=href&&1!=isLast||(cls="no-link"),bcList.push(React.createElement("li",{key:n},React.createElement("a",{"data-node-id":entry.id,href:"#",className:cls,onClick:function(e){return _this4._onClickBCLink(e,entry,isLast)}},entry.text)))},n=0;n
",that.marker.setPopupContent(popupContent)}),popupContent='
",this.marker.bindPopup(popupContent),this.marker.addTo(this.map)}}},{key:"render",value:function(){var _this2=this;return React.createElement("div",{className:"esrimap-container",style:{position:"relative",height:"100%"}},React.createElement("div",{className:"esrimap-canvas",ref:function(mapDiv){return _this2.mapDiv=mapDiv}}))}}]),EsriMap}(React.Component);exports.default=EsriMap},function(module,exports,__webpack_require__){"use strict";function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i1&&$.each(ticks,function(index,value){arrTicks.push(index),arrTickLabels.push(value)}),React.createElement("div",null,React.createElement(_reactBootstrapSlider2.default,{id:"input-slider",min:min,max:max,step:step,value:this.state.value,tooltip:tooltip,ticks:arrTicks,disabled:disabled,ticks_labels:arrTickLabels,orientation:orientation,slideStop:this.onChange,reverse:reverse}))}});module.exports=IrsaReactSlider},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(global,factory){__WEBPACK_AMD_DEFINE_ARRAY__=[exports,__webpack_require__(1),__webpack_require__(542)],__WEBPACK_AMD_DEFINE_FACTORY__=factory,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__,!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}(this,function(exports,_react,_bootstrapSlider){"use strict";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 _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function isPropNumberOrArray(props,propName,componentName){if("number"!=typeof props[propName]&&"undefined"!=typeof props[propName]&&!Array.isArray(props[propName]))return new Error([componentName,"requires that",propName,"be a number or an array."].join(" "))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReactBootstrapSlider=void 0;var _react2=_interopRequireDefault(_react),_bootstrapSlider2=_interopRequireDefault(_bootstrapSlider),_extends=Object.assign||function(target){for(var i=1;i1?objects:objects[0]}}if($){var logError="undefined"==typeof console?noop:function(message){console.error(message)};return $.bridget=function(namespace,PluginClass){addOptionMethod(PluginClass),bridge(namespace,PluginClass)},$.bridget}}var slice=Array.prototype.slice;defineBridget($)}($),function($){function createNewSlider(element,options){function getDataAttrib(element,optName){var dataName="data-slider-"+optName.replace(/_/g,"-"),dataValString=element.getAttribute(dataName);try{return JSON.parse(dataValString)}catch(err){return dataValString}}this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof element?this.element=document.querySelector(element):element instanceof HTMLElement&&(this.element=element),options=options?options:{};for(var optionTypes=Object.keys(this.defaultOptions),i=0;i0)for(var j=0;j0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",i=0;i0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",i=0;i0&&(this.options.max=Math.max.apply(Math,this.options.ticks),this.options.min=Math.min.apply(Math,this.options.ticks)),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=sliderTrackLow||this.trackLow,this.trackSelection=sliderTrackSelection||this.trackSelection,this.trackHigh=sliderTrackHigh||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=sliderMinHandle||this.handle1,this.handle2=sliderMaxHandle||this.handle2,updateSlider===!0)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),i=0;i0){for(var minv,maxv,minp,maxp=0,i=1;ithis.options.max?this.options.max:value},toPercentage:function(value){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var minv,maxv,minp,maxp=0,i=0;i0?this.options.ticks[i-1]:0,minp=i>0?this.options.ticks_positions[i-1]:0,maxv=this.options.ticks[i],maxp=this.options.ticks_positions[i];break}if(i>0){var partialPercentage=(value-minv)/(maxv-minv);return minp+partialPercentage*(maxp-minp)}}return 100*(value-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(percentage){var min=0===this.options.min?0:Math.log(this.options.min),max=Math.log(this.options.max),value=Math.exp(min+(max-min)*percentage/100);return Math.round(value)===this.options.max?this.options.max:(value=this.options.min+Math.round((value-this.options.min)/this.options.step)*this.options.step,valuethis.options.max?this.options.max:value)},toPercentage:function(value){if(this.options.max===this.options.min)return 0;var max=Math.log(this.options.max),min=0===this.options.min?0:Math.log(this.options.min),v=0===value?0:Math.log(value);return 100*(v-min)/(max-min)}}};if(Slider=function(element,options){return createNewSlider.call(this,element,options),this},Slider.prototype={_init:function(){},constructor:Slider,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,handle:"round",reversed:!1,rtl:"auto",enabled:!0,formatter:function(val){return Array.isArray(val)?val[0]+" : "+val[1]:val},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,ticks_tooltip:!1,scale:"linear",focus:!1,tooltip_position:null,labelledby:null,rangeHighlights:[]},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(val,triggerSlideEvent,triggerChangeEvent){val||(val=0);var oldValue=this.getValue();this._state.value=this._validateInputValue(val);var applyPrecision=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=applyPrecision(this._state.value[0]),this._state.value[1]=applyPrecision(this._state.value[1]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=applyPrecision(this._state.value),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,"hide"),"after"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min),this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var newValue=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(newValue),triggerSlideEvent===!0&&this._trigger("slide",newValue),oldValue!==newValue&&triggerChangeEvent===!0&&this._trigger("change",{oldValue:oldValue,newValue:newValue}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),$&&(this._unbindJQueryEventHandlers(),this.$element.removeData("slider"))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(evt,callback){return this._bindNonQueryEventHandler(evt,callback),this},off:function(evt,callback){$?(this.$element.off(evt,callback),this.$sliderElem.off(evt,callback)):this._unbindNonQueryEventHandler(evt,callback)},getAttribute:function(attribute){return attribute?this.options[attribute]:this.options},setAttribute:function(attribute,value){return this.options[attribute]=value,this},refresh:function(){return this._removeSliderEventHandlers(),createNewSlider.call(this,this.element,this.options),$&&$.data(this.element,"slider",this),this},relayout:function(){return this._resize(),this._layout(),this},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var ticks=this.ticksContainer.getElementsByClassName("slider-tick"),i=0;i=0?index:this.attributes["aria-valuenow"].value,hoverIndex=parseInt(idString,10);tempState.value[0]=hoverIndex,tempState.percentage[0]=reference.options.ticks_positions[hoverIndex],reference._setToolTipOnMouseOver(tempState),reference._showTooltip()};return tick.addEventListener("mouseenter",enter,!1),enter},addMouseLeave:function(reference,tick){var leave=function(){reference._hideTooltip()};return tick.addEventListener("mouseleave",leave,!1),leave}}},_layout:function(){var positionPercentages;if(positionPercentages=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=positionPercentages[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),isNaN(this.options.formatter(this._state.value[0]))&&this.handle1.setAttribute("aria-valuetext",this.options.formatter(this._state.value[0])),this.handle2.style[this.stylePos]=positionPercentages[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),isNaN(this.options.formatter(this._state.value[1]))&&this.handle2.setAttribute("aria-valuetext",this.options.formatter(this._state.value[1])),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var _i=0;_i0){var styleMargin,styleSize="vertical"===this.options.orientation?"height":"width";styleMargin="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var labelSize=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var extraMargin=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[styleMargin]=-labelSize/2+"px"),extraMargin=this.tickLabelContainer.offsetHeight;else for(i=0;iextraMargin&&(extraMargin=this.tickLabelContainer.childNodes[i].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=extraMargin+"px")}for(var i=0;i=positionPercentages[0]&&percentage<=positionPercentages[1]&&this._addClass(this.ticks[i],"in-selection"):"after"===this.options.selection&&percentage>=positionPercentages[0]?this._addClass(this.ticks[i],"in-selection"):"before"===this.options.selection&&percentage<=positionPercentages[0]&&this._addClass(this.ticks[i],"in-selection"),this.tickLabels[i]&&(this.tickLabels[i].style[styleSize]=labelSize+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[i]?(this.tickLabels[i].style.position="absolute",this.tickLabels[i].style[this.stylePos]=percentage+"%",this.tickLabels[i].style[styleMargin]=-labelSize/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[i].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[i].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[styleMargin]=this.sliderElem.offsetWidth/2*-1+"px"))}}var formattedTooltipVal;if(this.options.range){formattedTooltipVal=this.options.formatter(this._state.value),this._setText(this.tooltipInner,formattedTooltipVal),this.tooltip.style[this.stylePos]=(positionPercentages[1]+positionPercentages[0])/2+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetWidth/2+"px");var innerTooltipMinText=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,innerTooltipMinText);var innerTooltipMaxText=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,innerTooltipMaxText),this.tooltip_min.style[this.stylePos]=positionPercentages[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip_min,"margin-"+this.stylePos,-this.tooltip_min.offsetHeight/2+"px"):this._css(this.tooltip_min,"margin-"+this.stylePos,-this.tooltip_min.offsetWidth/2+"px"),this.tooltip_max.style[this.stylePos]=positionPercentages[1]+"%","vertical"===this.options.orientation?this._css(this.tooltip_max,"margin-"+this.stylePos,-this.tooltip_max.offsetHeight/2+"px"):this._css(this.tooltip_max,"margin-"+this.stylePos,-this.tooltip_max.offsetWidth/2+"px")}else formattedTooltipVal=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,formattedTooltipVal),this.tooltip.style[this.stylePos]=positionPercentages[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetWidth/2+"px");if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(positionPercentages[0],positionPercentages[1])+"%",this.trackSelection.style.top=Math.min(positionPercentages[0],positionPercentages[1])+"%",this.trackSelection.style.height=Math.abs(positionPercentages[0]-positionPercentages[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(positionPercentages[0],positionPercentages[1])-Math.abs(positionPercentages[0]-positionPercentages[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(positionPercentages[0],positionPercentages[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(positionPercentages[0],positionPercentages[1])+"%":this.trackSelection.style.left=Math.min(positionPercentages[0],positionPercentages[1])+"%",this.trackSelection.style.width=Math.abs(positionPercentages[0]-positionPercentages[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(positionPercentages[0],positionPercentages[1])-Math.abs(positionPercentages[0]-positionPercentages[1])+"%";var offset_min=this.tooltip_min.getBoundingClientRect(),offset_max=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?offset_min.right>offset_max.left?(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):offset_min.right>offset_max.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(start,end){return this._isHighlightRange(start,end)?start>end?{start:end,size:start-end}:{start:start,size:end-start}:null},_isHighlightRange:function(start,end){return 0<=start&&start<=100&&0<=end&&end<=100},_resize:function(ev){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(element,prop){element.style.removeProperty?element.style.removeProperty(prop):element.style.removeAttribute(prop)},_mousedown:function(ev){if(!this._state.enabled)return!1;this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var percentage=this._getPercentage(ev);if(this.options.range){var diff1=Math.abs(this._state.percentage[0]-percentage),diff2=Math.abs(this._state.percentage[1]-percentage);this._state.dragged=diff1=-5&&(yDiff>=15||yDiff<=-15)?this._mousedown(ev):yDiff<=5&&yDiff>=-5&&(xDiff>=15||xDiff<=-15)&&this._mousedown(ev))}},_adjustPercentageForRangeSliders:function(percentage){if(this.options.range){var precision=this._getNumDigitsAfterDecimalPlace(percentage);precision=precision?precision-1:0;var percentageWithAdjustedPrecision=this._applyToFixedAndParseFloat(percentage,precision);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],precision)percentageWithAdjustedPrecision?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._state.value[1]/this.options.max*100percentage&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(){if(!this._state.enabled)return!1;this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,this._state.over===!1&&this._hideTooltip();var val=this._calculateValue(!0);return this._layout(),this._setDataVal(val),this._trigger("slideStop",val),!1},_calculateValue:function(snapToClosestTick){var val;if(this.options.range?(val=[this.options.min,this.options.max],0!==this._state.percentage[0]&&(val[0]=this._toValue(this._state.percentage[0]),val[0]=this._applyPrecision(val[0])),100!==this._state.percentage[1]&&(val[1]=this._toValue(this._state.percentage[1]),val[1]=this._applyPrecision(val[1]))):(val=this._toValue(this._state.percentage[0]),val=parseFloat(val),val=this._applyPrecision(val)),snapToClosestTick){for(var min=[val,1/0],i=0;i0&&length-1 in obj)}function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}function fcssescape(ch,asCodePoint){return asCodePoint?"\0"===ch?"�":ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ":"\\"+ch}function winnow(elements,qualifier,not){return isFunction(qualifier)?jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not}):qualifier.nodeType?jQuery.grep(elements,function(elem){return elem===qualifier!==not}):"string"!=typeof qualifier?jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not}):jQuery.filter(qualifier,elements,not)}function sibling(cur,dir){for(;(cur=cur[dir])&&1!==cur.nodeType;);return cur}function createOptions(options){var object={};return jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=!0}),object}function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{value&&isFunction(method=value.promise)?method.call(value).done(resolve).fail(reject):value&&isFunction(method=value.then)?method.call(value,resolve,reject):resolve.apply(void 0,[value].slice(noValue))}catch(value){reject.apply(void 0,[value])}}function completed(){document.removeEventListener("DOMContentLoaded",completed),window.removeEventListener("load",completed),jQuery.ready()}function fcamelCase(_all,letter){return letter.toUpperCase()}function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)}function Data(){this.expando=jQuery.expando+Data.uid++}function getData(data){return"true"===data||"false"!==data&&("null"===data?null:data===+data+""?+data:rbrace.test(data)?JSON.parse(data):data)}function dataAttr(elem,key,data){var name;if(void 0===data&&1===elem.nodeType)if(name="data-"+key.replace(rmultiDash,"-$&").toLowerCase(),data=elem.getAttribute(name),"string"==typeof data){try{data=getData(data)}catch(e){}dataUser.set(elem,key,data)}else data=void 0;return data}function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,"")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=elem.nodeType&&(jQuery.cssNumber[prop]||"px"!==unit&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){for(initial/=2,unit=unit||initialInUnit[3],initialInUnit=+initial||1;maxIterations--;)jQuery.style(elem,prop,initialInUnit+unit),(1-scale)*(1-(scale=currentValue()/initial||.5))<=0&&(maxIterations=0),initialInUnit/=scale;initialInUnit*=2,jQuery.style(elem,prop,initialInUnit+unit),valueParts=valueParts||[]}return valueParts&&(initialInUnit=+initialInUnit||+initial||0,adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2],tween&&(tween.unit=unit,tween.start=initialInUnit,tween.end=adjusted)),adjusted}function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];return display?display:(temp=doc.body.appendChild(doc.createElement(nodeName)),display=jQuery.css(temp,"display"),temp.parentNode.removeChild(temp),"none"===display&&(display="block"),defaultDisplayMap[nodeName]=display,display)}function showHide(elements,show){for(var display,elem,values=[],index=0,length=elements.length;index-1)ignored&&ignored.push(elem);else if(attached=isAttached(elem),tmp=getAll(fragment.appendChild(elem),"script"),attached&&setGlobalEval(tmp),scripts)for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return fragment}function returnTrue(){return!0}function returnFalse(){return!1}function on(elem,types,selector,data,fn,one){var origFn,type;if("object"==typeof types){"string"!=typeof selector&&(data=data||selector,selector=void 0);for(type in types)on(elem,type,selector,data,types[type],one);return elem}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),fn===!1)fn=returnFalse;else if(!fn)return elem;return 1===one&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}function leverageNative(el,type,isSetup){return isSetup?(dataPriv.set(el,type,!1),void jQuery.event.add(el,type,{namespace:!1,handler:function(event){var result,saved=dataPriv.get(this,type);if(1&event.isTrigger&&this[type]){if(saved)(jQuery.event.special[type]||{}).delegateType&&event.stopPropagation();else if(saved=slice.call(arguments),dataPriv.set(this,type,saved),this[type](),result=dataPriv.get(this,type),dataPriv.set(this,type,!1),saved!==result)return event.stopImmediatePropagation(),event.preventDefault(),result}else saved&&(dataPriv.set(this,type,jQuery.event.trigger(saved[0],saved.slice(1),this)),event.stopPropagation(),event.isImmediatePropagationStopped=returnTrue)}})):void(void 0===dataPriv.get(el,type)&&jQuery.event.add(el,type,returnTrue))}function manipulationTarget(elem,content){return nodeName(elem,"table")&&nodeName(11!==content.nodeType?content:content.firstChild,"tr")?jQuery(elem).children("tbody")[0]||elem:elem}function disableScript(elem){return elem.type=(null!==elem.getAttribute("type"))+"/"+elem.type,elem}function restoreScript(elem){return"true/"===(elem.type||"").slice(0,5)?elem.type=elem.type.slice(5):elem.removeAttribute("type"),elem}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,udataOld,udataCur,events;if(1===dest.nodeType){if(dataPriv.hasData(src)&&(pdataOld=dataPriv.get(src),events=pdataOld.events)){dataPriv.remove(dest,"handle events");for(type in events)for(i=0,l=events[type].length;i1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return collection.each(function(index){var self=collection.eq(index);valueIsFunction&&(args[0]=value.call(this,index,self.html())),domManip(self,args,callback,ignored)});if(l&&(fragment=buildFragment(args,collection[0].ownerDocument,!1,collection,ignored),first=fragment.firstChild,1===fragment.childNodes.length&&(fragment=first),first||ignored)){for(scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;i=0&&(delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-.5))||0),delta+marginDelta}function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),boxSizingNeeded=!support.boxSizingReliable()||extra,isBorderBox=boxSizingNeeded&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles),valueIsBorderBox=isBorderBox,val=curCSS(elem,dimension,styles),offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);if(rnumnonpx.test(val)){if(!extra)return val;val="auto"}return(!support.boxSizingReliable()&&isBorderBox||!support.reliableTrDimensions()&&nodeName(elem,"tr")||"auto"===val||!parseFloat(val)&&"inline"===jQuery.css(elem,"display",!1,styles))&&elem.getClientRects().length&&(isBorderBox="border-box"===jQuery.css(elem,"boxSizing",!1,styles),valueIsBorderBox=offsetProp in elem,valueIsBorderBox&&(val=elem[offsetProp])),val=parseFloat(val)||0,val+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val)+"px"}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}function schedule(){inProgress&&(document.hidden===!1&&window.requestAnimationFrame?window.requestAnimationFrame(schedule):window.setTimeout(schedule,jQuery.fx.interval),jQuery.fx.tick())}function createFxNow(){return window.setTimeout(function(){fxNow=void 0}),fxNow=Date.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};for(includeWidth=includeWidth?1:0;i<4;i+=2-includeWidth)which=cssExpand[i],attrs["margin"+which]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;index=0&&jExpr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el)}catch(e){return!1}finally{el.parentNode&&el.parentNode.removeChild(el),el=null}}function createInputPseudo(type){return function(elem){return nodeName(elem,"input")&&elem.type===type}}function createButtonPseudo(type){return function(elem){return(nodeName(elem,"input")||nodeName(elem,"button"))&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){return"form"in elem?elem.parentNode&&elem.disabled===!1?"label"in elem?"label"in elem.parentNode?elem.parentNode.disabled===disabled:elem.disabled===disabled:elem.isDisabled===disabled||elem.isDisabled!==!disabled&&inDisabledFieldset(elem)===disabled:elem.disabled===disabled:"label"in elem&&elem.disabled===disabled}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&"undefined"!=typeof context.getElementsByTagName&&context}function setDocument(node){var subWindow,doc=node?node.ownerDocument||node:preferredDoc;return doc!=document&&9===doc.nodeType&&doc.documentElement?(document=doc,documentElement=document.documentElement, documentIsHTML=!jQuery.isXMLDoc(document),matches=documentElement.matches||documentElement.webkitMatchesSelector||documentElement.msMatchesSelector,documentElement.msMatchesSelector&&preferredDoc!=document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow&&subWindow.addEventListener("unload",unloadHandler),support.getById=assert(function(el){return documentElement.appendChild(el).id=jQuery.expando,!document.getElementsByName||!document.getElementsByName(jQuery.expando).length}),support.disconnectedMatch=assert(function(el){return matches.call(el,"*")}),support.scope=assert(function(){return document.querySelectorAll(":scope")}),support.cssHas=assert(function(){try{return document.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),support.getById?(Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}},Expr.find.ID=function(id,context){if("undefined"!=typeof context.getElementById&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[]}}):(Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node="undefined"!=typeof elem.getAttributeNode&&elem.getAttributeNode("id");return node&&node.value===attrId}},Expr.find.ID=function(id,context){if("undefined"!=typeof context.getElementById&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){if(node=elem.getAttributeNode("id"),node&&node.value===id)return[elem];for(elems=context.getElementsByName(id),i=0;elem=elems[i++];)if(node=elem.getAttributeNode("id"),node&&node.value===id)return[elem]}return[]}}),Expr.find.TAG=function(tag,context){return"undefined"!=typeof context.getElementsByTagName?context.getElementsByTagName(tag):context.querySelectorAll(tag)},Expr.find.CLASS=function(className,context){if("undefined"!=typeof context.getElementsByClassName&&documentIsHTML)return context.getElementsByClassName(className)},rbuggyQSA=[],assert(function(el){var input;documentElement.appendChild(el).innerHTML="",el.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"),el.querySelectorAll("[id~="+expando+"-]").length||rbuggyQSA.push("~="),el.querySelectorAll("a#"+expando+"+*").length||rbuggyQSA.push(".#.+[+~]"),el.querySelectorAll(":checked").length||rbuggyQSA.push(":checked"),input=document.createElement("input"),input.setAttribute("type","hidden"),el.appendChild(input).setAttribute("name","D"),documentElement.appendChild(el).disabled=!0,2!==el.querySelectorAll(":disabled").length&&rbuggyQSA.push(":enabled",":disabled"),input=document.createElement("input"),input.setAttribute("name",""),el.appendChild(input),el.querySelectorAll("[name='']").length||rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+whitespace+"*(?:''|\"\")")}),support.cssHas||rbuggyQSA.push(":has"),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),sortOrder=function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare?compare:(compare=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&compare||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a===document||a.ownerDocument==preferredDoc&&find.contains(preferredDoc,a)?-1:b===document||b.ownerDocument==preferredDoc&&find.contains(preferredDoc,b)?1:sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0:4&compare?-1:1)},document):document}function setFilters(){}function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){matched&&!(match=rcomma.exec(soFar))||(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rleadingCombinator.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrimCSS," ")}),soFar=soFar.slice(matched.length));for(type in Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));if(!matched)break}return parseOnly?soFar.length:soFar?find.error(selector):tokenCache(selector,groups).slice(0)}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";i1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;i-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!=outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));return checkContext=null,ret}];i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrimCSS,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context==document||context||outermost);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0,context||elem.ownerDocument==document||(setDocument(elem),xml=!documentIsHTML);matcher=elementMatchers[j++];)if(matcher(elem,context||document,xml)){push.call(results,elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&jQuery.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}function compile(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){for(match||(match=tokenize(selector)),i=match.length;i--;)cached=matcherFromTokens(match[i]),cached[expando]?setMatchers.push(cached):elementMatchers.push(cached);cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers)),cached.selector=selector}return cached}function select(selector,context,results,seed){var i,tokens,token,type,find,compiled="function"==typeof selector&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);if(results=results||[],1===match.length){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&"ID"===(token=tokens[0]).type&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0],!context)return results;compiled&&(context=context.parentNode),selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,seed),results;break}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context),results}var i,Expr,outermostContext,sortInput,hasDuplicate,document,documentElement,documentIsHTML,rbuggyQSA,matches,push=pushNative,expando=jQuery.expando,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),nonnativeSelectorCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|.*)\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rdescend=new RegExp(whitespace+"|>"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\([^\\r\\n\\f])","g"),funescape=function(escape,nonHex){var high="0x"+escape.slice(1)-65536;return nonHex?nonHex:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320)},unloadHandler=function(){setDocument()},inDisabledFieldset=addCombinator(function(elem){return elem.disabled===!0&&nodeName(elem,"fieldset")},{dir:"parentNode",next:"legend"});try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:function(target,els){pushNative.apply(target,slice.call(els))},call:function(target){pushNative.apply(target,slice.call(arguments,1))}}}find.matches=function(expr,elements){return find(expr,null,null,elements)},find.matchesSelector=function(elem,expr){if(setDocument(elem),documentIsHTML&&!nonnativeSelectorCache[expr+" "]&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){nonnativeSelectorCache(expr,!0)}return find(expr,document,null,[elem]).length>0},find.contains=function(context,elem){return(context.ownerDocument||context)!=document&&setDocument(context),jQuery.contains(context,elem)},find.attr=function(elem,name){(elem.ownerDocument||elem)!=document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:elem.getAttribute(name)},find.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},jQuery.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.sortStable,sortInput=!support.sortStable&&slice.call(results,0),sort.call(results,sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)splice.call(results,duplicates[j],1)}return sortInput=null,results},jQuery.fn.uniqueSort=function(){return this.pushStack(jQuery.uniqueSort(slice.apply(this)))},Expr=jQuery.expr={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||find.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&find.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[4]||match[5]||"":unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return nodeName(elem,expectedNodeName)}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test("string"==typeof elem.className&&elem.className||"undefined"!=typeof elem.getAttribute&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=find.attr(elem,name);return null==result?"!="===operator:!operator||(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:"|="===operator&&(result===check||result.slice(0,check.length+1)===check+"-"))}},CHILD:function(type,what,_argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;return 1===first&&0===last?function(elem){return!!elem.parentNode}:function(elem,_context,xml){var cache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=!1;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?nodeName(node,name):1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(outerCache=parent[expando]||(parent[expando]={}),cache=outerCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=nodeIndex&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(outerCache=elem[expando]||(elem[expando]={}),cache=outerCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=nodeIndex),diff===!1)for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?!nodeName(node,name):1!==node.nodeType)||!++diff||(useCache&&(outerCache=node[expando]||(node[expando]={}),outerCache[type]=[dirruns,diff]),node!==elem)););return diff-=last,diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||find.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf.call(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrimCSS,"$1"));return matcher[expando]?markFunction(function(seed,matches,_context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,_context,xml){return input[0]=elem,matcher(input,null,xml,results),input[0]=null,!results.pop()}}),has:markFunction(function(selector){return function(elem){return find(selector,elem).length>0}}),contains:markFunction(function(text){return text=text.replace(runescape,funescape),function(elem){return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||find.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return elemLang=elemLang.toLowerCase(),elemLang===lang||0===elemLang.indexOf(lang+"-");while((elem=elem.parentNode)&&1===elem.nodeType);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===documentElement},focus:function(elem){return elem===safeActiveElement()&&document.hasFocus()&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(!1),disabled:createDisabledPseudo(!0),checked:function(elem){return nodeName(elem,"input")&&!!elem.checked||nodeName(elem,"option")&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){return nodeName(elem,"input")&&"button"===elem.type||nodeName(elem,"button")},text:function(elem){var attr;return nodeName(elem,"input")&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(_matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(_matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;ilength?length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.uniqueSort(ret):ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector)return this;if(root=root||rootjQuery,"string"==typeof selector){if(match="<"===selector[0]&&">"===selector[selector.length-1]&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),!match||!match[1]&&context)return!context||context.jquery?(context||root).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}return elem=document.getElementById(match[2]),elem&&(this[0]=elem,this.length=1),this}return selector.nodeType?(this[0]=selector,this.length=1,this):isFunction(selector)?void 0!==root.ready?root.ready(selector):selector(jQuery):jQuery.makeArray(selector,this)};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){for(var i=0;i-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){return elem?"string"==typeof elem?indexOf.call(jQuery(elem),this[0]):indexOf.call(this,elem.jquery?elem[0]:elem):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,_i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,_i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,_i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){return null!=elem.contentDocument&&getProto(elem.contentDocument)?elem.contentDocument:(nodeName(elem,"template")&&(elem=elem.content||elem),jQuery.merge([],elem.childNodes))}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(matched=jQuery.filter(selector,matched)),this.length>1&&(guaranteedUnique[name]||jQuery.uniqueSort(matched),rparentsprev.test(name)&&matched.reverse()),this.pushStack(matched)}});var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;jQuery.Callbacks=function(options){options="string"==typeof options?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){for(locked=locked||options.once,fired=firing=!0;queue.length;firingIndex=-1)for(memory=queue.shift();++firingIndex-1;)list.splice(index,1),index<=firingIndex&&firingIndex--}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){return list&&(list=[]),this},disable:function(){return locked=queue=[],list=memory="",this},disabled:function(){return!list},lock:function(){return locked=queue=[],memory||firing||(list=memory=""),this},locked:function(){return!!locked},fireWith:function(context,args){return locked||(args=args||[],args=[context,args.slice?args.slice():args],queue.push(args),firing||fire()),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self},jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this},catch:function(fn){return promise.then(null,fn)},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(_i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&isFunction(returned.promise)?returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject):newDefer[tuple[0]+"With"](this,fn?[returned]:arguments)})}),fns=null}).promise()},then:function(onFulfilled,onRejected,onProgress){function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(!(depth=maxDepth&&(handler!==Thrower&&(that=void 0,args=[e]),deferred.rejectWith(that,args))}};depth?process():(jQuery.Deferred.getErrorHook?process.error=jQuery.Deferred.getErrorHook():jQuery.Deferred.getStackHook&&(process.error=jQuery.Deferred.getStackHook()),window.setTimeout(process))}}var maxDepth=0;return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith)),tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity)),tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function(obj){return null!=obj?jQuery.extend(obj,promise):promise}},deferred={};return jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add,stateString&&list.add(function(){state=stateString},tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock),list.add(tuple[3].fire),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?void 0:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),primary=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this,resolveValues[i]=arguments.length>1?slice.call(arguments):value,--remaining||primary.resolveWith(resolveContexts,resolveValues)}};if(remaining<=1&&(adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,!remaining),"pending"===primary.state()||isFunction(resolveValues[i]&&resolveValues[i].then)))return primary.then();for(;i--;)adoptValue(resolveValues[i],updateFunc(i),primary.reject);return primary.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,asyncError){window.console&&window.console.warn&&error&&rerrorNames.test(error.name)&&window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,asyncError)},jQuery.readyException=function(error){window.setTimeout(function(){throw error})};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){return readyList.then(fn).catch(function(error){jQuery.readyException(error)}),this},jQuery.extend({isReady:!1,readyWait:1,ready:function(wait){(wait===!0?--jQuery.readyWait:jQuery.isReady)||(jQuery.isReady=!0,wait!==!0&&--jQuery.readyWait>0||readyList.resolveWith(document,[jQuery]))}}),jQuery.ready.then=readyList.then,"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed),window.addEventListener("load",completed));var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=null==key;if("object"===toType(key)){chainable=!0;for(i in key)access(elems,fn,i,key[i],!0,emptyGet,raw)}else if(void 0!==value&&(chainable=!0,isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,_key,value){return bulk.call(jQuery(elem),value)})),fn))for(;i1,null,!0)},removeData:function(key){return this.each(function(){dataUser.remove(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=dataPriv.get(elem,type),data&&(!queue||Array.isArray(data)?queue=dataPriv.access(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key])})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length\x20\t\r\n\f]*)/i,rscriptType=/^$|^module$|\/(?:java|ecma)script/i;!function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio"),input.setAttribute("checked","checked"),input.setAttribute("name","t"),div.appendChild(input),support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,div.innerHTML="",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue,div.innerHTML="",support.option=!!div.lastChild}();var wrapMap={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,support.option||(wrapMap.optgroup=wrapMap.option=[1,""]);var rhtml=/<|&#?\w+;/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(acceptData(elem))for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),selector&&jQuery.find.matchesSelector(documentElement,selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events=Object.create(null)),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return"undefined"!=typeof jQuery&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):void 0}),types=(types||"").match(rnothtmlwhite)||[""],t=types.length;t--;)tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||elem.addEventListener&&elem.addEventListener(type,eventHandle)),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0)},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(elemData&&(events=elemData.events)){for(types=(types||"").match(rnothtmlwhite)||[""],t=types.length;t--;)if(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,handlers=events[type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);jQuery.isEmptyObject(events)&&dataPriv.remove(elem,"handle events")}},dispatch:function(nativeEvent){var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),event=jQuery.event.fix(nativeEvent),handlers=(dataPriv.get(this,"events")||Object.create(null))[event.type]||[],special=jQuery.event.special[event.type]||{};for(args[0]=event,i=1;i=1))for(;cur!==this;cur=cur.parentNode||this)if(1===cur.nodeType&&("click"!==event.type||cur.disabled!==!0)){for(matchedHandlers=[],matchedSelectors={},i=0;i-1:jQuery.find(sel,this,null,[cur]).length),matchedSelectors[sel]&&matchedHandlers.push(handleObj);matchedHandlers.length&&handlerQueue.push({elem:cur,handlers:matchedHandlers})}return cur=this,delegateCount\s*$/g;jQuery.extend({htmlPrefilter:function(html){return html},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(!0),inPage=isAttached(elem);if(!(support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0,l=srcElements.length;i0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),clone},cleanData:function(elems){for(var data,elem,type,special=jQuery.event.special,i=0;void 0!==(elem=elems[i]);i++)if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);elem[dataPriv.expando]=void 0}elem[dataUser.expando]&&(elem[dataUser.expando]=void 0)}}}),jQuery.fn.extend({detach:function(selector){return remove(this,selector,!0)},remove:function(selector){return remove(this,selector)},text:function(value){return access(this,function(value){return void 0===value?jQuery.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=value)})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return domManip(this,arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return domManip(this,arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++)1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.textContent="");return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null!=dataAndEvents&&dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value&&1===elem.nodeType)return elem.innerHTML;if("string"==typeof value&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i1)}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||jQuery.easing._default,this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this); },run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.options.duration?this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):this.pos=eased=percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return 1!==tween.elem.nodeType||null!=tween.elem[tween.prop]&&null==tween.elem.style[tween.prop]?tween.elem[tween.prop]:(result=jQuery.css(tween.elem,tween.prop,""),result&&"auto"!==result?result:0)},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):1!==tween.elem.nodeType||!jQuery.cssHooks[tween.prop]&&null==tween.elem.style[finalPropName(tween.prop)]?tween.elem[tween.prop]=tween.now:jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2},_default:"swing"},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);return adjustCSS(tween.elem,prop,rcssNum.exec(value),tween),tween}]},tweener:function(props,callback){isFunction(props)?(callback=props,props=["*"]):props=props.match(rnothtmlwhite);for(var prop,index=0,length=props.length;index1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}}),jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return"undefined"==typeof elem.getAttribute?jQuery.prop(elem,name,value):(1===nType&&jQuery.isXMLDoc(elem)||(hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:void 0)),void 0!==value?null===value?void jQuery.removeAttr(elem,name):hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(ret=jQuery.find.attr(elem,name),null==ret?void 0:ret))},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)elem.removeAttribute(name)}}),boolHook={set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):elem.setAttribute(name,name),name}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();return isXML||(handle=attrHandle[lowercaseName],attrHandle[lowercaseName]=ret,ret=null!=getter(elem,name,isXML)?lowercaseName:null,attrHandle[lowercaseName]=handle),ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}}),jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return 1===nType&&jQuery.isXMLDoc(elem)||(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&parent.parentNode&&parent.parentNode.selectedIndex,null},set:function(elem){var parent=elem.parentNode;parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex)}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this}),jQuery.fn.extend({addClass:function(value){var classNames,cur,curValue,className,i,finalValue;return isFunction(value)?this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))}):(classNames=classesToArray(value),classNames.length?this.each(function(){if(curValue=getClass(this),cur=1===this.nodeType&&" "+stripAndCollapse(curValue)+" "){for(i=0;i-1;)cur=cur.replace(" "+className+" "," ");finalValue=stripAndCollapse(cur),curValue!==finalValue&&this.setAttribute("class",finalValue)}}):this):this.attr("class","")},toggleClass:function(value,stateVal){var classNames,className,i,self,type=typeof value,isValidValue="string"===type||Array.isArray(value);return isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)}):"boolean"==typeof stateVal&&isValidValue?stateVal?this.addClass(value):this.removeClass(value):(classNames=classesToArray(value),this.each(function(){if(isValidValue)for(self=jQuery(this),i=0;i-1)return!0;return!1}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];{if(arguments.length)return valueIsFunction=isFunction(value),this.each(function(i){var val;1===this.nodeType&&(val=valueIsFunction?value.call(this,i,jQuery(this).val()):value,null==val?val="":"number"==typeof val?val+="":Array.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))});if(elem)return hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:(ret=elem.value,"string"==typeof ret?ret.replace(rreturn,""):null==ret?"":ret)}}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return null!=val?val:stripAndCollapse(jQuery.text(elem))}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type,values=one?null:[],max=one?index+1:options.length;for(i=index<0?max:one?index:0;i-1)&&(optionSet=!0);return optionSet||(elem.selectedIndex=-1),values}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1}},support.checkOn||(jQuery.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})});var location=window.location,nonce={guid:Date.now()},rquery=/\?/;jQuery.parseXML=function(data){var xml,parserErrorElem;if(!data||"string"!=typeof data)return null;try{xml=(new window.DOMParser).parseFromString(data,"text/xml")}catch(e){}return parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0],xml&&!parserErrorElem||jQuery.error("Invalid XML: "+(parserErrorElem?jQuery.map(parserErrorElem.childNodes,function(el){return el.textContent}).join("\n"):data)),xml};var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if(cur=lastElement=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>-1&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,event=event[jQuery.expando]?event:new jQuery.Event(type,"object"==typeof event&&event),event.isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||special.trigger.apply(elem,data)!==!1)){if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)lastElement=cur,event.type=i>1?bubbleType:special.bindType||type,handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&dataPriv.get(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&handle.apply&&acceptData(cur)&&(event.result=handle.apply(cur,data),event.result===!1&&event.preventDefault());return event.type=type,onlyHandlers||event.isDefaultPrevented()||special._default&&special._default.apply(eventPath.pop(),data)!==!1||!acceptData(elem)||ontype&&isFunction(elem[type])&&!isWindow(elem)&&(tmp=elem[ontype],tmp&&(elem[ontype]=null),jQuery.event.triggered=type,event.isPropagationStopped()&&lastElement.addEventListener(type,stopPropagationCallback),elem[type](),event.isPropagationStopped()&&lastElement.removeEventListener(type,stopPropagationCallback),jQuery.event.triggered=void 0,tmp&&(elem[ontype]=tmp)),event.result}},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0});jQuery.event.trigger(e,null,elem)}}),jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem)return jQuery.event.trigger(type,data,elem,!0)}});var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(null==value?"":value)};if(null==a)return"";if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(_i,elem){var val=jQuery(this).val();return null==val?null:Array.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href,jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;completed||(completed=!0,timeoutTimer&&window.clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&status<300||304===status,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),!isSuccess&&jQuery.inArray("script",s.dataTypes)>-1&&jQuery.inArray("json",s.dataTypes)<0&&(s.converters["text script"]=function(){}),response=ajaxConvert(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[cacheURL]=modified),modified=jqXHR.getResponseHeader("etag"),modified&&(jQuery.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,error=response.error,isSuccess=!error)):(error=statusText,!status&&statusText||(statusText="error",status<0&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}"object"==typeof url&&(options=url,url=void 0),options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()+" "]=(responseHeaders[match[1].toLowerCase()+" "]||[]).concat(match[2]);match=responseHeaders[key.toLowerCase()+" "]}return null==match?null:match.join(", ")},getAllResponseHeaders:function(){return completed?responseHeadersString:null},setRequestHeader:function(name,value){return null==completed&&(name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return null==completed&&(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(completed)jqXHR.always(map[jqXHR.status]);else for(code in map)statusCode[code]=[statusCode[code],map[code]];return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR),s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""],null==s.crossDomain){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url,urlAnchor.href=urlAnchor.href,s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!=urlAnchor.protocol+"//"+urlAnchor.host}catch(e){s.crossDomain=!0}}if(s.data&&s.processData&&"string"!=typeof s.data&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),completed)return jqXHR;fireGlobals=jQuery.event&&s.global,fireGlobals&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url.replace(rhash,""),s.hasContent?s.data&&s.processData&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&(s.data=s.data.replace(r20,"+")):(uncached=s.url.slice(cacheURL.length),s.data&&(s.processData||"string"==typeof s.data)&&(cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),s.cache===!1&&(cacheURL=cacheURL.replace(rantiCache,"$1"),uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce.guid++ +uncached),s.url=cacheURL+uncached),s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])),(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||completed))return jqXHR.abort();if(strAbort="abort",completeDeferred.add(s.complete),jqXHR.done(s.success),jqXHR.fail(s.error),transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){if(jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),completed)return jqXHR;s.async&&s.timeout>0&&(timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{completed=!1,transport.send(requestHeaders,done)}catch(e){if(completed)throw e;done(-1,e)}}else done(-1,"No Transport");return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,void 0,callback,"script")}}),jQuery.each(["get","post"],function(_i,method){jQuery[method]=function(url,data,callback,type){return isFunction(data)&&(type=type||callback,callback=data,data=void 0),jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}}),jQuery.ajaxPrefilter(function(s){var i;for(i in s.headers)"content-type"===i.toLowerCase()&&(s.contentType=s.headers[i]||"")}),jQuery._evalUrl=function(url,options,doc){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(response){jQuery.globalEval(response,options,doc)}})},jQuery.fn.extend({wrapAll:function(html){var wrap;return this[0]&&(isFunction(html)&&(html=html.call(this[0])),wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map(function(){for(var elem=this;elem.firstElementChild;)elem=elem.firstElementChild;return elem}).append(this)),this},wrapInner:function(html){return isFunction(html)?this.each(function(i){jQuery(this).wrapInner(html.call(this,i))}):this.each(function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html)})},unwrap:function(selector){return this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes)}),this}}),jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem)},jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)},jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain)return{send:function(headers,complete){var i,xhr=options.xhr();if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");for(i in headers)xhr.setRequestHeader(i,headers[i]);callback=function(type){return function(){callback&&(callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null,"abort"===type?xhr.abort():"error"===type?"number"!=typeof xhr.status?complete(0,"error"):complete(xhr.status,xhr.statusText):complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,"text"!==(xhr.responseType||"text")||"string"!=typeof xhr.responseText?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders()))}},xhr.onload=callback(),errorCallback=xhr.onerror=xhr.ontimeout=callback("error"),void 0!==xhr.onabort?xhr.onabort=errorCallback:xhr.onreadystatechange=function(){4===xhr.readyState&&window.setTimeout(function(){callback&&errorCallback()})},callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback)throw e}},abort:function(){callback&&callback()}}}),jQuery.ajaxPrefilter(function(s){s.crossDomain&&(s.contents.script=!1)}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}}),jQuery.ajaxPrefilter("script",function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET")}),jQuery.ajaxTransport("script",function(s){if(s.crossDomain||s.scriptAttrs){var script,callback;return{send:function(_,complete){script=jQuery("