{"version":3,"sources":["webpack:///./node_modules/aurelia-templating-router/dist/native-modules/route-loader.js","webpack:///./node_modules/aurelia-templating-router/dist/native-modules/aurelia-templating-router.js","webpack:///./node_modules/aurelia-templating/dist/native-modules/aurelia-templating.js","webpack:///./node_modules/aurelia-templating-router/dist/native-modules/router-view.js","webpack:///./node_modules/aurelia-templating-router/dist/native-modules/route-href.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA,iDAAiD,aAAa,uFAAuF,EAAE,uFAAuF;;AAE9O,0CAA0C,+DAA+D,qGAAqG,EAAE,yEAAyE,eAAe,yEAAyE,EAAE,EAAE,uHAAuH;;;;AAItb;AACqC;AACtC;AACP;AACJ;AACQ;;AAElD,yBAAyB,6DAAU;;AAEnC,CAAC;;AAEM,qCAAqC,2EAAM,CAAC,oEAAiB;AACpE;;AAEA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,kBAAkB,mEAAc,kBAAkB,uDAAM;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC,8DAAiB;;AAEtD;AACA;;AAEA,qCAAqC,qDAAM;AAC3C;AACA,OAAO;;AAEP,gCAAgC,qDAAM;AACtC;;AAEA;AACA;;AAEA;AACA,CAAC,CAAC,0DAAW;;AAEb;AACA;;AAEA;;AAEA,8BAA8B,wEAAa,gBAAgB,kEAAO;AAClE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;;AAGH;AACA,C;;;;;;;;;;;;ACvFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgE;AACT;AACZ;AACF;;AAEzC;AACA,mBAAmB,0DAAW,EAAE,mEAAqB,YAAY,qDAAM,EAAE,wDAAS,kBAAkB,uDAAU,EAAE,qDAAS;;AAEzH,iCAAiC,qDAAM,EAAE,wDAAS;AAClD;;;;;;;;;;;;;;ACTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAgC,2CAA2C,gBAAgB,kBAAkB,OAAO,2BAA2B,wDAAwD,gCAAgC,uDAAuD,2DAA2D,EAAE,EAAE,yDAAyD,qEAAqE,6DAA6D,oBAAoB,GAAG,EAAE;;AAEjjB,oGAAoG,mBAAmB,EAAE,mBAAmB,8HAA8H;;AAE1Q;;;;AAI8C;AACgB;AACT;AACU;AACjB;AACoK;AACvI;AAC5B;;AAExC;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;AACA,IAAI,yDAAQ,QAAQ,yDAAQ;AAC5B;;AAEA;AACA;;AAEO;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,+CAAG,+BAA+B,2DAA2D;AAC7G;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;AACA;;;;AAIA;AACA;AACA;AACA;;AAEA;;AAEO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEO,mBAAmB,yDAAQ;AAClC;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA,8BAA8B,oDAAQ;AACtC;AACA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B,mEAAc;AACxC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B,mEAAc;AACxC;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,oEAAqB;;AAElD;AACA;;AAEA;AACA,+CAA+C,QAAQ;AACvD;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,oEAAqB;AAClD,qBAAqB,+CAAG;;AAExB;AACA,+CAA+C,QAAQ;AACvD;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA,wDAAwD,+CAAG;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,uJAAuJ;AACvJ;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA,CAAC;;AAEM;AACP;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,uDAAM;;AAE1B;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM,yDAAQ;AACd;AACA;;AAEA,iBAAiB,uDAAM;AACvB,mBAAmB,yDAAQ;;AAE3B;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEO;AACP;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEO;AACP;AACA,YAAY,+CAAG;AACf;;AAEA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;;AAEA,8CAA8C,QAAQ;AACtD;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,OAAO;;AAEP;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,QAAQ;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,+CAAG;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAEM;AACP;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,qBAAqB,QAAQ;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,QAAQ;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa;AACb,OAAO;AACP;AACA;AACA,eAAe;AACf,SAAS;AACT;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,OAAO;AACP;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA,IAAI,yDAAoB;AACxB;AACA;AACA;AACA;;AAEA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA,iCAAiC;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,2BAA2B,sEAAsB,CAAC,iEAAS;AAC3D;AACA;AACA,2BAA2B,uEAAuB,CAAC,iEAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA,qDAAqD,QAAQ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,mEAAc;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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,2BAA2B,yDAAQ,QAAQ,yDAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,yGAAyG,sEAAsB,0BAA0B,uEAAuB;AAChL;AACA;AACA;AACA;AACA,MAAM,yDAAQ,QAAQ,yDAAQ;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8CAA8C,6EAAqB;;AAEnE;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,QAAQ;AAChD;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uCAAuC,QAAQ;AAC/C;AACA;;AAEA;AACA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA,uCAAuC,QAAQ;AAC/C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,wCAAwC,QAAQ;AAChD;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,oCAAoC;AACpC,8BAA8B;AAC9B,kCAAkC;AAClC,sCAAsC;AACtC;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA,mBAAmB,QAAQ;AAC3B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED,uBAAuB,6EAAQ;AAC/B;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA,cAAc,+CAAG;AACjB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,+CAAG;;AAElB;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,EAAE,+CAAG;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,+CAAG;AAC3B;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,IAAI,+CAAG;AACP;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,QAAQ;AAC9C;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;;AAEA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,2CAA2C;AAC3C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,iDAAiD,QAAQ;AACzD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC,QAAQ;AAC9C;AACA;AACA;;AAEO;AACP;;;AAGA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAEM;AACP;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,+CAAG;AACxB,EAAE,+CAAG;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,+CAAG;AACtB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEO,4BAA4B,2EAAM;AACzC;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,+CAAG;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,+CAAG;AACnB,KAAK;AACL;AACA;;AAEA,+EAA+E,mDAAO;AACtF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,+CAAG;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+CAAG;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA,qDAAqD,QAAQ;AAC7D;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,KAAK;AACL;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA,yBAAyB,yDAAQ,KAAK,yDAAQ;;AAE9C;AACA;AACA;AACA,QAAQ,yDAAQ,QAAQ,yDAAQ;AAChC;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,yDAAQ,KAAK,yDAAQ;;AAE9C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA,OAAO,mCAAmC,oEAAqB;AAC/D;AACA,OAAO;AACP;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,UAAU,yDAAQ,QAAQ,yDAAQ;AAClC,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;;AAEA,UAAU,yDAAQ,QAAQ,yDAAQ;AAClC,SAAS,yBAAyB,sEAAsB,oBAAoB,uEAAuB;AACnG;AACA,UAAU,yDAAQ,QAAQ,yDAAQ;AAClC,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED,aAAa,yDAAoB;;AAEjC;AACA,oCAAoC,oEAAqB;AACzD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;;AAEO,0BAA0B,2EAAM,CAAC,qDAAM,EAAE,sEAAS;AACzD;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,yDAAQ,QAAQ,yDAAQ;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA,8BAA8B,yDAAQ;AACtC;AACA;AACA,sDAAsD,QAAQ;AAC9D;AACA,qDAAqD,uDAAM,qBAAqB,mEAAc;;AAE9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB,uDAAM;AAC/B;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,QAAQ;AAC9C;AACA,uBAAuB,uDAAM;;AAE7B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mDAAmD,6EAAqB;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,0BAA0B,6EAAqB;AAC/C,OAAO;AACP,0BAA0B,6EAAqB;AAC/C;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAEM,wCAAwC,4EAAoB;AACnE;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,oBAAoB,yDAAQ,KAAK,yDAAQ;AACzC;AACA,2BAA2B,sEAAS,iBAAiB,sEAAS;AAC9D;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;;;AAGA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,2DAAW;AAC3C,KAAK;AACL,gCAAgC,2DAAW,wBAAwB,2DAAW;AAC9E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0FAA0F;AAC1F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,gCAAgC,kEAAkE;AAClG,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yCAAyC,+DAAe;AACxD,mCAAmC,4DAAS;;AAE5C;AACA,iDAAiD,mDAAO;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,KAAK;AACL,yCAAyC,QAAQ;AACjD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gCAAgC,uDAAM;AACtC;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,+CAAG;AAC3B,uBAAuB,+CAAG;AAC1B;AACA;;AAEA;AACA,QAAQ,+CAAG;AACX;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,yDAAyD,+CAAG;AAC5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,+CAAG;AACf;AACA,WAAW;AACX;AACA,cAAc,+CAAG;AACjB,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,+CAAG;AACtC,OAAO;AACP;AACA;AACA,qCAAqC,+CAAG;AACxC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;AAC3C,yCAAyC,+CAAG;AAC5C;;AAEA;AACA;AACA,4DAA4D,YAAY;AACxE;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT,wDAAwD,YAAY;AACpE;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,wDAAwD,YAAY;AACpE;AACA;AACA;AACA,OAAO;AACP,sDAAsD,YAAY;AAClE;AACA;AACA;AACA,KAAK;AACL,oDAAoD,YAAY;AAChE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,uCAAuC,QAAQ;AAC/C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,yDAAQ,QAAQ,yDAAQ;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA,wDAAwD,YAAY;AACpE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;;AAE5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6CAA6C,aAAa;AAC1D;AACA;AACA;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC,UAAU;AAClD;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,+CAAG;;AAEjD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEO,kCAAkC,2EAAM;AAC/C;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,0CAA0C,+CAAG;AAC7C;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;;AAE5C;;AAEA;;AAEA,iCAAiC;;AAEjC;AACA,sCAAsC,+CAAG;AACzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;;AAEA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,qCAAqC,4DAAY;AACjD;AACA;;AAEA;AACA,CAAC;;AAEM;AACP;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,yDAAQ,QAAQ,yDAAQ;AAC9B;AACA;AACA;;AAEO;AACP;AACA;AACA,MAAM,yDAAQ,QAAQ,yDAAQ;AAC9B,KAAK;AACL,cAAc,yDAAQ,gBAAgB,yDAAQ;AAC9C;AACA;AACA;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;;AAEA;AACA;;AAEA,+BAA+B;;AAExB;AACP;;AAEA;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;AACA;AACA,OAAO;AACP,QAAQ,yDAAoB;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;AACA;AACA,OAAO;AACP,QAAQ,yDAAoB;AAC5B;AACA;AACA,KAAK;AACL;AACA;;AAEO;AACP;AACA,YAAY,yDAAQ,gBAAgB,yDAAQ;AAC5C;AACA;;AAEA;AACA;;AAEO;AACP;AACA,IAAI,yDAAQ;AACZ;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,IAAI,yDAAQ;AACZ;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA,IAAI,yDAAQ,QAAQ,yDAAQ;AAC5B;;AAEA;AACA;;AAEO;AACP,uEAAuE,cAAc;AACrF;AACA;;AAEA;AACA,IAAI,yDAAQ;AACZ;AACA;;AAEO,iCAAiC,2EAAM,CAAC,sEAAS;AACxD;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B,+CAAG;AAClC,qBAAqB;AACrB;;AAEA,gCAAgC;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA,8CAA8C;;AAE9C;AACA,oBAAoB,+CAAG;AACvB;;AAEA;AACA;;AAEA;AACA,CAAC,iB;;;;;;;;;;;;AC5kKD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;AAIA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEyD;AACD;AAC+H;AAC/I;AACE;AACR;;AAE3B,yBAAyB,wEAAa,+BAA+B,iEAAM;AAClF;AACA,YAAY,+CAAG,UAAU,sEAAS,EAAE,2DAAQ,EAAE,qDAAM,EAAE,8DAAW,EAAE,yEAAsB,EAAE,oEAAiB;AAC5G;;AAEA;;;AAGA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF;;AAEtF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,uDAAM;AACxC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uEAAuE,sEAAmB;;AAE1F;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB,iEAAc,sBAAsB,iEAAc;AAC3E;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,4DAAS;AACjB,4BAA4B,6EAAqB;AACjD;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,8EAA8E,2DAAQ;AACvF;AACA;AACA,CAAC,8EAA8E,2DAAQ;AACvF;AACA;AACA,CAAC,mFAAmF,2DAAQ;AAC5F;AACA;AACA,CAAC,+EAA+E,2DAAQ;AACxF;AACA;AACA,CAAC;;AAEM;AACP;AACA;;;;AAIA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,G;;;;;;;;;;;;ACxOD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;AAI+D;AACvB;AACN;AACY;;AAE9C,aAAa,yDAAoB;;AAE1B,wBAAwB,0EAAe,wBAAwB,mEAAQ,EAAE,uEAAuE,WAAW,mEAAQ,EAAE,iDAAiD,WAAW,mEAAQ,EAAE,0CAA0C;AAC5R;AACA,YAAY,qDAAM,EAAE,+CAAG;AACvB;;AAEA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA,CAAC,gD","file":"vendors~02227409.9268cb396e89a4ee8a82.chunk.js","sourcesContent":["var _dec, _class, _dec2, _class2;\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nimport { inject } from 'aurelia-dependency-injection';\nimport { CompositionEngine, useView, inlineView, customElement } from 'aurelia-templating';\nimport { RouteLoader, Router } from 'aurelia-router';\nimport { relativeToFile } from 'aurelia-path';\nimport { Origin } from 'aurelia-metadata';\nimport { RouterViewLocator } from './router-view';\n\nvar EmptyClass = (_dec = inlineView('<template></template>'), _dec(_class = function EmptyClass() {\n  \n}) || _class);\n\nexport var TemplatingRouteLoader = (_dec2 = inject(CompositionEngine), _dec2(_class2 = function (_RouteLoader) {\n  _inherits(TemplatingRouteLoader, _RouteLoader);\n\n  function TemplatingRouteLoader(compositionEngine) {\n    \n\n    var _this = _possibleConstructorReturn(this, _RouteLoader.call(this));\n\n    _this.compositionEngine = compositionEngine;\n    return _this;\n  }\n\n  TemplatingRouteLoader.prototype.loadRoute = function loadRoute(router, config) {\n    var childContainer = router.container.createChild();\n\n    var viewModel = void 0;\n    if (config.moduleId === null) {\n      viewModel = EmptyClass;\n    } else if (/\\.html/i.test(config.moduleId)) {\n      viewModel = createDynamicClass(config.moduleId);\n    } else {\n      viewModel = relativeToFile(config.moduleId, Origin.get(router.container.viewModel.constructor).moduleId);\n    }\n\n    var instruction = {\n      viewModel: viewModel,\n      childContainer: childContainer,\n      view: config.view || config.viewStrategy,\n      router: router\n    };\n\n    childContainer.registerSingleton(RouterViewLocator);\n\n    childContainer.getChildRouter = function () {\n      var childRouter = void 0;\n\n      childContainer.registerHandler(Router, function (c) {\n        return childRouter || (childRouter = router.createChild(childContainer));\n      });\n\n      return childContainer.get(Router);\n    };\n\n    return this.compositionEngine.ensureViewModel(instruction);\n  };\n\n  return TemplatingRouteLoader;\n}(RouteLoader)) || _class2);\n\nfunction createDynamicClass(moduleId) {\n  var _dec3, _dec4, _class3;\n\n  var name = /([^\\/^\\?]+)\\.html/i.exec(moduleId)[1];\n\n  var DynamicClass = (_dec3 = customElement(name), _dec4 = useView(moduleId), _dec3(_class3 = _dec4(_class3 = function () {\n    function DynamicClass() {\n      \n    }\n\n    DynamicClass.prototype.bind = function bind(bindingContext) {\n      this.$parent = bindingContext;\n    };\n\n    return DynamicClass;\n  }()) || _class3) || _class3);\n\n\n  return DynamicClass;\n}","import { Router, AppRouter, RouteLoader } from 'aurelia-router';\nimport { TemplatingRouteLoader } from './route-loader';\nimport { RouterView } from './router-view';\nimport { RouteHref } from './route-href';\n\nfunction configure(config) {\n  config.singleton(RouteLoader, TemplatingRouteLoader).singleton(Router, AppRouter).globalResources(RouterView, RouteHref);\n\n  config.container.registerAlias(Router, AppRouter);\n}\n\nexport { TemplatingRouteLoader, RouterView, RouteHref, configure };","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _class, _temp, _dec, _class2, _dec2, _class3, _dec3, _class4, _dec4, _class5, _dec5, _class6, _dec6, _class7, _class8, _temp2, _class9, _temp3, _class11, _dec7, _class13, _dec8, _class14, _class15, _temp4, _dec9, _class16, _dec10, _class17, _dec11, _class18;\n\n\n\nimport * as LogManager from 'aurelia-logging';\nimport { metadata, Origin, protocol } from 'aurelia-metadata';\nimport { DOM, PLATFORM, FEATURE } from 'aurelia-pal';\nimport { TemplateRegistryEntry, Loader } from 'aurelia-loader';\nimport { relativeToFile } from 'aurelia-path';\nimport { Scope, Expression, ValueConverterResource, BindingBehaviorResource, camelCase, Binding, createOverrideContext, subscriberCollection, bindingMode, ObserverLocator, EventManager } from 'aurelia-binding';\nimport { Container, resolver, inject } from 'aurelia-dependency-injection';\nimport { TaskQueue } from 'aurelia-task-queue';\n\nexport var animationEvent = {\n  enterBegin: 'animation:enter:begin',\n  enterActive: 'animation:enter:active',\n  enterDone: 'animation:enter:done',\n  enterTimeout: 'animation:enter:timeout',\n\n  leaveBegin: 'animation:leave:begin',\n  leaveActive: 'animation:leave:active',\n  leaveDone: 'animation:leave:done',\n  leaveTimeout: 'animation:leave:timeout',\n\n  staggerNext: 'animation:stagger:next',\n\n  removeClassBegin: 'animation:remove-class:begin',\n  removeClassActive: 'animation:remove-class:active',\n  removeClassDone: 'animation:remove-class:done',\n  removeClassTimeout: 'animation:remove-class:timeout',\n\n  addClassBegin: 'animation:add-class:begin',\n  addClassActive: 'animation:add-class:active',\n  addClassDone: 'animation:add-class:done',\n  addClassTimeout: 'animation:add-class:timeout',\n\n  animateBegin: 'animation:animate:begin',\n  animateActive: 'animation:animate:active',\n  animateDone: 'animation:animate:done',\n  animateTimeout: 'animation:animate:timeout',\n\n  sequenceBegin: 'animation:sequence:begin',\n  sequenceDone: 'animation:sequence:done'\n};\n\nexport var Animator = function () {\n  function Animator() {\n    \n  }\n\n  Animator.prototype.enter = function enter(element) {\n    return Promise.resolve(false);\n  };\n\n  Animator.prototype.leave = function leave(element) {\n    return Promise.resolve(false);\n  };\n\n  Animator.prototype.removeClass = function removeClass(element, className) {\n    element.classList.remove(className);\n    return Promise.resolve(false);\n  };\n\n  Animator.prototype.addClass = function addClass(element, className) {\n    element.classList.add(className);\n    return Promise.resolve(false);\n  };\n\n  Animator.prototype.animate = function animate(element, className) {\n    return Promise.resolve(false);\n  };\n\n  Animator.prototype.runSequence = function runSequence(animations) {};\n\n  Animator.prototype.registerEffect = function registerEffect(effectName, properties) {};\n\n  Animator.prototype.unregisterEffect = function unregisterEffect(effectName) {};\n\n  return Animator;\n}();\n\nexport var CompositionTransactionNotifier = function () {\n  function CompositionTransactionNotifier(owner) {\n    \n\n    this.owner = owner;\n    this.owner._compositionCount++;\n  }\n\n  CompositionTransactionNotifier.prototype.done = function done() {\n    this.owner._compositionCount--;\n    this.owner._tryCompleteTransaction();\n  };\n\n  return CompositionTransactionNotifier;\n}();\n\nexport var CompositionTransactionOwnershipToken = function () {\n  function CompositionTransactionOwnershipToken(owner) {\n    \n\n    this.owner = owner;\n    this.owner._ownershipToken = this;\n    this.thenable = this._createThenable();\n  }\n\n  CompositionTransactionOwnershipToken.prototype.waitForCompositionComplete = function waitForCompositionComplete() {\n    this.owner._tryCompleteTransaction();\n    return this.thenable;\n  };\n\n  CompositionTransactionOwnershipToken.prototype.resolve = function resolve() {\n    this._resolveCallback();\n  };\n\n  CompositionTransactionOwnershipToken.prototype._createThenable = function _createThenable() {\n    var _this = this;\n\n    return new Promise(function (resolve, reject) {\n      _this._resolveCallback = resolve;\n    });\n  };\n\n  return CompositionTransactionOwnershipToken;\n}();\n\nexport var CompositionTransaction = function () {\n  function CompositionTransaction() {\n    \n\n    this._ownershipToken = null;\n    this._compositionCount = 0;\n  }\n\n  CompositionTransaction.prototype.tryCapture = function tryCapture() {\n    return this._ownershipToken === null ? new CompositionTransactionOwnershipToken(this) : null;\n  };\n\n  CompositionTransaction.prototype.enlist = function enlist() {\n    return new CompositionTransactionNotifier(this);\n  };\n\n  CompositionTransaction.prototype._tryCompleteTransaction = function _tryCompleteTransaction() {\n    if (this._compositionCount <= 0) {\n      this._compositionCount = 0;\n\n      if (this._ownershipToken !== null) {\n        var token = this._ownershipToken;\n        this._ownershipToken = null;\n        token.resolve();\n      }\n    }\n  };\n\n  return CompositionTransaction;\n}();\n\nvar capitalMatcher = /([A-Z])/g;\n\nfunction addHyphenAndLower(char) {\n  return '-' + char.toLowerCase();\n}\n\nexport function _hyphenate(name) {\n  return (name.charAt(0).toLowerCase() + name.slice(1)).replace(capitalMatcher, addHyphenAndLower);\n}\n\nexport function _isAllWhitespace(node) {\n  return !(node.auInterpolationTarget || /[^\\t\\n\\r ]/.test(node.textContent));\n}\n\nexport var ViewEngineHooksResource = function () {\n  function ViewEngineHooksResource() {\n    \n  }\n\n  ViewEngineHooksResource.prototype.initialize = function initialize(container, target) {\n    this.instance = container.get(target);\n  };\n\n  ViewEngineHooksResource.prototype.register = function register(registry, name) {\n    registry.registerViewEngineHooks(this.instance);\n  };\n\n  ViewEngineHooksResource.prototype.load = function load(container, target) {};\n\n  ViewEngineHooksResource.convention = function convention(name) {\n    if (name.endsWith('ViewEngineHooks')) {\n      return new ViewEngineHooksResource();\n    }\n  };\n\n  return ViewEngineHooksResource;\n}();\n\nexport function viewEngineHooks(target) {\n  var deco = function deco(t) {\n    metadata.define(metadata.resource, new ViewEngineHooksResource(), t);\n  };\n\n  return target ? deco(target) : deco;\n}\n\nexport var ElementEvents = function () {\n  function ElementEvents(element) {\n    \n\n    this.element = element;\n    this.subscriptions = {};\n  }\n\n  ElementEvents.prototype._enqueueHandler = function _enqueueHandler(handler) {\n    this.subscriptions[handler.eventName] = this.subscriptions[handler.eventName] || [];\n    this.subscriptions[handler.eventName].push(handler);\n  };\n\n  ElementEvents.prototype._dequeueHandler = function _dequeueHandler(handler) {\n    var index = void 0;\n    var subscriptions = this.subscriptions[handler.eventName];\n    if (subscriptions) {\n      index = subscriptions.indexOf(handler);\n      if (index > -1) {\n        subscriptions.splice(index, 1);\n      }\n    }\n    return handler;\n  };\n\n  ElementEvents.prototype.publish = function publish(eventName) {\n    var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n    var cancelable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n    var event = DOM.createCustomEvent(eventName, { cancelable: cancelable, bubbles: bubbles, detail: detail });\n    this.element.dispatchEvent(event);\n  };\n\n  ElementEvents.prototype.subscribe = function subscribe(eventName, handler) {\n    var captureOrOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n    if (typeof handler === 'function') {\n      var eventHandler = new EventHandlerImpl(this, eventName, handler, captureOrOptions, false);\n      return eventHandler;\n    }\n\n    return undefined;\n  };\n\n  ElementEvents.prototype.subscribeOnce = function subscribeOnce(eventName, handler) {\n    var captureOrOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n    if (typeof handler === 'function') {\n      var eventHandler = new EventHandlerImpl(this, eventName, handler, captureOrOptions, true);\n      return eventHandler;\n    }\n\n    return undefined;\n  };\n\n  ElementEvents.prototype.dispose = function dispose(eventName) {\n    if (eventName && typeof eventName === 'string') {\n      var subscriptions = this.subscriptions[eventName];\n      if (subscriptions) {\n        while (subscriptions.length) {\n          var subscription = subscriptions.pop();\n          if (subscription) {\n            subscription.dispose();\n          }\n        }\n      }\n    } else {\n      this.disposeAll();\n    }\n  };\n\n  ElementEvents.prototype.disposeAll = function disposeAll() {\n    for (var _key in this.subscriptions) {\n      this.dispose(_key);\n    }\n  };\n\n  return ElementEvents;\n}();\n\nvar EventHandlerImpl = function () {\n  function EventHandlerImpl(owner, eventName, handler, captureOrOptions, once) {\n    \n\n    this.owner = owner;\n    this.eventName = eventName;\n    this.handler = handler;\n\n    this.capture = typeof captureOrOptions === 'boolean' ? captureOrOptions : captureOrOptions.capture;\n    this.bubbles = !this.capture;\n    this.captureOrOptions = captureOrOptions;\n    this.once = once;\n    owner.element.addEventListener(eventName, this, captureOrOptions);\n    owner._enqueueHandler(this);\n  }\n\n  EventHandlerImpl.prototype.handleEvent = function handleEvent(e) {\n    var fn = this.handler;\n    fn(e);\n    if (this.once) {\n      this.dispose();\n    }\n  };\n\n  EventHandlerImpl.prototype.dispose = function dispose() {\n    this.owner.element.removeEventListener(this.eventName, this, this.captureOrOptions);\n    this.owner._dequeueHandler(this);\n    this.owner = this.handler = null;\n  };\n\n  return EventHandlerImpl;\n}();\n\nexport var ResourceLoadContext = function () {\n  function ResourceLoadContext() {\n    \n\n    this.dependencies = {};\n  }\n\n  ResourceLoadContext.prototype.addDependency = function addDependency(url) {\n    this.dependencies[url] = true;\n  };\n\n  ResourceLoadContext.prototype.hasDependency = function hasDependency(url) {\n    return url in this.dependencies;\n  };\n\n  return ResourceLoadContext;\n}();\n\nexport var ViewCompileInstruction = function ViewCompileInstruction() {\n  var targetShadowDOM = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n  var compileSurrogate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  \n\n  this.targetShadowDOM = targetShadowDOM;\n  this.compileSurrogate = compileSurrogate;\n  this.associatedModuleId = null;\n};\n\nViewCompileInstruction.normal = new ViewCompileInstruction();\n\nexport var BehaviorInstruction = function () {\n  function BehaviorInstruction() {\n    \n  }\n\n  BehaviorInstruction.enhance = function enhance() {\n    var instruction = new BehaviorInstruction();\n    instruction.enhance = true;\n    return instruction;\n  };\n\n  BehaviorInstruction.unitTest = function unitTest(type, attributes) {\n    var instruction = new BehaviorInstruction();\n    instruction.type = type;\n    instruction.attributes = attributes || {};\n    return instruction;\n  };\n\n  BehaviorInstruction.element = function element(node, type) {\n    var instruction = new BehaviorInstruction();\n    instruction.type = type;\n    instruction.attributes = {};\n    instruction.anchorIsContainer = !(node.hasAttribute('containerless') || type.containerless);\n    instruction.initiatedByBehavior = true;\n    return instruction;\n  };\n\n  BehaviorInstruction.attribute = function attribute(attrName, type) {\n    var instruction = new BehaviorInstruction();\n    instruction.attrName = attrName;\n    instruction.type = type || null;\n    instruction.attributes = {};\n    return instruction;\n  };\n\n  BehaviorInstruction.dynamic = function dynamic(host, viewModel, viewFactory) {\n    var instruction = new BehaviorInstruction();\n    instruction.host = host;\n    instruction.viewModel = viewModel;\n    instruction.viewFactory = viewFactory;\n    instruction.inheritBindingContext = true;\n    return instruction;\n  };\n\n  return BehaviorInstruction;\n}();\n\nvar biProto = BehaviorInstruction.prototype;\nbiProto.initiatedByBehavior = false;\nbiProto.enhance = false;\nbiProto.partReplacements = null;\nbiProto.viewFactory = null;\nbiProto.originalAttrName = null;\nbiProto.skipContentProcessing = false;\nbiProto.contentFactory = null;\nbiProto.viewModel = null;\nbiProto.anchorIsContainer = false;\nbiProto.host = null;\nbiProto.attributes = null;\nbiProto.type = null;\nbiProto.attrName = null;\nbiProto.inheritBindingContext = false;\n\nBehaviorInstruction.normal = new BehaviorInstruction();\n\nexport var TargetInstruction = (_temp = _class = function () {\n  function TargetInstruction() {\n    \n  }\n\n  TargetInstruction.shadowSlot = function shadowSlot(parentInjectorId) {\n    var instruction = new TargetInstruction();\n    instruction.parentInjectorId = parentInjectorId;\n    instruction.shadowSlot = true;\n    return instruction;\n  };\n\n  TargetInstruction.contentExpression = function contentExpression(expression) {\n    var instruction = new TargetInstruction();\n    instruction.contentExpression = expression;\n    return instruction;\n  };\n\n  TargetInstruction.letElement = function letElement(expressions) {\n    var instruction = new TargetInstruction();\n    instruction.expressions = expressions;\n    instruction.letElement = true;\n    return instruction;\n  };\n\n  TargetInstruction.lifting = function lifting(parentInjectorId, liftingInstruction) {\n    var instruction = new TargetInstruction();\n    instruction.parentInjectorId = parentInjectorId;\n    instruction.expressions = TargetInstruction.noExpressions;\n    instruction.behaviorInstructions = [liftingInstruction];\n    instruction.viewFactory = liftingInstruction.viewFactory;\n    instruction.providers = [liftingInstruction.type.target];\n    instruction.lifting = true;\n    return instruction;\n  };\n\n  TargetInstruction.normal = function normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction) {\n    var instruction = new TargetInstruction();\n    instruction.injectorId = injectorId;\n    instruction.parentInjectorId = parentInjectorId;\n    instruction.providers = providers;\n    instruction.behaviorInstructions = behaviorInstructions;\n    instruction.expressions = expressions;\n    instruction.anchorIsContainer = elementInstruction ? elementInstruction.anchorIsContainer : true;\n    instruction.elementInstruction = elementInstruction;\n    return instruction;\n  };\n\n  TargetInstruction.surrogate = function surrogate(providers, behaviorInstructions, expressions, values) {\n    var instruction = new TargetInstruction();\n    instruction.expressions = expressions;\n    instruction.behaviorInstructions = behaviorInstructions;\n    instruction.providers = providers;\n    instruction.values = values;\n    return instruction;\n  };\n\n  return TargetInstruction;\n}(), _class.noExpressions = Object.freeze([]), _temp);\n\nvar tiProto = TargetInstruction.prototype;\n\ntiProto.injectorId = null;\ntiProto.parentInjectorId = null;\n\ntiProto.shadowSlot = false;\ntiProto.slotName = null;\ntiProto.slotFallbackFactory = null;\n\ntiProto.contentExpression = null;\ntiProto.letElement = false;\n\ntiProto.expressions = null;\ntiProto.expressions = null;\ntiProto.providers = null;\n\ntiProto.viewFactory = null;\n\ntiProto.anchorIsContainer = false;\ntiProto.elementInstruction = null;\ntiProto.lifting = false;\n\ntiProto.values = null;\n\nexport var viewStrategy = protocol.create('aurelia:view-strategy', {\n  validate: function validate(target) {\n    if (!(typeof target.loadViewFactory === 'function')) {\n      return 'View strategies must implement: loadViewFactory(viewEngine: ViewEngine, compileInstruction: ViewCompileInstruction, loadContext?: ResourceLoadContext): Promise<ViewFactory>';\n    }\n\n    return true;\n  },\n  compose: function compose(target) {\n    if (!(typeof target.makeRelativeTo === 'function')) {\n      target.makeRelativeTo = PLATFORM.noop;\n    }\n  }\n});\n\nexport var RelativeViewStrategy = (_dec = viewStrategy(), _dec(_class2 = function () {\n  function RelativeViewStrategy(path) {\n    \n\n    this.path = path;\n    this.absolutePath = null;\n  }\n\n  RelativeViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n    if (this.absolutePath === null && this.moduleId) {\n      this.absolutePath = relativeToFile(this.path, this.moduleId);\n    }\n\n    compileInstruction.associatedModuleId = this.moduleId;\n    return viewEngine.loadViewFactory(this.absolutePath || this.path, compileInstruction, loadContext, target);\n  };\n\n  RelativeViewStrategy.prototype.makeRelativeTo = function makeRelativeTo(file) {\n    if (this.absolutePath === null) {\n      this.absolutePath = relativeToFile(this.path, file);\n    }\n  };\n\n  return RelativeViewStrategy;\n}()) || _class2);\n\nexport var ConventionalViewStrategy = (_dec2 = viewStrategy(), _dec2(_class3 = function () {\n  function ConventionalViewStrategy(viewLocator, origin) {\n    \n\n    this.moduleId = origin.moduleId;\n    this.viewUrl = viewLocator.convertOriginToViewUrl(origin);\n  }\n\n  ConventionalViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n    compileInstruction.associatedModuleId = this.moduleId;\n    return viewEngine.loadViewFactory(this.viewUrl, compileInstruction, loadContext, target);\n  };\n\n  return ConventionalViewStrategy;\n}()) || _class3);\n\nexport var NoViewStrategy = (_dec3 = viewStrategy(), _dec3(_class4 = function () {\n  function NoViewStrategy(dependencies, dependencyBaseUrl) {\n    \n\n    this.dependencies = dependencies || null;\n    this.dependencyBaseUrl = dependencyBaseUrl || '';\n  }\n\n  NoViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n    var entry = this.entry;\n    var dependencies = this.dependencies;\n\n    if (entry && entry.factoryIsReady) {\n      return Promise.resolve(null);\n    }\n\n    this.entry = entry = new TemplateRegistryEntry(this.moduleId || this.dependencyBaseUrl);\n\n    entry.dependencies = [];\n    entry.templateIsLoaded = true;\n\n    if (dependencies !== null) {\n      for (var i = 0, ii = dependencies.length; i < ii; ++i) {\n        var current = dependencies[i];\n\n        if (typeof current === 'string' || typeof current === 'function') {\n          entry.addDependency(current);\n        } else {\n          entry.addDependency(current.from, current.as);\n        }\n      }\n    }\n\n    compileInstruction.associatedModuleId = this.moduleId;\n\n    return viewEngine.loadViewFactory(entry, compileInstruction, loadContext, target);\n  };\n\n  return NoViewStrategy;\n}()) || _class4);\n\nexport var TemplateRegistryViewStrategy = (_dec4 = viewStrategy(), _dec4(_class5 = function () {\n  function TemplateRegistryViewStrategy(moduleId, entry) {\n    \n\n    this.moduleId = moduleId;\n    this.entry = entry;\n  }\n\n  TemplateRegistryViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n    var entry = this.entry;\n\n    if (entry.factoryIsReady) {\n      return Promise.resolve(entry.factory);\n    }\n\n    compileInstruction.associatedModuleId = this.moduleId;\n    return viewEngine.loadViewFactory(entry, compileInstruction, loadContext, target);\n  };\n\n  return TemplateRegistryViewStrategy;\n}()) || _class5);\n\nexport var InlineViewStrategy = (_dec5 = viewStrategy(), _dec5(_class6 = function () {\n  function InlineViewStrategy(markup, dependencies, dependencyBaseUrl) {\n    \n\n    this.markup = markup;\n    this.dependencies = dependencies || null;\n    this.dependencyBaseUrl = dependencyBaseUrl || '';\n  }\n\n  InlineViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n    var entry = this.entry;\n    var dependencies = this.dependencies;\n\n    if (entry && entry.factoryIsReady) {\n      return Promise.resolve(entry.factory);\n    }\n\n    this.entry = entry = new TemplateRegistryEntry(this.moduleId || this.dependencyBaseUrl);\n    entry.template = DOM.createTemplateFromMarkup(this.markup);\n\n    if (dependencies !== null) {\n      for (var i = 0, ii = dependencies.length; i < ii; ++i) {\n        var current = dependencies[i];\n\n        if (typeof current === 'string' || typeof current === 'function') {\n          entry.addDependency(current);\n        } else {\n          entry.addDependency(current.from, current.as);\n        }\n      }\n    }\n\n    compileInstruction.associatedModuleId = this.moduleId;\n    return viewEngine.loadViewFactory(entry, compileInstruction, loadContext, target);\n  };\n\n  return InlineViewStrategy;\n}()) || _class6);\n\nexport var StaticViewStrategy = (_dec6 = viewStrategy(), _dec6(_class7 = function () {\n  function StaticViewStrategy(config) {\n    \n\n    if (typeof config === 'string' || config instanceof DOM.Element && config.tagName === 'TEMPLATE') {\n      config = {\n        template: config\n      };\n    }\n    this.template = config.template;\n    this.dependencies = config.dependencies || [];\n    this.factoryIsReady = false;\n    this.onReady = null;\n    this.moduleId = 'undefined';\n  }\n\n  StaticViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n    var _this2 = this;\n\n    if (this.factoryIsReady) {\n      return Promise.resolve(this.factory);\n    }\n    var deps = this.dependencies;\n    deps = typeof deps === 'function' ? deps() : deps;\n    deps = deps ? deps : [];\n    deps = Array.isArray(deps) ? deps : [deps];\n\n    return Promise.all(deps).then(function (dependencies) {\n      var container = viewEngine.container;\n      var appResources = viewEngine.appResources;\n      var viewCompiler = viewEngine.viewCompiler;\n      var viewResources = new ViewResources(appResources);\n\n      var resource = void 0;\n      var elDeps = [];\n\n      if (target) {\n        viewResources.autoRegister(container, target);\n      }\n\n      for (var _iterator = dependencies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n        var _ref;\n\n        if (_isArray) {\n          if (_i >= _iterator.length) break;\n          _ref = _iterator[_i++];\n        } else {\n          _i = _iterator.next();\n          if (_i.done) break;\n          _ref = _i.value;\n        }\n\n        var dep = _ref;\n\n        if (typeof dep === 'function') {\n          resource = viewResources.autoRegister(container, dep);\n          if (resource.elementName !== null) {\n            elDeps.push(resource);\n          }\n        } else if (dep && (typeof dep === 'undefined' ? 'undefined' : _typeof(dep)) === 'object') {\n          for (var _key2 in dep) {\n            var exported = dep[_key2];\n            if (typeof exported === 'function') {\n              resource = viewResources.autoRegister(container, exported);\n              if (resource.elementName !== null) {\n                elDeps.push(resource);\n              }\n            }\n          }\n        } else {\n          throw new Error('dependency neither function nor object. Received: \"' + (typeof dep === 'undefined' ? 'undefined' : _typeof(dep)) + '\"');\n        }\n      }\n\n      return Promise.all(elDeps.map(function (el) {\n        return el.load(container, el.target);\n      })).then(function () {\n        var factory = _this2.template !== null ? viewCompiler.compile(_this2.template, viewResources, compileInstruction) : null;\n        _this2.factoryIsReady = true;\n        _this2.factory = factory;\n        return factory;\n      });\n    });\n  };\n\n  return StaticViewStrategy;\n}()) || _class7);\n\nexport var ViewLocator = (_temp2 = _class8 = function () {\n  function ViewLocator() {\n    \n  }\n\n  ViewLocator.prototype.getViewStrategy = function getViewStrategy(value) {\n    if (!value) {\n      return null;\n    }\n\n    if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && 'getViewStrategy' in value) {\n      var _origin = Origin.get(value.constructor);\n\n      value = value.getViewStrategy();\n\n      if (typeof value === 'string') {\n        value = new RelativeViewStrategy(value);\n      }\n\n      viewStrategy.assert(value);\n\n      if (_origin.moduleId) {\n        value.makeRelativeTo(_origin.moduleId);\n      }\n\n      return value;\n    }\n\n    if (typeof value === 'string') {\n      value = new RelativeViewStrategy(value);\n    }\n\n    if (viewStrategy.validate(value)) {\n      return value;\n    }\n\n    if (typeof value !== 'function') {\n      value = value.constructor;\n    }\n\n    if ('$view' in value) {\n      var c = value.$view;\n      var _view = void 0;\n      c = typeof c === 'function' ? c.call(value) : c;\n      if (c === null) {\n        _view = new NoViewStrategy();\n      } else {\n        _view = c instanceof StaticViewStrategy ? c : new StaticViewStrategy(c);\n      }\n      metadata.define(ViewLocator.viewStrategyMetadataKey, _view, value);\n      return _view;\n    }\n\n    var origin = Origin.get(value);\n    var strategy = metadata.get(ViewLocator.viewStrategyMetadataKey, value);\n\n    if (!strategy) {\n      if (!origin.moduleId) {\n        throw new Error('Cannot determine default view strategy for object.', value);\n      }\n\n      strategy = this.createFallbackViewStrategy(origin);\n    } else if (origin.moduleId) {\n      strategy.moduleId = origin.moduleId;\n    }\n\n    return strategy;\n  };\n\n  ViewLocator.prototype.createFallbackViewStrategy = function createFallbackViewStrategy(origin) {\n    return new ConventionalViewStrategy(this, origin);\n  };\n\n  ViewLocator.prototype.convertOriginToViewUrl = function convertOriginToViewUrl(origin) {\n    var moduleId = origin.moduleId;\n    var id = moduleId.endsWith('.js') || moduleId.endsWith('.ts') ? moduleId.substring(0, moduleId.length - 3) : moduleId;\n    return id + '.html';\n  };\n\n  return ViewLocator;\n}(), _class8.viewStrategyMetadataKey = 'aurelia:view-strategy', _temp2);\n\nfunction mi(name) {\n  throw new Error('BindingLanguage must implement ' + name + '().');\n}\n\nexport var BindingLanguage = function () {\n  function BindingLanguage() {\n    \n  }\n\n  BindingLanguage.prototype.inspectAttribute = function inspectAttribute(resources, elementName, attrName, attrValue) {\n    mi('inspectAttribute');\n  };\n\n  BindingLanguage.prototype.createAttributeInstruction = function createAttributeInstruction(resources, element, info, existingInstruction) {\n    mi('createAttributeInstruction');\n  };\n\n  BindingLanguage.prototype.createLetExpressions = function createLetExpressions(resources, element) {\n    mi('createLetExpressions');\n  };\n\n  BindingLanguage.prototype.inspectTextContent = function inspectTextContent(resources, value) {\n    mi('inspectTextContent');\n  };\n\n  return BindingLanguage;\n}();\n\nvar noNodes = Object.freeze([]);\n\nexport var SlotCustomAttribute = function () {\n  SlotCustomAttribute.inject = function inject() {\n    return [DOM.Element];\n  };\n\n  function SlotCustomAttribute(element) {\n    \n\n    this.element = element;\n    this.element.auSlotAttribute = this;\n  }\n\n  SlotCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {};\n\n  return SlotCustomAttribute;\n}();\n\nexport var PassThroughSlot = function () {\n  function PassThroughSlot(anchor, name, destinationName, fallbackFactory) {\n    \n\n    this.anchor = anchor;\n    this.anchor.viewSlot = this;\n    this.name = name;\n    this.destinationName = destinationName;\n    this.fallbackFactory = fallbackFactory;\n    this.destinationSlot = null;\n    this.projections = 0;\n    this.contentView = null;\n\n    var attr = new SlotCustomAttribute(this.anchor);\n    attr.value = this.destinationName;\n  }\n\n  PassThroughSlot.prototype.renderFallbackContent = function renderFallbackContent(view, nodes, projectionSource, index) {\n    if (this.contentView === null) {\n      this.contentView = this.fallbackFactory.create(this.ownerView.container);\n      this.contentView.bind(this.ownerView.bindingContext, this.ownerView.overrideContext);\n\n      var slots = Object.create(null);\n      slots[this.destinationSlot.name] = this.destinationSlot;\n\n      ShadowDOM.distributeView(this.contentView, slots, projectionSource, index, this.destinationSlot.name);\n    }\n  };\n\n  PassThroughSlot.prototype.passThroughTo = function passThroughTo(destinationSlot) {\n    this.destinationSlot = destinationSlot;\n  };\n\n  PassThroughSlot.prototype.addNode = function addNode(view, node, projectionSource, index) {\n    if (this.contentView !== null) {\n      this.contentView.removeNodes();\n      this.contentView.detached();\n      this.contentView.unbind();\n      this.contentView = null;\n    }\n\n    if (node.viewSlot instanceof PassThroughSlot) {\n      node.viewSlot.passThroughTo(this);\n      return;\n    }\n\n    this.projections++;\n    this.destinationSlot.addNode(view, node, projectionSource, index);\n  };\n\n  PassThroughSlot.prototype.removeView = function removeView(view, projectionSource) {\n    this.projections--;\n    this.destinationSlot.removeView(view, projectionSource);\n\n    if (this.needsFallbackRendering) {\n      this.renderFallbackContent(null, noNodes, projectionSource);\n    }\n  };\n\n  PassThroughSlot.prototype.removeAll = function removeAll(projectionSource) {\n    this.projections = 0;\n    this.destinationSlot.removeAll(projectionSource);\n\n    if (this.needsFallbackRendering) {\n      this.renderFallbackContent(null, noNodes, projectionSource);\n    }\n  };\n\n  PassThroughSlot.prototype.projectFrom = function projectFrom(view, projectionSource) {\n    this.destinationSlot.projectFrom(view, projectionSource);\n  };\n\n  PassThroughSlot.prototype.created = function created(ownerView) {\n    this.ownerView = ownerView;\n  };\n\n  PassThroughSlot.prototype.bind = function bind(view) {\n    if (this.contentView) {\n      this.contentView.bind(view.bindingContext, view.overrideContext);\n    }\n  };\n\n  PassThroughSlot.prototype.attached = function attached() {\n    if (this.contentView) {\n      this.contentView.attached();\n    }\n  };\n\n  PassThroughSlot.prototype.detached = function detached() {\n    if (this.contentView) {\n      this.contentView.detached();\n    }\n  };\n\n  PassThroughSlot.prototype.unbind = function unbind() {\n    if (this.contentView) {\n      this.contentView.unbind();\n    }\n  };\n\n  _createClass(PassThroughSlot, [{\n    key: 'needsFallbackRendering',\n    get: function get() {\n      return this.fallbackFactory && this.projections === 0;\n    }\n  }]);\n\n  return PassThroughSlot;\n}();\n\nexport var ShadowSlot = function () {\n  function ShadowSlot(anchor, name, fallbackFactory) {\n    \n\n    this.anchor = anchor;\n    this.anchor.isContentProjectionSource = true;\n    this.anchor.viewSlot = this;\n    this.name = name;\n    this.fallbackFactory = fallbackFactory;\n    this.contentView = null;\n    this.projections = 0;\n    this.children = [];\n    this.projectFromAnchors = null;\n    this.destinationSlots = null;\n  }\n\n  ShadowSlot.prototype.addNode = function addNode(view, node, projectionSource, index, destination) {\n    if (this.contentView !== null) {\n      this.contentView.removeNodes();\n      this.contentView.detached();\n      this.contentView.unbind();\n      this.contentView = null;\n    }\n\n    if (node.viewSlot instanceof PassThroughSlot) {\n      node.viewSlot.passThroughTo(this);\n      return;\n    }\n\n    if (this.destinationSlots !== null) {\n      ShadowDOM.distributeNodes(view, [node], this.destinationSlots, this, index);\n    } else {\n      node.auOwnerView = view;\n      node.auProjectionSource = projectionSource;\n      node.auAssignedSlot = this;\n\n      var anchor = this._findAnchor(view, node, projectionSource, index);\n      var parent = anchor.parentNode;\n\n      parent.insertBefore(node, anchor);\n      this.children.push(node);\n      this.projections++;\n    }\n  };\n\n  ShadowSlot.prototype.removeView = function removeView(view, projectionSource) {\n    if (this.destinationSlots !== null) {\n      ShadowDOM.undistributeView(view, this.destinationSlots, this);\n    } else if (this.contentView && this.contentView.hasSlots) {\n      ShadowDOM.undistributeView(view, this.contentView.slots, projectionSource);\n    } else {\n      var found = this.children.find(function (x) {\n        return x.auSlotProjectFrom === projectionSource;\n      });\n      if (found) {\n        var _children = found.auProjectionChildren;\n\n        for (var i = 0, ii = _children.length; i < ii; ++i) {\n          var _child = _children[i];\n\n          if (_child.auOwnerView === view) {\n            _children.splice(i, 1);\n            view.fragment.appendChild(_child);\n            i--;ii--;\n            this.projections--;\n          }\n        }\n\n        if (this.needsFallbackRendering) {\n          this.renderFallbackContent(view, noNodes, projectionSource);\n        }\n      }\n    }\n  };\n\n  ShadowSlot.prototype.removeAll = function removeAll(projectionSource) {\n    if (this.destinationSlots !== null) {\n      ShadowDOM.undistributeAll(this.destinationSlots, this);\n    } else if (this.contentView && this.contentView.hasSlots) {\n      ShadowDOM.undistributeAll(this.contentView.slots, projectionSource);\n    } else {\n      var found = this.children.find(function (x) {\n        return x.auSlotProjectFrom === projectionSource;\n      });\n\n      if (found) {\n        var _children2 = found.auProjectionChildren;\n        for (var i = 0, ii = _children2.length; i < ii; ++i) {\n          var _child2 = _children2[i];\n          _child2.auOwnerView.fragment.appendChild(_child2);\n          this.projections--;\n        }\n\n        found.auProjectionChildren = [];\n\n        if (this.needsFallbackRendering) {\n          this.renderFallbackContent(null, noNodes, projectionSource);\n        }\n      }\n    }\n  };\n\n  ShadowSlot.prototype._findAnchor = function _findAnchor(view, node, projectionSource, index) {\n    if (projectionSource) {\n      var found = this.children.find(function (x) {\n        return x.auSlotProjectFrom === projectionSource;\n      });\n      if (found) {\n        if (index !== undefined) {\n          var _children3 = found.auProjectionChildren;\n          var viewIndex = -1;\n          var lastView = void 0;\n\n          for (var i = 0, ii = _children3.length; i < ii; ++i) {\n            var current = _children3[i];\n\n            if (current.auOwnerView !== lastView) {\n              viewIndex++;\n              lastView = current.auOwnerView;\n\n              if (viewIndex >= index && lastView !== view) {\n                _children3.splice(i, 0, node);\n                return current;\n              }\n            }\n          }\n        }\n\n        found.auProjectionChildren.push(node);\n        return found;\n      }\n    }\n\n    return this.anchor;\n  };\n\n  ShadowSlot.prototype.projectTo = function projectTo(slots) {\n    this.destinationSlots = slots;\n  };\n\n  ShadowSlot.prototype.projectFrom = function projectFrom(view, projectionSource) {\n    var anchor = DOM.createComment('anchor');\n    var parent = this.anchor.parentNode;\n    anchor.auSlotProjectFrom = projectionSource;\n    anchor.auOwnerView = view;\n    anchor.auProjectionChildren = [];\n    parent.insertBefore(anchor, this.anchor);\n    this.children.push(anchor);\n\n    if (this.projectFromAnchors === null) {\n      this.projectFromAnchors = [];\n    }\n\n    this.projectFromAnchors.push(anchor);\n  };\n\n  ShadowSlot.prototype.renderFallbackContent = function renderFallbackContent(view, nodes, projectionSource, index) {\n    if (this.contentView === null) {\n      this.contentView = this.fallbackFactory.create(this.ownerView.container);\n      this.contentView.bind(this.ownerView.bindingContext, this.ownerView.overrideContext);\n      this.contentView.insertNodesBefore(this.anchor);\n    }\n\n    if (this.contentView.hasSlots) {\n      var slots = this.contentView.slots;\n      var projectFromAnchors = this.projectFromAnchors;\n\n      if (projectFromAnchors !== null) {\n        for (var slotName in slots) {\n          var slot = slots[slotName];\n\n          for (var i = 0, ii = projectFromAnchors.length; i < ii; ++i) {\n            var anchor = projectFromAnchors[i];\n            slot.projectFrom(anchor.auOwnerView, anchor.auSlotProjectFrom);\n          }\n        }\n      }\n\n      this.fallbackSlots = slots;\n      ShadowDOM.distributeNodes(view, nodes, slots, projectionSource, index);\n    }\n  };\n\n  ShadowSlot.prototype.created = function created(ownerView) {\n    this.ownerView = ownerView;\n  };\n\n  ShadowSlot.prototype.bind = function bind(view) {\n    if (this.contentView) {\n      this.contentView.bind(view.bindingContext, view.overrideContext);\n    }\n  };\n\n  ShadowSlot.prototype.attached = function attached() {\n    if (this.contentView) {\n      this.contentView.attached();\n    }\n  };\n\n  ShadowSlot.prototype.detached = function detached() {\n    if (this.contentView) {\n      this.contentView.detached();\n    }\n  };\n\n  ShadowSlot.prototype.unbind = function unbind() {\n    if (this.contentView) {\n      this.contentView.unbind();\n    }\n  };\n\n  _createClass(ShadowSlot, [{\n    key: 'needsFallbackRendering',\n    get: function get() {\n      return this.fallbackFactory && this.projections === 0;\n    }\n  }]);\n\n  return ShadowSlot;\n}();\n\nexport var ShadowDOM = (_temp3 = _class9 = function () {\n  function ShadowDOM() {\n    \n  }\n\n  ShadowDOM.getSlotName = function getSlotName(node) {\n    if (node.auSlotAttribute === undefined) {\n      return ShadowDOM.defaultSlotKey;\n    }\n\n    return node.auSlotAttribute.value;\n  };\n\n  ShadowDOM.distributeView = function distributeView(view, slots, projectionSource, index, destinationOverride) {\n    var nodes = void 0;\n\n    if (view === null) {\n      nodes = noNodes;\n    } else {\n      var childNodes = view.fragment.childNodes;\n      var ii = childNodes.length;\n      nodes = new Array(ii);\n\n      for (var i = 0; i < ii; ++i) {\n        nodes[i] = childNodes[i];\n      }\n    }\n\n    ShadowDOM.distributeNodes(view, nodes, slots, projectionSource, index, destinationOverride);\n  };\n\n  ShadowDOM.undistributeView = function undistributeView(view, slots, projectionSource) {\n    for (var slotName in slots) {\n      slots[slotName].removeView(view, projectionSource);\n    }\n  };\n\n  ShadowDOM.undistributeAll = function undistributeAll(slots, projectionSource) {\n    for (var slotName in slots) {\n      slots[slotName].removeAll(projectionSource);\n    }\n  };\n\n  ShadowDOM.distributeNodes = function distributeNodes(view, nodes, slots, projectionSource, index, destinationOverride) {\n    for (var i = 0, ii = nodes.length; i < ii; ++i) {\n      var currentNode = nodes[i];\n      var nodeType = currentNode.nodeType;\n\n      if (currentNode.isContentProjectionSource) {\n        currentNode.viewSlot.projectTo(slots);\n\n        for (var slotName in slots) {\n          slots[slotName].projectFrom(view, currentNode.viewSlot);\n        }\n\n        nodes.splice(i, 1);\n        ii--;i--;\n      } else if (nodeType === 1 || nodeType === 3 || currentNode.viewSlot instanceof PassThroughSlot) {\n        if (nodeType === 3 && _isAllWhitespace(currentNode)) {\n          nodes.splice(i, 1);\n          ii--;i--;\n        } else {\n          var found = slots[destinationOverride || ShadowDOM.getSlotName(currentNode)];\n\n          if (found) {\n            found.addNode(view, currentNode, projectionSource, index);\n            nodes.splice(i, 1);\n            ii--;i--;\n          }\n        }\n      } else {\n        nodes.splice(i, 1);\n        ii--;i--;\n      }\n    }\n\n    for (var _slotName in slots) {\n      var slot = slots[_slotName];\n\n      if (slot.needsFallbackRendering) {\n        slot.renderFallbackContent(view, nodes, projectionSource, index);\n      }\n    }\n  };\n\n  return ShadowDOM;\n}(), _class9.defaultSlotKey = '__au-default-slot-key__', _temp3);\n\nfunction register(lookup, name, resource, type) {\n  if (!name) {\n    return;\n  }\n\n  var existing = lookup[name];\n  if (existing) {\n    if (existing !== resource) {\n      throw new Error('Attempted to register ' + type + ' when one with the same name already exists. Name: ' + name + '.');\n    }\n\n    return;\n  }\n\n  lookup[name] = resource;\n}\n\nexport function validateBehaviorName(name, type) {\n  if (/[A-Z]/.test(name)) {\n    var newName = _hyphenate(name);\n    LogManager.getLogger('templating').warn('\\'' + name + '\\' is not a valid ' + type + ' name and has been converted to \\'' + newName + '\\'. Upper-case letters are not allowed because the DOM is not case-sensitive.');\n    return newName;\n  }\n  return name;\n}\n\nvar conventionMark = '__au_resource__';\n\nexport var ViewResources = function () {\n  ViewResources.convention = function convention(target, existing) {\n    var resource = void 0;\n\n    if (existing && conventionMark in existing) {\n      return existing;\n    }\n    if ('$resource' in target) {\n      var config = target.$resource;\n\n      if (typeof config === 'string') {\n        resource = existing || new HtmlBehaviorResource();\n        resource[conventionMark] = true;\n        if (!resource.elementName) {\n          resource.elementName = validateBehaviorName(config, 'custom element');\n        }\n      } else {\n        if (typeof config === 'function') {\n          config = config.call(target);\n        }\n        if (typeof config === 'string') {\n          config = { name: config };\n        }\n\n        config = Object.assign({}, config);\n\n        var resourceType = config.type || 'element';\n\n        var _name = config.name;\n        switch (resourceType) {\n          case 'element':case 'attribute':\n            resource = existing || new HtmlBehaviorResource();\n            resource[conventionMark] = true;\n            if (resourceType === 'element') {\n              if (!resource.elementName) {\n                resource.elementName = _name ? validateBehaviorName(_name, 'custom element') : _hyphenate(target.name);\n              }\n            } else {\n              if (!resource.attributeName) {\n                resource.attributeName = _name ? validateBehaviorName(_name, 'custom attribute') : _hyphenate(target.name);\n              }\n            }\n            if ('templateController' in config) {\n              config.liftsContent = config.templateController;\n              delete config.templateController;\n            }\n            if ('defaultBindingMode' in config && resource.attributeDefaultBindingMode !== undefined) {\n              config.attributeDefaultBindingMode = config.defaultBindingMode;\n              delete config.defaultBindingMode;\n            }\n\n            delete config.name;\n\n            Object.assign(resource, config);\n            break;\n          case 'valueConverter':\n            resource = new ValueConverterResource(camelCase(_name || target.name));\n            break;\n          case 'bindingBehavior':\n            resource = new BindingBehaviorResource(camelCase(_name || target.name));\n            break;\n          case 'viewEngineHooks':\n            resource = new ViewEngineHooksResource();\n            break;\n        }\n      }\n\n      if (resource instanceof HtmlBehaviorResource) {\n        var _bindables = typeof config === 'string' ? undefined : config.bindables;\n        var currentProps = resource.properties;\n        if (Array.isArray(_bindables)) {\n          for (var i = 0, ii = _bindables.length; ii > i; ++i) {\n            var prop = _bindables[i];\n            if (!prop || typeof prop !== 'string' && !prop.name) {\n              throw new Error('Invalid bindable property at \"' + i + '\" for class \"' + target.name + '\". Expected either a string or an object with \"name\" property.');\n            }\n            var newProp = new BindableProperty(prop);\n\n            var existed = false;\n            for (var j = 0, jj = currentProps.length; jj > j; ++j) {\n              if (currentProps[j].name === newProp.name) {\n                existed = true;\n                break;\n              }\n            }\n            if (existed) {\n              continue;\n            }\n            newProp.registerWith(target, resource);\n          }\n        }\n      }\n    }\n    return resource;\n  };\n\n  function ViewResources(parent, viewUrl) {\n    \n\n    this.bindingLanguage = null;\n\n    this.parent = parent || null;\n    this.hasParent = this.parent !== null;\n    this.viewUrl = viewUrl || '';\n    this.lookupFunctions = {\n      valueConverters: this.getValueConverter.bind(this),\n      bindingBehaviors: this.getBindingBehavior.bind(this)\n    };\n    this.attributes = Object.create(null);\n    this.elements = Object.create(null);\n    this.valueConverters = Object.create(null);\n    this.bindingBehaviors = Object.create(null);\n    this.attributeMap = Object.create(null);\n    this.values = Object.create(null);\n    this.beforeCompile = this.afterCompile = this.beforeCreate = this.afterCreate = this.beforeBind = this.beforeUnbind = false;\n  }\n\n  ViewResources.prototype._tryAddHook = function _tryAddHook(obj, name) {\n    if (typeof obj[name] === 'function') {\n      var func = obj[name].bind(obj);\n      var counter = 1;\n      var callbackName = void 0;\n\n      while (this[callbackName = name + counter.toString()] !== undefined) {\n        counter++;\n      }\n\n      this[name] = true;\n      this[callbackName] = func;\n    }\n  };\n\n  ViewResources.prototype._invokeHook = function _invokeHook(name, one, two, three, four) {\n    if (this.hasParent) {\n      this.parent._invokeHook(name, one, two, three, four);\n    }\n\n    if (this[name]) {\n      this[name + '1'](one, two, three, four);\n\n      var callbackName = name + '2';\n      if (this[callbackName]) {\n        this[callbackName](one, two, three, four);\n\n        callbackName = name + '3';\n        if (this[callbackName]) {\n          this[callbackName](one, two, three, four);\n\n          var counter = 4;\n\n          while (this[callbackName = name + counter.toString()] !== undefined) {\n            this[callbackName](one, two, three, four);\n            counter++;\n          }\n        }\n      }\n    }\n  };\n\n  ViewResources.prototype.registerViewEngineHooks = function registerViewEngineHooks(hooks) {\n    this._tryAddHook(hooks, 'beforeCompile');\n    this._tryAddHook(hooks, 'afterCompile');\n    this._tryAddHook(hooks, 'beforeCreate');\n    this._tryAddHook(hooks, 'afterCreate');\n    this._tryAddHook(hooks, 'beforeBind');\n    this._tryAddHook(hooks, 'beforeUnbind');\n  };\n\n  ViewResources.prototype.getBindingLanguage = function getBindingLanguage(bindingLanguageFallback) {\n    return this.bindingLanguage || (this.bindingLanguage = bindingLanguageFallback);\n  };\n\n  ViewResources.prototype.patchInParent = function patchInParent(newParent) {\n    var originalParent = this.parent;\n\n    this.parent = newParent || null;\n    this.hasParent = this.parent !== null;\n\n    if (newParent.parent === null) {\n      newParent.parent = originalParent;\n      newParent.hasParent = originalParent !== null;\n    }\n  };\n\n  ViewResources.prototype.relativeToView = function relativeToView(path) {\n    return relativeToFile(path, this.viewUrl);\n  };\n\n  ViewResources.prototype.registerElement = function registerElement(tagName, behavior) {\n    register(this.elements, tagName, behavior, 'an Element');\n  };\n\n  ViewResources.prototype.getElement = function getElement(tagName) {\n    return this.elements[tagName] || (this.hasParent ? this.parent.getElement(tagName) : null);\n  };\n\n  ViewResources.prototype.mapAttribute = function mapAttribute(attribute) {\n    return this.attributeMap[attribute] || (this.hasParent ? this.parent.mapAttribute(attribute) : null);\n  };\n\n  ViewResources.prototype.registerAttribute = function registerAttribute(attribute, behavior, knownAttribute) {\n    this.attributeMap[attribute] = knownAttribute;\n    register(this.attributes, attribute, behavior, 'an Attribute');\n  };\n\n  ViewResources.prototype.getAttribute = function getAttribute(attribute) {\n    return this.attributes[attribute] || (this.hasParent ? this.parent.getAttribute(attribute) : null);\n  };\n\n  ViewResources.prototype.registerValueConverter = function registerValueConverter(name, valueConverter) {\n    register(this.valueConverters, name, valueConverter, 'a ValueConverter');\n  };\n\n  ViewResources.prototype.getValueConverter = function getValueConverter(name) {\n    return this.valueConverters[name] || (this.hasParent ? this.parent.getValueConverter(name) : null);\n  };\n\n  ViewResources.prototype.registerBindingBehavior = function registerBindingBehavior(name, bindingBehavior) {\n    register(this.bindingBehaviors, name, bindingBehavior, 'a BindingBehavior');\n  };\n\n  ViewResources.prototype.getBindingBehavior = function getBindingBehavior(name) {\n    return this.bindingBehaviors[name] || (this.hasParent ? this.parent.getBindingBehavior(name) : null);\n  };\n\n  ViewResources.prototype.registerValue = function registerValue(name, value) {\n    register(this.values, name, value, 'a value');\n  };\n\n  ViewResources.prototype.getValue = function getValue(name) {\n    return this.values[name] || (this.hasParent ? this.parent.getValue(name) : null);\n  };\n\n  ViewResources.prototype.autoRegister = function autoRegister(container, impl) {\n    var resourceTypeMeta = metadata.getOwn(metadata.resource, impl);\n    if (resourceTypeMeta) {\n      if (resourceTypeMeta instanceof HtmlBehaviorResource) {\n        ViewResources.convention(impl, resourceTypeMeta);\n\n        if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n          HtmlBehaviorResource.convention(impl.name, resourceTypeMeta);\n        }\n        if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n          resourceTypeMeta.elementName = _hyphenate(impl.name);\n        }\n      }\n    } else {\n      resourceTypeMeta = ViewResources.convention(impl) || HtmlBehaviorResource.convention(impl.name) || ValueConverterResource.convention(impl.name) || BindingBehaviorResource.convention(impl.name) || ViewEngineHooksResource.convention(impl.name);\n      if (!resourceTypeMeta) {\n        resourceTypeMeta = new HtmlBehaviorResource();\n        resourceTypeMeta.elementName = _hyphenate(impl.name);\n      }\n      metadata.define(metadata.resource, resourceTypeMeta, impl);\n    }\n    resourceTypeMeta.initialize(container, impl);\n    resourceTypeMeta.register(this);\n    return resourceTypeMeta;\n  };\n\n  return ViewResources;\n}();\n\nexport var View = function () {\n  function View(container, viewFactory, fragment, controllers, bindings, children, slots) {\n    \n\n    this.container = container;\n    this.viewFactory = viewFactory;\n    this.resources = viewFactory.resources;\n    this.fragment = fragment;\n    this.firstChild = fragment.firstChild;\n    this.lastChild = fragment.lastChild;\n    this.controllers = controllers;\n    this.bindings = bindings;\n    this.children = children;\n    this.slots = slots;\n    this.hasSlots = false;\n    this.fromCache = false;\n    this.isBound = false;\n    this.isAttached = false;\n    this.bindingContext = null;\n    this.overrideContext = null;\n    this.controller = null;\n    this.viewModelScope = null;\n    this.animatableElement = undefined;\n    this._isUserControlled = false;\n    this.contentView = null;\n\n    for (var _key3 in slots) {\n      this.hasSlots = true;\n      break;\n    }\n  }\n\n  View.prototype.returnToCache = function returnToCache() {\n    this.viewFactory.returnViewToCache(this);\n  };\n\n  View.prototype.created = function created() {\n    var i = void 0;\n    var ii = void 0;\n    var controllers = this.controllers;\n\n    for (i = 0, ii = controllers.length; i < ii; ++i) {\n      controllers[i].created(this);\n    }\n  };\n\n  View.prototype.bind = function bind(bindingContext, overrideContext, _systemUpdate) {\n    var controllers = void 0;\n    var bindings = void 0;\n    var children = void 0;\n    var i = void 0;\n    var ii = void 0;\n\n    if (_systemUpdate && this._isUserControlled) {\n      return;\n    }\n\n    if (this.isBound) {\n      if (this.bindingContext === bindingContext) {\n        return;\n      }\n\n      this.unbind();\n    }\n\n    this.isBound = true;\n    this.bindingContext = bindingContext;\n    this.overrideContext = overrideContext || createOverrideContext(bindingContext);\n\n    this.resources._invokeHook('beforeBind', this);\n\n    bindings = this.bindings;\n    for (i = 0, ii = bindings.length; i < ii; ++i) {\n      bindings[i].bind(this);\n    }\n\n    if (this.viewModelScope !== null) {\n      bindingContext.bind(this.viewModelScope.bindingContext, this.viewModelScope.overrideContext);\n      this.viewModelScope = null;\n    }\n\n    controllers = this.controllers;\n    for (i = 0, ii = controllers.length; i < ii; ++i) {\n      controllers[i].bind(this);\n    }\n\n    children = this.children;\n    for (i = 0, ii = children.length; i < ii; ++i) {\n      children[i].bind(bindingContext, overrideContext, true);\n    }\n\n    if (this.hasSlots) {\n      ShadowDOM.distributeView(this.contentView, this.slots);\n    }\n  };\n\n  View.prototype.addBinding = function addBinding(binding) {\n    this.bindings.push(binding);\n\n    if (this.isBound) {\n      binding.bind(this);\n    }\n  };\n\n  View.prototype.unbind = function unbind() {\n    var controllers = void 0;\n    var bindings = void 0;\n    var children = void 0;\n    var i = void 0;\n    var ii = void 0;\n\n    if (this.isBound) {\n      this.isBound = false;\n      this.resources._invokeHook('beforeUnbind', this);\n\n      if (this.controller !== null) {\n        this.controller.unbind();\n      }\n\n      bindings = this.bindings;\n      for (i = 0, ii = bindings.length; i < ii; ++i) {\n        bindings[i].unbind();\n      }\n\n      controllers = this.controllers;\n      for (i = 0, ii = controllers.length; i < ii; ++i) {\n        controllers[i].unbind();\n      }\n\n      children = this.children;\n      for (i = 0, ii = children.length; i < ii; ++i) {\n        children[i].unbind();\n      }\n\n      this.bindingContext = null;\n      this.overrideContext = null;\n    }\n  };\n\n  View.prototype.insertNodesBefore = function insertNodesBefore(refNode) {\n    refNode.parentNode.insertBefore(this.fragment, refNode);\n  };\n\n  View.prototype.appendNodesTo = function appendNodesTo(parent) {\n    parent.appendChild(this.fragment);\n  };\n\n  View.prototype.removeNodes = function removeNodes() {\n    var fragment = this.fragment;\n    var current = this.firstChild;\n    var end = this.lastChild;\n    var next = void 0;\n\n    while (current) {\n      next = current.nextSibling;\n      fragment.appendChild(current);\n\n      if (current === end) {\n        break;\n      }\n\n      current = next;\n    }\n  };\n\n  View.prototype.attached = function attached() {\n    var controllers = void 0;\n    var children = void 0;\n    var i = void 0;\n    var ii = void 0;\n\n    if (this.isAttached) {\n      return;\n    }\n\n    this.isAttached = true;\n\n    if (this.controller !== null) {\n      this.controller.attached();\n    }\n\n    controllers = this.controllers;\n    for (i = 0, ii = controllers.length; i < ii; ++i) {\n      controllers[i].attached();\n    }\n\n    children = this.children;\n    for (i = 0, ii = children.length; i < ii; ++i) {\n      children[i].attached();\n    }\n  };\n\n  View.prototype.detached = function detached() {\n    var controllers = void 0;\n    var children = void 0;\n    var i = void 0;\n    var ii = void 0;\n\n    if (this.isAttached) {\n      this.isAttached = false;\n\n      if (this.controller !== null) {\n        this.controller.detached();\n      }\n\n      controllers = this.controllers;\n      for (i = 0, ii = controllers.length; i < ii; ++i) {\n        controllers[i].detached();\n      }\n\n      children = this.children;\n      for (i = 0, ii = children.length; i < ii; ++i) {\n        children[i].detached();\n      }\n    }\n  };\n\n  return View;\n}();\n\nfunction getAnimatableElement(view) {\n  if (view.animatableElement !== undefined) {\n    return view.animatableElement;\n  }\n\n  var current = view.firstChild;\n\n  while (current && current.nodeType !== 1) {\n    current = current.nextSibling;\n  }\n\n  if (current && current.nodeType === 1) {\n    return view.animatableElement = current.classList.contains('au-animate') ? current : null;\n  }\n\n  return view.animatableElement = null;\n}\n\nexport var ViewSlot = function () {\n  function ViewSlot(anchor, anchorIsContainer) {\n    var animator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Animator.instance;\n\n    \n\n    this.anchor = anchor;\n    this.anchorIsContainer = anchorIsContainer;\n    this.bindingContext = null;\n    this.overrideContext = null;\n    this.animator = animator;\n    this.children = [];\n    this.isBound = false;\n    this.isAttached = false;\n    this.contentSelectors = null;\n    anchor.viewSlot = this;\n    anchor.isContentProjectionSource = false;\n  }\n\n  ViewSlot.prototype.animateView = function animateView(view) {\n    var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'enter';\n\n    var animatableElement = getAnimatableElement(view);\n\n    if (animatableElement !== null) {\n      switch (direction) {\n        case 'enter':\n          return this.animator.enter(animatableElement);\n        case 'leave':\n          return this.animator.leave(animatableElement);\n        default:\n          throw new Error('Invalid animation direction: ' + direction);\n      }\n    }\n  };\n\n  ViewSlot.prototype.transformChildNodesIntoView = function transformChildNodesIntoView() {\n    var parent = this.anchor;\n\n    this.children.push({\n      fragment: parent,\n      firstChild: parent.firstChild,\n      lastChild: parent.lastChild,\n      returnToCache: function returnToCache() {},\n      removeNodes: function removeNodes() {\n        var last = void 0;\n\n        while (last = parent.lastChild) {\n          parent.removeChild(last);\n        }\n      },\n      created: function created() {},\n      bind: function bind() {},\n      unbind: function unbind() {},\n      attached: function attached() {},\n      detached: function detached() {}\n    });\n  };\n\n  ViewSlot.prototype.bind = function bind(bindingContext, overrideContext) {\n    var i = void 0;\n    var ii = void 0;\n    var children = void 0;\n\n    if (this.isBound) {\n      if (this.bindingContext === bindingContext) {\n        return;\n      }\n\n      this.unbind();\n    }\n\n    this.isBound = true;\n    this.bindingContext = bindingContext = bindingContext || this.bindingContext;\n    this.overrideContext = overrideContext = overrideContext || this.overrideContext;\n\n    children = this.children;\n    for (i = 0, ii = children.length; i < ii; ++i) {\n      children[i].bind(bindingContext, overrideContext, true);\n    }\n  };\n\n  ViewSlot.prototype.unbind = function unbind() {\n    if (this.isBound) {\n      var i = void 0;\n      var ii = void 0;\n      var _children4 = this.children;\n\n      this.isBound = false;\n      this.bindingContext = null;\n      this.overrideContext = null;\n\n      for (i = 0, ii = _children4.length; i < ii; ++i) {\n        _children4[i].unbind();\n      }\n    }\n  };\n\n  ViewSlot.prototype.add = function add(view) {\n    if (this.anchorIsContainer) {\n      view.appendNodesTo(this.anchor);\n    } else {\n      view.insertNodesBefore(this.anchor);\n    }\n\n    this.children.push(view);\n\n    if (this.isAttached) {\n      view.attached();\n      return this.animateView(view, 'enter');\n    }\n  };\n\n  ViewSlot.prototype.insert = function insert(index, view) {\n    var children = this.children;\n    var length = children.length;\n\n    if (index === 0 && length === 0 || index >= length) {\n      return this.add(view);\n    }\n\n    view.insertNodesBefore(children[index].firstChild);\n    children.splice(index, 0, view);\n\n    if (this.isAttached) {\n      view.attached();\n      return this.animateView(view, 'enter');\n    }\n  };\n\n  ViewSlot.prototype.move = function move(sourceIndex, targetIndex) {\n    if (sourceIndex === targetIndex) {\n      return;\n    }\n\n    var children = this.children;\n    var view = children[sourceIndex];\n\n    view.removeNodes();\n    view.insertNodesBefore(children[targetIndex].firstChild);\n    children.splice(sourceIndex, 1);\n    children.splice(targetIndex, 0, view);\n  };\n\n  ViewSlot.prototype.remove = function remove(view, returnToCache, skipAnimation) {\n    return this.removeAt(this.children.indexOf(view), returnToCache, skipAnimation);\n  };\n\n  ViewSlot.prototype.removeMany = function removeMany(viewsToRemove, returnToCache, skipAnimation) {\n    var _this3 = this;\n\n    var children = this.children;\n    var ii = viewsToRemove.length;\n    var i = void 0;\n    var rmPromises = [];\n\n    viewsToRemove.forEach(function (child) {\n      if (skipAnimation) {\n        child.removeNodes();\n        return;\n      }\n\n      var animation = _this3.animateView(child, 'leave');\n      if (animation) {\n        rmPromises.push(animation.then(function () {\n          return child.removeNodes();\n        }));\n      } else {\n        child.removeNodes();\n      }\n    });\n\n    var removeAction = function removeAction() {\n      if (_this3.isAttached) {\n        for (i = 0; i < ii; ++i) {\n          viewsToRemove[i].detached();\n        }\n      }\n\n      if (returnToCache) {\n        for (i = 0; i < ii; ++i) {\n          viewsToRemove[i].returnToCache();\n        }\n      }\n\n      for (i = 0; i < ii; ++i) {\n        var index = children.indexOf(viewsToRemove[i]);\n        if (index >= 0) {\n          children.splice(index, 1);\n        }\n      }\n    };\n\n    if (rmPromises.length > 0) {\n      return Promise.all(rmPromises).then(function () {\n        return removeAction();\n      });\n    }\n\n    return removeAction();\n  };\n\n  ViewSlot.prototype.removeAt = function removeAt(index, returnToCache, skipAnimation) {\n    var _this4 = this;\n\n    var view = this.children[index];\n\n    var removeAction = function removeAction() {\n      index = _this4.children.indexOf(view);\n      view.removeNodes();\n      _this4.children.splice(index, 1);\n\n      if (_this4.isAttached) {\n        view.detached();\n      }\n\n      if (returnToCache) {\n        view.returnToCache();\n      }\n\n      return view;\n    };\n\n    if (!skipAnimation) {\n      var animation = this.animateView(view, 'leave');\n      if (animation) {\n        return animation.then(function () {\n          return removeAction();\n        });\n      }\n    }\n\n    return removeAction();\n  };\n\n  ViewSlot.prototype.removeAll = function removeAll(returnToCache, skipAnimation) {\n    var _this5 = this;\n\n    var children = this.children;\n    var ii = children.length;\n    var i = void 0;\n    var rmPromises = [];\n\n    children.forEach(function (child) {\n      if (skipAnimation) {\n        child.removeNodes();\n        return;\n      }\n\n      var animation = _this5.animateView(child, 'leave');\n      if (animation) {\n        rmPromises.push(animation.then(function () {\n          return child.removeNodes();\n        }));\n      } else {\n        child.removeNodes();\n      }\n    });\n\n    var removeAction = function removeAction() {\n      if (_this5.isAttached) {\n        for (i = 0; i < ii; ++i) {\n          children[i].detached();\n        }\n      }\n\n      if (returnToCache) {\n        for (i = 0; i < ii; ++i) {\n          var _child3 = children[i];\n\n          if (_child3) {\n            _child3.returnToCache();\n          }\n        }\n      }\n\n      _this5.children = [];\n    };\n\n    if (rmPromises.length > 0) {\n      return Promise.all(rmPromises).then(function () {\n        return removeAction();\n      });\n    }\n\n    return removeAction();\n  };\n\n  ViewSlot.prototype.attached = function attached() {\n    var i = void 0;\n    var ii = void 0;\n    var children = void 0;\n    var child = void 0;\n\n    if (this.isAttached) {\n      return;\n    }\n\n    this.isAttached = true;\n\n    children = this.children;\n    for (i = 0, ii = children.length; i < ii; ++i) {\n      child = children[i];\n      child.attached();\n      this.animateView(child, 'enter');\n    }\n  };\n\n  ViewSlot.prototype.detached = function detached() {\n    var i = void 0;\n    var ii = void 0;\n    var children = void 0;\n\n    if (this.isAttached) {\n      this.isAttached = false;\n      children = this.children;\n      for (i = 0, ii = children.length; i < ii; ++i) {\n        children[i].detached();\n      }\n    }\n  };\n\n  ViewSlot.prototype.projectTo = function projectTo(slots) {\n    var _this6 = this;\n\n    this.projectToSlots = slots;\n    this.add = this._projectionAdd;\n    this.insert = this._projectionInsert;\n    this.move = this._projectionMove;\n    this.remove = this._projectionRemove;\n    this.removeAt = this._projectionRemoveAt;\n    this.removeMany = this._projectionRemoveMany;\n    this.removeAll = this._projectionRemoveAll;\n    this.children.forEach(function (view) {\n      return ShadowDOM.distributeView(view, slots, _this6);\n    });\n  };\n\n  ViewSlot.prototype._projectionAdd = function _projectionAdd(view) {\n    ShadowDOM.distributeView(view, this.projectToSlots, this);\n\n    this.children.push(view);\n\n    if (this.isAttached) {\n      view.attached();\n    }\n  };\n\n  ViewSlot.prototype._projectionInsert = function _projectionInsert(index, view) {\n    if (index === 0 && !this.children.length || index >= this.children.length) {\n      this.add(view);\n    } else {\n      ShadowDOM.distributeView(view, this.projectToSlots, this, index);\n\n      this.children.splice(index, 0, view);\n\n      if (this.isAttached) {\n        view.attached();\n      }\n    }\n  };\n\n  ViewSlot.prototype._projectionMove = function _projectionMove(sourceIndex, targetIndex) {\n    if (sourceIndex === targetIndex) {\n      return;\n    }\n\n    var children = this.children;\n    var view = children[sourceIndex];\n\n    ShadowDOM.undistributeView(view, this.projectToSlots, this);\n    ShadowDOM.distributeView(view, this.projectToSlots, this, targetIndex);\n\n    children.splice(sourceIndex, 1);\n    children.splice(targetIndex, 0, view);\n  };\n\n  ViewSlot.prototype._projectionRemove = function _projectionRemove(view, returnToCache) {\n    ShadowDOM.undistributeView(view, this.projectToSlots, this);\n    this.children.splice(this.children.indexOf(view), 1);\n\n    if (this.isAttached) {\n      view.detached();\n    }\n    if (returnToCache) {\n      view.returnToCache();\n    }\n  };\n\n  ViewSlot.prototype._projectionRemoveAt = function _projectionRemoveAt(index, returnToCache) {\n    var view = this.children[index];\n\n    ShadowDOM.undistributeView(view, this.projectToSlots, this);\n    this.children.splice(index, 1);\n\n    if (this.isAttached) {\n      view.detached();\n    }\n    if (returnToCache) {\n      view.returnToCache();\n    }\n  };\n\n  ViewSlot.prototype._projectionRemoveMany = function _projectionRemoveMany(viewsToRemove, returnToCache) {\n    var _this7 = this;\n\n    viewsToRemove.forEach(function (view) {\n      return _this7.remove(view, returnToCache);\n    });\n  };\n\n  ViewSlot.prototype._projectionRemoveAll = function _projectionRemoveAll(returnToCache) {\n    ShadowDOM.undistributeAll(this.projectToSlots, this);\n\n    var children = this.children;\n    var ii = children.length;\n\n    for (var i = 0; i < ii; ++i) {\n      if (returnToCache) {\n        children[i].returnToCache();\n      } else if (this.isAttached) {\n        children[i].detached();\n      }\n    }\n\n    this.children = [];\n  };\n\n  return ViewSlot;\n}();\n\nvar ProviderResolver = resolver(_class11 = function () {\n  function ProviderResolver() {\n    \n  }\n\n  ProviderResolver.prototype.get = function get(container, key) {\n    var id = key.__providerId__;\n    return id in container ? container[id] : container[id] = container.invoke(key);\n  };\n\n  return ProviderResolver;\n}()) || _class11;\n\nvar providerResolverInstance = new ProviderResolver();\n\nfunction elementContainerGet(key) {\n  if (key === DOM.Element) {\n    return this.element;\n  }\n\n  if (key === BoundViewFactory) {\n    if (this.boundViewFactory) {\n      return this.boundViewFactory;\n    }\n\n    var factory = this.instruction.viewFactory;\n    var _partReplacements = this.partReplacements;\n\n    if (_partReplacements) {\n      factory = _partReplacements[factory.part] || factory;\n    }\n\n    this.boundViewFactory = new BoundViewFactory(this, factory, _partReplacements);\n    return this.boundViewFactory;\n  }\n\n  if (key === ViewSlot) {\n    if (this.viewSlot === undefined) {\n      this.viewSlot = new ViewSlot(this.element, this.instruction.anchorIsContainer);\n      this.element.isContentProjectionSource = this.instruction.lifting;\n      this.children.push(this.viewSlot);\n    }\n\n    return this.viewSlot;\n  }\n\n  if (key === ElementEvents) {\n    return this.elementEvents || (this.elementEvents = new ElementEvents(this.element));\n  }\n\n  if (key === CompositionTransaction) {\n    return this.compositionTransaction || (this.compositionTransaction = this.parent.get(key));\n  }\n\n  if (key === ViewResources) {\n    return this.viewResources;\n  }\n\n  if (key === TargetInstruction) {\n    return this.instruction;\n  }\n\n  return this.superGet(key);\n}\n\nfunction createElementContainer(parent, element, instruction, children, partReplacements, resources) {\n  var container = parent.createChild();\n  var providers = void 0;\n  var i = void 0;\n\n  container.element = element;\n  container.instruction = instruction;\n  container.children = children;\n  container.viewResources = resources;\n  container.partReplacements = partReplacements;\n\n  providers = instruction.providers;\n  i = providers.length;\n\n  while (i--) {\n    container._resolvers.set(providers[i], providerResolverInstance);\n  }\n\n  container.superGet = container.get;\n  container.get = elementContainerGet;\n\n  return container;\n}\n\nfunction hasAttribute(name) {\n  return this._element.hasAttribute(name);\n}\n\nfunction getAttribute(name) {\n  return this._element.getAttribute(name);\n}\n\nfunction setAttribute(name, value) {\n  this._element.setAttribute(name, value);\n}\n\nfunction makeElementIntoAnchor(element, elementInstruction) {\n  var anchor = DOM.createComment('anchor');\n\n  if (elementInstruction) {\n    var firstChild = element.firstChild;\n\n    if (firstChild && firstChild.tagName === 'AU-CONTENT') {\n      anchor.contentElement = firstChild;\n    }\n\n    anchor._element = element;\n\n    anchor.hasAttribute = hasAttribute;\n    anchor.getAttribute = getAttribute;\n    anchor.setAttribute = setAttribute;\n  }\n\n  DOM.replaceNode(anchor, element);\n\n  return anchor;\n}\n\nfunction applyInstructions(containers, element, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources) {\n  var behaviorInstructions = instruction.behaviorInstructions;\n  var expressions = instruction.expressions;\n  var elementContainer = void 0;\n  var i = void 0;\n  var ii = void 0;\n  var current = void 0;\n  var instance = void 0;\n\n  if (instruction.contentExpression) {\n    bindings.push(instruction.contentExpression.createBinding(element.nextSibling));\n    element.nextSibling.auInterpolationTarget = true;\n    element.parentNode.removeChild(element);\n    return;\n  }\n\n  if (instruction.shadowSlot) {\n    var commentAnchor = DOM.createComment('slot');\n    var slot = void 0;\n\n    if (instruction.slotDestination) {\n      slot = new PassThroughSlot(commentAnchor, instruction.slotName, instruction.slotDestination, instruction.slotFallbackFactory);\n    } else {\n      slot = new ShadowSlot(commentAnchor, instruction.slotName, instruction.slotFallbackFactory);\n    }\n\n    DOM.replaceNode(commentAnchor, element);\n    shadowSlots[instruction.slotName] = slot;\n    controllers.push(slot);\n    return;\n  }\n\n  if (instruction.letElement) {\n    for (i = 0, ii = expressions.length; i < ii; ++i) {\n      bindings.push(expressions[i].createBinding());\n    }\n    element.parentNode.removeChild(element);\n    return;\n  }\n\n  if (behaviorInstructions.length) {\n    if (!instruction.anchorIsContainer) {\n      element = makeElementIntoAnchor(element, instruction.elementInstruction);\n    }\n\n    containers[instruction.injectorId] = elementContainer = createElementContainer(containers[instruction.parentInjectorId], element, instruction, children, partReplacements, resources);\n\n    for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n      current = behaviorInstructions[i];\n      instance = current.type.create(elementContainer, current, element, bindings);\n      controllers.push(instance);\n    }\n  }\n\n  for (i = 0, ii = expressions.length; i < ii; ++i) {\n    bindings.push(expressions[i].createBinding(element));\n  }\n}\n\nfunction styleStringToObject(style, target) {\n  var attributes = style.split(';');\n  var firstIndexOfColon = void 0;\n  var i = void 0;\n  var current = void 0;\n  var key = void 0;\n  var value = void 0;\n\n  target = target || {};\n\n  for (i = 0; i < attributes.length; i++) {\n    current = attributes[i];\n    firstIndexOfColon = current.indexOf(':');\n    key = current.substring(0, firstIndexOfColon).trim();\n    value = current.substring(firstIndexOfColon + 1).trim();\n    target[key] = value;\n  }\n\n  return target;\n}\n\nfunction styleObjectToString(obj) {\n  var result = '';\n\n  for (var _key4 in obj) {\n    result += _key4 + ':' + obj[_key4] + ';';\n  }\n\n  return result;\n}\n\nfunction applySurrogateInstruction(container, element, instruction, controllers, bindings, children) {\n  var behaviorInstructions = instruction.behaviorInstructions;\n  var expressions = instruction.expressions;\n  var providers = instruction.providers;\n  var values = instruction.values;\n  var i = void 0;\n  var ii = void 0;\n  var current = void 0;\n  var instance = void 0;\n  var currentAttributeValue = void 0;\n\n  i = providers.length;\n  while (i--) {\n    container._resolvers.set(providers[i], providerResolverInstance);\n  }\n\n  for (var _key5 in values) {\n    currentAttributeValue = element.getAttribute(_key5);\n\n    if (currentAttributeValue) {\n      if (_key5 === 'class') {\n        element.setAttribute('class', currentAttributeValue + ' ' + values[_key5]);\n      } else if (_key5 === 'style') {\n        var styleObject = styleStringToObject(values[_key5]);\n        styleStringToObject(currentAttributeValue, styleObject);\n        element.setAttribute('style', styleObjectToString(styleObject));\n      }\n    } else {\n      element.setAttribute(_key5, values[_key5]);\n    }\n  }\n\n  if (behaviorInstructions.length) {\n    for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n      current = behaviorInstructions[i];\n      instance = current.type.create(container, current, element, bindings);\n\n      if (instance.contentView) {\n        children.push(instance.contentView);\n      }\n\n      controllers.push(instance);\n    }\n  }\n\n  for (i = 0, ii = expressions.length; i < ii; ++i) {\n    bindings.push(expressions[i].createBinding(element));\n  }\n}\n\nexport var BoundViewFactory = function () {\n  function BoundViewFactory(parentContainer, viewFactory, partReplacements) {\n    \n\n    this.parentContainer = parentContainer;\n    this.viewFactory = viewFactory;\n    this.factoryCreateInstruction = { partReplacements: partReplacements };\n  }\n\n  BoundViewFactory.prototype.create = function create() {\n    var view = this.viewFactory.create(this.parentContainer.createChild(), this.factoryCreateInstruction);\n    view._isUserControlled = true;\n    return view;\n  };\n\n  BoundViewFactory.prototype.setCacheSize = function setCacheSize(size, doNotOverrideIfAlreadySet) {\n    this.viewFactory.setCacheSize(size, doNotOverrideIfAlreadySet);\n  };\n\n  BoundViewFactory.prototype.getCachedView = function getCachedView() {\n    return this.viewFactory.getCachedView();\n  };\n\n  BoundViewFactory.prototype.returnViewToCache = function returnViewToCache(view) {\n    this.viewFactory.returnViewToCache(view);\n  };\n\n  _createClass(BoundViewFactory, [{\n    key: 'isCaching',\n    get: function get() {\n      return this.viewFactory.isCaching;\n    }\n  }]);\n\n  return BoundViewFactory;\n}();\n\nexport var ViewFactory = function () {\n  function ViewFactory(template, instructions, resources) {\n    \n\n    this.isCaching = false;\n\n    this.template = template;\n    this.instructions = instructions;\n    this.resources = resources;\n    this.cacheSize = -1;\n    this.cache = null;\n  }\n\n  ViewFactory.prototype.setCacheSize = function setCacheSize(size, doNotOverrideIfAlreadySet) {\n    if (size) {\n      if (size === '*') {\n        size = Number.MAX_VALUE;\n      } else if (typeof size === 'string') {\n        size = parseInt(size, 10);\n      }\n    }\n\n    if (this.cacheSize === -1 || !doNotOverrideIfAlreadySet) {\n      this.cacheSize = size;\n    }\n\n    if (this.cacheSize > 0) {\n      this.cache = [];\n    } else {\n      this.cache = null;\n    }\n\n    this.isCaching = this.cacheSize > 0;\n  };\n\n  ViewFactory.prototype.getCachedView = function getCachedView() {\n    return this.cache !== null ? this.cache.pop() || null : null;\n  };\n\n  ViewFactory.prototype.returnViewToCache = function returnViewToCache(view) {\n    if (view.isAttached) {\n      view.detached();\n    }\n\n    if (view.isBound) {\n      view.unbind();\n    }\n\n    if (this.cache !== null && this.cache.length < this.cacheSize) {\n      view.fromCache = true;\n      this.cache.push(view);\n    }\n  };\n\n  ViewFactory.prototype.create = function create(container, createInstruction, element) {\n    createInstruction = createInstruction || BehaviorInstruction.normal;\n\n    var cachedView = this.getCachedView();\n    if (cachedView !== null) {\n      return cachedView;\n    }\n\n    var fragment = createInstruction.enhance ? this.template : this.template.cloneNode(true);\n    var instructables = fragment.querySelectorAll('.au-target');\n    var instructions = this.instructions;\n    var resources = this.resources;\n    var controllers = [];\n    var bindings = [];\n    var children = [];\n    var shadowSlots = Object.create(null);\n    var containers = { root: container };\n    var partReplacements = createInstruction.partReplacements;\n    var i = void 0;\n    var ii = void 0;\n    var view = void 0;\n    var instructable = void 0;\n    var instruction = void 0;\n\n    this.resources._invokeHook('beforeCreate', this, container, fragment, createInstruction);\n\n    if (element && this.surrogateInstruction !== null) {\n      applySurrogateInstruction(container, element, this.surrogateInstruction, controllers, bindings, children);\n    }\n\n    if (createInstruction.enhance && fragment.hasAttribute('au-target-id')) {\n      instructable = fragment;\n      instruction = instructions[instructable.getAttribute('au-target-id')];\n      applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);\n    }\n\n    for (i = 0, ii = instructables.length; i < ii; ++i) {\n      instructable = instructables[i];\n      instruction = instructions[instructable.getAttribute('au-target-id')];\n      applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);\n    }\n\n    view = new View(container, this, fragment, controllers, bindings, children, shadowSlots);\n\n    if (!createInstruction.initiatedByBehavior) {\n      view.created();\n    }\n\n    this.resources._invokeHook('afterCreate', view);\n\n    return view;\n  };\n\n  return ViewFactory;\n}();\n\nvar nextInjectorId = 0;\nfunction getNextInjectorId() {\n  return ++nextInjectorId;\n}\n\nvar lastAUTargetID = 0;\nfunction getNextAUTargetID() {\n  return (++lastAUTargetID).toString();\n}\n\nfunction makeIntoInstructionTarget(element) {\n  var value = element.getAttribute('class');\n  var auTargetID = getNextAUTargetID();\n\n  element.setAttribute('class', value ? value + ' au-target' : 'au-target');\n  element.setAttribute('au-target-id', auTargetID);\n\n  return auTargetID;\n}\n\nfunction makeShadowSlot(compiler, resources, node, instructions, parentInjectorId) {\n  var auShadowSlot = DOM.createElement('au-shadow-slot');\n  DOM.replaceNode(auShadowSlot, node);\n\n  var auTargetID = makeIntoInstructionTarget(auShadowSlot);\n  var instruction = TargetInstruction.shadowSlot(parentInjectorId);\n\n  instruction.slotName = node.getAttribute('name') || ShadowDOM.defaultSlotKey;\n  instruction.slotDestination = node.getAttribute('slot');\n\n  if (node.innerHTML.trim()) {\n    var fragment = DOM.createDocumentFragment();\n    var _child4 = void 0;\n\n    while (_child4 = node.firstChild) {\n      fragment.appendChild(_child4);\n    }\n\n    instruction.slotFallbackFactory = compiler.compile(fragment, resources);\n  }\n\n  instructions[auTargetID] = instruction;\n\n  return auShadowSlot;\n}\n\nvar defaultLetHandler = BindingLanguage.prototype.createLetExpressions;\n\nexport var ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7(_class13 = function () {\n  function ViewCompiler(bindingLanguage, resources) {\n    \n\n    this.bindingLanguage = bindingLanguage;\n    this.resources = resources;\n  }\n\n  ViewCompiler.prototype.compile = function compile(source, resources, compileInstruction) {\n    resources = resources || this.resources;\n    compileInstruction = compileInstruction || ViewCompileInstruction.normal;\n    source = typeof source === 'string' ? DOM.createTemplateFromMarkup(source) : source;\n\n    var content = void 0;\n    var part = void 0;\n    var cacheSize = void 0;\n\n    if (source.content) {\n      part = source.getAttribute('part');\n      cacheSize = source.getAttribute('view-cache');\n      content = DOM.adoptNode(source.content);\n    } else {\n      content = source;\n    }\n\n    compileInstruction.targetShadowDOM = compileInstruction.targetShadowDOM && FEATURE.shadowDOM;\n    resources._invokeHook('beforeCompile', content, resources, compileInstruction);\n\n    var instructions = {};\n    this._compileNode(content, resources, instructions, source, 'root', !compileInstruction.targetShadowDOM);\n\n    var firstChild = content.firstChild;\n    if (firstChild && firstChild.nodeType === 1) {\n      var targetId = firstChild.getAttribute('au-target-id');\n      if (targetId) {\n        var ins = instructions[targetId];\n\n        if (ins.shadowSlot || ins.lifting || ins.elementInstruction && !ins.elementInstruction.anchorIsContainer) {\n          content.insertBefore(DOM.createComment('view'), firstChild);\n        }\n      }\n    }\n\n    var factory = new ViewFactory(content, instructions, resources);\n\n    factory.surrogateInstruction = compileInstruction.compileSurrogate ? this._compileSurrogate(source, resources) : null;\n    factory.part = part;\n\n    if (cacheSize) {\n      factory.setCacheSize(cacheSize);\n    }\n\n    resources._invokeHook('afterCompile', factory);\n\n    return factory;\n  };\n\n  ViewCompiler.prototype._compileNode = function _compileNode(node, resources, instructions, parentNode, parentInjectorId, targetLightDOM) {\n    switch (node.nodeType) {\n      case 1:\n        return this._compileElement(node, resources, instructions, parentNode, parentInjectorId, targetLightDOM);\n      case 3:\n        var expression = resources.getBindingLanguage(this.bindingLanguage).inspectTextContent(resources, node.wholeText);\n        if (expression) {\n          var marker = DOM.createElement('au-marker');\n          var auTargetID = makeIntoInstructionTarget(marker);\n          (node.parentNode || parentNode).insertBefore(marker, node);\n          node.textContent = ' ';\n          instructions[auTargetID] = TargetInstruction.contentExpression(expression);\n\n          while (node.nextSibling && node.nextSibling.nodeType === 3) {\n            (node.parentNode || parentNode).removeChild(node.nextSibling);\n          }\n        } else {\n          while (node.nextSibling && node.nextSibling.nodeType === 3) {\n            node = node.nextSibling;\n          }\n        }\n        return node.nextSibling;\n      case 11:\n        var currentChild = node.firstChild;\n        while (currentChild) {\n          currentChild = this._compileNode(currentChild, resources, instructions, node, parentInjectorId, targetLightDOM);\n        }\n        break;\n      default:\n        break;\n    }\n\n    return node.nextSibling;\n  };\n\n  ViewCompiler.prototype._compileSurrogate = function _compileSurrogate(node, resources) {\n    var tagName = node.tagName.toLowerCase();\n    var attributes = node.attributes;\n    var bindingLanguage = resources.getBindingLanguage(this.bindingLanguage);\n    var knownAttribute = void 0;\n    var property = void 0;\n    var instruction = void 0;\n    var i = void 0;\n    var ii = void 0;\n    var attr = void 0;\n    var attrName = void 0;\n    var attrValue = void 0;\n    var info = void 0;\n    var type = void 0;\n    var expressions = [];\n    var expression = void 0;\n    var behaviorInstructions = [];\n    var values = {};\n    var hasValues = false;\n    var providers = [];\n\n    for (i = 0, ii = attributes.length; i < ii; ++i) {\n      attr = attributes[i];\n      attrName = attr.name;\n      attrValue = attr.value;\n\n      info = bindingLanguage.inspectAttribute(resources, tagName, attrName, attrValue);\n      type = resources.getAttribute(info.attrName);\n\n      if (type) {\n        knownAttribute = resources.mapAttribute(info.attrName);\n        if (knownAttribute) {\n          property = type.attributes[knownAttribute];\n\n          if (property) {\n            info.defaultBindingMode = property.defaultBindingMode;\n\n            if (!info.command && !info.expression) {\n              info.command = property.hasOptions ? 'options' : null;\n            }\n\n            if (info.command && info.command !== 'options' && type.primaryProperty) {\n              var _primaryProperty = type.primaryProperty;\n              attrName = info.attrName = _primaryProperty.attribute;\n\n              info.defaultBindingMode = _primaryProperty.defaultBindingMode;\n            }\n          }\n        }\n      }\n\n      instruction = bindingLanguage.createAttributeInstruction(resources, node, info, undefined, type);\n\n      if (instruction) {\n        if (instruction.alteredAttr) {\n          type = resources.getAttribute(instruction.attrName);\n        }\n\n        if (instruction.discrete) {\n          expressions.push(instruction);\n        } else {\n          if (type) {\n            instruction.type = type;\n            this._configureProperties(instruction, resources);\n\n            if (type.liftsContent) {\n              throw new Error('You cannot place a template controller on a surrogate element.');\n            } else {\n              behaviorInstructions.push(instruction);\n            }\n          } else {\n            expressions.push(instruction.attributes[instruction.attrName]);\n          }\n        }\n      } else {\n        if (type) {\n          instruction = BehaviorInstruction.attribute(attrName, type);\n          instruction.attributes[resources.mapAttribute(attrName)] = attrValue;\n\n          if (type.liftsContent) {\n            throw new Error('You cannot place a template controller on a surrogate element.');\n          } else {\n            behaviorInstructions.push(instruction);\n          }\n        } else if (attrName !== 'id' && attrName !== 'part' && attrName !== 'replace-part') {\n          hasValues = true;\n          values[attrName] = attrValue;\n        }\n      }\n    }\n\n    if (expressions.length || behaviorInstructions.length || hasValues) {\n      for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n        instruction = behaviorInstructions[i];\n        instruction.type.compile(this, resources, node, instruction);\n        providers.push(instruction.type.target);\n      }\n\n      for (i = 0, ii = expressions.length; i < ii; ++i) {\n        expression = expressions[i];\n        if (expression.attrToRemove !== undefined) {\n          node.removeAttribute(expression.attrToRemove);\n        }\n      }\n\n      return TargetInstruction.surrogate(providers, behaviorInstructions, expressions, values);\n    }\n\n    return null;\n  };\n\n  ViewCompiler.prototype._compileElement = function _compileElement(node, resources, instructions, parentNode, parentInjectorId, targetLightDOM) {\n    var tagName = node.tagName.toLowerCase();\n    var attributes = node.attributes;\n    var expressions = [];\n    var expression = void 0;\n    var behaviorInstructions = [];\n    var providers = [];\n    var bindingLanguage = resources.getBindingLanguage(this.bindingLanguage);\n    var liftingInstruction = void 0;\n    var viewFactory = void 0;\n    var type = void 0;\n    var elementInstruction = void 0;\n    var elementProperty = void 0;\n    var i = void 0;\n    var ii = void 0;\n    var attr = void 0;\n    var attrName = void 0;\n    var attrValue = void 0;\n    var originalAttrName = void 0;\n    var instruction = void 0;\n    var info = void 0;\n    var property = void 0;\n    var knownAttribute = void 0;\n    var auTargetID = void 0;\n    var injectorId = void 0;\n\n    if (tagName === 'slot') {\n      if (targetLightDOM) {\n        node = makeShadowSlot(this, resources, node, instructions, parentInjectorId);\n      }\n      return node.nextSibling;\n    } else if (tagName === 'template') {\n      if (!('content' in node)) {\n        throw new Error('You cannot place a template element within ' + node.namespaceURI + ' namespace');\n      }\n      viewFactory = this.compile(node, resources);\n      viewFactory.part = node.getAttribute('part');\n    } else {\n      type = resources.getElement(node.getAttribute('as-element') || tagName);\n\n      if (tagName === 'let' && !type && bindingLanguage.createLetExpressions !== defaultLetHandler) {\n        expressions = bindingLanguage.createLetExpressions(resources, node);\n        auTargetID = makeIntoInstructionTarget(node);\n        instructions[auTargetID] = TargetInstruction.letElement(expressions);\n        return node.nextSibling;\n      }\n      if (type) {\n        elementInstruction = BehaviorInstruction.element(node, type);\n        type.processAttributes(this, resources, node, attributes, elementInstruction);\n        behaviorInstructions.push(elementInstruction);\n      }\n    }\n\n    for (i = 0, ii = attributes.length; i < ii; ++i) {\n      attr = attributes[i];\n      originalAttrName = attrName = attr.name;\n      attrValue = attr.value;\n      info = bindingLanguage.inspectAttribute(resources, tagName, attrName, attrValue);\n\n      if (targetLightDOM && info.attrName === 'slot') {\n        info.attrName = attrName = 'au-slot';\n      }\n\n      type = resources.getAttribute(info.attrName);\n      elementProperty = null;\n\n      if (type) {\n        knownAttribute = resources.mapAttribute(info.attrName);\n        if (knownAttribute) {\n          property = type.attributes[knownAttribute];\n\n          if (property) {\n            info.defaultBindingMode = property.defaultBindingMode;\n\n            if (!info.command && !info.expression) {\n              info.command = property.hasOptions ? 'options' : null;\n            }\n\n            if (info.command && info.command !== 'options' && type.primaryProperty) {\n              var _primaryProperty2 = type.primaryProperty;\n              attrName = info.attrName = _primaryProperty2.attribute;\n\n              info.defaultBindingMode = _primaryProperty2.defaultBindingMode;\n            }\n          }\n        }\n      } else if (elementInstruction) {\n        elementProperty = elementInstruction.type.attributes[info.attrName];\n        if (elementProperty) {\n          info.defaultBindingMode = elementProperty.defaultBindingMode;\n        }\n      }\n\n      if (elementProperty) {\n        instruction = bindingLanguage.createAttributeInstruction(resources, node, info, elementInstruction);\n      } else {\n        instruction = bindingLanguage.createAttributeInstruction(resources, node, info, undefined, type);\n      }\n\n      if (instruction) {\n        if (instruction.alteredAttr) {\n          type = resources.getAttribute(instruction.attrName);\n        }\n\n        if (instruction.discrete) {\n          expressions.push(instruction);\n        } else {\n          if (type) {\n            instruction.type = type;\n            this._configureProperties(instruction, resources);\n\n            if (type.liftsContent) {\n              instruction.originalAttrName = originalAttrName;\n              liftingInstruction = instruction;\n              break;\n            } else {\n              behaviorInstructions.push(instruction);\n            }\n          } else if (elementProperty) {\n            elementInstruction.attributes[info.attrName].targetProperty = elementProperty.name;\n          } else {\n            expressions.push(instruction.attributes[instruction.attrName]);\n          }\n        }\n      } else {\n        if (type) {\n          instruction = BehaviorInstruction.attribute(attrName, type);\n          instruction.attributes[resources.mapAttribute(attrName)] = attrValue;\n\n          if (type.liftsContent) {\n            instruction.originalAttrName = originalAttrName;\n            liftingInstruction = instruction;\n            break;\n          } else {\n            behaviorInstructions.push(instruction);\n          }\n        } else if (elementProperty) {\n          elementInstruction.attributes[attrName] = attrValue;\n        }\n      }\n    }\n\n    if (liftingInstruction) {\n      liftingInstruction.viewFactory = viewFactory;\n      node = liftingInstruction.type.compile(this, resources, node, liftingInstruction, parentNode);\n      auTargetID = makeIntoInstructionTarget(node);\n      instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction);\n    } else {\n      var skipContentProcessing = false;\n\n      if (expressions.length || behaviorInstructions.length) {\n        injectorId = behaviorInstructions.length ? getNextInjectorId() : false;\n\n        for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n          instruction = behaviorInstructions[i];\n          instruction.type.compile(this, resources, node, instruction, parentNode);\n          providers.push(instruction.type.target);\n          skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing;\n        }\n\n        for (i = 0, ii = expressions.length; i < ii; ++i) {\n          expression = expressions[i];\n          if (expression.attrToRemove !== undefined) {\n            node.removeAttribute(expression.attrToRemove);\n          }\n        }\n\n        auTargetID = makeIntoInstructionTarget(node);\n        instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction);\n      }\n\n      if (skipContentProcessing) {\n        return node.nextSibling;\n      }\n\n      var currentChild = node.firstChild;\n      while (currentChild) {\n        currentChild = this._compileNode(currentChild, resources, instructions, node, injectorId || parentInjectorId, targetLightDOM);\n      }\n    }\n\n    return node.nextSibling;\n  };\n\n  ViewCompiler.prototype._configureProperties = function _configureProperties(instruction, resources) {\n    var type = instruction.type;\n    var attrName = instruction.attrName;\n    var attributes = instruction.attributes;\n    var property = void 0;\n    var key = void 0;\n    var value = void 0;\n\n    var knownAttribute = resources.mapAttribute(attrName);\n    if (knownAttribute && attrName in attributes && knownAttribute !== attrName) {\n      attributes[knownAttribute] = attributes[attrName];\n      delete attributes[attrName];\n    }\n\n    for (key in attributes) {\n      value = attributes[key];\n\n      if (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\n        property = type.attributes[key];\n\n        if (property !== undefined) {\n          value.targetProperty = property.name;\n        } else {\n          value.targetProperty = key;\n        }\n      }\n    }\n  };\n\n  return ViewCompiler;\n}()) || _class13);\n\nexport var ResourceModule = function () {\n  function ResourceModule(moduleId) {\n    \n\n    this.id = moduleId;\n    this.moduleInstance = null;\n    this.mainResource = null;\n    this.resources = null;\n    this.viewStrategy = null;\n    this.isInitialized = false;\n    this.onLoaded = null;\n    this.loadContext = null;\n  }\n\n  ResourceModule.prototype.initialize = function initialize(container) {\n    var current = this.mainResource;\n    var resources = this.resources;\n    var vs = this.viewStrategy;\n\n    if (this.isInitialized) {\n      return;\n    }\n\n    this.isInitialized = true;\n\n    if (current !== undefined) {\n      current.metadata.viewStrategy = vs;\n      current.initialize(container);\n    }\n\n    for (var i = 0, ii = resources.length; i < ii; ++i) {\n      current = resources[i];\n      current.metadata.viewStrategy = vs;\n      current.initialize(container);\n    }\n  };\n\n  ResourceModule.prototype.register = function register(registry, name) {\n    var main = this.mainResource;\n    var resources = this.resources;\n\n    if (main !== undefined) {\n      main.register(registry, name);\n      name = null;\n    }\n\n    for (var i = 0, ii = resources.length; i < ii; ++i) {\n      resources[i].register(registry, name);\n      name = null;\n    }\n  };\n\n  ResourceModule.prototype.load = function load(container, loadContext) {\n    if (this.onLoaded !== null) {\n      return this.loadContext === loadContext ? Promise.resolve() : this.onLoaded;\n    }\n\n    var main = this.mainResource;\n    var resources = this.resources;\n    var loads = void 0;\n\n    if (main !== undefined) {\n      loads = new Array(resources.length + 1);\n      loads[0] = main.load(container, loadContext);\n      for (var i = 0, ii = resources.length; i < ii; ++i) {\n        loads[i + 1] = resources[i].load(container, loadContext);\n      }\n    } else {\n      loads = new Array(resources.length);\n      for (var _i2 = 0, _ii = resources.length; _i2 < _ii; ++_i2) {\n        loads[_i2] = resources[_i2].load(container, loadContext);\n      }\n    }\n\n    this.loadContext = loadContext;\n    this.onLoaded = Promise.all(loads);\n    return this.onLoaded;\n  };\n\n  return ResourceModule;\n}();\n\nexport var ResourceDescription = function () {\n  function ResourceDescription(key, exportedValue, resourceTypeMeta) {\n    \n\n    if (!resourceTypeMeta) {\n      resourceTypeMeta = metadata.get(metadata.resource, exportedValue);\n\n      if (!resourceTypeMeta) {\n        resourceTypeMeta = new HtmlBehaviorResource();\n        resourceTypeMeta.elementName = _hyphenate(key);\n        metadata.define(metadata.resource, resourceTypeMeta, exportedValue);\n      }\n    }\n\n    if (resourceTypeMeta instanceof HtmlBehaviorResource) {\n      if (resourceTypeMeta.elementName === undefined) {\n        resourceTypeMeta.elementName = _hyphenate(key);\n      } else if (resourceTypeMeta.attributeName === undefined) {\n        resourceTypeMeta.attributeName = _hyphenate(key);\n      } else if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n        HtmlBehaviorResource.convention(key, resourceTypeMeta);\n      }\n    } else if (!resourceTypeMeta.name) {\n      resourceTypeMeta.name = _hyphenate(key);\n    }\n\n    this.metadata = resourceTypeMeta;\n    this.value = exportedValue;\n  }\n\n  ResourceDescription.prototype.initialize = function initialize(container) {\n    this.metadata.initialize(container, this.value);\n  };\n\n  ResourceDescription.prototype.register = function register(registry, name) {\n    this.metadata.register(registry, name);\n  };\n\n  ResourceDescription.prototype.load = function load(container, loadContext) {\n    return this.metadata.load(container, this.value, loadContext);\n  };\n\n  return ResourceDescription;\n}();\n\nexport var ModuleAnalyzer = function () {\n  function ModuleAnalyzer() {\n    \n\n    this.cache = Object.create(null);\n  }\n\n  ModuleAnalyzer.prototype.getAnalysis = function getAnalysis(moduleId) {\n    return this.cache[moduleId];\n  };\n\n  ModuleAnalyzer.prototype.analyze = function analyze(moduleId, moduleInstance, mainResourceKey) {\n    var mainResource = void 0;\n    var fallbackValue = void 0;\n    var fallbackKey = void 0;\n    var resourceTypeMeta = void 0;\n    var key = void 0;\n    var exportedValue = void 0;\n    var resources = [];\n    var conventional = void 0;\n    var vs = void 0;\n    var resourceModule = void 0;\n\n    resourceModule = this.cache[moduleId];\n    if (resourceModule) {\n      return resourceModule;\n    }\n\n    resourceModule = new ResourceModule(moduleId);\n    this.cache[moduleId] = resourceModule;\n\n    if (typeof moduleInstance === 'function') {\n      moduleInstance = { 'default': moduleInstance };\n    }\n\n    if (mainResourceKey) {\n      mainResource = new ResourceDescription(mainResourceKey, moduleInstance[mainResourceKey]);\n    }\n\n    for (key in moduleInstance) {\n      exportedValue = moduleInstance[key];\n\n      if (key === mainResourceKey || typeof exportedValue !== 'function') {\n        continue;\n      }\n\n      resourceTypeMeta = metadata.get(metadata.resource, exportedValue);\n\n      if (resourceTypeMeta) {\n        if (resourceTypeMeta instanceof HtmlBehaviorResource) {\n          ViewResources.convention(exportedValue, resourceTypeMeta);\n\n          if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n            HtmlBehaviorResource.convention(key, resourceTypeMeta);\n          }\n\n          if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n            resourceTypeMeta.elementName = _hyphenate(key);\n          }\n        }\n\n        if (!mainResource && resourceTypeMeta instanceof HtmlBehaviorResource && resourceTypeMeta.elementName !== null) {\n          mainResource = new ResourceDescription(key, exportedValue, resourceTypeMeta);\n        } else {\n          resources.push(new ResourceDescription(key, exportedValue, resourceTypeMeta));\n        }\n      } else if (viewStrategy.decorates(exportedValue)) {\n        vs = exportedValue;\n      } else if (exportedValue instanceof TemplateRegistryEntry) {\n        vs = new TemplateRegistryViewStrategy(moduleId, exportedValue);\n      } else {\n        if (conventional = ViewResources.convention(exportedValue)) {\n          if (conventional.elementName !== null && !mainResource) {\n            mainResource = new ResourceDescription(key, exportedValue, conventional);\n          } else {\n            resources.push(new ResourceDescription(key, exportedValue, conventional));\n          }\n          metadata.define(metadata.resource, conventional, exportedValue);\n        } else if (conventional = HtmlBehaviorResource.convention(key)) {\n          if (conventional.elementName !== null && !mainResource) {\n            mainResource = new ResourceDescription(key, exportedValue, conventional);\n          } else {\n            resources.push(new ResourceDescription(key, exportedValue, conventional));\n          }\n\n          metadata.define(metadata.resource, conventional, exportedValue);\n        } else if (conventional = ValueConverterResource.convention(key) || BindingBehaviorResource.convention(key) || ViewEngineHooksResource.convention(key)) {\n          resources.push(new ResourceDescription(key, exportedValue, conventional));\n          metadata.define(metadata.resource, conventional, exportedValue);\n        } else if (!fallbackValue) {\n          fallbackValue = exportedValue;\n          fallbackKey = key;\n        }\n      }\n    }\n\n    if (!mainResource && fallbackValue) {\n      mainResource = new ResourceDescription(fallbackKey, fallbackValue);\n    }\n\n    resourceModule.moduleInstance = moduleInstance;\n    resourceModule.mainResource = mainResource;\n    resourceModule.resources = resources;\n    resourceModule.viewStrategy = vs;\n\n    return resourceModule;\n  };\n\n  return ModuleAnalyzer;\n}();\n\nvar logger = LogManager.getLogger('templating');\n\nfunction ensureRegistryEntry(loader, urlOrRegistryEntry) {\n  if (urlOrRegistryEntry instanceof TemplateRegistryEntry) {\n    return Promise.resolve(urlOrRegistryEntry);\n  }\n\n  return loader.loadTemplate(urlOrRegistryEntry);\n}\n\nvar ProxyViewFactory = function () {\n  function ProxyViewFactory(promise) {\n    var _this8 = this;\n\n    \n\n    promise.then(function (x) {\n      return _this8.viewFactory = x;\n    });\n  }\n\n  ProxyViewFactory.prototype.create = function create(container, bindingContext, createInstruction, element) {\n    return this.viewFactory.create(container, bindingContext, createInstruction, element);\n  };\n\n  ProxyViewFactory.prototype.setCacheSize = function setCacheSize(size, doNotOverrideIfAlreadySet) {\n    this.viewFactory.setCacheSize(size, doNotOverrideIfAlreadySet);\n  };\n\n  ProxyViewFactory.prototype.getCachedView = function getCachedView() {\n    return this.viewFactory.getCachedView();\n  };\n\n  ProxyViewFactory.prototype.returnViewToCache = function returnViewToCache(view) {\n    this.viewFactory.returnViewToCache(view);\n  };\n\n  _createClass(ProxyViewFactory, [{\n    key: 'isCaching',\n    get: function get() {\n      return this.viewFactory.isCaching;\n    }\n  }]);\n\n  return ProxyViewFactory;\n}();\n\nvar auSlotBehavior = null;\n\nexport var ViewEngine = (_dec8 = inject(Loader, Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class14 = (_temp4 = _class15 = function () {\n  function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) {\n    \n\n    this.loader = loader;\n    this.container = container;\n    this.viewCompiler = viewCompiler;\n    this.moduleAnalyzer = moduleAnalyzer;\n    this.appResources = appResources;\n    this._pluginMap = {};\n\n    if (auSlotBehavior === null) {\n      auSlotBehavior = new HtmlBehaviorResource();\n      auSlotBehavior.attributeName = 'au-slot';\n      metadata.define(metadata.resource, auSlotBehavior, SlotCustomAttribute);\n    }\n\n    auSlotBehavior.initialize(container, SlotCustomAttribute);\n    auSlotBehavior.register(appResources);\n  }\n\n  ViewEngine.prototype.addResourcePlugin = function addResourcePlugin(extension, implementation) {\n    var name = extension.replace('.', '') + '-resource-plugin';\n    this._pluginMap[extension] = name;\n    this.loader.addPlugin(name, implementation);\n  };\n\n  ViewEngine.prototype.loadViewFactory = function loadViewFactory(urlOrRegistryEntry, compileInstruction, loadContext, target) {\n    var _this9 = this;\n\n    loadContext = loadContext || new ResourceLoadContext();\n\n    return ensureRegistryEntry(this.loader, urlOrRegistryEntry).then(function (registryEntry) {\n      var url = registryEntry.address;\n\n      if (registryEntry.onReady) {\n        if (!loadContext.hasDependency(url)) {\n          loadContext.addDependency(url);\n          return registryEntry.onReady;\n        }\n\n        if (registryEntry.template === null) {\n          return registryEntry.onReady;\n        }\n\n        return Promise.resolve(new ProxyViewFactory(registryEntry.onReady));\n      }\n\n      loadContext.addDependency(url);\n\n      registryEntry.onReady = _this9.loadTemplateResources(registryEntry, compileInstruction, loadContext, target).then(function (resources) {\n        registryEntry.resources = resources;\n\n        if (registryEntry.template === null) {\n          return registryEntry.factory = null;\n        }\n\n        var viewFactory = _this9.viewCompiler.compile(registryEntry.template, resources, compileInstruction);\n        return registryEntry.factory = viewFactory;\n      });\n\n      return registryEntry.onReady;\n    });\n  };\n\n  ViewEngine.prototype.loadTemplateResources = function loadTemplateResources(registryEntry, compileInstruction, loadContext, target) {\n    var resources = new ViewResources(this.appResources, registryEntry.address);\n    var dependencies = registryEntry.dependencies;\n    var importIds = void 0;\n    var names = void 0;\n\n    compileInstruction = compileInstruction || ViewCompileInstruction.normal;\n\n    if (dependencies.length === 0 && !compileInstruction.associatedModuleId) {\n      return Promise.resolve(resources);\n    }\n\n    importIds = dependencies.map(function (x) {\n      return x.src;\n    });\n    names = dependencies.map(function (x) {\n      return x.name;\n    });\n    logger.debug('importing resources for ' + registryEntry.address, importIds);\n\n    if (target) {\n      var viewModelRequires = metadata.get(ViewEngine.viewModelRequireMetadataKey, target);\n      if (viewModelRequires) {\n        var templateImportCount = importIds.length;\n        for (var i = 0, ii = viewModelRequires.length; i < ii; ++i) {\n          var req = viewModelRequires[i];\n          var importId = typeof req === 'function' ? Origin.get(req).moduleId : relativeToFile(req.src || req, registryEntry.address);\n\n          if (importIds.indexOf(importId) === -1) {\n            importIds.push(importId);\n            names.push(req.as);\n          }\n        }\n        logger.debug('importing ViewModel resources for ' + compileInstruction.associatedModuleId, importIds.slice(templateImportCount));\n      }\n    }\n\n    return this.importViewResources(importIds, names, resources, compileInstruction, loadContext);\n  };\n\n  ViewEngine.prototype.importViewModelResource = function importViewModelResource(moduleImport, moduleMember) {\n    var _this10 = this;\n\n    return this.loader.loadModule(moduleImport).then(function (viewModelModule) {\n      var normalizedId = Origin.get(viewModelModule).moduleId;\n      var resourceModule = _this10.moduleAnalyzer.analyze(normalizedId, viewModelModule, moduleMember);\n\n      if (!resourceModule.mainResource) {\n        throw new Error('No view model found in module \"' + moduleImport + '\".');\n      }\n\n      resourceModule.initialize(_this10.container);\n\n      return resourceModule.mainResource;\n    });\n  };\n\n  ViewEngine.prototype.importViewResources = function importViewResources(moduleIds, names, resources, compileInstruction, loadContext) {\n    var _this11 = this;\n\n    loadContext = loadContext || new ResourceLoadContext();\n    compileInstruction = compileInstruction || ViewCompileInstruction.normal;\n\n    moduleIds = moduleIds.map(function (x) {\n      return _this11._applyLoaderPlugin(x);\n    });\n\n    return this.loader.loadAllModules(moduleIds).then(function (imports) {\n      var i = void 0;\n      var ii = void 0;\n      var analysis = void 0;\n      var normalizedId = void 0;\n      var current = void 0;\n      var associatedModule = void 0;\n      var container = _this11.container;\n      var moduleAnalyzer = _this11.moduleAnalyzer;\n      var allAnalysis = new Array(imports.length);\n\n      for (i = 0, ii = imports.length; i < ii; ++i) {\n        current = imports[i];\n        normalizedId = Origin.get(current).moduleId;\n\n        analysis = moduleAnalyzer.analyze(normalizedId, current);\n        analysis.initialize(container);\n        analysis.register(resources, names[i]);\n\n        allAnalysis[i] = analysis;\n      }\n\n      if (compileInstruction.associatedModuleId) {\n        associatedModule = moduleAnalyzer.getAnalysis(compileInstruction.associatedModuleId);\n\n        if (associatedModule) {\n          associatedModule.register(resources);\n        }\n      }\n\n      for (i = 0, ii = allAnalysis.length; i < ii; ++i) {\n        allAnalysis[i] = allAnalysis[i].load(container, loadContext);\n      }\n\n      return Promise.all(allAnalysis).then(function () {\n        return resources;\n      });\n    });\n  };\n\n  ViewEngine.prototype._applyLoaderPlugin = function _applyLoaderPlugin(id) {\n    var index = id.lastIndexOf('.');\n    if (index !== -1) {\n      var ext = id.substring(index);\n      var pluginName = this._pluginMap[ext];\n\n      if (pluginName === undefined) {\n        return id;\n      }\n\n      return this.loader.applyPluginToUrl(id, pluginName);\n    }\n\n    return id;\n  };\n\n  return ViewEngine;\n}(), _class15.viewModelRequireMetadataKey = 'aurelia:view-model-require', _temp4)) || _class14);\n\nexport var Controller = function () {\n  function Controller(behavior, instruction, viewModel, container) {\n    \n\n    this.behavior = behavior;\n    this.instruction = instruction;\n    this.viewModel = viewModel;\n    this.isAttached = false;\n    this.view = null;\n    this.isBound = false;\n    this.scope = null;\n    this.container = container;\n    this.elementEvents = container.elementEvents || null;\n\n    var observerLookup = behavior.observerLocator.getOrCreateObserversLookup(viewModel);\n    var handlesBind = behavior.handlesBind;\n    var attributes = instruction.attributes;\n    var boundProperties = this.boundProperties = [];\n    var properties = behavior.properties;\n    var i = void 0;\n    var ii = void 0;\n\n    behavior._ensurePropertiesDefined(viewModel, observerLookup);\n\n    for (i = 0, ii = properties.length; i < ii; ++i) {\n      properties[i]._initialize(viewModel, observerLookup, attributes, handlesBind, boundProperties);\n    }\n  }\n\n  Controller.prototype.created = function created(owningView) {\n    if (this.behavior.handlesCreated) {\n      this.viewModel.created(owningView, this.view);\n    }\n  };\n\n  Controller.prototype.automate = function automate(overrideContext, owningView) {\n    this.view.bindingContext = this.viewModel;\n    this.view.overrideContext = overrideContext || createOverrideContext(this.viewModel);\n    this.view._isUserControlled = true;\n\n    if (this.behavior.handlesCreated) {\n      this.viewModel.created(owningView || null, this.view);\n    }\n\n    this.bind(this.view);\n  };\n\n  Controller.prototype.bind = function bind(scope) {\n    var skipSelfSubscriber = this.behavior.handlesBind;\n    var boundProperties = this.boundProperties;\n    var i = void 0;\n    var ii = void 0;\n    var x = void 0;\n    var observer = void 0;\n    var selfSubscriber = void 0;\n\n    if (this.isBound) {\n      if (this.scope === scope) {\n        return;\n      }\n\n      this.unbind();\n    }\n\n    this.isBound = true;\n    this.scope = scope;\n\n    for (i = 0, ii = boundProperties.length; i < ii; ++i) {\n      x = boundProperties[i];\n      observer = x.observer;\n      selfSubscriber = observer.selfSubscriber;\n      observer.publishing = false;\n\n      if (skipSelfSubscriber) {\n        observer.selfSubscriber = null;\n      }\n\n      x.binding.bind(scope);\n      observer.call();\n\n      observer.publishing = true;\n      observer.selfSubscriber = selfSubscriber;\n    }\n\n    var overrideContext = void 0;\n    if (this.view !== null) {\n      if (skipSelfSubscriber) {\n        this.view.viewModelScope = scope;\n      }\n\n      if (this.viewModel === scope.overrideContext.bindingContext) {\n        overrideContext = scope.overrideContext;\n      } else if (this.instruction.inheritBindingContext) {\n        overrideContext = createOverrideContext(this.viewModel, scope.overrideContext);\n      } else {\n        overrideContext = createOverrideContext(this.viewModel);\n        overrideContext.__parentOverrideContext = scope.overrideContext;\n      }\n\n      this.view.bind(this.viewModel, overrideContext);\n    } else if (skipSelfSubscriber) {\n      overrideContext = scope.overrideContext;\n\n      if (scope.overrideContext.__parentOverrideContext !== undefined && this.viewModel.viewFactory && this.viewModel.viewFactory.factoryCreateInstruction.partReplacements) {\n        overrideContext = Object.assign({}, scope.overrideContext);\n        overrideContext.parentOverrideContext = scope.overrideContext.__parentOverrideContext;\n      }\n      this.viewModel.bind(scope.bindingContext, overrideContext);\n    }\n  };\n\n  Controller.prototype.unbind = function unbind() {\n    if (this.isBound) {\n      var _boundProperties = this.boundProperties;\n      var _i3 = void 0;\n      var _ii2 = void 0;\n\n      this.isBound = false;\n      this.scope = null;\n\n      if (this.view !== null) {\n        this.view.unbind();\n      }\n\n      if (this.behavior.handlesUnbind) {\n        this.viewModel.unbind();\n      }\n\n      if (this.elementEvents !== null) {\n        this.elementEvents.disposeAll();\n      }\n\n      for (_i3 = 0, _ii2 = _boundProperties.length; _i3 < _ii2; ++_i3) {\n        _boundProperties[_i3].binding.unbind();\n      }\n    }\n  };\n\n  Controller.prototype.attached = function attached() {\n    if (this.isAttached) {\n      return;\n    }\n\n    this.isAttached = true;\n\n    if (this.behavior.handlesAttached) {\n      this.viewModel.attached();\n    }\n\n    if (this.view !== null) {\n      this.view.attached();\n    }\n  };\n\n  Controller.prototype.detached = function detached() {\n    if (this.isAttached) {\n      this.isAttached = false;\n\n      if (this.view !== null) {\n        this.view.detached();\n      }\n\n      if (this.behavior.handlesDetached) {\n        this.viewModel.detached();\n      }\n    }\n  };\n\n  return Controller;\n}();\n\nexport var BehaviorPropertyObserver = (_dec9 = subscriberCollection(), _dec9(_class16 = function () {\n  function BehaviorPropertyObserver(taskQueue, obj, propertyName, selfSubscriber, initialValue) {\n    \n\n    this.taskQueue = taskQueue;\n    this.obj = obj;\n    this.propertyName = propertyName;\n    this.notqueued = true;\n    this.publishing = false;\n    this.selfSubscriber = selfSubscriber;\n    this.currentValue = this.oldValue = initialValue;\n  }\n\n  BehaviorPropertyObserver.prototype.getValue = function getValue() {\n    return this.currentValue;\n  };\n\n  BehaviorPropertyObserver.prototype.setValue = function setValue(newValue) {\n    var oldValue = this.currentValue;\n\n    if (!Object.is(newValue, oldValue)) {\n      this.oldValue = oldValue;\n      this.currentValue = newValue;\n\n      if (this.publishing && this.notqueued) {\n        if (this.taskQueue.flushing) {\n          this.call();\n        } else {\n          this.notqueued = false;\n          this.taskQueue.queueMicroTask(this);\n        }\n      }\n    }\n  };\n\n  BehaviorPropertyObserver.prototype.call = function call() {\n    var oldValue = this.oldValue;\n    var newValue = this.currentValue;\n\n    this.notqueued = true;\n\n    if (Object.is(newValue, oldValue)) {\n      return;\n    }\n\n    if (this.selfSubscriber) {\n      this.selfSubscriber(newValue, oldValue);\n    }\n\n    this.callSubscribers(newValue, oldValue);\n    this.oldValue = newValue;\n  };\n\n  BehaviorPropertyObserver.prototype.subscribe = function subscribe(context, callable) {\n    this.addSubscriber(context, callable);\n  };\n\n  BehaviorPropertyObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n    this.removeSubscriber(context, callable);\n  };\n\n  return BehaviorPropertyObserver;\n}()) || _class16);\n\nfunction getObserver(instance, name) {\n  var lookup = instance.__observers__;\n\n  if (lookup === undefined) {\n    var ctor = Object.getPrototypeOf(instance).constructor;\n    var _behavior = metadata.get(metadata.resource, ctor);\n    if (!_behavior.isInitialized) {\n      _behavior.initialize(Container.instance || new Container(), instance.constructor);\n    }\n\n    lookup = _behavior.observerLocator.getOrCreateObserversLookup(instance);\n    _behavior._ensurePropertiesDefined(instance, lookup);\n  }\n\n  return lookup[name];\n}\n\nexport var BindableProperty = function () {\n  function BindableProperty(nameOrConfig) {\n    \n\n    if (typeof nameOrConfig === 'string') {\n      this.name = nameOrConfig;\n    } else {\n      Object.assign(this, nameOrConfig);\n    }\n\n    this.attribute = this.attribute || _hyphenate(this.name);\n    var defaultBindingMode = this.defaultBindingMode;\n    if (defaultBindingMode === null || defaultBindingMode === undefined) {\n      this.defaultBindingMode = bindingMode.oneWay;\n    } else if (typeof defaultBindingMode === 'string') {\n      this.defaultBindingMode = bindingMode[defaultBindingMode] || bindingMode.oneWay;\n    }\n    this.changeHandler = this.changeHandler || null;\n    this.owner = null;\n    this.descriptor = null;\n  }\n\n  BindableProperty.prototype.registerWith = function registerWith(target, behavior, descriptor) {\n    behavior.properties.push(this);\n    behavior.attributes[this.attribute] = this;\n    this.owner = behavior;\n\n    if (descriptor) {\n      this.descriptor = descriptor;\n      return this._configureDescriptor(descriptor);\n    }\n\n    return undefined;\n  };\n\n  BindableProperty.prototype._configureDescriptor = function _configureDescriptor(descriptor) {\n    var name = this.name;\n\n    descriptor.configurable = true;\n    descriptor.enumerable = true;\n\n    if ('initializer' in descriptor) {\n      this.defaultValue = descriptor.initializer;\n      delete descriptor.initializer;\n      delete descriptor.writable;\n    }\n\n    if ('value' in descriptor) {\n      this.defaultValue = descriptor.value;\n      delete descriptor.value;\n      delete descriptor.writable;\n    }\n\n    descriptor.get = function () {\n      return getObserver(this, name).getValue();\n    };\n\n    descriptor.set = function (value) {\n      getObserver(this, name).setValue(value);\n    };\n\n    descriptor.get.getObserver = function (obj) {\n      return getObserver(obj, name);\n    };\n\n    return descriptor;\n  };\n\n  BindableProperty.prototype.defineOn = function defineOn(target, behavior) {\n    var name = this.name;\n    var handlerName = void 0;\n\n    if (this.changeHandler === null) {\n      handlerName = name + 'Changed';\n      if (handlerName in target.prototype) {\n        this.changeHandler = handlerName;\n      }\n    }\n\n    if (this.descriptor === null) {\n      Object.defineProperty(target.prototype, name, this._configureDescriptor(behavior, {}));\n    }\n  };\n\n  BindableProperty.prototype.createObserver = function createObserver(viewModel) {\n    var selfSubscriber = null;\n    var defaultValue = this.defaultValue;\n    var changeHandlerName = this.changeHandler;\n    var name = this.name;\n    var initialValue = void 0;\n\n    if (this.hasOptions) {\n      return undefined;\n    }\n\n    if (changeHandlerName in viewModel) {\n      if ('propertyChanged' in viewModel) {\n        selfSubscriber = function selfSubscriber(newValue, oldValue) {\n          viewModel[changeHandlerName](newValue, oldValue);\n          viewModel.propertyChanged(name, newValue, oldValue);\n        };\n      } else {\n        selfSubscriber = function selfSubscriber(newValue, oldValue) {\n          return viewModel[changeHandlerName](newValue, oldValue);\n        };\n      }\n    } else if ('propertyChanged' in viewModel) {\n      selfSubscriber = function selfSubscriber(newValue, oldValue) {\n        return viewModel.propertyChanged(name, newValue, oldValue);\n      };\n    } else if (changeHandlerName !== null) {\n      throw new Error('Change handler ' + changeHandlerName + ' was specified but not declared on the class.');\n    }\n\n    if (defaultValue !== undefined) {\n      initialValue = typeof defaultValue === 'function' ? defaultValue.call(viewModel) : defaultValue;\n    }\n\n    return new BehaviorPropertyObserver(this.owner.taskQueue, viewModel, this.name, selfSubscriber, initialValue);\n  };\n\n  BindableProperty.prototype._initialize = function _initialize(viewModel, observerLookup, attributes, behaviorHandlesBind, boundProperties) {\n    var selfSubscriber = void 0;\n    var observer = void 0;\n    var attribute = void 0;\n    var defaultValue = this.defaultValue;\n\n    if (this.isDynamic) {\n      for (var _key6 in attributes) {\n        this._createDynamicProperty(viewModel, observerLookup, behaviorHandlesBind, _key6, attributes[_key6], boundProperties);\n      }\n    } else if (!this.hasOptions) {\n      observer = observerLookup[this.name];\n\n      if (attributes !== null) {\n        selfSubscriber = observer.selfSubscriber;\n        attribute = attributes[this.attribute];\n\n        if (behaviorHandlesBind) {\n          observer.selfSubscriber = null;\n        }\n\n        if (typeof attribute === 'string') {\n          viewModel[this.name] = attribute;\n          observer.call();\n        } else if (attribute) {\n          boundProperties.push({ observer: observer, binding: attribute.createBinding(viewModel) });\n        } else if (defaultValue !== undefined) {\n          observer.call();\n        }\n\n        observer.selfSubscriber = selfSubscriber;\n      }\n\n      observer.publishing = true;\n    }\n  };\n\n  BindableProperty.prototype._createDynamicProperty = function _createDynamicProperty(viewModel, observerLookup, behaviorHandlesBind, name, attribute, boundProperties) {\n    var changeHandlerName = name + 'Changed';\n    var selfSubscriber = null;\n    var observer = void 0;\n    var info = void 0;\n\n    if (changeHandlerName in viewModel) {\n      if ('propertyChanged' in viewModel) {\n        selfSubscriber = function selfSubscriber(newValue, oldValue) {\n          viewModel[changeHandlerName](newValue, oldValue);\n          viewModel.propertyChanged(name, newValue, oldValue);\n        };\n      } else {\n        selfSubscriber = function selfSubscriber(newValue, oldValue) {\n          return viewModel[changeHandlerName](newValue, oldValue);\n        };\n      }\n    } else if ('propertyChanged' in viewModel) {\n      selfSubscriber = function selfSubscriber(newValue, oldValue) {\n        return viewModel.propertyChanged(name, newValue, oldValue);\n      };\n    }\n\n    observer = observerLookup[name] = new BehaviorPropertyObserver(this.owner.taskQueue, viewModel, name, selfSubscriber);\n\n    Object.defineProperty(viewModel, name, {\n      configurable: true,\n      enumerable: true,\n      get: observer.getValue.bind(observer),\n      set: observer.setValue.bind(observer)\n    });\n\n    if (behaviorHandlesBind) {\n      observer.selfSubscriber = null;\n    }\n\n    if (typeof attribute === 'string') {\n      viewModel[name] = attribute;\n      observer.call();\n    } else if (attribute) {\n      info = { observer: observer, binding: attribute.createBinding(viewModel) };\n      boundProperties.push(info);\n    }\n\n    observer.publishing = true;\n    observer.selfSubscriber = selfSubscriber;\n  };\n\n  return BindableProperty;\n}();\n\nvar lastProviderId = 0;\n\nfunction nextProviderId() {\n  return ++lastProviderId;\n}\n\nfunction doProcessContent() {\n  return true;\n}\nfunction doProcessAttributes() {}\n\nexport var HtmlBehaviorResource = function () {\n  function HtmlBehaviorResource() {\n    \n\n    this.elementName = null;\n    this.attributeName = null;\n    this.attributeDefaultBindingMode = undefined;\n    this.liftsContent = false;\n    this.targetShadowDOM = false;\n    this.shadowDOMOptions = null;\n    this.processAttributes = doProcessAttributes;\n    this.processContent = doProcessContent;\n    this.usesShadowDOM = false;\n    this.childBindings = null;\n    this.hasDynamicOptions = false;\n    this.containerless = false;\n    this.properties = [];\n    this.attributes = {};\n    this.isInitialized = false;\n    this.primaryProperty = null;\n  }\n\n  HtmlBehaviorResource.convention = function convention(name, existing) {\n    var behavior = void 0;\n\n    if (name.endsWith('CustomAttribute')) {\n      behavior = existing || new HtmlBehaviorResource();\n      behavior.attributeName = _hyphenate(name.substring(0, name.length - 15));\n    }\n\n    if (name.endsWith('CustomElement')) {\n      behavior = existing || new HtmlBehaviorResource();\n      behavior.elementName = _hyphenate(name.substring(0, name.length - 13));\n    }\n\n    return behavior;\n  };\n\n  HtmlBehaviorResource.prototype.addChildBinding = function addChildBinding(behavior) {\n    if (this.childBindings === null) {\n      this.childBindings = [];\n    }\n\n    this.childBindings.push(behavior);\n  };\n\n  HtmlBehaviorResource.prototype.initialize = function initialize(container, target) {\n    var proto = target.prototype;\n    var properties = this.properties;\n    var attributeName = this.attributeName;\n    var attributeDefaultBindingMode = this.attributeDefaultBindingMode;\n    var i = void 0;\n    var ii = void 0;\n    var current = void 0;\n\n    if (this.isInitialized) {\n      return;\n    }\n\n    this.isInitialized = true;\n    target.__providerId__ = nextProviderId();\n\n    this.observerLocator = container.get(ObserverLocator);\n    this.taskQueue = container.get(TaskQueue);\n\n    this.target = target;\n    this.usesShadowDOM = this.targetShadowDOM && FEATURE.shadowDOM;\n    this.handlesCreated = 'created' in proto;\n    this.handlesBind = 'bind' in proto;\n    this.handlesUnbind = 'unbind' in proto;\n    this.handlesAttached = 'attached' in proto;\n    this.handlesDetached = 'detached' in proto;\n    this.htmlName = this.elementName || this.attributeName;\n\n    if (attributeName !== null) {\n      if (properties.length === 0) {\n        new BindableProperty({\n          name: 'value',\n          changeHandler: 'valueChanged' in proto ? 'valueChanged' : null,\n          attribute: attributeName,\n          defaultBindingMode: attributeDefaultBindingMode\n        }).registerWith(target, this);\n      }\n\n      current = properties[0];\n\n      if (properties.length === 1 && current.name === 'value') {\n        current.isDynamic = current.hasOptions = this.hasDynamicOptions;\n        current.defineOn(target, this);\n      } else {\n        for (i = 0, ii = properties.length; i < ii; ++i) {\n          properties[i].defineOn(target, this);\n          if (properties[i].primaryProperty) {\n            if (this.primaryProperty) {\n              throw new Error('Only one bindable property on a custom element can be defined as the default');\n            }\n            this.primaryProperty = properties[i];\n          }\n        }\n\n        current = new BindableProperty({\n          name: 'value',\n          changeHandler: 'valueChanged' in proto ? 'valueChanged' : null,\n          attribute: attributeName,\n          defaultBindingMode: attributeDefaultBindingMode\n        });\n\n        current.hasOptions = true;\n        current.registerWith(target, this);\n      }\n    } else {\n      for (i = 0, ii = properties.length; i < ii; ++i) {\n        properties[i].defineOn(target, this);\n      }\n\n      this._copyInheritedProperties(container, target);\n    }\n  };\n\n  HtmlBehaviorResource.prototype.register = function register(registry, name) {\n    var _this12 = this;\n\n    if (this.attributeName !== null) {\n      registry.registerAttribute(name || this.attributeName, this, this.attributeName);\n\n      if (Array.isArray(this.aliases)) {\n        this.aliases.forEach(function (alias) {\n          registry.registerAttribute(alias, _this12, _this12.attributeName);\n        });\n      }\n    }\n\n    if (this.elementName !== null) {\n      registry.registerElement(name || this.elementName, this);\n    }\n  };\n\n  HtmlBehaviorResource.prototype.load = function load(container, target, loadContext, viewStrategy, transientView) {\n    var _this13 = this;\n\n    var options = void 0;\n\n    if (this.elementName !== null) {\n      viewStrategy = container.get(ViewLocator).getViewStrategy(viewStrategy || this.viewStrategy || target);\n      options = new ViewCompileInstruction(this.targetShadowDOM, true);\n\n      if (!viewStrategy.moduleId) {\n        viewStrategy.moduleId = Origin.get(target).moduleId;\n      }\n\n      return viewStrategy.loadViewFactory(container.get(ViewEngine), options, loadContext, target).then(function (viewFactory) {\n        if (!transientView || !_this13.viewFactory) {\n          _this13.viewFactory = viewFactory;\n        }\n\n        return viewFactory;\n      });\n    }\n\n    return Promise.resolve(this);\n  };\n\n  HtmlBehaviorResource.prototype.compile = function compile(compiler, resources, node, instruction, parentNode) {\n    if (this.liftsContent) {\n      if (!instruction.viewFactory) {\n        var _template = DOM.createElement('template');\n        var fragment = DOM.createDocumentFragment();\n        var cacheSize = node.getAttribute('view-cache');\n        var part = node.getAttribute('part');\n\n        node.removeAttribute(instruction.originalAttrName);\n        DOM.replaceNode(_template, node, parentNode);\n        fragment.appendChild(node);\n        instruction.viewFactory = compiler.compile(fragment, resources);\n\n        if (part) {\n          instruction.viewFactory.part = part;\n          node.removeAttribute('part');\n        }\n\n        if (cacheSize) {\n          instruction.viewFactory.setCacheSize(cacheSize);\n          node.removeAttribute('view-cache');\n        }\n\n        node = _template;\n      }\n    } else if (this.elementName !== null) {\n      var _partReplacements2 = {};\n\n      if (this.processContent(compiler, resources, node, instruction) && node.hasChildNodes()) {\n        var currentChild = node.firstChild;\n        var contentElement = this.usesShadowDOM ? null : DOM.createElement('au-content');\n        var nextSibling = void 0;\n        var toReplace = void 0;\n\n        while (currentChild) {\n          nextSibling = currentChild.nextSibling;\n\n          if (currentChild.tagName === 'TEMPLATE' && (toReplace = currentChild.getAttribute('replace-part'))) {\n            _partReplacements2[toReplace] = compiler.compile(currentChild, resources);\n            DOM.removeNode(currentChild, parentNode);\n            instruction.partReplacements = _partReplacements2;\n          } else if (contentElement !== null) {\n            if (currentChild.nodeType === 3 && _isAllWhitespace(currentChild)) {\n              DOM.removeNode(currentChild, parentNode);\n            } else {\n              contentElement.appendChild(currentChild);\n            }\n          }\n\n          currentChild = nextSibling;\n        }\n\n        if (contentElement !== null && contentElement.hasChildNodes()) {\n          node.appendChild(contentElement);\n        }\n\n        instruction.skipContentProcessing = false;\n      } else {\n        instruction.skipContentProcessing = true;\n      }\n    } else if (!this.processContent(compiler, resources, node, instruction)) {\n      instruction.skipContentProcessing = true;\n    }\n\n    return node;\n  };\n\n  HtmlBehaviorResource.prototype.create = function create(container, instruction, element, bindings) {\n    var viewHost = void 0;\n    var au = null;\n\n    instruction = instruction || BehaviorInstruction.normal;\n    element = element || null;\n    bindings = bindings || null;\n\n    if (this.elementName !== null && element) {\n      if (this.usesShadowDOM) {\n        viewHost = element.attachShadow(this.shadowDOMOptions);\n        container.registerInstance(DOM.boundary, viewHost);\n      } else {\n        viewHost = element;\n        if (this.targetShadowDOM) {\n          container.registerInstance(DOM.boundary, viewHost);\n        }\n      }\n    }\n\n    if (element !== null) {\n      element.au = au = element.au || {};\n    }\n\n    var viewModel = instruction.viewModel || container.get(this.target);\n    var controller = new Controller(this, instruction, viewModel, container);\n    var childBindings = this.childBindings;\n    var viewFactory = void 0;\n\n    if (this.liftsContent) {\n      au.controller = controller;\n    } else if (this.elementName !== null) {\n      viewFactory = instruction.viewFactory || this.viewFactory;\n      container.viewModel = viewModel;\n\n      if (viewFactory) {\n        controller.view = viewFactory.create(container, instruction, element);\n      }\n\n      if (element !== null) {\n        au.controller = controller;\n\n        if (controller.view) {\n          if (!this.usesShadowDOM && (element.childNodes.length === 1 || element.contentElement)) {\n            var contentElement = element.childNodes[0] || element.contentElement;\n            controller.view.contentView = { fragment: contentElement };\n            contentElement.parentNode && DOM.removeNode(contentElement);\n          }\n\n          if (instruction.anchorIsContainer) {\n            if (childBindings !== null) {\n              for (var _i4 = 0, _ii3 = childBindings.length; _i4 < _ii3; ++_i4) {\n                controller.view.addBinding(childBindings[_i4].create(element, viewModel, controller));\n              }\n            }\n\n            controller.view.appendNodesTo(viewHost);\n          } else {\n            controller.view.insertNodesBefore(viewHost);\n          }\n        } else if (childBindings !== null) {\n          for (var _i5 = 0, _ii4 = childBindings.length; _i5 < _ii4; ++_i5) {\n            bindings.push(childBindings[_i5].create(element, viewModel, controller));\n          }\n        }\n      } else if (controller.view) {\n        controller.view.controller = controller;\n\n        if (childBindings !== null) {\n          for (var _i6 = 0, _ii5 = childBindings.length; _i6 < _ii5; ++_i6) {\n            controller.view.addBinding(childBindings[_i6].create(instruction.host, viewModel, controller));\n          }\n        }\n      } else if (childBindings !== null) {\n        for (var _i7 = 0, _ii6 = childBindings.length; _i7 < _ii6; ++_i7) {\n          bindings.push(childBindings[_i7].create(instruction.host, viewModel, controller));\n        }\n      }\n    } else if (childBindings !== null) {\n      for (var _i8 = 0, _ii7 = childBindings.length; _i8 < _ii7; ++_i8) {\n        bindings.push(childBindings[_i8].create(element, viewModel, controller));\n      }\n    }\n\n    if (au !== null) {\n      au[this.htmlName] = controller;\n    }\n\n    if (instruction.initiatedByBehavior && viewFactory) {\n      controller.view.created();\n    }\n\n    return controller;\n  };\n\n  HtmlBehaviorResource.prototype._ensurePropertiesDefined = function _ensurePropertiesDefined(instance, lookup) {\n    var properties = void 0;\n    var i = void 0;\n    var ii = void 0;\n    var observer = void 0;\n\n    if ('__propertiesDefined__' in lookup) {\n      return;\n    }\n\n    lookup.__propertiesDefined__ = true;\n    properties = this.properties;\n\n    for (i = 0, ii = properties.length; i < ii; ++i) {\n      observer = properties[i].createObserver(instance);\n\n      if (observer !== undefined) {\n        lookup[observer.propertyName] = observer;\n      }\n    }\n  };\n\n  HtmlBehaviorResource.prototype._copyInheritedProperties = function _copyInheritedProperties(container, target) {\n    var _this14 = this;\n\n    var behavior = void 0;\n    var derived = target;\n\n    while (true) {\n      var proto = Object.getPrototypeOf(target.prototype);\n      target = proto && proto.constructor;\n      if (!target) {\n        return;\n      }\n      behavior = metadata.getOwn(metadata.resource, target);\n      if (behavior) {\n        break;\n      }\n    }\n    behavior.initialize(container, target);\n\n    var _loop = function _loop(_i9, _ii8) {\n      var prop = behavior.properties[_i9];\n\n      if (_this14.properties.some(function (p) {\n        return p.name === prop.name;\n      })) {\n        return 'continue';\n      }\n\n      new BindableProperty(prop).registerWith(derived, _this14);\n    };\n\n    for (var _i9 = 0, _ii8 = behavior.properties.length; _i9 < _ii8; ++_i9) {\n      var _ret = _loop(_i9, _ii8);\n\n      if (_ret === 'continue') continue;\n    }\n  };\n\n  return HtmlBehaviorResource;\n}();\n\nfunction createChildObserverDecorator(selectorOrConfig, all) {\n  return function (target, key, descriptor) {\n    var actualTarget = typeof key === 'string' ? target.constructor : target;\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, actualTarget);\n\n    if (typeof selectorOrConfig === 'string') {\n      selectorOrConfig = {\n        selector: selectorOrConfig,\n        name: key\n      };\n    }\n\n    if (descriptor) {\n      descriptor.writable = true;\n      descriptor.configurable = true;\n    }\n\n    selectorOrConfig.all = all;\n    r.addChildBinding(new ChildObserver(selectorOrConfig));\n  };\n}\n\nexport function children(selectorOrConfig) {\n  return createChildObserverDecorator(selectorOrConfig, true);\n}\n\nexport function child(selectorOrConfig) {\n  return createChildObserverDecorator(selectorOrConfig, false);\n}\n\nvar ChildObserver = function () {\n  function ChildObserver(config) {\n    \n\n    this.name = config.name;\n    this.changeHandler = config.changeHandler || this.name + 'Changed';\n    this.selector = config.selector;\n    this.all = config.all;\n  }\n\n  ChildObserver.prototype.create = function create(viewHost, viewModel, controller) {\n    return new ChildObserverBinder(this.selector, viewHost, this.name, viewModel, controller, this.changeHandler, this.all);\n  };\n\n  return ChildObserver;\n}();\n\nvar noMutations = [];\n\nfunction trackMutation(groupedMutations, binder, record) {\n  var mutations = groupedMutations.get(binder);\n\n  if (!mutations) {\n    mutations = [];\n    groupedMutations.set(binder, mutations);\n  }\n\n  mutations.push(record);\n}\n\nfunction onChildChange(mutations, observer) {\n  var binders = observer.binders;\n  var bindersLength = binders.length;\n  var groupedMutations = new Map();\n\n  for (var _i10 = 0, _ii9 = mutations.length; _i10 < _ii9; ++_i10) {\n    var record = mutations[_i10];\n    var added = record.addedNodes;\n    var removed = record.removedNodes;\n\n    for (var j = 0, jj = removed.length; j < jj; ++j) {\n      var _node = removed[j];\n      if (_node.nodeType === 1) {\n        for (var k = 0; k < bindersLength; ++k) {\n          var binder = binders[k];\n          if (binder.onRemove(_node)) {\n            trackMutation(groupedMutations, binder, record);\n          }\n        }\n      }\n    }\n\n    for (var _j = 0, _jj = added.length; _j < _jj; ++_j) {\n      var _node2 = added[_j];\n      if (_node2.nodeType === 1) {\n        for (var _k = 0; _k < bindersLength; ++_k) {\n          var _binder = binders[_k];\n          if (_binder.onAdd(_node2)) {\n            trackMutation(groupedMutations, _binder, record);\n          }\n        }\n      }\n    }\n  }\n\n  groupedMutations.forEach(function (value, key) {\n    if (key.changeHandler !== null) {\n      key.viewModel[key.changeHandler](value);\n    }\n  });\n}\n\nvar ChildObserverBinder = function () {\n  function ChildObserverBinder(selector, viewHost, property, viewModel, controller, changeHandler, all) {\n    \n\n    this.selector = selector;\n    this.viewHost = viewHost;\n    this.property = property;\n    this.viewModel = viewModel;\n    this.controller = controller;\n    this.changeHandler = changeHandler in viewModel ? changeHandler : null;\n    this.usesShadowDOM = controller.behavior.usesShadowDOM;\n    this.all = all;\n\n    if (!this.usesShadowDOM && controller.view && controller.view.contentView) {\n      this.contentView = controller.view.contentView;\n    } else {\n      this.contentView = null;\n    }\n  }\n\n  ChildObserverBinder.prototype.matches = function matches(element) {\n    if (element.matches(this.selector)) {\n      if (this.contentView === null) {\n        return true;\n      }\n\n      var contentView = this.contentView;\n      var assignedSlot = element.auAssignedSlot;\n\n      if (assignedSlot && assignedSlot.projectFromAnchors) {\n        var anchors = assignedSlot.projectFromAnchors;\n\n        for (var _i11 = 0, _ii10 = anchors.length; _i11 < _ii10; ++_i11) {\n          if (anchors[_i11].auOwnerView === contentView) {\n            return true;\n          }\n        }\n\n        return false;\n      }\n\n      return element.auOwnerView === contentView;\n    }\n\n    return false;\n  };\n\n  ChildObserverBinder.prototype.bind = function bind(source) {\n    var viewHost = this.viewHost;\n    var viewModel = this.viewModel;\n    var observer = viewHost.__childObserver__;\n\n    if (!observer) {\n      observer = viewHost.__childObserver__ = DOM.createMutationObserver(onChildChange);\n\n      var options = {\n        childList: true,\n        subtree: !this.usesShadowDOM\n      };\n\n      observer.observe(viewHost, options);\n      observer.binders = [];\n    }\n\n    observer.binders.push(this);\n\n    if (this.usesShadowDOM) {\n      var current = viewHost.firstElementChild;\n\n      if (this.all) {\n        var items = viewModel[this.property];\n        if (!items) {\n          items = viewModel[this.property] = [];\n        } else {\n          items.splice(0);\n        }\n\n        while (current) {\n          if (this.matches(current)) {\n            items.push(current.au && current.au.controller ? current.au.controller.viewModel : current);\n          }\n\n          current = current.nextElementSibling;\n        }\n\n        if (this.changeHandler !== null) {\n          this.viewModel[this.changeHandler](noMutations);\n        }\n      } else {\n        while (current) {\n          if (this.matches(current)) {\n            var _value = current.au && current.au.controller ? current.au.controller.viewModel : current;\n            this.viewModel[this.property] = _value;\n\n            if (this.changeHandler !== null) {\n              this.viewModel[this.changeHandler](_value);\n            }\n\n            break;\n          }\n\n          current = current.nextElementSibling;\n        }\n      }\n    }\n  };\n\n  ChildObserverBinder.prototype.onRemove = function onRemove(element) {\n    if (this.matches(element)) {\n      var _value2 = element.au && element.au.controller ? element.au.controller.viewModel : element;\n\n      if (this.all) {\n        var items = this.viewModel[this.property] || (this.viewModel[this.property] = []);\n        var index = items.indexOf(_value2);\n\n        if (index !== -1) {\n          items.splice(index, 1);\n        }\n\n        return true;\n      }\n\n      return false;\n    }\n\n    return false;\n  };\n\n  ChildObserverBinder.prototype.onAdd = function onAdd(element) {\n    if (this.matches(element)) {\n      var _value3 = element.au && element.au.controller ? element.au.controller.viewModel : element;\n\n      if (this.all) {\n        var items = this.viewModel[this.property] || (this.viewModel[this.property] = []);\n\n        if (this.selector === '*') {\n          items.push(_value3);\n          return true;\n        }\n\n        var index = 0;\n        var prev = element.previousElementSibling;\n\n        while (prev) {\n          if (this.matches(prev)) {\n            index++;\n          }\n\n          prev = prev.previousElementSibling;\n        }\n\n        items.splice(index, 0, _value3);\n        return true;\n      }\n\n      this.viewModel[this.property] = _value3;\n\n      if (this.changeHandler !== null) {\n        this.viewModel[this.changeHandler](_value3);\n      }\n    }\n\n    return false;\n  };\n\n  ChildObserverBinder.prototype.unbind = function unbind() {\n    if (this.viewHost.__childObserver__) {\n      this.viewHost.__childObserver__.disconnect();\n      this.viewHost.__childObserver__ = null;\n      this.viewModel[this.property] = null;\n    }\n  };\n\n  return ChildObserverBinder;\n}();\n\nfunction remove(viewSlot, previous) {\n  return Array.isArray(previous) ? viewSlot.removeMany(previous, true) : viewSlot.remove(previous, true);\n}\n\nexport var SwapStrategies = {\n  before: function before(viewSlot, previous, callback) {\n    return previous === undefined ? callback() : callback().then(function () {\n      return remove(viewSlot, previous);\n    });\n  },\n  with: function _with(viewSlot, previous, callback) {\n    return previous === undefined ? callback() : Promise.all([remove(viewSlot, previous), callback()]);\n  },\n  after: function after(viewSlot, previous, callback) {\n    return Promise.resolve(viewSlot.removeAll(true)).then(callback);\n  }\n};\n\nfunction tryActivateViewModel(context) {\n  if (context.skipActivation || typeof context.viewModel.activate !== 'function') {\n    return Promise.resolve();\n  }\n\n  return context.viewModel.activate(context.model) || Promise.resolve();\n}\n\nexport var CompositionEngine = (_dec10 = inject(ViewEngine, ViewLocator), _dec10(_class17 = function () {\n  function CompositionEngine(viewEngine, viewLocator) {\n    \n\n    this.viewEngine = viewEngine;\n    this.viewLocator = viewLocator;\n  }\n\n  CompositionEngine.prototype._swap = function _swap(context, view) {\n    var swapStrategy = SwapStrategies[context.swapOrder] || SwapStrategies.after;\n    var previousViews = context.viewSlot.children.slice();\n\n    return swapStrategy(context.viewSlot, previousViews, function () {\n      return Promise.resolve(context.viewSlot.add(view)).then(function () {\n        if (context.currentController) {\n          context.currentController.unbind();\n        }\n      });\n    }).then(function () {\n      if (context.compositionTransactionNotifier) {\n        context.compositionTransactionNotifier.done();\n      }\n    });\n  };\n\n  CompositionEngine.prototype._createControllerAndSwap = function _createControllerAndSwap(context) {\n    var _this15 = this;\n\n    return this.createController(context).then(function (controller) {\n      if (context.compositionTransactionOwnershipToken) {\n        return context.compositionTransactionOwnershipToken.waitForCompositionComplete().then(function () {\n          controller.automate(context.overrideContext, context.owningView);\n\n          return _this15._swap(context, controller.view);\n        }).then(function () {\n          return controller;\n        });\n      }\n\n      controller.automate(context.overrideContext, context.owningView);\n\n      return _this15._swap(context, controller.view).then(function () {\n        return controller;\n      });\n    });\n  };\n\n  CompositionEngine.prototype.createController = function createController(context) {\n    var _this16 = this;\n\n    var childContainer = void 0;\n    var viewModel = void 0;\n    var viewModelResource = void 0;\n\n    var m = void 0;\n\n    return this.ensureViewModel(context).then(tryActivateViewModel).then(function () {\n      childContainer = context.childContainer;\n      viewModel = context.viewModel;\n      viewModelResource = context.viewModelResource;\n      m = viewModelResource.metadata;\n\n      var viewStrategy = _this16.viewLocator.getViewStrategy(context.view || viewModel);\n\n      if (context.viewResources) {\n        viewStrategy.makeRelativeTo(context.viewResources.viewUrl);\n      }\n\n      return m.load(childContainer, viewModelResource.value, null, viewStrategy, true);\n    }).then(function (viewFactory) {\n      return m.create(childContainer, BehaviorInstruction.dynamic(context.host, viewModel, viewFactory));\n    });\n  };\n\n  CompositionEngine.prototype.ensureViewModel = function ensureViewModel(context) {\n    var childContainer = context.childContainer = context.childContainer || context.container.createChild();\n\n    if (typeof context.viewModel === 'string') {\n      context.viewModel = context.viewResources ? context.viewResources.relativeToView(context.viewModel) : context.viewModel;\n\n      return this.viewEngine.importViewModelResource(context.viewModel).then(function (viewModelResource) {\n        childContainer.autoRegister(viewModelResource.value);\n\n        if (context.host) {\n          childContainer.registerInstance(DOM.Element, context.host);\n        }\n\n        context.viewModel = childContainer.viewModel = childContainer.get(viewModelResource.value);\n        context.viewModelResource = viewModelResource;\n        return context;\n      });\n    }\n\n    var ctor = context.viewModel.constructor;\n    var isClass = typeof context.viewModel === 'function';\n    if (isClass) {\n      ctor = context.viewModel;\n      childContainer.autoRegister(ctor);\n    }\n    var m = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, ctor);\n\n    m.elementName = m.elementName || 'dynamic-element';\n\n    m.initialize(isClass ? childContainer : context.container || childContainer, ctor);\n\n    context.viewModelResource = { metadata: m, value: ctor };\n\n    if (context.host) {\n      childContainer.registerInstance(DOM.Element, context.host);\n    }\n    childContainer.viewModel = context.viewModel = isClass ? childContainer.get(ctor) : context.viewModel;\n    return Promise.resolve(context);\n  };\n\n  CompositionEngine.prototype.compose = function compose(context) {\n    var _this17 = this;\n\n    context.childContainer = context.childContainer || context.container.createChild();\n    context.view = this.viewLocator.getViewStrategy(context.view);\n\n    var transaction = context.childContainer.get(CompositionTransaction);\n    var compositionTransactionOwnershipToken = transaction.tryCapture();\n\n    if (compositionTransactionOwnershipToken) {\n      context.compositionTransactionOwnershipToken = compositionTransactionOwnershipToken;\n    } else {\n      context.compositionTransactionNotifier = transaction.enlist();\n    }\n\n    if (context.viewModel) {\n      return this._createControllerAndSwap(context);\n    } else if (context.view) {\n      if (context.viewResources) {\n        context.view.makeRelativeTo(context.viewResources.viewUrl);\n      }\n\n      return context.view.loadViewFactory(this.viewEngine, new ViewCompileInstruction()).then(function (viewFactory) {\n        var result = viewFactory.create(context.childContainer);\n        result.bind(context.bindingContext, context.overrideContext);\n\n        if (context.compositionTransactionOwnershipToken) {\n          return context.compositionTransactionOwnershipToken.waitForCompositionComplete().then(function () {\n            return _this17._swap(context, result);\n          }).then(function () {\n            return result;\n          });\n        }\n\n        return _this17._swap(context, result).then(function () {\n          return result;\n        });\n      });\n    } else if (context.viewSlot) {\n      context.viewSlot.removeAll();\n\n      if (context.compositionTransactionNotifier) {\n        context.compositionTransactionNotifier.done();\n      }\n\n      return Promise.resolve(null);\n    }\n\n    return Promise.resolve(null);\n  };\n\n  return CompositionEngine;\n}()) || _class17);\n\nexport var ElementConfigResource = function () {\n  function ElementConfigResource() {\n    \n  }\n\n  ElementConfigResource.prototype.initialize = function initialize(container, target) {};\n\n  ElementConfigResource.prototype.register = function register(registry, name) {};\n\n  ElementConfigResource.prototype.load = function load(container, target) {\n    var config = new target();\n    var eventManager = container.get(EventManager);\n    eventManager.registerElementConfig(config);\n  };\n\n  return ElementConfigResource;\n}();\n\nexport function resource(instanceOrConfig) {\n  return function (target) {\n    var isConfig = typeof instanceOrConfig === 'string' || Object.getPrototypeOf(instanceOrConfig) === Object.prototype;\n    if (isConfig) {\n      target.$resource = instanceOrConfig;\n    } else {\n      metadata.define(metadata.resource, instanceOrConfig, target);\n    }\n  };\n}\n\nexport function behavior(override) {\n  return function (target) {\n    if (override instanceof HtmlBehaviorResource) {\n      metadata.define(metadata.resource, override, target);\n    } else {\n      var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, target);\n      Object.assign(r, override);\n    }\n  };\n}\n\nexport function customElement(name) {\n  return function (target) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, target);\n    r.elementName = validateBehaviorName(name, 'custom element');\n  };\n}\n\nexport function customAttribute(name, defaultBindingMode, aliases) {\n  return function (target) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, target);\n    r.attributeName = validateBehaviorName(name, 'custom attribute');\n    r.attributeDefaultBindingMode = defaultBindingMode;\n    r.aliases = aliases;\n  };\n}\n\nexport function templateController(target) {\n  var deco = function deco(t) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n    r.liftsContent = true;\n  };\n\n  return target ? deco(target) : deco;\n}\n\nexport function bindable(nameOrConfigOrTarget, key, descriptor) {\n  var deco = function deco(target, key2, descriptor2) {\n    var actualTarget = key2 ? target.constructor : target;\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, actualTarget);\n    var prop = void 0;\n\n    if (key2) {\n      nameOrConfigOrTarget = nameOrConfigOrTarget || {};\n      nameOrConfigOrTarget.name = key2;\n    }\n\n    prop = new BindableProperty(nameOrConfigOrTarget);\n    return prop.registerWith(actualTarget, r, descriptor2);\n  };\n\n  if (!nameOrConfigOrTarget) {\n    return deco;\n  }\n\n  if (key) {\n    var _target = nameOrConfigOrTarget;\n    nameOrConfigOrTarget = null;\n    return deco(_target, key, descriptor);\n  }\n\n  return deco;\n}\n\nexport function dynamicOptions(target) {\n  var deco = function deco(t) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n    r.hasDynamicOptions = true;\n  };\n\n  return target ? deco(target) : deco;\n}\n\nvar defaultShadowDOMOptions = { mode: 'open' };\n\nexport function useShadowDOM(targetOrOptions) {\n  var options = typeof targetOrOptions === 'function' || !targetOrOptions ? defaultShadowDOMOptions : targetOrOptions;\n\n  var deco = function deco(t) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n    r.targetShadowDOM = true;\n    r.shadowDOMOptions = options;\n  };\n\n  return typeof targetOrOptions === 'function' ? deco(targetOrOptions) : deco;\n}\n\nexport function processAttributes(processor) {\n  return function (t) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n    r.processAttributes = function (compiler, resources, node, attributes, elementInstruction) {\n      try {\n        processor(compiler, resources, node, attributes, elementInstruction);\n      } catch (error) {\n        LogManager.getLogger('templating').error(error);\n      }\n    };\n  };\n}\n\nfunction doNotProcessContent() {\n  return false;\n}\n\nexport function processContent(processor) {\n  return function (t) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n    r.processContent = processor ? function (compiler, resources, node, instruction) {\n      try {\n        return processor(compiler, resources, node, instruction);\n      } catch (error) {\n        LogManager.getLogger('templating').error(error);\n        return false;\n      }\n    } : doNotProcessContent;\n  };\n}\n\nexport function containerless(target) {\n  var deco = function deco(t) {\n    var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n    r.containerless = true;\n  };\n\n  return target ? deco(target) : deco;\n}\n\nexport function useViewStrategy(strategy) {\n  return function (target) {\n    metadata.define(ViewLocator.viewStrategyMetadataKey, strategy, target);\n  };\n}\n\nexport function useView(path) {\n  return useViewStrategy(new RelativeViewStrategy(path));\n}\n\nexport function inlineView(markup, dependencies, dependencyBaseUrl) {\n  return useViewStrategy(new InlineViewStrategy(markup, dependencies, dependencyBaseUrl));\n}\n\nexport function noView(targetOrDependencies, dependencyBaseUrl) {\n  var target = void 0;\n  var dependencies = void 0;\n  if (typeof targetOrDependencies === 'function') {\n    target = targetOrDependencies;\n  } else {\n    dependencies = targetOrDependencies;\n    target = undefined;\n  }\n\n  var deco = function deco(t) {\n    metadata.define(ViewLocator.viewStrategyMetadataKey, new NoViewStrategy(dependencies, dependencyBaseUrl), t);\n  };\n\n  return target ? deco(target) : deco;\n}\n\nexport function view(templateOrConfig) {\n  return function (target) {\n    target.$view = templateOrConfig;\n  };\n}\n\nexport function elementConfig(target) {\n  var deco = function deco(t) {\n    metadata.define(metadata.resource, new ElementConfigResource(), t);\n  };\n\n  return target ? deco(target) : deco;\n}\n\nexport function viewResources() {\n  for (var _len = arguments.length, resources = Array(_len), _key7 = 0; _key7 < _len; _key7++) {\n    resources[_key7] = arguments[_key7];\n  }\n\n  return function (target) {\n    metadata.define(ViewEngine.viewModelRequireMetadataKey, resources, target);\n  };\n}\n\nexport var TemplatingEngine = (_dec11 = inject(Container, ModuleAnalyzer, ViewCompiler, CompositionEngine), _dec11(_class18 = function () {\n  function TemplatingEngine(container, moduleAnalyzer, viewCompiler, compositionEngine) {\n    \n\n    this._container = container;\n    this._moduleAnalyzer = moduleAnalyzer;\n    this._viewCompiler = viewCompiler;\n    this._compositionEngine = compositionEngine;\n    container.registerInstance(Animator, Animator.instance = new Animator());\n  }\n\n  TemplatingEngine.prototype.configureAnimator = function configureAnimator(animator) {\n    this._container.unregister(Animator);\n    this._container.registerInstance(Animator, Animator.instance = animator);\n  };\n\n  TemplatingEngine.prototype.compose = function compose(context) {\n    return this._compositionEngine.compose(context);\n  };\n\n  TemplatingEngine.prototype.enhance = function enhance(instruction) {\n    if (instruction instanceof DOM.Element) {\n      instruction = { element: instruction };\n    }\n\n    var compilerInstructions = { letExpressions: [] };\n    var resources = instruction.resources || this._container.get(ViewResources);\n\n    this._viewCompiler._compileNode(instruction.element, resources, compilerInstructions, instruction.element.parentNode, 'root', true);\n\n    var factory = new ViewFactory(instruction.element, compilerInstructions, resources);\n    var container = instruction.container || this._container.createChild();\n    var view = factory.create(container, BehaviorInstruction.enhance());\n\n    view.bind(instruction.bindingContext || {}, instruction.overrideContext);\n\n    view.firstChild = view.lastChild = view.fragment;\n    view.fragment = DOM.createDocumentFragment();\n    view.attached();\n\n    return view;\n  };\n\n  return TemplatingEngine;\n}()) || _class18);","var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;\n\nfunction _initDefineProp(target, property, descriptor, context) {\n  if (!descriptor) return;\n  Object.defineProperty(target, property, {\n    enumerable: descriptor.enumerable,\n    configurable: descriptor.configurable,\n    writable: descriptor.writable,\n    value: descriptor.initializer ? descriptor.initializer.call(context) : void 0\n  });\n}\n\n\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n  var desc = {};\n  Object['ke' + 'ys'](descriptor).forEach(function (key) {\n    desc[key] = descriptor[key];\n  });\n  desc.enumerable = !!desc.enumerable;\n  desc.configurable = !!desc.configurable;\n\n  if ('value' in desc || desc.initializer) {\n    desc.writable = true;\n  }\n\n  desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n    return decorator(target, property, desc) || desc;\n  }, desc);\n\n  if (context && desc.initializer !== void 0) {\n    desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n    desc.initializer = undefined;\n  }\n\n  if (desc.initializer === void 0) {\n    Object['define' + 'Property'](target, property, desc);\n    desc = null;\n  }\n\n  return desc;\n}\n\nfunction _initializerWarningHelper(descriptor, context) {\n  throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');\n}\n\nimport { Container } from 'aurelia-dependency-injection';\nimport { createOverrideContext } from 'aurelia-binding';\nimport { ViewSlot, ViewLocator, customElement, noView, BehaviorInstruction, bindable, CompositionTransaction, CompositionEngine, ShadowDOM, SwapStrategies } from 'aurelia-templating';\nimport { Router } from 'aurelia-router';\nimport { Origin } from 'aurelia-metadata';\nimport { DOM } from 'aurelia-pal';\n\nexport var RouterView = (_dec = customElement('router-view'), _dec(_class = noView(_class = (_class2 = function () {\n  RouterView.inject = function inject() {\n    return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];\n  };\n\n  function RouterView(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {\n    \n\n    _initDefineProp(this, 'swapOrder', _descriptor, this);\n\n    _initDefineProp(this, 'layoutView', _descriptor2, this);\n\n    _initDefineProp(this, 'layoutViewModel', _descriptor3, this);\n\n    _initDefineProp(this, 'layoutModel', _descriptor4, this);\n\n    this.element = element;\n    this.container = container;\n    this.viewSlot = viewSlot;\n    this.router = router;\n    this.viewLocator = viewLocator;\n    this.compositionTransaction = compositionTransaction;\n    this.compositionEngine = compositionEngine;\n    this.router.registerViewPort(this, this.element.getAttribute('name'));\n\n    if (!('initialComposition' in compositionTransaction)) {\n      compositionTransaction.initialComposition = true;\n      this.compositionTransactionNotifier = compositionTransaction.enlist();\n    }\n  }\n\n  RouterView.prototype.created = function created(owningView) {\n    this.owningView = owningView;\n  };\n\n  RouterView.prototype.bind = function bind(bindingContext, overrideContext) {\n    this.container.viewModel = bindingContext;\n    this.overrideContext = overrideContext;\n  };\n\n  RouterView.prototype.process = function process(viewPortInstruction, waitToSwap) {\n    var _this = this;\n\n    var component = viewPortInstruction.component;\n    var childContainer = component.childContainer;\n    var viewModel = component.viewModel;\n    var viewModelResource = component.viewModelResource;\n    var metadata = viewModelResource.metadata;\n    var config = component.router.currentInstruction.config;\n    var viewPort = config.viewPorts ? config.viewPorts[viewPortInstruction.name] || {} : {};\n\n    childContainer.get(RouterViewLocator)._notify(this);\n\n    var layoutInstruction = {\n      viewModel: viewPort.layoutViewModel || config.layoutViewModel || this.layoutViewModel,\n      view: viewPort.layoutView || config.layoutView || this.layoutView,\n      model: viewPort.layoutModel || config.layoutModel || this.layoutModel,\n      router: viewPortInstruction.component.router,\n      childContainer: childContainer,\n      viewSlot: this.viewSlot\n    };\n\n    var viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);\n    if (viewStrategy && component.view) {\n      viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);\n    }\n\n    return metadata.load(childContainer, viewModelResource.value, null, viewStrategy, true).then(function (viewFactory) {\n      if (!_this.compositionTransactionNotifier) {\n        _this.compositionTransactionOwnershipToken = _this.compositionTransaction.tryCapture();\n      }\n\n      if (layoutInstruction.viewModel || layoutInstruction.view) {\n        viewPortInstruction.layoutInstruction = layoutInstruction;\n      }\n\n      viewPortInstruction.controller = metadata.create(childContainer, BehaviorInstruction.dynamic(_this.element, viewModel, viewFactory));\n\n      if (waitToSwap) {\n        return null;\n      }\n\n      _this.swap(viewPortInstruction);\n    });\n  };\n\n  RouterView.prototype.swap = function swap(viewPortInstruction) {\n    var _this2 = this;\n\n    var layoutInstruction = viewPortInstruction.layoutInstruction;\n    var previousView = this.view;\n\n    var work = function work() {\n      var swapStrategy = SwapStrategies[_this2.swapOrder] || SwapStrategies.after;\n      var viewSlot = _this2.viewSlot;\n\n      swapStrategy(viewSlot, previousView, function () {\n        return Promise.resolve(viewSlot.add(_this2.view));\n      }).then(function () {\n        _this2._notify();\n      });\n    };\n\n    var ready = function ready(owningView) {\n      viewPortInstruction.controller.automate(_this2.overrideContext, owningView);\n      if (_this2.compositionTransactionOwnershipToken) {\n        return _this2.compositionTransactionOwnershipToken.waitForCompositionComplete().then(function () {\n          _this2.compositionTransactionOwnershipToken = null;\n          return work();\n        });\n      }\n\n      return work();\n    };\n\n    if (layoutInstruction) {\n      if (!layoutInstruction.viewModel) {\n        layoutInstruction.viewModel = {};\n      }\n\n      return this.compositionEngine.createController(layoutInstruction).then(function (controller) {\n        ShadowDOM.distributeView(viewPortInstruction.controller.view, controller.slots || controller.view.slots);\n        controller.automate(createOverrideContext(layoutInstruction.viewModel), _this2.owningView);\n        controller.view.children.push(viewPortInstruction.controller.view);\n        return controller.view || controller;\n      }).then(function (newView) {\n        _this2.view = newView;\n        return ready(newView);\n      });\n    }\n\n    this.view = viewPortInstruction.controller.view;\n\n    return ready(this.owningView);\n  };\n\n  RouterView.prototype._notify = function _notify() {\n    if (this.compositionTransactionNotifier) {\n      this.compositionTransactionNotifier.done();\n      this.compositionTransactionNotifier = null;\n    }\n  };\n\n  return RouterView;\n}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'swapOrder', [bindable], {\n  enumerable: true,\n  initializer: null\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'layoutView', [bindable], {\n  enumerable: true,\n  initializer: null\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'layoutViewModel', [bindable], {\n  enumerable: true,\n  initializer: null\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'layoutModel', [bindable], {\n  enumerable: true,\n  initializer: null\n})), _class2)) || _class) || _class);\n\nexport var RouterViewLocator = function () {\n  function RouterViewLocator() {\n    var _this3 = this;\n\n    \n\n    this.promise = new Promise(function (resolve) {\n      return _this3.resolve = resolve;\n    });\n  }\n\n  RouterViewLocator.prototype.findNearest = function findNearest() {\n    return this.promise;\n  };\n\n  RouterViewLocator.prototype._notify = function _notify(routerView) {\n    this.resolve(routerView);\n  };\n\n  return RouterViewLocator;\n}();","var _dec, _dec2, _dec3, _dec4, _class;\n\n\n\nimport { customAttribute, bindable } from 'aurelia-templating';\nimport { Router } from 'aurelia-router';\nimport { DOM } from 'aurelia-pal';\nimport * as LogManager from 'aurelia-logging';\n\nvar logger = LogManager.getLogger('route-href');\n\nexport var RouteHref = (_dec = customAttribute('route-href'), _dec2 = bindable({ name: 'route', changeHandler: 'processChange', primaryProperty: true }), _dec3 = bindable({ name: 'params', changeHandler: 'processChange' }), _dec4 = bindable({ name: 'attribute', defaultValue: 'href' }), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = function () {\n  RouteHref.inject = function inject() {\n    return [Router, DOM.Element];\n  };\n\n  function RouteHref(router, element) {\n    \n\n    this.router = router;\n    this.element = element;\n  }\n\n  RouteHref.prototype.bind = function bind() {\n    this.isActive = true;\n    this.processChange();\n  };\n\n  RouteHref.prototype.unbind = function unbind() {\n    this.isActive = false;\n  };\n\n  RouteHref.prototype.attributeChanged = function attributeChanged(value, previous) {\n    if (previous) {\n      this.element.removeAttribute(previous);\n    }\n\n    this.processChange();\n  };\n\n  RouteHref.prototype.processChange = function processChange() {\n    var _this = this;\n\n    return this.router.ensureConfigured().then(function () {\n      if (!_this.isActive) {\n        return null;\n      }\n\n      var href = _this.router.generate(_this.route, _this.params);\n\n      if (_this.element.au.controller) {\n        _this.element.au.controller.viewModel[_this.attribute] = href;\n      } else {\n        _this.element.setAttribute(_this.attribute, href);\n      }\n\n      return null;\n    }).catch(function (reason) {\n      logger.error(reason);\n    });\n  };\n\n  return RouteHref;\n}()) || _class) || _class) || _class) || _class);"],"sourceRoot":""}