{"version":3,"sources":["webpack://QuodemBootloader/webpack/universalModuleDefinition","webpack://QuodemBootloader/webpack/bootstrap","webpack://QuodemBootloader/./StylesPathBuilder.js","webpack://QuodemBootloader/external \"QuodemBootloaderConfigProvider\"","webpack://QuodemBootloader/./ScriptsPathBuilder.js","webpack://QuodemBootloader/../node_modules/pop-iterate/iteration.js","webpack://QuodemBootloader/../node_modules/pop-iterate/array-iterator.js","webpack://QuodemBootloader/../node_modules/event-handler-manager/index.ts","webpack://QuodemBootloader/./StylesInjector.js","webpack://QuodemBootloader/./SingleStyleInjector.js","webpack://QuodemBootloader/./StylesLoader.js","webpack://QuodemBootloader/./DependenciesModuleConfigBuilder.js","webpack://QuodemBootloader/./ExportsModuleConfigBuilder.js","webpack://QuodemBootloader/./PathModuleConfigBuilder.js","webpack://QuodemBootloader/../node_modules/headjs/dist/1.0.0/head.load.min.js","webpack://QuodemBootloader/./ScriptsInjector.js","webpack://QuodemBootloader/./ScriptsConfigBuilder.js","webpack://QuodemBootloader/../node_modules/webpack/buildin/global.js","webpack://QuodemBootloader/../node_modules/asap/browser-raw.js","webpack://QuodemBootloader/../node_modules/asap/browser-asap.js","webpack://QuodemBootloader/../node_modules/pop-iterate/object-iterator.js","webpack://QuodemBootloader/../node_modules/pop-iterate/pop-iterate.js","webpack://QuodemBootloader/../node_modules/weak-map/weak-map.js","webpack://QuodemBootloader/../node_modules/process/browser.js","webpack://QuodemBootloader/../node_modules/q/q.js","webpack://QuodemBootloader/../node_modules/event-handler-manager/lib/EventHandlerManager.js","webpack://QuodemBootloader/../node_modules/event-handler-manager/lib/IEventHandlerManager.js","webpack://QuodemBootloader/./ScriptsLoader.js","webpack://QuodemBootloader/../index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;AClFa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,6C;;;;;;ACbA,gD;;;;;;;ACAa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,8C;;;;;;;ACpBa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBa;;AAEb,gBAAgB,mBAAO,CAAC,CAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;;ACrBA,qDAAkE;AAGzD,+BAHA,2CAAoB,CAGA;AAF7B,oDAAgE;AAEjC,8BAFtB,yCAAmB,CAEsB;;;;;;;;ACHrC;AACb,8CAA8C,cAAc;AAC5D,0BAA0B,mBAAO,CAAC,CAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;ACrBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,+C;;;;;;;ACfa;AACb;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D,8BAA8B,mBAAO,CAAC,CAAuB;AAC7D,4BAA4B,mBAAO,CAAC,CAAuB;AAC3D,0BAA0B,mBAAO,CAAC,CAAqB;AACvD,uBAAuB,mBAAO,CAAC,CAAkB;AACjD,yCAAyC,mBAAO,CAAC,CAAkC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,6BAA6B,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;ACtEa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,2D;;;;;;;AClBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,sD;;;;;;;AClBa;AACb,8CAA8C,cAAc;AAC5D,2BAA2B,mBAAO,CAAC,CAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA,mD;;;;;;ACrBA;AACA,eAAe,aAAa,cAAc,gBAAgB,MAAM,yCAAyC,uBAAuB,IAAI,sBAAsB,iBAAiB,oDAAoD,8BAA8B,cAAc,wBAAwB,cAAc,qBAAqB,eAAe,oDAAoD,iCAAiC,cAAc,kCAAkC,qBAAqB,4BAA4B,uEAAuE,YAAY,8JAA8J,cAAc,QAAQ,KAAK,4CAA4C,gBAAgB,EAAE,QAAQ,kBAAkB,uDAAuD,cAAc,OAAO,+DAA+D,SAAS,eAAe,WAAW,0BAA0B,SAAS,EAAE,eAAe,4CAA4C,uBAAuB,YAAY,MAAM,GAAG,cAAc,4DAA4D,4FAA4F,mBAAmB,8BAA8B,qBAAqB,iBAAiB,cAAc,qCAAqC,yFAAyF,4BAA4B,kBAAkB,8BAA8B,WAAW,GAAG,KAAK,gBAAgB,uBAAuB,IAAI,OAAO,iBAAiB,kBAAkB,OAAO,iBAAiB,4BAA4B,OAAO,EAAE,OAAO,WAAW,gBAAgB,UAAU,IAAI,wBAAwB,KAAK,EAAE,4BAA4B,KAAK,EAAE,EAAE,eAAe,QAAQ,iCAAiC,mCAAmC,iBAAiB,cAAc,aAAa,6CAA6C,IAAI,cAAc,aAAa,6MAA6M,aAAa,kCAAkC,mCAAmC,IAAI,uCAAuC,GAAG,YAAY,EAAE,OAAO,eAAe,kCAAkC,UAAU,OAAO,YAAY,qOAAqO,gCAAgC,YAAY,WAAW,WAAW,uCAAuC,GAAG,eAAe,EAAE,MAAM,4CAA4C,8BAA8B,cAAc,4DAA4D,IAAI,oDAAoD,UAAU,QAAQ,iBAAiB,UAAU,kEAAkE,iBAAiB,UAAU,qBAAqB,WAAW,EAAE,uHAAuH,aAAa,YAAY,+BAA+B,kCAAkC,OAAO,8BAA8B,KAAK,GAAG,aAAa,+IAA+I,0BAA0B,KAAK,8JAA8J,8BAA8B,sBAAsB,iCAAiC,uGAAuG,KAAK,sCAAsC,0BAA0B,KAAK,IAAI,qCAAqC,WAAW,6BAA6B,OAAO,IAAI,mBAAmB,SAAS,+BAA+B,mCAAmC,OAAO,KAAK,GAAG,qBAAqB,UAAU,WAAW,qBAAqB,yBAAyB,KAAK,EAAE,qCAAqC,EAAE;AACt6I;AACA;AACA,E;;;;;;;ACJa;AACb,8CAA8C,cAAc;AAC5D,WAAW,mBAAO,CAAC,EAAiC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,2C;;;;;;;AClBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,gD;;;;;;AC1BA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;ACnBA,8CAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,kBAAkB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9Na;;AAEb;AACA,cAAc,mBAAO,CAAC,EAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACjEa;;AAEb,gBAAgB,mBAAO,CAAC,CAAa;AACrC,oBAAoB,mBAAO,CAAC,CAAkB;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBa;;AAEb,oBAAoB,mBAAO,CAAC,CAAkB;AAC9C,qBAAqB,mBAAO,CAAC,EAAmB;;AAEhD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,cAAc;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,yBAAyB;AACzB;AACA;AACA,kBAAkB,WAAW;AAC7B,iBAAiB,gBAAgB,UAAU;AAC3C;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD,cAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,WAAW;;AAEX,KAAK;AACL;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,kBAAkB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,qBAAqB;AACxE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wCAAwC;AACxC;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,2BAA2B;AAC7C,kBAAkB,2BAA2B;AAC7C,kBAAkB,2BAA2B;AAC7C,kBAAkB;AAClB,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,aAAa,gBAAgB,aAAa;AACpD;AACA,oDAAoD;AACpD;AACA,+BAA+B,aAAa;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB;AACnD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe;AACf,4BAA4B,yBAAyB;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;;AAEA;AACA,sBAAsB,yBAAyB;AAC/C,sBAAsB,yBAAyB;AAC/C,sBAAsB,yBAAyB;AAC/C,sBAAsB,4BAA4B;AAClD,iCAAiC;AACjC;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;;;;;AC5qBD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;ACvLtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;AAEb;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,EAAU;AAChC,cAAc,mBAAO,CAAC,EAAa;AACnC,WAAW,mBAAO,CAAC,EAAM;;AAEzB;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,yBAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B;AAC/B;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA,KAAK;;AAEL;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb,aAAa;AACb,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,mBAAmB,MAAM;AACzB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA,aAAa,gBAAgB;AAC7B;AACA;;AAEA;AACA;AACA,mBAAmB,MAAM;AACzB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,aAAa;AACb;AACA,mCAAmC,uBAAuB;AAC1D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;ACxwDa;AACb,8CAA8C,cAAc;AAC5D,QAAQ,mBAAO,CAAC,EAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,oCAAoC,EAAE;AACjI;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,+C;;;;;;;ACzGa;AACb,8CAA8C,cAAc;AAC5D,gD;;;;;;;ACFa;AACb;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D,8BAA8B,mBAAO,CAAC,CAAuB;AAC7D,6BAA6B,mBAAO,CAAC,EAAwB;AAC7D,wBAAwB,mBAAO,CAAC,EAAmB;AACnD,gCAAgC,mBAAO,CAAC,EAA2B;AACnE,mCAAmC,mBAAO,CAAC,EAA8B;AACzE,wCAAwC,mBAAO,CAAC,CAAmC;AACnF,2BAA2B,mBAAO,CAAC,CAAsB;AACzD,yCAAyC,mBAAO,CAAC,CAAkC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,8BAA8B,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;;ACpFA,8CAAoD;AAG3C,wBAHA,6BAAa,CAGA;AAFtB,4CAAkD;AAE1B,uBAFf,2BAAY,CAEe","file":"quodem-bootloader.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"QuodemBootloaderConfigProvider\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"QuodemBootloader\", [\"QuodemBootloaderConfigProvider\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"QuodemBootloader\"] = factory(require(\"QuodemBootloaderConfigProvider\"));\n\telse\n\t\troot[\"QuodemBootloader\"] = factory(root[\"QuodemBootloaderConfigProvider\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__1__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 26);\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar StylesPathBuilder = /** @class */ (function () {\r\n function StylesPathBuilder() {\r\n }\r\n StylesPathBuilder.prototype.build = function (modConfig) {\r\n return modConfig.map(function (style) {\r\n return style.ServicePath + style.FileExtension;\r\n });\r\n };\r\n return StylesPathBuilder;\r\n}());\r\nexports.StylesPathBuilder = StylesPathBuilder;\r\n//# sourceMappingURL=StylesPathBuilder.js.map","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ScriptsPathBuilder = /** @class */ (function () {\r\n function ScriptsPathBuilder() {\r\n }\r\n ScriptsPathBuilder.prototype.build = function (modConfig) {\r\n return modConfig.map(function (module) {\r\n if (module.FileParameters === undefined ||\r\n module.FileParameters === null ||\r\n module.FileParameters.trim() === '') {\r\n return module.ServicePath;\r\n }\r\n else {\r\n return module.ServicePath + module.FileExtension + '?' + module.FileParameters;\r\n }\r\n });\r\n };\r\n return ScriptsPathBuilder;\r\n}());\r\nexports.ScriptsPathBuilder = ScriptsPathBuilder;\r\n//# sourceMappingURL=ScriptsPathBuilder.js.map","\"use strict\";\n\nmodule.exports = Iteration;\nfunction Iteration(value, done, index) {\n this.value = value;\n this.done = done;\n this.index = index;\n}\n\nIteration.prototype.equals = function (other) {\n return (\n typeof other == 'object' &&\n other.value === this.value &&\n other.done === this.done &&\n other.index === this.index\n );\n};\n\n","\"use strict\";\n\nvar Iteration = require(\"./iteration\");\n\nmodule.exports = ArrayIterator;\nfunction ArrayIterator(iterable, start, stop, step) {\n this.array = iterable;\n this.start = start || 0;\n this.stop = stop || Infinity;\n this.step = step || 1;\n}\n\nArrayIterator.prototype.next = function () {\n var iteration;\n if (this.start < Math.min(this.array.length, this.stop)) {\n iteration = new Iteration(this.array[this.start], false, this.start);\n this.start += this.step;\n } else {\n iteration = new Iteration(undefined, true);\n }\n return iteration;\n};\n\n","import { IEventHandlerManager } from \"./lib/IEventHandlerManager\";\r\nimport { EventHandlerManager } from \"./lib/EventHandlerManager\";\r\n\r\nexport { IEventHandlerManager, EventHandlerManager };","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar StylesPathBuilder_1 = require(\"./StylesPathBuilder\");\r\nvar StylesInjector = /** @class */ (function () {\r\n function StylesInjector(stylesInjector, stylesPathBuilder) {\r\n this.stylesInjector = stylesInjector;\r\n this.stylesPathBuilder = stylesPathBuilder;\r\n this.stylesPathBuilder = this.stylesPathBuilder !== undefined && this.stylesPathBuilder !== null\r\n ? this.stylesPathBuilder\r\n : new StylesPathBuilder_1.StylesPathBuilder();\r\n }\r\n StylesInjector.prototype.inject = function (modLoader, stylesConfig) {\r\n var _this = this;\r\n var stylesList = this.stylesPathBuilder.build(stylesConfig);\r\n stylesList.forEach(function (style) {\r\n _this.stylesInjector.inject(style);\r\n });\r\n };\r\n return StylesInjector;\r\n}());\r\nexports.StylesInjector = StylesInjector;\r\n//# sourceMappingURL=StylesInjector.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar SingleStyleInjector = /** @class */ (function () {\r\n function SingleStyleInjector(document) {\r\n this.document = document;\r\n }\r\n SingleStyleInjector.prototype.inject = function (styles) {\r\n var css = this.document.createElement('link');\r\n css.rel = 'stylesheet';\r\n css.href = styles;\r\n this.document.head.appendChild(css);\r\n };\r\n return SingleStyleInjector;\r\n}());\r\nexports.SingleStyleInjector = SingleStyleInjector;\r\n//# sourceMappingURL=SingleStyleInjector.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar event_handler_manager_1 = require(\"event-handler-manager\");\r\nvar SingleStyleInjector_1 = require(\"./SingleStyleInjector\");\r\nvar StylesPathBuilder_1 = require(\"./StylesPathBuilder\");\r\nvar StylesInjector_1 = require(\"./StylesInjector\");\r\nvar quodem_bootloader_configprovider_1 = require(\"quodem-bootloader-configprovider\");\r\nvar StylesLoader = /** @class */ (function (_super) {\r\n __extends(StylesLoader, _super);\r\n function StylesLoader(stylesConfigProvider, stylesInjector, document, singleStyleInjector, stylesPathBuilder) {\r\n var _this = _super.call(this) || this;\r\n _this.stylesConfigProvider = stylesConfigProvider;\r\n _this.stylesInjector = stylesInjector;\r\n _this.document = document;\r\n _this.singleStyleInjector = singleStyleInjector;\r\n _this.stylesPathBuilder = stylesPathBuilder;\r\n _this.modules = {};\r\n _this.attach(['beforeload', 'afterload']);\r\n _this.stylesConfigProvider = _this.stylesConfigProvider !== undefined && _this.stylesConfigProvider !== null\r\n ? _this.stylesConfigProvider\r\n : new quodem_bootloader_configprovider_1.BootloaderConfigProvider();\r\n _this.document = document !== undefined && document !== null\r\n ? document\r\n : window.document;\r\n _this.singleStyleInjector = _this.singleStyleInjector !== undefined && _this.singleStyleInjector !== null\r\n ? _this.singleStyleInjector\r\n : new SingleStyleInjector_1.SingleStyleInjector(_this.document);\r\n _this.stylesPathBuilder = _this.stylesPathBuilder !== undefined && _this.stylesPathBuilder !== null\r\n ? _this.stylesPathBuilder\r\n : new StylesPathBuilder_1.StylesPathBuilder();\r\n _this.stylesInjector = _this.stylesInjector !== undefined && _this.stylesInjector !== null\r\n ? _this.stylesInjector\r\n : new StylesInjector_1.StylesInjector(_this.singleStyleInjector);\r\n return _this;\r\n }\r\n StylesLoader.prototype.load = function () {\r\n var _this = this;\r\n this.trigger('beforeload', true);\r\n this.stylesConfigProvider.get().then(function (stylesConfig) {\r\n if (stylesConfig !== undefined && stylesConfig !== null) {\r\n var styles = stylesConfig.filter(function (style) { return style.FileType === 1; });\r\n try {\r\n _this.stylesInjector.inject(_this, styles);\r\n _this.trigger(\"afterload\", true);\r\n }\r\n catch (e) {\r\n console.error(JSON.stringify(e));\r\n _this.trigger(\"afterload\", true);\r\n }\r\n }\r\n else {\r\n _this.trigger(\"afterload\", true);\r\n }\r\n }).catch(function (err) {\r\n console.log(\"styles configurations not found\");\r\n });\r\n };\r\n return StylesLoader;\r\n}(event_handler_manager_1.EventHandlerManager));\r\nexports.StylesLoader = StylesLoader;\r\n//# sourceMappingURL=StylesLoader.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar DependenciesModuleConfigBuilder = /** @class */ (function () {\r\n function DependenciesModuleConfigBuilder() {\r\n }\r\n DependenciesModuleConfigBuilder.prototype.build = function (scriptsConfig, shim) {\r\n scriptsConfig.forEach(function (module) {\r\n if (module.Dependencies !== undefined && module.Dependencies !== null && module.Dependencies.length > 0) {\r\n if (shim[module.ModuleName] === undefined || shim[module.ModuleName] === null) {\r\n shim[module.ModuleName] = {};\r\n }\r\n shim[module.ModuleName].deps = module.Dependencies;\r\n }\r\n });\r\n };\r\n return DependenciesModuleConfigBuilder;\r\n}());\r\nexports.DependenciesModuleConfigBuilder = DependenciesModuleConfigBuilder;\r\n//# sourceMappingURL=DependenciesModuleConfigBuilder.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ExportsModuleConfigBuilder = /** @class */ (function () {\r\n function ExportsModuleConfigBuilder() {\r\n }\r\n ExportsModuleConfigBuilder.prototype.build = function (scriptsConfig, shim) {\r\n scriptsConfig.forEach(function (module) {\r\n if (module.ExportName !== undefined && module.ExportName !== null) {\r\n if (shim[module.ModuleName] === undefined || shim[module.ModuleName] === null) {\r\n shim[module.ModuleName] = {};\r\n }\r\n shim[module.ModuleName].exports = module.ExportName;\r\n }\r\n });\r\n };\r\n return ExportsModuleConfigBuilder;\r\n}());\r\nexports.ExportsModuleConfigBuilder = ExportsModuleConfigBuilder;\r\n//# sourceMappingURL=ExportsModuleConfigBuilder.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ScriptsPathBuilder_1 = require(\"./ScriptsPathBuilder\");\r\nvar PathModuleConfigBuilder = /** @class */ (function () {\r\n function PathModuleConfigBuilder(scriptsPathBuilder) {\r\n this.scriptsPathBuilder = scriptsPathBuilder;\r\n this.scriptsPathBuilder = this.scriptsPathBuilder !== undefined && this.scriptsPathBuilder !== null\r\n ? this.scriptsPathBuilder\r\n : new ScriptsPathBuilder_1.ScriptsPathBuilder();\r\n }\r\n PathModuleConfigBuilder.prototype.build = function (scriptsConfig) {\r\n var paths = {};\r\n var modPathsStrings = this.scriptsPathBuilder.build(scriptsConfig);\r\n scriptsConfig.forEach(function (module, index) {\r\n paths[module.ModuleName] = modPathsStrings[index];\r\n });\r\n return paths;\r\n };\r\n return PathModuleConfigBuilder;\r\n}());\r\nexports.PathModuleConfigBuilder = PathModuleConfigBuilder;\r\n//# sourceMappingURL=PathModuleConfigBuilder.js.map","/*! head.load - v1.0.3 */\n(function(n,t){\"use strict\";function w(){}function u(n,t){if(n){typeof n==\"object\"&&(n=[].slice.call(n));for(var i=0,r=n.length;i capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n","\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n","\"use strict\";\n\nvar Iteration = require(\"./iteration\");\nvar ArrayIterator = require(\"./array-iterator\");\n\nmodule.exports = ObjectIterator;\nfunction ObjectIterator(iterable, start, stop, step) {\n this.object = iterable;\n this.keysIterator = new ArrayIterator(Object.keys(iterable), start, stop, step);\n}\n\nObjectIterator.prototype.next = function () {\n var iteration = this.keysIterator.next();\n if (iteration.done) {\n return iteration;\n }\n var key = iteration.value;\n return new Iteration(this.object[key], false, key);\n};\n\n","\"use strict\";\n\nvar ArrayIterator = require(\"./array-iterator\");\nvar ObjectIterator = require(\"./object-iterator\");\n\nmodule.exports = iterate;\nfunction iterate(iterable, start, stop, step) {\n if (!iterable) {\n return empty;\n } else if (Array.isArray(iterable)) {\n return new ArrayIterator(iterable, start, stop, step);\n } else if (typeof iterable.next === \"function\") {\n return iterable;\n } else if (typeof iterable.iterate === \"function\") {\n return iterable.iterate(start, stop, step);\n } else if (typeof iterable === \"object\") {\n return new ObjectIterator(iterable);\n } else {\n throw new TypeError(\"Can't iterate \" + iterable);\n }\n}\n\n","// Copyright (C) 2011 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Install a leaky WeakMap emulation on platforms that\n * don't provide a built-in one.\n *\n *

Assumes that an ES5 platform where, if {@code WeakMap} is\n * already present, then it conforms to the anticipated ES6\n * specification. To run this file on an ES5 or almost ES5\n * implementation where the {@code WeakMap} specification does not\n * quite conform, run repairES5.js first.\n *\n *

Even though WeakMapModule is not global, the linter thinks it\n * is, which is why it is in the overrides list below.\n *\n *

NOTE: Before using this WeakMap emulation in a non-SES\n * environment, see the note below about hiddenRecord.\n *\n * @author Mark S. Miller\n * @requires crypto, ArrayBuffer, Uint8Array, navigator, console\n * @overrides WeakMap, ses, Proxy\n * @overrides WeakMapModule\n */\n\n/**\n * This {@code WeakMap} emulation is observably equivalent to the\n * ES-Harmony WeakMap, but with leakier garbage collection properties.\n *\n *

As with true WeakMaps, in this emulation, a key does not\n * retain maps indexed by that key and (crucially) a map does not\n * retain the keys it indexes. A map by itself also does not retain\n * the values associated with that map.\n *\n *

However, the values associated with a key in some map are\n * retained so long as that key is retained and those associations are\n * not overridden. For example, when used to support membranes, all\n * values exported from a given membrane will live for the lifetime\n * they would have had in the absence of an interposed membrane. Even\n * when the membrane is revoked, all objects that would have been\n * reachable in the absence of revocation will still be reachable, as\n * far as the GC can tell, even though they will no longer be relevant\n * to ongoing computation.\n *\n *

The API implemented here is approximately the API as implemented\n * in FF6.0a1 and agreed to by MarkM, Andreas Gal, and Dave Herman,\n * rather than the offially approved proposal page. TODO(erights):\n * upgrade the ecmascript WeakMap proposal page to explain this API\n * change and present to EcmaScript committee for their approval.\n *\n *

The first difference between the emulation here and that in\n * FF6.0a1 is the presence of non enumerable {@code get___, has___,\n * set___, and delete___} methods on WeakMap instances to represent\n * what would be the hidden internal properties of a primitive\n * implementation. Whereas the FF6.0a1 WeakMap.prototype methods\n * require their {@code this} to be a genuine WeakMap instance (i.e.,\n * an object of {@code [[Class]]} \"WeakMap}), since there is nothing\n * unforgeable about the pseudo-internal method names used here,\n * nothing prevents these emulated prototype methods from being\n * applied to non-WeakMaps with pseudo-internal methods of the same\n * names.\n *\n *

Another difference is that our emulated {@code\n * WeakMap.prototype} is not itself a WeakMap. A problem with the\n * current FF6.0a1 API is that WeakMap.prototype is itself a WeakMap\n * providing ambient mutability and an ambient communications\n * channel. Thus, if a WeakMap is already present and has this\n * problem, repairES5.js wraps it in a safe wrappper in order to\n * prevent access to this channel. (See\n * PATCH_MUTABLE_FROZEN_WEAKMAP_PROTO in repairES5.js).\n */\n\n/**\n * If this is a full secureable ES5 platform and the ES-Harmony {@code WeakMap} is\n * absent, install an approximate emulation.\n *\n *

If WeakMap is present but cannot store some objects, use our approximate\n * emulation as a wrapper.\n *\n *

If this is almost a secureable ES5 platform, then WeakMap.js\n * should be run after repairES5.js.\n *\n *

See {@code WeakMap} for documentation of the garbage collection\n * properties of this WeakMap emulation.\n */\n(function WeakMapModule() {\n \"use strict\";\n\n if (typeof ses !== 'undefined' && ses.ok && !ses.ok()) {\n // already too broken, so give up\n return;\n }\n\n /**\n * In some cases (current Firefox), we must make a choice betweeen a\n * WeakMap which is capable of using all varieties of host objects as\n * keys and one which is capable of safely using proxies as keys. See\n * comments below about HostWeakMap and DoubleWeakMap for details.\n *\n * This function (which is a global, not exposed to guests) marks a\n * WeakMap as permitted to do what is necessary to index all host\n * objects, at the cost of making it unsafe for proxies.\n *\n * Do not apply this function to anything which is not a genuine\n * fresh WeakMap.\n */\n function weakMapPermitHostObjects(map) {\n // identity of function used as a secret -- good enough and cheap\n if (map.permitHostObjects___) {\n map.permitHostObjects___(weakMapPermitHostObjects);\n }\n }\n if (typeof ses !== 'undefined') {\n ses.weakMapPermitHostObjects = weakMapPermitHostObjects;\n }\n\n // IE 11 has no Proxy but has a broken WeakMap such that we need to patch\n // it using DoubleWeakMap; this flag tells DoubleWeakMap so.\n var doubleWeakMapCheckSilentFailure = false;\n\n // Check if there is already a good-enough WeakMap implementation, and if so\n // exit without replacing it.\n if (typeof WeakMap === 'function') {\n var HostWeakMap = WeakMap;\n // There is a WeakMap -- is it good enough?\n if (typeof navigator !== 'undefined' &&\n /Firefox/.test(navigator.userAgent)) {\n // We're now *assuming not*, because as of this writing (2013-05-06)\n // Firefox's WeakMaps have a miscellany of objects they won't accept, and\n // we don't want to make an exhaustive list, and testing for just one\n // will be a problem if that one is fixed alone (as they did for Event).\n\n // If there is a platform that we *can* reliably test on, here's how to\n // do it:\n // var problematic = ... ;\n // var testHostMap = new HostWeakMap();\n // try {\n // testHostMap.set(problematic, 1); // Firefox 20 will throw here\n // if (testHostMap.get(problematic) === 1) {\n // return;\n // }\n // } catch (e) {}\n\n } else {\n // IE 11 bug: WeakMaps silently fail to store frozen objects.\n var testMap = new HostWeakMap();\n var testObject = Object.freeze({});\n testMap.set(testObject, 1);\n if (testMap.get(testObject) !== 1) {\n doubleWeakMapCheckSilentFailure = true;\n // Fall through to installing our WeakMap.\n } else {\n module.exports = WeakMap;\n return;\n }\n }\n }\n\n var hop = Object.prototype.hasOwnProperty;\n var gopn = Object.getOwnPropertyNames;\n var defProp = Object.defineProperty;\n var isExtensible = Object.isExtensible;\n\n /**\n * Security depends on HIDDEN_NAME being both unguessable and\n * undiscoverable by untrusted code.\n *\n *

Given the known weaknesses of Math.random() on existing\n * browsers, it does not generate unguessability we can be confident\n * of.\n *\n *

It is the monkey patching logic in this file that is intended\n * to ensure undiscoverability. The basic idea is that there are\n * three fundamental means of discovering properties of an object:\n * The for/in loop, Object.keys(), and Object.getOwnPropertyNames(),\n * as well as some proposed ES6 extensions that appear on our\n * whitelist. The first two only discover enumerable properties, and\n * we only use HIDDEN_NAME to name a non-enumerable property, so the\n * only remaining threat should be getOwnPropertyNames and some\n * proposed ES6 extensions that appear on our whitelist. We monkey\n * patch them to remove HIDDEN_NAME from the list of properties they\n * returns.\n *\n *

TODO(erights): On a platform with built-in Proxies, proxies\n * could be used to trap and thereby discover the HIDDEN_NAME, so we\n * need to monkey patch Proxy.create, Proxy.createFunction, etc, in\n * order to wrap the provided handler with the real handler which\n * filters out all traps using HIDDEN_NAME.\n *\n *

TODO(erights): Revisit Mike Stay's suggestion that we use an\n * encapsulated function at a not-necessarily-secret name, which\n * uses the Stiegler shared-state rights amplification pattern to\n * reveal the associated value only to the WeakMap in which this key\n * is associated with that value. Since only the key retains the\n * function, the function can also remember the key without causing\n * leakage of the key, so this doesn't violate our general gc\n * goals. In addition, because the name need not be a guarded\n * secret, we could efficiently handle cross-frame frozen keys.\n */\n var HIDDEN_NAME_PREFIX = 'weakmap:';\n var HIDDEN_NAME = HIDDEN_NAME_PREFIX + 'ident:' + Math.random() + '___';\n\n if (typeof crypto !== 'undefined' &&\n typeof crypto.getRandomValues === 'function' &&\n typeof ArrayBuffer === 'function' &&\n typeof Uint8Array === 'function') {\n var ab = new ArrayBuffer(25);\n var u8s = new Uint8Array(ab);\n crypto.getRandomValues(u8s);\n HIDDEN_NAME = HIDDEN_NAME_PREFIX + 'rand:' +\n Array.prototype.map.call(u8s, function(u8) {\n return (u8 % 36).toString(36);\n }).join('') + '___';\n }\n\n function isNotHiddenName(name) {\n return !(\n name.substr(0, HIDDEN_NAME_PREFIX.length) == HIDDEN_NAME_PREFIX &&\n name.substr(name.length - 3) === '___');\n }\n\n /**\n * Monkey patch getOwnPropertyNames to avoid revealing the\n * HIDDEN_NAME.\n *\n *

The ES5.1 spec requires each name to appear only once, but as\n * of this writing, this requirement is controversial for ES6, so we\n * made this code robust against this case. If the resulting extra\n * search turns out to be expensive, we can probably relax this once\n * ES6 is adequately supported on all major browsers, iff no browser\n * versions we support at that time have relaxed this constraint\n * without providing built-in ES6 WeakMaps.\n */\n defProp(Object, 'getOwnPropertyNames', {\n value: function fakeGetOwnPropertyNames(obj) {\n return gopn(obj).filter(isNotHiddenName);\n }\n });\n\n /**\n * getPropertyNames is not in ES5 but it is proposed for ES6 and\n * does appear in our whitelist, so we need to clean it too.\n */\n if ('getPropertyNames' in Object) {\n var originalGetPropertyNames = Object.getPropertyNames;\n defProp(Object, 'getPropertyNames', {\n value: function fakeGetPropertyNames(obj) {\n return originalGetPropertyNames(obj).filter(isNotHiddenName);\n }\n });\n }\n\n /**\n *

To treat objects as identity-keys with reasonable efficiency\n * on ES5 by itself (i.e., without any object-keyed collections), we\n * need to add a hidden property to such key objects when we\n * can. This raises several issues:\n *

\n * We do so by\n * \n * Unfortunately, because of same-origin iframes, we cannot reliably\n * add this hidden property before an object becomes\n * non-extensible. Instead, if we encounter a non-extensible object\n * without a hidden record that we can detect (whether or not it has\n * a hidden record stored under a name secret to us), then we just\n * use the key object itself to represent its identity in a brute\n * force leaky map stored in the weak map, losing all the advantages\n * of weakness for these.\n */\n function getHiddenRecord(key) {\n if (key !== Object(key)) {\n throw new TypeError('Not an object: ' + key);\n }\n var hiddenRecord = key[HIDDEN_NAME];\n if (hiddenRecord && hiddenRecord.key === key) { return hiddenRecord; }\n if (!isExtensible(key)) {\n // Weak map must brute force, as explained in doc-comment above.\n return void 0;\n }\n\n // The hiddenRecord and the key point directly at each other, via\n // the \"key\" and HIDDEN_NAME properties respectively. The key\n // field is for quickly verifying that this hidden record is an\n // own property, not a hidden record from up the prototype chain.\n //\n // NOTE: Because this WeakMap emulation is meant only for systems like\n // SES where Object.prototype is frozen without any numeric\n // properties, it is ok to use an object literal for the hiddenRecord.\n // This has two advantages:\n // * It is much faster in a performance critical place\n // * It avoids relying on Object.create(null), which had been\n // problematic on Chrome 28.0.1480.0. See\n // https://code.google.com/p/google-caja/issues/detail?id=1687\n hiddenRecord = { key: key };\n\n // When using this WeakMap emulation on platforms where\n // Object.prototype might not be frozen and Object.create(null) is\n // reliable, use the following two commented out lines instead.\n // hiddenRecord = Object.create(null);\n // hiddenRecord.key = key;\n\n // Please contact us if you need this to work on platforms where\n // Object.prototype might not be frozen and\n // Object.create(null) might not be reliable.\n\n try {\n defProp(key, HIDDEN_NAME, {\n value: hiddenRecord,\n writable: false,\n enumerable: false,\n configurable: false\n });\n return hiddenRecord;\n } catch (error) {\n // Under some circumstances, isExtensible seems to misreport whether\n // the HIDDEN_NAME can be defined.\n // The circumstances have not been isolated, but at least affect\n // Node.js v0.10.26 on TravisCI / Linux, but not the same version of\n // Node.js on OS X.\n return void 0;\n }\n }\n\n /**\n * Monkey patch operations that would make their argument\n * non-extensible.\n *\n *

The monkey patched versions throw a TypeError if their\n * argument is not an object, so it should only be done to functions\n * that should throw a TypeError anyway if their argument is not an\n * object.\n */\n (function(){\n var oldFreeze = Object.freeze;\n defProp(Object, 'freeze', {\n value: function identifyingFreeze(obj) {\n getHiddenRecord(obj);\n return oldFreeze(obj);\n }\n });\n var oldSeal = Object.seal;\n defProp(Object, 'seal', {\n value: function identifyingSeal(obj) {\n getHiddenRecord(obj);\n return oldSeal(obj);\n }\n });\n var oldPreventExtensions = Object.preventExtensions;\n defProp(Object, 'preventExtensions', {\n value: function identifyingPreventExtensions(obj) {\n getHiddenRecord(obj);\n return oldPreventExtensions(obj);\n }\n });\n })();\n\n function constFunc(func) {\n func.prototype = null;\n return Object.freeze(func);\n }\n\n var calledAsFunctionWarningDone = false;\n function calledAsFunctionWarning() {\n // Future ES6 WeakMap is currently (2013-09-10) expected to reject WeakMap()\n // but we used to permit it and do it ourselves, so warn only.\n if (!calledAsFunctionWarningDone && typeof console !== 'undefined') {\n calledAsFunctionWarningDone = true;\n console.warn('WeakMap should be invoked as new WeakMap(), not ' +\n 'WeakMap(). This will be an error in the future.');\n }\n }\n\n var nextId = 0;\n\n var OurWeakMap = function() {\n if (!(this instanceof OurWeakMap)) { // approximate test for new ...()\n calledAsFunctionWarning();\n }\n\n // We are currently (12/25/2012) never encountering any prematurely\n // non-extensible keys.\n var keys = []; // brute force for prematurely non-extensible keys.\n var values = []; // brute force for corresponding values.\n var id = nextId++;\n\n function get___(key, opt_default) {\n var index;\n var hiddenRecord = getHiddenRecord(key);\n if (hiddenRecord) {\n return id in hiddenRecord ? hiddenRecord[id] : opt_default;\n } else {\n index = keys.indexOf(key);\n return index >= 0 ? values[index] : opt_default;\n }\n }\n\n function has___(key) {\n var hiddenRecord = getHiddenRecord(key);\n if (hiddenRecord) {\n return id in hiddenRecord;\n } else {\n return keys.indexOf(key) >= 0;\n }\n }\n\n function set___(key, value) {\n var index;\n var hiddenRecord = getHiddenRecord(key);\n if (hiddenRecord) {\n hiddenRecord[id] = value;\n } else {\n index = keys.indexOf(key);\n if (index >= 0) {\n values[index] = value;\n } else {\n // Since some browsers preemptively terminate slow turns but\n // then continue computing with presumably corrupted heap\n // state, we here defensively get keys.length first and then\n // use it to update both the values and keys arrays, keeping\n // them in sync.\n index = keys.length;\n values[index] = value;\n // If we crash here, values will be one longer than keys.\n keys[index] = key;\n }\n }\n return this;\n }\n\n function delete___(key) {\n var hiddenRecord = getHiddenRecord(key);\n var index, lastIndex;\n if (hiddenRecord) {\n return id in hiddenRecord && delete hiddenRecord[id];\n } else {\n index = keys.indexOf(key);\n if (index < 0) {\n return false;\n }\n // Since some browsers preemptively terminate slow turns but\n // then continue computing with potentially corrupted heap\n // state, we here defensively get keys.length first and then use\n // it to update both the keys and the values array, keeping\n // them in sync. We update the two with an order of assignments,\n // such that any prefix of these assignments will preserve the\n // key/value correspondence, either before or after the delete.\n // Note that this needs to work correctly when index === lastIndex.\n lastIndex = keys.length - 1;\n keys[index] = void 0;\n // If we crash here, there's a void 0 in the keys array, but\n // no operation will cause a \"keys.indexOf(void 0)\", since\n // getHiddenRecord(void 0) will always throw an error first.\n values[index] = values[lastIndex];\n // If we crash here, values[index] cannot be found here,\n // because keys[index] is void 0.\n keys[index] = keys[lastIndex];\n // If index === lastIndex and we crash here, then keys[index]\n // is still void 0, since the aliasing killed the previous key.\n keys.length = lastIndex;\n // If we crash here, keys will be one shorter than values.\n values.length = lastIndex;\n return true;\n }\n }\n\n return Object.create(OurWeakMap.prototype, {\n get___: { value: constFunc(get___) },\n has___: { value: constFunc(has___) },\n set___: { value: constFunc(set___) },\n delete___: { value: constFunc(delete___) }\n });\n };\n\n OurWeakMap.prototype = Object.create(Object.prototype, {\n get: {\n /**\n * Return the value most recently associated with key, or\n * opt_default if none.\n */\n value: function get(key, opt_default) {\n return this.get___(key, opt_default);\n },\n writable: true,\n configurable: true\n },\n\n has: {\n /**\n * Is there a value associated with key in this WeakMap?\n */\n value: function has(key) {\n return this.has___(key);\n },\n writable: true,\n configurable: true\n },\n\n set: {\n /**\n * Associate value with key in this WeakMap, overwriting any\n * previous association if present.\n */\n value: function set(key, value) {\n return this.set___(key, value);\n },\n writable: true,\n configurable: true\n },\n\n 'delete': {\n /**\n * Remove any association for key in this WeakMap, returning\n * whether there was one.\n *\n *

Note that the boolean return here does not work like the\n * {@code delete} operator. The {@code delete} operator returns\n * whether the deletion succeeds at bringing about a state in\n * which the deleted property is absent. The {@code delete}\n * operator therefore returns true if the property was already\n * absent, whereas this {@code delete} method returns false if\n * the association was already absent.\n */\n value: function remove(key) {\n return this.delete___(key);\n },\n writable: true,\n configurable: true\n }\n });\n\n if (typeof HostWeakMap === 'function') {\n (function() {\n // If we got here, then the platform has a WeakMap but we are concerned\n // that it may refuse to store some key types. Therefore, make a map\n // implementation which makes use of both as possible.\n\n // In this mode we are always using double maps, so we are not proxy-safe.\n // This combination does not occur in any known browser, but we had best\n // be safe.\n if (doubleWeakMapCheckSilentFailure && typeof Proxy !== 'undefined') {\n Proxy = undefined;\n }\n\n function DoubleWeakMap() {\n if (!(this instanceof OurWeakMap)) { // approximate test for new ...()\n calledAsFunctionWarning();\n }\n\n // Preferable, truly weak map.\n var hmap = new HostWeakMap();\n\n // Our hidden-property-based pseudo-weak-map. Lazily initialized in the\n // 'set' implementation; thus we can avoid performing extra lookups if\n // we know all entries actually stored are entered in 'hmap'.\n var omap = undefined;\n\n // Hidden-property maps are not compatible with proxies because proxies\n // can observe the hidden name and either accidentally expose it or fail\n // to allow the hidden property to be set. Therefore, we do not allow\n // arbitrary WeakMaps to switch to using hidden properties, but only\n // those which need the ability, and unprivileged code is not allowed\n // to set the flag.\n //\n // (Except in doubleWeakMapCheckSilentFailure mode in which case we\n // disable proxies.)\n var enableSwitching = false;\n\n function dget(key, opt_default) {\n if (omap) {\n return hmap.has(key) ? hmap.get(key)\n : omap.get___(key, opt_default);\n } else {\n return hmap.get(key, opt_default);\n }\n }\n\n function dhas(key) {\n return hmap.has(key) || (omap ? omap.has___(key) : false);\n }\n\n var dset;\n if (doubleWeakMapCheckSilentFailure) {\n dset = function(key, value) {\n hmap.set(key, value);\n if (!hmap.has(key)) {\n if (!omap) { omap = new OurWeakMap(); }\n omap.set(key, value);\n }\n return this;\n };\n } else {\n dset = function(key, value) {\n if (enableSwitching) {\n try {\n hmap.set(key, value);\n } catch (e) {\n if (!omap) { omap = new OurWeakMap(); }\n omap.set___(key, value);\n }\n } else {\n hmap.set(key, value);\n }\n return this;\n };\n }\n\n function ddelete(key) {\n var result = !!hmap['delete'](key);\n if (omap) { return omap.delete___(key) || result; }\n return result;\n }\n\n return Object.create(OurWeakMap.prototype, {\n get___: { value: constFunc(dget) },\n has___: { value: constFunc(dhas) },\n set___: { value: constFunc(dset) },\n delete___: { value: constFunc(ddelete) },\n permitHostObjects___: { value: constFunc(function(token) {\n if (token === weakMapPermitHostObjects) {\n enableSwitching = true;\n } else {\n throw new Error('bogus call to permitHostObjects___');\n }\n })}\n });\n }\n DoubleWeakMap.prototype = OurWeakMap.prototype;\n module.exports = DoubleWeakMap;\n\n // define .constructor to hide OurWeakMap ctor\n Object.defineProperty(WeakMap.prototype, 'constructor', {\n value: WeakMap,\n enumerable: false, // as default .constructor is\n configurable: true,\n writable: true\n });\n })();\n } else {\n // There is no host WeakMap, so we must use the emulation.\n\n // Emulated WeakMaps are incompatible with native proxies (because proxies\n // can observe the hidden name), so we must disable Proxy usage (in\n // ArrayLike and Domado, currently).\n if (typeof Proxy !== 'undefined') {\n Proxy = undefined;\n }\n\n module.exports = OurWeakMap;\n }\n})();\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/* vim:ts=4:sts=4:sw=4: */\n/*!\n *\n * Copyright 2009-2013 Kris Kowal under the terms of the MIT\n * license found at http://github.com/kriskowal/q/raw/master/LICENSE\n *\n * With parts by Tyler Close\n * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found\n * at http://www.opensource.org/licenses/mit-license.html\n * Forked at ref_send.js version: 2009-05-11\n *\n * With parts by Mark Miller\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n/*global -WeakMap */\n\"use strict\";\n\nvar hasStacks = false;\ntry {\n throw new Error();\n} catch (e) {\n hasStacks = !!e.stack;\n}\n\n// All code after this point will be filtered from stack traces reported\n// by Q.\nvar qStartingLine = captureLine();\nvar qFileName;\n\nvar WeakMap = require(\"weak-map\");\nvar iterate = require(\"pop-iterate\");\nvar asap = require(\"asap\");\n\nfunction isObject(value) {\n return value === Object(value);\n}\n\n// long stack traces\n\nvar STACK_JUMP_SEPARATOR = \"From previous event:\";\n\nfunction makeStackTraceLong(error, promise) {\n // If possible, transform the error stack trace by removing Node and Q\n // cruft, then concatenating with the stack trace of `promise`. See #57.\n if (hasStacks &&\n promise.stack &&\n typeof error === \"object\" &&\n error !== null &&\n error.stack &&\n error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1\n ) {\n var stacks = [];\n for (var p = promise; !!p && handlers.get(p); p = handlers.get(p).became) {\n if (p.stack) {\n stacks.unshift(p.stack);\n }\n }\n stacks.unshift(error.stack);\n\n var concatedStacks = stacks.join(\"\\n\" + STACK_JUMP_SEPARATOR + \"\\n\");\n error.stack = filterStackString(concatedStacks);\n }\n}\n\nfunction filterStackString(stackString) {\n if (Q.isIntrospective) {\n return stackString;\n }\n var lines = stackString.split(\"\\n\");\n var desiredLines = [];\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i];\n\n if (!isInternalFrame(line) && !isNodeFrame(line) && line) {\n desiredLines.push(line);\n }\n }\n return desiredLines.join(\"\\n\");\n}\n\nfunction isNodeFrame(stackLine) {\n return stackLine.indexOf(\"(module.js:\") !== -1 ||\n stackLine.indexOf(\"(node.js:\") !== -1;\n}\n\nfunction getFileNameAndLineNumber(stackLine) {\n // Named functions: \"at functionName (filename:lineNumber:columnNumber)\"\n // In IE10 function name can have spaces (\"Anonymous function\") O_o\n var attempt1 = /at .+ \\((.+):(\\d+):(?:\\d+)\\)$/.exec(stackLine);\n if (attempt1) {\n return [attempt1[1], Number(attempt1[2])];\n }\n\n // Anonymous functions: \"at filename:lineNumber:columnNumber\"\n var attempt2 = /at ([^ ]+):(\\d+):(?:\\d+)$/.exec(stackLine);\n if (attempt2) {\n return [attempt2[1], Number(attempt2[2])];\n }\n\n // Firefox style: \"function@filename:lineNumber or @filename:lineNumber\"\n var attempt3 = /.*@(.+):(\\d+)$/.exec(stackLine);\n if (attempt3) {\n return [attempt3[1], Number(attempt3[2])];\n }\n}\n\nfunction isInternalFrame(stackLine) {\n var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);\n\n if (!fileNameAndLineNumber) {\n return false;\n }\n\n var fileName = fileNameAndLineNumber[0];\n var lineNumber = fileNameAndLineNumber[1];\n\n return fileName === qFileName &&\n lineNumber >= qStartingLine &&\n lineNumber <= qEndingLine;\n}\n\n// discover own file name and line number range for filtering stack\n// traces\nfunction captureLine() {\n if (!hasStacks) {\n return;\n }\n\n try {\n throw new Error();\n } catch (e) {\n var lines = e.stack.split(\"\\n\");\n var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n if (!fileNameAndLineNumber) {\n return;\n }\n\n qFileName = fileNameAndLineNumber[0];\n return fileNameAndLineNumber[1];\n }\n}\n\nfunction deprecate(callback, name, alternative) {\n return function Q_deprecate() {\n if (\n typeof console !== \"undefined\" &&\n typeof console.warn === \"function\"\n ) {\n if (alternative) {\n console.warn(\n name + \" is deprecated, use \" + alternative + \" instead.\",\n new Error(\"\").stack\n );\n } else {\n console.warn(\n name + \" is deprecated.\",\n new Error(\"\").stack\n );\n }\n }\n return callback.apply(this, arguments);\n };\n}\n\n// end of long stack traces\n\nvar handlers = new WeakMap();\n\nfunction Q_getHandler(promise) {\n var handler = handlers.get(promise);\n if (!handler || !handler.became) {\n return handler;\n }\n handler = follow(handler);\n handlers.set(promise, handler);\n return handler;\n}\n\nfunction follow(handler) {\n if (!handler.became) {\n return handler;\n } else {\n handler.became = follow(handler.became);\n return handler.became;\n }\n}\n\nvar theViciousCycleError = new Error(\"Can't resolve a promise with itself\");\nvar theViciousCycleRejection = Q_reject(theViciousCycleError);\nvar theViciousCycle = Q_getHandler(theViciousCycleRejection);\n\nvar thenables = new WeakMap();\n\n/**\n * Coerces a value to a promise. If the value is a promise, pass it through\n * unaltered. If the value has a `then` method, it is presumed to be a promise\n * but not one of our own, so it is treated as a “thenable” promise and this\n * returns a promise that stands for it. Otherwise, this returns a promise that\n * has already been fulfilled with the value.\n * @param value promise, object with a then method, or a fulfillment value\n * @returns {Promise} the same promise as given, or a promise for the given\n * value\n */\nmodule.exports = Q;\nfunction Q(value) {\n // If the object is already a Promise, return it directly. This enables\n // the resolve function to both be used to created references from objects,\n // but to tolerably coerce non-promises to promises.\n if (Q_isPromise(value)) {\n return value;\n } else if (isThenable(value)) {\n if (!thenables.has(value)) {\n thenables.set(value, new Promise(new Thenable(value)));\n }\n return thenables.get(value);\n } else {\n return new Promise(new Fulfilled(value));\n }\n}\n\n/**\n * Controls whether or not long stack traces will be on\n * @type {boolean}\n */\nQ.longStackSupport = false;\n\n/**\n * Returns a promise that has been rejected with a reason, which should be an\n * instance of `Error`.\n * @param {Error} error reason for the failure.\n * @returns {Promise} rejection\n */\nQ.reject = Q_reject;\nfunction Q_reject(error) {\n return new Promise(new Rejected(error));\n}\n\n/**\n * Constructs a {promise, resolve, reject} object.\n *\n * `resolve` is a callback to invoke with a more resolved value for the\n * promise. To fulfill the promise, invoke `resolve` with any value that is\n * not a thenable. To reject the promise, invoke `resolve` with a rejected\n * thenable, or invoke `reject` with the reason directly. To resolve the\n * promise to another thenable, thus putting it in the same state, invoke\n * `resolve` with that other thenable.\n *\n * @returns {{promise, resolve, reject}} a deferred\n */\nQ.defer = defer;\nfunction defer() {\n\n var handler = new Pending();\n var promise = new Promise(handler);\n var deferred = new Deferred(promise);\n\n if (Q.longStackSupport && hasStacks) {\n try {\n throw new Error();\n } catch (e) {\n // NOTE: don't try to use `Error.captureStackTrace` or transfer the\n // accessor around; that causes memory leaks as per GH-111. Just\n // reify the stack trace as a string ASAP.\n //\n // At the same time, cut off the first line; it's always just\n // \"[object Promise]\\n\", as per the `toString`.\n promise.stack = e.stack.substring(e.stack.indexOf(\"\\n\") + 1);\n }\n }\n\n return deferred;\n}\n\n// TODO\n/**\n */\nQ.when = function Q_when(value, fulfilled, rejected, ms) {\n return Q(value).then(fulfilled, rejected, ms);\n};\n\n/**\n * Turns an array of promises into a promise for an array. If any of the\n * promises gets rejected, the whole array is rejected immediately.\n * @param {Array.} an array (or promise for an array) of values (or\n * promises for values)\n * @returns {Promise.} a promise for an array of the corresponding values\n */\n// By Mark Miller\n// http://wiki.ecmascript.org/doku.php?id=strawman:concurrency&rev=1308776521#allfulfilled\nQ.all = Q_all;\nfunction Q_all(questions) {\n // XXX deprecated behavior\n if (Q_isPromise(questions)) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.warn === \"function\"\n ) {\n console.warn(\"Q.all no longer directly unwraps a promise. Use Q(array).all()\");\n }\n return Q(questions).all();\n }\n var countDown = 0;\n var deferred = defer();\n var answers = Array(questions.length);\n var estimates = [];\n var estimate = -Infinity;\n var setEstimate;\n Array.prototype.forEach.call(questions, function Q_all_each(promise, index) {\n var handler;\n if (\n Q_isPromise(promise) &&\n (handler = Q_getHandler(promise)).state === \"fulfilled\"\n ) {\n answers[index] = handler.value;\n } else {\n ++countDown;\n promise = Q(promise);\n promise.then(\n function Q_all_eachFulfilled(value) {\n answers[index] = value;\n if (--countDown === 0) {\n deferred.resolve(answers);\n }\n },\n deferred.reject\n );\n\n promise.observeEstimate(function Q_all_eachEstimate(newEstimate) {\n var oldEstimate = estimates[index];\n estimates[index] = newEstimate;\n if (newEstimate > estimate) {\n estimate = newEstimate;\n } else if (oldEstimate === estimate && newEstimate <= estimate) {\n // There is a 1/length chance that we will need to perform\n // this O(length) walk, so amortized O(1)\n computeEstimate();\n }\n if (estimates.length === questions.length && estimate !== setEstimate) {\n deferred.setEstimate(estimate);\n setEstimate = estimate;\n }\n });\n\n }\n });\n\n function computeEstimate() {\n estimate = -Infinity;\n for (var index = 0; index < estimates.length; index++) {\n if (estimates[index] > estimate) {\n estimate = estimates[index];\n }\n }\n }\n\n if (countDown === 0) {\n deferred.resolve(answers);\n }\n\n return deferred.promise;\n}\n\n/**\n * @see Promise#allSettled\n */\nQ.allSettled = Q_allSettled;\nfunction Q_allSettled(questions) {\n // XXX deprecated behavior\n if (Q_isPromise(questions)) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.warn === \"function\"\n ) {\n console.warn(\"Q.allSettled no longer directly unwraps a promise. Use Q(array).allSettled()\");\n }\n return Q(questions).allSettled();\n }\n return Q_all(questions.map(function Q_allSettled_each(promise) {\n promise = Q(promise);\n function regardless() {\n return promise.inspect();\n }\n return promise.then(regardless, regardless);\n }));\n}\n\n/**\n * Returns a promise for the given value (or promised value), some\n * milliseconds after it resolved. Passes rejections immediately.\n * @param {Any*} promise\n * @param {Number} milliseconds\n * @returns a promise for the resolution of the given promise after milliseconds\n * time has elapsed since the resolution of the given promise.\n * If the given promise rejects, that is passed immediately.\n */\nQ.delay = function Q_delay(object, timeout) {\n if (timeout === void 0) {\n timeout = object;\n object = void 0;\n }\n return Q(object).delay(timeout);\n};\n\n/**\n * Causes a promise to be rejected if it does not get fulfilled before\n * some milliseconds time out.\n * @param {Any*} promise\n * @param {Number} milliseconds timeout\n * @param {String} custom error message (optional)\n * @returns a promise for the resolution of the given promise if it is\n * fulfilled before the timeout, otherwise rejected.\n */\nQ.timeout = function Q_timeout(object, ms, message) {\n return Q(object).timeout(ms, message);\n};\n\n/**\n * Spreads the values of a promised array of arguments into the\n * fulfillment callback.\n * @param fulfilled callback that receives variadic arguments from the\n * promised array\n * @param rejected callback that receives the exception if the promise\n * is rejected.\n * @returns a promise for the return value or thrown exception of\n * either callback.\n */\nQ.spread = Q_spread;\nfunction Q_spread(value, fulfilled, rejected) {\n return Q(value).spread(fulfilled, rejected);\n}\n\n/**\n * If two promises eventually fulfill to the same value, promises that value,\n * but otherwise rejects.\n * @param x {Any*}\n * @param y {Any*}\n * @returns {Any*} a promise for x and y if they are the same, but a rejection\n * otherwise.\n *\n */\nQ.join = function Q_join(x, y) {\n return Q.spread([x, y], function Q_joined(x, y) {\n if (x === y) {\n // TODO: \"===\" should be Object.is or equiv\n return x;\n } else {\n throw new Error(\"Can't join: not the same: \" + x + \" \" + y);\n }\n });\n};\n\n/**\n * Returns a promise for the first of an array of promises to become fulfilled.\n * @param answers {Array} promises to race\n * @returns {Promise} the first promise to be fulfilled\n */\nQ.race = Q_race;\nfunction Q_race(answerPs) {\n return new Promise(function(deferred) {\n answerPs.forEach(function(answerP) {\n Q(answerP).then(deferred.resolve, deferred.reject);\n });\n });\n}\n\n/**\n * Calls the promised function in a future turn.\n * @param object promise or immediate reference for target function\n * @param ...args array of application arguments\n */\nQ.try = function Q_try(callback) {\n return Q(callback).dispatch(\"call\", [[]]);\n};\n\n/**\n * TODO\n */\nQ.function = Promise_function;\nfunction Promise_function(wrapped) {\n return function promiseFunctionWrapper() {\n var args = new Array(arguments.length);\n for (var index = 0; index < arguments.length; index++) {\n args[index] = arguments[index];\n }\n return Q(wrapped).apply(this, args);\n };\n}\n\n/**\n * The promised function decorator ensures that any promise arguments\n * are settled and passed as values (`this` is also settled and passed\n * as a value). It will also ensure that the result of a function is\n * always a promise.\n *\n * @example\n * var add = Q.promised(function (a, b) {\n * return a + b;\n * });\n * add(Q(a), Q(B));\n *\n * @param {function} callback The function to decorate\n * @returns {function} a function that has been decorated.\n */\nQ.promised = function Q_promised(callback) {\n return function promisedMethod() {\n var args = new Array(arguments.length);\n for (var index = 0; index < arguments.length; index++) {\n args[index] = arguments[index];\n }\n return Q_spread(\n [this, Q_all(args)],\n function Q_promised_spread(self, args) {\n return callback.apply(self, args);\n }\n );\n };\n};\n\n/**\n */\nQ.passByCopy = // TODO XXX experimental\nQ.push = function (value) {\n if (Object(value) === value && !Q_isPromise(value)) {\n passByCopies.set(value, true);\n }\n return value;\n};\n\nQ.isPortable = function (value) {\n return Object(value) === value && passByCopies.has(value);\n};\n\nvar passByCopies = new WeakMap();\n\n/**\n * The async function is a decorator for generator functions, turning\n * them into asynchronous generators. Although generators are only\n * part of the newest ECMAScript 6 drafts, this code does not cause\n * syntax errors in older engines. This code should continue to work\n * and will in fact improve over time as the language improves.\n *\n * ES6 generators are currently part of V8 version 3.19 with the\n * `--harmony-generators` runtime flag enabled. This function does not\n * support the former, Pythonic generators that were only implemented\n * by SpiderMonkey.\n *\n * Decorates a generator function such that:\n * - it may yield promises\n * - execution will continue when that promise is fulfilled\n * - the value of the yield expression will be the fulfilled value\n * - it returns a promise for the return value (when the generator\n * stops iterating)\n * - the decorated function returns a promise for the return value\n * of the generator or the first rejected promise among those\n * yielded.\n * - if an error is thrown in the generator, it propagates through\n * every following yield until it is caught, or until it escapes\n * the generator function altogether, and is translated into a\n * rejection for the promise returned by the decorated generator.\n */\nQ.async = Q_async;\nfunction Q_async(makeGenerator) {\n return function spawn() {\n // when verb is \"send\", arg is a value\n // when verb is \"throw\", arg is an exception\n function continuer(verb, arg) {\n var iteration;\n try {\n iteration = generator[verb](arg);\n } catch (exception) {\n return Q_reject(exception);\n }\n if (iteration.done) {\n return Q(iteration.value);\n } else {\n return Q(iteration.value).then(callback, errback);\n }\n }\n var generator = makeGenerator.apply(this, arguments);\n var callback = continuer.bind(continuer, \"next\");\n var errback = continuer.bind(continuer, \"throw\");\n return callback();\n };\n}\n\n/**\n * The spawn function is a small wrapper around async that immediately\n * calls the generator and also ends the promise chain, so that any\n * unhandled errors are thrown instead of forwarded to the error\n * handler. This is useful because it's extremely common to run\n * generators at the top-level to work with libraries.\n */\nQ.spawn = Q_spawn;\nfunction Q_spawn(makeGenerator) {\n Q_async(makeGenerator)().done();\n}\n\n\n// Thus begins the section dedicated to the Promise\n\n/**\n * TODO\n */\nQ.Promise = Promise;\nfunction Promise(handler) {\n if (!(this instanceof Promise)) {\n return new Promise(handler);\n }\n if (typeof handler === \"function\") {\n var setup = handler;\n var deferred = defer();\n handler = Q_getHandler(deferred.promise);\n try {\n setup(deferred.resolve, deferred.reject, deferred.setEstimate);\n } catch (error) {\n deferred.reject(error);\n }\n }\n handlers.set(this, handler);\n}\n\n/**\n * Turns an array of promises into a promise for an array. If any of the\n * promises gets rejected, the whole array is rejected immediately.\n * @param {Array.} an array (or promise for an array) of values (or\n * promises for values)\n * @returns {Promise.} a promise for an array of the corresponding values\n */\nPromise.all = Q_all;\n\n/**\n * Returns a promise for the first of an array of promises to become fulfilled.\n * @param answers {Array} promises to race\n * @returns {Promise} the first promise to be fulfilled\n */\nPromise.race = Q_race;\n\n/**\n * Coerces a value to a promise. If the value is a promise, pass it through\n * unaltered. If the value has a `then` method, it is presumed to be a promise\n * but not one of our own, so it is treated as a “thenable” promise and this\n * returns a promise that stands for it. Otherwise, this returns a promise that\n * has already been fulfilled with the value.\n * @param value promise, object with a then method, or a fulfillment value\n * @returns {Promise} the same promise as given, or a promise for the given\n * value\n */\nPromise.resolve = Promise_resolve;\nfunction Promise_resolve(value) {\n return Q(value);\n}\n\n/**\n * Returns a promise that has been rejected with a reason, which should be an\n * instance of `Error`.\n * @param reason value describing the failure\n * @returns {Promise} rejection\n */\nPromise.reject = Q_reject;\n\n/**\n * @returns {boolean} whether the given value is a promise.\n */\nQ.isPromise = Q_isPromise;\nfunction Q_isPromise(object) {\n return isObject(object) && !!handlers.get(object);\n}\n\n/**\n * @returns {boolean} whether the given value is an object with a then method.\n * @private\n */\nfunction isThenable(object) {\n return isObject(object) && typeof object.then === \"function\";\n}\n\n/**\n * Synchronously produces a snapshot of the internal state of the promise. The\n * object will have a `state` property. If the `state` is `\"pending\"`, there\n * will be no further information. If the `state` is `\"fulfilled\"`, there will\n * be a `value` property. If the state is `\"rejected\"` there will be a `reason`\n * property. If the promise was constructed from a “thenable” and `then` nor\n * any other method has been dispatched on the promise has been called, the\n * state will be `\"pending\"`. The state object will not be updated if the\n * state changes and changing it will have no effect on the promise. Every\n * call to `inspect` produces a unique object.\n * @returns {{state: string, value?, reason?}}\n */\nPromise.prototype.inspect = function Promise_inspect() {\n // the second layer captures only the relevant \"state\" properties of the\n // handler to prevent leaking the capability to access or alter the\n // handler.\n return Q_getHandler(this).inspect();\n};\n\n/**\n * @returns {boolean} whether the promise is waiting for a result.\n */\nPromise.prototype.isPending = function Promise_isPending() {\n return Q_getHandler(this).state === \"pending\";\n};\n\n/**\n * @returns {boolean} whether the promise has ended in a result and has a\n * fulfillment value.\n */\nPromise.prototype.isFulfilled = function Promise_isFulfilled() {\n return Q_getHandler(this).state === \"fulfilled\";\n};\n\n/**\n * @returns {boolean} whether the promise has ended poorly and has a reason for\n * its rejection.\n */\nPromise.prototype.isRejected = function Promise_isRejected() {\n return Q_getHandler(this).state === \"rejected\";\n};\n\n/**\n * TODO\n */\nPromise.prototype.toBePassed = function Promise_toBePassed() {\n return Q_getHandler(this).state === \"passed\";\n};\n\n/**\n * @returns {string} merely `\"[object Promise]\"`\n */\nPromise.prototype.toString = function Promise_toString() {\n return \"[object Promise]\";\n};\n\n/**\n * Creates a new promise, waits for this promise to be resolved, and informs\n * either the fullfilled or rejected handler of the result. Whatever result\n * comes of the fulfilled or rejected handler, a value returned, a promise\n * returned, or an error thrown, becomes the resolution for the promise\n * returned by `then`.\n *\n * @param fulfilled\n * @param rejected\n * @returns {Promise} for the result of `fulfilled` or `rejected`.\n */\nPromise.prototype.then = function Promise_then(fulfilled, rejected, ms) {\n var self = this;\n var deferred = defer();\n\n var _fulfilled;\n if (typeof fulfilled === \"function\") {\n _fulfilled = function Promise_then_fulfilled(value) {\n try {\n deferred.resolve(fulfilled.call(void 0, value));\n } catch (error) {\n deferred.reject(error);\n }\n };\n } else {\n _fulfilled = deferred.resolve;\n }\n\n var _rejected;\n if (typeof rejected === \"function\") {\n _rejected = function Promise_then_rejected(error) {\n try {\n deferred.resolve(rejected.call(void 0, error));\n } catch (newError) {\n deferred.reject(newError);\n }\n };\n } else {\n _rejected = deferred.reject;\n }\n\n this.done(_fulfilled, _rejected);\n\n if (ms !== void 0) {\n var updateEstimate = function Promise_then_updateEstimate() {\n deferred.setEstimate(self.getEstimate() + ms);\n };\n this.observeEstimate(updateEstimate);\n updateEstimate();\n }\n\n return deferred.promise;\n};\n\n/**\n * Terminates a chain of promises, forcing rejections to be\n * thrown as exceptions.\n * @param fulfilled\n * @param rejected\n */\nPromise.prototype.done = function Promise_done(fulfilled, rejected) {\n var self = this;\n var done = false; // ensure the untrusted promise makes at most a\n // single call to one of the callbacks\n asap(function Promise_done_task() {\n var _fulfilled;\n if (typeof fulfilled === \"function\") {\n if (Q.onerror) {\n _fulfilled = function Promise_done_fulfilled(value) {\n if (done) {\n return;\n }\n done = true;\n try {\n fulfilled.call(void 0, value);\n } catch (error) {\n // fallback to rethrow is still necessary because\n // _fulfilled is not called in the same event as the\n // above guard.\n (Q.onerror || Promise_rethrow)(error);\n }\n };\n } else {\n _fulfilled = function Promise_done_fulfilled(value) {\n if (done) {\n return;\n }\n done = true;\n fulfilled.call(void 0, value);\n };\n }\n }\n\n var _rejected;\n if (typeof rejected === \"function\" && Q.onerror) {\n _rejected = function Promise_done_rejected(error) {\n if (done) {\n return;\n }\n done = true;\n makeStackTraceLong(error, self);\n try {\n rejected.call(void 0, error);\n } catch (newError) {\n (Q.onerror || Promise_rethrow)(newError);\n }\n };\n } else if (typeof rejected === \"function\") {\n _rejected = function Promise_done_rejected(error) {\n if (done) {\n return;\n }\n done = true;\n makeStackTraceLong(error, self);\n rejected.call(void 0, error);\n };\n } else {\n _rejected = Q.onerror || Promise_rethrow;\n }\n\n if (typeof process === \"object\" && process.domain) {\n _rejected = process.domain.bind(_rejected);\n }\n\n Q_getHandler(self).dispatch(_fulfilled, \"then\", [_rejected]);\n });\n};\n\nfunction Promise_rethrow(error) {\n throw error;\n}\n\n/**\n * TODO\n */\nPromise.prototype.thenResolve = function Promise_thenResolve(value) {\n // Wrapping ahead of time to forestall multiple wrappers.\n value = Q(value);\n // Using all is necessary to aggregate the estimated time to completion.\n return Q_all([this, value]).then(function Promise_thenResolve_resolved() {\n return value;\n }, null, 0);\n // 0: does not contribute significantly to the estimated time to\n // completion.\n};\n\n/**\n * TODO\n */\nPromise.prototype.thenReject = function Promise_thenReject(error) {\n return this.then(function Promise_thenReject_resolved() {\n throw error;\n }, null, 0);\n // 0: does not contribute significantly to the estimated time to\n // completion.\n};\n\n/**\n * TODO\n */\nPromise.prototype.all = function Promise_all() {\n return this.then(Q_all);\n};\n\n/**\n * Turns an array of promises into a promise for an array of their states (as\n * returned by `inspect`) when they have all settled.\n * @param {Array[Any*]} values an array (or promise for an array) of values (or\n * promises for values)\n * @returns {Array[State]} an array of states for the respective values.\n */\nPromise.prototype.allSettled = function Promise_allSettled() {\n return this.then(Q_allSettled);\n};\n\n/**\n * TODO\n */\nPromise.prototype.catch = function Promise_catch(rejected) {\n return this.then(void 0, rejected);\n};\n\n/**\n * TODO\n */\nPromise.prototype.finally = function Promise_finally(callback, ms) {\n if (!callback) {\n return this;\n }\n callback = Q(callback);\n return this.then(function (value) {\n return callback.call().then(function Promise_finally_fulfilled() {\n return value;\n });\n }, function (reason) {\n // TODO attempt to recycle the rejection with \"this\".\n return callback.call().then(function Promise_finally_rejected() {\n throw reason;\n });\n }, ms);\n};\n\n/**\n * TODO\n */\nPromise.prototype.observeEstimate = function Promise_observeEstimate(emit) {\n this.rawDispatch(null, \"estimate\", [emit]);\n return this;\n};\n\n/**\n * TODO\n */\nPromise.prototype.getEstimate = function Promise_getEstimate() {\n return Q_getHandler(this).estimate;\n};\n\n/**\n * TODO\n */\nPromise.prototype.dispatch = function Promise_dispatch(op, args) {\n var deferred = defer();\n this.rawDispatch(deferred.resolve, op, args);\n return deferred.promise;\n};\n\n/**\n */\nPromise.prototype.rawDispatch = function Promise_rawDispatch(resolve, op, args) {\n var self = this;\n asap(function Promise_dispatch_task() {\n Q_getHandler(self).dispatch(resolve, op, args);\n });\n};\n\n/**\n * TODO\n */\nPromise.prototype.get = function Promise_get(name) {\n return this.dispatch(\"get\", [name]);\n};\n\n/**\n * TODO\n */\nPromise.prototype.invoke = function Promise_invoke(name /*...args*/) {\n var args = new Array(arguments.length - 1);\n for (var index = 1; index < arguments.length; index++) {\n args[index - 1] = arguments[index];\n }\n return this.dispatch(\"invoke\", [name, args]);\n};\n\n/**\n * TODO\n */\nPromise.prototype.apply = function Promise_apply(thisp, args) {\n return this.dispatch(\"call\", [args, thisp]);\n};\n\n/**\n * TODO\n */\nPromise.prototype.call = function Promise_call(thisp /*, ...args*/) {\n var args = new Array(Math.max(0, arguments.length - 1));\n for (var index = 1; index < arguments.length; index++) {\n args[index - 1] = arguments[index];\n }\n return this.dispatch(\"call\", [args, thisp]);\n};\n\n/**\n * TODO\n */\nPromise.prototype.bind = function Promise_bind(thisp /*, ...args*/) {\n var self = this;\n var args = new Array(Math.max(0, arguments.length - 1));\n for (var index = 1; index < arguments.length; index++) {\n args[index - 1] = arguments[index];\n }\n return function Promise_bind_bound(/*...args*/) {\n var boundArgs = args.slice();\n for (var index = 0; index < arguments.length; index++) {\n boundArgs[boundArgs.length] = arguments[index];\n }\n return self.dispatch(\"call\", [boundArgs, thisp]);\n };\n};\n\n/**\n * TODO\n */\nPromise.prototype.keys = function Promise_keys() {\n return this.dispatch(\"keys\", []);\n};\n\n/**\n * TODO\n */\nPromise.prototype.iterate = function Promise_iterate() {\n return this.dispatch(\"iterate\", []);\n};\n\n/**\n * TODO\n */\nPromise.prototype.spread = function Promise_spread(fulfilled, rejected, ms) {\n return this.all().then(function Promise_spread_fulfilled(array) {\n return fulfilled.apply(void 0, array);\n }, rejected, ms);\n};\n\n/**\n * Causes a promise to be rejected if it does not get fulfilled before\n * some milliseconds time out.\n * @param {Number} milliseconds timeout\n * @param {String} custom error message (optional)\n * @returns a promise for the resolution of the given promise if it is\n * fulfilled before the timeout, otherwise rejected.\n */\nPromise.prototype.timeout = function Promsie_timeout(ms, message) {\n var deferred = defer();\n var timeoutId = setTimeout(function Promise_timeout_task() {\n deferred.reject(new Error(message || \"Timed out after \" + ms + \" ms\"));\n }, ms);\n\n this.then(function Promise_timeout_fulfilled(value) {\n clearTimeout(timeoutId);\n deferred.resolve(value);\n }, function Promise_timeout_rejected(error) {\n clearTimeout(timeoutId);\n deferred.reject(error);\n });\n\n return deferred.promise;\n};\n\n/**\n * Returns a promise for the given value (or promised value), some\n * milliseconds after it resolved. Passes rejections immediately.\n * @param {Any*} promise\n * @param {Number} milliseconds\n * @returns a promise for the resolution of the given promise after milliseconds\n * time has elapsed since the resolution of the given promise.\n * If the given promise rejects, that is passed immediately.\n */\nPromise.prototype.delay = function Promise_delay(ms) {\n return this.then(function Promise_delay_fulfilled(value) {\n var deferred = defer();\n deferred.setEstimate(Date.now() + ms);\n setTimeout(function Promise_delay_task() {\n deferred.resolve(value);\n }, ms);\n return deferred.promise;\n }, null, ms);\n};\n\n/**\n * TODO\n */\nPromise.prototype.pull = function Promise_pull() {\n return this.dispatch(\"pull\", []);\n};\n\n/**\n * TODO\n */\nPromise.prototype.pass = function Promise_pass() {\n if (!this.toBePassed()) {\n return new Promise(new Passed(this));\n } else {\n return this;\n }\n};\n\n\n// Thus begins the portion dedicated to the deferred\n\nvar promises = new WeakMap();\n\nfunction Deferred(promise) {\n this.promise = promise;\n // A deferred has an intrinsic promise, denoted by its hidden handler\n // property. The promise property of the deferred may be assigned to a\n // different promise (as it is in a Queue), but the intrinsic promise does\n // not change.\n promises.set(this, promise);\n var self = this;\n var resolve = this.resolve;\n this.resolve = function (value) {\n resolve.call(self, value);\n };\n var reject = this.reject;\n this.reject = function (error) {\n reject.call(self, error);\n };\n}\n\n/**\n * TODO\n */\nDeferred.prototype.resolve = function Deferred_resolve(value) {\n var handler = Q_getHandler(promises.get(this));\n if (!handler.messages) {\n return;\n }\n handler.become(Q(value));\n};\n\n/**\n * TODO\n */\nDeferred.prototype.reject = function Deferred_reject(reason) {\n var handler = Q_getHandler(promises.get(this));\n if (!handler.messages) {\n return;\n }\n handler.become(Q_reject(reason));\n};\n\n/**\n * TODO\n */\nDeferred.prototype.setEstimate = function Deferred_setEstimate(estimate) {\n estimate = +estimate;\n if (estimate !== estimate) {\n estimate = Infinity;\n }\n if (estimate < 1e12 && estimate !== -Infinity) {\n throw new Error(\"Estimate values should be a number of miliseconds in the future\");\n }\n var handler = Q_getHandler(promises.get(this));\n // TODO There is a bit of capability leakage going on here. The Deferred\n // should only be able to set the estimate for its original\n // Pending, not for any handler that promise subsequently became.\n if (handler.setEstimate) {\n handler.setEstimate(estimate);\n }\n};\n\n// Thus ends the public interface\n\n// Thus begins the portion dedicated to handlers\n\nfunction Fulfilled(value) {\n this.value = value;\n this.estimate = Date.now();\n}\n\nFulfilled.prototype.state = \"fulfilled\";\n\nFulfilled.prototype.inspect = function Fulfilled_inspect() {\n return {state: \"fulfilled\", value: this.value};\n};\n\nFulfilled.prototype.dispatch = function Fulfilled_dispatch(\n resolve, op, operands\n) {\n var result;\n if (\n op === \"then\" ||\n op === \"get\" ||\n op === \"call\" ||\n op === \"invoke\" ||\n op === \"keys\" ||\n op === \"iterate\" ||\n op === \"pull\"\n ) {\n try {\n result = this[op].apply(this, operands);\n } catch (exception) {\n result = Q_reject(exception);\n }\n } else if (op === \"estimate\") {\n operands[0].call(void 0, this.estimate);\n } else {\n var error = new Error(\n \"Fulfilled promises do not support the \" + op + \" operator\"\n );\n result = Q_reject(error);\n }\n if (resolve) {\n resolve(result);\n }\n};\n\nFulfilled.prototype.then = function Fulfilled_then() {\n return this.value;\n};\n\nFulfilled.prototype.get = function Fulfilled_get(name) {\n return this.value[name];\n};\n\nFulfilled.prototype.call = function Fulfilled_call(args, thisp) {\n return this.callInvoke(this.value, args, thisp);\n};\n\nFulfilled.prototype.invoke = function Fulfilled_invoke(name, args) {\n return this.callInvoke(this.value[name], args, this.value);\n};\n\nFulfilled.prototype.callInvoke = function Fulfilled_callInvoke(callback, args, thisp) {\n var waitToBePassed;\n for (var index = 0; index < args.length; index++) {\n if (Q_isPromise(args[index]) && args[index].toBePassed()) {\n waitToBePassed = waitToBePassed || [];\n waitToBePassed.push(args[index]);\n }\n }\n if (waitToBePassed) {\n var self = this;\n return Q_all(waitToBePassed).then(function () {\n return self.callInvoke(callback, args.map(function (arg) {\n if (Q_isPromise(arg) && arg.toBePassed()) {\n return arg.inspect().value;\n } else {\n return arg;\n }\n }), thisp);\n });\n } else {\n return callback.apply(thisp, args);\n }\n};\n\nFulfilled.prototype.keys = function Fulfilled_keys() {\n return Object.keys(this.value);\n};\n\nFulfilled.prototype.iterate = function Fulfilled_iterate() {\n return iterate(this.value);\n};\n\nFulfilled.prototype.pull = function Fulfilled_pull() {\n var result;\n if (Object(this.value) === this.value) {\n result = Array.isArray(this.value) ? [] : {};\n for (var name in this.value) {\n result[name] = this.value[name];\n }\n } else {\n result = this.value;\n }\n return Q.push(result);\n};\n\n\nfunction Rejected(reason) {\n this.reason = reason;\n this.estimate = Infinity;\n}\n\nRejected.prototype.state = \"rejected\";\n\nRejected.prototype.inspect = function Rejected_inspect() {\n return {state: \"rejected\", reason: this.reason};\n};\n\nRejected.prototype.dispatch = function Rejected_dispatch(\n resolve, op, operands\n) {\n var result;\n if (op === \"then\") {\n result = this.then(resolve, operands[0]);\n } else {\n result = this;\n }\n if (resolve) {\n resolve(result);\n }\n};\n\nRejected.prototype.then = function Rejected_then(\n resolve, rejected\n) {\n return rejected ? rejected(this.reason) : this;\n};\n\n\nfunction Pending() {\n // if \"messages\" is an \"Array\", that indicates that the promise has not yet\n // been resolved. If it is \"undefined\", it has been resolved. Each\n // element of the messages array is itself an array of complete arguments to\n // forward to the resolved promise. We coerce the resolution value to a\n // promise using the `resolve` function because it handles both fully\n // non-thenable values and other thenables gracefully.\n this.messages = [];\n this.observers = [];\n this.estimate = Infinity;\n}\n\nPending.prototype.state = \"pending\";\n\nPending.prototype.inspect = function Pending_inspect() {\n return {state: \"pending\"};\n};\n\nPending.prototype.dispatch = function Pending_dispatch(resolve, op, operands) {\n this.messages.push([resolve, op, operands]);\n if (op === \"estimate\") {\n this.observers.push(operands[0]);\n var self = this;\n asap(function Pending_dispatch_task() {\n operands[0].call(void 0, self.estimate);\n });\n }\n};\n\nPending.prototype.become = function Pending_become(promise) {\n this.became = theViciousCycle;\n var handler = Q_getHandler(promise);\n this.became = handler;\n\n handlers.set(promise, handler);\n this.promise = void 0;\n\n this.messages.forEach(function Pending_become_eachMessage(message) {\n // makeQ does not have this asap call, so it must be queueing events\n // downstream. TODO look at makeQ to ascertain\n asap(function Pending_become_eachMessage_task() {\n var handler = Q_getHandler(promise);\n handler.dispatch.apply(handler, message);\n });\n });\n\n this.messages = void 0;\n this.observers = void 0;\n};\n\nPending.prototype.setEstimate = function Pending_setEstimate(estimate) {\n if (this.observers) {\n var self = this;\n self.estimate = estimate;\n this.observers.forEach(function Pending_eachObserver(observer) {\n asap(function Pending_setEstimate_eachObserver_task() {\n observer.call(void 0, estimate);\n });\n });\n }\n};\n\nfunction Thenable(thenable) {\n this.thenable = thenable;\n this.became = null;\n this.estimate = Infinity;\n}\n\nThenable.prototype.state = \"thenable\";\n\nThenable.prototype.inspect = function Thenable_inspect() {\n return {state: \"pending\"};\n};\n\nThenable.prototype.cast = function Thenable_cast() {\n if (!this.became) {\n var deferred = defer();\n var thenable = this.thenable;\n asap(function Thenable_cast_task() {\n try {\n thenable.then(deferred.resolve, deferred.reject);\n } catch (exception) {\n deferred.reject(exception);\n }\n });\n this.became = Q_getHandler(deferred.promise);\n }\n return this.became;\n};\n\nThenable.prototype.dispatch = function Thenable_dispatch(resolve, op, args) {\n this.cast().dispatch(resolve, op, args);\n};\n\n\nfunction Passed(promise) {\n this.promise = promise;\n}\n\nPassed.prototype.state = \"passed\";\n\nPassed.prototype.inspect = function Passed_inspect() {\n return this.promise.inspect();\n};\n\nPassed.prototype.dispatch = function Passed_dispatch(resolve, op, args) {\n return this.promise.rawDispatch(resolve, op, args);\n};\n\n\n// Thus begins the Q Node.js bridge\n\n/**\n * Calls a method of a Node-style object that accepts a Node-style\n * callback, forwarding the given variadic arguments, plus a provided\n * callback argument.\n * @param object an object that has the named method\n * @param {String} name name of the method of object\n * @param ...args arguments to pass to the method; the callback will\n * be provided by Q and appended to these arguments.\n * @returns a promise for the value or error\n */\nQ.ninvoke = function Q_ninvoke(object, name /*...args*/) {\n var args = new Array(Math.max(0, arguments.length - 1));\n for (var index = 2; index < arguments.length; index++) {\n args[index - 2] = arguments[index];\n }\n var deferred = Q.defer();\n args[index - 2] = deferred.makeNodeResolver();\n Q(object).dispatch(\"invoke\", [name, args]).catch(deferred.reject);\n return deferred.promise;\n};\n\nPromise.prototype.ninvoke = function Promise_ninvoke(name /*...args*/) {\n var args = new Array(arguments.length);\n for (var index = 1; index < arguments.length; index++) {\n args[index - 1] = arguments[index];\n }\n var deferred = Q.defer();\n args[index - 1] = deferred.makeNodeResolver();\n this.dispatch(\"invoke\", [name, args]).catch(deferred.reject);\n return deferred.promise;\n};\n\n/**\n * Wraps a Node.js continuation passing function and returns an equivalent\n * version that returns a promise.\n * @example\n * Q.denodeify(FS.readFile)(__filename, \"utf-8\")\n * .then(console.log)\n * .done()\n */\nQ.denodeify = function Q_denodeify(callback, pattern) {\n return function denodeified() {\n var args = new Array(arguments.length + 1);\n var index = 0;\n for (; index < arguments.length; index++) {\n args[index] = arguments[index];\n }\n var deferred = Q.defer();\n args[index] = deferred.makeNodeResolver(pattern);\n Q(callback).apply(this, args).catch(deferred.reject);\n return deferred.promise;\n };\n};\n\n/**\n * Creates a Node.js-style callback that will resolve or reject the deferred\n * promise.\n * @param unpack `true` means that the Node.js-style-callback accepts a\n * fixed or variable number of arguments and that the deferred should be resolved\n * with an array of these value arguments, or rejected with the error argument.\n * An array of names means that the Node.js-style-callback accepts a fixed\n * number of arguments, and that the resolution should be an object with\n * properties corresponding to the given names and respective value arguments.\n * @returns a nodeback\n */\nDeferred.prototype.makeNodeResolver = function (unpack) {\n var resolve = this.resolve;\n if (unpack === true) {\n return function variadicNodebackToResolver(error) {\n if (error) {\n resolve(Q_reject(error));\n } else {\n var value = new Array(Math.max(0, arguments.length - 1));\n for (var index = 1; index < arguments.length; index++) {\n value[index - 1] = arguments[index];\n }\n resolve(value);\n }\n };\n } else if (unpack) {\n return function namedArgumentNodebackToResolver(error) {\n if (error) {\n resolve(Q_reject(error));\n } else {\n var value = {};\n for (var index = 0; index < unpack.length; index++) {\n value[unpack[index]] = arguments[index + 1];\n }\n resolve(value);\n }\n };\n } else {\n return function nodebackToResolver(error, value) {\n if (error) {\n resolve(Q_reject(error));\n } else {\n resolve(value);\n }\n };\n }\n};\n\n/**\n * TODO\n */\nPromise.prototype.nodeify = function Promise_nodeify(nodeback) {\n if (nodeback) {\n this.done(function (value) {\n nodeback(null, value);\n }, nodeback);\n } else {\n return this;\n }\n};\n\n\n// DEPRECATED\n\nQ.nextTick = deprecate(asap, \"nextTick\", \"asap package\");\n\nQ.resolve = deprecate(Q, \"resolve\", \"Q\");\n\nQ.fulfill = deprecate(Q, \"fulfill\", \"Q\");\n\nQ.isPromiseAlike = deprecate(isThenable, \"isPromiseAlike\", \"(not supported)\");\n\nQ.fail = deprecate(function (value, rejected) {\n return Q(value).catch(rejected);\n}, \"Q.fail\", \"Q(value).catch\");\n\nQ.fin = deprecate(function (value, regardless) {\n return Q(value).finally(regardless);\n}, \"Q.fin\", \"Q(value).finally\");\n\nQ.progress = deprecate(function (value) {\n return value;\n}, \"Q.progress\", \"no longer supported\");\n\nQ.thenResolve = deprecate(function (promise, value) {\n return Q(promise).thenResolve(value);\n}, \"thenResolve\", \"Q(value).thenResolve\");\n\nQ.thenReject = deprecate(function (promise, reason) {\n return Q(promise).thenResolve(reason);\n}, \"thenResolve\", \"Q(value).thenResolve\");\n\nQ.isPending = deprecate(function (value) {\n return Q(value).isPending();\n}, \"isPending\", \"Q(value).isPending\");\n\nQ.isFulfilled = deprecate(function (value) {\n return Q(value).isFulfilled();\n}, \"isFulfilled\", \"Q(value).isFulfilled\");\n\nQ.isRejected = deprecate(function (value) {\n return Q(value).isRejected();\n}, \"isRejected\", \"Q(value).isRejected\");\n\nQ.master = deprecate(function (value) {\n return value;\n}, \"master\", \"no longer necessary\");\n\nQ.makePromise = function () {\n throw new Error(\"makePromise is no longer supported\");\n};\n\nQ.dispatch = deprecate(function (value, op, operands) {\n return Q(value).dispatch(op, operands);\n}, \"dispatch\", \"Q(value).dispatch\");\n\nQ.get = deprecate(function (object, name) {\n return Q(object).get(name);\n}, \"get\", \"Q(value).get\");\n\nQ.keys = deprecate(function (object) {\n return Q(object).keys();\n}, \"keys\", \"Q(value).keys\");\n\nQ.post = deprecate(function (object, name, args) {\n return Q(object).post(name, args);\n}, \"post\", \"Q(value).invoke (spread arguments)\");\n\nQ.mapply = deprecate(function (object, name, args) {\n return Q(object).post(name, args);\n}, \"post\", \"Q(value).invoke (spread arguments)\");\n\nQ.send = deprecate(function (object, name) {\n return Q(object).post(name, Array.prototype.slice.call(arguments, 2));\n}, \"send\", \"Q(value).invoke\");\n\nQ.set = function () {\n throw new Error(\"Q.set no longer supported\");\n};\n\nQ.delete = function () {\n throw new Error(\"Q.delete no longer supported\");\n};\n\nQ.nearer = deprecate(function (value) {\n if (Q_isPromise(value) && value.isFulfilled()) {\n return value.inspect().value;\n } else {\n return value;\n }\n}, \"nearer\", \"inspect().value (+nuances)\");\n\nQ.fapply = deprecate(function (callback, args) {\n return Q(callback).dispatch(\"call\", [args]);\n}, \"fapply\", \"Q(callback).apply(thisp, args)\");\n\nQ.fcall = deprecate(function (callback /*, ...args*/) {\n return Q(callback).dispatch(\"call\", [Array.prototype.slice.call(arguments, 1)]);\n}, \"fcall\", \"Q(callback).call(thisp, ...args)\");\n\nQ.fbind = deprecate(function (object /*...args*/) {\n var promise = Q(object);\n var args = Array.prototype.slice.call(arguments, 1);\n return function fbound() {\n return promise.dispatch(\"call\", [\n args.concat(Array.prototype.slice.call(arguments)),\n this\n ]);\n };\n}, \"fbind\", \"bind with thisp\");\n\nQ.promise = deprecate(Promise, \"promise\", \"Promise\");\n\nPromise.prototype.fapply = deprecate(function (args) {\n return this.dispatch(\"call\", [args]);\n}, \"fapply\", \"apply with thisp\");\n\nPromise.prototype.fcall = deprecate(function (/*...args*/) {\n return this.dispatch(\"call\", [Array.prototype.slice.call(arguments)]);\n}, \"fcall\", \"try or call with thisp\");\n\nPromise.prototype.fail = deprecate(function (rejected) {\n return this.catch(rejected);\n}, \"fail\", \"catch\");\n\nPromise.prototype.fin = deprecate(function (regardless) {\n return this.finally(regardless);\n}, \"fin\", \"finally\");\n\nPromise.prototype.set = function () {\n throw new Error(\"Promise set no longer supported\");\n};\n\nPromise.prototype.delete = function () {\n throw new Error(\"Promise delete no longer supported\");\n};\n\nDeferred.prototype.notify = deprecate(function () {\n}, \"notify\", \"no longer supported\");\n\nPromise.prototype.progress = deprecate(function () {\n return this;\n}, \"progress\", \"no longer supported\");\n\n// alternative proposed by Redsandro, dropped in favor of post to streamline\n// the interface\nPromise.prototype.mapply = deprecate(function (name, args) {\n return this.dispatch(\"invoke\", [name, args]);\n}, \"mapply\", \"invoke\");\n\nPromise.prototype.fbind = deprecate(function () {\n return Q.fbind.apply(Q, [void 0].concat(Array.prototype.slice.call(arguments)));\n}, \"fbind\", \"bind(thisp, ...args)\");\n\n// alternative proposed by Mark Miller, dropped in favor of invoke\nPromise.prototype.send = deprecate(function () {\n return this.dispatch(\"invoke\", [name, Array.prototype.slice.call(arguments, 1)]);\n}, \"send\", \"invoke\");\n\n// alternative proposed by Redsandro, dropped in favor of invoke\nPromise.prototype.mcall = deprecate(function () {\n return this.dispatch(\"invoke\", [name, Array.prototype.slice.call(arguments, 1)]);\n}, \"mcall\", \"invoke\");\n\nPromise.prototype.passByCopy = deprecate(function (value) {\n return value;\n}, \"passByCopy\", \"Q.passByCopy\");\n\n// Deprecated Node.js bridge promise methods\n\nQ.nfapply = deprecate(function (callback, args) {\n var deferred = Q.defer();\n var nodeArgs = Array.prototype.slice.call(args);\n nodeArgs.push(deferred.makeNodeResolver());\n Q(callback).apply(this, nodeArgs).catch(deferred.reject);\n return deferred.promise;\n}, \"nfapply\");\n\nPromise.prototype.nfapply = deprecate(function (args) {\n return Q.nfapply(this, args);\n}, \"nfapply\");\n\nQ.nfcall = deprecate(function (callback /*...args*/) {\n var args = Array.prototype.slice.call(arguments, 1);\n return Q.nfapply(callback, args);\n}, \"nfcall\");\n\nPromise.prototype.nfcall = deprecate(function () {\n var args = new Array(arguments.length);\n for (var index = 0; index < arguments.length; index++) {\n args[index] = arguments[index];\n }\n return Q.nfapply(this, args);\n}, \"nfcall\");\n\nQ.nfbind = deprecate(function (callback /*...args*/) {\n var baseArgs = Array.prototype.slice.call(arguments, 1);\n return function () {\n var nodeArgs = baseArgs.concat(Array.prototype.slice.call(arguments));\n var deferred = Q.defer();\n nodeArgs.push(deferred.makeNodeResolver());\n Q(callback).apply(this, nodeArgs).catch(deferred.reject);\n return deferred.promise;\n };\n}, \"nfbind\", \"denodeify (with caveats)\");\n\nPromise.prototype.nfbind = deprecate(function () {\n var args = new Array(arguments.length);\n for (var index = 0; index < arguments.length; index++) {\n args[index] = arguments[index];\n }\n return Q.nfbind(this, args);\n}, \"nfbind\", \"denodeify (with caveats)\");\n\nQ.nbind = deprecate(function (callback, thisp /*...args*/) {\n var baseArgs = Array.prototype.slice.call(arguments, 2);\n return function () {\n var nodeArgs = baseArgs.concat(Array.prototype.slice.call(arguments));\n var deferred = Q.defer();\n nodeArgs.push(deferred.makeNodeResolver());\n function bound() {\n return callback.apply(thisp, arguments);\n }\n Q(bound).apply(this, nodeArgs).catch(deferred.reject);\n return deferred.promise;\n };\n}, \"nbind\", \"denodeify (with caveats)\");\n\nQ.npost = deprecate(function (object, name, nodeArgs) {\n var deferred = Q.defer();\n nodeArgs.push(deferred.makeNodeResolver());\n Q(object).dispatch(\"invoke\", [name, nodeArgs]).catch(deferred.reject);\n return deferred.promise;\n}, \"npost\", \"ninvoke (with spread arguments)\");\n\nPromise.prototype.npost = deprecate(function (name, args) {\n return Q.npost(this, name, args);\n}, \"npost\", \"Q.ninvoke (with caveats)\");\n\nQ.nmapply = deprecate(Q.nmapply, \"nmapply\", \"q/node nmapply\");\nPromise.prototype.nmapply = deprecate(Promise.prototype.npost, \"nmapply\", \"Q.nmapply\");\n\nQ.nsend = deprecate(Q.ninvoke, \"nsend\", \"q/node ninvoke\");\nQ.nmcall = deprecate(Q.ninvoke, \"nmcall\", \"q/node ninvoke\");\nPromise.prototype.nsend = deprecate(Promise.prototype.ninvoke, \"nsend\", \"q/node ninvoke\");\nPromise.prototype.nmcall = deprecate(Promise.prototype.ninvoke, \"nmcall\", \"q/node ninvoke\");\n\n// All code before this point will be filtered from stack traces.\nvar qEndingLine = captureLine();\n\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Q = require(\"q\");\r\nvar EventHandlerManager = /** @class */ (function () {\r\n function EventHandlerManager() {\r\n this.events = {};\r\n this.eventsRefs = {};\r\n this.idCounter = 0;\r\n }\r\n EventHandlerManager.prototype.attach = function (events) {\r\n var _this = this;\r\n if (events instanceof Array) {\r\n events.forEach(function (event) {\r\n _this.events[event] = [];\r\n });\r\n }\r\n else {\r\n this.events[events] = [];\r\n }\r\n };\r\n EventHandlerManager.prototype.on = function (events, action) {\r\n var _this = this;\r\n var eventsList = [];\r\n if (!(events instanceof Array)) {\r\n eventsList.push(events);\r\n }\r\n else {\r\n eventsList = events;\r\n }\r\n var eventIdList = [];\r\n eventsList.forEach(function (event) {\r\n var currentEvent = {\r\n eventId: ++_this.idCounter,\r\n action: function (event, sender, data) {\r\n return Q.spread([event, sender, data], function (event, sender, data) { return action(event, sender, data); });\r\n }\r\n };\r\n _this.events[event].push(currentEvent);\r\n eventIdList.push(currentEvent.eventId);\r\n _this.eventsRefs[currentEvent.eventId] = currentEvent;\r\n });\r\n if (eventIdList.length === 1) {\r\n return eventIdList[0];\r\n }\r\n return eventIdList;\r\n };\r\n EventHandlerManager.prototype.off = function (eventRef) {\r\n var _this = this;\r\n if (typeof eventRef === \"number\") {\r\n this.eventsRefs[eventRef] = null;\r\n var currentEvent = this.events.find(function (event) {\r\n return event.eventId === eventRef;\r\n });\r\n if (currentEvent !== undefined && currentEvent !== null) {\r\n currentEvent = null;\r\n }\r\n }\r\n else if (typeof eventRef === \"string\") {\r\n this.events[eventRef].forEach(function (event) {\r\n _this.eventsRefs[event.eventId] = null;\r\n });\r\n this.events[eventRef] = null;\r\n }\r\n else if (eventRef === undefined || eventRef === null) {\r\n this.events = {};\r\n this.eventsRefs = {};\r\n }\r\n };\r\n EventHandlerManager.prototype.trigger = function (events, sequential, order, data) {\r\n var _this = this;\r\n var eventsList = [];\r\n if (!(events instanceof Array)) {\r\n eventsList.push(events);\r\n }\r\n else {\r\n eventsList = events;\r\n }\r\n var executionQueue = [];\r\n eventsList.forEach(function (eventParam) {\r\n _this.events[eventParam].forEach(function (event) {\r\n executionQueue.push(function () {\r\n return event.action(eventParam, _this, data);\r\n });\r\n });\r\n });\r\n if (sequential) {\r\n if (order === 'reverse') {\r\n return executionQueue.slice().reverse().reduce(Q.when, Q());\r\n }\r\n return executionQueue.reduce(Q.when, Q());\r\n }\r\n var asyncQueue = [];\r\n executionQueue.forEach(function (callback) {\r\n asyncQueue.push(callback());\r\n });\r\n return Q.all(asyncQueue);\r\n };\r\n EventHandlerManager.prototype.clear = function () {\r\n this.events = {};\r\n this.eventsRefs = {};\r\n this.idCounter = 0;\r\n };\r\n return EventHandlerManager;\r\n}());\r\nexports.EventHandlerManager = EventHandlerManager;\r\n//# sourceMappingURL=EventHandlerManager.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n//# sourceMappingURL=IEventHandlerManager.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar event_handler_manager_1 = require(\"event-handler-manager\");\r\nvar ScriptsConfigBuilder_1 = require(\"./ScriptsConfigBuilder\");\r\nvar ScriptsInjector_1 = require(\"./ScriptsInjector\");\r\nvar PathModuleConfigBuilder_1 = require(\"./PathModuleConfigBuilder\");\r\nvar ExportsModuleConfigBuilder_1 = require(\"./ExportsModuleConfigBuilder\");\r\nvar DependenciesModuleConfigBuilder_1 = require(\"./DependenciesModuleConfigBuilder\");\r\nvar ScriptsPathBuilder_1 = require(\"./ScriptsPathBuilder\");\r\nvar quodem_bootloader_configprovider_1 = require(\"quodem-bootloader-configprovider\");\r\nvar ScriptsLoader = /** @class */ (function (_super) {\r\n __extends(ScriptsLoader, _super);\r\n function ScriptsLoader(scriptsConfigProvider, require, scriptsInjector, scriptsConfigBuilder, pathModuleConfigBuilder, exportsModuleConfigBuilder, dependenciesModuleConfigBuilder, scriptsPathBuilder) {\r\n var _this = _super.call(this) || this;\r\n _this.scriptsConfigProvider = scriptsConfigProvider;\r\n _this.require = require;\r\n _this.scriptsInjector = scriptsInjector;\r\n _this.scriptsConfigBuilder = scriptsConfigBuilder;\r\n _this.pathModuleConfigBuilder = pathModuleConfigBuilder;\r\n _this.exportsModuleConfigBuilder = exportsModuleConfigBuilder;\r\n _this.dependenciesModuleConfigBuilder = dependenciesModuleConfigBuilder;\r\n _this.scriptsPathBuilder = scriptsPathBuilder;\r\n _this.modules = {};\r\n _this.attach(['beforeload', 'afterload']);\r\n _this.scriptsConfigProvider = _this.scriptsConfigProvider !== undefined && _this.scriptsConfigProvider !== null\r\n ? _this.scriptsConfigProvider\r\n : new quodem_bootloader_configprovider_1.BootloaderConfigProvider();\r\n _this.scriptsPathBuilder = _this.scriptsPathBuilder !== undefined && _this.scriptsPathBuilder !== null\r\n ? _this.scriptsPathBuilder\r\n : new ScriptsPathBuilder_1.ScriptsPathBuilder();\r\n _this.pathModuleConfigBuilder = _this.pathModuleConfigBuilder !== undefined && _this.pathModuleConfigBuilder !== null\r\n ? _this.pathModuleConfigBuilder\r\n : new PathModuleConfigBuilder_1.PathModuleConfigBuilder(scriptsPathBuilder);\r\n _this.exportsModuleConfigBuilder = _this.exportsModuleConfigBuilder !== undefined && _this.exportsModuleConfigBuilder !== null\r\n ? _this.exportsModuleConfigBuilder\r\n : new ExportsModuleConfigBuilder_1.ExportsModuleConfigBuilder();\r\n _this.dependenciesModuleConfigBuilder = _this.dependenciesModuleConfigBuilder !== undefined && _this.dependenciesModuleConfigBuilder !== null\r\n ? _this.dependenciesModuleConfigBuilder\r\n : new DependenciesModuleConfigBuilder_1.DependenciesModuleConfigBuilder();\r\n _this.scriptsConfigBuilder = _this.scriptsConfigBuilder !== undefined && _this.scriptsConfigBuilder !== null\r\n ? _this.scriptsConfigBuilder\r\n : new ScriptsConfigBuilder_1.ScriptsConfigBuilder(require, _this.pathModuleConfigBuilder, _this.dependenciesModuleConfigBuilder, _this.exportsModuleConfigBuilder);\r\n _this.scriptsInjector = _this.scriptsInjector !== undefined && _this.scriptsInjector !== null\r\n ? _this.scriptsInjector\r\n : new ScriptsInjector_1.ScriptsInjector();\r\n return _this;\r\n }\r\n ScriptsLoader.prototype.load = function () {\r\n var _this = this;\r\n this.trigger('beforeload', true);\r\n this.scriptsConfigProvider.get().then(function (scriptsConfig) {\r\n if (scriptsConfig !== undefined && scriptsConfig !== null) {\r\n if (_this.require !== undefined && _this.require !== null) {\r\n _this.scriptsConfigBuilder.configure(scriptsConfig);\r\n }\r\n var scripts = scriptsConfig.filter(function (script) { return script.FileType === 0; });\r\n try {\r\n _this.scriptsInjector.inject(_this, scripts);\r\n }\r\n catch (e) {\r\n console.error(JSON.stringify(e));\r\n _this.trigger(\"afterload\", true);\r\n }\r\n }\r\n else {\r\n _this.trigger(\"afterload\", true);\r\n }\r\n }).catch(function (err) {\r\n console.log(\"cannot find scripts configurations\");\r\n });\r\n };\r\n return ScriptsLoader;\r\n}(event_handler_manager_1.EventHandlerManager));\r\nexports.ScriptsLoader = ScriptsLoader;\r\n//# sourceMappingURL=ScriptsLoader.js.map","import { ScriptsLoader } from './src/ScriptsLoader';\r\nimport { StylesLoader } from \"./src/StylesLoader\";\r\n\r\nexport { ScriptsLoader, StylesLoader };"],"sourceRoot":""}