{"version":3,"sources":["webpack:///./node_modules/aurelia-dependency-injection/dist/native-modules/aurelia-dependency-injection.js","webpack:///./node_modules/aurelia-google-analytics/dist/analytics.js","webpack:///./node_modules/aurelia-event-aggregator/dist/native-modules/aurelia-event-aggregator.js","webpack:///./node_modules/aurelia-framework/dist/native-modules/aurelia-framework.js","webpack:///./node_modules/aurelia-google-analytics/dist/index.js","webpack:///./node_modules/aurelia-history-browser/dist/native-modules/aurelia-history-browser.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n.js","webpack:///./node_modules/aurelia-history/dist/native-modules/aurelia-history.js","webpack:///./node_modules/aurelia-fetch-client/dist/native-modules/aurelia-fetch-client.js"],"names":[],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsD;AACT;;AAE7C;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yDAAQ,QAAQ,yDAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,yDAAQ;AACvB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;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,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,4BAA4B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAQ;AACR,yDAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,2BAA2B,EAAE;AAC9E;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yDAAQ,KAAK,yDAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yDAAQ,KAAK,yDAAQ;AACpD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yDAAQ,QAAQ,yDAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yDAAQ,QAAQ,yDAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,QAAQ,yDAAQ,QAAQ,yDAAQ;AAChC;AACA;AACA;AACA;AACA,QAAQ,yDAAQ,QAAQ,yDAAQ;AAChC;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,CAAC;AACD;;AAEA;AACA;AACA,QAAQ,yDAAQ,QAAQ,yDAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAE+W;;;;;;;;;;;;AC7oBhX,iGAAO,CAAC,OAAS,EAAE,+DAA8B,EAAE,+EAA0B,EAAE,kDAAiB,EAAE,4CAAW,CAAC,mCAAE;;AAEhH;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,6BAA6B,sBAAsB,yCAAyC,qBAAqB,yDAAyD,UAAU,QAAQ,oCAAoC,iFAAiF;AAC5V;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,EAAE;AACF,CAAC;AAAA,oGAAC,C;;;;;;;;;;;;;;;;;;;ACvR4C;;AAE9C,aAAa,yDAAoB;;AAEjC;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEO;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA,C;;;;;;;;;;;;ACvIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyD;AACZ;AACb;AACC;AACyH;AACvH;AACK;AACT;AACI;AACiB;AACvB;AACe;AAChB;AACqB;AACV;;AAEvC,aAAa,yDAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kCAAkC,EAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,6DAAU;AACrD,sEAAsE,uCAAuC,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,gEAAgE,2CAA2C,EAAE;AAC7G;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC,sCAAsC,EAAE,EAAE,EAAE;AAC/E,mCAAmC,yEAAyE,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA,gCAAgC,sEAAsE;AACtG;AACA;AACA,gCAAgC,wCAAwC,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yDAAI;AACrC;AACA,oDAAoD;AACpD;AACA;AACA;AACA,wCAAwC,uEAAoB;AAC5D;AACA,uDAAuD,6BAA6B,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gFAAgF;AACxG;AACA;AACA,wBAAwB,8CAA8C;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sEAAsE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,+BAA+B,wDAAsB;AACrD;AACA,uBAAuB,wDAAsB;AAC7C;AACA;AACA;AACA;AACA,oBAAoB,2DAAyB;AAC7C,oBAAoB,wDAAsB;AAC1C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,yCAAyC,EAAE;AACvF,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA,IAAI,+CAAG;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,oCAAoC,oDAAQ;AAC5C,2CAA2C,sEAAS;AACpD,0CAA0C,gEAAa;AACvD;AACA,sBAAsB,yDAAuB;AAC7C;AACA;AACA;AACA,0BAA0B,qDAAM;AAChC,0BAA0B,gEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,kEAAe;AAC5D;AACA;AACA;AACA;AACA;AACA,sBAAsB,+CAAG,uCAAuC,kCAAkC;AAClG,YAAY,+CAAG;AACf;AACA,SAAS;AACT;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D,yCAAyC,wBAAwB;AACjE,+CAA+C,+CAAG;AAClD;AACA,6CAA6C,mEAAgB;AAC7D,yCAAyC,8GAA8G;AACvJ;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mEAAgB;AACxD,6CAA6C,yEAAsB;AACnE;AACA;AACA;AACA,uBAAuB,mEAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAG;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,2DAAQ;AACpC;AACA,wCAAwC,+CAAG;AAC3C;AACA;AACA,kBAAkB,+CAAG,wCAAwC,kCAAkC;AAC/F,gCAAgC,QAAQ,+CAAG,oBAAoB,EAAE;AACjE;AACA;AACA,CAAC;;AAE0C;AAC3C;;;;;;;;;;;;;ACzaA,iGAAO,CAAC,OAAS,EAAE,8CAAa,CAAC,mCAAE;AACnC;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AAAA,oGAAC,C;;;;;;;;;;;;ACnBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AACE;;AAE5C;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;;AAEA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD,oDAAoD;AACpD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+CAAG;AACf;AACA;AACA;AACA,QAAQ,+CAAG;AACX;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,kBAAkB,oDAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,wCAAwC,8BAA8B;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,oDAAQ;AACjC,wBAAwB,oDAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,GAAG,YAAY;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,EAAE,+CAAG;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAQ;AAChB,QAAQ,oDAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,EAAE,+CAAG;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+CAAG;AACX;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;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;AACA;AACA,CAAC,CAAC,uDAAO;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,uDAAO;AAC7B;AACA;;AAEsE;AACtE;;;;;;;;;;;;;ACnSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AACc;AACY;AACkC;AAC9C;AACA;AACO;AACmC;AAC3B;AAC2C;;AAEtG;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+CAAO;AAC9B,oBAAoB,oDAAQ;AAC5B;AACA,+BAA+B,SAAS,wEAAe,EAAE,4EAAe,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,wCAAwC;AAC1F;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,oFAAoF;AACpF;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;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,qEAAqE,2BAA2B,EAAE;AAClG;AACA,iCAAiC,iEAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+CAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,+CAAG;AAC/C;AACA,iEAAiE,SAAS;AAC1E;AACA;AACA;AACA;AACA,0EAA0E,SAAS;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,+CAAG;AAC9C;AACA,iEAAiE,SAAS;AAC1E;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,CAAC;;AAED;AACA;AACA;AACA;AACA,2CAA2C,SAAS,kFAAqB,EAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8DAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAe;AACvB;AACA;AACA,CAAC;;AAED;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,QAAQ,6EAAQ;AAChB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAAG;AACnB;AACA;AACA,gBAAgB,yDAAQ,gBAAgB,yDAAQ,WAAW,uEAAoB;AAC/E;AACA;AACA,iEAAiE;AACjE;AACA;AACA,QAAQ,0EAAe;AACvB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAAG,gBAAgB,wEAAe;AAClD;AACA;AACA,gBAAgB,yDAAQ,gBAAgB,yDAAQ,WAAW,uEAAoB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0EAAe;AACvB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,0CAA0C,eAAe;AACzD;AACA;AACA;AACA;AACA,QAAQ,wEAAc;AACtB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,4CAA4C,SAAS,kFAAqB,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8DAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAe;AACvB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAgB;AACxB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,4CAA4C,SAAS,kFAAqB,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8DAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAe;AACvB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAgB;AACxB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,4CAA4C,SAAS,kFAAqB,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8DAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAe;AACvB;AACA;AACA,CAAC;;AAED;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,KAAK;AACL;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,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,uCAAuC,eAAe,wEAAe,EAAE;AACvE;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,8EAA8E,mDAAmD;AACjI;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,0CAA0C,oCAAoC;AAC9E;AACA;AACA;AACA,0CAA0C,4BAA4B;AACtE;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,2CAA2C,uBAAuB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAgB;AACxB;AACA;AACA,CAAC;;AAED;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,uCAAuC;AACvC,kCAAkC,KAAK,GAAG,IAAI;AAC9C,oCAAoC,KAAK,GAAG,IAAI;AAChD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qDAAqD;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,+BAA+B;AACnG;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,gEAAa;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,sEAAsE,EAAE;AACrH,6CAA6C,uFAAuF,EAAE;AACtI,KAAK;AACL;AACA;;AAE8P;;;;;;;;;;;;;;;;;;ACv4C9P;AACA;AACA;;AAEO;AACP;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,G;;;;;;;;;;;;ACpDD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4C;;AAE5C;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,QAAQ,oDAAQ,8DAA8D,EAAE;AAC/I;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,+EAA+E,2BAA2B;AAC1G,yBAAyB;AACzB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB,EAAE;AAC5C,qCAAqC,8BAA8B,EAAE;AACrE,qCAAqC,4EAA4E,EAAE;AACnH;AACA,2CAA2C,uBAAuB;AAClE,2CAA2C,2BAA2B;AACtE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,oDAAoD,EAAE;AACxG;AACA;AACA,6EAA6E,oDAAoD,EAAE;AACnI;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,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,aAAa;AAC/C,8CAA8C,aAAa,YAAY,EAAE;AACzE;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,CAAC;AACD;AACA;AACA;AACA;AACA,oBAAoB,+CAAG,4DAA4D,kCAAkC;AACrH,gCAAgC,QAAQ,+CAAG,sBAAsB,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA,oBAAoB,+CAAG,6DAA6D,kCAAkC;AACtH,gCAAgC,QAAQ,+CAAG,sBAAsB,EAAE;AACnE;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gGAAgG,EAAE,mDAAmD,6FAA6F,EAAE;AACnT,KAAK;AACL;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;;AAEsF","file":"vendors~556c66f2.458aed3540e6bf8724c3.chunk.js","sourcesContent":["import { metadata, protocol } from 'aurelia-metadata';\nimport { AggregateError } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\n\nfunction isInjectable(potentialTarget) {\r\n    return !!potentialTarget;\r\n}\r\nfunction autoinject(potentialTarget) {\r\n    var deco = function (target) {\r\n        if (!target.hasOwnProperty('inject')) {\r\n            target.inject = (metadata.getOwn(metadata.paramTypes, target) ||\r\n                _emptyParameters).slice();\r\n            if (target.inject && target.inject.length > 0) {\r\n                if (target.inject[target.inject.length - 1] === Object) {\r\n                    target.inject.splice(-1, 1);\r\n                }\r\n            }\r\n        }\r\n    };\r\n    if (isInjectable(potentialTarget)) {\r\n        return deco(potentialTarget);\r\n    }\r\n    return deco;\r\n}\r\nfunction inject() {\r\n    var rest = [];\r\n    for (var _i = 0; _i < arguments.length; _i++) {\r\n        rest[_i] = arguments[_i];\r\n    }\r\n    return function (target, _key, descriptor) {\r\n        if (typeof descriptor === 'number') {\r\n            autoinject(target);\r\n            if (rest.length === 1) {\r\n                target.inject[descriptor] = rest[0];\r\n            }\r\n            return;\r\n        }\r\n        if (descriptor) {\r\n            var fn = descriptor.value;\r\n            fn.inject = rest;\r\n        }\r\n        else {\r\n            target.inject = rest;\r\n        }\r\n    };\r\n}\n\nvar resolver = protocol.create('aurelia:resolver', function (target) {\r\n    if (!(typeof target.get === 'function')) {\r\n        return 'Resolvers must implement: get(container: Container, key: any): any';\r\n    }\r\n    return true;\r\n});\r\nvar Strategy;\r\n(function (Strategy) {\r\n    Strategy[Strategy[\"instance\"] = 0] = \"instance\";\r\n    Strategy[Strategy[\"singleton\"] = 1] = \"singleton\";\r\n    Strategy[Strategy[\"transient\"] = 2] = \"transient\";\r\n    Strategy[Strategy[\"function\"] = 3] = \"function\";\r\n    Strategy[Strategy[\"array\"] = 4] = \"array\";\r\n    Strategy[Strategy[\"alias\"] = 5] = \"alias\";\r\n})(Strategy || (Strategy = {}));\r\nfunction isStrategy(actual, expected, state) {\r\n    return actual === expected;\r\n}\r\nvar StrategyResolver = (function () {\r\n    function StrategyResolver(strategy, state) {\r\n        this.strategy = strategy;\r\n        this.state = state;\r\n    }\r\n    StrategyResolver.prototype.get = function (container, key) {\r\n        if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n            return this.state;\r\n        }\r\n        if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n            var singleton = container.invoke(this.state);\r\n            this.state = singleton;\r\n            this.strategy = 0;\r\n            return singleton;\r\n        }\r\n        if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n            return container.invoke(this.state);\r\n        }\r\n        if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n            return this.state(container, key, this);\r\n        }\r\n        if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n            return this.state[0].get(container, key);\r\n        }\r\n        if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n            return container.get(this.state);\r\n        }\r\n        throw new Error('Invalid strategy: ' + this.strategy);\r\n    };\r\n    StrategyResolver = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Number, Object])\r\n    ], StrategyResolver);\r\n    return StrategyResolver;\r\n}());\r\nvar Lazy = (function () {\r\n    function Lazy(key) {\r\n        this._key = key;\r\n    }\r\n    Lazy_1 = Lazy;\r\n    Lazy.prototype.get = function (container) {\r\n        var _this = this;\r\n        return function () { return container.get(_this._key); };\r\n    };\r\n    Lazy.of = function (key) {\r\n        return new Lazy_1(key);\r\n    };\r\n    var Lazy_1;\r\n    Lazy = Lazy_1 = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Object])\r\n    ], Lazy);\r\n    return Lazy;\r\n}());\r\nvar All = (function () {\r\n    function All(key) {\r\n        this._key = key;\r\n    }\r\n    All_1 = All;\r\n    All.prototype.get = function (container) {\r\n        return container.getAll(this._key);\r\n    };\r\n    All.of = function (key) {\r\n        return new All_1(key);\r\n    };\r\n    var All_1;\r\n    All = All_1 = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Object])\r\n    ], All);\r\n    return All;\r\n}());\r\nvar Optional = (function () {\r\n    function Optional(key, checkParent) {\r\n        if (checkParent === void 0) { checkParent = true; }\r\n        this._key = key;\r\n        this._checkParent = checkParent;\r\n    }\r\n    Optional_1 = Optional;\r\n    Optional.prototype.get = function (container) {\r\n        if (container.hasResolver(this._key, this._checkParent)) {\r\n            return container.get(this._key);\r\n        }\r\n        return null;\r\n    };\r\n    Optional.of = function (key, checkParent) {\r\n        if (checkParent === void 0) { checkParent = true; }\r\n        return new Optional_1(key, checkParent);\r\n    };\r\n    var Optional_1;\r\n    Optional = Optional_1 = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Object, Boolean])\r\n    ], Optional);\r\n    return Optional;\r\n}());\r\nvar Parent = (function () {\r\n    function Parent(key) {\r\n        this._key = key;\r\n    }\r\n    Parent_1 = Parent;\r\n    Parent.prototype.get = function (container) {\r\n        return container.parent ? container.parent.get(this._key) : null;\r\n    };\r\n    Parent.of = function (key) {\r\n        return new Parent_1(key);\r\n    };\r\n    var Parent_1;\r\n    Parent = Parent_1 = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Object])\r\n    ], Parent);\r\n    return Parent;\r\n}());\r\nvar Factory = (function () {\r\n    function Factory(key) {\r\n        this._key = key;\r\n    }\r\n    Factory_1 = Factory;\r\n    Factory.prototype.get = function (container) {\r\n        var fn = this._key;\r\n        var resolver = container.getResolver(fn);\r\n        if (resolver && resolver.strategy === Strategy.function) {\r\n            fn = resolver.state;\r\n        }\r\n        return function () {\r\n            var rest = [];\r\n            for (var _i = 0; _i < arguments.length; _i++) {\r\n                rest[_i] = arguments[_i];\r\n            }\r\n            return container.invoke(fn, rest);\r\n        };\r\n    };\r\n    Factory.of = function (key) {\r\n        return new Factory_1(key);\r\n    };\r\n    var Factory_1;\r\n    Factory = Factory_1 = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Object])\r\n    ], Factory);\r\n    return Factory;\r\n}());\r\nvar NewInstance = (function () {\r\n    function NewInstance(key) {\r\n        var dynamicDependencies = [];\r\n        for (var _i = 1; _i < arguments.length; _i++) {\r\n            dynamicDependencies[_i - 1] = arguments[_i];\r\n        }\r\n        this.key = key;\r\n        this.asKey = key;\r\n        this.dynamicDependencies = dynamicDependencies;\r\n    }\r\n    NewInstance_1 = NewInstance;\r\n    NewInstance.prototype.get = function (container) {\r\n        var dynamicDependencies = this.dynamicDependencies.length > 0\r\n            ? this.dynamicDependencies.map(function (dependency) {\r\n                return dependency['protocol:aurelia:resolver']\r\n                    ? dependency.get(container)\r\n                    : container.get(dependency);\r\n            })\r\n            : undefined;\r\n        var fn = this.key;\r\n        var resolver = container.getResolver(fn);\r\n        if (resolver && resolver.strategy === 3) {\r\n            fn = resolver.state;\r\n        }\r\n        var instance = container.invoke(fn, dynamicDependencies);\r\n        container.registerInstance(this.asKey, instance);\r\n        return instance;\r\n    };\r\n    NewInstance.prototype.as = function (key) {\r\n        this.asKey = key;\r\n        return this;\r\n    };\r\n    NewInstance.of = function (key) {\r\n        var dynamicDependencies = [];\r\n        for (var _i = 1; _i < arguments.length; _i++) {\r\n            dynamicDependencies[_i - 1] = arguments[_i];\r\n        }\r\n        return new (NewInstance_1.bind.apply(NewInstance_1, [void 0, key].concat(dynamicDependencies)))();\r\n    };\r\n    var NewInstance_1;\r\n    NewInstance = NewInstance_1 = __decorate([\r\n        resolver(),\r\n        __metadata(\"design:paramtypes\", [Object, Object])\r\n    ], NewInstance);\r\n    return NewInstance;\r\n}());\r\nfunction getDecoratorDependencies(target) {\r\n    autoinject(target);\r\n    return target.inject;\r\n}\r\nfunction lazy(keyValue) {\r\n    return function (target, _key, index) {\r\n        var inject$$1 = getDecoratorDependencies(target);\r\n        inject$$1[index] = Lazy.of(keyValue);\r\n    };\r\n}\r\nfunction all(keyValue) {\r\n    return function (target, _key, index) {\r\n        var inject$$1 = getDecoratorDependencies(target);\r\n        inject$$1[index] = All.of(keyValue);\r\n    };\r\n}\r\nfunction optional(checkParentOrTarget) {\r\n    if (checkParentOrTarget === void 0) { checkParentOrTarget = true; }\r\n    var deco = function (checkParent) {\r\n        return function (target, _key, index) {\r\n            var inject$$1 = getDecoratorDependencies(target);\r\n            inject$$1[index] = Optional.of(inject$$1[index], checkParent);\r\n        };\r\n    };\r\n    if (typeof checkParentOrTarget === 'boolean') {\r\n        return deco(checkParentOrTarget);\r\n    }\r\n    return deco(true);\r\n}\r\nfunction parent(target, _key, index) {\r\n    var inject$$1 = getDecoratorDependencies(target);\r\n    inject$$1[index] = Parent.of(inject$$1[index]);\r\n}\r\nfunction factory(keyValue) {\r\n    return function (target, _key, index) {\r\n        var inject$$1 = getDecoratorDependencies(target);\r\n        inject$$1[index] = Factory.of(keyValue);\r\n    };\r\n}\r\nfunction newInstance(asKeyOrTarget) {\r\n    var dynamicDependencies = [];\r\n    for (var _i = 1; _i < arguments.length; _i++) {\r\n        dynamicDependencies[_i - 1] = arguments[_i];\r\n    }\r\n    var deco = function (asKey) {\r\n        return function (target, _key, index) {\r\n            var inject$$1 = getDecoratorDependencies(target);\r\n            inject$$1[index] = NewInstance.of.apply(NewInstance, [inject$$1[index]].concat(dynamicDependencies));\r\n            if (!!asKey) {\r\n                inject$$1[index].as(asKey);\r\n            }\r\n        };\r\n    };\r\n    if (arguments.length >= 1) {\r\n        return deco(asKeyOrTarget);\r\n    }\r\n    return deco();\r\n}\n\nfunction validateKey(key) {\r\n    if (key === null || key === undefined) {\r\n        throw new Error('key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n    }\r\n}\r\nvar _emptyParameters = Object.freeze([]);\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\nvar resolverDecorates = resolver.decorates;\r\nvar InvocationHandler = (function () {\r\n    function InvocationHandler(fn, invoker, dependencies) {\r\n        this.fn = fn;\r\n        this.invoker = invoker;\r\n        this.dependencies = dependencies;\r\n    }\r\n    InvocationHandler.prototype.invoke = function (container, dynamicDependencies) {\r\n        return dynamicDependencies !== undefined\r\n            ? this.invoker.invokeWithDynamicDependencies(container, this.fn, this.dependencies, dynamicDependencies)\r\n            : this.invoker.invoke(container, this.fn, this.dependencies);\r\n    };\r\n    return InvocationHandler;\r\n}());\r\nfunction invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {\r\n    var i = staticDependencies.length;\r\n    var args = new Array(i);\r\n    var lookup;\r\n    while (i--) {\r\n        lookup = staticDependencies[i];\r\n        if (lookup === null || lookup === undefined) {\r\n            throw new Error('Constructor Parameter with index ' +\r\n                i +\r\n                ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n        }\r\n        else {\r\n            args[i] = container.get(lookup);\r\n        }\r\n    }\r\n    if (dynamicDependencies !== undefined) {\r\n        args = args.concat(dynamicDependencies);\r\n    }\r\n    return Reflect.construct(fn, args);\r\n}\r\nvar classInvoker = {\r\n    invoke: function (container, Type, deps) {\r\n        var instances = deps.map(function (dep) { return container.get(dep); });\r\n        return Reflect.construct(Type, instances);\r\n    },\r\n    invokeWithDynamicDependencies: invokeWithDynamicDependencies\r\n};\r\nfunction getDependencies(f) {\r\n    if (!f.hasOwnProperty('inject')) {\r\n        return [];\r\n    }\r\n    if (typeof f.inject === 'function') {\r\n        return f.inject();\r\n    }\r\n    return f.inject;\r\n}\r\nvar Container = (function () {\r\n    function Container(configuration) {\r\n        if (configuration === undefined) {\r\n            configuration = {};\r\n        }\r\n        this._configuration = configuration;\r\n        this._onHandlerCreated = configuration.onHandlerCreated;\r\n        this._handlers =\r\n            configuration.handlers || (configuration.handlers = new Map());\r\n        this._resolvers = new Map();\r\n        this.root = this;\r\n        this.parent = null;\r\n    }\r\n    Container.prototype.makeGlobal = function () {\r\n        Container.instance = this;\r\n        return this;\r\n    };\r\n    Container.prototype.setHandlerCreatedCallback = function (onHandlerCreated) {\r\n        this._onHandlerCreated = onHandlerCreated;\r\n        this._configuration.onHandlerCreated = onHandlerCreated;\r\n    };\r\n    Container.prototype.registerInstance = function (key, instance) {\r\n        return this.registerResolver(key, new StrategyResolver(0, instance === undefined ? key : instance));\r\n    };\r\n    Container.prototype.registerSingleton = function (key, fn) {\r\n        return this.registerResolver(key, new StrategyResolver(1, fn === undefined ? key : fn));\r\n    };\r\n    Container.prototype.registerTransient = function (key, fn) {\r\n        return this.registerResolver(key, new StrategyResolver(2, fn === undefined ? key : fn));\r\n    };\r\n    Container.prototype.registerHandler = function (key, handler) {\r\n        return this.registerResolver(key, new StrategyResolver(3, handler));\r\n    };\r\n    Container.prototype.registerAlias = function (originalKey, aliasKey) {\r\n        return this.registerResolver(aliasKey, new StrategyResolver(5, originalKey));\r\n    };\r\n    Container.prototype.registerResolver = function (key, resolver$$1) {\r\n        validateKey(key);\r\n        var allResolvers = this._resolvers;\r\n        var result = allResolvers.get(key);\r\n        if (result === undefined) {\r\n            allResolvers.set(key, resolver$$1);\r\n        }\r\n        else if (result.strategy === 4) {\r\n            result.state.push(resolver$$1);\r\n        }\r\n        else {\r\n            allResolvers.set(key, new StrategyResolver(4, [result, resolver$$1]));\r\n        }\r\n        return resolver$$1;\r\n    };\r\n    Container.prototype.autoRegister = function (key, fn) {\r\n        fn = fn === undefined ? key : fn;\r\n        if (typeof fn === 'function') {\r\n            var registration = metadata.get(metadata.registration, fn);\r\n            if (registration === undefined) {\r\n                return this.registerResolver(key, new StrategyResolver(1, fn));\r\n            }\r\n            return registration.registerResolver(this, key, fn);\r\n        }\r\n        return this.registerResolver(key, new StrategyResolver(0, fn));\r\n    };\r\n    Container.prototype.autoRegisterAll = function (fns) {\r\n        var i = fns.length;\r\n        while (i--) {\r\n            this.autoRegister(fns[i]);\r\n        }\r\n    };\r\n    Container.prototype.unregister = function (key) {\r\n        this._resolvers.delete(key);\r\n    };\r\n    Container.prototype.hasResolver = function (key, checkParent) {\r\n        if (checkParent === void 0) { checkParent = false; }\r\n        validateKey(key);\r\n        return (this._resolvers.has(key) ||\r\n            (checkParent &&\r\n                this.parent !== null &&\r\n                this.parent.hasResolver(key, checkParent)));\r\n    };\r\n    Container.prototype.getResolver = function (key) {\r\n        return this._resolvers.get(key);\r\n    };\r\n    Container.prototype.get = function (key) {\r\n        validateKey(key);\r\n        if (key === Container) {\r\n            return this;\r\n        }\r\n        if (resolverDecorates(key)) {\r\n            return key.get(this, key);\r\n        }\r\n        var resolver$$1 = this._resolvers.get(key);\r\n        if (resolver$$1 === undefined) {\r\n            if (this.parent === null) {\r\n                return this.autoRegister(key).get(this, key);\r\n            }\r\n            var registration = metadata.get(metadata.registration, key);\r\n            if (registration === undefined) {\r\n                return this.parent._get(key);\r\n            }\r\n            return registration.registerResolver(this, key, key).get(this, key);\r\n        }\r\n        return resolver$$1.get(this, key);\r\n    };\r\n    Container.prototype._get = function (key) {\r\n        var resolver$$1 = this._resolvers.get(key);\r\n        if (resolver$$1 === undefined) {\r\n            if (this.parent === null) {\r\n                return this.autoRegister(key).get(this, key);\r\n            }\r\n            return this.parent._get(key);\r\n        }\r\n        return resolver$$1.get(this, key);\r\n    };\r\n    Container.prototype.getAll = function (key) {\r\n        validateKey(key);\r\n        var resolver$$1 = this._resolvers.get(key);\r\n        if (resolver$$1 === undefined) {\r\n            if (this.parent === null) {\r\n                return _emptyParameters;\r\n            }\r\n            return this.parent.getAll(key);\r\n        }\r\n        if (resolver$$1.strategy === 4) {\r\n            var state = resolver$$1.state;\r\n            var i = state.length;\r\n            var results = new Array(i);\r\n            while (i--) {\r\n                results[i] = state[i].get(this, key);\r\n            }\r\n            return results;\r\n        }\r\n        return [resolver$$1.get(this, key)];\r\n    };\r\n    Container.prototype.createChild = function () {\r\n        var child = new Container(this._configuration);\r\n        child.root = this.root;\r\n        child.parent = this;\r\n        return child;\r\n    };\r\n    Container.prototype.invoke = function (fn, dynamicDependencies) {\r\n        try {\r\n            var handler = this._handlers.get(fn);\r\n            if (handler === undefined) {\r\n                handler = this._createInvocationHandler(fn);\r\n                this._handlers.set(fn, handler);\r\n            }\r\n            return handler.invoke(this, dynamicDependencies);\r\n        }\r\n        catch (e) {\r\n            throw new AggregateError(\"Error invoking \" + fn.name + \". Check the inner error for details.\", e, true);\r\n        }\r\n    };\r\n    Container.prototype._createInvocationHandler = function (fn) {\r\n        var dependencies;\r\n        if (fn.inject === undefined) {\r\n            dependencies =\r\n                metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n        }\r\n        else {\r\n            dependencies = [];\r\n            var ctor = fn;\r\n            while (typeof ctor === 'function') {\r\n                dependencies.push.apply(dependencies, getDependencies(ctor));\r\n                ctor = Object.getPrototypeOf(ctor);\r\n            }\r\n        }\r\n        var invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n        var handler = new InvocationHandler(fn, invoker, dependencies);\r\n        return this._onHandlerCreated !== undefined\r\n            ? this._onHandlerCreated(handler)\r\n            : handler;\r\n    };\r\n    return Container;\r\n}());\n\nfunction invoker(value) {\r\n    return function (target) {\r\n        metadata.define(metadata.invoker, value, target);\r\n    };\r\n}\r\nfunction invokeAsFactory(potentialTarget) {\r\n    var deco = function (target) {\r\n        metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n    };\r\n    return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\nvar FactoryInvoker = (function () {\r\n    function FactoryInvoker() {\r\n    }\r\n    FactoryInvoker.prototype.invoke = function (container, fn, dependencies) {\r\n        var i = dependencies.length;\r\n        var args = new Array(i);\r\n        while (i--) {\r\n            args[i] = container.get(dependencies[i]);\r\n        }\r\n        return fn.apply(undefined, args);\r\n    };\r\n    FactoryInvoker.prototype.invokeWithDynamicDependencies = function (container, fn, staticDependencies, dynamicDependencies) {\r\n        var i = staticDependencies.length;\r\n        var args = new Array(i);\r\n        while (i--) {\r\n            args[i] = container.get(staticDependencies[i]);\r\n        }\r\n        if (dynamicDependencies !== undefined) {\r\n            args = args.concat(dynamicDependencies);\r\n        }\r\n        return fn.apply(undefined, args);\r\n    };\r\n    return FactoryInvoker;\r\n}());\r\nFactoryInvoker.instance = new FactoryInvoker();\n\nfunction registration(value) {\r\n    return function (target) {\r\n        metadata.define(metadata.registration, value, target);\r\n    };\r\n}\r\nfunction transient(key) {\r\n    return registration(new TransientRegistration(key));\r\n}\r\nfunction singleton(keyOrRegisterInChild, registerInChild) {\r\n    if (registerInChild === void 0) { registerInChild = false; }\r\n    return registration(new SingletonRegistration(keyOrRegisterInChild, registerInChild));\r\n}\r\nvar TransientRegistration = (function () {\r\n    function TransientRegistration(key) {\r\n        this._key = key;\r\n    }\r\n    TransientRegistration.prototype.registerResolver = function (container, key, fn) {\r\n        var existingResolver = container.getResolver(this._key || key);\r\n        return existingResolver === undefined\r\n            ? container.registerTransient((this._key || key), fn)\r\n            : existingResolver;\r\n    };\r\n    return TransientRegistration;\r\n}());\r\nvar SingletonRegistration = (function () {\r\n    function SingletonRegistration(keyOrRegisterInChild, registerInChild) {\r\n        if (registerInChild === void 0) { registerInChild = false; }\r\n        if (typeof keyOrRegisterInChild === 'boolean') {\r\n            this._registerInChild = keyOrRegisterInChild;\r\n        }\r\n        else {\r\n            this._key = keyOrRegisterInChild;\r\n            this._registerInChild = registerInChild;\r\n        }\r\n    }\r\n    SingletonRegistration.prototype.registerResolver = function (container, key, fn) {\r\n        var targetContainer = this._registerInChild ? container : container.root;\r\n        var existingResolver = targetContainer.getResolver(this._key || key);\r\n        return existingResolver === undefined\r\n            ? targetContainer.registerSingleton(this._key || key, fn)\r\n            : existingResolver;\r\n    };\r\n    return SingletonRegistration;\r\n}());\n\nexport { _emptyParameters, InvocationHandler, Container, autoinject, inject, invoker, invokeAsFactory, FactoryInvoker, registration, transient, singleton, TransientRegistration, SingletonRegistration, resolver, Strategy, StrategyResolver, Lazy, All, Optional, Parent, Factory, NewInstance, getDecoratorDependencies, lazy, all, optional, parent, factory, newInstance };\n","define(['exports', 'aurelia-dependency-injection', 'aurelia-event-aggregator', 'aurelia-logging', 'deepmerge'], function (exports, _aureliaDependencyInjection, _aureliaEventAggregator, _aureliaLogging, _deepmerge) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Analytics = undefined;\n\n\tvar LogManager = _interopRequireWildcard(_aureliaLogging);\n\n\tvar _deepmerge2 = _interopRequireDefault(_deepmerge);\n\n\tfunction _interopRequireDefault(obj) {\n\t\treturn obj && obj.__esModule ? obj : {\n\t\t\tdefault: obj\n\t\t};\n\t}\n\n\tfunction _interopRequireWildcard(obj) {\n\t\tif (obj && obj.__esModule) {\n\t\t\treturn obj;\n\t\t} else {\n\t\t\tvar newObj = {};\n\n\t\t\tif (obj != null) {\n\t\t\t\tfor (var key in obj) {\n\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewObj.default = obj;\n\t\t\treturn newObj;\n\t\t}\n\t}\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n\t\treturn typeof obj;\n\t} : function (obj) {\n\t\treturn obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n\t};\n\n\tfunction _classCallCheck(instance, Constructor) {\n\t\tif (!(instance instanceof Constructor)) {\n\t\t\tthrow new TypeError(\"Cannot call a class as a function\");\n\t\t}\n\t}\n\n\tvar _dec, _class;\n\n\tvar criteria = {\n\t\tisElement: function isElement(e) {\n\t\t\treturn e instanceof HTMLElement;\n\t\t},\n\t\thasClass: function hasClass(cls) {\n\t\t\treturn function (e) {\n\t\t\t\treturn criteria.isElement(e) && e.classList.contains(cls);\n\t\t\t};\n\t\t},\n\t\thasTrackingInfo: function hasTrackingInfo(e) {\n\t\t\treturn criteria.isElement(e) && e.hasAttribute('data-analytics-category') && e.hasAttribute('data-analytics-action');\n\t\t},\n\t\tisOfType: function isOfType(e, type) {\n\t\t\treturn criteria.isElement(e) && e.nodeName.toLowerCase() === type.toLowerCase();\n\t\t},\n\t\tisAnchor: function isAnchor(e) {\n\t\t\treturn criteria.isOfType(e, 'a');\n\t\t},\n\t\tisButton: function isButton(e) {\n\t\t\treturn criteria.isOfType(e, 'button');\n\t\t}\n\t};\n\n\tvar defaultOptions = {\n\t\tlogging: {\n\t\t\tenabled: true\n\t\t},\n\t\tanonymizeIp: {\n\t\t\tenabled: false\n\t\t},\n\t\tpageTracking: {\n\t\t\tenabled: false,\n\t\t\tignore: {\n\t\t\t\tfragments: [],\n\t\t\t\troutes: [],\n\t\t\t\trouteNames: []\n\t\t\t},\n\t\t\tgetTitle: function getTitle(payload) {\n\t\t\t\treturn payload.instruction.config.title;\n\t\t\t},\n\t\t\tgetUrl: function getUrl(payload) {\n\t\t\t\treturn payload.instruction.fragment;\n\t\t\t}\n\t\t},\n\t\tclickTracking: {\n\t\t\tenabled: false,\n\t\t\tfilter: function filter(element) {\n\t\t\t\treturn criteria.isAnchor(element) || criteria.isButton(element);\n\t\t\t}\n\t\t},\n\t\texceptionTracking: {\n\t\t\tenabled: true,\n\t\t\tapplicationName: undefined,\n\t\t\tapplicationVersion: undefined\n\t\t}\n\t};\n\n\tvar delegate = function delegate(criteria, listener) {\n\t\treturn function (evt) {\n\t\t\tvar el = evt.target;\n\t\t\tdo {\n\t\t\t\tif (criteria && !criteria(el)) continue;\n\t\t\t\tevt.delegateTarget = el;\n\t\t\t\tlistener.apply(this, arguments);\n\t\t\t\treturn;\n\t\t\t} while (el = el.parentNode);\n\t\t};\n\t};\n\n\tvar Analytics = exports.Analytics = (_dec = (0, _aureliaDependencyInjection.inject)(_aureliaEventAggregator.EventAggregator), _dec(_class = function () {\n\t\tfunction Analytics(eventAggregator) {\n\t\t\t_classCallCheck(this, Analytics);\n\n\t\t\tthis._eventAggregator = eventAggregator;\n\t\t\tthis._initialized = false;\n\t\t\tthis._logger = LogManager.getLogger('analytics-plugin');\n\t\t\tthis._options = defaultOptions;\n\n\t\t\tthis._trackClick = this._trackClick.bind(this);\n\t\t\tthis._trackPage = this._trackPage.bind(this);\n\t\t}\n\n\t\tAnalytics.prototype.attach = function attach() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultOptions;\n\n\t\t\tthis._options = (0, _deepmerge2.default)(defaultOptions, options);\n\t\t\tif (!this._initialized) {\n\t\t\t\tvar errorMessage = \"Analytics must be initialized before use.\";\n\t\t\t\tthis._log('error', errorMessage);\n\t\t\t\tthrow new Error(errorMessage);\n\t\t\t}\n\n\t\t\tthis._attachClickTracker();\n\t\t\tthis._attachPageTracker();\n\t\t\tthis._attachExceptionTracker();\n\t\t};\n\n\t\tAnalytics.prototype.init = function init(id) {\n\t\t\tvar script = document.createElement('script');\n\t\t\tscript.text = \"(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\" + \"(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\" + \"m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\" + \"})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\";\n\t\t\tdocument.querySelector('body').appendChild(script);\n\n\t\t\twindow.ga = window.ga || function () {\n\t\t\t\t(ga.q = ga.q || []).push(arguments);\n\t\t\t};\n\t\t\tga.l = +new Date();\n\t\t\tga('create', id, 'auto');\n\n\t\t\tthis._initialized = true;\n\t\t};\n\n\t\tAnalytics.prototype._attachClickTracker = function _attachClickTracker() {\n\t\t\tif (!this._options.clickTracking.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdocument.querySelector('body').addEventListener('click', delegate(this._options.clickTracking.filter, this._trackClick));\n\t\t};\n\n\t\tAnalytics.prototype._attachPageTracker = function _attachPageTracker() {\n\t\t\tvar _this = this;\n\n\t\t\tif (!this._options.pageTracking.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._eventAggregator.subscribe('router:navigation:success', function (payload) {\n\t\t\t\tif (_this._options.pageTracking.ignore.fragments.some(function (fragment) {\n\t\t\t\t\treturn payload.instruction.fragment.includes(fragment);\n\t\t\t\t}) || _this._options.pageTracking.ignore.routes.some(function (route) {\n\t\t\t\t\treturn payload.instruction.config.route === route;\n\t\t\t\t}) || _this._options.pageTracking.ignore.routeNames.some(function (routeName) {\n\t\t\t\t\treturn payload.instruction.config.name === routeName;\n\t\t\t\t})) return;\n\n\t\t\t\t_this._trackPage(_this._options.pageTracking.getUrl(payload), _this._options.pageTracking.getTitle(payload));\n\t\t\t});\n\t\t};\n\n\t\tAnalytics.prototype._attachExceptionTracker = function _attachExceptionTracker() {\n\t\t\tif (!this._options.exceptionTracking.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar options = this._options;\n\t\t\tvar existingWindowErrorCallback = window.onerror;\n\n\t\t\twindow.onerror = function (errorMessage, url, lineNumber, columnNumber, errorObject) {\n\t\t\t\tif (typeof ga === 'function') {\n\t\t\t\t\tvar exceptionDescription = void 0;\n\t\t\t\t\tif (errorObject != undefined && _typeof(errorObject.message) != undefined) {\n\t\t\t\t\t\texceptionDescription = errorObject.message;\n\t\t\t\t\t} else {\n\t\t\t\t\t\texceptionDescription = errorMessage;\n\t\t\t\t\t}\n\n\t\t\t\t\texceptionDescription += \" @ \" + url;\n\n\t\t\t\t\tif (lineNumber != undefined && columnNumber != undefined) {\n\t\t\t\t\t\texceptionDescription += \":\" + lineNumber + \":\" + columnNumber;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar exOptions = {\n\t\t\t\t\t\texDescription: exceptionDescription,\n\t\t\t\t\t\texFatal: false\n\t\t\t\t\t};\n\n\t\t\t\t\tif (options.exceptionTracking.applicationName != undefined) {\n\t\t\t\t\t\texOptions.appName = options.exceptionTracking.applicationName;\n\t\t\t\t\t}\n\t\t\t\t\tif (options.exceptionTracking.applicationVersion != undefined) {\n\t\t\t\t\t\texOptions.appVersion = options.exceptionTracking.applicationVersion;\n\t\t\t\t\t}\n\n\t\t\t\t\tga('send', 'exception', exOptions);\n\t\t\t\t}\n\n\t\t\t\tif (typeof existingWindowErrorCallback === 'function') {\n\t\t\t\t\treturn existingWindowErrorCallback(errorMessage, url, lineNumber, columnNumber, errorObject);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t};\n\n\t\tAnalytics.prototype._log = function _log(level, message) {\n\t\t\tif (!this._options.logging.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._logger[level](message);\n\t\t};\n\n\t\tAnalytics.prototype._trackClick = function _trackClick(evt) {\n\t\t\tif (!this._initialized) {\n\t\t\t\tthis._log('warn', \"The component has not been initialized. Please call 'init()' before calling 'attach()'.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!evt || !evt.delegateTarget || !criteria.hasTrackingInfo(evt.delegateTarget)) {\n\t\t\t\treturn;\n\t\t\t};\n\n\t\t\tvar element = evt.delegateTarget;\n\t\t\tvar tracking = {\n\t\t\t\tcategory: element.getAttribute('data-analytics-category'),\n\t\t\t\taction: element.getAttribute('data-analytics-action'),\n\t\t\t\tlabel: element.getAttribute('data-analytics-label'),\n\t\t\t\tvalue: element.getAttribute('data-analytics-value')\n\t\t\t};\n\n\t\t\tthis._log('debug', 'click: category \\'' + tracking.category + '\\', action \\'' + tracking.action + '\\', label \\'' + tracking.label + '\\', value \\'' + tracking.value + '\\'');\n\t\t\tga('send', 'event', tracking.category, tracking.action, tracking.label, tracking.value);\n\t\t};\n\n\t\tAnalytics.prototype._trackPage = function _trackPage(path, title) {\n\t\t\tthis._log('debug', 'Tracking path = ' + path + ', title = ' + title);\n\t\t\tif (!this._initialized) {\n\t\t\t\tthis._log('warn', \"Try calling 'init()' before calling 'attach()'.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tga('set', {\n\t\t\t\tpage: path,\n\t\t\t\ttitle: title,\n\t\t\t\tanonymizeIp: this._options.anonymizeIp.enabled\n\t\t\t});\n\t\t\tga('send', 'pageview');\n\t\t};\n\n\t\treturn Analytics;\n\t}()) || _class);\n});","\n\nimport * as LogManager from 'aurelia-logging';\n\nvar logger = LogManager.getLogger('event-aggregator');\n\nvar Handler = function () {\n  function Handler(messageType, callback) {\n    \n\n    this.messageType = messageType;\n    this.callback = callback;\n  }\n\n  Handler.prototype.handle = function handle(message) {\n    if (message instanceof this.messageType) {\n      this.callback.call(null, message);\n    }\n  };\n\n  return Handler;\n}();\n\nfunction invokeCallback(callback, data, event) {\n  try {\n    callback(data, event);\n  } catch (e) {\n    logger.error(e);\n  }\n}\n\nfunction invokeHandler(handler, data) {\n  try {\n    handler.handle(data);\n  } catch (e) {\n    logger.error(e);\n  }\n}\n\nexport var EventAggregator = function () {\n  function EventAggregator() {\n    \n\n    this.eventLookup = {};\n    this.messageHandlers = [];\n  }\n\n  EventAggregator.prototype.publish = function publish(event, data) {\n    var subscribers = void 0;\n    var i = void 0;\n\n    if (!event) {\n      throw new Error('Event was invalid.');\n    }\n\n    if (typeof event === 'string') {\n      subscribers = this.eventLookup[event];\n      if (subscribers) {\n        subscribers = subscribers.slice();\n        i = subscribers.length;\n\n        while (i--) {\n          invokeCallback(subscribers[i], data, event);\n        }\n      }\n    } else {\n      subscribers = this.messageHandlers.slice();\n      i = subscribers.length;\n\n      while (i--) {\n        invokeHandler(subscribers[i], event);\n      }\n    }\n  };\n\n  EventAggregator.prototype.subscribe = function subscribe(event, callback) {\n    var handler = void 0;\n    var subscribers = void 0;\n\n    if (!event) {\n      throw new Error('Event channel/type was invalid.');\n    }\n\n    if (typeof event === 'string') {\n      handler = callback;\n      subscribers = this.eventLookup[event] || (this.eventLookup[event] = []);\n    } else {\n      handler = new Handler(event, callback);\n      subscribers = this.messageHandlers;\n    }\n\n    subscribers.push(handler);\n\n    return {\n      dispose: function dispose() {\n        var idx = subscribers.indexOf(handler);\n        if (idx !== -1) {\n          subscribers.splice(idx, 1);\n        }\n      }\n    };\n  };\n\n  EventAggregator.prototype.subscribeOnce = function subscribeOnce(event, callback) {\n    var sub = this.subscribe(event, function (a, b) {\n      sub.dispose();\n      return callback(a, b);\n    });\n\n    return sub;\n  };\n\n  return EventAggregator;\n}();\n\nexport function includeEventsIn(obj) {\n  var ea = new EventAggregator();\n\n  obj.subscribeOnce = function (event, callback) {\n    return ea.subscribeOnce(event, callback);\n  };\n\n  obj.subscribe = function (event, callback) {\n    return ea.subscribe(event, callback);\n  };\n\n  obj.publish = function (event, data) {\n    ea.publish(event, data);\n  };\n\n  return ea;\n}\n\nexport function configure(config) {\n  config.instance(EventAggregator, includeEventsIn(config.aurelia));\n}","import { Container } from 'aurelia-dependency-injection';\nexport * from 'aurelia-dependency-injection';\nexport * from 'aurelia-binding';\nexport * from 'aurelia-metadata';\nimport { HtmlBehaviorResource, ViewEngine, BindingLanguage, TemplatingEngine, CompositionTransaction, ViewSlot, ViewResources } from 'aurelia-templating';\nexport * from 'aurelia-templating';\nimport { Loader } from 'aurelia-loader';\nexport * from 'aurelia-loader';\nexport * from 'aurelia-task-queue';\nimport { join, relativeToFile } from 'aurelia-path';\nexport * from 'aurelia-path';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nexport * from 'aurelia-pal';\nimport * as TheLogManager from 'aurelia-logging';\nexport { TheLogManager as LogManager };\n\nvar logger = TheLogManager.getLogger('aurelia');\r\nvar extPattern = /\\.[^/.]+$/;\r\nfunction runTasks(config, tasks) {\r\n    var current;\r\n    var next = function () {\r\n        current = tasks.shift();\r\n        if (current) {\r\n            return Promise.resolve(current(config)).then(next);\r\n        }\r\n        return Promise.resolve();\r\n    };\r\n    return next();\r\n}\r\nfunction loadPlugin(fwConfig, loader, info) {\r\n    logger.debug(\"Loading plugin \".concat(info.moduleId, \".\"));\r\n    if (typeof info.moduleId === 'string') {\r\n        fwConfig.resourcesRelativeTo = info.resourcesRelativeTo;\r\n        var id = info.moduleId;\r\n        if (info.resourcesRelativeTo.length > 1) {\r\n            return loader.normalize(info.moduleId, info.resourcesRelativeTo[1])\r\n                .then(function (normalizedId) { return _loadPlugin(normalizedId); });\r\n        }\r\n        return _loadPlugin(id);\r\n    }\r\n    else if (typeof info.configure === 'function') {\r\n        if (fwConfig.configuredPlugins.indexOf(info.configure) !== -1) {\r\n            return Promise.resolve();\r\n        }\r\n        fwConfig.configuredPlugins.push(info.configure);\r\n        return Promise.resolve(info.configure.call(null, fwConfig, info.config || {}));\r\n    }\r\n    throw new Error(invalidConfigMsg(info.moduleId || info.configure, 'plugin'));\r\n    function _loadPlugin(moduleId) {\r\n        return loader.loadModule(moduleId).then(function (m) {\r\n            if ('configure' in m) {\r\n                if (fwConfig.configuredPlugins.indexOf(m.configure) !== -1) {\r\n                    return Promise.resolve();\r\n                }\r\n                return Promise.resolve(m.configure(fwConfig, info.config || {})).then(function () {\r\n                    fwConfig.configuredPlugins.push(m.configure);\r\n                    fwConfig.resourcesRelativeTo = null;\r\n                    logger.debug(\"Configured plugin \".concat(info.moduleId, \".\"));\r\n                });\r\n            }\r\n            fwConfig.resourcesRelativeTo = null;\r\n            logger.debug(\"Loaded plugin \".concat(info.moduleId, \".\"));\r\n        });\r\n    }\r\n}\r\nfunction loadResources(aurelia, resourcesToLoad, appResources) {\r\n    if (Object.keys(resourcesToLoad).length === 0) {\r\n        return Promise.resolve();\r\n    }\r\n    var viewEngine = aurelia.container.get(ViewEngine);\r\n    return Promise.all(Object.keys(resourcesToLoad).map(function (n) { return _normalize(resourcesToLoad[n]); }))\r\n        .then(function (loads) {\r\n        var names = [];\r\n        var importIds = [];\r\n        loads.forEach(function (l) {\r\n            names.push(undefined);\r\n            importIds.push(l.importId);\r\n        });\r\n        return viewEngine.importViewResources(importIds, names, appResources);\r\n    });\r\n    function _normalize(load) {\r\n        var moduleId = load.moduleId;\r\n        var ext = getExt(moduleId);\r\n        if (isOtherResource(moduleId)) {\r\n            moduleId = removeExt(moduleId);\r\n        }\r\n        return aurelia.loader.normalize(moduleId, load.relativeTo)\r\n            .then(function (normalized) {\r\n            return {\r\n                name: load.moduleId,\r\n                importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized\r\n            };\r\n        });\r\n    }\r\n    function isOtherResource(name) {\r\n        var ext = getExt(name);\r\n        if (!ext)\r\n            return false;\r\n        if (ext === '')\r\n            return false;\r\n        if (ext === '.js' || ext === '.ts')\r\n            return false;\r\n        return true;\r\n    }\r\n    function removeExt(name) {\r\n        return name.replace(extPattern, '');\r\n    }\r\n    function addOriginalExt(normalized, ext) {\r\n        return removeExt(normalized) + '.' + ext;\r\n    }\r\n}\r\nfunction getExt(name) {\r\n    var match = name.match(extPattern);\r\n    if (match && match.length > 0) {\r\n        return (match[0].split('.'))[1];\r\n    }\r\n}\r\nfunction loadBehaviors(config) {\r\n    return Promise.all(config.behaviorsToLoad.map(function (m) { return m.load(config.container, m.target); })).then(function () {\r\n        config.behaviorsToLoad = null;\r\n    });\r\n}\r\nfunction assertProcessed(plugins) {\r\n    if (plugins.processed) {\r\n        throw new Error('This config instance has already been applied. To load more plugins or global resources, create a new FrameworkConfiguration instance.');\r\n    }\r\n}\r\nfunction invalidConfigMsg(cfg, type) {\r\n    return \"Invalid \".concat(type, \" [\").concat(cfg, \"], \").concat(type, \" must be specified as functions or relative module IDs.\");\r\n}\r\nvar FrameworkConfiguration = (function () {\r\n    function FrameworkConfiguration(aurelia) {\r\n        var _this = this;\r\n        this.aurelia = aurelia;\r\n        this.container = aurelia.container;\r\n        this.info = [];\r\n        this.processed = false;\r\n        this.preTasks = [];\r\n        this.postTasks = [];\r\n        this.behaviorsToLoad = [];\r\n        this.configuredPlugins = [];\r\n        this.resourcesToLoad = {};\r\n        this.preTask(function () { return aurelia.loader.normalize('aurelia-bootstrapper', undefined)\r\n            .then(function (name) { return _this.bootstrapperName = name; }); });\r\n        this.postTask(function () { return loadResources(aurelia, _this.resourcesToLoad, aurelia.resources); });\r\n    }\r\n    FrameworkConfiguration.prototype.instance = function (type, instance) {\r\n        this.container.registerInstance(type, instance);\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.singleton = function (type, implementation) {\r\n        this.container.registerSingleton(type, implementation);\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.transient = function (type, implementation) {\r\n        this.container.registerTransient(type, implementation);\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.preTask = function (task) {\r\n        assertProcessed(this);\r\n        this.preTasks.push(task);\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.postTask = function (task) {\r\n        assertProcessed(this);\r\n        this.postTasks.push(task);\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.feature = function (plugin, config) {\r\n        if (config === void 0) { config = {}; }\r\n        switch (typeof plugin) {\r\n            case 'string':\r\n                var hasIndex = /\\/index$/i.test(plugin);\r\n                var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';\r\n                var root = hasIndex ? plugin.slice(0, -6) : plugin;\r\n                this.info.push({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });\r\n                break;\r\n            case 'function':\r\n                this.info.push({ configure: plugin, config: config || {} });\r\n                break;\r\n            default:\r\n                throw new Error(invalidConfigMsg(plugin, 'feature'));\r\n        }\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.globalResources = function (resources) {\r\n        var _this = this;\r\n        assertProcessed(this);\r\n        var toAdd = Array.isArray(resources) ? resources : arguments;\r\n        var resource;\r\n        var resourcesRelativeTo = this.resourcesRelativeTo || ['', ''];\r\n        for (var i = 0, ii = toAdd.length; i < ii; ++i) {\r\n            resource = toAdd[i];\r\n            switch (typeof resource) {\r\n                case 'string':\r\n                    var parent_1 = resourcesRelativeTo[0];\r\n                    var grandParent = resourcesRelativeTo[1];\r\n                    var name_1 = resource;\r\n                    if ((resource.startsWith('./') || resource.startsWith('../')) && parent_1 !== '') {\r\n                        name_1 = join(parent_1, resource);\r\n                    }\r\n                    this.resourcesToLoad[name_1] = { moduleId: name_1, relativeTo: grandParent };\r\n                    break;\r\n                case 'function':\r\n                    var meta = this.aurelia.resources.autoRegister(this.container, resource);\r\n                    if (meta instanceof HtmlBehaviorResource && meta.elementName !== null) {\r\n                        if (this.behaviorsToLoad.push(meta) === 1) {\r\n                            this.postTask(function () { return loadBehaviors(_this); });\r\n                        }\r\n                    }\r\n                    break;\r\n                default:\r\n                    throw new Error(invalidConfigMsg(resource, 'resource'));\r\n            }\r\n        }\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.globalName = function (resourcePath, newName) {\r\n        assertProcessed(this);\r\n        this.resourcesToLoad[resourcePath] = { moduleId: newName, relativeTo: '' };\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.plugin = function (plugin, pluginConfig) {\r\n        assertProcessed(this);\r\n        var info;\r\n        switch (typeof plugin) {\r\n            case 'string':\r\n                info = { moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: pluginConfig || {} };\r\n                break;\r\n            case 'function':\r\n                info = { configure: plugin, config: pluginConfig || {} };\r\n                break;\r\n            default:\r\n                throw new Error(invalidConfigMsg(plugin, 'plugin'));\r\n        }\r\n        this.info.push(info);\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype._addNormalizedPlugin = function (name, config) {\r\n        var _this = this;\r\n        var plugin = { moduleId: name, resourcesRelativeTo: [name, ''], config: config || {} };\r\n        this.info.push(plugin);\r\n        this.preTask(function () {\r\n            var relativeTo = [name, _this.bootstrapperName];\r\n            plugin.moduleId = name;\r\n            plugin.resourcesRelativeTo = relativeTo;\r\n            return Promise.resolve();\r\n        });\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.defaultBindingLanguage = function () {\r\n        return this._addNormalizedPlugin('aurelia-templating-binding');\r\n    };\r\n    FrameworkConfiguration.prototype.router = function () {\r\n        return this._addNormalizedPlugin('aurelia-templating-router');\r\n    };\r\n    FrameworkConfiguration.prototype.history = function () {\r\n        return this._addNormalizedPlugin('aurelia-history-browser');\r\n    };\r\n    FrameworkConfiguration.prototype.defaultResources = function () {\r\n        return this._addNormalizedPlugin('aurelia-templating-resources');\r\n    };\r\n    FrameworkConfiguration.prototype.eventAggregator = function () {\r\n        return this._addNormalizedPlugin('aurelia-event-aggregator');\r\n    };\r\n    FrameworkConfiguration.prototype.basicConfiguration = function () {\r\n        return this.defaultBindingLanguage().defaultResources().eventAggregator();\r\n    };\r\n    FrameworkConfiguration.prototype.standardConfiguration = function () {\r\n        return this.basicConfiguration().history().router();\r\n    };\r\n    FrameworkConfiguration.prototype.developmentLogging = function (level) {\r\n        var _this = this;\r\n        var logLevel = level ? TheLogManager.logLevel[level] : undefined;\r\n        if (logLevel === undefined) {\r\n            logLevel = TheLogManager.logLevel.debug;\r\n        }\r\n        this.preTask(function () {\r\n            return _this.aurelia.loader.normalize('aurelia-logging-console', _this.bootstrapperName).then(function (name) {\r\n                return _this.aurelia.loader.loadModule(name).then(function (m) {\r\n                    TheLogManager.addAppender(new m.ConsoleAppender());\r\n                    TheLogManager.setLevel(logLevel);\r\n                });\r\n            });\r\n        });\r\n        return this;\r\n    };\r\n    FrameworkConfiguration.prototype.apply = function () {\r\n        var _this = this;\r\n        if (this.processed) {\r\n            return Promise.resolve();\r\n        }\r\n        return runTasks(this, this.preTasks).then(function () {\r\n            var loader = _this.aurelia.loader;\r\n            var info = _this.info;\r\n            var current;\r\n            var next = function () {\r\n                current = info.shift();\r\n                if (current) {\r\n                    return loadPlugin(_this, loader, current).then(next);\r\n                }\r\n                _this.processed = true;\r\n                _this.configuredPlugins = null;\r\n                return Promise.resolve();\r\n            };\r\n            return next().then(function () { return runTasks(_this, _this.postTasks); });\r\n        });\r\n    };\r\n    return FrameworkConfiguration;\r\n}());\n\nfunction preventActionlessFormSubmit() {\r\n    DOM.addEventListener('submit', function (evt) {\r\n        var target = evt.target;\r\n        var action = target.action;\r\n        if (target.tagName.toLowerCase() === 'form' && !action) {\r\n            evt.preventDefault();\r\n        }\r\n    }, false);\r\n}\r\nvar Aurelia = (function () {\r\n    function Aurelia(loader, container, resources) {\r\n        this.loader = loader || new PLATFORM.Loader();\r\n        this.container = container || (new Container()).makeGlobal();\r\n        this.resources = resources || new ViewResources();\r\n        this.use = new FrameworkConfiguration(this);\r\n        this.logger = TheLogManager.getLogger('aurelia');\r\n        this.hostConfigured = false;\r\n        this.host = null;\r\n        this.use.instance(Aurelia, this);\r\n        this.use.instance(Loader, this.loader);\r\n        this.use.instance(ViewResources, this.resources);\r\n    }\r\n    Aurelia.prototype.start = function () {\r\n        var _this = this;\r\n        if (this._started) {\r\n            return this._started;\r\n        }\r\n        this.logger.info('Aurelia Starting');\r\n        return this._started = this.use.apply().then(function () {\r\n            preventActionlessFormSubmit();\r\n            if (!_this.container.hasResolver(BindingLanguage)) {\r\n                var message = 'You must configure Aurelia with a BindingLanguage implementation.';\r\n                _this.logger.error(message);\r\n                throw new Error(message);\r\n            }\r\n            _this.logger.info('Aurelia Started');\r\n            var evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true });\r\n            DOM.dispatchEvent(evt);\r\n            return _this;\r\n        });\r\n    };\r\n    Aurelia.prototype.enhance = function (bindingContext, applicationHost) {\r\n        var _this = this;\r\n        if (bindingContext === void 0) { bindingContext = {}; }\r\n        if (applicationHost === void 0) { applicationHost = null; }\r\n        this._configureHost(applicationHost || DOM.querySelectorAll('body')[0]);\r\n        return new Promise(function (resolve) {\r\n            var engine = _this.container.get(TemplatingEngine);\r\n            _this.root = engine.enhance({ container: _this.container, element: _this.host, resources: _this.resources, bindingContext: bindingContext });\r\n            _this.root.attached();\r\n            _this._onAureliaComposed();\r\n            resolve(_this);\r\n        });\r\n    };\r\n    Aurelia.prototype.setRoot = function (root, applicationHost) {\r\n        var _this = this;\r\n        if (root === void 0) { root = null; }\r\n        if (applicationHost === void 0) { applicationHost = null; }\r\n        var instruction = {};\r\n        if (this.root && this.root.viewModel && this.root.viewModel.router) {\r\n            this.root.viewModel.router.deactivate();\r\n            this.root.viewModel.router.reset();\r\n        }\r\n        this._configureHost(applicationHost);\r\n        var engine = this.container.get(TemplatingEngine);\r\n        var transaction = this.container.get(CompositionTransaction);\r\n        delete transaction.initialComposition;\r\n        if (!root) {\r\n            if (this.configModuleId) {\r\n                root = relativeToFile('./app', this.configModuleId);\r\n            }\r\n            else {\r\n                root = 'app';\r\n            }\r\n        }\r\n        instruction.viewModel = root;\r\n        instruction.container = instruction.childContainer = this.container;\r\n        instruction.viewSlot = this.hostSlot;\r\n        instruction.host = this.host;\r\n        return engine.compose(instruction).then(function (r) {\r\n            _this.root = r;\r\n            instruction.viewSlot.attached();\r\n            _this._onAureliaComposed();\r\n            return _this;\r\n        });\r\n    };\r\n    Aurelia.prototype._configureHost = function (applicationHost) {\r\n        if (this.hostConfigured) {\r\n            return;\r\n        }\r\n        applicationHost = applicationHost || this.host;\r\n        if (!applicationHost || typeof applicationHost === 'string') {\r\n            this.host = DOM.getElementById(applicationHost || 'applicationHost');\r\n        }\r\n        else {\r\n            this.host = applicationHost;\r\n        }\r\n        if (!this.host) {\r\n            throw new Error('No applicationHost was specified.');\r\n        }\r\n        this.hostConfigured = true;\r\n        this.host.aurelia = this;\r\n        this.hostSlot = new ViewSlot(this.host, true);\r\n        this.hostSlot.transformChildNodesIntoView();\r\n        this.container.registerInstance(DOM.boundary, this.host);\r\n    };\r\n    Aurelia.prototype._onAureliaComposed = function () {\r\n        var evt = DOM.createCustomEvent('aurelia-composed', { bubbles: true, cancelable: true });\r\n        setTimeout(function () { return DOM.dispatchEvent(evt); }, 1);\r\n    };\r\n    return Aurelia;\r\n}());\n\nexport { Aurelia, FrameworkConfiguration };\n//# sourceMappingURL=aurelia-framework.js.map\n","define(['exports', './analytics'], function (exports, _analytics) {\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.configure = configure;\n\tfunction configure(aurelia, configCallback) {\n\t\ttry {\n\t\t\tvar instance = aurelia.container.get(_analytics.Analytics);\n\t\t\tif (configCallback !== undefined && typeof configCallback === 'function') {\n\t\t\t\tconfigCallback(instance);\n\t\t\t}\n\n\t\t\taurelia.singleton(instance);\n\t\t} catch (err) {\n\t\t\tconsole.error(\"configure: %o\", err);\n\t\t}\n\t}\n});","import { History } from 'aurelia-history';\nimport { DOM, PLATFORM } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    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 extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(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}\n\nvar LinkHandler = (function () {\r\n    function LinkHandler() {\r\n    }\r\n    LinkHandler.prototype.activate = function (history) { };\r\n    LinkHandler.prototype.deactivate = function () { };\r\n    return LinkHandler;\r\n}());\r\nvar DefaultLinkHandler = (function (_super) {\r\n    __extends(DefaultLinkHandler, _super);\r\n    function DefaultLinkHandler() {\r\n        var _this = _super.call(this) || this;\r\n        _this.handler = function (e) {\r\n            var _a = DefaultLinkHandler.getEventInfo(e), shouldHandleEvent = _a.shouldHandleEvent, href = _a.href;\r\n            if (shouldHandleEvent) {\r\n                e.preventDefault();\r\n                _this.history.navigate(href);\r\n            }\r\n        };\r\n        return _this;\r\n    }\r\n    DefaultLinkHandler.prototype.activate = function (history) {\r\n        if (history._hasPushState) {\r\n            this.history = history;\r\n            DOM.addEventListener('click', this.handler, true);\r\n        }\r\n    };\r\n    DefaultLinkHandler.prototype.deactivate = function () {\r\n        DOM.removeEventListener('click', this.handler, true);\r\n    };\r\n    DefaultLinkHandler.getEventInfo = function (event) {\r\n        var $event = event;\r\n        var info = {\r\n            shouldHandleEvent: false,\r\n            href: null,\r\n            anchor: null\r\n        };\r\n        var target = DefaultLinkHandler.findClosestAnchor($event.target);\r\n        if (!target || !DefaultLinkHandler.targetIsThisWindow(target)) {\r\n            return info;\r\n        }\r\n        if (hasAttribute(target, 'download')\r\n            || hasAttribute(target, 'router-ignore')\r\n            || hasAttribute(target, 'data-router-ignore')) {\r\n            return info;\r\n        }\r\n        if ($event.altKey || $event.ctrlKey || $event.metaKey || $event.shiftKey) {\r\n            return info;\r\n        }\r\n        var href = target.getAttribute('href');\r\n        info.anchor = target;\r\n        info.href = href;\r\n        var leftButtonClicked = $event.which === 1;\r\n        var isRelative = href && !(href.charAt(0) === '#' || (/^[a-z]+:/i).test(href));\r\n        info.shouldHandleEvent = leftButtonClicked && isRelative;\r\n        return info;\r\n    };\r\n    DefaultLinkHandler.findClosestAnchor = function (el) {\r\n        while (el) {\r\n            if (el.tagName === 'A') {\r\n                return el;\r\n            }\r\n            el = el.parentNode;\r\n        }\r\n    };\r\n    DefaultLinkHandler.targetIsThisWindow = function (target) {\r\n        var targetWindow = target.getAttribute('target');\r\n        var win = PLATFORM.global;\r\n        return !targetWindow ||\r\n            targetWindow === win.name ||\r\n            targetWindow === '_self';\r\n    };\r\n    return DefaultLinkHandler;\r\n}(LinkHandler));\r\nvar hasAttribute = function (el, attr) { return el.hasAttribute(attr); };\n\nvar BrowserHistory = (function (_super) {\r\n    __extends(BrowserHistory, _super);\r\n    function BrowserHistory(linkHandler) {\r\n        var _this = _super.call(this) || this;\r\n        _this._isActive = false;\r\n        _this._checkUrlCallback = _this._checkUrl.bind(_this);\r\n        _this.location = PLATFORM.location;\r\n        _this.history = PLATFORM.history;\r\n        _this.linkHandler = linkHandler;\r\n        return _this;\r\n    }\r\n    BrowserHistory.prototype.activate = function (options) {\r\n        if (this._isActive) {\r\n            throw new Error('History has already been activated.');\r\n        }\r\n        var $history = this.history;\r\n        var wantsPushState = !!options.pushState;\r\n        this._isActive = true;\r\n        var normalizedOptions = this.options = Object.assign({}, { root: '/' }, this.options, options);\r\n        var rootUrl = this.root = ('/' + normalizedOptions.root + '/').replace(rootStripper, '/');\r\n        var wantsHashChange = this._wantsHashChange = normalizedOptions.hashChange !== false;\r\n        var hasPushState = this._hasPushState = !!(normalizedOptions.pushState && $history && $history.pushState);\r\n        var eventName;\r\n        if (hasPushState) {\r\n            eventName = 'popstate';\r\n        }\r\n        else if (wantsHashChange) {\r\n            eventName = 'hashchange';\r\n        }\r\n        PLATFORM.addEventListener(eventName, this._checkUrlCallback);\r\n        if (wantsHashChange && wantsPushState) {\r\n            var $location = this.location;\r\n            var atRoot = $location.pathname.replace(/[^\\/]$/, '$&/') === rootUrl;\r\n            if (!hasPushState && !atRoot) {\r\n                var fragment = this.fragment = this._getFragment(null, true);\r\n                $location.replace(rootUrl + $location.search + '#' + fragment);\r\n                return true;\r\n            }\r\n            else if (hasPushState && atRoot && $location.hash) {\r\n                var fragment = this.fragment = this._getHash().replace(routeStripper, '');\r\n                $history.replaceState({}, DOM.title, rootUrl + fragment + $location.search);\r\n            }\r\n        }\r\n        if (!this.fragment) {\r\n            this.fragment = this._getFragment('');\r\n        }\r\n        this.linkHandler.activate(this);\r\n        if (!normalizedOptions.silent) {\r\n            return this._loadUrl('');\r\n        }\r\n    };\r\n    BrowserHistory.prototype.deactivate = function () {\r\n        var handler = this._checkUrlCallback;\r\n        PLATFORM.removeEventListener('popstate', handler);\r\n        PLATFORM.removeEventListener('hashchange', handler);\r\n        this._isActive = false;\r\n        this.linkHandler.deactivate();\r\n    };\r\n    BrowserHistory.prototype.getAbsoluteRoot = function () {\r\n        var $location = this.location;\r\n        var origin = createOrigin($location.protocol, $location.hostname, $location.port);\r\n        return \"\" + origin + this.root;\r\n    };\r\n    BrowserHistory.prototype.navigate = function (fragment, _a) {\r\n        var _b = _a === void 0 ? {} : _a, _c = _b.trigger, trigger = _c === void 0 ? true : _c, _d = _b.replace, replace = _d === void 0 ? false : _d;\r\n        var location = this.location;\r\n        if (fragment && absoluteUrl.test(fragment)) {\r\n            location.href = fragment;\r\n            return true;\r\n        }\r\n        if (!this._isActive) {\r\n            return false;\r\n        }\r\n        fragment = this._getFragment(fragment || '');\r\n        if (this.fragment === fragment && !replace) {\r\n            return false;\r\n        }\r\n        this.fragment = fragment;\r\n        var url = this.root + fragment;\r\n        if (fragment === '' && url !== '/') {\r\n            url = url.slice(0, -1);\r\n        }\r\n        if (this._hasPushState) {\r\n            url = url.replace('//', '/');\r\n            this.history[replace ? 'replaceState' : 'pushState']({}, DOM.title, url);\r\n        }\r\n        else if (this._wantsHashChange) {\r\n            updateHash(location, fragment, replace);\r\n        }\r\n        else {\r\n            location.assign(url);\r\n        }\r\n        if (trigger) {\r\n            return this._loadUrl(fragment);\r\n        }\r\n        return true;\r\n    };\r\n    BrowserHistory.prototype.navigateBack = function () {\r\n        this.history.back();\r\n    };\r\n    BrowserHistory.prototype.setTitle = function (title) {\r\n        DOM.title = title;\r\n    };\r\n    BrowserHistory.prototype.setState = function (key, value) {\r\n        var $history = this.history;\r\n        var state = Object.assign({}, $history.state);\r\n        var _a = this.location, pathname = _a.pathname, search = _a.search, hash = _a.hash;\r\n        state[key] = value;\r\n        $history.replaceState(state, null, \"\" + pathname + search + hash);\r\n    };\r\n    BrowserHistory.prototype.getState = function (key) {\r\n        var state = Object.assign({}, this.history.state);\r\n        return state[key];\r\n    };\r\n    BrowserHistory.prototype.getHistoryIndex = function () {\r\n        var historyIndex = this.getState('HistoryIndex');\r\n        if (historyIndex === undefined) {\r\n            historyIndex = this.history.length - 1;\r\n            this.setState('HistoryIndex', historyIndex);\r\n        }\r\n        return historyIndex;\r\n    };\r\n    BrowserHistory.prototype.go = function (movement) {\r\n        this.history.go(movement);\r\n    };\r\n    BrowserHistory.prototype._getHash = function () {\r\n        return this.location.hash.substr(1);\r\n    };\r\n    BrowserHistory.prototype._getFragment = function (fragment, forcePushState) {\r\n        var rootUrl;\r\n        if (!fragment) {\r\n            if (this._hasPushState || !this._wantsHashChange || forcePushState) {\r\n                var location_1 = this.location;\r\n                fragment = location_1.pathname + location_1.search;\r\n                rootUrl = this.root.replace(trailingSlash, '');\r\n                if (!fragment.indexOf(rootUrl)) {\r\n                    fragment = fragment.substr(rootUrl.length);\r\n                }\r\n            }\r\n            else {\r\n                fragment = this._getHash();\r\n            }\r\n        }\r\n        return '/' + fragment.replace(routeStripper, '');\r\n    };\r\n    BrowserHistory.prototype._checkUrl = function () {\r\n        var current = this._getFragment('');\r\n        if (current !== this.fragment) {\r\n            this._loadUrl('');\r\n        }\r\n    };\r\n    BrowserHistory.prototype._loadUrl = function (fragmentOverride) {\r\n        var fragment = this.fragment = this._getFragment(fragmentOverride);\r\n        return this.options.routeHandler ?\r\n            this.options.routeHandler(fragment) :\r\n            false;\r\n    };\r\n    BrowserHistory.inject = [LinkHandler];\r\n    return BrowserHistory;\r\n}(History));\r\nvar routeStripper = /^#?\\/*|\\s+$/g;\r\nvar rootStripper = /^\\/+|\\/+$/g;\r\nvar trailingSlash = /\\/$/;\r\nvar absoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction updateHash($location, fragment, replace) {\r\n    if (replace) {\r\n        var href = $location.href.replace(/(javascript:|#).*$/, '');\r\n        $location.replace(href + '#' + fragment);\r\n    }\r\n    else {\r\n        $location.hash = '#' + fragment;\r\n    }\r\n}\r\nfunction createOrigin(protocol, hostname, port) {\r\n    return protocol + \"//\" + hostname + (port ? ':' + port : '');\r\n}\n\nfunction configure(config) {\r\n    var $config = config;\r\n    $config.singleton(History, BrowserHistory);\r\n    $config.transient(LinkHandler, DefaultLinkHandler);\r\n}\n\nexport { BrowserHistory, DefaultLinkHandler, LinkHandler, configure };\n//# sourceMappingURL=aurelia-history-browser.js.map\n","import i18next from 'i18next';\nimport { getLogger } from 'aurelia-logging';\nimport { resolver } from 'aurelia-dependency-injection';\nimport { customAttribute, HtmlBehaviorResource, ViewResources } from 'aurelia-templating';\nimport { metadata } from 'aurelia-metadata';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nimport { valueConverter } from 'aurelia-framework';\nimport { BindingSignaler, SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { ValueConverter, bindingBehavior, valueConverter as valueConverter$1 } from 'aurelia-binding';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\n\nvar I18N_EA_SIGNAL = \"i18n:locale:changed\";\nvar I18N = /** @class */ (function () {\n    function I18N(ea, signaler) {\n        this.ea = ea;\n        this.signaler = signaler;\n        this.globalVars = {};\n        this.i18next = i18next;\n        this.Intl = PLATFORM.global.Intl;\n    }\n    I18N.inject = function () { return [EventAggregator, BindingSignaler]; };\n    I18N.prototype.setup = function (options) {\n        return __awaiter(this, void 0, void 0, function () {\n            var defaultOptions;\n            var _this = this;\n            return __generator(this, function (_a) {\n                defaultOptions = {\n                    skipTranslationOnMissingKey: false,\n                    compatibilityJSON: \"v1\",\n                    lng: \"en\",\n                    attributes: [\"t\", \"i18n\"],\n                    fallbackLng: \"en\",\n                    debug: false\n                };\n                this.i18nextDeferred = new Promise(function (resolve, reject) {\n                    _this.i18next.init(options || defaultOptions, function (err) {\n                        if (err && !Array.isArray(err)) {\n                            reject(err);\n                        }\n                        // make sure attributes is an array in case a string was provided\n                        if (_this.i18next.options.attributes instanceof String) {\n                            _this.i18next.options.attributes = [_this.i18next.options.attributes];\n                        }\n                        resolve(_this.i18next);\n                    });\n                });\n                return [2 /*return*/, this.i18nextDeferred];\n            });\n        });\n    };\n    I18N.prototype.i18nextReady = function () {\n        return this.i18nextDeferred;\n    };\n    I18N.prototype.setLocale = function (locale) {\n        var _this = this;\n        return new Promise(function (resolve, reject) {\n            var oldLocale = _this.getLocale();\n            _this.i18next.changeLanguage(locale, function (err, tr) {\n                if (err) {\n                    reject(err);\n                }\n                _this.ea.publish(I18N_EA_SIGNAL, { oldValue: oldLocale, newValue: locale });\n                _this.signaler.signal(\"aurelia-translation-signal\");\n                resolve(tr);\n            });\n        });\n    };\n    I18N.prototype.getLocale = function () {\n        return this.i18next.language;\n    };\n    I18N.prototype.nf = function (options, locales) {\n        return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});\n    };\n    I18N.prototype.uf = function (numberLike, locale) {\n        var nf = this.nf({}, locale || this.getLocale());\n        var comparer = nf.format(10000 / 3);\n        var thousandSeparator = comparer[1];\n        var decimalSeparator = comparer[5];\n        if (thousandSeparator === \".\") {\n            thousandSeparator = \"\\\\.\";\n        }\n        // remove all thousand seperators\n        var result = numberLike.replace(new RegExp(thousandSeparator, \"g\"), \"\")\n            // remove non-numeric signs except -> , .\n            .replace(/[^\\d.,-]/g, \"\")\n            // replace original decimalSeparator with english one\n            .replace(decimalSeparator, \".\");\n        // return real number\n        return Number(result);\n    };\n    I18N.prototype.df = function (options, locales) {\n        return new this.Intl.DateTimeFormat(locales || this.getLocale(), options);\n    };\n    I18N.prototype.tr = function (key, options) {\n        var fullOptions = this.globalVars;\n        if (options !== undefined) {\n            fullOptions = Object.assign(Object.assign({}, this.globalVars), options);\n        }\n        return this.i18next.t(key, fullOptions);\n    };\n    I18N.prototype.registerGlobalVariable = function (key, value) {\n        this.globalVars[key] = value;\n    };\n    I18N.prototype.unregisterGlobalVariable = function (key) {\n        delete this.globalVars[key];\n    };\n    /**\n     * Scans an element for children that have a translation attribute and\n     * updates their innerHTML with the current translation values.\n     *\n     * If an image is encountered the translated value will be applied to the src attribute.\n     *\n     * @param el    HTMLElement to search within\n     */\n    I18N.prototype.updateTranslations = function (el) {\n        if (!el || !el.querySelectorAll) {\n            return;\n        }\n        var i;\n        var l;\n        // create a selector from the specified attributes to look for\n        // var selector = [].concat(this.i18next.options.attributes);\n        var attributes = this.i18next.options.attributes;\n        var selector = [].concat(attributes);\n        for (i = 0, l = selector.length; i < l; i++) {\n            selector[i] = \"[\" + selector[i] + \"]\";\n        }\n        selector = selector.join(\",\");\n        // get the nodes\n        var nodes = el.querySelectorAll(selector);\n        for (i = 0, l = nodes.length; i < l; i++) {\n            var node = nodes[i];\n            var keys = void 0;\n            var params = void 0;\n            // test every attribute and get the first one that has a value\n            for (var i2 = 0, l2 = attributes.length; i2 < l2; i2++) {\n                keys = node.getAttribute(attributes[i2]);\n                var pname = attributes[i2] + \"-params\";\n                if (pname && node.au && node.au[pname]) {\n                    params = node.au[pname].viewModel.value;\n                }\n                if (keys) {\n                    break;\n                }\n            }\n            // skip if nothing was found\n            if (!keys) {\n                continue;\n            }\n            // split the keys into multiple keys separated by a ;\n            this.updateValue(node, keys, params);\n        }\n    };\n    I18N.prototype.updateValue = function (node, value, params) {\n        if (value === null || value === undefined) {\n            value = \"\";\n        }\n        var keys = value.toString().split(\";\");\n        var i = keys.length;\n        while (i--) {\n            var key = keys[i];\n            // remove the optional attribute\n            var re = /\\[([a-z\\-, ]*)\\]/ig;\n            var m = void 0;\n            var attr = \"text\";\n            // set default attribute to src if this is an image node\n            if (node.nodeName === \"IMG\") {\n                attr = \"src\";\n            }\n            // check if a attribute was specified in the key\n            // tslint:disable-next-line:no-conditional-assignment\n            while ((m = re.exec(key)) !== null) {\n                if (m.index === re.lastIndex) {\n                    re.lastIndex++;\n                }\n                if (m) {\n                    key = key.replace(m[0], \"\");\n                    attr = m[1];\n                }\n            }\n            var attrs = attr.split(\",\");\n            var j = attrs.length;\n            while (j--) {\n                attr = attrs[j].trim();\n                if (!node._textContent) {\n                    node._textContent = node.textContent;\n                }\n                if (!node._innerHTML) {\n                    node._innerHTML = node.innerHTML;\n                }\n                // convert to camelCase\n                // tslint:disable-next-line:only-arrow-functions\n                var attrCC = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\n                var reservedNames = [\"prepend\", \"append\", \"text\", \"html\"];\n                var i18nLogger = getLogger(\"i18n\");\n                if (reservedNames.indexOf(attr) > -1 &&\n                    node.au &&\n                    node.au.controller &&\n                    node.au.controller.viewModel &&\n                    attrCC in node.au.controller.viewModel) {\n                    i18nLogger.warn(\"Aurelia I18N reserved attribute name\\n\\n  [\" + reservedNames.join(\", \") + \"]\\n\\n  Your custom element has a bindable named \" + attr + \" which is a reserved word.\\n\\n  If you'd like Aurelia I18N to translate your bindable instead, please consider giving it another name.\");\n                }\n                if (this.i18next.options.skipTranslationOnMissingKey &&\n                    this.tr(key, params) === key) {\n                    i18nLogger.warn(\"Couldn't find translation for key: \" + key);\n                    return;\n                }\n                // handle various attributes\n                // anything other than text,prepend,append or html will be added as an attribute on the element.\n                switch (attr) {\n                    case \"text\":\n                        var newChild = DOM.createTextNode(this.tr(key, params));\n                        if (node._newChild && node._newChild.parentNode === node) {\n                            node.removeChild(node._newChild);\n                        }\n                        node._newChild = newChild;\n                        while (node.firstChild) {\n                            node.removeChild(node.firstChild);\n                        }\n                        node.appendChild(node._newChild);\n                        break;\n                    case \"prepend\":\n                        var prependParser = DOM.createElement(\"div\");\n                        prependParser.innerHTML = this.tr(key, params);\n                        for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n                            if (node.childNodes[ni]._prepended) {\n                                node.removeChild(node.childNodes[ni]);\n                            }\n                        }\n                        for (var pi = prependParser.childNodes.length - 1; pi >= 0; pi--) {\n                            prependParser.childNodes[pi]._prepended = true;\n                            if (node.firstChild) {\n                                node.insertBefore(prependParser.childNodes[pi], node.firstChild);\n                            }\n                            else {\n                                node.appendChild(prependParser.childNodes[pi]);\n                            }\n                        }\n                        break;\n                    case \"append\":\n                        var appendParser = DOM.createElement(\"div\");\n                        appendParser.innerHTML = this.tr(key, params);\n                        for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n                            if (node.childNodes[ni]._appended) {\n                                node.removeChild(node.childNodes[ni]);\n                            }\n                        }\n                        while (appendParser.firstChild) {\n                            appendParser.firstChild._appended = true;\n                            node.appendChild(appendParser.firstChild);\n                        }\n                        break;\n                    case \"html\":\n                        node.innerHTML = this.tr(key, params);\n                        break;\n                    default: // normal html attribute\n                        if (node.au &&\n                            node.au.controller &&\n                            node.au.controller.viewModel &&\n                            attrCC in node.au.controller.viewModel) {\n                            node.au.controller.viewModel[attrCC] = this.tr(key, params);\n                        }\n                        else {\n                            node.setAttribute(attr, this.tr(key, params));\n                        }\n                        break;\n                }\n            }\n        }\n    };\n    return I18N;\n}());\n\nvar TBindingBehavior = /** @class */ (function () {\n    function TBindingBehavior(signalBindingBehavior) {\n        this.signalBindingBehavior = signalBindingBehavior;\n    }\n    TBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n    TBindingBehavior.prototype.bind = function (binding, source) {\n        // bind the signal behavior\n        this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n        // rewrite the expression to use the TValueConverter.\n        // pass through any args to the binding behavior to the TValueConverter\n        var sourceExpression = binding.sourceExpression;\n        // do create the sourceExpression only once\n        if (sourceExpression.rewritten) {\n            return;\n        }\n        sourceExpression.rewritten = true;\n        var expression = sourceExpression.expression;\n        sourceExpression.expression = new ValueConverter(expression, \"t\", sourceExpression.args, [expression].concat(sourceExpression.args));\n    };\n    TBindingBehavior.prototype.unbind = function (binding, source) {\n        // unbind the signal behavior\n        this.signalBindingBehavior.unbind(binding, source);\n    };\n    TBindingBehavior = __decorate([\n        bindingBehavior(\"t\")\n    ], TBindingBehavior);\n    return TBindingBehavior;\n}());\n\n// tslint:disable-next-line:only-arrow-functions\nvar isInteger = Number.isInteger || function (value) {\n    return typeof value === \"number\" &&\n        isFinite(value) &&\n        Math.floor(value) === value;\n};\nvar LazyOptional = /** @class */ (function () {\n    function LazyOptional(key) {\n        this.key = key;\n    }\n    LazyOptional_1 = LazyOptional;\n    LazyOptional.of = function (key) {\n        return new LazyOptional_1(key);\n    };\n    LazyOptional.prototype.get = function (container) {\n        var _this = this;\n        return function () {\n            if (container.hasResolver(_this.key, false)) {\n                return container.get(_this.key);\n            }\n            return null;\n        };\n    };\n    var LazyOptional_1;\n    LazyOptional = LazyOptional_1 = __decorate([\n        resolver()\n    ], LazyOptional);\n    return LazyOptional;\n}());\n\nvar TParamsCustomAttribute = /** @class */ (function () {\n    function TParamsCustomAttribute(element) {\n        this.element = element;\n    }\n    TParamsCustomAttribute_1 = TParamsCustomAttribute;\n    TParamsCustomAttribute.inject = function () {\n        return [DOM.Element];\n    };\n    TParamsCustomAttribute.configureAliases = function (aliases) {\n        var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TParamsCustomAttribute_1);\n        r.aliases = aliases;\n    };\n    TParamsCustomAttribute.prototype.valueChanged = function () { };\n    var TParamsCustomAttribute_1;\n    TParamsCustomAttribute = TParamsCustomAttribute_1 = __decorate([\n        customAttribute(\"t-params\")\n    ], TParamsCustomAttribute);\n    return TParamsCustomAttribute;\n}());\n\nvar TCustomAttribute = /** @class */ (function () {\n    function TCustomAttribute(element, service, ea, p) {\n        this.element = element;\n        this.service = service;\n        this.ea = ea;\n        this.lazyParams = p;\n    }\n    TCustomAttribute_1 = TCustomAttribute;\n    TCustomAttribute.inject = function () {\n        return [DOM.Element, I18N, EventAggregator, LazyOptional.of(TParamsCustomAttribute)];\n    };\n    TCustomAttribute.configureAliases = function (aliases) {\n        var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TCustomAttribute_1);\n        r.aliases = aliases;\n    };\n    TCustomAttribute.prototype.bind = function () {\n        var _this = this;\n        this.params = this.lazyParams();\n        if (this.params) {\n            this.params.valueChanged = function (newParams, oldParams) {\n                _this.paramsChanged(_this.value, newParams, oldParams);\n            };\n        }\n        var p = this.params !== null ? this.params.value : undefined;\n        this.subscription = this.ea.subscribe(I18N_EA_SIGNAL, function () {\n            _this.service.updateValue(_this.element, _this.value, _this.params !== null ? _this.params.value : undefined);\n        });\n        this.service.updateValue(this.element, this.value, p);\n    };\n    TCustomAttribute.prototype.paramsChanged = function (newValue, newParams) {\n        this.service.updateValue(this.element, newValue, newParams);\n    };\n    TCustomAttribute.prototype.valueChanged = function (newValue) {\n        var p = this.params !== null ? this.params.value : undefined;\n        this.service.updateValue(this.element, newValue, p);\n    };\n    TCustomAttribute.prototype.unbind = function () {\n        // If unbind is called before timeout for subscription is triggered, subscription will be undefined\n        if (this.subscription) {\n            this.subscription.dispose();\n        }\n    };\n    var TCustomAttribute_1;\n    TCustomAttribute = TCustomAttribute_1 = __decorate([\n        customAttribute(\"t\")\n    ], TCustomAttribute);\n    return TCustomAttribute;\n}());\n\nvar TValueConverter = /** @class */ (function () {\n    function TValueConverter(service) {\n        this.service = service;\n    }\n    TValueConverter.inject = function () { return [I18N]; };\n    TValueConverter.prototype.toView = function (value, options) {\n        return this.service.tr(value, options);\n    };\n    TValueConverter = __decorate([\n        valueConverter(\"t\")\n    ], TValueConverter);\n    return TValueConverter;\n}());\n\nvar NfBindingBehavior = /** @class */ (function () {\n    function NfBindingBehavior(signalBindingBehavior) {\n        this.signalBindingBehavior = signalBindingBehavior;\n    }\n    NfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n    NfBindingBehavior.prototype.bind = function (binding, source) {\n        // bind the signal behavior\n        this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n        // rewrite the expression to use the NfValueConverter.\n        // pass through any args to the binding behavior to the NfValueConverter\n        var sourceExpression = binding.sourceExpression;\n        // do create the sourceExpression only once\n        if (sourceExpression.rewritten) {\n            return;\n        }\n        sourceExpression.rewritten = true;\n        var expression = sourceExpression.expression;\n        sourceExpression.expression = new ValueConverter(expression, \"nf\", sourceExpression.args, [expression].concat(sourceExpression.args));\n    };\n    NfBindingBehavior.prototype.unbind = function (binding, source) {\n        // unbind the signal behavior\n        this.signalBindingBehavior.unbind(binding, source);\n    };\n    NfBindingBehavior = __decorate([\n        bindingBehavior(\"nf\")\n    ], NfBindingBehavior);\n    return NfBindingBehavior;\n}());\n\nvar NfValueConverter = /** @class */ (function () {\n    function NfValueConverter(service) {\n        this.service = service;\n    }\n    NfValueConverter.inject = function () { return [I18N]; };\n    NfValueConverter.prototype.toView = function (value, nfOrOptions, locale) {\n        if (value === null\n            || typeof value === \"undefined\"\n            || (typeof value === \"string\" && value.trim() === \"\")) {\n            return value;\n        }\n        if (nfOrOptions && (nfOrOptions instanceof Intl.NumberFormat && typeof nfOrOptions.format === \"function\")) {\n            return nfOrOptions.format(value);\n        }\n        var nf = this.service.nf(nfOrOptions, locale || this.service.getLocale());\n        return nf.format(value);\n    };\n    NfValueConverter = __decorate([\n        valueConverter$1(\"nf\")\n    ], NfValueConverter);\n    return NfValueConverter;\n}());\n\nvar DfBindingBehavior = /** @class */ (function () {\n    function DfBindingBehavior(signalBindingBehavior) {\n        this.signalBindingBehavior = signalBindingBehavior;\n    }\n    DfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n    DfBindingBehavior.prototype.bind = function (binding, source) {\n        // bind the signal behavior\n        this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n        // rewrite the expression to use the DfValueConverter.\n        // pass through any args to the binding behavior to the DfValueConverter\n        var sourceExpression = binding.sourceExpression;\n        // do create the sourceExpression only once\n        if (sourceExpression.rewritten) {\n            return;\n        }\n        sourceExpression.rewritten = true;\n        var expression = sourceExpression.expression;\n        sourceExpression.expression = new ValueConverter(expression, \"df\", sourceExpression.args, [expression].concat(sourceExpression.args));\n    };\n    DfBindingBehavior.prototype.unbind = function (binding, source) {\n        // unbind the signal behavior\n        this.signalBindingBehavior.unbind(binding, source);\n    };\n    DfBindingBehavior = __decorate([\n        bindingBehavior(\"df\")\n    ], DfBindingBehavior);\n    return DfBindingBehavior;\n}());\n\nvar DfValueConverter = /** @class */ (function () {\n    function DfValueConverter(service) {\n        this.service = service;\n    }\n    DfValueConverter.inject = function () { return [I18N]; };\n    DfValueConverter.prototype.toView = function (value, dfOrOptions, locale) {\n        if (value === null\n            || typeof value === \"undefined\"\n            || (typeof value === \"string\" && value.trim() === \"\")) {\n            return value;\n        }\n        if (typeof value === \"string\" && isNaN(value) && !isInteger(value)) {\n            value = new Date(value);\n        }\n        if (dfOrOptions && (dfOrOptions instanceof Intl.DateTimeFormat && typeof dfOrOptions.format === \"function\")) {\n            return dfOrOptions.format(value);\n        }\n        var df = this.service.df(dfOrOptions, locale || this.service.getLocale());\n        return df.format(value);\n    };\n    DfValueConverter = __decorate([\n        valueConverter$1(\"df\")\n    ], DfValueConverter);\n    return DfValueConverter;\n}());\n\nvar RtBindingBehavior = /** @class */ (function () {\n    function RtBindingBehavior(signalBindingBehavior) {\n        this.signalBindingBehavior = signalBindingBehavior;\n    }\n    RtBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n    RtBindingBehavior.prototype.bind = function (binding, source) {\n        // bind the signal behavior\n        this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\", \"aurelia-relativetime-signal\");\n        // rewrite the expression to use the RtValueConverter.\n        // pass through any args to the binding behavior to the RtValueConverter\n        var sourceExpression = binding.sourceExpression;\n        // do create the sourceExpression only once\n        if (sourceExpression.rewritten) {\n            return;\n        }\n        sourceExpression.rewritten = true;\n        var expression = sourceExpression.expression;\n        sourceExpression.expression = new ValueConverter(expression, \"rt\", sourceExpression.args, [expression].concat(sourceExpression.args));\n    };\n    RtBindingBehavior.prototype.unbind = function (binding, source) {\n        // unbind the signal behavior\n        this.signalBindingBehavior.unbind(binding, source);\n    };\n    RtBindingBehavior = __decorate([\n        bindingBehavior(\"rt\")\n    ], RtBindingBehavior);\n    return RtBindingBehavior;\n}());\n\nvar translations = {\n    ar: {\n        translation: {\n            now: 'الآن',\n            second_ago: 'قبل ثانية واحدة',\n            second_ago_plural: 'قبل __count__ ثانية',\n            second_in: 'خلال ثانية واحدة',\n            second_in_plural: 'خلال __count__ ثانية',\n            minute_ago: 'قبل دقيقة واحدة',\n            minute_ago_plural: 'قبل __count__ دقيقة',\n            minute_in: 'خلال دقيقة واحدة',\n            minute_in_plural: 'خلال __count__ دقيقة',\n            hour_ago: 'قبل ساعة واحدة',\n            hour_ago_plural: 'قبل __count__ ساعة',\n            hour_in: 'خلال ساعة واحدة',\n            hour_in_plural: 'خلال __count__ ساعة',\n            day_ago: 'قبل يوم واحد',\n            day_ago_plural: 'قبل __count__ يومًا',\n            day_in: 'خلال يوم واحد',\n            day_in_plural: 'خلال __count__ يومًا',\n            month_ago: 'قبل شهر واحد',\n            month_ago_plural: 'قبل __count__ شهرًا',\n            month_in: 'خلال شهر واحد',\n            month_in_plural: 'خلال __count__ شهرًا',\n            year_ago: 'قبل سنة واحدة',\n            year_ago_plural: 'قبل __count__ سنة',\n            year_in: 'خلال سنة واحدة',\n            year_in_plural: 'خلال __count__ سنة'\n        }\n    },\n    da: {\n        translation: {\n            now: 'nu',\n            second_ago: 'for __count__ sekund siden',\n            second_ago_plural: 'for __count__ sekunder siden',\n            second_in: 'om __count__ sekund',\n            second_in_plural: 'om __count__ sekunder',\n            minute_ago: 'for __count__ minut siden',\n            minute_ago_plural: 'for __count__ minutter siden',\n            minute_in: 'om __count__ minut',\n            minute_in_plural: 'om __count__ minutter',\n            hour_ago: 'for __count__ time siden',\n            hour_ago_plural: 'for __count__ timer siden',\n            hour_in: 'om __count__ time',\n            hour_in_plural: 'om __count__ timer',\n            day_ago: 'for __count__ dag siden',\n            day_ago_plural: 'for __count__ dage siden',\n            day_in: 'om __count__ dag',\n            day_in_plural: 'om __count__ dage',\n            month_ago: 'for __count__ måned siden',\n            month_ago_plural: 'for __count__ måneder siden',\n            month_in: 'om __count__ måned',\n            month_in_plural: 'om __count__ måneder',\n            year_ago: 'for __count__ år siden',\n            year_ago_plural: 'for __count__ år siden',\n            year_in: 'om __count__ år',\n            year_in_plural: 'om __count__ år'\n        }\n    },\n    de: {\n        translation: {\n            now: 'jetzt',\n            second_ago: 'vor __count__ Sekunde',\n            second_ago_plural: 'vor __count__ Sekunden',\n            second_in: 'in __count__ Sekunde',\n            second_in_plural: 'in __count__ Sekunden',\n            minute_ago: 'vor __count__ Minute',\n            minute_ago_plural: 'vor __count__ Minuten',\n            minute_in: 'in __count__ Minute',\n            minute_in_plural: 'in __count__ Minuten',\n            hour_ago: 'vor __count__ Stunde',\n            hour_ago_plural: 'vor __count__ Stunden',\n            hour_in: 'in __count__ Stunde',\n            hour_in_plural: 'in __count__ Stunden',\n            day_ago: 'vor __count__ Tag',\n            day_ago_plural: 'vor __count__ Tagen',\n            day_in: 'in __count__ Tag',\n            day_in_plural: 'in __count__ Tagen',\n            month_ago: 'vor __count__ Monat',\n            month_ago_plural: 'vor __count__ Monaten',\n            month_in: 'in __count__ Monat',\n            month_in_plural: 'in __count__ Monaten',\n            year_ago: 'vor __count__ Jahr',\n            year_ago_plural: 'vor __count__ Jahren',\n            year_in: 'in __count__ Jahr',\n            year_in_plural: 'in __count__ Jahren'\n        }\n    },\n    en: {\n        translation: {\n            now: 'now',\n            second_ago: '__count__ second ago',\n            second_ago_plural: '__count__ seconds ago',\n            second_in: 'in __count__ second',\n            second_in_plural: 'in __count__ seconds',\n            minute_ago: '__count__ minute ago',\n            minute_ago_plural: '__count__ minutes ago',\n            minute_in: 'in __count__ minute',\n            minute_in_plural: 'in __count__ minutes',\n            hour_ago: '__count__ hour ago',\n            hour_ago_plural: '__count__ hours ago',\n            hour_in: 'in __count__ hour',\n            hour_in_plural: 'in __count__ hours',\n            day_ago: '__count__ day ago',\n            day_ago_plural: '__count__ days ago',\n            day_in: 'in __count__ day',\n            day_in_plural: 'in __count__ days',\n            month_ago: '__count__ month ago',\n            month_ago_plural: '__count__ months ago',\n            month_in: 'in __count__ month',\n            month_in_plural: 'in __count__ months',\n            year_ago: '__count__ year ago',\n            year_ago_plural: '__count__ years ago',\n            year_in: 'in __count__ year',\n            year_in_plural: 'in __count__ years'\n        }\n    },\n    es: {\n        translation: {\n            now: 'ahora',\n            second_ago: 'hace __count__ segundo',\n            second_ago_plural: 'hace __count__ segundos',\n            second_in: 'dentro de __count__ segundo',\n            second_in_plural: 'dentro de __count__ segundos',\n            minute_ago: 'hace __count__ minuto',\n            minute_ago_plural: 'hace __count__ minutos',\n            minute_in: 'dentro de __count__ minuto',\n            minute_in_plural: 'dentro de __count__ minutos',\n            hour_ago: 'hace __count__ hora',\n            hour_ago_plural: 'hace __count__ horas',\n            hour_in: 'dentro de __count__ hora',\n            hour_in_plural: 'dentro de __count__ horas',\n            day_ago: 'hace __count__ día',\n            day_ago_plural: 'hace __count__ días',\n            day_in: 'dentro de __count__ día',\n            day_in_plural: 'dentro de __count__ días',\n            month_ago: 'hace __count__ mes',\n            month_ago_plural: 'hace __count__ meses',\n            month_in: 'dentro de __count__ mes',\n            month_in_plural: 'dentro de __count__ meses',\n            year_ago: 'hace __count__ año',\n            year_ago_plural: 'hace __count__ años',\n            year_in: 'dentro de __count__ año',\n            year_in_plural: 'dentro de __count__ años'\n        }\n    },\n    fi: {\n        translation: {\n            now: 'nyt',\n            second_ago: '__count__ sekunti sitten',\n            second_ago_plural: '__count__ sekuntia sitten',\n            second_in: '__count__ sekunnin päästä',\n            second_in_plural: '__count__ sekunnin päästä',\n            minute_ago: '__count__ minuutti sitten',\n            minute_ago_plural: '__count__ minuuttia sitten',\n            minute_in: '__count__ minuutin päästä',\n            minute_in_plural: '__count__ minuutin päästä',\n            hour_ago: '__count__ tunti sitten',\n            hour_ago_plural: '__count__ tuntia sitten',\n            hour_in: '__count__ tunnin päästä',\n            hour_in_plural: '__count__ tunnin päästä',\n            day_ago: '__count__ päivä sitten',\n            day_ago_plural: '__count__ päivää sitten',\n            day_in: '__count__ päivän päästä',\n            day_in_plural: '__count__ päivän päästä',\n            month_ago: '__count__ kuukausi sitten',\n            month_ago_plural: '__count__ kuukautta sitten',\n            month_in: '__count__ kuukauden päästä',\n            month_in_plural: '__count__ kuukauden päästä',\n            year_ago: '__count__ vuosi sitten',\n            year_ago_plural: '__count__ vuotta sitten',\n            year_in: '__count__ vuoden päästä',\n            year_in_plural: '__count__ vuoden päästä'\n        }\n    },\n    fr: {\n        translation: {\n            now: 'maintenant',\n            second_ago: 'il y a __count__ seconde',\n            second_ago_plural: 'il y a __count__ secondes',\n            second_in: 'dans __count__ seconde',\n            second_in_plural: 'dans __count__ secondes',\n            minute_ago: 'il y a __count__ minute',\n            minute_ago_plural: 'il y a __count__ minutes',\n            minute_in: 'dans __count__ minute',\n            minute_in_plural: 'dans __count__ minutes',\n            hour_ago: 'il y a __count__ heure',\n            hour_ago_plural: 'il y a __count__ heures',\n            hour_in: 'dans __count__ heure',\n            hour_in_plural: 'dans __count__ heures',\n            day_ago: 'il y a __count__ jour',\n            day_ago_plural: 'il y a __count__ jours',\n            day_in: 'dans __count__ jour',\n            day_in_plural: 'dans __count__ jours',\n            month_ago: 'il y a __count__ mois',\n            month_ago_plural: 'il y a __count__ mois',\n            month_in: 'dans __count__ mois',\n            month_in_plural: 'dans __count__ mois',\n            year_ago: 'il y a __count__ an',\n            year_ago_plural: 'il y a __count__ ans',\n            year_in: 'dans __count__ an',\n            year_in_plural: 'dans __count__ ans'\n        }\n    },\n    it: {\n        translation: {\n            now: 'ora',\n            second_ago: '__count__ secondo fa',\n            second_ago_plural: '__count__ secondi fa',\n            second_in: 'tra __count__ secondo',\n            second_in_plural: 'tra __count__ secondi',\n            minute_ago: '__count__ minuto fa',\n            minute_ago_plural: '__count__ minuti fa',\n            minute_in: 'tra __count__ minuto',\n            minute_in_plural: 'tra __count__ minuti',\n            hour_ago: '__count__ ora fa',\n            hour_ago_plural: '__count__ ore fa',\n            hour_in: 'tra __count__ ora',\n            hour_in_plural: 'tra __count__ ore',\n            day_ago: '__count__ giorno fa',\n            day_ago_plural: '__count__ giorni fa',\n            day_in: 'tra __count__ giorno',\n            day_in_plural: 'tra __count__ giorni',\n            month_ago: '__count__ mese fa',\n            month_ago_plural: '__count__ mesi fa',\n            month_in: 'tra __count__ mese',\n            month_in_plural: 'tra __count__ mesi',\n            year_ago: '__count__ anno fa',\n            year_ago_plural: '__count__ anni fa',\n            year_in: 'tra __count__ anno',\n            year_in_plural: 'tra __count__ anni'\n        }\n    },\n    ja: {\n        translation: {\n            now: '今',\n            second_ago: '__count__ 秒前',\n            second_ago_plural: '__count__ 秒前',\n            second_in: '__count__ 秒後',\n            second_in_plural: '__count__ 秒後',\n            minute_ago: '__count__ 分前',\n            minute_ago_plural: '__count__ 分前',\n            minute_in: '__count__ 分後',\n            minute_in_plural: '__count__ 分後',\n            hour_ago: '__count__ 時間前',\n            hour_ago_plural: '__count__ 時間前',\n            hour_in: '__count__ 時間後',\n            hour_in_plural: '__count__ 時間後',\n            day_ago: '__count__ 日前',\n            day_ago_plural: '__count__ 日前',\n            day_in: '__count__ 日後',\n            day_in_plural: '__count__ 日後',\n            month_ago: '__count__ か月前',\n            month_ago_plural: '__count__ か月前',\n            month_in: '__count__ か月後',\n            month_in_plural: '__count__ か月後',\n            year_ago: '__count__ 年前',\n            year_ago_plural: '__count__ 年前',\n            year_in: '__count__ 年後',\n            year_in_plural: '__count__ 年後'\n        }\n    },\n    lt: {\n        translation: {\n            now: 'dabar',\n            second_ago: 'prieš __count__ sekundę',\n            second_ago_plural: 'prieš __count__ sekundes',\n            second_in: 'po __count__ sekundės',\n            second_in_plural: 'po __count__ sekundžių',\n            minute_ago: 'prieš __count__ minutę',\n            minute_ago_plural: 'prieš __count__ minutes',\n            minute_in: 'po __count__ minutės',\n            minute_in_plural: 'po __count__ minučių',\n            hour_ago: 'prieš __count__ valandą',\n            hour_ago_plural: 'prieš __count__ valandas',\n            hour_in: 'po __count__ valandos',\n            hour_in_plural: 'po __count__ valandų',\n            day_ago: 'prieš __count__ dieną',\n            day_ago_plural: 'prieš __count__ dienas',\n            day_in: 'po __count__ dienos',\n            day_in_plural: 'po __count__ dienų',\n            month_ago: 'prieš __count__ mėnesį',\n            month_ago_plural: 'prieš __count__ mėnesius',\n            month_in: 'po __count__ mėnesio',\n            month_in_plural: 'po __count__ mėnesių',\n            year_ago: 'prieš __count__ metus',\n            year_ago_plural: 'prieš __count__ metus',\n            year_in: 'po __count__ metų',\n            year_in_plural: 'po __count__ metų'\n        }\n    },\n    nl: {\n        translation: {\n            now: 'nu',\n            second_ago: '__count__ seconde geleden',\n            second_ago_plural: '__count__ seconden geleden',\n            second_in: 'over __count__ seconde',\n            second_in_plural: 'over __count__ seconden',\n            minute_ago: '__count__ minuut geleden',\n            minute_ago_plural: '__count__ minuten geleden',\n            minute_in: 'over __count__ minuut',\n            minute_in_plural: 'over __count__ minuten',\n            hour_ago: '__count__ uur geleden',\n            hour_ago_plural: '__count__ uur geleden',\n            hour_in: 'over __count__ uur',\n            hour_in_plural: 'over __count__ uur',\n            day_ago: '__count__ dag geleden',\n            day_ago_plural: '__count__ dagen geleden',\n            day_in: 'over __count__ dag',\n            day_in_plural: 'over __count__ dagen',\n            month_ago: '__count__ maand geleden',\n            month_ago_plural: '__count__ maanden geleden',\n            month_in: 'over __count__ maand',\n            month_in_plural: 'over __count__ maanden',\n            year_ago: '__count__ jaar geleden',\n            year_ago_plural: '__count__ jaar geleden',\n            year_in: 'over __count__ jaar',\n            year_in_plural: 'over __count__ jaar'\n        }\n    },\n    nn: {\n        translation: {\n            now: 'no',\n            second_ago: 'for __count__ sekund sidan',\n            second_ago_plural: 'for __count__ sekund sidan',\n            second_in: 'om __count__ sekund',\n            second_in_plural: 'om __count__ sekund',\n            minute_ago: 'for __count__ minutt sidan',\n            minute_ago_plural: 'for __count__ minutt sidan',\n            minute_in: 'om __count__ minutt',\n            minute_in_plural: 'om __count__ minutt',\n            hour_ago: 'for __count__ time sidan',\n            hour_ago_plural: 'for __count__ timar sidan',\n            hour_in: 'om __count__ time',\n            hour_in_plural: 'om __count__ timar',\n            day_ago: 'for __count__ døgn sidan',\n            day_ago_plural: 'for __count__ døgn sidan',\n            day_in: 'om __count__ døgn',\n            day_in_plural: 'om __count__ døgn',\n            month_ago: 'for __count__ månad sidan',\n            month_ago_plural: 'for __count__ månadar sidan',\n            month_in: 'om __count__ månad',\n            month_in_plural: 'om __count__ månadar',\n            year_ago: 'for __count__ år sidan',\n            year_ago_plural: 'for __count__ år sidan',\n            year_in: 'om __count__ år',\n            year_in_plural: 'om __count__ år'\n        }\n    },\n    nb: {\n        translation: {\n            now: 'nå',\n            second_ago: 'for __count__ sekund siden',\n            second_ago_plural: 'for __count__ sekunder siden',\n            second_in: 'om __count__ sekund',\n            second_in_plural: 'om __count__ sekunder',\n            minute_ago: 'for __count__ minutt siden',\n            minute_ago_plural: 'for __count__ minutter siden',\n            minute_in: 'om __count__ minutt',\n            minute_in_plural: 'om __count__ minutter',\n            hour_ago: 'for __count__ time siden',\n            hour_ago_plural: 'for __count__ timer siden',\n            hour_in: 'om __count__ time',\n            hour_in_plural: 'om __count__ timer',\n            day_ago: 'for __count__ døgn siden',\n            day_ago_plural: 'for __count__ døgn siden',\n            day_in: 'om __count__ døgn',\n            day_in_plural: 'om __count__ døgn',\n            month_ago: 'for __count__ måned siden',\n            month_ago_plural: 'for __count__ måneder siden',\n            month_in: 'om __count__ måned',\n            month_in_plural: 'om __count__ måneder',\n            year_ago: 'for __count__ år siden',\n            year_ago_plural: 'for __count__ år siden',\n            year_in: 'om __count__ år',\n            year_in_plural: 'om __count__ år'\n        }\n    },\n    pl: {\n        translation: {\n            now: 'teraz',\n            second_ago: '__count__ sekundę temu',\n            second_ago_plural: '__count__ sekundy temu',\n            second_in: 'za __count__ sekundę',\n            second_in_plural: 'za __count__ sekundy',\n            minute_ago: '__count__ minutę temu',\n            minute_ago_plural: '__count__ minuty temu',\n            minute_in: 'za __count__ minutę',\n            minute_in_plural: 'za __count__ minuty',\n            hour_ago: '__count__ godzinę temu',\n            hour_ago_plural: '__count__ godziny temu',\n            hour_in: 'za __count__ godzinę',\n            hour_in_plural: 'za __count__ godziny',\n            day_ago: '__count__ dzień temu',\n            day_ago_plural: '__count__ dni temu',\n            day_in: 'za __count__ dzień',\n            day_in_plural: 'za __count__ dni',\n            month_ago: '__count__ miesiąc temu',\n            month_ago_plural: '__count__ miesiące temu',\n            month_in: 'za __count__ miesiąc',\n            month_in_plural: 'za __count__ miesiące',\n            year_ago: '__count__ rok temu',\n            year_ago_plural: '__count__ lata temu',\n            year_in: 'za __count__ rok',\n            year_in_plural: 'za __count__ lata'\n        }\n    },\n    pt: {\n        translation: {\n            now: 'agora',\n            second_ago: 'há __count__ segundo',\n            second_ago_plural: 'há __count__ segundos',\n            second_in: 'em __count__ segundo',\n            second_in_plural: 'em __count__ segundos',\n            minute_ago: 'há __count__ minuto',\n            minute_ago_plural: 'há __count__ minutos',\n            minute_in: 'em __count__ minuto',\n            minute_in_plural: 'em __count__ minutos',\n            hour_ago: 'há __count__ hora',\n            hour_ago_plural: 'há __count__ horas',\n            hour_in: 'em __count__ hora',\n            hour_in_plural: 'em __count__ horas',\n            day_ago: 'há __count__ dia',\n            day_ago_plural: 'há __count__ dias',\n            day_in: 'em __count__ dia',\n            day_in_plural: 'em __count__ dias',\n            month_ago: 'há __count__ mês',\n            month_ago_plural: 'há __count__ meses',\n            month_in: 'em __count__ mês',\n            month_in_plural: 'em __count__ meses',\n            year_ago: 'há __count__ ano',\n            year_ago_plural: 'há __count__ anos',\n            year_in: 'em __count__ ano',\n            year_in_plural: 'em __count__ anos'\n        }\n    },\n    sv: {\n        translation: {\n            now: 'nu',\n            second_ago: 'för __count__ sekund sedan',\n            second_ago_plural: 'för __count__ sekunder sedan',\n            second_in: 'om __count__ sekund',\n            second_in_plural: 'om __count__ sekunder',\n            minute_ago: 'för __count__ minut sedan',\n            minute_ago_plural: 'för __count__ minuter sedan',\n            minute_in: 'om __count__ minut',\n            minute_in_plural: 'om __count__ minuter',\n            hour_ago: 'för __count__ timme sedan',\n            hour_ago_plural: 'för __count__ timmar sedan',\n            hour_in: 'om __count__ timme',\n            hour_in_plural: 'om __count__ timmar',\n            day_ago: 'för __count__ dag sedan',\n            day_ago_plural: 'för __count__ dagar sedan',\n            day_in: 'om __count__ dag',\n            day_in_plural: 'om __count__ dagar',\n            month_ago: 'för __count__ månad sedan',\n            month_ago_plural: 'för __count__ månader sedan',\n            month_in: 'om __count__ månad',\n            month_in_plural: 'om __count__ månader',\n            year_ago: 'för __count__ år sedan',\n            year_ago_plural: 'för __count__ år sedan',\n            year_in: 'om __count__ år',\n            year_in_plural: 'om __count__ år'\n        }\n    },\n    th: {\n        translation: {\n            now: 'ขณะนี้',\n            second_ago: '__count__ วินาทีที่ผ่านมา',\n            second_ago_plural: '__count__ วินาทีที่ผ่านมา',\n            second_in: 'ในอีก __count__ วินาที',\n            second_in_plural: 'ในอีก __count__ วินาที',\n            minute_ago: '__count__ นาทีที่ผ่านมา',\n            minute_ago_plural: '__count__ นาทีที่ผ่านมา',\n            minute_in: 'ในอีก __count__ นาที',\n            minute_in_plural: 'ในอีก __count__ นาที',\n            hour_ago: '__count__ ชั่วโมงที่ผ่านมา',\n            hour_ago_plural: '__count__ ชั่วโมงที่ผ่านมา',\n            hour_in: 'ในอีก __count__ ชั่วโมง',\n            hour_in_plural: 'ในอีก __count__ ชั่วโมง',\n            day_ago: '__count__ วันที่ผ่านมา',\n            day_ago_plural: '__count__ วันที่ผ่านมา',\n            day_in: 'ในอีก __count__ วัน',\n            day_in_plural: 'ในอีก __count__ วัน',\n            month_ago: '__count__ เดือนที่ผ่านมา',\n            month_ago_plural: '__count__ เดือนที่ผ่านมา',\n            month_in: 'ในอีก __count__ เดือน',\n            month_in_plural: 'ในอีก __count__ เดือน',\n            year_ago: '__count__ ปีที่แล้ว',\n            year_ago_plural: '__count__ ปีที่แล้ว',\n            year_in: 'ในอีก __count__ ปี',\n            year_in_plural: 'ในอีก __count__ ปี'\n        }\n    },\n    zh: {\n        translation: {\n            now: '现在',\n            second_ago: '__count__秒钟前',\n            second_ago_plural: '__count__秒钟前',\n            second_in: '__count__秒钟后',\n            second_in_plural: '__count__秒钟后',\n            minute_ago: '__count__分钟前',\n            minute_ago_plural: '__count__分钟前',\n            minute_in: '__count__分钟后',\n            minute_in_plural: '__count__分钟后',\n            hour_ago: '__count__小时前',\n            hour_ago_plural: '__count__小时前',\n            hour_in: '__count__小时后',\n            hour_in_plural: '__count__小时后',\n            day_ago: '__count__天前',\n            day_ago_plural: '__count__天前',\n            day_in: '__count__天后',\n            day_in_plural: '__count__天后',\n            month_ago: '__count__个月前',\n            month_ago_plural: '__count__个月前',\n            month_in: '__count__个月后',\n            month_in_plural: '__count__个月后',\n            year_ago: '__count__年前',\n            year_ago_plural: '__count__年前',\n            year_in: '__count__年后',\n            year_in_plural: '__count__年后'\n        }\n    },\n    'zh-HK': {\n        translation: {\n            now: '現在',\n            second_ago: '__count__ 秒前',\n            second_ago_plural: '__count__ 秒前',\n            second_in: '__count__ 秒後',\n            second_in_plural: '__count__ 秒後',\n            minute_ago: '__count__ 分鐘前',\n            minute_ago_plural: '__count__ 分鐘前',\n            minute_in: '__count__ 分鐘後',\n            minute_in_plural: '__count__ 分鐘後',\n            hour_ago: '__count__ 小時前',\n            hour_ago_plural: '__count__ 小時前',\n            hour_in: '__count__ 小時後',\n            hour_in_plural: '__count__ 小時後',\n            day_ago: '__count__ 日前',\n            day_ago_plural: '__count__ 日前',\n            day_in: '__count__ 日後',\n            day_in_plural: '__count__ 日後',\n            month_ago: '__count__ 個月前',\n            month_ago_plural: '__count__ 個月前',\n            month_in: '__count__ 個月後',\n            month_in_plural: '__count__ 個月後',\n            year_ago: '__count__ 年前',\n            year_ago_plural: '__count__ 年前',\n            year_in: '__count__ 年後',\n            year_in_plural: '__count__ 年後'\n        },\n    },\n    'zh-TW': {\n        translation: {\n            now: '剛才',\n            second_ago: '__count__ 秒鐘前',\n            second_ago_plural: '__count__ 秒鐘前',\n            second_in: '__count__ 秒內',\n            second_in_plural: '__count__ 秒內',\n            minute_ago: '__count__ 分鐘前',\n            minute_ago_plural: '__count__ 分鐘前',\n            minute_in: '__count__ 分鐘內',\n            minute_in_plural: '__count__ 分鐘內',\n            hour_ago: '__count__ 小時前',\n            hour_ago_plural: '__count__ 小時前',\n            hour_in: '__count__ 小時內',\n            hour_in_plural: '__count__ 小時內',\n            day_ago: '__count__ 天前',\n            day_ago_plural: '__count__ 天前',\n            day_in: '__count__ 天內',\n            day_in_plural: '__count__ 天內',\n            month_ago: '__count__ 月前',\n            month_ago_plural: '__count__ 月前',\n            month_in: '__count__ 月內',\n            month_in_plural: '__count__ 月內',\n            year_ago: '__count__ 年前',\n            year_ago_plural: '__count__ 年前',\n            year_in: '__count__ 年內',\n            year_in_plural: '__count__ 年內'\n        }\n    }\n};\n// tslint:enable\n\nvar RelativeTime = /** @class */ (function () {\n    function RelativeTime(service, ea) {\n        var _this = this;\n        this.service = service;\n        this.ea = ea;\n        this.service.i18nextReady().then(function () {\n            _this.setup();\n        });\n        this.ea.subscribe(I18N_EA_SIGNAL, function (locales) {\n            _this.setup(locales);\n        });\n    }\n    RelativeTime.inject = function () { return [I18N, EventAggregator]; };\n    RelativeTime.prototype.setup = function (locales) {\n        var trans = translations;\n        var fallbackLng = this.service.i18next.fallbackLng;\n        var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;\n        if (Array.isArray(alternateFb) && alternateFb.length > 0) {\n            alternateFb = alternateFb[0];\n        }\n        var key = ((locales && locales.newValue)\n            ? locales.newValue\n            : this.service.getLocale()) || alternateFb;\n        var index = 0;\n        // tslint:disable-next-line:no-conditional-assignment\n        if ((index = key.indexOf(\"-\")) >= 0) {\n            var baseLocale = key.substring(0, index);\n            if (trans[baseLocale]) {\n                this.addTranslationResource(baseLocale, trans[baseLocale].translation);\n            }\n        }\n        if (trans[key]) {\n            this.addTranslationResource(key, trans[key].translation);\n        }\n        if (trans[fallbackLng]) {\n            this.addTranslationResource(key, trans[fallbackLng].translation);\n        }\n    };\n    RelativeTime.prototype.addTranslationResource = function (key, translation) {\n        var options = this.service.i18next.options;\n        if (options.interpolation && (options.interpolation.prefix !== \"__\" || options.interpolation.suffix !== \"__\")) {\n            // tslint:disable-next-line:forin\n            for (var subkey in translation) {\n                translation[subkey] = translation[subkey]\n                    .replace(\"__count__\", (options.interpolation.prefix || \"{{\") + \"count\" + (options.interpolation.suffix || \"}}\"));\n            }\n        }\n        this.service.i18next.addResources(key, options.defaultNS || \"translation\", translation);\n    };\n    RelativeTime.prototype.getRelativeTime = function (time) {\n        var now = new Date();\n        var diff = now.getTime() - time.getTime();\n        var timeDiff = this.getTimeDiffDescription(diff, \"year\", 31104000000);\n        if (!timeDiff) {\n            timeDiff = this.getTimeDiffDescription(diff, \"month\", 2592000000);\n            if (!timeDiff) {\n                timeDiff = this.getTimeDiffDescription(diff, \"day\", 86400000);\n                if (!timeDiff) {\n                    timeDiff = this.getTimeDiffDescription(diff, \"hour\", 3600000);\n                    if (!timeDiff) {\n                        timeDiff = this.getTimeDiffDescription(diff, \"minute\", 60000);\n                        if (!timeDiff) {\n                            timeDiff = this.getTimeDiffDescription(diff, \"second\", 1000);\n                            if (!timeDiff) {\n                                timeDiff = this.service.tr(\"now\");\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        return timeDiff;\n    };\n    RelativeTime.prototype.getTimeDiffDescription = function (diff, unit, timeDivisor) {\n        var unitAmount = parseInt((diff / timeDivisor).toFixed(0), 10);\n        if (unitAmount > 0) {\n            return this.service.tr(unit, { count: unitAmount, context: \"ago\" });\n        }\n        else if (unitAmount < 0) {\n            var abs = Math.abs(unitAmount);\n            return this.service.tr(unit, { count: abs, context: \"in\" });\n        }\n        return null;\n    };\n    return RelativeTime;\n}());\n\nvar RtValueConverter = /** @class */ (function () {\n    function RtValueConverter(service) {\n        this.service = service;\n    }\n    RtValueConverter.inject = function () { return [RelativeTime]; };\n    RtValueConverter.prototype.toView = function (value) {\n        if (value === null\n            || typeof value === \"undefined\"\n            || (typeof value === \"string\" && value.trim() === \"\")) {\n            return value;\n        }\n        if (typeof value === \"string\" && isNaN(value) && !Number.isInteger(value)) {\n            value = new Date(value);\n        }\n        return this.service.getRelativeTime(value);\n    };\n    RtValueConverter = __decorate([\n        valueConverter$1(\"rt\")\n    ], RtValueConverter);\n    return RtValueConverter;\n}());\n\nvar Backend = /** @class */ (function () {\n    function Backend(services, options) {\n        if (options === void 0) { options = {}; }\n        this.services = services;\n        this.options = options;\n        this.type = \"backend\";\n        this.init(services, options);\n    }\n    Backend.with = function (loader) {\n        this.loader = loader;\n        return this;\n    };\n    Backend.prototype.init = function (services, options) {\n        if (options === void 0) { options = {}; }\n        this.services = services;\n        this.options = Object.assign({}, {\n            loadPath: \"/locales/{{lng}}/{{ns}}.json\",\n            addPath: \"locales/add/{{lng}}/{{ns}}\",\n            allowMultiLoading: false,\n            parse: JSON.parse\n        }, options);\n    };\n    Backend.prototype.readMulti = function (languages, namespaces, callback) {\n        var loadPath = this.options.loadPath;\n        if (typeof this.options.loadPath === \"function\") {\n            loadPath = this.options.loadPath(languages, namespaces);\n        }\n        var url = this.services\n            .interpolator\n            .interpolate(loadPath, { lng: languages.join(\"+\"), ns: namespaces.join(\"+\") });\n        this.loadUrl(url, callback);\n    };\n    Backend.prototype.read = function (language, namespace, callback) {\n        var loadPath = this.options.loadPath;\n        if (typeof this.options.loadPath === \"function\") {\n            loadPath = this.options.loadPath([language], [namespace]);\n        }\n        var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });\n        this.loadUrl(url, callback);\n    };\n    Backend.prototype.loadUrl = function (url, callback) {\n        return __awaiter(this, void 0, void 0, function () {\n            var response, ret, err, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        _b.trys.push([0, 2, , 3]);\n                        return [4 /*yield*/, Backend.loader.loadText(url)];\n                    case 1:\n                        response = _b.sent();\n                        ret = void 0;\n                        err = void 0;\n                        try {\n                            ret = (response instanceof Object) ? response : this.options.parse(response, url);\n                        }\n                        catch (e) {\n                            err = \"failed parsing \" + url + \" to json\";\n                        }\n                        if (err) {\n                            return [2 /*return*/, callback(err, false)];\n                        }\n                        callback(null, ret);\n                        return [3 /*break*/, 3];\n                    case 2:\n                        _a = _b.sent();\n                        callback(\"failed loading \" + url, false /* no retry */);\n                        return [3 /*break*/, 3];\n                    case 3: return [2 /*return*/];\n                }\n            });\n        });\n    };\n    // tslint:disable-next-line:variable-name\n    Backend.prototype.create = function (_languages, _namespace, _key, _fallbackValue) {\n        // not supported\n    };\n    Backend.type = \"backend\";\n    return Backend;\n}());\n\nfunction configure(frameworkConfig, cb) {\n    if (typeof cb !== \"function\") {\n        var errorMsg = \"You need to provide a callback method to properly configure the library\";\n        throw errorMsg;\n    }\n    var instance = frameworkConfig.container.get(I18N);\n    var ret = cb(instance);\n    frameworkConfig.globalResources([\n        TValueConverter,\n        TBindingBehavior,\n        TCustomAttribute,\n        TParamsCustomAttribute,\n        NfValueConverter,\n        NfBindingBehavior,\n        DfValueConverter,\n        DfBindingBehavior,\n        RtValueConverter,\n        RtBindingBehavior\n    ]);\n    frameworkConfig.postTask(function () {\n        var resources = frameworkConfig.container.get(ViewResources);\n        var htmlBehaviorResource = resources.getAttribute(\"t\");\n        var htmlParamsResource = resources.getAttribute(\"t-params\");\n        var attributes = instance.i18next.options.attributes;\n        // Register default attributes if none provided\n        if (!attributes) {\n            attributes = [\"t\", \"i18n\"];\n        }\n        attributes.forEach(function (alias) { return resources.registerAttribute(alias, htmlBehaviorResource, \"t\"); });\n        attributes.forEach(function (alias) { return resources.registerAttribute(alias + \"-params\", htmlParamsResource, \"t-params\"); });\n    });\n    return ret;\n}\n\nexport { configure, DfValueConverter, DfBindingBehavior, NfValueConverter, NfBindingBehavior, RtValueConverter, RtBindingBehavior, TValueConverter, TBindingBehavior, TCustomAttribute, TParamsCustomAttribute, I18N_EA_SIGNAL, I18N, RelativeTime, Backend };\n","\n\nfunction mi(name) {\n  throw new Error('History must implement ' + name + '().');\n}\n\nexport var History = function () {\n  function History() {\n    \n  }\n\n  History.prototype.activate = function activate(options) {\n    mi('activate');\n  };\n\n  History.prototype.deactivate = function deactivate() {\n    mi('deactivate');\n  };\n\n  History.prototype.getAbsoluteRoot = function getAbsoluteRoot() {\n    mi('getAbsoluteRoot');\n  };\n\n  History.prototype.navigate = function navigate(fragment, options) {\n    mi('navigate');\n  };\n\n  History.prototype.navigateBack = function navigateBack() {\n    mi('navigateBack');\n  };\n\n  History.prototype.setTitle = function setTitle(title) {\n    mi('setTitle');\n  };\n\n  History.prototype.setState = function setState(key, value) {\n    mi('setState');\n  };\n\n  History.prototype.getState = function getState(key) {\n    mi('getState');\n  };\n\n  History.prototype.getHistoryIndex = function getHistoryIndex() {\n    mi('getHistoryIndex');\n  };\n\n  History.prototype.go = function go(movement) {\n    mi('go');\n  };\n\n  return History;\n}();","import { PLATFORM, DOM } from 'aurelia-pal';\n\nfunction json(body, replacer) {\r\n    return JSON.stringify((body !== undefined ? body : {}), replacer);\r\n}\n\nvar retryStrategy = {\r\n    fixed: 0,\r\n    incremental: 1,\r\n    exponential: 2,\r\n    random: 3\r\n};\r\nvar defaultRetryConfig = {\r\n    maxRetries: 3,\r\n    interval: 1000,\r\n    strategy: retryStrategy.fixed\r\n};\r\nvar RetryInterceptor = (function () {\r\n    function RetryInterceptor(retryConfig) {\r\n        this.retryConfig = Object.assign({}, defaultRetryConfig, retryConfig || {});\r\n        if (this.retryConfig.strategy === retryStrategy.exponential &&\r\n            this.retryConfig.interval <= 1000) {\r\n            throw new Error('An interval less than or equal to 1 second is not allowed when using the exponential retry strategy');\r\n        }\r\n    }\r\n    RetryInterceptor.prototype.request = function (request) {\r\n        var $r = request;\r\n        if (!$r.retryConfig) {\r\n            $r.retryConfig = Object.assign({}, this.retryConfig);\r\n            $r.retryConfig.counter = 0;\r\n        }\r\n        $r.retryConfig.requestClone = request.clone();\r\n        return request;\r\n    };\r\n    RetryInterceptor.prototype.response = function (response, request) {\r\n        delete request.retryConfig;\r\n        return response;\r\n    };\r\n    RetryInterceptor.prototype.responseError = function (error, request, httpClient) {\r\n        var retryConfig = request.retryConfig;\r\n        var requestClone = retryConfig.requestClone;\r\n        return Promise.resolve().then(function () {\r\n            if (retryConfig.counter < retryConfig.maxRetries) {\r\n                var result = retryConfig.doRetry ? retryConfig.doRetry(error, request) : true;\r\n                return Promise.resolve(result).then(function (doRetry) {\r\n                    if (doRetry) {\r\n                        retryConfig.counter++;\r\n                        return new Promise(function (resolve) { return PLATFORM.global.setTimeout(resolve, calculateDelay(retryConfig) || 0); })\r\n                            .then(function () {\r\n                            var newRequest = requestClone.clone();\r\n                            if (typeof (retryConfig.beforeRetry) === 'function') {\r\n                                return retryConfig.beforeRetry(newRequest, httpClient);\r\n                            }\r\n                            return newRequest;\r\n                        })\r\n                            .then(function (newRequest) {\r\n                            return httpClient.fetch(Object.assign(newRequest, { retryConfig: retryConfig }));\r\n                        });\r\n                    }\r\n                    delete request.retryConfig;\r\n                    throw error;\r\n                });\r\n            }\r\n            delete request.retryConfig;\r\n            throw error;\r\n        });\r\n    };\r\n    return RetryInterceptor;\r\n}());\r\nfunction calculateDelay(retryConfig) {\r\n    var interval = retryConfig.interval, strategy = retryConfig.strategy, minRandomInterval = retryConfig.minRandomInterval, maxRandomInterval = retryConfig.maxRandomInterval, counter = retryConfig.counter;\r\n    if (typeof (strategy) === 'function') {\r\n        return retryConfig.strategy(counter);\r\n    }\r\n    switch (strategy) {\r\n        case (retryStrategy.fixed):\r\n            return retryStrategies[retryStrategy.fixed](interval);\r\n        case (retryStrategy.incremental):\r\n            return retryStrategies[retryStrategy.incremental](counter, interval);\r\n        case (retryStrategy.exponential):\r\n            return retryStrategies[retryStrategy.exponential](counter, interval);\r\n        case (retryStrategy.random):\r\n            return retryStrategies[retryStrategy.random](counter, interval, minRandomInterval, maxRandomInterval);\r\n        default:\r\n            throw new Error('Unrecognized retry strategy');\r\n    }\r\n}\r\nvar retryStrategies = [\r\n    function (interval) { return interval; },\r\n    function (retryCount, interval) { return interval * retryCount; },\r\n    function (retryCount, interval) { return retryCount === 1 ? interval : Math.pow(interval, retryCount) / 1000; },\r\n    function (retryCount, interval, minRandomInterval, maxRandomInterval) {\r\n        if (minRandomInterval === void 0) { minRandomInterval = 0; }\r\n        if (maxRandomInterval === void 0) { maxRandomInterval = 60000; }\r\n        return Math.random() * (maxRandomInterval - minRandomInterval) + minRandomInterval;\r\n    }\r\n];\n\nvar HttpClientConfiguration = (function () {\r\n    function HttpClientConfiguration() {\r\n        this.baseUrl = '';\r\n        this.defaults = {};\r\n        this.interceptors = [];\r\n    }\r\n    HttpClientConfiguration.prototype.withBaseUrl = function (baseUrl) {\r\n        this.baseUrl = baseUrl;\r\n        return this;\r\n    };\r\n    HttpClientConfiguration.prototype.withDefaults = function (defaults) {\r\n        this.defaults = defaults;\r\n        return this;\r\n    };\r\n    HttpClientConfiguration.prototype.withInterceptor = function (interceptor) {\r\n        this.interceptors.push(interceptor);\r\n        return this;\r\n    };\r\n    HttpClientConfiguration.prototype.useStandardConfiguration = function () {\r\n        var standardConfig = { credentials: 'same-origin' };\r\n        Object.assign(this.defaults, standardConfig, this.defaults);\r\n        return this.rejectErrorResponses();\r\n    };\r\n    HttpClientConfiguration.prototype.rejectErrorResponses = function () {\r\n        return this.withInterceptor({ response: rejectOnError });\r\n    };\r\n    HttpClientConfiguration.prototype.withRetry = function (config) {\r\n        var interceptor = new RetryInterceptor(config);\r\n        return this.withInterceptor(interceptor);\r\n    };\r\n    return HttpClientConfiguration;\r\n}());\r\nfunction rejectOnError(response) {\r\n    if (!response.ok) {\r\n        throw response;\r\n    }\r\n    return response;\r\n}\n\nvar HttpClient = (function () {\r\n    function HttpClient() {\r\n        this.activeRequestCount = 0;\r\n        this.isRequesting = false;\r\n        this.isConfigured = false;\r\n        this.baseUrl = '';\r\n        this.defaults = null;\r\n        this.interceptors = [];\r\n        if (typeof fetch === 'undefined') {\r\n            throw new Error('HttpClient requires a Fetch API implementation, but the current environment doesn\\'t support it. You may need to load a polyfill such as https://github.com/github/fetch');\r\n        }\r\n    }\r\n    HttpClient.prototype.configure = function (config) {\r\n        var normalizedConfig;\r\n        if (typeof config === 'object') {\r\n            normalizedConfig = { defaults: config };\r\n        }\r\n        else if (typeof config === 'function') {\r\n            normalizedConfig = new HttpClientConfiguration();\r\n            normalizedConfig.baseUrl = this.baseUrl;\r\n            normalizedConfig.defaults = Object.assign({}, this.defaults);\r\n            normalizedConfig.interceptors = this.interceptors;\r\n            var c = config(normalizedConfig);\r\n            if (HttpClientConfiguration.prototype.isPrototypeOf(c)) {\r\n                normalizedConfig = c;\r\n            }\r\n        }\r\n        else {\r\n            throw new Error('invalid config');\r\n        }\r\n        var defaults = normalizedConfig.defaults;\r\n        if (defaults && Headers.prototype.isPrototypeOf(defaults.headers)) {\r\n            throw new Error('Default headers must be a plain object.');\r\n        }\r\n        var interceptors = normalizedConfig.interceptors;\r\n        if (interceptors && interceptors.length) {\r\n            if (interceptors.filter(function (x) { return RetryInterceptor.prototype.isPrototypeOf(x); }).length > 1) {\r\n                throw new Error('Only one RetryInterceptor is allowed.');\r\n            }\r\n            var retryInterceptorIndex = interceptors.findIndex(function (x) { return RetryInterceptor.prototype.isPrototypeOf(x); });\r\n            if (retryInterceptorIndex >= 0 && retryInterceptorIndex !== interceptors.length - 1) {\r\n                throw new Error('The retry interceptor must be the last interceptor defined.');\r\n            }\r\n        }\r\n        this.baseUrl = normalizedConfig.baseUrl;\r\n        this.defaults = defaults;\r\n        this.interceptors = normalizedConfig.interceptors || [];\r\n        this.isConfigured = true;\r\n        return this;\r\n    };\r\n    HttpClient.prototype.fetch = function (input, init) {\r\n        var _this = this;\r\n        trackRequestStart(this);\r\n        var request = this.buildRequest(input, init);\r\n        return processRequest(request, this.interceptors, this).then(function (result) {\r\n            var response = null;\r\n            if (Response.prototype.isPrototypeOf(result)) {\r\n                response = Promise.resolve(result);\r\n            }\r\n            else if (Request.prototype.isPrototypeOf(result)) {\r\n                request = result;\r\n                response = fetch(result);\r\n            }\r\n            else {\r\n                throw new Error(\"An invalid result was returned by the interceptor chain. Expected a Request or Response instance, but got [\" + result + \"]\");\r\n            }\r\n            return processResponse(response, _this.interceptors, request, _this);\r\n        })\r\n            .then(function (result) {\r\n            if (Request.prototype.isPrototypeOf(result)) {\r\n                return _this.fetch(result);\r\n            }\r\n            return result;\r\n        })\r\n            .then(function (result) {\r\n            trackRequestEnd(_this);\r\n            return result;\r\n        }, function (error) {\r\n            trackRequestEnd(_this);\r\n            throw error;\r\n        });\r\n    };\r\n    HttpClient.prototype.buildRequest = function (input, init) {\r\n        var defaults = this.defaults || {};\r\n        var request;\r\n        var body;\r\n        var requestContentType;\r\n        var parsedDefaultHeaders = parseHeaderValues(defaults.headers);\r\n        if (Request.prototype.isPrototypeOf(input)) {\r\n            request = input;\r\n            requestContentType = new Headers(request.headers).get('Content-Type');\r\n        }\r\n        else {\r\n            if (!init) {\r\n                init = {};\r\n            }\r\n            body = init.body;\r\n            var bodyObj = body ? { body: body } : null;\r\n            var requestInit = Object.assign({}, defaults, { headers: {} }, init, bodyObj);\r\n            requestContentType = new Headers(requestInit.headers).get('Content-Type');\r\n            request = new Request(getRequestUrl(this.baseUrl, input), requestInit);\r\n        }\r\n        if (!requestContentType) {\r\n            if (new Headers(parsedDefaultHeaders).has('content-type')) {\r\n                request.headers.set('Content-Type', new Headers(parsedDefaultHeaders).get('content-type'));\r\n            }\r\n            else if (body && isJSON(body)) {\r\n                request.headers.set('Content-Type', 'application/json');\r\n            }\r\n        }\r\n        setDefaultHeaders(request.headers, parsedDefaultHeaders);\r\n        if (body && Blob.prototype.isPrototypeOf(body) && body.type) {\r\n            request.headers.set('Content-Type', body.type);\r\n        }\r\n        return request;\r\n    };\r\n    HttpClient.prototype.get = function (input, init) {\r\n        return this.fetch(input, init);\r\n    };\r\n    HttpClient.prototype.post = function (input, body, init) {\r\n        return callFetch(this, input, body, init, 'POST');\r\n    };\r\n    HttpClient.prototype.put = function (input, body, init) {\r\n        return callFetch(this, input, body, init, 'PUT');\r\n    };\r\n    HttpClient.prototype.patch = function (input, body, init) {\r\n        return callFetch(this, input, body, init, 'PATCH');\r\n    };\r\n    HttpClient.prototype.delete = function (input, body, init) {\r\n        return callFetch(this, input, body, init, 'DELETE');\r\n    };\r\n    return HttpClient;\r\n}());\r\nvar absoluteUrlRegexp = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction trackRequestStart(client) {\r\n    client.isRequesting = !!(++client.activeRequestCount);\r\n    if (client.isRequesting) {\r\n        var evt_1 = DOM.createCustomEvent('aurelia-fetch-client-request-started', { bubbles: true, cancelable: true });\r\n        setTimeout(function () { return DOM.dispatchEvent(evt_1); }, 1);\r\n    }\r\n}\r\nfunction trackRequestEnd(client) {\r\n    client.isRequesting = !!(--client.activeRequestCount);\r\n    if (!client.isRequesting) {\r\n        var evt_2 = DOM.createCustomEvent('aurelia-fetch-client-requests-drained', { bubbles: true, cancelable: true });\r\n        setTimeout(function () { return DOM.dispatchEvent(evt_2); }, 1);\r\n    }\r\n}\r\nfunction parseHeaderValues(headers) {\r\n    var parsedHeaders = {};\r\n    for (var name_1 in headers || {}) {\r\n        if (headers.hasOwnProperty(name_1)) {\r\n            parsedHeaders[name_1] = (typeof headers[name_1] === 'function') ? headers[name_1]() : headers[name_1];\r\n        }\r\n    }\r\n    return parsedHeaders;\r\n}\r\nfunction getRequestUrl(baseUrl, url) {\r\n    if (absoluteUrlRegexp.test(url)) {\r\n        return url;\r\n    }\r\n    return (baseUrl || '') + url;\r\n}\r\nfunction setDefaultHeaders(headers, defaultHeaders) {\r\n    for (var name_2 in defaultHeaders || {}) {\r\n        if (defaultHeaders.hasOwnProperty(name_2) && !headers.has(name_2)) {\r\n            headers.set(name_2, defaultHeaders[name_2]);\r\n        }\r\n    }\r\n}\r\nfunction processRequest(request, interceptors, http) {\r\n    return applyInterceptors(request, interceptors, 'request', 'requestError', http);\r\n}\r\nfunction processResponse(response, interceptors, request, http) {\r\n    return applyInterceptors(response, interceptors, 'response', 'responseError', request, http);\r\n}\r\nfunction applyInterceptors(input, interceptors, successName, errorName) {\r\n    var interceptorArgs = [];\r\n    for (var _i = 4; _i < arguments.length; _i++) {\r\n        interceptorArgs[_i - 4] = arguments[_i];\r\n    }\r\n    return (interceptors || [])\r\n        .reduce(function (chain, interceptor) {\r\n        var successHandler = interceptor[successName];\r\n        var errorHandler = interceptor[errorName];\r\n        return chain.then(successHandler && (function (value) { return successHandler.call.apply(successHandler, [interceptor, value].concat(interceptorArgs)); }) || identity, errorHandler && (function (reason) { return errorHandler.call.apply(errorHandler, [interceptor, reason].concat(interceptorArgs)); }) || thrower);\r\n    }, Promise.resolve(input));\r\n}\r\nfunction isJSON(str) {\r\n    try {\r\n        JSON.parse(str);\r\n    }\r\n    catch (err) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\nfunction identity(x) {\r\n    return x;\r\n}\r\nfunction thrower(x) {\r\n    throw x;\r\n}\r\nfunction callFetch(client, input, body, init, method) {\r\n    if (!init) {\r\n        init = {};\r\n    }\r\n    init.method = method;\r\n    if (body) {\r\n        init.body = body;\r\n    }\r\n    return client.fetch(input, init);\r\n}\n\nexport { json, retryStrategy, RetryInterceptor, HttpClientConfiguration, HttpClient };\n"],"sourceRoot":""}