{"version":3,"sources":["vdom.mjs","resize.mjs","ResizeObserver.mjs","ResizeObserver.js","wrapper.mjs","WeakMap.mjs","string.mjs","Map.mjs","object.mjs","array.mjs","util.mjs","Registry.mjs","Promise.mjs","Evented.mjs","Destroyable.mjs","Set.mjs","diff.mjs","RegistryHandler.mjs","focus.mjs","icache.mjs","theme.mjs","injector.mjs","ThemeInjector.mjs","Injector.mjs","breakpoint.mjs","global.mjs","cssVariables.mjs","global.js","has.mjs","i18n.mjs","i18n.mjs","message.js","node_main.js","cldr.js","event.js","supplemental.js","unresolved.js","globalize.js","I18nInjector.mjs","util.mjs","tslib.es6.js","validity.mjs","dimensions.mjs","resources.mjs"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAc,SAAI,IAAI,SAAI;AAC1B;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACoC;AACZ;AACc;AACR;AACA;AACO;AACsE;AAC7E;AACkB;AAChD;AACA;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL,sBAAsB,cAAc;AACpC;AACA,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,QAAQ,oDAAG;AACX;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA,eAAe,oDAAM;AACrB,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,oDAAM;AACX,IAAI,oDAAM;AACV;AACO;AACP,IAAI,oDAAM;AACV;AACO;AACP,0BAA0B,oDAAM;AAChC,IAAI,oDAAM;AACV;AACO;AACP,0BAA0B,oDAAM;AAChC,IAAI,oDAAM;AACV;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACO;AACP;AACA;AACA;AACA,QAAQ,gEAAc;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,yCAAyC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,0BAA0B,EAAE;AACzC,kCAAkC,mDAAmD,EAAE;AACvF;AACA;AACA,iCAAiC;AACjC,qCAAqC,kCAAkC,gDAAgD;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,cAAc,iBAAiB,YAAY,SAAS,mDAAmD;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACO,iCAAiC;AACxC,eAAe,wDAAI;AACnB,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA,uBAAuB,kDAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA,6CAA6C,WAAW,GAAG,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,gCAAgC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,8BAA8B,qDAAO;AAC5C,0BAA0B,iDAAG;AAC7B,8BAA8B,iDAAG;AACjC;AACA;AACA;AACA;AACA;AACA,uDAAuD,iDAAG;AAC1D;AACA,qCAAqC,GAAG,GAAG,IAAI;AAC/C;AACA,wCAAwC,GAAG,GAAG,IAAI;AAClD;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,iDAAG;AACtD;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACO,8BAA8B,KAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACM,uBAAuB,KAAK;AACnC;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC,+DAA+D,iDAAG;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS,GAAG,IAAI;AACzD;AACA;AACA;AACA;AACA,CAAC;AACM,+BAA+B,KAAK;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,iDAAG;AAC1E,qFAAqF,iDAAG;AACxF,4EAA4E,iDAAG;AAC/E;AACA,sCAAsC;AACtC;AACA,wBAAwB,oDAAG;AAC3B;AACA,6GAA6G,sBAAsB;AACnI;AACA;AACA,4DAA4D,0BAA0B,yBAAyB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACM,0BAA0B,KAAK;AACtC;AACA;AACA;AACA;AACA,iEAAiE,iDAAG;AACpE;AACA;AACA;AACA;AACA;AACA,CAAC;AACM,8BAA8B,KAAK;AAC1C;AACA;AACA;AACA;AACA;AACA,iDAAiD,wDAAe;AAChE;AACA;AACA;AACA,2EAA2E,wDAAe;AAC1F;AACA;AACA;AACA;AACA,CAAC;AACM,wBAAwB,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,sBAAsB,kDAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA,wBAAwB,qDAAO;AAC/B,8BAA8B,iDAAG;AACjC,iCAAiC,qDAAO;AACxC,oCAAoC,iDAAG;AACvC,+BAA+B,qDAAO;AACtC,gCAAgC,qDAAO;AACvC;AACA;AACA;AACA;AACA;AACA,kCAAkC,iDAAG;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,qBAAqB,EAAE;AAClD,mBAAmB,QAAQ,qBAAqB,EAAE;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA,mBAAmB,QAAQ,oBAAoB,EAAE;AACjD;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW,iLAAiL,eAAe;AAC7P;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ,mCAAmC,EAAE;AAC5D;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,sDAAsD,UAAU;AAChE,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,qDAAqD,eAAe,WAAW;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa,0DAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,wDAAe;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gEAAc;AAClC;AACA,wBAAwB,kEAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,uBAAuB;AAClE;AACA,4DAA4D,cAAc,GAAG,mBAAmB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qDAAO;AAC/B;AACA;AACA,iCAAiC,qDAAO;AACxC,gCAAgC,qDAAO;AACvC;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA,gBAAgB,oDAAG;AACnB;AACA;AACA;AACA;AACA,wCAAwC,gCAAgC,mBAAmB;AAC3F,mDAAmD;AACnD,2BAA2B,YAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mBAAmB;AACnB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B,8CAA8C,EAAE;AACpG,yCAAyC,eAAe,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uCAAuC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,oBAAoB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc,UAAU,qBAAqB,0BAA0B,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC,uBAAuB,qCAAqC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qDAAO;AAC3C;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,qBAAqB,QAAQ,MAAM,EAAE;AACrC,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iDAAG;AAC5B,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,aAAa,6DAA6D;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,2BAA2B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kCAAkC;AAC7E;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB;AAC3C,mCAAmC,oCAAoC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2CAA2C;AACtF,2CAA2C,wCAAwC;AACnF;AACA;AACA,2CAA2C,6CAA6C;AACxF;AACA;AACA;AACA,oBAAoB,oDAAG;AACvB;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA,uCAAuC,wCAAwC;AAC/E;AACA;AACA;AACA,oBAAoB,oDAAG;AACvB,uCAAuC,2CAA2C;AAClF;AACA;AACA;AACA,oBAAoB,oDAAG;AACvB,oBAAoB,oDAAG;AACvB;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA,2CAA2C,yCAAyC;AACpF;AACA,uCAAuC,2CAA2C;AAClF,uCAAuC,wCAAwC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA;AACA;AACA,sCAAsC,mBAAmB;AACzD,oBAAoB,oDAAG;AACvB,uCAAuC,uCAAuC;AAC9E;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA,uCAAuC,gBAAgB;AACvD;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA;AACA;AACA;AACA,uCAAuC,UAAU;AACjD;AACA;AACA,0CAA0C,UAAU;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,GAAG,GAAG,SAAS;AAC3C,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA,uBAAuB,kCAAkC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,4BAA4B,OAAO;AACnC,aAAa,QAAQ,oBAAoB,EAAE;AAC3C,aAAa,WAAW;AACxB;AACA,aAAa,0DAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,gCAAgC,YAAY;AAC5C;AACA,eAAe,mBAAmB;AAClC,aAAa,yEAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,4CAA4C,iDAAG;AAC/C;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,aAAa;AACb,qBAAqB;AACrB;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,eAAe,uCAAuC;AACtD,aAAa,QAAQ,oBAAoB,EAAE;AAC3C;AACA,aAAa,0DAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,aAAa,yEAAuB;AACpC;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oDAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA,qCAAqC,+CAA+C;AACpF;AACA;AACA,gBAAgB;AAChB;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,kBAAkB;AAClB;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4BAA4B,EAAE;AACrD,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,uEAAQ,EAAC;AACxB,iC;;;;;;;;ACnjEA;AAAA;AAAA;AAAA;AAAA;AAAuD;AACP;AACd;AAClC,gBAAgB,oDAAM,EAAE,CAAC,gDAAI,EAAE,sDAAO,EAAE,sDAAM,EAAE;AACzC,yBAAyB,cAAc,wBAAwB,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,4DAAc;AACzD;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,qEAAM,EAAC;AACtB,mC;;;;;;;;AChCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AACA;AAC9B;AACmD;AACd;AACrC,KAAK,yDAAG;AACR,SAAS,+CAAM;AACf;AACA,QAAQ,+CAAM,kBAAkB,+DAAc,IAAI,qDAAM;AACxD;AACA;AACe,4HAAO,wBAAwB,E;;;;;;;ACX9C;AACA,CAAC,KAA4D;AAC7D,CAAC,SACmC;AACpC,CAAC,qBAAqB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ,qBAAqB;;AAE/D;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,EAAE;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,EAAE;AACrB,mBAAmB,EAAE;AACrB,qBAAqB;AACrB;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA,mBAAmB,EAAE;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,EAAE;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B,mBAAmB,EAAE;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA,sDAAsD,iBAAiB;AACvE;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,gCAAgC,6BAA6B,EAAE,aAAa;AAC5G,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;;;AAGA;AACA;AACA;AACA,aAAa;AACb;;;AAGA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,iDAAiD,mCAAmC,EAAE;;AAEtF;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa;AACb;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA,8CAA8C,iBAAiB;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,UAAU;AACrB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA,qCAAqC,iBAAiB;AACtD;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,kCAAkC,iEAAiE;AACnG;;AAEA;AACA;AACA;AACA,8BAA8B,iGAAiG;AAC/H,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;;;AAGA;AACA;AACA;AACA,aAAa;AACb;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,2CAA2C;AACzE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;;;AAGA;AACA;AACA;AACA,aAAa;AACb;;;AAGA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,CAAC;;;;;;;;;;ACvgCD;AAAA;AAAA;AAAA;AAA+B;AACE;AAClB;AACf,QAAQ,yDAAG;AACX;AACA;AACA,2BAA2B,+CAAM;AACjC;AACA;AACA;AACA;AACA,uBAAuB,+CAAM;AAC7B;AACA;AACA;AACA,kBAAkB,+CAAM,oBAAoB,+CAAM,IAAI,+CAAM;AAC5D;AACA,oC;;;;;;;;ACjBA;AAAA;AAAA;AAAA;AAA8B;AAC9B;AACA;AACA;AAC8B;AAC9B;AACA;AACO,cAAc,+CAAM;AAC3B,IAAI,KAAK,EAAE,EAuGV;AACc,sEAAO,E;;;;;;;;AChHtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AACc;AAC5C;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,IAAI,KAAK,EAAE,EAqIV;AACD,IAAI,KAAK,EAAE,EAaV;AACD,IAAI,KAAK,EAAE,EAwCV;AACD;AACA;AACA,cAAc,gEAAU;AACxB,WAAW,gEAAU;AACrB,WAAW,gEAAU;AACrB,YAAY,gEAAU;AACtB,SAAS,gEAAU;AACnB,aAAa,gEAAU;AACvB,SAAS,gEAAU;AACnB,WAAW,gEAAU;AACN,qEAAM,EAAC;AACtB,mC;;;;;;;;AChTA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAC8B;AACY;AACZ;AAC9B;AACA;AACO,UAAU,+CAAM;AACvB,IAAI,KAAK,EAAE,EAsFV;AACc,kEAAG,E;;;;;;;;ACjGlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AACvB;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACO;AACA;AACA;AACP,IAAI,KAAK,EAAE,EAoCV;AACD,IAAI,KAAK,EAAE,EAaV;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,qEAAM,EAAC;AACtB,mC;;;;;;;;ACjGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAC8B;AACc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACA;AACA,IAAI,KAAuB,EAAE,EA6C5B;AACD,IAAI,KAAK,EAAE,EAwFV;AACD,IAAI,KAAK,EAAE,EAUV;AACD,IAAI,KAAK,EAAE,EAYV;AACD,IAAI,KAAK,EAAE,EASV;AACD;AACA;AACA,aAAa,gEAAU;AACvB,OAAO,gEAAU;AACjB,OAAO,gEAAU;AACjB,OAAO,gEAAU;AACjB,UAAU,gEAAU;AACpB,YAAY,gEAAU;AACtB,WAAW,gEAAU;AACN,oEAAK,E;;;;;;;;ACnMpB;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,iC;;;;;;;;ACtBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsC;AACR;AACY;AAC1C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,uBAAuB,qDAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,uCAAuC,iDAAG;AAC1C;AACA;AACA,uEAAuE,iBAAiB;AACxF;AACA;AACA,4BAA4B,qDAAO;AACnC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iDAAG;AAC5C;AACA;AACA,yEAAyE,iBAAiB;AAC1F;AACA,gCAAgC,qDAAO;AACvC;AACA,8DAA8D,qBAAqB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,uEAAQ,EAAC;AACxB,qC;;;;;;;;AC3HA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC8B;AAC9B;AACA;AACA;AACA;AACA;AAC8B;AACvB,kBAAkB,+CAAM;AACxB;AACP;AACA;AACA,IAAI,KAAK,EAAE,EA6LV;AACD,KAAK,yDAAG;AACR,IAAI,+CAAM;AACV;AACA;AACA;AACA,aAAa;AACb;AACA;AACe,0EAAW,E;;;;;;;;AClN1B;AAAA;AAAA;AAAA;AAAA;AAA8B;AACc;AAC5C;AACA;AACA;AACA,qBAAqB,iDAAG;AACxB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,sBAAsB,wDAAW;AACxC;AACA;AACA;AACA;AACA;AACA,gCAAgC,iDAAG;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,sEAAO,EAAC;AACvB,oC;;;;;;;;ACvEA;AAAA;AAAA;AAAsC;AACtC;AACA;AACA;AACA;AACA,WAAW,qDAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA,mBAAmB,qDAAO;AAC1B;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACe,0EAAW,EAAC;AAC3B,wC;;;;;;;;ACtDA;AAAA;AAAA;AAAA;AAAA;AAC8B;AAC9B;AACA;AACA;AAC8B;AAC9B;AACA;AACO,UAAU,+CAAM;AACvB,IAAI,KAAK,EAAE,EAiEV;AACc,kEAAG,E;;;;;;;;AC3ElB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8C;AAC9C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,kCAAkC,0DAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;ACpEA;AAAA;AAAA;AAAA;AAAA;AAAkC;AACQ;AACJ;AAC/B,8BAA8B,qDAAO;AAC5C;AACA;AACA,6BAA6B,kDAAQ;AACrC,2CAA2C,6CAAG;AAC9C,6CAA6C,6CAAG;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACe,8EAAe,EAAC;AAC/B,4C;;;;;;;;AC1EA;AAAA;AAAA;AAAA;AAAA;AAAuC;AACoC;AACzB;AAClD,eAAe,sEAAsB;AACrC,gBAAgB,oDAAM,EAAE,SAAS,gEAAY,EAAE,gDAAI,EAAE,sDAAO,EAAE,8DAAW,EAAE;AACpE,wBAAwB,cAAc,mDAAmD,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,8BAA8B,oDAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAM;AACd,QAAQ,oDAAM;AACd;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oDAAM;AACtB,gBAAgB,oDAAM;AACtB;AACA;AACA,mBAAmB,oDAAM;AACzB;AACA;AACA,CAAC;AACc,oEAAK,EAAC;AACrB,kC;;;;;;;;ACxDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACA;AACsB;AACvD,gBAAgB,oDAAM,EAAE,CAAC,8DAAW,EAAE,sDAAO,EAAE;AAC/C,gCAAgC,cAAc,uBAAuB,EAAE;AACvE,yBAAyB,iDAAG;AAC5B,4BAA4B,iDAAG;AAC/B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACA;AACQ,qEAAM,EAAC;AACtB,mC;;;;;;;;ACvFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAc,SAAI,IAAI,SAAI;AAC1B;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACyE;AAC3C;AACI;AACD;AACF;AAC8F;AACtH;AACA;AACP;AACA,8BAA8B,4DAAa;AAC3C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,oDAAM,EAAE,CAAC,8DAAW,EAAE,uDAAM,EAAE,gEAAY,EAAE,2DAAQ,EAAE,8DAAW,EAAE;AAC5E,wBAAwB,cAAc,2DAA2D,cAAc;AACtH,wBAAwB,iDAAG;AAC3B;AACA,eAAe,UAAU,GAAG,kDAAI;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA,yBAAyB,kDAAI;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wFAAiC;AACjD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,0EAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA,gCAAgC,yEAAkB;AAClD,+BAA+B,0EAAmB;AAClD;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA,6CAA6C,gBAAgB,GAAG,wCAAwC;AACxG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,yEAAkB;AAC3C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,oEAAK,EAAC;AACrB,kC;;;;;;;;AC9IA;AAAA;AAAA;AAAoE;AACpE,wBAAwB,oDAAM,EAAE,CAAC,8DAAW,EAAE,8DAAW,EAAE,sDAAO,EAAE;AAC7D,mCAAmC,cAAc,oCAAoC,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,uEAAQ,EAAC;AACxB,qC;;;;;;;;AC1CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AACF;AACS;AACb;AACN;AACjB;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA,sCAAsC;AACtC,IAAI,KAAK,EAAE,EA0DV;AACD;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,gBAAgB,KAAK,EAAE,EAEV;AACb,oBAAoB;AACpB;AACA,YAAY,KAAK,EAAE,EAEV;AACT,gBAAgB,yBAAyB,gDAAgD;AACzF;AACA,YAAY;AACZ;AACO,4BAA4B,iDAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,4EAAa,EAAC;AAC7B,0C;;;;;;;;AClHA;AAAA;AAAA;AAA0C;AACnC,uBAAuB,qDAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,uEAAQ,EAAC;AACxB,qC;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AAAiC;AACC;AAClC,gBAAgB,oDAAM,EAAE,CAAC,sDAAM,EAAE;AAC1B,mDAAmD,mCAAmC;AAC7F;AACA,iCAAiC,cAAc,SAAS,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACe,yEAAU,EAAC;AAC1B,uC;;;;;;;;ACtCA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,2EAAY,EAAC;AAC5B,mC;;;;;;;;;ACrBA;AAAA;AACA;AACA;AACgB,kKAAmG,EAAE,E;;;;;;;ACHrH;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AACpC;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA,OAAO,iBAAiB,GAAG,oDAAM;AACjC;AACA,4BAA4B,oDAAM;AAClC,WAAW,oDAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oDAAM;AACrC;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,QAAQ;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAI;AACtB;AACA;AACA,wBAAwB,oDAAM,WAAW,oDAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,KAAI,WAAW,oDAAM;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,KAAI,IAAI,oDAAM,4BAA4B,oDAAM;AAC9E,qCAAqC,oDAAM;AAC3C,iCAAiC,oDAAM;AACvC,uCAAuC,KAAI,IAAI,oDAAM;AACrD,iCAAiC,KAAI,IAAI,oDAAM;AAC/C,gCAAgC,KAAI,IAAI,oDAAM;AAC9C;AACA,uBAAuB,KAAI;AAC3B;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,aAAa;AACb,6BAA6B;AAC7B;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,CAAC;AACD;AACA;AACA,gCAAgC,oDAAM;AACtC,gC;;;;;;;;ACjNA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8E;AACL;AACvC;AACc;AACqB;AACA;AACrE,gBAAgB,oDAAM,EAAE,CAAC,8DAAW,EAAE,2DAAQ,EAAE,8DAAW,EAAE,gEAAY,EAAE;AACpE,uBAAuB,0BAA0B,mDAAmD,EAAE;AAC7G,sCAAsC,0DAAY;AAClD;AACA;AACA;AACA,YAAY,0EAAoB,GAAG;AACnC;AACA;AACA;AACA,gDAAgD,0DAAY;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4DAAS,EAAE,mCAAmC;AACzE,gBAAgB,gEAAU;AAC1B;AACA;AACA,iBAAiB;AACjB,2DAA2D,mEAAgB;AAC3E;AACA;AACA;AACA;AACA;AACA,gDAAgD,mEAAgB;AAChE,KAAK;AACL,uBAAuB,0DAAY;AACnC;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iEAAc,UAAU,sBAAsB;AACjE,SAAS;AACT,2BAA2B;AAC3B,oDAAoD,0DAAY;AAChE;AACA;AACA;AACA,SAAS;AACT;AACA,oDAAoD,0DAAY;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,mEAAI,EAAC;AACpB,iC;;;;;;;;ACnEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AACE;AACwB;AAC9D,aAAa,mBAAO,CAAC,EAAkB;AACvC;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,KAAK;AACL;AACA,uCAAuC;AACvC;AACA,CAAC;AACD,yBAAyB,cAAc;AACvC,wBAAwB,qDAAO;AAC/B,4BAA4B,qDAAO;AACnC;AACA;AACA,iDAAiD,OAAO;AACxD,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP,kCAAkC;AAClC;AACO;AACP,gDAAgD,EAAE;AAClD;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qEAAc;AAC9B,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA,oBAAoB,6EAAsB,EAAE,iCAAiC;AAC7E;AACA;AACA;AACA,gBAAgB,6EAAsB,EAAE,sBAAsB,EAAE;AAChE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO,+BAA+B;AACtC,WAAW,+EAA+E,oDAAM,uBAAuB,oDAAM,sCAAsC;AACnK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6EAAsB,EAAE,sBAAsB,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,WAAW,kCAAkC,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,UAAU,cAAc,aAAa,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,QAAQ,6EAAsB,gBAAgB,QAAQ,8BAA8B,qBAAqB,8BAA8B,oBAAoB,8BAA8B,EAAE;AAC3L,mBAAmB,eAAe;AAClC;AACA;AACA;AACA,4BAA4B,qDAAO;AAC5B;AACP,SAAS,uCAAuC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,mBAAmB,mDAAmD;AACtE;AACA;AACA;AACA,8DAA8D,6DAAS;AACvE;AACA,2CAA2C,UAAU,GAAG,SAAS;AACjE,+CAA+C,UAAU,GAAG,SAAS;AACrE;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU,cAAc,gBAAgB,EAAE;AAC/E;AACA,aAAa;AACb;AACA;AACA;AACA,gBAAgB,6EAAsB,EAAE,kBAAkB,+BAA+B,EAAE;AAC3F;AACA,aAAa;AACb;AACA;AACA,gDAAgD,UAAU,GAAG,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,oBAAoB,GAAG,SAAS,GAAG,IAAI;AAC7F;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA,kDAAkD,SAAS,GAAG,IAAI;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;ACrQA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,IAA2B;;AAExC;AACA,4BAA4B,mBAAO,EAAE,EAAQ,IAAI,mBAAO,EAAE,EAAc;AACxE,EAAE,MAAM,EAIN;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,0DAA0D;;AAE1D,uBAAuB;;AAEvB,kCAAkC,wBAAwB;AAC1D;;AAEA;AACA;AACA,sBAAsB;AACtB,aAAa;AACb;AACA,mBAAmB;AACnB,kBAAkB,2BAA2B,oBAAoB,KAAK;AACtE;AACA;AACA,kBAAkB,oDAAoD;AACtE,mBAAmB;AACnB,kBAAkB,2BAA2B,oBAAoB,KAAK;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA,mBAAmB,8DAA8D;AACjF;AACA,sBAAsB;AACtB,aAAa;AACb;AACA,mBAAmB,4EAA4E;AAC/F;AACA,mBAAmB,8DAA8D;AACjF;AACA,sBAAsB;AACtB,aAAa;AACb;AACA,sBAAsB;AACtB,aAAa;AACb;AACA,mBAAmB,8DAA8D;AACjF;AACA,mBAAmB,oDAAoD;AACvE,+BAA+B,UAAU,EAAE;AAC3C;AACA,sBAAsB;AACtB,aAAa;AACb,+BAA+B,UAAU,EAAE;AAC3C;AACA,mBAAmB,oDAAoD;AACvE,gCAAgC,SAAS,gDAAgD,EAAE;AAC3F,+BAA+B,UAAU,EAAE;AAC3C;AACA,mBAAmB,oDAAoD;AACvE,8BAA8B,SAAS,oBAAoB,EAAE;AAC7D,+BAA+B,SAAS,mCAAmC,EAAE;AAC7E,mBAAmB,2CAA2C;AAC9D;AACA,mBAAmB,sEAAsE;AACzF,mCAAmC;AACnC,mBAAmB,0CAA0C,oCAAoC,IAAI;AACrG,+BAA+B,UAAU,EAAE;AAC3C,mCAAmC,uBAAuB,EAAE;AAC5D,wBAAwB;AACxB,mBAAmB,4BAA4B,+CAA+C,6BAA6B;AAC3H,+BAA+B,UAAU,EAAE;AAC3C;AACA,mBAAmB,8DAA8D;AACjF,8BAA8B,aAAa,EAAE;AAC7C;AACA,mBAAmB,0DAA0D;AAC7E,8BAA8B,YAAY,EAAE;AAC5C,sBAAsB;AACtB,mBAAmB,6BAA6B,wBAAwB,KAAK;AAC7E,8BAA8B,iBAAiB,EAAE;AACjD,sBAAsB;AACtB,mBAAmB,6BAA6B,wBAAwB,KAAK;AAC7E,8BAA8B,iBAAiB,EAAE;AACjD;AACA,mBAAmB,0DAA0D;AAC7E;AACA;AACA,aAAa;AACb;AACA,mBAAmB,sDAAsD;AACzE;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,mBAAmB,kEAAkE;AACrF,mBAAmB,2CAA2C;AAC9D,+BAA+B,mBAAmB,EAAE;AACpD;AACA,mBAAmB,oEAAoE;;AAEvF;AACA;AACA;AACA,gCAAgC,oCAAoC;AACpE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,0CAA0C;AACpD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B,YAAY;AACtC;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yCAAyC,QAAQ;;AAEjD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,oDAAoD;;AAEhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,yBAAyB,EAAE;AAC1F,+DAA+D,yBAAyB,EAAE;AAC1F,+DAA+D,yBAAyB,EAAE;AAC1F,+DAA+D,yBAAyB,EAAE;AAC1F;;AAEA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,4CAA4C,kBAAkB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,kBAAkB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,4CAA4C,mBAAmB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC,mBAAmB;AACvD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC,mBAAmB;AACvD;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA,kBAAkB,2CAA2C;AAC7D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B,YAAY,SAAS;AACrB,YAAY,WAAW;AACvB;AACA,qB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,KAAK,+BAA+B;AACpC;AACA;AACA;;;;AAIA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,gCAAgC,kDAAkD;AAClF,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA,8CAA8C,6BAA6B;AAC3E;AACA,4CAA4C,kBAAkB;AAC9D,aAAa,MAAM;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB,KAAK,MAAM;AAC7D;;;;AAIA;AACA,4DAA4D;AAC5D,oCAAoC;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;AACA;AACA,GAAG;;AAEH,6BAA6B,6BAA6B;AAC1D;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,SAAS;AACvB,cAAc,uBAAuB;AACrC,cAAc,SAAS;AACvB,gBAAgB,OAAO;AACvB;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;;AAEH,6BAA6B,eAAe;AAC5C;AACA,cAAc,OAAO;AACrB,cAAc,uBAAuB;AACrC,gBAAgB,OAAO;AACvB;AACA,UAAU;AACV;AACA,GAAG;;AAEH;AACA;AACA;AACA,iBAAiB;;AAEjB,8CAA8C,iBAAiB;AAC/D;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;AACpF;AACA;AACA;AACA,mCAAmC;AACnC,wBAAwB;AACxB,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,YAAY;AACvC;;AAEA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA,iDAAiD,oBAAoB,EAAE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA,8CAA8C,qEAAqE;AACnH;AACA;AACA,eAAe,uBAAuB;;AAEtC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,wCAAwC;AACpE,YAAY,yCAAyC;AACrD,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY,OAAO,QAAQ;AAC3B,YAAY,OAAO;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,iCAAiC,KAAK;AACtC,aAAa,cAAc;AAC3B;AACA;AACA,kBAAkB,oCAAoC,EAAE;AACxD;AACA;AACA,mBAAmB,QAAQ,KAAK;AAChC,kCAAkC,mBAAmB,WAAW,OAAO,WAAW,IAAI;AACtF;AACA,mBAAmB,oBAAoB;AACvC;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oCAAoC,EAAE;AAC3D,qBAAqB,0DAA0D,kBAAkB,sBAAsB,qBAAqB,oCAAoC,EAAE,QAAQ;AAC1L;AACA;AACA;AACA;AACA;AACA,qBAAqB,MAAM,QAAQ,KAAK;AACxC,6CAA6C,0BAA0B,IAAI,KAAK,IAAI,KAAK,IAAI,OAAO,KAAK,YAAY;AACrH,2BAA2B,MAAM,KAAK;AACtC,yCAAyC,4BAA4B,IAAI,cAAc,EAAE;AACzF,4BAA4B,qBAAqB;AACjD,0CAA0C,0CAA0C;AACpF;AACA,gBAAgB,QAAQ;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,iBAAiB,oCAAoC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,iBAAiB,2DAA2D,SAAS;AACrF,KAAK;AACL;AACA;AACA,aAAa,kDAAkD;AAC/D,mBAAmB,4EAA4E,SAAS;AACxG;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,CAAC;AACD;;;AAGA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA,oEAAoE,KAAK;AACzE,wBAAwB,aAAa;AACrC;;;;;AAKA;AACA;AACA;AACA;AACA,6BAA6B,KAAK,IAAI,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA,MAAM;AACN;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH,yCAAyC;AACzC;AACA,KAAK;AACL;;AAEA;AACA;;;;;AAKA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,4CAA4C,OAAO;AACnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;;;;;AAKA,CAAC;;;;;;;;;AC9hED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,mBAAO,EAAE,EAAQ;;AAElC;AACA,mBAAO,EAAE,EAAc;AACvB,mBAAO,EAAE,EAAqB;AAC9B,mBAAO,EAAE,EAAmB;;;;;;;;ACrB5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA0C;AAChD;AACA,EAAE,oCAAQ,OAAO;AAAA;AAAA;AAAA;AAAA,oGAAE;AACnB,EAAE,MAAM,EAMN;;AAEF,CAAC;;;AAGD;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B,cAAc,UAAU;AACxB,yBAAyB,UAAU;AACnC,2BAA2B,IAAI,IAAI;AACnC;AACA,GAAG;;AAEH;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+CAA+C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,IAAI,kBAAkB,IAAI;AACxE,2CAA2C,IAAI,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,oBAAoB,IAAI,kBAAkB,EAAE;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,GAAG;AACH;;;;;AAKA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,OAAO;AAClH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,YAAY,KAAK,aAAa,EAAE,GAAG,KAAK,aAAa,EAAE;AACvD,QAAQ,KAAK,mBAAmB;AAChC;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qDAAqD,IAAI,GAAG,IAAI;AAChE,cAAc,kBAAkB;;AAEhC,mDAAmD,IAAI,GAAG,IAAI;AAC9D;;AAEA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gFAAgF,IAAI,SAAS,EAAE,SAAS,IAAI;;AAE5G;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA,4BAA4B,OAAO;AACnC;;AAEA;;;;;AAKA,CAAC;;;;;;;;AC7qBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA0C;AAChD;AACA,EAAE,iCAAQ,EAAE,uBAAS,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAE;AAClC,EAAE,MAAM,EAMN;;AAEF,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA,YAAY,WAAW;AACvB,YAAY,SAAS;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA,aAAa,sBAAsB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,aAAa,OAAO;AACpB;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY,WAAW;AACvB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC,YAAY,WAAW;AACvB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,qBAAqB;AACjC,YAAY,WAAW;AACvB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,MAAM;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B,YAAY,KAAK;AACjB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,EAAE;AACd,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA,wBAAwB,mBAAmB;AAC3C;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;AACD;;;;AAIA;AACA;AACA;;;;;AAKA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;AAKA,CAAC;;;;;;;;ACxkBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA0C;AAChD;AACA,EAAE,iCAAQ,EAAE,uBAAS,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAE;AAClC,EAAE,MAAM,EAMN;;AAEF,CAAC;;AAED;AACA;;;;AAIA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,qDAAqD,UAAU;AAC/D;AACA;;AAEA;AACA,2DAA2D,UAAU;AACrE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C,UAAU;AACtD;AACA;;AAEA;AACA,4CAA4C,UAAU;AACtD;AACA;;AAEA;;AAEA;;;;;AAKA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;AAKA,CAAC;;;;;;;;ACpGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA0C;AAChD;AACA,EAAE,iCAAQ,EAAE,uBAAS,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAE;AAClC,EAAE,MAAM,EAMN;;AAEF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+DAA+D,iBAAiB;AAChF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;;AAGD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;AAKA,CAAC;;;;;;;;ACnKD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,IAA2B;;AAExC;AACA,4BAA4B,mBAAO,EAAE,EAAQ;AAC7C,EAAE,MAAM,EAIN;AACF,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,kBAAkB;AAC1C;AACA,sBAAsB,EAAE,EAAE,EAAE,gBAAgB;AAC5C;AACA,sBAAsB,KAAK,GAAG,MAAM;AACpC;AACA;AACA,MAAM,EAAE;AACR;AACA;;AAEA,aAAa,UAAU;AACvB,8BAA8B,iBAAiB;AAC/C,0BAA0B,IAAI,IAAI;AAClC;AACA,EAAE;;AAEF;AACA;;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;;;;AAKA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;AAKA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF,8DAA8D,KAAK;AACnE;AACA,EAAE;AACF;;;;;AAKA;AACA;AACA,yBAAyB;AACzB;;;;;AAKA;AACA,gEAAgE,KAAK;AACrE,wBAAwB,aAAa;AACrC;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK,cAAc,MAAM,iBAAiB,QAAQ,GAAG,QAAQ;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,aAAa,KAAK,cAAc,MAAM,IAAI,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA,sCAAsC;AACtC;;;;;AAKA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;AAKA,CAAC;;;;;;;;;;ACnbD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4D;AACtB;AACO;AACtC;AACA,2BAA2B,kDAAQ;AAC1C,uBAAuB;AACvB,uBAAuB,4DAAS,EAAE,8BAA8B,oEAAiB,IAAI;AACrF,YAAY,gEAAU;AACtB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACe,2EAAY,EAAC;AAC5B,yC;;;;;;;;ACzBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qDAAO,UAAU,qDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;AC9LA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;;AAEO;AACP;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEO;AACP;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEO;AACP;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEO;AACP,mCAAmC,oCAAoC;AACvE;;AAEO;AACP;AACA;;AAEO;AACP;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEO;AACP,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEO;AACP,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEO;AACP;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,6BAA6B,oBAAoB,gDAAgD,gBAAgB,EAAE,KAAK;AACjJ;;AAEO;AACP;AACA;AACA,2GAA2G,sFAAsF,aAAa,EAAE;AAChN,sBAAsB,8BAA8B,gDAAgD,uDAAuD,EAAE,EAAE,GAAG;AAClK,4CAA4C,sCAAsC,UAAU,oBAAoB,EAAE,EAAE,UAAU;AAC9H;;AAEO;AACP,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP,4CAA4C;AAC5C;;;;;;;;;ACzLA;AAAA;AAAA;AAAoD;AACpD,gBAAgB,oDAAM,EAAE,CAAC,gDAAI,EAAE,8DAAW,EAAE;AACrC,oCAAoC,cAAc,oBAAoB,EAAE;AAC/E;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,uEAAQ,EAAC;AACxB,qC;;;;;;;;ACpBA;AAAA;AAAA;AAAuC;AACvC,gBAAgB,oDAAM,EAAE,CAAC,gDAAI,EAAE;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACO,6BAA6B,cAAc,OAAO,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,4CAA4C;AAC5C,8CAA8C;AAC9C,4CAA4C;AAC5C,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACc,yEAAU,EAAC;AAC1B,uC;;;;;;;;ACjFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAc,SAAI,IAAI,SAAI;AAC1B;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACiC;AACA;AACoC;AACvC;AACC;AAC/B,gCAAgC,qBAAqB;AACrD,cAAc,UAAU,GAAG,QAAQ;AACnC;AACA;AACA;AACA;AACA,6BAA6B,iDAAG;AAChC,uCAAuC,iDAAG;AAC1C,uCAAuC,iDAAG;AAC1C,+CAA+C,iDAAG;AAClD,kCAAkC,iDAAG;AACrC;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA,kCAAkC,iDAAG;AACrC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,sBAAsB,iDAAG;AACzB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,UAAU,cAAc;AAC5E,SAAS;AACT;AACA,8DAA8D,UAAU,cAAc;AACtF,SAAS;AACT;AACA;AACA,0EAA0E,mBAAmB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,+BAA+B;AAC9E;AACA;AACA;AACA;AACA,+CAA+C,yBAAyB;AACxE,qEAAqE,iDAAG;AACxE;AACA;AACA,+CAA+C,SAAS,eAAe;AACvE;AACA;AACA;AACO;AACP;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA,6BAA6B,MAAM;AACnC,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA,qBAAqB,+DAA+D;AACpF;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oDAAM;AACtB,IAAI,8DAAW;AACf,IAAI,sDAAO;AACX,IAAI,gEAAY;AAChB,IAAI,uDAAM;AACV,CAAC;AACD;AACA,6BAA6B,iDAAG;AAChC,4BAA4B,iDAAG;AAC/B;AACA,sCAAsC,iDAAG;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB;AAC3B;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB;AAC3B;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB,yBAAyB;AACvF;AACA,KAAK;AACL;AACA;AACA;AACA,0CAA0C,oBAAoB,mBAAmB;AACjF,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,iDAAG;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iDAAG;AACjC;AACA,8BAA8B,iDAAG;AACjC;AACA;AACA;AACA;AACA;AACA,6BAA6B,8BAA8B,6CAA6C,EAAE;AAC1G,4CAA4C,YAAY;AACxD;AACA,2CAA2C,yBAAyB,GAAG,yBAAyB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA;AACA,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,YAAY;AAClE;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,6BAA6B,iDAAG;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kDAAI;AACpB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mDAAmD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA,yBAAyB;AACzB;AACA;AACA,+BAA+B,oCAAoC;AACnE;AACA;AACA,uCAAuC,4BAA4B;AACnE,+CAA+C,+CAA+C,WAAW,GAAG;AAC5G;AACA;AACA;AACA;AACA,4CAA4C,aAAa;AACzD;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA,mCAAmC,kBAAkB;AACrD,gDAAgD,+CAA+C,WAAW,GAAG;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,SAAS,IAAI;AACb,2CAA2C;AAC3C;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iDAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD,4CAA4C,0CAA0C,WAAW,GAAG;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sDAAsD;AAC9F;AACA;AACA;AACA,wCAAwC,qCAAqC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB,uDAAuD;AACxG;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C,qCAAqC,0CAA0C,WAAW;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS,eAAe;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,gDAAgD,sBAAsB;AACtE;AACA;AACA;AACA;AACA,mCAAmC,yBAAyB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACM;AACP;AACA;AACA,sC","file":"common.mjs","sourcesContent":["var __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nimport global from '../shim/global';\nimport has from './has';\nimport WeakMap from '../shim/WeakMap';\nimport Set from '../shim/Set';\nimport Map from '../shim/Map';\nimport { flat } from '../shim/array';\nimport { Registry, isWidget, isWidgetBaseConstructor, isWidgetFunction, isWNodeFactory } from './Registry';\nimport { auto } from './diff';\nimport RegistryHandler from './RegistryHandler';\nconst defaultNodeApi = {\n    getDocument() {\n        return global.document;\n    },\n    getBody() {\n        return global.document.body;\n    },\n    getHead() {\n        return global.document.head;\n    },\n    getTag(domNode = { tagName: '' }) {\n        return domNode.tagName;\n    },\n    create(tag) {\n        return global.document.createElement(tag);\n    },\n    createText(text) {\n        return global.document.createTextNode(text);\n    },\n    createWithNamespace(tag, namespace) {\n        return global.document.createElementNS(tag, namespace);\n    },\n    getProperty(domNode, key) {\n        return domNode[key];\n    },\n    setProperty(domNode, key, value) {\n        domNode[key] = value;\n    },\n    getAttribute(domNode, key) {\n        return domNode.getAttribute(key);\n    },\n    setAttribute(domNode, key, value) {\n        domNode.setAttribute(key, value);\n    },\n    setAttributeWithNamespace(domNode, namespace, key, value) {\n        domNode.setAttributeNS(namespace, key, value);\n    },\n    removeAttribute(domNode, key) {\n        domNode.removeAttribute(key);\n    },\n    setStyle(domNode, key, value) {\n        domNode.style[key] = value || '';\n    },\n    insertBefore(domNode, newNode, referenceNode) {\n        domNode.insertBefore(newNode, referenceNode);\n    },\n    removeChild(domNode, childNode) {\n        domNode.removeChild(childNode);\n    },\n    getChildren(domNode) {\n        return domNode.childNodes;\n    },\n    addEvent(domNode, name, callback, options) {\n        has('dom-passive-event')\n            ? domNode.addEventListener(name, callback, options)\n            : domNode.addEventListener(name, callback);\n    },\n    removeEvent(domNode, name, callback) {\n        domNode.removeEventListener(name, callback);\n    },\n    getParent(domNode) {\n        return domNode.parentNode;\n    },\n    replaceChild(domNode, newChild, oldChild) {\n        domNode.replaceChild(newChild, oldChild);\n    },\n    contains(domNode, child) {\n        return domNode.contains(child);\n    },\n    requestAnimationFrame(callback) {\n        return global.requestAnimationFrame(callback);\n    },\n    cancelAnimationFrame(number) {\n        return global.cancelAnimationFrame(number);\n    },\n    callProperty(domNode, property) {\n        typeof domNode[property] === 'function' && domNode[property]();\n    },\n    isTextNode(domNode) {\n        return !!(domNode && domNode.nodeType === 3);\n    },\n    equals(nodeA, nodeB) {\n        return nodeA === nodeB;\n    }\n};\nconst EMPTY_ARRAY = [];\nconst nodeOperations = ['focus', 'blur', 'scrollIntoView', 'click'];\nconst NAMESPACE_W3 = 'http://www.w3.org/';\nconst NAMESPACE_SVG = NAMESPACE_W3 + '2000/svg';\nconst NAMESPACE_XLINK = NAMESPACE_W3 + '1999/xlink';\nconst WNODE = '__WNODE_TYPE';\nconst VNODE = '__VNODE_TYPE';\nconst DOMVNODE = '__DOMVNODE_TYPE';\n// @ts-ignore\nconst scope = typeof __DOJO_SCOPE === 'string' ? __DOJO_SCOPE : 'dojo_scope';\nif (!global[scope]) {\n    global[scope] = {};\n}\nexport function setRendering(value) {\n    global[scope].rendering = value;\n}\nexport function incrementBlockCount() {\n    const blocksPending = global[scope].blocksPending || 0;\n    global[scope].blocksPending = blocksPending + 1;\n}\nexport function decrementBlockCount() {\n    const blocksPending = global[scope].blocksPending || 0;\n    global[scope].blocksPending = blocksPending - 1;\n}\nexport function isTextNode(item) {\n    return item && item.nodeType === 3;\n}\nfunction isLazyDefine(item) {\n    return Boolean(item && item.label);\n}\nfunction isWNodeWrapper(child) {\n    return child && isWNode(child.node);\n}\nfunction isVNodeWrapper(child) {\n    return !!child && isVNode(child.node);\n}\nfunction isVirtualWrapper(child) {\n    return isVNodeWrapper(child) && child.node.tag === 'virtual';\n}\nfunction isBodyWrapper(wrapper) {\n    return isVNodeWrapper(wrapper) && wrapper.node.tag === 'body';\n}\nfunction isHeadWrapper(wrapper) {\n    return isVNodeWrapper(wrapper) && wrapper.node.tag === 'head';\n}\nfunction isSpecialWrapper(wrapper) {\n    return isHeadWrapper(wrapper) || isBodyWrapper(wrapper) || isVirtualWrapper(wrapper);\n}\nfunction isAttachApplication(value) {\n    return !!value.type;\n}\nexport function isWNode(child) {\n    return Boolean(child && child !== true && typeof child !== 'string' && child.type === WNODE);\n}\nexport function isVNode(child) {\n    return Boolean(child &&\n        child !== true &&\n        typeof child !== 'number' &&\n        typeof child !== 'string' &&\n        (child.type === VNODE || child.type === DOMVNODE));\n}\nexport function isDomVNode(child) {\n    return Boolean(child && child !== true && typeof child !== 'number' && typeof child !== 'string' && child.type === DOMVNODE);\n}\nexport function isElementNode(value) {\n    return !!value.tagName;\n}\nfunction toTextVNode(data) {\n    return {\n        tag: '',\n        properties: {},\n        children: undefined,\n        text: `${data}`,\n        type: VNODE\n    };\n}\nexport function w(widgetConstructorOrNode, properties, children) {\n    if (properties.__children__) {\n        delete properties.__children__;\n    }\n    if (isWNodeFactory(widgetConstructorOrNode)) {\n        return widgetConstructorOrNode(properties, children);\n    }\n    if (isWNode(widgetConstructorOrNode)) {\n        properties = Object.assign({}, widgetConstructorOrNode.properties, properties);\n        children = children ? children : widgetConstructorOrNode.children;\n        widgetConstructorOrNode = widgetConstructorOrNode.widgetConstructor;\n    }\n    return {\n        children: children || [],\n        widgetConstructor: widgetConstructorOrNode,\n        properties,\n        type: WNODE\n    };\n}\nexport function v(tag, propertiesOrChildren = {}, children = undefined) {\n    let properties = propertiesOrChildren;\n    let deferredPropertiesCallback;\n    if (typeof tag.tag === 'function') {\n        return tag.tag(properties, children);\n    }\n    if (Array.isArray(propertiesOrChildren)) {\n        children = propertiesOrChildren;\n        properties = {};\n    }\n    if (typeof properties === 'function') {\n        deferredPropertiesCallback = properties;\n        properties = {};\n    }\n    if (isVNode(tag)) {\n        let { classes = [], styles = {} } = properties, newProperties = __rest(properties, [\"classes\", \"styles\"]);\n        let _a = tag.properties, { classes: nodeClasses = [], styles: nodeStyles = {} } = _a, nodeProperties = __rest(_a, [\"classes\", \"styles\"]);\n        nodeClasses = Array.isArray(nodeClasses) ? nodeClasses : [nodeClasses];\n        classes = Array.isArray(classes) ? classes : [classes];\n        styles = Object.assign({}, nodeStyles, styles);\n        properties = Object.assign({}, nodeProperties, newProperties, { classes: [...nodeClasses, ...classes], styles });\n        children = children ? children : tag.children;\n        tag = tag.tag;\n    }\n    return {\n        tag,\n        deferredPropertiesCallback,\n        children,\n        properties,\n        type: VNODE\n    };\n}\n/**\n * Create a VNode for an existing DOM Node.\n */\nexport function dom({ node, attrs = {}, props = {}, on = {}, diffType = 'none', onAttach, onDetach, onUpdate }, children) {\n    return {\n        tag: isElementNode(node) ? node.tagName.toLowerCase() : '',\n        properties: props,\n        attributes: attrs,\n        events: on,\n        children,\n        type: DOMVNODE,\n        domNode: node,\n        text: isElementNode(node) ? undefined : node.data,\n        diffType,\n        onAttach,\n        onUpdate,\n        onDetach\n    };\n}\nexport const REGISTRY_ITEM = '__registry_item';\nexport class FromRegistry {\n    constructor() {\n        /* tslint:disable-next-line:variable-name */\n        this.__properties__ = {};\n    }\n}\nFromRegistry.type = REGISTRY_ITEM;\nexport function fromRegistry(tag) {\n    var _a;\n    return _a = class extends FromRegistry {\n            constructor() {\n                super(...arguments);\n                this.properties = {};\n                this.name = tag;\n            }\n        },\n        _a.type = REGISTRY_ITEM,\n        _a;\n}\nexport function tsx(tag, properties = {}, ...children) {\n    children = flat(children, Infinity);\n    properties = properties === null ? {} : properties;\n    if (typeof tag === 'string') {\n        return v(tag, properties, children);\n    }\n    else if (tag.type === 'registry' && properties.__autoRegistryItem) {\n        const name = properties.__autoRegistryItem;\n        delete properties.__autoRegistryItem;\n        return w(name, properties, children);\n    }\n    else if (tag.type === REGISTRY_ITEM) {\n        const registryItem = new tag();\n        return w(registryItem.name, properties, children);\n    }\n    else {\n        return w(tag, properties, children);\n    }\n}\nexport function propertiesDiff(current, next, invalidator, ignoreProperties) {\n    const propertyNames = [...Object.keys(current), ...Object.keys(next)];\n    for (let i = 0; i < propertyNames.length; i++) {\n        if (ignoreProperties.indexOf(propertyNames[i]) > -1) {\n            continue;\n        }\n        const result = auto(current[propertyNames[i]], next[propertyNames[i]]);\n        if (result.changed) {\n            invalidator();\n            break;\n        }\n        ignoreProperties.push(propertyNames[i]);\n    }\n}\nfunction createClassPropValue(classes = []) {\n    let classNames = '';\n    if (Array.isArray(classes)) {\n        for (let i = 0; i < classes.length; i++) {\n            let className = classes[i];\n            if (className && className !== true) {\n                classNames = classNames ? `${classNames} ${className}` : className;\n            }\n        }\n        return classNames;\n    }\n    if (classes && classes !== true) {\n        classNames = classes;\n    }\n    return classNames;\n}\nfunction arrayFrom(arr) {\n    return Array.prototype.slice.call(arr);\n}\nfunction createFactory(callback, middlewares, key) {\n    const factory = (properties, children) => {\n        if (properties) {\n            const result = w(callback, properties, children);\n            callback.isWidget = true;\n            callback.middlewares = middlewares;\n            return result;\n        }\n        return {\n            middlewares,\n            callback\n        };\n    };\n    const keys = Object.keys(middlewares).reduce((keys, middlewareName) => {\n        const middleware = middlewares[middlewareName];\n        if (middleware.keys) {\n            keys = [...keys, ...middleware.keys];\n        }\n        return keys;\n    }, key ? [key] : []);\n    factory.withType = () => {\n        return factory;\n    };\n    callback.keys = keys;\n    factory.keys = keys;\n    factory.isFactory = true;\n    return factory;\n}\nexport function create(middlewares = {}) {\n    function properties() {\n        function returns(callback) {\n            return createFactory(callback, middlewares);\n        }\n        function key(key) {\n            function returns(callback) {\n                return createFactory(callback, middlewares, key);\n            }\n            return returns;\n        }\n        function children() {\n            function returns(callback) {\n                return createFactory(callback, middlewares);\n            }\n            function key(key) {\n                function returns(callback) {\n                    return createFactory(callback, middlewares, key);\n                }\n                return returns;\n            }\n            returns.key = key;\n            return returns;\n        }\n        returns.children = children;\n        returns.key = key;\n        return returns;\n    }\n    function children() {\n        function properties() {\n            function returns(callback) {\n                return createFactory(callback, middlewares);\n            }\n            function key(key) {\n                function returns(callback) {\n                    return createFactory(callback, middlewares, key);\n                }\n                return returns;\n            }\n            returns.key = key;\n            return returns;\n        }\n        function returns(callback) {\n            return createFactory(callback, middlewares);\n        }\n        returns.properties = properties;\n        return returns;\n    }\n    function returns(callback) {\n        return createFactory(callback, middlewares);\n    }\n    returns.children = children;\n    returns.properties = properties;\n    return returns;\n}\nconst factory = create();\nfunction wrapNodes(renderer) {\n    const result = renderer();\n    const isWNodeWrapper = isWNode(result);\n    const callback = () => {\n        return result;\n    };\n    callback.isWNodeWrapper = isWNodeWrapper;\n    return factory(callback);\n}\nexport const widgetInstanceMap = new WeakMap();\nconst widgetMetaMap = new Map();\nconst requestedDomNodes = new Set();\nlet wrapperId = 0;\nlet metaId = 0;\nfunction addNodeToMap(id, key, node) {\n    const widgetMeta = widgetMetaMap.get(id);\n    if (widgetMeta) {\n        widgetMeta.nodeMap = widgetMeta.nodeMap || new Map();\n        widgetMeta.nodeMap.set(key, node);\n        if (requestedDomNodes.has(`${id}-${key}`)) {\n            widgetMeta.invalidator();\n            requestedDomNodes.delete(`${id}-${key}`);\n        }\n    }\n}\nfunction destroyHandles(meta) {\n    const { destroyMap, middlewareIds } = meta;\n    if (!destroyMap) {\n        return;\n    }\n    for (let i = 0; i < middlewareIds.length; i++) {\n        const id = middlewareIds[i];\n        const destroy = destroyMap.get(id);\n        destroy && destroy();\n        destroyMap.delete(id);\n        if (destroyMap.size === 0) {\n            break;\n        }\n    }\n    destroyMap.clear();\n}\nfunction runDiffs(meta, current, next) {\n    let customProperties = {};\n    meta.customDiffMap = meta.customDiffMap || new Map();\n    if (meta.customDiffMap.size) {\n        meta.customDiffMap.forEach((diffMap) => {\n            diffMap.forEach((diff, propertyName) => {\n                const result = diff(Object.assign({}, current), Object.assign({}, next));\n                if (result) {\n                    customProperties[propertyName] = result;\n                }\n            });\n        });\n    }\n    return customProperties;\n}\nexport const invalidator = factory(({ id }) => {\n    const [widgetId] = id.split('-');\n    return () => {\n        const widgetMeta = widgetMetaMap.get(widgetId);\n        if (widgetMeta) {\n            return widgetMeta.invalidator();\n        }\n    };\n});\nexport const node = factory(({ id }) => {\n    return {\n        get(key) {\n            const [widgetId] = id.split('-');\n            const widgetMeta = widgetMetaMap.get(widgetId);\n            if (widgetMeta) {\n                const { nodeApi } = widgetMeta;\n                widgetMeta.nodeMap = widgetMeta.nodeMap || new Map();\n                const mountNode = widgetMeta.mountNode;\n                const node = widgetMeta.nodeMap.get(key);\n                if (node &&\n                    (nodeApi.contains(mountNode, node) ||\n                        (!nodeApi.equals(nodeApi.getBody(), mountNode) &&\n                            nodeApi.contains(nodeApi.getBody(), node)))) {\n                    return node;\n                }\n                requestedDomNodes.add(`${widgetId}-${key}`);\n            }\n            return null;\n        }\n    };\n});\nexport const diffProperty = factory(({ id }) => {\n    function callback(propertyName, propertiesOrDiff, diff) {\n        const [widgetId] = id.split('-');\n        const widgetMeta = widgetMetaMap.get(widgetId);\n        if (!diff) {\n            diff = propertiesOrDiff;\n        }\n        if (widgetMeta) {\n            widgetMeta.customDiffMap = widgetMeta.customDiffMap || new Map();\n            widgetMeta.customDiffProperties = widgetMeta.customDiffProperties || new Set();\n            const propertyDiffMap = widgetMeta.customDiffMap.get(id) || new Map();\n            if (!propertyDiffMap.has(propertyName)) {\n                const result = diff({}, widgetMeta.originalProperties);\n                if (result !== undefined) {\n                    if (has('dojo-debug')) {\n                        if (widgetMeta.propertiesCalled) {\n                            console.warn(`Calling \"propertyDiff\" middleware after accessing properties in \"${widgetMeta.widgetName}\", can result in referencing stale properties.`);\n                        }\n                    }\n                    widgetMeta.properties = Object.assign({}, widgetMeta.properties, { [propertyName]: result });\n                }\n                propertyDiffMap.set(propertyName, diff);\n                widgetMeta.customDiffProperties.add(propertyName);\n            }\n            widgetMeta.customDiffMap.set(id, propertyDiffMap);\n        }\n    }\n    return callback;\n});\nexport const destroy = factory(({ id }) => {\n    return (destroyFunction) => {\n        const [widgetId] = id.split('-');\n        const widgetMeta = widgetMetaMap.get(widgetId);\n        if (widgetMeta) {\n            widgetMeta.destroyMap = widgetMeta.destroyMap || new Map();\n            if (!widgetMeta.destroyMap.has(id)) {\n                widgetMeta.destroyMap.set(id, destroyFunction);\n            }\n        }\n    };\n});\nexport const getRegistry = factory(({ id }) => {\n    const [widgetId] = id.split('-');\n    return () => {\n        const widgetMeta = widgetMetaMap.get(widgetId);\n        if (widgetMeta) {\n            if (!widgetMeta.registryHandler) {\n                widgetMeta.registryHandler = new RegistryHandler();\n                widgetMeta.registryHandler.base = widgetMeta.registry;\n                widgetMeta.registryHandler.on('invalidate', widgetMeta.invalidator);\n            }\n            widgetMeta.registryHandler = widgetMeta.registryHandler || new RegistryHandler();\n            return widgetMeta.registryHandler;\n        }\n        return null;\n    };\n});\nexport const defer = factory(({ id }) => {\n    const [widgetId] = id.split('-');\n    let isDeferred = false;\n    return {\n        pause() {\n            const widgetMeta = widgetMetaMap.get(widgetId);\n            if (!isDeferred && widgetMeta) {\n                widgetMeta.deferRefs = widgetMeta.deferRefs + 1;\n                isDeferred = true;\n            }\n        },\n        resume() {\n            const widgetMeta = widgetMetaMap.get(widgetId);\n            if (isDeferred && widgetMeta) {\n                widgetMeta.deferRefs = widgetMeta.deferRefs - 1;\n                isDeferred = false;\n            }\n        }\n    };\n});\nfunction wrapFunctionProperties(widgetMeta, id, properties) {\n    const props = {};\n    const propertyNames = Object.keys(properties);\n    for (let i = 0; i < propertyNames.length; i++) {\n        const propertyName = propertyNames[i];\n        if (typeof properties[propertyName] === 'function') {\n            let cachedWrapper = widgetMeta.wrappedFunctionMap.get(propertyName);\n            if (!cachedWrapper) {\n                cachedWrapper = function WrappedProperty(...args) {\n                    const widgetMeta = widgetMetaMap.get(id);\n                    if (widgetMeta) {\n                        return widgetMeta.originalProperties[propertyName](...args);\n                    }\n                    return properties[propertyName](...args);\n                };\n                cachedWrapper.unwrap = () => {\n                    const widgetMeta = widgetMetaMap.get(id);\n                    if (widgetMeta) {\n                        return widgetMeta.originalProperties[propertyName];\n                    }\n                    return properties[propertyName];\n                };\n                widgetMeta.wrappedFunctionMap.set(propertyName, cachedWrapper);\n            }\n            props[propertyName] = cachedWrapper;\n        }\n        else {\n            props[propertyName] = properties[propertyName];\n        }\n    }\n    return props;\n}\nexport function renderer(renderer) {\n    let _mountOptions = {\n        sync: false,\n        merge: true,\n        transition: undefined,\n        registry: new Registry()\n    };\n    let _invalidationQueue = [];\n    let _processQueue = [];\n    let _deferredProcessQueue = [];\n    let _applicationQueue = [];\n    let _eventMap = new WeakMap();\n    let _idToWrapperMap = new Map();\n    let _wrapperSiblingMap = new WeakMap();\n    let _idToChildrenWrappers = new Map();\n    let _insertBeforeMap = new WeakMap();\n    let _nodeToWrapperMap = new WeakMap();\n    let _renderScheduled;\n    let _deferredRenderCallbacks = [];\n    let parentInvalidate;\n    let _allMergedNodes = [];\n    let _appWrapperId;\n    let _deferredProcessIds = new Map();\n    function nodeOperation(propName, propValue, previousValue, domNode) {\n        let result = propValue && !previousValue;\n        if (typeof propValue === 'function') {\n            result = propValue();\n        }\n        if (result === true) {\n            _deferredRenderCallbacks.push(() => {\n                _mountOptions.nodeApi.callProperty(domNode, propName);\n            });\n        }\n    }\n    function same(dnode1, dnode2) {\n        if (isVNodeWrapper(dnode1) && isVNodeWrapper(dnode2)) {\n            if (isDomVNode(dnode1.node) && isDomVNode(dnode2.node)) {\n                if (!_mountOptions.nodeApi.equals(dnode1.node.domNode, dnode2.node.domNode)) {\n                    return false;\n                }\n            }\n            if (dnode1.node.tag !== dnode2.node.tag) {\n                return false;\n            }\n            if (dnode1.node.properties.key !== dnode2.node.properties.key) {\n                return false;\n            }\n            return true;\n        }\n        else if (isWNodeWrapper(dnode1) && isWNodeWrapper(dnode2)) {\n            const widgetConstructor1 = dnode1.registryItem || dnode1.node.widgetConstructor;\n            const widgetConstructor2 = dnode2.registryItem || dnode2.node.widgetConstructor;\n            const { node: { properties: props1 } } = dnode1;\n            const { node: { properties: props2 } } = dnode2;\n            if (dnode1.instance === undefined && typeof widgetConstructor2 === 'string') {\n                return false;\n            }\n            if (widgetConstructor1 !== widgetConstructor2) {\n                return false;\n            }\n            if (props1.key !== props2.key) {\n                return false;\n            }\n            if (!(widgetConstructor1.keys || []).every((key) => props1[key] === props2[key])) {\n                return false;\n            }\n            return true;\n        }\n        return false;\n    }\n    function findIndexOfChild(children, sameAs, start) {\n        for (let i = start; i < children.length; i++) {\n            if (same(children[i], sameAs)) {\n                return i;\n            }\n        }\n        return -1;\n    }\n    function checkDistinguishable(wrappers, index, parentWNodeWrapper) {\n        const wrapperToCheck = wrappers[index];\n        if (isVNodeWrapper(wrapperToCheck) && !wrapperToCheck.node.tag) {\n            return;\n        }\n        const { key } = wrapperToCheck.node.properties;\n        let parentName = 'unknown';\n        if (parentWNodeWrapper) {\n            const { node: { widgetConstructor } } = parentWNodeWrapper;\n            parentName = widgetConstructor.name || 'unknown';\n        }\n        if (key === undefined || key === null) {\n            for (let i = 0; i < wrappers.length; i++) {\n                if (i !== index) {\n                    const wrapper = wrappers[i];\n                    if (same(wrapper, wrapperToCheck)) {\n                        let nodeIdentifier;\n                        if (isWNodeWrapper(wrapper)) {\n                            nodeIdentifier = wrapper.node.widgetConstructor.name || 'unknown';\n                        }\n                        else {\n                            nodeIdentifier = wrapper.node.tag;\n                        }\n                        console.warn(`A widget (${parentName}) has had a child added or removed, but they were not able to uniquely identified. It is recommended to provide a unique 'key' property when using the same widget or element (${nodeIdentifier}) multiple times as siblings`);\n                        break;\n                    }\n                }\n            }\n        }\n    }\n    function updateAttribute(domNode, attrName, attrValue, namespace) {\n        if (namespace === NAMESPACE_SVG && attrName === 'href' && attrValue) {\n            _mountOptions.nodeApi.setAttributeWithNamespace(domNode, NAMESPACE_XLINK, attrName, attrValue);\n        }\n        else if ((attrName === 'role' && attrValue === '') || attrValue === undefined) {\n            _mountOptions.nodeApi.removeAttribute(domNode, attrName);\n        }\n        else {\n            _mountOptions.nodeApi.setAttribute(domNode, attrName, attrValue);\n        }\n    }\n    function updateAttributes(domNode, previousAttributes, attributes, namespace) {\n        const attrNames = Object.keys(attributes);\n        const attrCount = attrNames.length;\n        for (let i = 0; i < attrCount; i++) {\n            const attrName = attrNames[i];\n            const attrValue = attributes[attrName];\n            const previousAttrValue = previousAttributes[attrName];\n            if (attrValue !== previousAttrValue) {\n                updateAttribute(domNode, attrName, attrValue, namespace);\n            }\n        }\n    }\n    function buildPreviousProperties(domNode, current) {\n        const { node: { diffType, properties, attributes } } = current;\n        if (!diffType || diffType === 'vdom') {\n            return {\n                properties: current.deferredProperties\n                    ? Object.assign({}, current.deferredProperties, current.node.properties) : current.node.properties,\n                attributes: current.node.attributes,\n                events: current.node.events\n            };\n        }\n        else if (diffType === 'none') {\n            return {\n                properties: {},\n                attributes: current.node.attributes ? {} : undefined,\n                events: current.node.events\n            };\n        }\n        let newProperties = {\n            properties: {}\n        };\n        if (attributes) {\n            newProperties.attributes = {};\n            newProperties.events = current.node.events;\n            Object.keys(properties).forEach((propName) => {\n                newProperties.properties[propName] = _mountOptions.nodeApi.getProperty(domNode, propName);\n            });\n            Object.keys(attributes).forEach((attrName) => {\n                newProperties.attributes[attrName] = _mountOptions.nodeApi.getAttribute(domNode, attrName);\n            });\n            return newProperties;\n        }\n        newProperties.properties = Object.keys(properties).reduce((props, property) => {\n            props[property] =\n                _mountOptions.nodeApi.getAttribute(domNode, property) ||\n                    _mountOptions.nodeApi.getProperty(domNode, property);\n            return props;\n        }, {});\n        return newProperties;\n    }\n    function updateEvent(domNode, eventName, currentValue, eventOptions) {\n        const proxyEvents = _eventMap.get(domNode) || {};\n        let proxyEvent = proxyEvents[eventName];\n        let callback = currentValue;\n        if (eventName === 'input') {\n            callback = function (evt) {\n                currentValue.call(this, evt);\n                evt.target['oninput-value'] = evt.target.value;\n            };\n        }\n        const { passive: currentPassive = [] } = eventOptions || {};\n        const isPassive = currentPassive.indexOf(`on${eventName}`) !== -1;\n        const options = { passive: isPassive };\n        if (proxyEvent && proxyEvent.options.passive !== isPassive) {\n            _mountOptions.nodeApi.removeEvent(domNode, eventName, proxyEvent.proxy);\n            proxyEvent = undefined;\n        }\n        if (proxyEvent) {\n            proxyEvents[eventName] = Object.assign({}, proxyEvent, { callback });\n            _eventMap.set(domNode, proxyEvents);\n        }\n        else {\n            const proxy = (...args) => {\n                const proxyEvents = _eventMap.get(domNode) || {};\n                const proxyEvent = proxyEvents[eventName];\n                proxyEvent && proxyEvent.callback(...args);\n            };\n            proxyEvents[eventName] = { callback, proxy, options };\n            _mountOptions.nodeApi.addEvent(domNode, eventName, proxy, options);\n            _eventMap.set(domNode, proxyEvents);\n        }\n    }\n    function removeOrphanedEvents(domNode, previousProperties, properties, onlyEvents = false) {\n        Object.keys(previousProperties).forEach((propName) => {\n            const isEvent = propName.substr(0, 2) === 'on' || onlyEvents;\n            const eventName = onlyEvents ? propName : propName.substr(2);\n            if (isEvent && !properties[propName]) {\n                const proxyEvents = _eventMap.get(domNode) || {};\n                let proxyEvent = proxyEvents[eventName];\n                if (proxyEvent) {\n                    _mountOptions.nodeApi.removeEvent(domNode, eventName, proxyEvent.proxy);\n                    delete proxyEvents[eventName];\n                    _eventMap.set(domNode, proxyEvents);\n                }\n            }\n        });\n    }\n    function resolveRegistryItem(wrapper, instance, id) {\n        if (!isWidget(wrapper.node.widgetConstructor)) {\n            const owningNode = _nodeToWrapperMap.get(wrapper.node);\n            if (owningNode) {\n                if (owningNode.instance) {\n                    instance = owningNode.instance;\n                }\n                else {\n                    id = owningNode.id;\n                }\n            }\n            let registry;\n            if (instance) {\n                const instanceData = widgetInstanceMap.get(instance);\n                if (instanceData) {\n                    registry = instanceData.registry;\n                }\n            }\n            else if (id !== undefined) {\n                const widgetMeta = widgetMetaMap.get(id);\n                if (widgetMeta) {\n                    if (!widgetMeta.registryHandler) {\n                        widgetMeta.registryHandler = new RegistryHandler();\n                        widgetMeta.registryHandler.base = widgetMeta.registry;\n                        widgetMeta.registryHandler.on('invalidate', widgetMeta.invalidator);\n                    }\n                    registry = widgetMeta.registryHandler;\n                }\n            }\n            if (registry) {\n                let registryLabel;\n                if (isLazyDefine(wrapper.node.widgetConstructor)) {\n                    const { label, registryItem } = wrapper.node.widgetConstructor;\n                    if (!registry.has(label)) {\n                        registry.define(label, registryItem);\n                    }\n                    registryLabel = label;\n                }\n                else {\n                    registryLabel = wrapper.node.widgetConstructor;\n                }\n                let item = registry.get(registryLabel);\n                if (isWNodeFactory(item)) {\n                    const node = item(wrapper.node.properties, wrapper.node.children);\n                    if (isWidgetFunction(node.widgetConstructor)) {\n                        wrapper.registryItem = node.widgetConstructor;\n                    }\n                }\n                else {\n                    wrapper.registryItem = item;\n                }\n            }\n        }\n    }\n    function mapNodeToInstance(nodes, wrapper) {\n        while (nodes.length) {\n            let node = nodes.pop();\n            if (isWNode(node) || isVNode(node)) {\n                if (!_nodeToWrapperMap.has(node)) {\n                    _nodeToWrapperMap.set(node, wrapper);\n                    if (node.children && node.children.length) {\n                        nodes = [...nodes, ...node.children];\n                    }\n                }\n            }\n        }\n    }\n    function renderedToWrapper(rendered, parent, currentParent) {\n        const { requiresInsertBefore, hasPreviousSiblings, namespace, depth } = parent;\n        const wrappedRendered = [];\n        const hasParentWNode = isWNodeWrapper(parent);\n        const hasVirtualParentNode = isVirtualWrapper(parent);\n        const currentParentChildren = (isVNodeWrapper(currentParent) && _idToChildrenWrappers.get(currentParent.id)) || [];\n        const hasCurrentParentChildren = currentParentChildren.length > 0;\n        const insertBefore = ((requiresInsertBefore || hasPreviousSiblings !== false) && (hasParentWNode || hasVirtualParentNode)) ||\n            (hasCurrentParentChildren && rendered.length > 1);\n        let previousItem;\n        if (isWNodeWrapper(parent) && rendered.length) {\n            mapNodeToInstance([...rendered], parent);\n        }\n        for (let i = 0; i < rendered.length; i++) {\n            let renderedItem = rendered[i];\n            if (!renderedItem || renderedItem === true) {\n                continue;\n            }\n            if (typeof renderedItem === 'string' || typeof renderedItem === 'number') {\n                renderedItem = toTextVNode(renderedItem);\n            }\n            const owningNode = _nodeToWrapperMap.get(renderedItem);\n            const wrapper = {\n                node: renderedItem,\n                depth: depth + 1,\n                order: i,\n                parentId: parent.id,\n                requiresInsertBefore: insertBefore,\n                hasParentWNode,\n                namespace: namespace,\n                reparent: hasParentWNode ? parent.reparent : undefined\n            };\n            if (isVNode(renderedItem)) {\n                if (renderedItem.deferredPropertiesCallback) {\n                    wrapper.deferredProperties = renderedItem.deferredPropertiesCallback(false);\n                }\n                if (renderedItem.properties.exitAnimation) {\n                    parent.hasAnimations = true;\n                    let nextParent = _idToWrapperMap.get(parent.parentId);\n                    while (nextParent) {\n                        if (nextParent.hasAnimations) {\n                            break;\n                        }\n                        nextParent.hasAnimations = true;\n                        nextParent = _idToWrapperMap.get(nextParent.parentId);\n                    }\n                }\n            }\n            if (owningNode) {\n                wrapper.owningId = owningNode.id;\n            }\n            if (isWNode(renderedItem)) {\n                resolveRegistryItem(wrapper, parent.instance, parent.id);\n            }\n            if (previousItem) {\n                _wrapperSiblingMap.set(previousItem, wrapper);\n            }\n            wrappedRendered.push(wrapper);\n            previousItem = wrapper;\n        }\n        return wrappedRendered;\n    }\n    function findParentDomNode(currentNode) {\n        let parentDomNode;\n        let parentWrapper = _idToWrapperMap.get(currentNode.parentId);\n        while (!parentDomNode && parentWrapper) {\n            if (!parentDomNode &&\n                isVNodeWrapper(parentWrapper) &&\n                !isVirtualWrapper(parentWrapper) &&\n                parentWrapper.domNode) {\n                parentDomNode = parentWrapper.domNode;\n            }\n            parentWrapper = _idToWrapperMap.get(parentWrapper.parentId);\n        }\n        return parentDomNode;\n    }\n    function runDeferredProperties(next) {\n        const { deferredPropertiesCallback } = next.node;\n        if (deferredPropertiesCallback) {\n            const properties = next.node.properties;\n            _deferredRenderCallbacks.push(() => {\n                if (_idToWrapperMap.has(next.owningId)) {\n                    const deferredProperties = next.deferredProperties;\n                    next.deferredProperties = deferredPropertiesCallback(true);\n                    processProperties(next, {\n                        properties: Object.assign({}, deferredProperties, properties)\n                    });\n                }\n            });\n        }\n    }\n    function findInsertBefore(next) {\n        let insertBefore = null;\n        let searchNode = next;\n        while (!insertBefore) {\n            const nextSibling = _wrapperSiblingMap.get(searchNode);\n            if (nextSibling) {\n                if (isBodyWrapper(nextSibling) || isHeadWrapper(nextSibling)) {\n                    searchNode = nextSibling;\n                    continue;\n                }\n                let domNode = nextSibling.domNode;\n                if (isWNodeWrapper(nextSibling) || isVirtualWrapper(nextSibling)) {\n                    if (!nextSibling.childDomWrapperId) {\n                        nextSibling.childDomWrapperId = findDomNodeOnParentWrapper(nextSibling.id);\n                    }\n                    if (nextSibling.childDomWrapperId) {\n                        const childWrapper = _idToWrapperMap.get(nextSibling.childDomWrapperId);\n                        if (childWrapper &&\n                            !childWrapper.reparent &&\n                            !isBodyWrapper(childWrapper) &&\n                            !isHeadWrapper(childWrapper)) {\n                            domNode = childWrapper.domNode;\n                        }\n                    }\n                }\n                if (!nextSibling.reparent && domNode && _mountOptions.nodeApi.getParent(domNode)) {\n                    insertBefore = domNode;\n                    break;\n                }\n                searchNode = nextSibling;\n                continue;\n            }\n            searchNode = searchNode && _idToWrapperMap.get(searchNode.parentId);\n            if (!searchNode || (isVNodeWrapper(searchNode) && !isVirtualWrapper(searchNode))) {\n                break;\n            }\n        }\n        return insertBefore;\n    }\n    function setValue(domNode, propValue, previousValue) {\n        const domValue = _mountOptions.nodeApi.getProperty(domNode, 'value');\n        const onInputValue = _mountOptions.nodeApi.getProperty(domNode, 'oninput-value');\n        const onSelectValue = _mountOptions.nodeApi.getProperty(domNode, 'select-value');\n        const valueChanged = domValue !== propValue;\n        if (onSelectValue && domValue !== onSelectValue) {\n            _mountOptions.nodeApi.setProperty(domNode, 'value', onSelectValue);\n            if (domValue === onSelectValue) {\n                _mountOptions.nodeApi.setProperty(domNode, 'select-value', undefined);\n            }\n        }\n        else if (valueChanged && ((onInputValue && domValue === onInputValue) || propValue !== previousValue)) {\n            _mountOptions.nodeApi.setProperty(domNode, 'value', propValue);\n            _mountOptions.nodeApi.setProperty(domNode, 'oninput-value', undefined);\n        }\n    }\n    function setProperties(domNode, currentProperties = {}, nextWrapper, includesEventsAndAttributes = true) {\n        const properties = nextWrapper.deferredProperties\n            ? Object.assign({}, nextWrapper.deferredProperties, nextWrapper.node.properties) : nextWrapper.node.properties;\n        const propNames = Object.keys(properties);\n        const propCount = propNames.length;\n        if (propNames.indexOf('classes') === -1 && currentProperties.classes) {\n            _mountOptions.nodeApi.removeAttribute(domNode, 'class');\n        }\n        includesEventsAndAttributes && removeOrphanedEvents(domNode, currentProperties, properties);\n        for (let i = 0; i < propCount; i++) {\n            const propName = propNames[i];\n            let propValue = properties[propName];\n            const previousValue = currentProperties[propName];\n            if (propName === 'classes') {\n                const previousClassString = createClassPropValue(previousValue);\n                let currentClassString = createClassPropValue(propValue);\n                if (previousClassString !== currentClassString) {\n                    if (currentClassString) {\n                        if (nextWrapper.merged) {\n                            const domClasses = (_mountOptions.nodeApi.getAttribute(domNode, 'class') || '').split(' ');\n                            for (let i = 0; i < domClasses.length; i++) {\n                                if (currentClassString.indexOf(domClasses[i]) === -1) {\n                                    currentClassString = `${domClasses[i]} ${currentClassString}`;\n                                }\n                            }\n                        }\n                        _mountOptions.nodeApi.setAttribute(domNode, 'class', currentClassString);\n                    }\n                    else {\n                        _mountOptions.nodeApi.removeAttribute(domNode, 'class');\n                    }\n                }\n            }\n            else if (nodeOperations.indexOf(propName) !== -1) {\n                nodeOperation(propName, propValue, previousValue, domNode);\n            }\n            else if (propName === 'styles') {\n                const styleNames = Object.keys(propValue);\n                const styleCount = styleNames.length;\n                for (let j = 0; j < styleCount; j++) {\n                    const styleName = styleNames[j];\n                    const newStyleValue = propValue[styleName];\n                    const oldStyleValue = previousValue && previousValue[styleName];\n                    if (newStyleValue === oldStyleValue) {\n                        continue;\n                    }\n                    _mountOptions.nodeApi.setStyle(domNode, styleName, newStyleValue || '');\n                }\n            }\n            else {\n                if (!propValue && typeof previousValue === 'string') {\n                    propValue = '';\n                }\n                if (propName === 'value') {\n                    const tagName = _mountOptions.nodeApi.getTag(domNode);\n                    if (tagName === 'SELECT') {\n                        _mountOptions.nodeApi.setProperty(domNode, 'select-value', propValue);\n                    }\n                    setValue(domNode, propValue, previousValue);\n                }\n                else if (propName !== 'key') {\n                    const type = typeof propValue;\n                    if (type === 'function' &&\n                        propName.lastIndexOf('on', 0) === 0 &&\n                        includesEventsAndAttributes &&\n                        (propValue !== previousValue || properties.oneventoptions)) {\n                        updateEvent(domNode, propName.substr(2), propValue, properties.oneventoptions);\n                    }\n                    else if (propName === 'oneventoptions') {\n                    }\n                    else if (propValue !== previousValue) {\n                        if (type === 'string' && propName !== 'innerHTML' && includesEventsAndAttributes) {\n                            updateAttribute(domNode, propName, propValue, nextWrapper.namespace);\n                        }\n                        else if (propName === 'scrollLeft' || propName === 'scrollTop') {\n                            const currentValue = _mountOptions.nodeApi.getProperty(domNode, propName);\n                            if (currentValue !== propValue) {\n                                _mountOptions.nodeApi.setProperty(domNode, propName, propValue);\n                            }\n                        }\n                        else {\n                            _mountOptions.nodeApi.setProperty(domNode, propName, propValue);\n                        }\n                    }\n                }\n            }\n        }\n    }\n    function _createDeferredRenderCallback() {\n        const callbacks = _deferredRenderCallbacks;\n        _deferredRenderCallbacks = [];\n        if (callbacks.length) {\n            return () => {\n                let callback;\n                while ((callback = callbacks.shift())) {\n                    callback();\n                }\n            };\n        }\n    }\n    function _scheduleDeferredRenderCallbacks() {\n        const { sync } = _mountOptions;\n        const run = _createDeferredRenderCallback();\n        if (run) {\n            if (sync) {\n                run();\n            }\n            else {\n                let id;\n                id = _mountOptions.nodeApi.requestAnimationFrame(() => {\n                    _deferredProcessIds.delete(id);\n                    run();\n                });\n                _deferredProcessIds.set(id, run);\n            }\n        }\n    }\n    function processProperties(next, previousProperties) {\n        if (next.node.attributes && next.node.events) {\n            updateAttributes(next.domNode, previousProperties.attributes || {}, next.node.attributes, next.namespace);\n            setProperties(next.domNode, previousProperties.properties, next, false);\n            const events = next.node.events || {};\n            if (previousProperties.events) {\n                removeOrphanedEvents(next.domNode, previousProperties.events || {}, next.node.events, true);\n            }\n            previousProperties.events = previousProperties.events || {};\n            Object.keys(events).forEach((event) => {\n                updateEvent(next.domNode, event, events[event]);\n            });\n        }\n        else {\n            setProperties(next.domNode, previousProperties.properties, next);\n        }\n    }\n    function unmount() {\n        _processQueue.push({\n            current: [_idToWrapperMap.get(_appWrapperId)],\n            next: [],\n            meta: {}\n        });\n        if (_renderScheduled) {\n            _mountOptions.nodeApi.cancelAnimationFrame(_renderScheduled);\n        }\n        _runProcessQueue();\n        _runDomInstructionQueue();\n        _deferredProcessIds.forEach((callback, id) => {\n            _mountOptions.nodeApi.cancelAnimationFrame(id);\n            callback();\n        });\n        const run = _createDeferredRenderCallback();\n        run && run();\n        _invalidationQueue = [];\n        _processQueue = [];\n        _deferredProcessQueue = [];\n        _applicationQueue = [];\n        _deferredRenderCallbacks = [];\n        _allMergedNodes = [];\n        _eventMap = new WeakMap();\n        _idToWrapperMap.clear();\n        _idToChildrenWrappers.clear();\n        _wrapperSiblingMap = new WeakMap();\n        _nodeToWrapperMap = new WeakMap();\n        _insertBeforeMap = undefined;\n    }\n    function mount(mountOptions = {}) {\n        let domNode = mountOptions.domNode;\n        const nodeApi = mountOptions.nodeApi || defaultNodeApi;\n        if (!domNode) {\n            if (has('dojo-debug') && domNode === null) {\n                console.warn('Unable to find node to mount the application, defaulting to the document body.');\n            }\n            domNode = nodeApi.getBody();\n        }\n        _mountOptions = Object.assign({}, _mountOptions, mountOptions, { domNode, nodeApi });\n        const renderResult = wrapNodes(renderer)({}, []);\n        _appWrapperId = `${wrapperId++}`;\n        const nextWrapper = {\n            id: _appWrapperId,\n            node: renderResult,\n            order: 0,\n            depth: 1,\n            owningId: '-1',\n            parentId: '-1',\n            siblingId: '-1',\n            properties: {}\n        };\n        _idToWrapperMap.set('-1', {\n            id: `-1`,\n            depth: 0,\n            order: 0,\n            owningId: '',\n            domNode,\n            node: v('fake'),\n            parentId: '-1'\n        });\n        _processQueue.push({\n            current: [],\n            next: [nextWrapper],\n            meta: { mergeNodes: arrayFrom(_mountOptions.nodeApi.getChildren(domNode)) }\n        });\n        _runProcessQueue();\n        _runDomInstructionQueue();\n        _cleanUpMergedNodes();\n        _insertBeforeMap = undefined;\n        _scheduleDeferredRenderCallbacks();\n        if (!_renderScheduled) {\n            setRendering(false);\n        }\n    }\n    function invalidate() {\n        parentInvalidate && parentInvalidate();\n    }\n    function _schedule() {\n        const { sync } = _mountOptions;\n        if (sync) {\n            _runInvalidationQueue();\n        }\n        else if (!_renderScheduled) {\n            setRendering(true);\n            _renderScheduled = _mountOptions.nodeApi.requestAnimationFrame(() => {\n                _runInvalidationQueue();\n            });\n        }\n    }\n    function getWNodeWrapper(id) {\n        const wrapper = _idToWrapperMap.get(id);\n        if (wrapper && isWNodeWrapper(wrapper)) {\n            return wrapper;\n        }\n    }\n    function _runInvalidationQueue() {\n        _renderScheduled = undefined;\n        let invalidationQueue = [..._invalidationQueue];\n        const previouslyRendered = [];\n        _invalidationQueue = [];\n        invalidationQueue.sort((a, b) => {\n            let result = b.depth - a.depth;\n            if (result === 0) {\n                result = b.order - a.order;\n            }\n            return result;\n        });\n        if (_deferredProcessQueue.length) {\n            _processQueue = [..._deferredProcessQueue];\n            _deferredProcessQueue = [];\n            _runProcessQueue();\n            if (_deferredProcessQueue.length) {\n                _invalidationQueue = [...invalidationQueue];\n                invalidationQueue = [];\n            }\n        }\n        let item;\n        while ((item = invalidationQueue.pop())) {\n            let { id } = item;\n            const current = getWNodeWrapper(id);\n            if (!current || previouslyRendered.indexOf(id) !== -1 || !_idToWrapperMap.has(current.parentId)) {\n                continue;\n            }\n            previouslyRendered.push(id);\n            const sibling = _wrapperSiblingMap.get(current);\n            const next = {\n                node: {\n                    type: WNODE,\n                    widgetConstructor: current.node.widgetConstructor,\n                    properties: current.properties || {},\n                    children: current.node.children || []\n                },\n                instance: current.instance,\n                id: current.id,\n                properties: current.properties,\n                depth: current.depth,\n                order: current.order,\n                owningId: current.owningId,\n                parentId: current.parentId,\n                registryItem: current.registryItem\n            };\n            sibling && _wrapperSiblingMap.set(next, sibling);\n            const result = _updateWidget({ current, next });\n            if (result && result.item) {\n                _processQueue.push(result.item);\n                _idToWrapperMap.set(id, next);\n                _runProcessQueue();\n            }\n        }\n        _runDomInstructionQueue();\n        _cleanUpMergedNodes();\n        _scheduleDeferredRenderCallbacks();\n        if (!_renderScheduled) {\n            setRendering(false);\n        }\n    }\n    function _cleanUpMergedNodes() {\n        if (_deferredProcessQueue.length === 0) {\n            let mergedNode;\n            while ((mergedNode = _allMergedNodes.pop())) {\n                const parent = _mountOptions.nodeApi.getParent(mergedNode);\n                parent && _mountOptions.nodeApi.removeChild(parent, mergedNode);\n            }\n            _mountOptions.merge = false;\n        }\n    }\n    function _runProcessQueue() {\n        let item;\n        while ((item = _processQueue.pop())) {\n            if (isAttachApplication(item)) {\n                item.instance && _applicationQueue.push(item);\n            }\n            else {\n                const { current, next, meta } = item;\n                _process(current || EMPTY_ARRAY, next || EMPTY_ARRAY, meta);\n            }\n        }\n    }\n    function _runDomInstructionQueue() {\n        _applicationQueue.reverse();\n        let item;\n        while ((item = _applicationQueue.pop())) {\n            if (item.type === 'create') {\n                const { parentDomNode, next, next: { domNode, merged, requiresInsertBefore, node } } = item;\n                processProperties(next, { properties: {} });\n                runDeferredProperties(next);\n                if (!merged) {\n                    let insertBefore;\n                    if (requiresInsertBefore) {\n                        insertBefore = findInsertBefore(next);\n                    }\n                    else if (_insertBeforeMap) {\n                        insertBefore = _insertBeforeMap.get(next);\n                    }\n                    _mountOptions.nodeApi.insertBefore(parentDomNode, domNode, insertBefore);\n                    if (isDomVNode(next.node) && next.node.onAttach) {\n                        next.node.onAttach();\n                    }\n                }\n                const parentNode = _mountOptions.nodeApi.getParent(domNode);\n                const tagName = _mountOptions.nodeApi.getTag(domNode);\n                if (tagName === 'OPTION' && parentNode) {\n                    setValue(parentNode);\n                }\n                const { enterAnimation, enterAnimationActive } = node.properties;\n                if (_mountOptions.transition && enterAnimation && enterAnimation !== true) {\n                    _mountOptions.transition.enter(domNode, enterAnimation, enterAnimationActive);\n                }\n                const owningWrapper = _nodeToWrapperMap.get(next.node);\n                if (owningWrapper && node.properties.key != null) {\n                    if (owningWrapper.instance) {\n                        const instanceData = widgetInstanceMap.get(owningWrapper.instance);\n                        instanceData && instanceData.nodeHandler.add(domNode, `${node.properties.key}`);\n                    }\n                    else {\n                        addNodeToMap(owningWrapper.id, node.properties.key, domNode);\n                    }\n                }\n                item.next.inserted = true;\n                item.next.reparent = undefined;\n            }\n            else if (item.type === 'update') {\n                const { next, next: { domNode }, current, current: { domNode: currentDomNode } } = item;\n                if (_mountOptions.nodeApi.isTextNode(domNode) &&\n                    _mountOptions.nodeApi.isTextNode(currentDomNode) &&\n                    domNode !== currentDomNode) {\n                    const parent = _mountOptions.nodeApi.getParent(currentDomNode);\n                    if (parent) {\n                        _mountOptions.nodeApi.replaceChild(parent, domNode, currentDomNode);\n                    }\n                }\n                else {\n                    const previousProperties = buildPreviousProperties(domNode, current);\n                    processProperties(next, previousProperties);\n                    runDeferredProperties(next);\n                }\n                if (isDomVNode(next.node) && next.node.onUpdate) {\n                    next.node.onUpdate();\n                }\n            }\n            else if (item.type === 'delete') {\n                const { current } = item;\n                const { exitAnimation, exitAnimationActive } = current.node.properties;\n                if (_mountOptions.transition && exitAnimation && exitAnimation !== true) {\n                    _mountOptions.transition.exit(current.domNode, exitAnimation, exitAnimationActive);\n                }\n                else if (current.domNode) {\n                    const parent = _mountOptions.nodeApi.getParent(current.domNode);\n                    _mountOptions.nodeApi.removeChild(parent, current.domNode);\n                }\n                if (isDomVNode(current.node) && current.node.onDetach) {\n                    current.node.onDetach();\n                }\n            }\n            else if (item.type === 'attach') {\n                const { instance, attached } = item;\n                const instanceData = widgetInstanceMap.get(instance);\n                if (instanceData) {\n                    instanceData.nodeHandler.addRoot();\n                    attached && instanceData.onAttach();\n                }\n            }\n            else if (item.type === 'detach') {\n                if (item.current.instance) {\n                    const instanceData = widgetInstanceMap.get(item.current.instance);\n                    instanceData && instanceData.onDetach();\n                }\n                item.current.instance = undefined;\n            }\n        }\n        if (_deferredProcessQueue.length === 0) {\n            _nodeToWrapperMap = new WeakMap();\n        }\n    }\n    function _processMergeNodes(next, mergeNodes) {\n        const { merge } = _mountOptions;\n        if (merge && mergeNodes.length) {\n            if (isVNodeWrapper(next) && !isVirtualWrapper(next)) {\n                let { node: { tag } } = next;\n                for (let i = 0; i < mergeNodes.length; i++) {\n                    const domElement = mergeNodes[i];\n                    const tagName = domElement.tagName || '';\n                    if (tag.toUpperCase() === tagName.toUpperCase()) {\n                        const mergeNodeIndex = _allMergedNodes.indexOf(domElement);\n                        if (mergeNodeIndex !== -1) {\n                            _allMergedNodes.splice(mergeNodeIndex, 1);\n                        }\n                        mergeNodes.splice(i, 1);\n                        next.domNode = domElement;\n                        break;\n                    }\n                }\n            }\n            else {\n                next.mergeNodes = mergeNodes;\n            }\n        }\n    }\n    function distinguishableCheck(childNodes, index) {\n        const parentWNodeWrapper = getWNodeWrapper(childNodes[index].owningId);\n        checkDistinguishable(childNodes, index, parentWNodeWrapper);\n    }\n    function createKeyMap(wrappers) {\n        const keys = new Map();\n        for (let i = 0; i < wrappers.length; i++) {\n            const wrapper = wrappers[i];\n            if (wrapper.node.properties.key != null) {\n                keys.set(wrapper.node.properties.key, wrapper);\n            }\n        }\n        return keys;\n    }\n    function _process(current, next, meta = {}) {\n        let { mergeNodes = [], oldIndex = 0, newIndex = 0, currentKeyMap } = meta;\n        const currentLength = current.length;\n        const nextLength = next.length;\n        const hasPreviousSiblings = currentLength > 1 || (currentLength > 0 && currentLength < nextLength);\n        let instructions = [];\n        let replace = false;\n        if (!currentKeyMap) {\n            currentKeyMap = createKeyMap(current);\n            if (currentKeyMap.size === currentLength) {\n                const nextKeyMap = createKeyMap(next);\n                if (nextKeyMap.size === nextLength) {\n                    const currentEntries = [...currentKeyMap.entries()];\n                    for (let i = 0; i < currentEntries.length; i++) {\n                        const [key, value] = currentEntries[i];\n                        if (nextKeyMap.has(key)) {\n                            instructions = [];\n                            replace = false;\n                            break;\n                        }\n                        replace = true;\n                        instructions.push({ current: value, next: undefined });\n                    }\n                }\n            }\n        }\n        if (replace || (currentLength === 0 && !_mountOptions.merge)) {\n            for (let i = 0; i < nextLength; i++) {\n                instructions.push({ current: undefined, next: next[i] });\n            }\n        }\n        else {\n            if (newIndex < nextLength) {\n                let currentWrapper = oldIndex < currentLength ? current[oldIndex] : undefined;\n                const nextWrapper = next[newIndex];\n                nextWrapper.hasPreviousSiblings = hasPreviousSiblings;\n                _processMergeNodes(nextWrapper, mergeNodes);\n                if (currentWrapper && same(currentWrapper, nextWrapper)) {\n                    oldIndex++;\n                    newIndex++;\n                    if (isVNodeWrapper(currentWrapper) && isVNodeWrapper(nextWrapper)) {\n                        nextWrapper.inserted = currentWrapper.inserted;\n                    }\n                    if (isVNodeWrapper(currentWrapper) && isVNodeWrapper(nextWrapper) && nextWrapper.reparent) {\n                        nextWrapper.domNode = currentWrapper.domNode;\n                        nextWrapper.reparent = currentWrapper.id;\n                        currentWrapper.reparent = currentWrapper.id;\n                        instructions.push({ current: currentWrapper, next: undefined });\n                        instructions.push({ current: undefined, next: nextWrapper });\n                    }\n                    else {\n                        instructions.push({ current: currentWrapper, next: nextWrapper });\n                    }\n                }\n                else if (!currentWrapper || findIndexOfChild(current, nextWrapper, oldIndex + 1) === -1) {\n                    has('dojo-debug') && currentLength && distinguishableCheck(next, newIndex);\n                    const foundWrapper = currentKeyMap.get(nextWrapper.node.properties.key);\n                    if (foundWrapper && same(foundWrapper, nextWrapper)) {\n                        const { domNode, id } = foundWrapper;\n                        nextWrapper.domNode = domNode;\n                        nextWrapper.reparent = id;\n                        currentKeyMap.delete(nextWrapper.node.properties.key);\n                    }\n                    instructions.push({ current: undefined, next: nextWrapper });\n                    newIndex++;\n                }\n                else if (findIndexOfChild(next, currentWrapper, newIndex + 1) === -1) {\n                    has('dojo-debug') && distinguishableCheck(current, oldIndex);\n                    instructions.push({ current: currentWrapper, next: undefined });\n                    oldIndex++;\n                }\n                else {\n                    has('dojo-debug') && distinguishableCheck(next, newIndex);\n                    has('dojo-debug') && distinguishableCheck(current, oldIndex);\n                    const foundWrapper = currentKeyMap.get(nextWrapper.node.properties.key);\n                    if (foundWrapper && same(foundWrapper, nextWrapper)) {\n                        const { domNode, id } = foundWrapper;\n                        nextWrapper.domNode = domNode;\n                        nextWrapper.reparent = id;\n                        foundWrapper.reparent = id;\n                        currentWrapper.reparent = id;\n                        currentKeyMap.delete(nextWrapper.node.properties.key);\n                        instructions.push({ current: foundWrapper, next: undefined });\n                    }\n                    instructions.push({ current: currentWrapper, next: undefined });\n                    instructions.push({ current: undefined, next: nextWrapper });\n                    oldIndex++;\n                    newIndex++;\n                }\n            }\n            if (newIndex < nextLength) {\n                _processQueue.push({\n                    current,\n                    next,\n                    meta: { mergeNodes, oldIndex, newIndex, currentKeyMap }\n                });\n            }\n            if (currentLength > oldIndex && newIndex >= nextLength) {\n                currentKeyMap.clear();\n                for (let i = oldIndex; i < currentLength; i++) {\n                    has('dojo-debug') && distinguishableCheck(current, i);\n                    instructions.push({ current: current[i], next: undefined });\n                }\n            }\n        }\n        for (let i = 0; i < instructions.length; i++) {\n            const result = _processOne(instructions[i]);\n            if (result === false) {\n                if (_mountOptions.merge && mergeNodes.length) {\n                    if (newIndex < nextLength) {\n                        _processQueue.pop();\n                    }\n                    _processQueue.push({ next, current, meta });\n                    _deferredProcessQueue = _processQueue;\n                    _processQueue = [];\n                    break;\n                }\n                continue;\n            }\n            const { widget, item, dom } = result;\n            widget && _processQueue.push(widget);\n            item && _processQueue.push(item);\n            dom && _applicationQueue.push(dom);\n        }\n    }\n    function _processOne({ current, next }) {\n        if (current !== next) {\n            if (!current && next) {\n                if (isVNodeWrapper(next)) {\n                    return _createDom({ next });\n                }\n                else {\n                    return _createWidget({ next });\n                }\n            }\n            else if (current && next) {\n                if (isVNodeWrapper(current) && isVNodeWrapper(next)) {\n                    return _updateDom({ current, next });\n                }\n                else if (isWNodeWrapper(current) && isWNodeWrapper(next)) {\n                    return _updateWidget({ current, next });\n                }\n            }\n            else if (current && !next) {\n                if (isVNodeWrapper(current)) {\n                    return _removeDom({ current });\n                }\n                else if (isWNodeWrapper(current)) {\n                    return _removeWidget({ current });\n                }\n            }\n        }\n        return {};\n    }\n    function createWidgetOptions(id, widgetId, middleware) {\n        return {\n            id,\n            properties: () => {\n                const widgetMeta = widgetMetaMap.get(widgetId);\n                if (widgetMeta) {\n                    widgetMeta.propertiesCalled = true;\n                    return Object.assign({}, widgetMeta.properties);\n                }\n                return {};\n            },\n            children: () => {\n                const widgetMeta = widgetMetaMap.get(widgetId);\n                if (widgetMeta) {\n                    return widgetMeta.children;\n                }\n                return [];\n            },\n            middleware\n        };\n    }\n    function resolveMiddleware(middlewares, id, middlewareIds = []) {\n        const keys = Object.keys(middlewares);\n        const results = {};\n        const uniqueId = `${id}-${metaId++}`;\n        for (let i = 0; i < keys.length; i++) {\n            const middleware = middlewares[keys[i]]();\n            const payload = createWidgetOptions(uniqueId, id);\n            if (middleware.middlewares) {\n                const { middlewares: resolvedMiddleware } = resolveMiddleware(middleware.middlewares, id, middlewareIds);\n                payload.middleware = resolvedMiddleware;\n                results[keys[i]] = middleware.callback(payload);\n            }\n            else {\n                results[keys[i]] = middleware.callback(payload);\n            }\n        }\n        middlewareIds.push(uniqueId);\n        return { middlewares: results, ids: middlewareIds };\n    }\n    function _createWidget({ next }) {\n        let { node: { widgetConstructor } } = next;\n        let { registry } = _mountOptions;\n        let Constructor = next.registryItem || widgetConstructor;\n        if (!isWidget(Constructor)) {\n            resolveRegistryItem(next);\n            if (!next.registryItem) {\n                return false;\n            }\n            Constructor = next.registryItem;\n        }\n        let rendered;\n        let invalidate;\n        next.properties = Object.assign({}, next.node.properties);\n        next.id = next.id || `${wrapperId++}`;\n        _idToWrapperMap.set(next.id, next);\n        const { id, depth, order } = next;\n        if (!isWidgetBaseConstructor(Constructor)) {\n            let widgetMeta = widgetMetaMap.get(id);\n            if (!widgetMeta) {\n                invalidate = () => {\n                    const widgetMeta = widgetMetaMap.get(id);\n                    if (widgetMeta) {\n                        widgetMeta.dirty = true;\n                        if (!widgetMeta.rendering && _idToWrapperMap.has(id)) {\n                            _invalidationQueue.push({ id, depth, order });\n                            _schedule();\n                        }\n                    }\n                };\n                widgetMeta = {\n                    widgetName: Constructor.name || 'unknown',\n                    nodeApi: _mountOptions.nodeApi,\n                    mountNode: _mountOptions.domNode,\n                    dirty: false,\n                    invalidator: invalidate,\n                    originalProperties: Object.assign({}, next.node.properties),\n                    children: next.node.children,\n                    deferRefs: 0,\n                    rendering: true,\n                    middleware: {},\n                    middlewareIds: [],\n                    registry: _mountOptions.registry,\n                    propertiesCalled: false,\n                    wrappedFunctionMap: new Map(),\n                    properties: {}\n                };\n                (widgetMeta.properties = wrapFunctionProperties(widgetMeta, id, next.node.properties)),\n                    widgetMetaMap.set(next.id, widgetMeta);\n                if (Constructor.middlewares && Object.keys(Constructor.middlewares).length) {\n                    const { middlewares, ids } = resolveMiddleware(Constructor.middlewares, id);\n                    widgetMeta.middleware = middlewares;\n                    widgetMeta.middlewareIds = ids;\n                }\n            }\n            else {\n                invalidate = widgetMeta.invalidator;\n            }\n            rendered = Constructor(createWidgetOptions(id, id, widgetMeta.middleware));\n            widgetMeta.rendering = false;\n            widgetMeta.propertiesCalled = false;\n            if (widgetMeta.deferRefs > 0) {\n                return false;\n            }\n        }\n        else {\n            let instance = new Constructor();\n            instance.registry.base = registry;\n            const instanceData = widgetInstanceMap.get(instance);\n            invalidate = () => {\n                instanceData.dirty = true;\n                if (!instanceData.rendering && _idToWrapperMap.has(id)) {\n                    _invalidationQueue.push({ id, depth, order });\n                    _schedule();\n                }\n            };\n            instanceData.invalidate = invalidate;\n            instanceData.rendering = true;\n            instance.__setProperties__(next.node.properties);\n            instance.__setChildren__(next.node.children);\n            next.instance = instance;\n            rendered = instance.__render__();\n            instanceData.rendering = false;\n        }\n        let children;\n        if (rendered) {\n            rendered = Array.isArray(rendered) ? rendered : [rendered];\n            children = renderedToWrapper(rendered, next, null);\n            _idToChildrenWrappers.set(id, children);\n        }\n        if (!parentInvalidate && !Constructor.isWNodeWrapper) {\n            parentInvalidate = invalidate;\n        }\n        let currentChildren = undefined;\n        if (next.reparent) {\n            currentChildren = _idToChildrenWrappers.get(next.reparent);\n            _idToChildrenWrappers.delete(next.reparent);\n            next.reparent = undefined;\n        }\n        return {\n            item: {\n                current: currentChildren,\n                next: children,\n                meta: { mergeNodes: next.mergeNodes }\n            },\n            widget: { type: 'attach', instance: next.instance, id, attached: true }\n        };\n    }\n    function _updateWidget({ current, next }) {\n        current = getWNodeWrapper(current.id) || current;\n        const { instance, domNode, hasAnimations, id } = current;\n        let { node: { widgetConstructor } } = next;\n        const Constructor = next.registryItem || widgetConstructor;\n        if (!isWidget(Constructor)) {\n            return {};\n        }\n        let rendered;\n        let processResult = {};\n        let didRender = false;\n        let currentChildren = _idToChildrenWrappers.get(current.id);\n        next.hasAnimations = hasAnimations;\n        next.id = id;\n        next.properties = Object.assign({}, next.node.properties);\n        _wrapperSiblingMap.delete(current);\n        if (domNode && _mountOptions.nodeApi.getParent(domNode)) {\n            next.domNode = domNode;\n        }\n        if (!isWidgetBaseConstructor(Constructor)) {\n            const widgetMeta = widgetMetaMap.get(id);\n            if (widgetMeta) {\n                widgetMeta.originalProperties = Object.assign({}, next.properties);\n                widgetMeta.properties = wrapFunctionProperties(widgetMeta, id, widgetMeta.originalProperties);\n                widgetMeta.children = next.node.children;\n                widgetMeta.rendering = true;\n                const customProperties = runDiffs(widgetMeta, current.properties, widgetMeta.originalProperties);\n                widgetMeta.properties = Object.assign({}, widgetMeta.properties, customProperties);\n                if (current.node.children.length > 0 || next.node.children.length > 0) {\n                    widgetMeta.dirty = true;\n                }\n                if (!widgetMeta.dirty) {\n                    propertiesDiff(current.properties, next.properties, () => {\n                        widgetMeta.dirty = true;\n                    }, widgetMeta.customDiffProperties ? [...widgetMeta.customDiffProperties.values()] : []);\n                }\n                if (widgetMeta.dirty) {\n                    _idToChildrenWrappers.delete(id);\n                    didRender = true;\n                    rendered = Constructor(createWidgetOptions(id, id, widgetMeta.middleware));\n                    widgetMeta.dirty = false;\n                    if (widgetMeta.deferRefs > 0) {\n                        rendered = null;\n                    }\n                }\n                widgetMeta.rendering = false;\n                widgetMeta.propertiesCalled = false;\n            }\n        }\n        else {\n            const instanceData = widgetInstanceMap.get(instance);\n            next.instance = instance;\n            instanceData.rendering = true;\n            instance.__setProperties__(next.node.properties);\n            instance.__setChildren__(next.node.children);\n            if (instanceData.dirty) {\n                didRender = true;\n                _idToChildrenWrappers.delete(id);\n                rendered = instance.__render__();\n            }\n            instanceData.rendering = false;\n        }\n        _idToWrapperMap.set(next.id, next);\n        processResult.widget = { type: 'attach', instance, id, attached: false };\n        let children;\n        if (rendered) {\n            rendered = Array.isArray(rendered) ? rendered : [rendered];\n            children = renderedToWrapper(rendered, next, current);\n            _idToChildrenWrappers.set(id, children);\n        }\n        if (didRender) {\n            processResult.item = {\n                current: currentChildren,\n                next: children,\n                meta: {}\n            };\n        }\n        return processResult;\n    }\n    function _removeWidget({ current }) {\n        current = getWNodeWrapper(current.id) || current;\n        _idToWrapperMap.delete(current.id);\n        const meta = widgetMetaMap.get(current.id);\n        let currentChildren = _idToChildrenWrappers.get(current.id);\n        _wrapperSiblingMap.delete(current);\n        let processResult = {};\n        if (!current.reparent) {\n            _idToChildrenWrappers.delete(current.id);\n            processResult = {\n                item: {\n                    current: currentChildren,\n                    meta: {}\n                }\n            };\n        }\n        if (meta) {\n            meta.registryHandler && meta.registryHandler.destroy();\n            destroyHandles(meta);\n            widgetMetaMap.delete(current.id);\n        }\n        else {\n            processResult.widget = { type: 'detach', current, instance: current.instance };\n        }\n        return processResult;\n    }\n    function findDomNodeOnParentWrapper(id) {\n        const children = _idToChildrenWrappers.get(id) || [];\n        for (let i = 0; i < children.length; i++) {\n            const child = children[i];\n            if (child.domNode) {\n                return child.id;\n            }\n            const childId = findDomNodeOnParentWrapper(child.id);\n            if (childId) {\n                return childId;\n            }\n        }\n    }\n    function _createDom({ next }) {\n        const parentDomNode = findParentDomNode(next);\n        const isVirtual = isVirtualWrapper(next);\n        const isBody = isBodyWrapper(next);\n        const isHead = isHeadWrapper(next);\n        let mergeNodes = [];\n        next.id = `${wrapperId++}`;\n        _idToWrapperMap.set(next.id, next);\n        if (!next.domNode) {\n            if (next.node.domNode) {\n                next.domNode = next.node.domNode;\n            }\n            else {\n                if (next.node.tag === 'svg') {\n                    next.namespace = NAMESPACE_SVG;\n                }\n                if (isBody) {\n                    next.domNode = _mountOptions.nodeApi.getBody();\n                }\n                else if (isHead) {\n                    next.domNode = _mountOptions.nodeApi.getHead();\n                }\n                else if (next.node.tag && !isVirtual) {\n                    if (next.namespace) {\n                        next.domNode = _mountOptions.nodeApi.createWithNamespace(next.namespace, next.node.tag);\n                    }\n                    else {\n                        next.domNode = _mountOptions.nodeApi.create(next.node.tag);\n                    }\n                }\n                else if (next.node.text != null) {\n                    next.domNode = _mountOptions.nodeApi.createText(next.node.text);\n                }\n            }\n            if (_insertBeforeMap && _allMergedNodes.length) {\n                if (parentDomNode === _allMergedNodes[0].parentNode) {\n                    _insertBeforeMap.set(next, _allMergedNodes[0]);\n                }\n            }\n            if (isVirtualWrapper(next)) {\n                mergeNodes = next.mergeNodes || [];\n            }\n        }\n        else if (_mountOptions.merge) {\n            next.merged = true;\n            if (_mountOptions.nodeApi.isTextNode(next.domNode)) {\n                if (_mountOptions.nodeApi.getProperty(next.domNode, 'data') !== next.node.text) {\n                    _allMergedNodes = [next.domNode, ..._allMergedNodes];\n                    next.domNode = global.document.createTextNode(next.node.text);\n                    next.merged = false;\n                }\n            }\n            else {\n                mergeNodes = arrayFrom(_mountOptions.nodeApi.getChildren(next.domNode));\n                _allMergedNodes = [..._allMergedNodes, ...mergeNodes];\n            }\n        }\n        let children;\n        if (next.domNode || isVirtual) {\n            if (next.node.children && next.node.children.length) {\n                children = renderedToWrapper(next.node.children, next, null);\n                _idToChildrenWrappers.set(next.id, children);\n            }\n        }\n        const dom = isSpecialWrapper(next)\n            ? undefined\n            : {\n                next: next,\n                parentDomNode: parentDomNode,\n                type: 'create'\n            };\n        let currentChildren = undefined;\n        if (next.reparent) {\n            currentChildren = _idToChildrenWrappers.get(next.reparent);\n            _idToChildrenWrappers.delete(next.reparent);\n        }\n        if (children || currentChildren) {\n            return {\n                item: {\n                    current: currentChildren,\n                    next: children,\n                    meta: { mergeNodes }\n                },\n                dom,\n                widget: isVirtual ? { type: 'attach', id: next.id, attached: false } : undefined\n            };\n        }\n        return { dom };\n    }\n    function _updateDom({ current, next }) {\n        next.domNode = current.domNode;\n        next.namespace = current.namespace;\n        next.id = current.id;\n        next.childDomWrapperId = current.childDomWrapperId;\n        let children;\n        let currentChildren = _idToChildrenWrappers.get(next.id);\n        if (next.node.text != null && next.node.text !== current.node.text) {\n            next.domNode = _mountOptions.nodeApi.createText(next.node.text);\n        }\n        else if (next.node.children) {\n            children = renderedToWrapper(next.node.children, next, current);\n            _idToChildrenWrappers.set(next.id, children);\n        }\n        _wrapperSiblingMap.delete(current);\n        _idToWrapperMap.set(next.id, next);\n        return {\n            item: {\n                current: currentChildren,\n                next: children,\n                meta: {}\n            },\n            dom: { type: 'update', next, current }\n        };\n    }\n    function _removeDom({ current }) {\n        if (current.reparent) {\n            return {};\n        }\n        const isSpecial = isSpecialWrapper(current);\n        const children = _idToChildrenWrappers.get(current.id);\n        _idToChildrenWrappers.delete(current.id);\n        _idToWrapperMap.delete(current.id);\n        _wrapperSiblingMap.delete(current);\n        if (current.node.properties.key) {\n            const widgetMeta = widgetMetaMap.get(current.owningId);\n            const parentWrapper = getWNodeWrapper(current.owningId);\n            if (widgetMeta) {\n                widgetMeta.nodeMap && widgetMeta.nodeMap.delete(current.node.properties.key);\n            }\n            else if (parentWrapper && parentWrapper.instance) {\n                const instanceData = widgetInstanceMap.get(parentWrapper.instance);\n                instanceData && instanceData.nodeHandler.remove(current.node.properties.key);\n            }\n        }\n        if (current.hasAnimations || isSpecial) {\n            return {\n                item: { current: children, meta: {} },\n                dom: isSpecial ? undefined : { type: 'delete', current }\n            };\n        }\n        if (children) {\n            _deferredRenderCallbacks.push(() => {\n                let wrappers = children || [];\n                let wrapper;\n                let specialIds = [];\n                while ((wrapper = wrappers.pop())) {\n                    if (isWNodeWrapper(wrapper)) {\n                        wrapper = getWNodeWrapper(wrapper.id) || wrapper;\n                        if (wrapper.instance) {\n                            const instanceData = widgetInstanceMap.get(wrapper.instance);\n                            instanceData && instanceData.onDetach();\n                            wrapper.instance = undefined;\n                        }\n                        else {\n                            const meta = widgetMetaMap.get(wrapper.id);\n                            if (meta) {\n                                meta.registryHandler && meta.registryHandler.destroy();\n                                destroyHandles(meta);\n                                widgetMetaMap.delete(wrapper.id);\n                            }\n                        }\n                    }\n                    let wrapperChildren = _idToChildrenWrappers.get(wrapper.id);\n                    if (wrapperChildren) {\n                        wrappers.push(...wrapperChildren);\n                    }\n                    if (isBodyWrapper(wrapper) || isHeadWrapper(wrapper)) {\n                        specialIds.push(wrapper.id);\n                    }\n                    else if (specialIds.indexOf(wrapper.parentId) !== -1) {\n                        if (isWNodeWrapper(wrapper) || isVirtualWrapper(wrapper)) {\n                            specialIds.push(wrapper.id);\n                        }\n                        else if (wrapper.domNode && _mountOptions.nodeApi.getParent(wrapper.domNode)) {\n                            const parent = _mountOptions.nodeApi.getParent(wrapper.domNode);\n                            if (parent) {\n                                _mountOptions.nodeApi.removeChild(parent, wrapper.domNode);\n                            }\n                        }\n                    }\n                    else if (isDomVNode(wrapper.node) && wrapper.node.onDetach) {\n                        wrapper.node.onDetach();\n                    }\n                    _idToChildrenWrappers.delete(wrapper.id);\n                    _idToWrapperMap.delete(wrapper.id);\n                }\n            });\n        }\n        return {\n            dom: { type: 'delete', current }\n        };\n    }\n    return {\n        mount,\n        unmount,\n        invalidate\n    };\n}\nexport default renderer;\n//# sourceMappingURL=vdom.mjs.map","import ResizeObserver from '../../shim/ResizeObserver';\nimport { create, node, destroy } from '../vdom';\nimport { icache } from './icache';\nconst factory = create({ node, destroy, icache });\nexport const resize = factory(({ middleware: { node, destroy, icache } }) => {\n    const keys = [];\n    const handles = [];\n    destroy(() => {\n        let handle;\n        while ((handle = handles.pop())) {\n            handle && handle();\n        }\n    });\n    return {\n        get(key) {\n            const domNode = node.get(key);\n            if (!domNode) {\n                return null;\n            }\n            if (keys.indexOf(key) === -1) {\n                keys.push(key);\n                const resizeObserver = new ResizeObserver(([entry]) => {\n                    icache.set(key, entry.contentRect);\n                });\n                resizeObserver.observe(domNode);\n                handles.push(() => resizeObserver.disconnect());\n            }\n            return icache.get(key) || null;\n        }\n    };\n});\nexport default resize;\n//# sourceMappingURL=resize.mjs.map","import global from './global';\nimport has from '../core/has';\n// !has('build-elide')\nimport * as Resize from 'resize-observer-polyfill';\nimport wrapper from './util/wrapper';\nif (!has('build-elide')) {\n    if (!global.ResizeObserver) {\n        // default is undefined when UMD module is used\n        global.ResizeObserver = Resize.default || Resize;\n    }\n}\nexport default wrapper('ResizeObserver', true);","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ResizeObserver = factory());\n}(this, (function () { 'use strict';\n\n/**\n * A collection of shims that provide minimal functionality of the ES6 collections.\n *\n * These implementations are not meant to be used outside of the ResizeObserver\n * modules as they cover only a limited range of use cases.\n */\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = (function () {\n    if (typeof Map !== 'undefined') {\n        return Map;\n    }\n\n    /**\n     * Returns index in provided array that matches the specified key.\n     *\n     * @param {Array<Array>} arr\n     * @param {*} key\n     * @returns {number}\n     */\n    function getIndex(arr, key) {\n        var result = -1;\n\n        arr.some(function (entry, index) {\n            if (entry[0] === key) {\n                result = index;\n\n                return true;\n            }\n\n            return false;\n        });\n\n        return result;\n    }\n\n    return (function () {\n        function anonymous() {\n            this.__entries__ = [];\n        }\n\n        var prototypeAccessors = { size: { configurable: true } };\n\n        /**\n         * @returns {boolean}\n         */\n        prototypeAccessors.size.get = function () {\n            return this.__entries__.length;\n        };\n\n        /**\n         * @param {*} key\n         * @returns {*}\n         */\n        anonymous.prototype.get = function (key) {\n            var index = getIndex(this.__entries__, key);\n            var entry = this.__entries__[index];\n\n            return entry && entry[1];\n        };\n\n        /**\n         * @param {*} key\n         * @param {*} value\n         * @returns {void}\n         */\n        anonymous.prototype.set = function (key, value) {\n            var index = getIndex(this.__entries__, key);\n\n            if (~index) {\n                this.__entries__[index][1] = value;\n            } else {\n                this.__entries__.push([key, value]);\n            }\n        };\n\n        /**\n         * @param {*} key\n         * @returns {void}\n         */\n        anonymous.prototype.delete = function (key) {\n            var entries = this.__entries__;\n            var index = getIndex(entries, key);\n\n            if (~index) {\n                entries.splice(index, 1);\n            }\n        };\n\n        /**\n         * @param {*} key\n         * @returns {void}\n         */\n        anonymous.prototype.has = function (key) {\n            return !!~getIndex(this.__entries__, key);\n        };\n\n        /**\n         * @returns {void}\n         */\n        anonymous.prototype.clear = function () {\n            this.__entries__.splice(0);\n        };\n\n        /**\n         * @param {Function} callback\n         * @param {*} [ctx=null]\n         * @returns {void}\n         */\n        anonymous.prototype.forEach = function (callback, ctx) {\n            var this$1 = this;\n            if ( ctx === void 0 ) ctx = null;\n\n            for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\n                var entry = list[i];\n\n                callback.call(ctx, entry[1], entry[0]);\n            }\n        };\n\n        Object.defineProperties( anonymous.prototype, prototypeAccessors );\n\n        return anonymous;\n    }());\n})();\n\n/**\n * Detects whether window and document objects are available in current environment.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\nvar global$1 = (function () {\n    if (typeof global !== 'undefined' && global.Math === Math) {\n        return global;\n    }\n\n    if (typeof self !== 'undefined' && self.Math === Math) {\n        return self;\n    }\n\n    if (typeof window !== 'undefined' && window.Math === Math) {\n        return window;\n    }\n\n    // eslint-disable-next-line no-new-func\n    return Function('return this')();\n})();\n\n/**\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\n * first one is not supported.\n *\n * @returns {number} Requests' identifier.\n */\nvar requestAnimationFrame$1 = (function () {\n    if (typeof requestAnimationFrame === 'function') {\n        // It's required to use a bounded function because IE sometimes throws\n        // an \"Invalid calling object\" error if rAF is invoked without the global\n        // object on the left hand side.\n        return requestAnimationFrame.bind(global$1);\n    }\n\n    return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\n})();\n\n// Defines minimum timeout before adding a trailing call.\nvar trailingTimeout = 2;\n\n/**\n * Creates a wrapper function which ensures that provided callback will be\n * invoked only once during the specified delay period.\n *\n * @param {Function} callback - Function to be invoked after the delay period.\n * @param {number} delay - Delay after which to invoke callback.\n * @returns {Function}\n */\nvar throttle = function (callback, delay) {\n    var leadingCall = false,\n        trailingCall = false,\n        lastCallTime = 0;\n\n    /**\n     * Invokes the original callback function and schedules new invocation if\n     * the \"proxy\" was called during current request.\n     *\n     * @returns {void}\n     */\n    function resolvePending() {\n        if (leadingCall) {\n            leadingCall = false;\n\n            callback();\n        }\n\n        if (trailingCall) {\n            proxy();\n        }\n    }\n\n    /**\n     * Callback invoked after the specified delay. It will further postpone\n     * invocation of the original function delegating it to the\n     * requestAnimationFrame.\n     *\n     * @returns {void}\n     */\n    function timeoutCallback() {\n        requestAnimationFrame$1(resolvePending);\n    }\n\n    /**\n     * Schedules invocation of the original function.\n     *\n     * @returns {void}\n     */\n    function proxy() {\n        var timeStamp = Date.now();\n\n        if (leadingCall) {\n            // Reject immediately following calls.\n            if (timeStamp - lastCallTime < trailingTimeout) {\n                return;\n            }\n\n            // Schedule new call to be in invoked when the pending one is resolved.\n            // This is important for \"transitions\" which never actually start\n            // immediately so there is a chance that we might miss one if change\n            // happens amids the pending invocation.\n            trailingCall = true;\n        } else {\n            leadingCall = true;\n            trailingCall = false;\n\n            setTimeout(timeoutCallback, delay);\n        }\n\n        lastCallTime = timeStamp;\n    }\n\n    return proxy;\n};\n\n// Minimum delay before invoking the update of observers.\nvar REFRESH_DELAY = 20;\n\n// A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\n\n// Check if MutationObserver is available.\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\n\n/**\n * Singleton controller class which handles updates of ResizeObserver instances.\n */\nvar ResizeObserverController = function() {\n    this.connected_ = false;\n    this.mutationEventsAdded_ = false;\n    this.mutationsObserver_ = null;\n    this.observers_ = [];\n\n    this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n    this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n};\n\n/**\n * Adds observer to observers list.\n *\n * @param {ResizeObserverSPI} observer - Observer to be added.\n * @returns {void}\n */\n\n\n/**\n * Holds reference to the controller's instance.\n *\n * @private {ResizeObserverController}\n */\n\n\n/**\n * Keeps reference to the instance of MutationObserver.\n *\n * @private {MutationObserver}\n */\n\n/**\n * Indicates whether DOM listeners have been added.\n *\n * @private {boolean}\n */\nResizeObserverController.prototype.addObserver = function (observer) {\n    if (!~this.observers_.indexOf(observer)) {\n        this.observers_.push(observer);\n    }\n\n    // Add listeners if they haven't been added yet.\n    if (!this.connected_) {\n        this.connect_();\n    }\n};\n\n/**\n * Removes observer from observers list.\n *\n * @param {ResizeObserverSPI} observer - Observer to be removed.\n * @returns {void}\n */\nResizeObserverController.prototype.removeObserver = function (observer) {\n    var observers = this.observers_;\n    var index = observers.indexOf(observer);\n\n    // Remove observer if it's present in registry.\n    if (~index) {\n        observers.splice(index, 1);\n    }\n\n    // Remove listeners if controller has no connected observers.\n    if (!observers.length && this.connected_) {\n        this.disconnect_();\n    }\n};\n\n/**\n * Invokes the update of observers. It will continue running updates insofar\n * it detects changes.\n *\n * @returns {void}\n */\nResizeObserverController.prototype.refresh = function () {\n    var changesDetected = this.updateObservers_();\n\n    // Continue running updates if changes have been detected as there might\n    // be future ones caused by CSS transitions.\n    if (changesDetected) {\n        this.refresh();\n    }\n};\n\n/**\n * Updates every observer from observers list and notifies them of queued\n * entries.\n *\n * @private\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\n *  dimensions of it's elements.\n */\nResizeObserverController.prototype.updateObservers_ = function () {\n    // Collect observers that have active observations.\n    var activeObservers = this.observers_.filter(function (observer) {\n        return observer.gatherActive(), observer.hasActive();\n    });\n\n    // Deliver notifications in a separate cycle in order to avoid any\n    // collisions between observers, e.g. when multiple instances of\n    // ResizeObserver are tracking the same element and the callback of one\n    // of them changes content dimensions of the observed target. Sometimes\n    // this may result in notifications being blocked for the rest of observers.\n    activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\n\n    return activeObservers.length > 0;\n};\n\n/**\n * Initializes DOM listeners.\n *\n * @private\n * @returns {void}\n */\nResizeObserverController.prototype.connect_ = function () {\n    // Do nothing if running in a non-browser environment or if listeners\n    // have been already added.\n    if (!isBrowser || this.connected_) {\n        return;\n    }\n\n    // Subscription to the \"Transitionend\" event is used as a workaround for\n    // delayed transitions. This way it's possible to capture at least the\n    // final state of an element.\n    document.addEventListener('transitionend', this.onTransitionEnd_);\n\n    window.addEventListener('resize', this.refresh);\n\n    if (mutationObserverSupported) {\n        this.mutationsObserver_ = new MutationObserver(this.refresh);\n\n        this.mutationsObserver_.observe(document, {\n            attributes: true,\n            childList: true,\n            characterData: true,\n            subtree: true\n        });\n    } else {\n        document.addEventListener('DOMSubtreeModified', this.refresh);\n\n        this.mutationEventsAdded_ = true;\n    }\n\n    this.connected_ = true;\n};\n\n/**\n * Removes DOM listeners.\n *\n * @private\n * @returns {void}\n */\nResizeObserverController.prototype.disconnect_ = function () {\n    // Do nothing if running in a non-browser environment or if listeners\n    // have been already removed.\n    if (!isBrowser || !this.connected_) {\n        return;\n    }\n\n    document.removeEventListener('transitionend', this.onTransitionEnd_);\n    window.removeEventListener('resize', this.refresh);\n\n    if (this.mutationsObserver_) {\n        this.mutationsObserver_.disconnect();\n    }\n\n    if (this.mutationEventsAdded_) {\n        document.removeEventListener('DOMSubtreeModified', this.refresh);\n    }\n\n    this.mutationsObserver_ = null;\n    this.mutationEventsAdded_ = false;\n    this.connected_ = false;\n};\n\n/**\n * \"Transitionend\" event handler.\n *\n * @private\n * @param {TransitionEvent} event\n * @returns {void}\n */\nResizeObserverController.prototype.onTransitionEnd_ = function (ref) {\n        var propertyName = ref.propertyName; if ( propertyName === void 0 ) propertyName = '';\n\n    // Detect whether transition may affect dimensions of an element.\n    var isReflowProperty = transitionKeys.some(function (key) {\n        return !!~propertyName.indexOf(key);\n    });\n\n    if (isReflowProperty) {\n        this.refresh();\n    }\n};\n\n/**\n * Returns instance of the ResizeObserverController.\n *\n * @returns {ResizeObserverController}\n */\nResizeObserverController.getInstance = function () {\n    if (!this.instance_) {\n        this.instance_ = new ResizeObserverController();\n    }\n\n    return this.instance_;\n};\n\nResizeObserverController.instance_ = null;\n\n/**\n * Defines non-writable/enumerable properties of the provided target object.\n *\n * @param {Object} target - Object for which to define properties.\n * @param {Object} props - Properties to be defined.\n * @returns {Object} Target object.\n */\nvar defineConfigurable = (function (target, props) {\n    for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\n        var key = list[i];\n\n        Object.defineProperty(target, key, {\n            value: props[key],\n            enumerable: false,\n            writable: false,\n            configurable: true\n        });\n    }\n\n    return target;\n});\n\n/**\n * Returns the global object associated with provided element.\n *\n * @param {Object} target\n * @returns {Object}\n */\nvar getWindowOf = (function (target) {\n    // Assume that the element is an instance of Node, which means that it\n    // has the \"ownerDocument\" property from which we can retrieve a\n    // corresponding global object.\n    var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\n\n    // Return the local global object if it's not possible extract one from\n    // provided element.\n    return ownerGlobal || global$1;\n});\n\n// Placeholder of an empty content rectangle.\nvar emptyRect = createRectInit(0, 0, 0, 0);\n\n/**\n * Converts provided string to a number.\n *\n * @param {number|string} value\n * @returns {number}\n */\nfunction toFloat(value) {\n    return parseFloat(value) || 0;\n}\n\n/**\n * Extracts borders size from provided styles.\n *\n * @param {CSSStyleDeclaration} styles\n * @param {...string} positions - Borders positions (top, right, ...)\n * @returns {number}\n */\nfunction getBordersSize(styles) {\n    var positions = [], len = arguments.length - 1;\n    while ( len-- > 0 ) positions[ len ] = arguments[ len + 1 ];\n\n    return positions.reduce(function (size, position) {\n        var value = styles['border-' + position + '-width'];\n\n        return size + toFloat(value);\n    }, 0);\n}\n\n/**\n * Extracts paddings sizes from provided styles.\n *\n * @param {CSSStyleDeclaration} styles\n * @returns {Object} Paddings box.\n */\nfunction getPaddings(styles) {\n    var positions = ['top', 'right', 'bottom', 'left'];\n    var paddings = {};\n\n    for (var i = 0, list = positions; i < list.length; i += 1) {\n        var position = list[i];\n\n        var value = styles['padding-' + position];\n\n        paddings[position] = toFloat(value);\n    }\n\n    return paddings;\n}\n\n/**\n * Calculates content rectangle of provided SVG element.\n *\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\n *      to be calculated.\n * @returns {DOMRectInit}\n */\nfunction getSVGContentRect(target) {\n    var bbox = target.getBBox();\n\n    return createRectInit(0, 0, bbox.width, bbox.height);\n}\n\n/**\n * Calculates content rectangle of provided HTMLElement.\n *\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\n * @returns {DOMRectInit}\n */\nfunction getHTMLElementContentRect(target) {\n    // Client width & height properties can't be\n    // used exclusively as they provide rounded values.\n    var clientWidth = target.clientWidth;\n    var clientHeight = target.clientHeight;\n\n    // By this condition we can catch all non-replaced inline, hidden and\n    // detached elements. Though elements with width & height properties less\n    // than 0.5 will be discarded as well.\n    //\n    // Without it we would need to implement separate methods for each of\n    // those cases and it's not possible to perform a precise and performance\n    // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n    // gives wrong results for elements with width & height less than 0.5.\n    if (!clientWidth && !clientHeight) {\n        return emptyRect;\n    }\n\n    var styles = getWindowOf(target).getComputedStyle(target);\n    var paddings = getPaddings(styles);\n    var horizPad = paddings.left + paddings.right;\n    var vertPad = paddings.top + paddings.bottom;\n\n    // Computed styles of width & height are being used because they are the\n    // only dimensions available to JS that contain non-rounded values. It could\n    // be possible to utilize the getBoundingClientRect if only it's data wasn't\n    // affected by CSS transformations let alone paddings, borders and scroll bars.\n    var width = toFloat(styles.width),\n        height = toFloat(styles.height);\n\n    // Width & height include paddings and borders when the 'border-box' box\n    // model is applied (except for IE).\n    if (styles.boxSizing === 'border-box') {\n        // Following conditions are required to handle Internet Explorer which\n        // doesn't include paddings and borders to computed CSS dimensions.\n        //\n        // We can say that if CSS dimensions + paddings are equal to the \"client\"\n        // properties then it's either IE, and thus we don't need to subtract\n        // anything, or an element merely doesn't have paddings/borders styles.\n        if (Math.round(width + horizPad) !== clientWidth) {\n            width -= getBordersSize(styles, 'left', 'right') + horizPad;\n        }\n\n        if (Math.round(height + vertPad) !== clientHeight) {\n            height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n        }\n    }\n\n    // Following steps can't be applied to the document's root element as its\n    // client[Width/Height] properties represent viewport area of the window.\n    // Besides, it's as well not necessary as the <html> itself neither has\n    // rendered scroll bars nor it can be clipped.\n    if (!isDocumentElement(target)) {\n        // In some browsers (only in Firefox, actually) CSS width & height\n        // include scroll bars size which can be removed at this step as scroll\n        // bars are the only difference between rounded dimensions + paddings\n        // and \"client\" properties, though that is not always true in Chrome.\n        var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n        var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n\n        // Chrome has a rather weird rounding of \"client\" properties.\n        // E.g. for an element with content width of 314.2px it sometimes gives\n        // the client width of 315px and for the width of 314.7px it may give\n        // 314px. And it doesn't happen all the time. So just ignore this delta\n        // as a non-relevant.\n        if (Math.abs(vertScrollbar) !== 1) {\n            width -= vertScrollbar;\n        }\n\n        if (Math.abs(horizScrollbar) !== 1) {\n            height -= horizScrollbar;\n        }\n    }\n\n    return createRectInit(paddings.left, paddings.top, width, height);\n}\n\n/**\n * Checks whether provided element is an instance of the SVGGraphicsElement.\n *\n * @param {Element} target - Element to be checked.\n * @returns {boolean}\n */\nvar isSVGGraphicsElement = (function () {\n    // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n    // interface.\n    if (typeof SVGGraphicsElement !== 'undefined') {\n        return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\n    }\n\n    // If it's so, then check that element is at least an instance of the\n    // SVGElement and that it has the \"getBBox\" method.\n    // eslint-disable-next-line no-extra-parens\n    return function (target) { return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'; };\n})();\n\n/**\n * Checks whether provided element is a document element (<html>).\n *\n * @param {Element} target - Element to be checked.\n * @returns {boolean}\n */\nfunction isDocumentElement(target) {\n    return target === getWindowOf(target).document.documentElement;\n}\n\n/**\n * Calculates an appropriate content rectangle for provided html or svg element.\n *\n * @param {Element} target - Element content rectangle of which needs to be calculated.\n * @returns {DOMRectInit}\n */\nfunction getContentRect(target) {\n    if (!isBrowser) {\n        return emptyRect;\n    }\n\n    if (isSVGGraphicsElement(target)) {\n        return getSVGContentRect(target);\n    }\n\n    return getHTMLElementContentRect(target);\n}\n\n/**\n * Creates rectangle with an interface of the DOMRectReadOnly.\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\n *\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\n * @returns {DOMRectReadOnly}\n */\nfunction createReadOnlyRect(ref) {\n    var x = ref.x;\n    var y = ref.y;\n    var width = ref.width;\n    var height = ref.height;\n\n    // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n    var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n    var rect = Object.create(Constr.prototype);\n\n    // Rectangle's properties are not writable and non-enumerable.\n    defineConfigurable(rect, {\n        x: x, y: y, width: width, height: height,\n        top: y,\n        right: x + width,\n        bottom: height + y,\n        left: x\n    });\n\n    return rect;\n}\n\n/**\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\n *\n * @param {number} x - X coordinate.\n * @param {number} y - Y coordinate.\n * @param {number} width - Rectangle's width.\n * @param {number} height - Rectangle's height.\n * @returns {DOMRectInit}\n */\nfunction createRectInit(x, y, width, height) {\n    return { x: x, y: y, width: width, height: height };\n}\n\n/**\n * Class that is responsible for computations of the content rectangle of\n * provided DOM element and for keeping track of it's changes.\n */\nvar ResizeObservation = function(target) {\n    this.broadcastWidth = 0;\n    this.broadcastHeight = 0;\n    this.contentRect_ = createRectInit(0, 0, 0, 0);\n\n    this.target = target;\n};\n\n/**\n * Updates content rectangle and tells whether it's width or height properties\n * have changed since the last broadcast.\n *\n * @returns {boolean}\n */\n\n\n/**\n * Reference to the last observed content rectangle.\n *\n * @private {DOMRectInit}\n */\n\n\n/**\n * Broadcasted width of content rectangle.\n *\n * @type {number}\n */\nResizeObservation.prototype.isActive = function () {\n    var rect = getContentRect(this.target);\n\n    this.contentRect_ = rect;\n\n    return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n};\n\n/**\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\n * from the corresponding properties of the last observed content rectangle.\n *\n * @returns {DOMRectInit} Last observed content rectangle.\n */\nResizeObservation.prototype.broadcastRect = function () {\n    var rect = this.contentRect_;\n\n    this.broadcastWidth = rect.width;\n    this.broadcastHeight = rect.height;\n\n    return rect;\n};\n\nvar ResizeObserverEntry = function(target, rectInit) {\n    var contentRect = createReadOnlyRect(rectInit);\n\n    // According to the specification following properties are not writable\n    // and are also not enumerable in the native implementation.\n    //\n    // Property accessors are not being used as they'd require to define a\n    // private WeakMap storage which may cause memory leaks in browsers that\n    // don't support this type of collections.\n    defineConfigurable(this, { target: target, contentRect: contentRect });\n};\n\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\n    this.activeObservations_ = [];\n    this.observations_ = new MapShim();\n\n    if (typeof callback !== 'function') {\n        throw new TypeError('The callback provided as parameter 1 is not a function.');\n    }\n\n    this.callback_ = callback;\n    this.controller_ = controller;\n    this.callbackCtx_ = callbackCtx;\n};\n\n/**\n * Starts observing provided element.\n *\n * @param {Element} target - Element to be observed.\n * @returns {void}\n */\n\n\n/**\n * Registry of the ResizeObservation instances.\n *\n * @private {Map<Element, ResizeObservation>}\n */\n\n\n/**\n * Public ResizeObserver instance which will be passed to the callback\n * function and used as a value of it's \"this\" binding.\n *\n * @private {ResizeObserver}\n */\n\n/**\n * Collection of resize observations that have detected changes in dimensions\n * of elements.\n *\n * @private {Array<ResizeObservation>}\n */\nResizeObserverSPI.prototype.observe = function (target) {\n    if (!arguments.length) {\n        throw new TypeError('1 argument required, but only 0 present.');\n    }\n\n    // Do nothing if current environment doesn't have the Element interface.\n    if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n        return;\n    }\n\n    if (!(target instanceof getWindowOf(target).Element)) {\n        throw new TypeError('parameter 1 is not of type \"Element\".');\n    }\n\n    var observations = this.observations_;\n\n    // Do nothing if element is already being observed.\n    if (observations.has(target)) {\n        return;\n    }\n\n    observations.set(target, new ResizeObservation(target));\n\n    this.controller_.addObserver(this);\n\n    // Force the update of observations.\n    this.controller_.refresh();\n};\n\n/**\n * Stops observing provided element.\n *\n * @param {Element} target - Element to stop observing.\n * @returns {void}\n */\nResizeObserverSPI.prototype.unobserve = function (target) {\n    if (!arguments.length) {\n        throw new TypeError('1 argument required, but only 0 present.');\n    }\n\n    // Do nothing if current environment doesn't have the Element interface.\n    if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n        return;\n    }\n\n    if (!(target instanceof getWindowOf(target).Element)) {\n        throw new TypeError('parameter 1 is not of type \"Element\".');\n    }\n\n    var observations = this.observations_;\n\n    // Do nothing if element is not being observed.\n    if (!observations.has(target)) {\n        return;\n    }\n\n    observations.delete(target);\n\n    if (!observations.size) {\n        this.controller_.removeObserver(this);\n    }\n};\n\n/**\n * Stops observing all elements.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.disconnect = function () {\n    this.clearActive();\n    this.observations_.clear();\n    this.controller_.removeObserver(this);\n};\n\n/**\n * Collects observation instances the associated element of which has changed\n * it's content rectangle.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.gatherActive = function () {\n        var this$1 = this;\n\n    this.clearActive();\n\n    this.observations_.forEach(function (observation) {\n        if (observation.isActive()) {\n            this$1.activeObservations_.push(observation);\n        }\n    });\n};\n\n/**\n * Invokes initial callback function with a list of ResizeObserverEntry\n * instances collected from active resize observations.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.broadcastActive = function () {\n    // Do nothing if observer doesn't have active observations.\n    if (!this.hasActive()) {\n        return;\n    }\n\n    var ctx = this.callbackCtx_;\n\n    // Create ResizeObserverEntry instance for every active observation.\n    var entries = this.activeObservations_.map(function (observation) {\n        return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n    });\n\n    this.callback_.call(ctx, entries, ctx);\n    this.clearActive();\n};\n\n/**\n * Clears the collection of active observations.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.clearActive = function () {\n    this.activeObservations_.splice(0);\n};\n\n/**\n * Tells whether observer has active observations.\n *\n * @returns {boolean}\n */\nResizeObserverSPI.prototype.hasActive = function () {\n    return this.activeObservations_.length > 0;\n};\n\n// Registry of internal observers. If WeakMap is not available use current shim\n// for the Map collection as it has all required methods and because WeakMap\n// can't be fully polyfilled anyway.\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\n\n/**\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\n * exposing only those methods and properties that are defined in the spec.\n */\nvar ResizeObserver = function(callback) {\n    if (!(this instanceof ResizeObserver)) {\n        throw new TypeError('Cannot call a class as a function.');\n    }\n    if (!arguments.length) {\n        throw new TypeError('1 argument required, but only 0 present.');\n    }\n\n    var controller = ResizeObserverController.getInstance();\n    var observer = new ResizeObserverSPI(callback, controller, this);\n\n    observers.set(this, observer);\n};\n\n// Expose public methods of ResizeObserver.\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n    ResizeObserver.prototype[method] = function () {\n        return (ref = observers.get(this))[method].apply(ref, arguments);\n        var ref;\n    };\n});\n\nvar index = (function () {\n    // Export existing implementation if available.\n    if (typeof global$1.ResizeObserver !== 'undefined') {\n        return global$1.ResizeObserver;\n    }\n\n    return ResizeObserver;\n})();\n\nreturn index;\n\n})));\n","import global from '../global';\nimport has from '../../core/has';\nexport default function wrapper(nameOnGlobal, constructor = false, bind = false) {\n    if (has('test')) {\n        if (constructor) {\n            return function (...args) {\n                return new global[nameOnGlobal](...args);\n            };\n        }\n        else {\n            return function (...args) {\n                return global[nameOnGlobal](...args);\n            };\n        }\n    }\n    return bind ? global[nameOnGlobal].bind(global) : global[nameOnGlobal];\n}\n//# sourceMappingURL=wrapper.mjs.map","import global from './global';\nvar isArrayLike = undefined;\n// !has('es6-iterator')\n// elided: import './iterator'\nimport has from '../core/has';\n// !has('es6-symbol')\n// elided: import './Symbol'\nexport let WeakMap = global.WeakMap;\nif (!true) {\n    const DELETED = {};\n    const getUID = function getUID() {\n        return Math.floor(Math.random() * 100000000);\n    };\n    const generateName = (function () {\n        let startId = Math.floor(Date.now() % 100000000);\n        return function generateName() {\n            return '__wm' + getUID() + (startId++ + '__');\n        };\n    })();\n    WeakMap = global.WeakMap = class WeakMap {\n        constructor(iterable) {\n            this[Symbol.toStringTag] = 'WeakMap';\n            this._name = generateName();\n            this._frozenEntries = [];\n            if (iterable) {\n                if (isArrayLike(iterable)) {\n                    for (let i = 0; i < iterable.length; i++) {\n                        const item = iterable[i];\n                        this.set(item[0], item[1]);\n                    }\n                }\n                else {\n                    for (const [key, value] of iterable) {\n                        this.set(key, value);\n                    }\n                }\n            }\n        }\n        _getFrozenEntryIndex(key) {\n            for (let i = 0; i < this._frozenEntries.length; i++) {\n                if (this._frozenEntries[i].key === key) {\n                    return i;\n                }\n            }\n            return -1;\n        }\n        delete(key) {\n            if (key === undefined || key === null) {\n                return false;\n            }\n            const entry = key[this._name];\n            if (entry && entry.key === key && entry.value !== DELETED) {\n                entry.value = DELETED;\n                return true;\n            }\n            const frozenIndex = this._getFrozenEntryIndex(key);\n            if (frozenIndex >= 0) {\n                this._frozenEntries.splice(frozenIndex, 1);\n                return true;\n            }\n            return false;\n        }\n        get(key) {\n            if (key === undefined || key === null) {\n                return undefined;\n            }\n            const entry = key[this._name];\n            if (entry && entry.key === key && entry.value !== DELETED) {\n                return entry.value;\n            }\n            const frozenIndex = this._getFrozenEntryIndex(key);\n            if (frozenIndex >= 0) {\n                return this._frozenEntries[frozenIndex].value;\n            }\n        }\n        has(key) {\n            if (key === undefined || key === null) {\n                return false;\n            }\n            const entry = key[this._name];\n            if (Boolean(entry && entry.key === key && entry.value !== DELETED)) {\n                return true;\n            }\n            const frozenIndex = this._getFrozenEntryIndex(key);\n            if (frozenIndex >= 0) {\n                return true;\n            }\n            return false;\n        }\n        set(key, value) {\n            if (!key || (typeof key !== 'object' && typeof key !== 'function')) {\n                throw new TypeError('Invalid value used as weak map key');\n            }\n            let entry = key[this._name];\n            if (!entry || entry.key !== key) {\n                entry = Object.create(null, {\n                    key: { value: key }\n                });\n                if (Object.isFrozen(key)) {\n                    this._frozenEntries.push(entry);\n                }\n                else {\n                    Object.defineProperty(key, this._name, {\n                        value: entry\n                    });\n                }\n            }\n            entry.value = value;\n            return this;\n        }\n    };\n}\nexport default WeakMap;","import has from '../core/has';\nimport { wrapNative } from './support/util';\n/**\n * The minimum location of high surrogates\n */\nexport const HIGH_SURROGATE_MIN = 0xd800;\n/**\n * The maximum location of high surrogates\n */\nexport const HIGH_SURROGATE_MAX = 0xdbff;\n/**\n * The minimum location of low surrogates\n */\nexport const LOW_SURROGATE_MIN = 0xdc00;\n/**\n * The maximum location of low surrogates\n */\nexport const LOW_SURROGATE_MAX = 0xdfff;\n/* ES6 static methods */\n/**\n * Return the String value whose elements are, in order, the elements in the List elements.\n * If length is 0, the empty string is returned.\n * @param codePoints The code points to generate the string\n */\nexport let fromCodePoint;\n/**\n * `raw` is intended for use as a tag function of a Tagged Template String. When called\n * as such the first argument will be a well formed template call site object and the rest\n * parameter will contain the substitution values.\n * @param template A well-formed template string call site representation.\n * @param substitutions A set of substitution values.\n */\nexport let raw;\n/* ES6 instance methods */\n/**\n * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point\n * value of the UTF-16 encoded code point starting at the string element at position pos in\n * the String resulting from converting this object to a String.\n * If there is no element at that position, the result is undefined.\n * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.\n */\nexport let codePointAt;\n/**\n * Returns true if the sequence of elements of searchString converted to a String is the\n * same as the corresponding elements of this object (converted to a String) starting at\n * endPosition – length(this). Otherwise returns false.\n */\nexport let endsWith;\n/**\n * Returns true if searchString appears as a substring of the result of converting this\n * object to a String, at one or more positions that are\n * greater than or equal to position; otherwise, returns false.\n * @param target The target string\n * @param searchString search string\n * @param position If position is undefined, 0 is assumed, so as to search all of the String.\n */\nexport let includes;\n/**\n * Returns the String value result of normalizing the string into the normalization form\n * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.\n * @param target The target string\n * @param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\n * is \"NFC\"\n */\nexport let normalize;\n/**\n * Returns a String value that is made from count copies appended together. If count is 0,\n * T is the empty String is returned.\n * @param count number of copies to append\n */\nexport let repeat;\n/**\n * Returns true if the sequence of elements of searchString converted to a String is the\n * same as the corresponding elements of this object (converted to a String) starting at\n * position. Otherwise returns false.\n */\nexport let startsWith;\n/* ES7 instance methods */\n/**\n * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.\n * The padding is applied from the end (right) of the current string.\n *\n * @param target The target string\n * @param maxLength The length of the resulting string once the current string has been padded.\n *        If this parameter is smaller than the current string's length, the current string will be returned as it is.\n *\n * @param fillString The string to pad the current string with.\n *        If this string is too long, it will be truncated and the left-most part will be applied.\n *        The default value for this parameter is \" \" (U+0020).\n */\nexport let padEnd;\n/**\n * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.\n * The padding is applied from the start (left) of the current string.\n *\n * @param target The target string\n * @param maxLength The length of the resulting string once the current string has been padded.\n *        If this parameter is smaller than the current string's length, the current string will be returned as it is.\n *\n * @param fillString The string to pad the current string with.\n *        If this string is too long, it will be truncated and the left-most part will be applied.\n *        The default value for this parameter is \" \" (U+0020).\n */\nexport let padStart;\nif (!true) {\n    /**\n     * Validates that text is defined, and normalizes position (based on the given default if the input is NaN).\n     * Used by startsWith, includes, and endsWith.\n     *\n     * @return Normalized position.\n     */\n    const normalizeSubstringArgs = function (name, text, search, position, isEnd = false) {\n        if (text == null) {\n            throw new TypeError('string.' + name + ' requires a valid string to search against.');\n        }\n        const length = text.length;\n        position = position !== position ? (isEnd ? length : 0) : position;\n        return [text, String(search), Math.min(Math.max(position, 0), length)];\n    };\n    String.fromCodePoint = function fromCodePoint(...codePoints) {\n        // Adapted from https://github.com/mathiasbynens/String.fromCodePoint\n        const length = arguments.length;\n        if (!length) {\n            return '';\n        }\n        const fromCharCode = String.fromCharCode;\n        const MAX_SIZE = 0x4000;\n        let codeUnits = [];\n        let index = -1;\n        let result = '';\n        while (++index < length) {\n            let codePoint = Number(arguments[index]);\n            // Code points must be finite integers within the valid range\n            let isValid = isFinite(codePoint) && Math.floor(codePoint) === codePoint && codePoint >= 0 && codePoint <= 0x10ffff;\n            if (!isValid) {\n                throw RangeError('string.fromCodePoint: Invalid code point ' + codePoint);\n            }\n            if (codePoint <= 0xffff) {\n                // BMP code point\n                codeUnits.push(codePoint);\n            }\n            else {\n                // Astral code point; split in surrogate halves\n                // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n                codePoint -= 0x10000;\n                let highSurrogate = (codePoint >> 10) + HIGH_SURROGATE_MIN;\n                let lowSurrogate = (codePoint % 0x400) + LOW_SURROGATE_MIN;\n                codeUnits.push(highSurrogate, lowSurrogate);\n            }\n            if (index + 1 === length || codeUnits.length > MAX_SIZE) {\n                result += fromCharCode.apply(null, codeUnits);\n                codeUnits.length = 0;\n            }\n        }\n        return result;\n    };\n    String.prototype.codePointAt = function codePointAt(position = 0) {\n        // Adapted from https://github.com/mathiasbynens/String.prototype.codePointAt\n        if (this == null) {\n            throw new TypeError('string.codePointAt requries a valid string.');\n        }\n        const length = this.length;\n        if (position !== position) {\n            position = 0;\n        }\n        if (position < 0 || position >= length) {\n            return undefined;\n        }\n        // Get the first code unit\n        const first = this.charCodeAt(position);\n        if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > position + 1) {\n            // Start of a surrogate pair (high surrogate and there is a next code unit); check for low surrogate\n            // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n            const second = this.charCodeAt(position + 1);\n            if (second >= LOW_SURROGATE_MIN && second <= LOW_SURROGATE_MAX) {\n                return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;\n            }\n        }\n        return first;\n    };\n    String.prototype.endsWith = function endsWith(search, endPosition) {\n        let text = this.toString();\n        if (search === '') {\n            return true;\n        }\n        if (typeof endPosition === 'undefined') {\n            endPosition = text.length;\n        }\n        else if (endPosition === null || isNaN(endPosition)) {\n            return false;\n        }\n        [text, search, endPosition] = normalizeSubstringArgs('endsWith', text, search, endPosition, true);\n        const start = endPosition - search.length;\n        if (start < 0) {\n            return false;\n        }\n        return text.slice(start, endPosition) === search;\n    };\n    String.prototype.includes = function includes(search, position = 0) {\n        let text = this.toString();\n        [text, search, position] = normalizeSubstringArgs('includes', text, search, position);\n        return text.indexOf(search, position) !== -1;\n    };\n    String.prototype.repeat = function repeat(count = 0) {\n        // Adapted from https://github.com/mathiasbynens/String.prototype.repeat\n        let text = this.toString();\n        if (text == null) {\n            throw new TypeError('string.repeat requires a valid string.');\n        }\n        if (count !== count) {\n            count = 0;\n        }\n        if (count < 0 || count === Infinity) {\n            throw new RangeError('string.repeat requires a non-negative finite count.');\n        }\n        let result = '';\n        while (count) {\n            if (count % 2) {\n                result += text;\n            }\n            if (count > 1) {\n                text += text;\n            }\n            count >>= 1;\n        }\n        return result;\n    };\n    String.prototype.startsWith = function startsWith(search, position = 0) {\n        let text = this.toString();\n        search = String(search);\n        [text, search, position] = normalizeSubstringArgs('startsWith', text, search, position);\n        const end = position + search.length;\n        if (end > text.length) {\n            return false;\n        }\n        return text.slice(position, end) === search;\n    };\n}\nif (!true) {\n    String.raw = function raw(callSite, ...substitutions) {\n        let rawStrings = callSite.raw;\n        let result = '';\n        let numSubstitutions = substitutions.length;\n        if (callSite == null || callSite.raw == null) {\n            throw new TypeError('string.raw requires a valid callSite object with a raw value');\n        }\n        for (let i = 0, length = rawStrings.length; i < length; i++) {\n            result += rawStrings[i] + (i < numSubstitutions && i < length - 1 ? substitutions[i] : '');\n        }\n        return result;\n    };\n}\nif (!true) {\n    String.prototype.padEnd = function padEnd(maxLength, fillString = ' ') {\n        if (this === null || this === undefined) {\n            throw new TypeError('string.repeat requires a valid string.');\n        }\n        if (maxLength === Infinity) {\n            throw new RangeError('string.padEnd requires a non-negative finite count.');\n        }\n        if (maxLength === null || maxLength === undefined || maxLength < 0) {\n            maxLength = 0;\n        }\n        let strText = String(this);\n        const padding = maxLength - strText.length;\n        if (padding > 0) {\n            strText +=\n                repeat(fillString, Math.floor(padding / fillString.length)) +\n                    fillString.slice(0, padding % fillString.length);\n        }\n        return strText;\n    };\n    String.prototype.padStart = function padStart(maxLength, fillString = ' ') {\n        if (this === null || this === undefined) {\n            throw new TypeError('string.repeat requires a valid string.');\n        }\n        if (maxLength === Infinity) {\n            throw new RangeError('string.padStart requires a non-negative finite count.');\n        }\n        if (maxLength === null || maxLength === undefined || maxLength < 0) {\n            maxLength = 0;\n        }\n        let strText = String(this);\n        const padding = maxLength - strText.length;\n        if (padding > 0) {\n            strText =\n                repeat(fillString, Math.floor(padding / fillString.length)) +\n                    fillString.slice(0, padding % fillString.length) +\n                    strText;\n        }\n        return strText;\n    };\n}\nfromCodePoint = String.fromCodePoint;\nraw = String.raw;\ncodePointAt = wrapNative(String.prototype.codePointAt);\nendsWith = wrapNative(String.prototype.endsWith);\nincludes = wrapNative(String.prototype.includes);\nnormalize = wrapNative(String.prototype.normalize);\nrepeat = wrapNative(String.prototype.repeat);\nstartsWith = wrapNative(String.prototype.startsWith);\npadEnd = wrapNative(String.prototype.padEnd);\npadStart = wrapNative(String.prototype.padStart);\nexport default String;\n//# sourceMappingURL=string.mjs.map","var _a;\nvar isArrayLike = undefined, ShimIterator = undefined;\n// !has('es6-iterator')\n// elided: import './iterator'\nimport global from './global';\nimport { is as objectIs } from './object';\nimport has from '../core/has';\n// !has('es6-symbol')\n// elided: import './Symbol'\nexport let Map = global.Map;\nif (!true) {\n    Map = global.Map = (_a = class Map {\n            constructor(iterable) {\n                this._keys = [];\n                this._values = [];\n                this[Symbol.toStringTag] = 'Map';\n                if (iterable) {\n                    if (isArrayLike(iterable)) {\n                        for (let i = 0; i < iterable.length; i++) {\n                            const value = iterable[i];\n                            this.set(value[0], value[1]);\n                        }\n                    }\n                    else {\n                        for (const value of iterable) {\n                            this.set(value[0], value[1]);\n                        }\n                    }\n                }\n            }\n            /**\n             * An alternative to Array.prototype.indexOf using Object.is\n             * to check for equality. See http://mzl.la/1zuKO2V\n             */\n            _indexOfKey(keys, key) {\n                for (let i = 0, length = keys.length; i < length; i++) {\n                    if (objectIs(keys[i], key)) {\n                        return i;\n                    }\n                }\n                return -1;\n            }\n            get size() {\n                return this._keys.length;\n            }\n            clear() {\n                this._keys.length = this._values.length = 0;\n            }\n            delete(key) {\n                const index = this._indexOfKey(this._keys, key);\n                if (index < 0) {\n                    return false;\n                }\n                this._keys.splice(index, 1);\n                this._values.splice(index, 1);\n                return true;\n            }\n            entries() {\n                const values = this._keys.map((key, i) => {\n                    return [key, this._values[i]];\n                });\n                return new ShimIterator(values);\n            }\n            forEach(callback, context) {\n                const keys = this._keys;\n                const values = this._values;\n                for (let i = 0, length = keys.length; i < length; i++) {\n                    callback.call(context, values[i], keys[i], this);\n                }\n            }\n            get(key) {\n                const index = this._indexOfKey(this._keys, key);\n                return index < 0 ? undefined : this._values[index];\n            }\n            has(key) {\n                return this._indexOfKey(this._keys, key) > -1;\n            }\n            keys() {\n                return new ShimIterator(this._keys);\n            }\n            set(key, value) {\n                let index = this._indexOfKey(this._keys, key);\n                index = index < 0 ? this._keys.length : index;\n                this._keys[index] = key;\n                this._values[index] = value;\n                return this;\n            }\n            values() {\n                return new ShimIterator(this._values);\n            }\n            [Symbol.iterator]() {\n                return this.entries();\n            }\n        },\n        _a[Symbol.species] = _a,\n        _a);\n}\nexport default Map;","import has from '../core/has';\nexport let assign;\n/**\n * Gets the own property descriptor of the specified object.\n * An own property descriptor is one that is defined directly on the object and is not\n * inherited from the object's prototype.\n * @param o Object that contains the property.\n * @param p Name of the property.\n */\nexport let getOwnPropertyDescriptor;\n/**\n * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly\n * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.\n * @param o Object that contains the own properties.\n */\nexport let getOwnPropertyNames;\n/**\n * Returns an array of all symbol properties found directly on object o.\n * @param o Object to retrieve the symbols from.\n */\nexport let getOwnPropertySymbols;\n/**\n * Returns true if the values are the same value, false otherwise.\n * @param value1 The first value.\n * @param value2 The second value.\n */\nexport let is;\n/**\n * Returns the names of the enumerable properties and methods of an object.\n * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\n */\nexport let keys;\n/* ES7 Object static methods */\nexport let getOwnPropertyDescriptors;\nexport let entries;\nexport let values;\nif (!true) {\n    const keys = Object.keys.bind(Object);\n    Object.keys = function symbolAwareKeys(o) {\n        return keys(o).filter((key) => !Boolean(key.match(/^@@.+/)));\n    };\n    Object.assign = function assign(target, ...sources) {\n        if (target == null) {\n            // TypeError if undefined or null\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n        const to = Object(target);\n        sources.forEach((nextSource) => {\n            if (nextSource) {\n                // Skip over if undefined or null\n                keys(nextSource).forEach((nextKey) => {\n                    to[nextKey] = nextSource[nextKey];\n                });\n            }\n        });\n        return to;\n    };\n    const getOwnPropertyNames = Object.getOwnPropertyNames.bind(Object);\n    Object.getOwnPropertyNames = function symbolAwareGetOwnPropertyNames(o) {\n        return getOwnPropertyNames(o).filter((key) => !Boolean(key.match(/^@@.+/)));\n    };\n    Object.getOwnPropertySymbols = function getOwnPropertySymbols(o) {\n        return getOwnPropertyNames(o)\n            .filter((key) => Boolean(key.match(/^@@.+/)))\n            .map((key) => Symbol.for(key.substring(2)));\n    };\n    Object.is = function is(value1, value2) {\n        if (value1 === value2) {\n            return value1 !== 0 || 1 / value1 === 1 / value2; // -0\n        }\n        return value1 !== value1 && value2 !== value2; // NaN\n    };\n}\nif (!true) {\n    Object.getOwnPropertyDescriptors = function getOwnPropertyDescriptors(o) {\n        return Object.getOwnPropertyNames(o).reduce((previous, key) => {\n            previous[key] = Object.getOwnPropertyDescriptor(o, key);\n            return previous;\n        }, {});\n    };\n    Object.entries = function entries(o) {\n        return keys(o).map((key) => [key, o[key]]);\n    };\n    Object.values = function values(o) {\n        return keys(o).map((key) => o[key]);\n    };\n}\nassign = Object.assign;\ngetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\ngetOwnPropertyNames = Object.getOwnPropertyNames;\ngetOwnPropertySymbols = Object.getOwnPropertySymbols;\nis = Object.is;\nkeys = Object.keys;\ngetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;\nentries = Object.entries;\nvalues = Object.values;\nexport default Object;\n//# sourceMappingURL=object.mjs.map","var isArrayLike = undefined, isIterable = undefined;\n// !has('es6-iterator')\n// elided: import './iterator'\nimport has from '../core/has';\nimport { wrapNative } from './support/util';\nexport let from;\nexport let of;\nexport let copyWithin;\nexport let fill;\nexport let find;\nexport let findIndex;\nexport let includes;\nexport let flat;\nexport let flatMap;\nlet toLength;\nlet toInteger;\nlet normalizeOffset;\nif (!true || !true || !true) {\n    const MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;\n    /**\n     * Ensures a non-negative, non-infinite, safe integer.\n     *\n     * @param length The number to validate\n     * @return A proper length\n     */\n    toLength = function toLength(length) {\n        if (isNaN(length)) {\n            return 0;\n        }\n        length = Number(length);\n        if (isFinite(length)) {\n            length = Math.floor(length);\n        }\n        // Ensure a non-negative, real, safe integer\n        return Math.min(Math.max(length, 0), MAX_SAFE_INTEGER);\n    };\n    /**\n     * From ES6 7.1.4 ToInteger()\n     *\n     * @param value A value to convert\n     * @return An integer\n     */\n    toInteger = function toInteger(value) {\n        value = Number(value);\n        if (isNaN(value)) {\n            return 0;\n        }\n        if (value === 0 || !isFinite(value)) {\n            return value;\n        }\n        return (value > 0 ? 1 : -1) * Math.floor(Math.abs(value));\n    };\n    /**\n     * Normalizes an offset against a given length, wrapping it if negative.\n     *\n     * @param value The original offset\n     * @param length The total length to normalize against\n     * @return If negative, provide a distance from the end (length); otherwise provide a distance from 0\n     */\n    normalizeOffset = function normalizeOffset(value, length) {\n        return value < 0 ? Math.max(length + value, 0) : Math.min(value, length);\n    };\n}\nif (!true) {\n    Array.from = function from(arrayLike, mapFunction, thisArg) {\n        if (arrayLike == null) {\n            throw new TypeError('from: requires an array-like object');\n        }\n        if (mapFunction && thisArg) {\n            mapFunction = mapFunction.bind(thisArg);\n        }\n        /* tslint:disable-next-line:variable-name */\n        const Constructor = this;\n        const length = toLength(arrayLike.length);\n        // Support extension\n        const array = typeof Constructor === 'function' ? Object(new Constructor(length)) : new Array(length);\n        if (!isArrayLike(arrayLike) && !isIterable(arrayLike)) {\n            return array;\n        }\n        // if this is an array and the normalized length is 0, just return an empty array. this prevents a problem\n        // with the iteration on IE when using a NaN array length.\n        if (isArrayLike(arrayLike)) {\n            if (length === 0) {\n                return [];\n            }\n            for (let i = 0; i < arrayLike.length; i++) {\n                array[i] = mapFunction ? mapFunction(arrayLike[i], i) : arrayLike[i];\n            }\n        }\n        else {\n            let i = 0;\n            for (const value of arrayLike) {\n                array[i] = mapFunction ? mapFunction(value, i) : value;\n                i++;\n            }\n        }\n        if (arrayLike.length !== undefined) {\n            array.length = length;\n        }\n        return array;\n    };\n    Array.of = function of(...items) {\n        return Array.prototype.slice.call(items);\n    };\n    Array.prototype.copyWithin = function copyWithin(offset, start, end) {\n        if (this == null) {\n            throw new TypeError('copyWithin: target must be an array-like object');\n        }\n        const length = toLength(this.length);\n        offset = normalizeOffset(toInteger(offset), length);\n        start = normalizeOffset(toInteger(start), length);\n        end = normalizeOffset(end === undefined ? length : toInteger(end), length);\n        let count = Math.min(end - start, length - offset);\n        let direction = 1;\n        if (offset > start && offset < start + count) {\n            direction = -1;\n            start += count - 1;\n            offset += count - 1;\n        }\n        while (count > 0) {\n            if (start in this) {\n                this[offset] = this[start];\n            }\n            else {\n                delete this[offset];\n            }\n            offset += direction;\n            start += direction;\n            count--;\n        }\n        return this;\n    };\n    Array.prototype.find = function find(callback, thisArg) {\n        const index = this.findIndex(callback, thisArg);\n        return index !== -1 ? this[index] : undefined;\n    };\n    Array.prototype.findIndex = function findIndex(callback, thisArg) {\n        const length = toLength(this.length);\n        if (!callback) {\n            throw new TypeError('find: second argument must be a function');\n        }\n        if (thisArg) {\n            callback = callback.bind(thisArg);\n        }\n        for (let i = 0; i < length; i++) {\n            if (callback(this[i], i, this)) {\n                return i;\n            }\n        }\n        return -1;\n    };\n}\nif (!true) {\n    Array.prototype.fill = function fill(value, start, end) {\n        const length = toLength(this.length);\n        let i = normalizeOffset(toInteger(start), length);\n        end = normalizeOffset(end === undefined ? length : toInteger(end), length);\n        while (i < (end || 0)) {\n            this[i++] = value;\n        }\n        return this;\n    };\n}\nif (!true) {\n    Array.prototype.includes = function includes(searchElement, fromIndex = 0) {\n        let len = toLength(this.length);\n        for (let i = fromIndex; i < len; ++i) {\n            const currentElement = this[i];\n            if (searchElement === currentElement ||\n                (searchElement !== searchElement && currentElement !== currentElement)) {\n                return true;\n            }\n        }\n        return false;\n    };\n}\nif (!true) {\n    Array.prototype.flat = function flat(depth = 1) {\n        return depth > 0\n            ? this.reduce((acc, val) => acc.concat(Array.isArray(val) ? val.flat(depth - 1) : val), [])\n            : this.slice();\n    };\n    Array.prototype.flatMap = function flatMap(callback) {\n        return this.map(callback).flat();\n    };\n}\nfrom = Array.from;\nof = Array.of;\ncopyWithin = wrapNative(Array.prototype.copyWithin);\nfill = wrapNative(Array.prototype.fill);\nfind = wrapNative(Array.prototype.find);\nflat = wrapNative(Array.prototype.flat);\nflatMap = wrapNative(Array.prototype.flatMap);\nfindIndex = wrapNative(Array.prototype.findIndex);\nincludes = wrapNative(Array.prototype.includes);\nexport default Array;","/**\n * Helper function to generate a value property descriptor\n *\n * @param value        The value the property descriptor should be set to\n * @param enumerable   If the property should be enumberable, defaults to false\n * @param writable     If the property should be writable, defaults to true\n * @param configurable If the property should be configurable, defaults to true\n * @return             The property descriptor object\n */\nexport function getValueDescriptor(value, enumerable = false, writable = true, configurable = true) {\n    return {\n        value: value,\n        enumerable: enumerable,\n        writable: writable,\n        configurable: configurable\n    };\n}\nexport function wrapNative(nativeFunction) {\n    return function (target, ...args) {\n        return nativeFunction.apply(target, args);\n    };\n}\n//# sourceMappingURL=util.mjs.map","import Promise from '../shim/Promise';\nimport Map from '../shim/Map';\nimport { Evented } from '../core/Evented';\n/**\n * Widget base type\n */\nexport const WIDGET_BASE_TYPE = '__widget_base_type';\n/**\n * Checks is the item is a subclass of WidgetBase (or a WidgetBase)\n *\n * @param item the item to check\n * @returns true/false indicating if the item is a WidgetBaseConstructor\n */\nexport function isWidgetBaseConstructor(item) {\n    return Boolean(item && item._type === WIDGET_BASE_TYPE);\n}\nexport function isWidgetFunction(item) {\n    return Boolean(item && item.isWidget);\n}\nexport function isWNodeFactory(node) {\n    if (typeof node === 'function' && node.isFactory) {\n        return true;\n    }\n    return false;\n}\nexport function isWidget(item) {\n    return isWidgetBaseConstructor(item) || isWidgetFunction(item);\n}\nexport function isWidgetConstructorDefaultExport(item) {\n    return Boolean(item &&\n        item.hasOwnProperty('__esModule') &&\n        item.hasOwnProperty('default') &&\n        (isWidget(item.default) || isWNodeFactory(item.default)));\n}\n/**\n * The Registry implementation\n */\nexport class Registry extends Evented {\n    /**\n     * Emit loaded event for registry label\n     */\n    emitLoadedEvent(widgetLabel, item) {\n        this.emit({\n            type: widgetLabel,\n            action: 'loaded',\n            item\n        });\n    }\n    define(label, item) {\n        if (this._widgetRegistry === undefined) {\n            this._widgetRegistry = new Map();\n        }\n        if (this._widgetRegistry.has(label)) {\n            throw new Error(`widget has already been registered for '${label.toString()}'`);\n        }\n        this._widgetRegistry.set(label, item);\n        if (item instanceof Promise) {\n            item.then((widgetCtor) => {\n                this._widgetRegistry.set(label, widgetCtor);\n                this.emitLoadedEvent(label, widgetCtor);\n                return widgetCtor;\n            }, (error) => {\n                throw error;\n            });\n        }\n        else if (isWidgetBaseConstructor(item)) {\n            this.emitLoadedEvent(label, item);\n        }\n    }\n    defineInjector(label, injectorFactory) {\n        if (this._injectorRegistry === undefined) {\n            this._injectorRegistry = new Map();\n        }\n        if (this._injectorRegistry.has(label)) {\n            throw new Error(`injector has already been registered for '${label.toString()}'`);\n        }\n        const invalidator = new Evented();\n        const injectorItem = {\n            injector: injectorFactory(() => invalidator.emit({ type: 'invalidate' })),\n            invalidator\n        };\n        this._injectorRegistry.set(label, injectorItem);\n        this.emitLoadedEvent(label, injectorItem);\n    }\n    get(label) {\n        if (!this._widgetRegistry || !this.has(label)) {\n            return null;\n        }\n        const item = this._widgetRegistry.get(label);\n        if (isWidget(item) || isWNodeFactory(item)) {\n            return item;\n        }\n        if (item instanceof Promise) {\n            return null;\n        }\n        const promise = item();\n        this._widgetRegistry.set(label, promise);\n        promise.then((widgetCtor) => {\n            if (isWidgetConstructorDefaultExport(widgetCtor)) {\n                widgetCtor = widgetCtor.default;\n            }\n            this._widgetRegistry.set(label, widgetCtor);\n            this.emitLoadedEvent(label, widgetCtor);\n            return widgetCtor;\n        }, (error) => {\n            throw error;\n        });\n        return null;\n    }\n    getInjector(label) {\n        if (!this._injectorRegistry || !this.hasInjector(label)) {\n            return null;\n        }\n        return this._injectorRegistry.get(label);\n    }\n    has(label) {\n        return Boolean(this._widgetRegistry && this._widgetRegistry.has(label));\n    }\n    hasInjector(label) {\n        return Boolean(this._injectorRegistry && this._injectorRegistry.has(label));\n    }\n}\nexport default Registry;\n//# sourceMappingURL=Registry.mjs.map","var _a;\nimport global from './global';\nvar queueMicroTask = undefined;\n// !has('microtasks')\n// elided: import './support/queue'\n// !has('es6-symbol')\n// elided: import './Symbol'\nimport has from '../core/has';\nexport let ShimPromise = global.Promise;\nexport const isThenable = function isThenable(value) {\n    return value && typeof value.then === 'function';\n};\nif (!true) {\n    global.Promise = ShimPromise = (_a = class Promise {\n            /**\n             * Creates a new Promise.\n             *\n             * @constructor\n             *\n             * @param executor\n             * The executor function is called immediately when the Promise is instantiated. It is responsible for\n             * starting the asynchronous operation when it is invoked.\n             *\n             * The executor must call either the passed `resolve` function when the asynchronous operation has completed\n             * successfully, or the `reject` function when the operation fails.\n             */\n            constructor(executor) {\n                /**\n                 * The current state of this promise.\n                 */\n                this.state = 1 /* Pending */;\n                this[Symbol.toStringTag] = 'Promise';\n                /**\n                 * If true, the resolution of this promise is chained (\"locked in\") to another promise.\n                 */\n                let isChained = false;\n                /**\n                 * Whether or not this promise is in a resolved state.\n                 */\n                const isResolved = () => {\n                    return this.state !== 1 /* Pending */ || isChained;\n                };\n                /**\n                 * Callbacks that should be invoked once the asynchronous operation has completed.\n                 */\n                let callbacks = [];\n                /**\n                 * Initially pushes callbacks onto a queue for execution once this promise settles. After the promise settles,\n                 * enqueues callbacks for execution on the next event loop turn.\n                 */\n                let whenFinished = function (callback) {\n                    if (callbacks) {\n                        callbacks.push(callback);\n                    }\n                };\n                /**\n                 * Settles this promise.\n                 *\n                 * @param newState The resolved state for this promise.\n                 * @param {T|any} value The resolved value for this promise.\n                 */\n                const settle = (newState, value) => {\n                    // A promise can only be settled once.\n                    if (this.state !== 1 /* Pending */) {\n                        return;\n                    }\n                    this.state = newState;\n                    this.resolvedValue = value;\n                    whenFinished = queueMicroTask;\n                    // Only enqueue a callback runner if there are callbacks so that initially fulfilled Promises don't have to\n                    // wait an extra turn.\n                    if (callbacks && callbacks.length > 0) {\n                        queueMicroTask(function () {\n                            if (callbacks) {\n                                let count = callbacks.length;\n                                for (let i = 0; i < count; ++i) {\n                                    callbacks[i].call(null);\n                                }\n                                callbacks = null;\n                            }\n                        });\n                    }\n                };\n                /**\n                 * Resolves this promise.\n                 *\n                 * @param newState The resolved state for this promise.\n                 * @param {T|any} value The resolved value for this promise.\n                 */\n                const resolve = (newState, value) => {\n                    if (isResolved()) {\n                        return;\n                    }\n                    if (isThenable(value)) {\n                        value.then(settle.bind(null, 0 /* Fulfilled */), settle.bind(null, 2 /* Rejected */));\n                        isChained = true;\n                    }\n                    else {\n                        settle(newState, value);\n                    }\n                };\n                this.then = (onFulfilled, onRejected) => {\n                    return new Promise((resolve, reject) => {\n                        // whenFinished initially queues up callbacks for execution after the promise has settled. Once the\n                        // promise has settled, whenFinished will schedule callbacks for execution on the next turn through the\n                        // event loop.\n                        whenFinished(() => {\n                            const callback = this.state === 2 /* Rejected */ ? onRejected : onFulfilled;\n                            if (typeof callback === 'function') {\n                                try {\n                                    resolve(callback(this.resolvedValue));\n                                }\n                                catch (error) {\n                                    reject(error);\n                                }\n                            }\n                            else if (this.state === 2 /* Rejected */) {\n                                reject(this.resolvedValue);\n                            }\n                            else {\n                                resolve(this.resolvedValue);\n                            }\n                        });\n                    });\n                };\n                try {\n                    executor(resolve.bind(null, 0 /* Fulfilled */), resolve.bind(null, 2 /* Rejected */));\n                }\n                catch (error) {\n                    settle(2 /* Rejected */, error);\n                }\n            }\n            static all(iterable) {\n                return new this(function (resolve, reject) {\n                    const values = [];\n                    let complete = 0;\n                    let total = 0;\n                    let populating = true;\n                    function fulfill(index, value) {\n                        values[index] = value;\n                        ++complete;\n                        finish();\n                    }\n                    function finish() {\n                        if (populating || complete < total) {\n                            return;\n                        }\n                        resolve(values);\n                    }\n                    function processItem(index, item) {\n                        ++total;\n                        if (isThenable(item)) {\n                            // If an item Promise rejects, this Promise is immediately rejected with the item\n                            // Promise's rejection error.\n                            item.then(fulfill.bind(null, index), reject);\n                        }\n                        else {\n                            Promise.resolve(item).then(fulfill.bind(null, index));\n                        }\n                    }\n                    let i = 0;\n                    for (const value of iterable) {\n                        processItem(i, value);\n                        i++;\n                    }\n                    populating = false;\n                    finish();\n                });\n            }\n            static race(iterable) {\n                return new this(function (resolve, reject) {\n                    for (const item of iterable) {\n                        if (item instanceof Promise) {\n                            // If a Promise item rejects, this Promise is immediately rejected with the item\n                            // Promise's rejection error.\n                            item.then(resolve, reject);\n                        }\n                        else {\n                            Promise.resolve(item).then(resolve);\n                        }\n                    }\n                });\n            }\n            static reject(reason) {\n                return new this(function (resolve, reject) {\n                    reject(reason);\n                });\n            }\n            static resolve(value) {\n                return new this(function (resolve) {\n                    resolve(value);\n                });\n            }\n            catch(onRejected) {\n                return this.then(undefined, onRejected);\n            }\n        },\n        _a[Symbol.species] = ShimPromise,\n        _a);\n    // this cast is needed in order to omit finally in the class declaration; this was done so the finally code\n    // is not duplicated and always added in the conditional below\n}\nif (!has('es2018-promise-finally')) {\n    global.Promise.prototype.finally = function (onFinally) {\n        return this.then(onFinally && ((value) => Promise.resolve(onFinally()).then(() => value)), onFinally &&\n            ((reason) => Promise.resolve(onFinally()).then(() => {\n                throw reason;\n            })));\n    };\n}\nexport default ShimPromise;","import Map from '../shim/Map';\nimport { Destroyable } from './Destroyable';\n/**\n * Map of computed regular expressions, keyed by string\n */\nconst regexMap = new Map();\n/**\n * Determines if the event type glob has been matched\n *\n * @returns boolean that indicates if the glob is matched\n */\nexport function isGlobMatch(globString, targetString) {\n    if (typeof targetString === 'string' && typeof globString === 'string' && globString.indexOf('*') !== -1) {\n        let regex;\n        if (regexMap.has(globString)) {\n            regex = regexMap.get(globString);\n        }\n        else {\n            regex = new RegExp(`^${globString.replace(/\\*/g, '.*')}$`);\n            regexMap.set(globString, regex);\n        }\n        return regex.test(targetString);\n    }\n    else {\n        return globString === targetString;\n    }\n}\n/**\n * Event Class\n */\nexport class Evented extends Destroyable {\n    constructor() {\n        super(...arguments);\n        /**\n         * map of listeners keyed by event type\n         */\n        this.listenersMap = new Map();\n    }\n    emit(event) {\n        this.listenersMap.forEach((methods, type) => {\n            if (isGlobMatch(type, event.type)) {\n                [...methods].forEach((method) => {\n                    method.call(this, event);\n                });\n            }\n        });\n    }\n    on(type, listener) {\n        if (Array.isArray(listener)) {\n            const handles = listener.map((listener) => this._addListener(type, listener));\n            return {\n                destroy() {\n                    handles.forEach((handle) => handle.destroy());\n                }\n            };\n        }\n        return this._addListener(type, listener);\n    }\n    _addListener(type, listener) {\n        const listeners = this.listenersMap.get(type) || [];\n        listeners.push(listener);\n        this.listenersMap.set(type, listeners);\n        return {\n            destroy: () => {\n                const listeners = this.listenersMap.get(type) || [];\n                listeners.splice(listeners.indexOf(listener), 1);\n            }\n        };\n    }\n}\nexport default Evented;\n//# sourceMappingURL=Evented.mjs.map","import Promise from '../shim/Promise';\n/**\n * No op function used to replace a Destroyable instance's `destroy` method, once the instance has been destroyed\n */\nfunction noop() {\n    return Promise.resolve(false);\n}\n/**\n * No op function used to replace a Destroyable instance's `own` method, once the instance has been destroyed\n */\nfunction destroyed() {\n    throw new Error('Call made to destroyed method');\n}\nexport class Destroyable {\n    /**\n     * @constructor\n     */\n    constructor() {\n        this.handles = [];\n    }\n    /**\n     * Register handles for the instance that will be destroyed when `this.destroy` is called\n     *\n     * @param {Handle} handle The handle to add for the instance\n     * @returns {Handle} A wrapper Handle. When the wrapper Handle's `destroy` method is invoked, the original handle is\n     *                   removed from the instance, and its `destroy` method is invoked.\n     */\n    own(handle) {\n        const { handles: _handles } = this;\n        _handles.push(handle);\n        return {\n            destroy() {\n                _handles.splice(_handles.indexOf(handle));\n                handle.destroy();\n            }\n        };\n    }\n    /**\n     * Destroys all handlers registered for the instance\n     *\n     * @returns {Promise<any} A Promise that resolves once all handles have been destroyed\n     */\n    destroy() {\n        return new Promise((resolve) => {\n            this.handles.forEach((handle) => {\n                handle && handle.destroy && handle.destroy();\n            });\n            this.destroy = noop;\n            this.own = destroyed;\n            resolve(true);\n        });\n    }\n}\nexport default Destroyable;\n//# sourceMappingURL=Destroyable.mjs.map","var _a;\nimport global from './global';\nvar isArrayLike = undefined, ShimIterator = undefined;\n// !has('es6-iterator')\n// elided: import './iterator'\nimport has from '../core/has';\n// !has('es6-symbol')\n// elided: import './Symbol'\nexport let Set = global.Set;\nif (!true) {\n    Set = global.Set = (_a = class Set {\n            constructor(iterable) {\n                this._setData = [];\n                this[Symbol.toStringTag] = 'Set';\n                if (iterable) {\n                    if (isArrayLike(iterable)) {\n                        for (let i = 0; i < iterable.length; i++) {\n                            this.add(iterable[i]);\n                        }\n                    }\n                    else {\n                        for (const value of iterable) {\n                            this.add(value);\n                        }\n                    }\n                }\n            }\n            add(value) {\n                if (this.has(value)) {\n                    return this;\n                }\n                this._setData.push(value);\n                return this;\n            }\n            clear() {\n                this._setData.length = 0;\n            }\n            delete(value) {\n                const idx = this._setData.indexOf(value);\n                if (idx === -1) {\n                    return false;\n                }\n                this._setData.splice(idx, 1);\n                return true;\n            }\n            entries() {\n                return new ShimIterator(this._setData.map((value) => [value, value]));\n            }\n            forEach(callbackfn, thisArg) {\n                const iterator = this.values();\n                let result = iterator.next();\n                while (!result.done) {\n                    callbackfn.call(thisArg, result.value, result.value, this);\n                    result = iterator.next();\n                }\n            }\n            has(value) {\n                return this._setData.indexOf(value) > -1;\n            }\n            keys() {\n                return new ShimIterator(this._setData);\n            }\n            get size() {\n                return this._setData.length;\n            }\n            values() {\n                return new ShimIterator(this._setData);\n            }\n            [Symbol.iterator]() {\n                return new ShimIterator(this._setData);\n            }\n        },\n        _a[Symbol.species] = _a,\n        _a);\n}\nexport default Set;","import { WIDGET_BASE_TYPE } from './Registry';\nfunction isObjectOrArray(value) {\n    return Object.prototype.toString.call(value) === '[object Object]' || Array.isArray(value);\n}\nexport function always(previousProperty, newProperty) {\n    return {\n        changed: true,\n        value: newProperty\n    };\n}\nexport function ignore(previousProperty, newProperty) {\n    return {\n        changed: false,\n        value: newProperty\n    };\n}\nexport function reference(previousProperty, newProperty) {\n    return {\n        changed: previousProperty !== newProperty,\n        value: newProperty\n    };\n}\nexport function shallow(previousProperty, newProperty, depth = 0) {\n    let changed = false;\n    const validOldProperty = previousProperty && isObjectOrArray(previousProperty);\n    const validNewProperty = newProperty && isObjectOrArray(newProperty);\n    if (!validOldProperty || !validNewProperty) {\n        return {\n            changed: true,\n            value: newProperty\n        };\n    }\n    const previousKeys = Object.keys(previousProperty);\n    const newKeys = Object.keys(newProperty);\n    if (previousKeys.length !== newKeys.length) {\n        changed = true;\n    }\n    else {\n        changed = newKeys.some((key) => {\n            if (depth > 0) {\n                return auto(newProperty[key], previousProperty[key], depth - 1).changed;\n            }\n            return newProperty[key] !== previousProperty[key];\n        });\n    }\n    return {\n        changed,\n        value: newProperty\n    };\n}\nexport function auto(previousProperty, newProperty, depth = 0) {\n    let result;\n    if (typeof newProperty === 'function') {\n        if (newProperty._type === WIDGET_BASE_TYPE) {\n            result = reference(previousProperty, newProperty);\n        }\n        else {\n            result = ignore(previousProperty, newProperty);\n        }\n    }\n    else if (isObjectOrArray(newProperty)) {\n        result = shallow(previousProperty, newProperty, depth);\n    }\n    else {\n        result = reference(previousProperty, newProperty);\n    }\n    return result;\n}\n//# sourceMappingURL=diff.mjs.map","import { Map } from '../shim/Map';\nimport { Evented } from '../core/Evented';\nimport { Registry } from './Registry';\nexport class RegistryHandler extends Evented {\n    constructor() {\n        super();\n        this._registry = new Registry();\n        this._registryWidgetLabelMap = new Map();\n        this._registryInjectorLabelMap = new Map();\n        this.own(this._registry);\n        const destroy = () => {\n            if (this.baseRegistry) {\n                this._registryWidgetLabelMap.delete(this.baseRegistry);\n                this._registryInjectorLabelMap.delete(this.baseRegistry);\n                this.baseRegistry = undefined;\n            }\n        };\n        this.own({ destroy });\n    }\n    set base(baseRegistry) {\n        if (this.baseRegistry) {\n            this._registryWidgetLabelMap.delete(this.baseRegistry);\n            this._registryInjectorLabelMap.delete(this.baseRegistry);\n        }\n        this.baseRegistry = baseRegistry;\n    }\n    get base() {\n        return this.baseRegistry;\n    }\n    define(label, widget) {\n        this._registry.define(label, widget);\n    }\n    defineInjector(label, injector) {\n        this._registry.defineInjector(label, injector);\n    }\n    has(label) {\n        return this._registry.has(label) || Boolean(this.baseRegistry && this.baseRegistry.has(label));\n    }\n    hasInjector(label) {\n        return this._registry.hasInjector(label) || Boolean(this.baseRegistry && this.baseRegistry.hasInjector(label));\n    }\n    get(label, globalPrecedence = false) {\n        return this._get(label, globalPrecedence, 'get', this._registryWidgetLabelMap);\n    }\n    getInjector(label, globalPrecedence = false) {\n        return this._get(label, globalPrecedence, 'getInjector', this._registryInjectorLabelMap);\n    }\n    _get(label, globalPrecedence, getFunctionName, labelMap) {\n        const registries = globalPrecedence ? [this.baseRegistry, this._registry] : [this._registry, this.baseRegistry];\n        for (let i = 0; i < registries.length; i++) {\n            const registry = registries[i];\n            if (!registry) {\n                continue;\n            }\n            const item = registry[getFunctionName](label);\n            const registeredLabels = labelMap.get(registry) || [];\n            if (item) {\n                return item;\n            }\n            else if (registeredLabels.indexOf(label) === -1) {\n                const handle = registry.on(label, (event) => {\n                    if (event.action === 'loaded' &&\n                        this[getFunctionName](label, globalPrecedence) === event.item) {\n                        this.emit({ type: 'invalidate' });\n                    }\n                });\n                this.own(handle);\n                labelMap.set(registry, [...registeredLabels, label]);\n            }\n        }\n        return null;\n    }\n}\nexport default RegistryHandler;\n//# sourceMappingURL=RegistryHandler.mjs.map","import global from '../../shim/global';\nimport { create, diffProperty, node, destroy, invalidator } from '../vdom';\nimport { createICacheMiddleware } from './icache';\nconst icache = createICacheMiddleware();\nconst factory = create({ icache, diffProperty, node, destroy, invalidator }).properties();\nexport const focus = factory(({ middleware: { icache, diffProperty, node, destroy, invalidator } }) => {\n    let initialized = false;\n    let currentElement;\n    let previous = 0;\n    const nodeSet = new Set();\n    diffProperty('focus', (_, next) => {\n        const result = next.focus && next.focus();\n        if (result) {\n            const current = icache.getOrSet('current', 0);\n            icache.set('current', current + 1);\n        }\n    });\n    function onFocusChange() {\n        const activeElement = global.document.activeElement;\n        if ((nodeSet.has(currentElement) || nodeSet.has(activeElement)) && currentElement !== activeElement) {\n            invalidator();\n        }\n        currentElement = activeElement;\n    }\n    destroy(() => {\n        global.document.removeEventListener('focusin', onFocusChange);\n        global.document.removeEventListener('focusout', onFocusChange);\n        nodeSet.clear();\n    });\n    return {\n        shouldFocus() {\n            const current = icache.get('current') || 0;\n            const shouldFocus = current !== previous;\n            previous = current;\n            return shouldFocus;\n        },\n        focus() {\n            const current = icache.getOrSet('current', 0);\n            icache.set('current', current + 1);\n        },\n        isFocused(key) {\n            const domNode = node.get(key);\n            if (!domNode) {\n                return false;\n            }\n            nodeSet.add(domNode);\n            if (!initialized) {\n                global.document.addEventListener('focusin', onFocusChange);\n                global.document.addEventListener('focusout', onFocusChange);\n                initialized = true;\n            }\n            return global.document.activeElement === domNode;\n        }\n    };\n});\nexport default focus;\n//# sourceMappingURL=focus.mjs.map","/* tslint:disable:interface-name */\nimport Map from '../../shim/Map';\nimport Set from '../../shim/Set';\nimport { create, invalidator, destroy } from '../vdom';\nconst factory = create({ invalidator, destroy });\nconst icacheFactory = factory(({ middleware: { invalidator, destroy } }) => {\n    const cacheMap = new Map();\n    const pendingKeys = new Set();\n    destroy(() => {\n        cacheMap.clear();\n    });\n    const api = {\n        get: (key) => {\n            const cachedValue = cacheMap.get(key);\n            if (!cachedValue || cachedValue.status === 'pending') {\n                return undefined;\n            }\n            return cachedValue.value;\n        }\n    };\n    api.set = (key, value, invalidate = true) => {\n        const current = api.get(key);\n        if (typeof value === 'function') {\n            value = value(current);\n            if (value && typeof value.then === 'function') {\n                const currentStatus = cacheMap.get(key);\n                cacheMap.set(key, {\n                    status: 'pending',\n                    value\n                });\n                if (pendingKeys.has(key) && (!currentStatus || currentStatus.status !== 'pending')) {\n                    invalidate && invalidator();\n                }\n                value.then((result) => {\n                    const cachedValue = cacheMap.get(key);\n                    if (cachedValue && cachedValue.value === value) {\n                        cacheMap.set(key, {\n                            status: 'resolved',\n                            value: result\n                        });\n                        invalidate && invalidator();\n                    }\n                });\n                return undefined;\n            }\n        }\n        cacheMap.set(key, {\n            status: 'resolved',\n            value\n        });\n        invalidate && invalidator();\n        return value;\n    };\n    api.has = (key) => {\n        return cacheMap.has(key);\n    };\n    api.delete = (key, invalidate = true) => {\n        cacheMap.delete(key);\n        pendingKeys.delete(key);\n        invalidate && invalidator();\n    };\n    api.clear = (invalidate = true) => {\n        cacheMap.clear();\n        pendingKeys.clear();\n        invalidate && invalidator();\n    };\n    api.getOrSet = (key, value, invalidate = true) => {\n        let cachedValue = cacheMap.get(key);\n        if (!cachedValue) {\n            api.set(key, value, invalidate);\n        }\n        cachedValue = cacheMap.get(key);\n        if (!cachedValue || cachedValue.status === 'pending') {\n            return undefined;\n        }\n        return cachedValue.value;\n    };\n    api.pending = (key) => {\n        pendingKeys.add(key);\n        let cachedValue = cacheMap.get(key);\n        return Boolean(cachedValue && cachedValue.status === 'pending');\n    };\n    return api;\n});\nexport const createICacheMiddleware = () => icacheFactory.withType();\nexport const icache = createICacheMiddleware();\nexport default icache;\n//# sourceMappingURL=icache.mjs.map","var __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nimport { create, invalidator, diffProperty, getRegistry } from '../vdom';\nimport icache from './icache';\nimport injector from './injector';\nimport Set from '../../shim/Set';\nimport { auto } from '../diff';\nimport { ThemeInjector, isThemeInjectorPayloadWithVariant, isThemeWithVariants, isThemeWithVariant } from '../ThemeInjector';\nexport const THEME_KEY = ' _key';\nexport const INJECTED_THEME_KEY = '__theme_injector';\nfunction registerThemeInjector(theme, themeRegistry) {\n    const themeInjector = new ThemeInjector(theme);\n    themeRegistry.defineInjector(INJECTED_THEME_KEY, (invalidator) => {\n        themeInjector.setInvalidator(invalidator);\n        return () => themeInjector;\n    });\n    return themeInjector;\n}\nconst factory = create({ invalidator, icache, diffProperty, injector, getRegistry }).properties();\nexport const theme = factory(({ middleware: { invalidator, icache, diffProperty, injector, getRegistry }, properties }) => {\n    let themeKeys = new Set();\n    diffProperty('theme', properties, (current, next) => {\n        const { changed } = auto(current.theme, next.theme, 3);\n        if (changed) {\n            icache.clear();\n            invalidator();\n        }\n    });\n    diffProperty('classes', (current, next) => {\n        let result = false;\n        if ((current.classes && !next.classes) || (!current.classes && next.classes)) {\n            result = true;\n        }\n        else if (current.classes && next.classes) {\n            const keys = [...themeKeys.values()];\n            for (let i = 0; i < keys.length; i++) {\n                let key = keys[i];\n                result = auto(current.classes[key], next.classes[key], 2).changed;\n                if (result) {\n                    break;\n                }\n            }\n        }\n        if (result) {\n            icache.clear();\n            invalidator();\n        }\n    });\n    function getTheme() {\n        const { theme } = properties();\n        if (theme) {\n            return theme;\n        }\n        const themeInjector = injector.get(INJECTED_THEME_KEY);\n        if (themeInjector) {\n            const themePayload = themeInjector.get();\n            if (isThemeInjectorPayloadWithVariant(themePayload)) {\n                return { theme: themePayload.theme, variant: themePayload.variant };\n            }\n            else if (themePayload) {\n                return themePayload.theme;\n            }\n        }\n    }\n    const themeInjector = injector.get(INJECTED_THEME_KEY);\n    if (!themeInjector) {\n        const registry = getRegistry();\n        if (registry) {\n            registerThemeInjector(undefined, registry.base);\n        }\n    }\n    injector.subscribe(INJECTED_THEME_KEY, () => {\n        icache.clear();\n        invalidator();\n    });\n    function set(theme, variant) {\n        const currentTheme = injector.get(INJECTED_THEME_KEY);\n        if (currentTheme) {\n            if (isThemeWithVariants(theme)) {\n                currentTheme.set(theme, variant);\n            }\n            else {\n                currentTheme.set(theme);\n            }\n        }\n    }\n    return {\n        classes(css) {\n            const cachedTheme = icache.get(css);\n            if (cachedTheme) {\n                return cachedTheme;\n            }\n            const _a = THEME_KEY, key = css[_a], classes = __rest(css, [typeof _a === \"symbol\" ? _a : _a + \"\"]);\n            themeKeys.add(key);\n            let theme = classes;\n            let { classes: currentClasses } = properties();\n            let currentTheme = getTheme();\n            if (currentTheme && isThemeWithVariant(currentTheme)) {\n                currentTheme = isThemeWithVariants(currentTheme.theme)\n                    ? currentTheme.theme.theme\n                    : currentTheme.theme;\n            }\n            if (currentTheme && currentTheme[key]) {\n                theme = Object.assign({}, theme, currentTheme[key]);\n            }\n            if (currentClasses && currentClasses[key]) {\n                const classKeys = Object.keys(currentClasses[key]);\n                for (let i = 0; i < classKeys.length; i++) {\n                    const classKey = classKeys[i];\n                    if (theme[classKey]) {\n                        theme[classKey] = `${theme[classKey]} ${currentClasses[key][classKey].join(' ')}`;\n                    }\n                }\n            }\n            icache.set(css, theme, false);\n            return theme;\n        },\n        variant() {\n            const theme = getTheme();\n            if (theme && isThemeWithVariant(theme)) {\n                return theme.variant.value.root;\n            }\n        },\n        set,\n        get() {\n            const currentTheme = injector.get(INJECTED_THEME_KEY);\n            if (currentTheme) {\n                return currentTheme.get();\n            }\n        }\n    };\n});\nexport default theme;\n//# sourceMappingURL=theme.mjs.map","import { create, getRegistry, invalidator, destroy } from '../vdom';\nconst injectorFactory = create({ getRegistry, invalidator, destroy });\nexport const injector = injectorFactory(({ middleware: { getRegistry, invalidator, destroy } }) => {\n    const handles = [];\n    destroy(() => {\n        let handle;\n        while ((handle = handles.pop())) {\n            handle.destroy();\n        }\n    });\n    const registry = getRegistry();\n    return {\n        subscribe(label, callback = invalidator) {\n            if (registry) {\n                const item = registry.getInjector(label);\n                if (item) {\n                    const handle = item.invalidator.on('invalidate', () => {\n                        callback();\n                    });\n                    handles.push(handle);\n                    return () => {\n                        const index = handles.indexOf(handle);\n                        if (index !== -1) {\n                            handles.splice(index, 1);\n                            handle.destroy();\n                        }\n                    };\n                }\n            }\n        },\n        get(label) {\n            if (registry) {\n                const item = registry.getInjector(label);\n                if (item) {\n                    return item.injector();\n                }\n            }\n            return null;\n        }\n    };\n});\nexport default injector;\n//# sourceMappingURL=injector.mjs.map","import global from '../shim/global';\nimport Injector from './Injector';\nimport cssVars from '../shim/cssVariables';\nimport Map from '../shim/Map';\nimport has from './has';\nexport function isVariantModule(variant) {\n    return typeof variant !== 'string';\n}\nexport function isThemeWithVariant(theme) {\n    return theme && theme.hasOwnProperty('variant');\n}\nexport function isThemeWithVariants(theme) {\n    return theme && theme.hasOwnProperty('variants');\n}\nexport function isThemeInjectorPayloadWithVariant(theme) {\n    return !!theme && theme.hasOwnProperty('variant');\n}\nlet processCssVariant = function (_) { };\nif (!true) {\n    const setUpCssVariantSupport = () => {\n        const styleId = '__dojo_processed_styles';\n        const processedCssMap = new Map();\n        let variantStyleElement;\n        function applyStyles(css) {\n            const style = document.createElement('style');\n            style.textContent = css;\n            style.setAttribute('id', styleId);\n            if (variantStyleElement && variantStyleElement.parentNode) {\n                variantStyleElement.parentNode.replaceChild(style, variantStyleElement);\n            }\n            else {\n                global.document.head.appendChild(style);\n            }\n            variantStyleElement = style;\n        }\n        return function processCssVariant(variantName) {\n            const processedCss = processedCssMap.get(variantName);\n            if (processedCss) {\n                applyStyles(processedCss);\n            }\n            else {\n                cssVars({\n                    exclude: `style[id=${styleId}]`,\n                    onSuccess: (css) => {\n                        let temp = css;\n                        let index = temp.indexOf(variantName);\n                        let variantCss = '';\n                        while (index !== -1) {\n                            temp = temp.substring(index + variantName.length);\n                            const match = temp.match(/\\{([^}]+)\\}/);\n                            if (match) {\n                                if (variantCss) {\n                                    variantCss = `${variantCss.substring(0, variantCss.length - 1)}${match[0].substring(1)}`;\n                                }\n                                else {\n                                    variantCss = match[0];\n                                }\n                            }\n                            index = temp.indexOf(variantName);\n                        }\n                        if (variantCss) {\n                            css = `:root ${variantCss}${css}`;\n                        }\n                        return css;\n                    },\n                    onComplete: (css) => {\n                        processedCssMap.set(variantName, css);\n                        applyStyles(css);\n                    },\n                    updateDOM: false,\n                    silent: true\n                });\n            }\n        };\n    };\n    processCssVariant = setUpCssVariantSupport();\n}\nfunction createThemeInjectorPayload(theme, variant) {\n    if (isThemeWithVariant(theme)) {\n        if (typeof theme.variant === 'string') {\n            return {\n                theme: theme.theme,\n                variant: { name: theme.variant, value: theme.theme.variants[theme.variant] }\n            };\n        }\n        return { theme: theme.theme, variant: theme.variant };\n    }\n    else if (isThemeWithVariants(theme)) {\n        variant = variant || 'default';\n        if (isVariantModule(variant)) {\n            if (!true) {\n                processCssVariant(variant.value.root);\n            }\n            return { theme, variant };\n        }\n        if (!true) {\n            processCssVariant(theme.variants[variant].root);\n        }\n        return { theme: theme, variant: { name: variant, value: theme.variants[variant] } };\n    }\n    return { theme };\n}\nexport class ThemeInjector extends Injector {\n    constructor(theme) {\n        super(theme ? createThemeInjectorPayload(theme) : theme);\n    }\n    set(theme, variant) {\n        super.set(createThemeInjectorPayload(theme, variant));\n    }\n    get() {\n        return super.get();\n    }\n}\nexport default ThemeInjector;\n//# sourceMappingURL=ThemeInjector.mjs.map","import { Evented } from '../core/Evented';\nexport class Injector extends Evented {\n    constructor(payload) {\n        super();\n        this._payload = payload;\n    }\n    setInvalidator(invalidator) {\n        this._invalidator = invalidator;\n    }\n    get() {\n        return this._payload;\n    }\n    set(payload) {\n        this._payload = payload;\n        if (this._invalidator) {\n            this._invalidator();\n        }\n    }\n}\nexport default Injector;\n//# sourceMappingURL=Injector.mjs.map","import { create } from '../vdom';\nimport { resize } from './resize';\nconst factory = create({ resize });\nexport function createBreakpointMiddleware(breakpoints = { SM: 0, MD: 576, LG: 768, XL: 960 }) {\n    const defaultBreakpoints = breakpoints;\n    const breakpoint = factory(({ middleware: { resize } }) => {\n        return {\n            get: (key, breakpoints = defaultBreakpoints) => {\n                const contentRect = resize.get(key);\n                if (!contentRect) {\n                    return null;\n                }\n                let currentBreakpoint = null;\n                const keys = Object.keys(breakpoints);\n                for (let i = 0; i < keys.length; i++) {\n                    const breakpoint = breakpoints[keys[i]];\n                    if (contentRect.width >= breakpoint &&\n                        (!currentBreakpoint || breakpoint > currentBreakpoint.size)) {\n                        currentBreakpoint = {\n                            name: keys[i],\n                            size: breakpoint\n                        };\n                    }\n                }\n                if (currentBreakpoint) {\n                    return {\n                        breakpoint: currentBreakpoint.name,\n                        contentRect\n                    };\n                }\n                return null;\n            }\n        };\n    });\n    return breakpoint;\n}\nconst breakpoint = createBreakpointMiddleware();\nexport default breakpoint;\n//# sourceMappingURL=breakpoint.mjs.map","const globalObject = (function () {\n    // the only reliable means to get the global object is\n    // `Function('return this')()`\n    // However, this causes CSP violations in Chrome apps.\n    if (typeof window !== 'undefined' && window.navigator.userAgent.indexOf('jsdom') > -1) {\n        return window;\n    }\n    if (typeof globalThis !== 'undefined') {\n        return globalThis;\n    }\n    if (typeof self !== 'undefined') {\n        return self;\n    }\n    if (typeof window !== 'undefined') {\n        return window;\n    }\n    if (typeof global !== 'undefined') {\n        return global;\n    }\n})();\nexport default globalObject;\n//# sourceMappingURL=global.mjs.map","var cssVars = undefined;\n// !has('dom-css-variables')\n// elided: import 'css-vars-ponyfill'\nexport default (typeof cssVars !== 'undefined' && typeof cssVars.default === 'function' ? cssVars.default : () => { });","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import global from '../shim/global';\n/**\n * A cache of results of feature tests\n */\nexport const testCache = {};\n/**\n * A cache of the un-resolved feature tests\n */\nexport const testFunctions = {};\n/* Grab the staticFeatures if there are available */\nconst { staticFeatures } = global.DojoHasEnvironment || {};\n/* Cleaning up the DojoHasEnviornment */\nif ('DojoHasEnvironment' in global) {\n    delete global.DojoHasEnvironment;\n}\n/**\n * Custom type guard to narrow the `staticFeatures` to either a map or a function that\n * returns a map.\n *\n * @param value The value to guard for\n */\nfunction isStaticFeatureFunction(value) {\n    return typeof value === 'function';\n}\n/**\n * The cache of asserted features that were available in the global scope when the\n * module loaded\n */\nconst staticCache = staticFeatures\n    ? isStaticFeatureFunction(staticFeatures)\n        ? staticFeatures.apply(global)\n        : staticFeatures\n    : {}; /* Providing an empty cache, if none was in the environment\n\n\n/**\n* AMD plugin function.\n*\n* Resolves resourceId into a module id based on possibly-nested tenary expression that branches on has feature test\n* value(s).\n*\n* @param resourceId The id of the module\n* @param normalize Resolves a relative module id into an absolute module id\n*/\nexport function normalize(resourceId, normalize) {\n    const tokens = resourceId.match(/[\\?:]|[^:\\?]*/g) || [];\n    let i = 0;\n    function get(skip) {\n        const term = tokens[i++];\n        if (term === ':') {\n            // empty string module name, resolves to null\n            return null;\n        }\n        else {\n            // postfixed with a ? means it is a feature to branch on, the term is the name of the feature\n            if (tokens[i++] === '?') {\n                if (!skip && has(term)) {\n                    // matched the feature, get the first value from the options\n                    return get();\n                }\n                else {\n                    // did not match, get the second value, passing over the first\n                    get(true);\n                    return get(skip);\n                }\n            }\n            // a module\n            return term;\n        }\n    }\n    const id = get();\n    return id && normalize(id);\n}\n/**\n * Check if a feature has already been registered\n *\n * @param feature the name of the feature\n */\nexport function exists(feature) {\n    const normalizedFeature = feature.toLowerCase();\n    return Boolean(normalizedFeature in staticCache || normalizedFeature in testCache || testFunctions[normalizedFeature]);\n}\n/**\n * Register a new test for a named feature.\n *\n * @example\n * has.add('dom-addeventlistener', !!document.addEventListener);\n *\n * @example\n * has.add('touch-events', function () {\n *    return 'ontouchstart' in document\n * });\n *\n * @param feature the name of the feature\n * @param value the value reported of the feature, or a function that will be executed once on first test\n * @param overwrite if an existing value should be overwritten. Defaults to false.\n */\nexport function add(feature, value, overwrite = false) {\n    const normalizedFeature = feature.toLowerCase();\n    if (exists(normalizedFeature) && !overwrite && !(normalizedFeature in staticCache)) {\n        throw new TypeError(`Feature \"${feature}\" exists and overwrite not true.`);\n    }\n    if (typeof value === 'function') {\n        testFunctions[normalizedFeature] = value;\n    }\n    else {\n        testCache[normalizedFeature] = value;\n        delete testFunctions[normalizedFeature];\n    }\n}\n/**\n * Return the current value of a named feature.\n *\n * @param feature The name of the feature to test.\n */\nexport default function has(feature, strict = false) {\n    let result;\n    const normalizedFeature = feature.toLowerCase();\n    if (normalizedFeature in staticCache) {\n        result = staticCache[normalizedFeature];\n    }\n    else if (testFunctions[normalizedFeature]) {\n        result = testCache[normalizedFeature] = testFunctions[normalizedFeature].call(null);\n        delete testFunctions[normalizedFeature];\n    }\n    else if (normalizedFeature in testCache) {\n        result = testCache[normalizedFeature];\n    }\n    else if (strict) {\n        throw new TypeError(`Attempt to detect unregistered has feature \"${feature}\"`);\n    }\n    return result;\n}\n/*\n * Out of the box feature tests\n */\nadd('public-path', undefined);\n/* flag for dojo debug, default to false */\nadd('dojo-debug', false);\n/* Detects if the environment is \"browser like\" */\nadd('host-browser', true);\n/* Detects if the environment is \"jsdom\" */\nadd('host-jsdom', true && typeof navigator !== 'undefined' && navigator.userAgent.indexOf('jsdom') !== -1);\n/* Detects if the environment appears to be NodeJS */\nadd('host-node', false);\nadd('fetch', 'fetch' in global && typeof global.fetch === 'function', true);\nadd('es6-array', true);\nadd('es6-array-fill', true);\nadd('es7-array', true);\nadd('es2019-array', true);\n/* Map */\nadd('es6-map', true);\nadd('es6-iterator', true);\n/* Math */\nadd('es6-math', true);\nadd('es6-math-imul', true);\n/* Object */\nadd('es6-object', true);\nadd('es2017-object', true);\n/* Observable */\nadd('es-observable', false);\n/* Promise */\nadd('es6-promise', true);\nadd('es2018-promise-finally', () => true && typeof global.Promise.prototype.finally !== 'undefined', true);\n/* Set */\nadd('es6-set', true);\n/* String */\nadd('es6-string', true);\nadd('es6-string-raw', true);\nadd('es2017-string', true);\n/* Symbol */\nadd('es6-symbol', true);\n/* WeakMap */\nadd('es6-weakmap', true);\n/* Miscellaneous features */\nadd('microtasks', true);\nadd('postmessage', true);\nadd('raf', true);\nadd('setimmediate', false);\n/* DOM Features */\nadd('dom-mutationobserver', true);\nadd('dom-webanimation', () => true && global.Animation !== undefined && global.KeyframeEffect !== undefined, true);\nadd('abort-controller', () => typeof global.AbortController !== 'undefined');\nadd('abort-signal', () => typeof global.AbortSignal !== 'undefined');\nadd('dom-intersection-observer', () => true && global.IntersectionObserver !== undefined, true);\nadd('dom-resize-observer', () => true && global.ResizeObserver !== undefined, true);\nadd('dom-pointer-events', () => true && global.onpointerdown !== undefined, true);\nadd('dom-css-variables', true);\nadd('dom-inert', () => true && Element.prototype.hasOwnProperty('inert'), true);\nadd('dom-passive-event', () => {\n    let supportsPassive = false;\n    if ('host-browser') {\n        try {\n            const opts = Object.defineProperty({}, 'passive', {\n                get() {\n                    supportsPassive = true;\n                }\n            });\n            const f = () => { };\n            window.addEventListener('testPassive', f, opts);\n            window.removeEventListener('testPassive', f, opts);\n        }\n        catch (e) { }\n    }\n    return supportsPassive;\n}, true);\nadd('build-elide', false);\nadd('test', false);\nadd('global-this', () => typeof global.globalThis !== 'undefined');\n//# sourceMappingURL=has.mjs.map","import { localizeBundle, setLocale, getCurrentLocale } from '../../i18n/i18n';\nimport { create, invalidator, getRegistry, diffProperty } from '../vdom';\nimport injector from './injector';\nimport { isThenable } from '../../shim/Promise';\nimport { INJECTOR_KEY, registerI18nInjector } from '../I18nInjector';\nexport { INJECTOR_KEY, registerI18nInjector } from '../I18nInjector';\nconst factory = create({ invalidator, injector, getRegistry, diffProperty }).properties();\nexport const i18n = factory(({ properties, middleware: { invalidator, injector, getRegistry, diffProperty } }) => {\n    const i18nInjector = injector.get(INJECTOR_KEY);\n    if (!i18nInjector) {\n        const registry = getRegistry();\n        if (registry) {\n            registerI18nInjector({}, registry.base);\n        }\n    }\n    diffProperty('locale', properties, (current, next) => {\n        const localeDataInjector = injector.get(INJECTOR_KEY);\n        let injectedLocale;\n        if (localeDataInjector) {\n            const injectLocaleData = localeDataInjector.get();\n            if (injectLocaleData) {\n                injectedLocale = injectLocaleData.locale;\n            }\n        }\n        if (next.locale && current.locale !== next.locale) {\n            const result = setLocale({ locale: next.locale, local: true });\n            if (isThenable(result)) {\n                result.then(() => {\n                    invalidator();\n                });\n                return current.locale || injectedLocale || getCurrentLocale();\n            }\n        }\n        if (current.locale !== next.locale) {\n            invalidator();\n        }\n        return next.locale || injectedLocale || getCurrentLocale();\n    });\n    injector.subscribe(INJECTOR_KEY);\n    return {\n        localize(bundle) {\n            let { locale, i18nBundle } = properties();\n            if (i18nBundle) {\n                if (i18nBundle instanceof Map) {\n                    bundle = i18nBundle.get(bundle) || bundle;\n                }\n                else {\n                    bundle = i18nBundle;\n                }\n            }\n            return localizeBundle(bundle, { locale, invalidator });\n        },\n        set(localeData = {}) {\n            const localeDataInjector = injector.get(INJECTOR_KEY);\n            if (localeDataInjector) {\n                localeDataInjector.set(localeData);\n            }\n        },\n        get() {\n            const localeDataInjector = injector.get(INJECTOR_KEY);\n            if (localeDataInjector) {\n                return localeDataInjector.get();\n            }\n        }\n    };\n});\nexport default i18n;\n//# sourceMappingURL=i18n.mjs.map","import global from '../shim/global';\nimport WeakMap from '../shim/WeakMap';\nimport * as Globalize from 'globalize/dist/globalize/message';\nconst Cldr = require('cldrjs/dist/cldr');\n// !has('cldr-elide')\n// elided: import './util/cldr'\nlet cldrResolved = Cldr._resolved;\nObject.defineProperty(Cldr, '_resolved', {\n    get() {\n        return Object.assign({}, cldrResolved);\n    },\n    set(value) {\n        cldrResolved = Object.assign({}, value);\n    }\n});\nconst TOKEN_PATTERN = /\\{([a-z0-9_]+)\\}/gi;\nconst bundleIdMap = new WeakMap();\nconst bundleLoaderMap = new WeakMap();\nconst idToBundleLoaderMap = new Map();\nconst globalizeInstanceMap = new Map();\nconst MESSAGE_BUNDLE_PATH = 'globalize-messages/{bundle}';\nconst DOJO_PATH = 'dojo/{bundle}/lookup';\nlet supportedLocales = [];\nlet defaultLocale = '';\nlet computedLocale = 'unknown';\nlet currentLocale;\nlet cldrLoaders = {};\nlet bundleId = 0;\nconst cldr = new Cldr('');\nexport function setSupportedLocales(locales) {\n    supportedLocales = locales;\n}\nexport function setDefaultLocale(locale) {\n    defaultLocale = locale;\n}\nexport function getComputedLocale() {\n    return computedLocale;\n}\nexport function getCurrentLocale() {\n    return currentLocale;\n}\nexport function setCldrLoaders(loaders) {\n    cldrLoaders = Object.assign({}, loaders);\n}\nexport function getMatchedSupportedLocale(locale) {\n    let partialLocale = locale.replace(/^([a-z]{2}).*/i, '$1');\n    let matchedLocale;\n    for (let i = 0; i < supportedLocales.length; i++) {\n        const supportedLocale = supportedLocales[i];\n        if (locale === supportedLocale) {\n            matchedLocale = locale;\n            break;\n        }\n        if (partialLocale === supportedLocale) {\n            matchedLocale = partialLocale;\n        }\n    }\n    return matchedLocale;\n}\nfunction shouldLoadFallbackCldr(locale) {\n    return !getMatchedSupportedLocale(locale) && cldrLoaders.fallback && cldrLoaders.fallback !== true;\n}\nfunction setI18nLocales(locale, isDefault, local) {\n    if (isDefault) {\n        Globalize.locale(locale);\n        computedLocale = locale;\n        currentLocale = locale;\n    }\n    else if (!local) {\n        currentLocale = locale;\n    }\n}\nasync function loadCldrData(loaderPromises, userLocale, requestedLocale, calculatedLocale, isDefault, isLocal, invalidator) {\n    return Promise.all(loaderPromises).then((loaderData) => {\n        cldrLoaders[userLocale] = true;\n        cldrLoaders.supplemental = true;\n        loaderData.forEach((results) => {\n            results.forEach((result) => {\n                Globalize.load(result.default);\n            });\n        });\n        if (shouldLoadFallbackCldr(requestedLocale)) {\n            cldrLoaders.fallback = true;\n            const data = cldr.get('dojo') || {};\n            const locales = Object.keys(data);\n            for (let i = 0; i < locales.length; i++) {\n                const locale = locales[i];\n                if (data[locale].bundles) {\n                    Globalize.loadMessages({ [locale]: data[locale].bundles });\n                }\n            }\n            if (requestedLocale && locales.indexOf(requestedLocale) === -1) {\n                Globalize.loadMessages({ [requestedLocale]: {} });\n            }\n        }\n        setI18nLocales(calculatedLocale, isDefault, isLocal);\n        invalidator && invalidator();\n        return calculatedLocale;\n    });\n}\nexport function setLocale(options = {}) {\n    const { local: isLocal = false, default: isDefault = false, locale: requestedLocale = global.navigator.language || global.navigator.userLanguage, invalidator } = options;\n    const matchedLocale = getMatchedSupportedLocale(requestedLocale);\n    const userLocale = matchedLocale || defaultLocale;\n    const calculatedLocale = matchedLocale ? requestedLocale : defaultLocale;\n    const loaderPromises = [];\n    const supplementalLoader = cldrLoaders.supplemental;\n    const fallbackLoader = cldrLoaders.fallback;\n    if (supplementalLoader && supplementalLoader !== true) {\n        loaderPromises.push(supplementalLoader());\n    }\n    const localeCldrLoader = cldrLoaders[userLocale];\n    if (localeCldrLoader && localeCldrLoader !== true) {\n        loaderPromises.push(localeCldrLoader());\n    }\n    const loadFallback = !matchedLocale && fallbackLoader && fallbackLoader !== true;\n    if (loadFallback && fallbackLoader && fallbackLoader !== true) {\n        loaderPromises.push(fallbackLoader());\n    }\n    Globalize.loadMessages({ [requestedLocale]: {} });\n    if (loaderPromises.length) {\n        return loadCldrData(loaderPromises, userLocale, requestedLocale, calculatedLocale, isDefault, isLocal, invalidator);\n    }\n    setI18nLocales(calculatedLocale, isDefault, isLocal);\n    return calculatedLocale;\n}\nfunction getPlaceholderBundle(bundle) {\n    return {\n        messages: Object.keys(bundle.messages).reduce((messages, key) => {\n            messages[key] = '';\n            return messages;\n        }, {}),\n        isPlaceholder: true,\n        format: () => ''\n    };\n}\nfunction getBundleId() {\n    return `id-${++bundleId}`;\n}\nfunction markBundleAsLoaded(locale, bundleId) {\n    Cldr.load({\n        dojo: {\n            [locale]: {\n                lookup: {\n                    [bundleId]: {\n                        locale: undefined,\n                        id: undefined,\n                        loading: undefined\n                    }\n                }\n            }\n        }\n    });\n}\nfunction registerBundle(bundle) {\n    const { locales: localeBundleLoaders = {} } = bundle;\n    const locales = Object.keys(localeBundleLoaders);\n    let bundleId = bundleIdMap.get(bundle);\n    if (!bundleId) {\n        bundleId = getBundleId();\n        bundleIdMap.set(bundle, bundleId);\n        const messageBundles = {};\n        const lookup = {};\n        for (let i = 0; i < locales.length; i++) {\n            const locale = locales[i];\n            const isSupportedLocale = !!getMatchedSupportedLocale(locale);\n            const bundleLoader = localeBundleLoaders[locale];\n            let messages = {};\n            if (typeof bundleLoader === 'function') {\n                const id = getBundleId();\n                bundleLoaderMap.set(bundleLoader, id);\n                idToBundleLoaderMap.set(id, bundleLoader);\n                lookup[locale] = { lookup: { [bundleId]: { locale, id } } };\n            }\n            else {\n                messages = bundleLoader;\n            }\n            if (isSupportedLocale) {\n                messageBundles[locale] = {\n                    [bundleId]: messages\n                };\n            }\n            else if (lookup[locale]) {\n                lookup[locale].bundles = { [bundleId]: messages };\n            }\n            else {\n                lookup[locale] = {\n                    bundles: { [bundleId]: messages }\n                };\n            }\n        }\n        Globalize.loadMessages(Object.assign({ root: { [bundleId]: bundle.messages }, [computedLocale]: { [bundleId]: bundle.messages }, [defaultLocale]: { [bundleId]: bundle.messages } }, messageBundles));\n        Cldr.load({ dojo: lookup });\n    }\n    return bundleId;\n}\nconst cachedBundleMap = new WeakMap();\nexport function localizeBundle(bundle, options) {\n    let { locale = computedLocale, invalidator } = options;\n    if (computedLocale === 'unknown') {\n        return {\n            messages: bundle.messages,\n            isPlaceholder: false,\n            format: (key, options) => {\n                return bundle.messages[key].replace(TOKEN_PATTERN, (token, property) => {\n                    const value = options[property];\n                    if (typeof value === 'undefined') {\n                        return token;\n                    }\n                    return value;\n                });\n            }\n        };\n    }\n    if (shouldLoadFallbackCldr(locale)) {\n        setLocale({ default: false, local: true, locale, invalidator });\n        return getPlaceholderBundle(bundle);\n    }\n    const bundleId = registerBundle(bundle);\n    const globalize = globalizeInstanceMap.get(locale) || new Globalize(new Cldr(locale));\n    globalizeInstanceMap.set(locale, globalize);\n    const lookupId = globalize.cldr.get(`${DOJO_PATH}/${bundleId}/id`);\n    const lookupLocale = globalize.cldr.get(`${DOJO_PATH}/${bundleId}/locale`);\n    if (lookupId && lookupLocale) {\n        let bundleLoader = idToBundleLoaderMap.get(lookupId);\n        if (bundleLoader) {\n            Cldr.load({\n                dojo: {\n                    [lookupLocale]: { lookup: { [bundleId]: { loading: true } } }\n                }\n            });\n            const loaderPromise = bundleLoader();\n            loaderPromise.then((messages) => {\n                markBundleAsLoaded(lookupLocale, bundleId);\n                Globalize.loadMessages({ [lookupLocale]: { [bundleId]: messages.default } });\n                invalidator();\n            });\n        }\n    }\n    const lookupLoading = globalize.cldr.get(`${DOJO_PATH}/${bundleId}/loading`);\n    if (lookupLoading) {\n        return getPlaceholderBundle(bundle);\n    }\n    const cachedLocaleMessagesMap = cachedBundleMap.get(bundle) || new Map();\n    let localizedBundleMessages = cachedLocaleMessagesMap.get(locale);\n    if (!localizedBundleMessages) {\n        localizedBundleMessages = {\n            messages: Object.keys(bundle.messages).reduce((messages, key) => {\n                const message = globalize.cldr.get(`${MESSAGE_BUNDLE_PATH}/${bundleId}/${key}`);\n                messages[key] = message;\n                return messages;\n            }, {}),\n            isPlaceholder: false,\n            format: (key, options) => {\n                return globalize.formatMessage(`${bundleId}/${key}`, options);\n            }\n        };\n        cachedLocaleMessagesMap.set(locale, localizedBundleMessages);\n        cachedBundleMap.set(bundle, cachedLocaleMessagesMap);\n    }\n    return localizedBundleMessages;\n}","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n/**\n * Globalize v1.4.0\n *\n * http://github.com/jquery/globalize\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2018-07-17T20:38Z\n */\n/*!\n * Globalize v1.4.0 2018-07-17T20:38Z Released under the MIT license\n * http://git.io/TrdQbw\n */\n(function( root, factory ) {\n\n\t// UMD returnExports\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD\n\t\tdefine([\n\t\t\t\"cldr\",\n\t\t\t\"../globalize\",\n\t\t\t\"cldr/event\"\n\t\t], factory );\n\t} else if ( typeof exports === \"object\" ) {\n\n\t\t// Node, CommonJS\n\t\tmodule.exports = factory( require( \"cldrjs\" ), require( \"../globalize\" ) );\n\t} else {\n\n\t\t// Extend global\n\t\tfactory( root.Cldr, root.Globalize );\n\t}\n}(this, function( Cldr, Globalize ) {\n\nvar alwaysArray = Globalize._alwaysArray,\n\tcreateError = Globalize._createError,\n\tisPlainObject = Globalize._isPlainObject,\n\truntimeBind = Globalize._runtimeBind,\n\tvalidateDefaultLocale = Globalize._validateDefaultLocale,\n\tvalidate = Globalize._validate,\n\tvalidateParameterPresence = Globalize._validateParameterPresence,\n\tvalidateParameterType = Globalize._validateParameterType,\n\tvalidateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;\nvar MessageFormat;\n/* jshint ignore:start */\nMessageFormat = (function() {\nMessageFormat._parse = (function() {\n\n  /*\n   * Generated by PEG.js 0.8.0.\n   *\n   * http://pegjs.majda.cz/\n   */\n\n  function peg$subclass(child, parent) {\n    function ctor() { this.constructor = child; }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n  }\n\n  function SyntaxError(message, expected, found, offset, line, column) {\n    this.message  = message;\n    this.expected = expected;\n    this.found    = found;\n    this.offset   = offset;\n    this.line     = line;\n    this.column   = column;\n\n    this.name     = \"SyntaxError\";\n  }\n\n  peg$subclass(SyntaxError, Error);\n\n  function parse(input) {\n    var options = arguments.length > 1 ? arguments[1] : {},\n\n        peg$FAILED = {},\n\n        peg$startRuleFunctions = { start: peg$parsestart },\n        peg$startRuleFunction  = peg$parsestart,\n\n        peg$c0 = [],\n        peg$c1 = function(st) {\n              return { type: 'messageFormatPattern', statements: st };\n            },\n        peg$c2 = peg$FAILED,\n        peg$c3 = \"{\",\n        peg$c4 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n        peg$c5 = null,\n        peg$c6 = \",\",\n        peg$c7 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n        peg$c8 = \"}\",\n        peg$c9 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n        peg$c10 = function(argIdx, efmt) {\n              var res = {\n                type: \"messageFormatElement\",\n                argumentIndex: argIdx\n              };\n              if (efmt && efmt.length) {\n                res.elementFormat = efmt[1];\n              } else {\n                res.output = true;\n              }\n              return res;\n            },\n        peg$c11 = \"plural\",\n        peg$c12 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n        peg$c13 = function(t, s) {\n              return { type: \"elementFormat\", key: t, val: s };\n            },\n        peg$c14 = \"selectordinal\",\n        peg$c15 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n        peg$c16 = \"select\",\n        peg$c17 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n        peg$c18 = function(t, p) {\n              return { type: \"elementFormat\", key: t, val: p };\n            },\n        peg$c19 = function(op, pf) {\n              return { type: \"pluralFormatPattern\", pluralForms: pf, offset: op || 0 };\n            },\n        peg$c20 = \"offset\",\n        peg$c21 = { type: \"literal\", value: \"offset\", description: \"\\\"offset\\\"\" },\n        peg$c22 = \":\",\n        peg$c23 = { type: \"literal\", value: \":\", description: \"\\\":\\\"\" },\n        peg$c24 = function(d) { return d; },\n        peg$c25 = function(k, mfp) {\n              return { key: k, val: mfp };\n            },\n        peg$c26 = function(i) { return i; },\n        peg$c27 = \"=\",\n        peg$c28 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n        peg$c29 = function(pf) { return { type: \"selectFormatPattern\", pluralForms: pf }; },\n        peg$c30 = function(p) { return p; },\n        peg$c31 = \"#\",\n        peg$c32 = { type: \"literal\", value: \"#\", description: \"\\\"#\\\"\" },\n        peg$c33 = function() { return {type: 'octothorpe'}; },\n        peg$c34 = function(s) { return { type: \"string\", val: s.join('') }; },\n        peg$c35 = { type: \"other\", description: \"identifier\" },\n        peg$c36 = /^[0-9a-zA-Z$_]/,\n        peg$c37 = { type: \"class\", value: \"[0-9a-zA-Z$_]\", description: \"[0-9a-zA-Z$_]\" },\n        peg$c38 = /^[^ \\t\\n\\r,.+={}]/,\n        peg$c39 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}]\" },\n        peg$c40 = function(s) { return s; },\n        peg$c41 = function(chars) { return chars.join(''); },\n        peg$c42 = /^[^{}#\\\\\\0-\\x1F \\t\\n\\r]/,\n        peg$c43 = { type: \"class\", value: \"[^{}#\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}#\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n        peg$c44 = function(x) { return x; },\n        peg$c45 = \"\\\\\\\\\",\n        peg$c46 = { type: \"literal\", value: \"\\\\\\\\\", description: \"\\\"\\\\\\\\\\\\\\\\\\\"\" },\n        peg$c47 = function() { return \"\\\\\"; },\n        peg$c48 = \"\\\\#\",\n        peg$c49 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n        peg$c50 = function() { return \"#\"; },\n        peg$c51 = \"\\\\{\",\n        peg$c52 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n        peg$c53 = function() { return \"\\u007B\"; },\n        peg$c54 = \"\\\\}\",\n        peg$c55 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n        peg$c56 = function() { return \"\\u007D\"; },\n        peg$c57 = \"\\\\u\",\n        peg$c58 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n        peg$c59 = function(h1, h2, h3, h4) {\n              return String.fromCharCode(parseInt(\"0x\" + h1 + h2 + h3 + h4));\n            },\n        peg$c60 = /^[0-9]/,\n        peg$c61 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n        peg$c62 = function(ds) {\n            //the number might start with 0 but must not be interpreted as an octal number\n            //Hence, the base is passed to parseInt explicitely\n            return parseInt((ds.join('')), 10);\n          },\n        peg$c63 = /^[0-9a-fA-F]/,\n        peg$c64 = { type: \"class\", value: \"[0-9a-fA-F]\", description: \"[0-9a-fA-F]\" },\n        peg$c65 = { type: \"other\", description: \"whitespace\" },\n        peg$c66 = function(w) { return w.join(''); },\n        peg$c67 = /^[ \\t\\n\\r]/,\n        peg$c68 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n\n        peg$currPos          = 0,\n        peg$reportedPos      = 0,\n        peg$cachedPos        = 0,\n        peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n        peg$maxFailPos       = 0,\n        peg$maxFailExpected  = [],\n        peg$silentFails      = 0,\n\n        peg$result;\n\n    if (\"startRule\" in options) {\n      if (!(options.startRule in peg$startRuleFunctions)) {\n        throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n      }\n\n      peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n    }\n\n    function text() {\n      return input.substring(peg$reportedPos, peg$currPos);\n    }\n\n    function offset() {\n      return peg$reportedPos;\n    }\n\n    function line() {\n      return peg$computePosDetails(peg$reportedPos).line;\n    }\n\n    function column() {\n      return peg$computePosDetails(peg$reportedPos).column;\n    }\n\n    function expected(description) {\n      throw peg$buildException(\n        null,\n        [{ type: \"other\", description: description }],\n        peg$reportedPos\n      );\n    }\n\n    function error(message) {\n      throw peg$buildException(message, null, peg$reportedPos);\n    }\n\n    function peg$computePosDetails(pos) {\n      function advance(details, startPos, endPos) {\n        var p, ch;\n\n        for (p = startPos; p < endPos; p++) {\n          ch = input.charAt(p);\n          if (ch === \"\\n\") {\n            if (!details.seenCR) { details.line++; }\n            details.column = 1;\n            details.seenCR = false;\n          } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n            details.line++;\n            details.column = 1;\n            details.seenCR = true;\n          } else {\n            details.column++;\n            details.seenCR = false;\n          }\n        }\n      }\n\n      if (peg$cachedPos !== pos) {\n        if (peg$cachedPos > pos) {\n          peg$cachedPos = 0;\n          peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n        }\n        advance(peg$cachedPosDetails, peg$cachedPos, pos);\n        peg$cachedPos = pos;\n      }\n\n      return peg$cachedPosDetails;\n    }\n\n    function peg$fail(expected) {\n      if (peg$currPos < peg$maxFailPos) { return; }\n\n      if (peg$currPos > peg$maxFailPos) {\n        peg$maxFailPos = peg$currPos;\n        peg$maxFailExpected = [];\n      }\n\n      peg$maxFailExpected.push(expected);\n    }\n\n    function peg$buildException(message, expected, pos) {\n      function cleanupExpected(expected) {\n        var i = 1;\n\n        expected.sort(function(a, b) {\n          if (a.description < b.description) {\n            return -1;\n          } else if (a.description > b.description) {\n            return 1;\n          } else {\n            return 0;\n          }\n        });\n\n        while (i < expected.length) {\n          if (expected[i - 1] === expected[i]) {\n            expected.splice(i, 1);\n          } else {\n            i++;\n          }\n        }\n      }\n\n      function buildMessage(expected, found) {\n        function stringEscape(s) {\n          function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n          return s\n            .replace(/\\\\/g,   '\\\\\\\\')\n            .replace(/\"/g,    '\\\\\"')\n            .replace(/\\x08/g, '\\\\b')\n            .replace(/\\t/g,   '\\\\t')\n            .replace(/\\n/g,   '\\\\n')\n            .replace(/\\f/g,   '\\\\f')\n            .replace(/\\r/g,   '\\\\r')\n            .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n            .replace(/[\\x10-\\x1F\\x80-\\xFF]/g,    function(ch) { return '\\\\x'  + hex(ch); })\n            .replace(/[\\u0180-\\u0FFF]/g,         function(ch) { return '\\\\u0' + hex(ch); })\n            .replace(/[\\u1080-\\uFFFF]/g,         function(ch) { return '\\\\u'  + hex(ch); });\n        }\n\n        var expectedDescs = new Array(expected.length),\n            expectedDesc, foundDesc, i;\n\n        for (i = 0; i < expected.length; i++) {\n          expectedDescs[i] = expected[i].description;\n        }\n\n        expectedDesc = expected.length > 1\n          ? expectedDescs.slice(0, -1).join(\", \")\n              + \" or \"\n              + expectedDescs[expected.length - 1]\n          : expectedDescs[0];\n\n        foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n        return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n      }\n\n      var posDetails = peg$computePosDetails(pos),\n          found      = pos < input.length ? input.charAt(pos) : null;\n\n      if (expected !== null) {\n        cleanupExpected(expected);\n      }\n\n      return new SyntaxError(\n        message !== null ? message : buildMessage(expected, found),\n        expected,\n        found,\n        pos,\n        posDetails.line,\n        posDetails.column\n      );\n    }\n\n    function peg$parsestart() {\n      var s0;\n\n      s0 = peg$parsemessageFormatPattern();\n\n      return s0;\n    }\n\n    function peg$parsemessageFormatPattern() {\n      var s0, s1, s2;\n\n      s0 = peg$currPos;\n      s1 = [];\n      s2 = peg$parsemessageFormatElement();\n      if (s2 === peg$FAILED) {\n        s2 = peg$parsestring();\n        if (s2 === peg$FAILED) {\n          s2 = peg$parseoctothorpe();\n        }\n      }\n      while (s2 !== peg$FAILED) {\n        s1.push(s2);\n        s2 = peg$parsemessageFormatElement();\n        if (s2 === peg$FAILED) {\n          s2 = peg$parsestring();\n          if (s2 === peg$FAILED) {\n            s2 = peg$parseoctothorpe();\n          }\n        }\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c1(s1);\n      }\n      s0 = s1;\n\n      return s0;\n    }\n\n    function peg$parsemessageFormatElement() {\n      var s0, s1, s2, s3, s4, s5, s6;\n\n      s0 = peg$currPos;\n      if (input.charCodeAt(peg$currPos) === 123) {\n        s1 = peg$c3;\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c4); }\n      }\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parseid();\n          if (s3 !== peg$FAILED) {\n            s4 = peg$currPos;\n            if (input.charCodeAt(peg$currPos) === 44) {\n              s5 = peg$c6;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c7); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parseelementFormat();\n              if (s6 !== peg$FAILED) {\n                s5 = [s5, s6];\n                s4 = s5;\n              } else {\n                peg$currPos = s4;\n                s4 = peg$c2;\n              }\n            } else {\n              peg$currPos = s4;\n              s4 = peg$c2;\n            }\n            if (s4 === peg$FAILED) {\n              s4 = peg$c5;\n            }\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parse_();\n              if (s5 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 125) {\n                  s6 = peg$c8;\n                  peg$currPos++;\n                } else {\n                  s6 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c9); }\n                }\n                if (s6 !== peg$FAILED) {\n                  peg$reportedPos = s0;\n                  s1 = peg$c10(s3, s4);\n                  s0 = s1;\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n\n      return s0;\n    }\n\n    function peg$parseelementFormat() {\n      var s0, s1, s2, s3, s4, s5, s6, s7;\n\n      s0 = peg$currPos;\n      s1 = peg$parse_();\n      if (s1 !== peg$FAILED) {\n        if (input.substr(peg$currPos, 6) === peg$c11) {\n          s2 = peg$c11;\n          peg$currPos += 6;\n        } else {\n          s2 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c12); }\n        }\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parse_();\n          if (s3 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 44) {\n              s4 = peg$c6;\n              peg$currPos++;\n            } else {\n              s4 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c7); }\n            }\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parse_();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parsepluralFormatPattern();\n                if (s6 !== peg$FAILED) {\n                  s7 = peg$parse_();\n                  if (s7 !== peg$FAILED) {\n                    peg$reportedPos = s0;\n                    s1 = peg$c13(s2, s6);\n                    s0 = s1;\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parse_();\n        if (s1 !== peg$FAILED) {\n          if (input.substr(peg$currPos, 13) === peg$c14) {\n            s2 = peg$c14;\n            peg$currPos += 13;\n          } else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c15); }\n          }\n          if (s2 !== peg$FAILED) {\n            s3 = peg$parse_();\n            if (s3 !== peg$FAILED) {\n              if (input.charCodeAt(peg$currPos) === 44) {\n                s4 = peg$c6;\n                peg$currPos++;\n              } else {\n                s4 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c7); }\n              }\n              if (s4 !== peg$FAILED) {\n                s5 = peg$parse_();\n                if (s5 !== peg$FAILED) {\n                  s6 = peg$parsepluralFormatPattern();\n                  if (s6 !== peg$FAILED) {\n                    s7 = peg$parse_();\n                    if (s7 !== peg$FAILED) {\n                      peg$reportedPos = s0;\n                      s1 = peg$c13(s2, s6);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$c2;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n        if (s0 === peg$FAILED) {\n          s0 = peg$currPos;\n          s1 = peg$parse_();\n          if (s1 !== peg$FAILED) {\n            if (input.substr(peg$currPos, 6) === peg$c16) {\n              s2 = peg$c16;\n              peg$currPos += 6;\n            } else {\n              s2 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c17); }\n            }\n            if (s2 !== peg$FAILED) {\n              s3 = peg$parse_();\n              if (s3 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 44) {\n                  s4 = peg$c6;\n                  peg$currPos++;\n                } else {\n                  s4 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                }\n                if (s4 !== peg$FAILED) {\n                  s5 = peg$parse_();\n                  if (s5 !== peg$FAILED) {\n                    s6 = peg$parseselectFormatPattern();\n                    if (s6 !== peg$FAILED) {\n                      s7 = peg$parse_();\n                      if (s7 !== peg$FAILED) {\n                        peg$reportedPos = s0;\n                        s1 = peg$c13(s2, s6);\n                        s0 = s1;\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$c2;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$c2;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n          if (s0 === peg$FAILED) {\n            s0 = peg$currPos;\n            s1 = peg$parse_();\n            if (s1 !== peg$FAILED) {\n              s2 = peg$parseid();\n              if (s2 !== peg$FAILED) {\n                s3 = [];\n                s4 = peg$parseargStylePattern();\n                while (s4 !== peg$FAILED) {\n                  s3.push(s4);\n                  s4 = peg$parseargStylePattern();\n                }\n                if (s3 !== peg$FAILED) {\n                  peg$reportedPos = s0;\n                  s1 = peg$c18(s2, s3);\n                  s0 = s1;\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          }\n        }\n      }\n\n      return s0;\n    }\n\n    function peg$parsepluralFormatPattern() {\n      var s0, s1, s2, s3;\n\n      s0 = peg$currPos;\n      s1 = peg$parseoffsetPattern();\n      if (s1 === peg$FAILED) {\n        s1 = peg$c5;\n      }\n      if (s1 !== peg$FAILED) {\n        s2 = [];\n        s3 = peg$parsepluralForm();\n        if (s3 !== peg$FAILED) {\n          while (s3 !== peg$FAILED) {\n            s2.push(s3);\n            s3 = peg$parsepluralForm();\n          }\n        } else {\n          s2 = peg$c2;\n        }\n        if (s2 !== peg$FAILED) {\n          peg$reportedPos = s0;\n          s1 = peg$c19(s1, s2);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n\n      return s0;\n    }\n\n    function peg$parseoffsetPattern() {\n      var s0, s1, s2, s3, s4, s5, s6, s7;\n\n      s0 = peg$currPos;\n      s1 = peg$parse_();\n      if (s1 !== peg$FAILED) {\n        if (input.substr(peg$currPos, 6) === peg$c20) {\n          s2 = peg$c20;\n          peg$currPos += 6;\n        } else {\n          s2 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c21); }\n        }\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parse_();\n          if (s3 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 58) {\n              s4 = peg$c22;\n              peg$currPos++;\n            } else {\n              s4 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c23); }\n            }\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parse_();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parsedigits();\n                if (s6 !== peg$FAILED) {\n                  s7 = peg$parse_();\n                  if (s7 !== peg$FAILED) {\n                    peg$reportedPos = s0;\n                    s1 = peg$c24(s6);\n                    s0 = s1;\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n\n      return s0;\n    }\n\n    function peg$parsepluralForm() {\n      var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n      s0 = peg$currPos;\n      s1 = peg$parse_();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parsepluralKey();\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parse_();\n          if (s3 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 123) {\n              s4 = peg$c3;\n              peg$currPos++;\n            } else {\n              s4 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c4); }\n            }\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parse_();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parsemessageFormatPattern();\n                if (s6 !== peg$FAILED) {\n                  s7 = peg$parse_();\n                  if (s7 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 125) {\n                      s8 = peg$c8;\n                      peg$currPos++;\n                    } else {\n                      s8 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c9); }\n                    }\n                    if (s8 !== peg$FAILED) {\n                      peg$reportedPos = s0;\n                      s1 = peg$c25(s2, s6);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$c2;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n\n      return s0;\n    }\n\n    function peg$parsepluralKey() {\n      var s0, s1, s2;\n\n      s0 = peg$currPos;\n      s1 = peg$parseid();\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c26(s1);\n      }\n      s0 = s1;\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 61) {\n          s1 = peg$c27;\n          peg$currPos++;\n        } else {\n          s1 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c28); }\n        }\n        if (s1 !== peg$FAILED) {\n          s2 = peg$parsedigits();\n          if (s2 !== peg$FAILED) {\n            peg$reportedPos = s0;\n            s1 = peg$c24(s2);\n            s0 = s1;\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      }\n\n      return s0;\n    }\n\n    function peg$parseselectFormatPattern() {\n      var s0, s1, s2;\n\n      s0 = peg$currPos;\n      s1 = [];\n      s2 = peg$parseselectForm();\n      if (s2 !== peg$FAILED) {\n        while (s2 !== peg$FAILED) {\n          s1.push(s2);\n          s2 = peg$parseselectForm();\n        }\n      } else {\n        s1 = peg$c2;\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c29(s1);\n      }\n      s0 = s1;\n\n      return s0;\n    }\n\n    function peg$parseselectForm() {\n      var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n      s0 = peg$currPos;\n      s1 = peg$parse_();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parseid();\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parse_();\n          if (s3 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 123) {\n              s4 = peg$c3;\n              peg$currPos++;\n            } else {\n              s4 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c4); }\n            }\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parse_();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parsemessageFormatPattern();\n                if (s6 !== peg$FAILED) {\n                  s7 = peg$parse_();\n                  if (s7 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 125) {\n                      s8 = peg$c8;\n                      peg$currPos++;\n                    } else {\n                      s8 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c9); }\n                    }\n                    if (s8 !== peg$FAILED) {\n                      peg$reportedPos = s0;\n                      s1 = peg$c25(s2, s6);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$c2;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n\n      return s0;\n    }\n\n    function peg$parseargStylePattern() {\n      var s0, s1, s2, s3, s4, s5;\n\n      s0 = peg$currPos;\n      s1 = peg$parse_();\n      if (s1 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s2 = peg$c6;\n          peg$currPos++;\n        } else {\n          s2 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c7); }\n        }\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parse_();\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parseid();\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parse_();\n              if (s5 !== peg$FAILED) {\n                peg$reportedPos = s0;\n                s1 = peg$c30(s4);\n                s0 = s1;\n              } else {\n                peg$currPos = s0;\n                s0 = peg$c2;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$c2;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n\n      return s0;\n    }\n\n    function peg$parseoctothorpe() {\n      var s0, s1;\n\n      s0 = peg$currPos;\n      if (input.charCodeAt(peg$currPos) === 35) {\n        s1 = peg$c31;\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c32); }\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c33();\n      }\n      s0 = s1;\n\n      return s0;\n    }\n\n    function peg$parsestring() {\n      var s0, s1, s2;\n\n      s0 = peg$currPos;\n      s1 = [];\n      s2 = peg$parsechars();\n      if (s2 === peg$FAILED) {\n        s2 = peg$parsewhitespace();\n      }\n      if (s2 !== peg$FAILED) {\n        while (s2 !== peg$FAILED) {\n          s1.push(s2);\n          s2 = peg$parsechars();\n          if (s2 === peg$FAILED) {\n            s2 = peg$parsewhitespace();\n          }\n        }\n      } else {\n        s1 = peg$c2;\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c34(s1);\n      }\n      s0 = s1;\n\n      return s0;\n    }\n\n    function peg$parseid() {\n      var s0, s1, s2, s3, s4, s5, s6;\n\n      peg$silentFails++;\n      s0 = peg$currPos;\n      s1 = peg$parse_();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$currPos;\n        s3 = peg$currPos;\n        if (peg$c36.test(input.charAt(peg$currPos))) {\n          s4 = input.charAt(peg$currPos);\n          peg$currPos++;\n        } else {\n          s4 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c37); }\n        }\n        if (s4 !== peg$FAILED) {\n          s5 = [];\n          if (peg$c38.test(input.charAt(peg$currPos))) {\n            s6 = input.charAt(peg$currPos);\n            peg$currPos++;\n          } else {\n            s6 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c39); }\n          }\n          while (s6 !== peg$FAILED) {\n            s5.push(s6);\n            if (peg$c38.test(input.charAt(peg$currPos))) {\n              s6 = input.charAt(peg$currPos);\n              peg$currPos++;\n            } else {\n              s6 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c39); }\n            }\n          }\n          if (s5 !== peg$FAILED) {\n            s4 = [s4, s5];\n            s3 = s4;\n          } else {\n            peg$currPos = s3;\n            s3 = peg$c2;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$c2;\n        }\n        if (s3 !== peg$FAILED) {\n          s3 = input.substring(s2, peg$currPos);\n        }\n        s2 = s3;\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parse_();\n          if (s3 !== peg$FAILED) {\n            peg$reportedPos = s0;\n            s1 = peg$c40(s2);\n            s0 = s1;\n          } else {\n            peg$currPos = s0;\n            s0 = peg$c2;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$c2;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$c2;\n      }\n      peg$silentFails--;\n      if (s0 === peg$FAILED) {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c35); }\n      }\n\n      return s0;\n    }\n\n    function peg$parsechars() {\n      var s0, s1, s2;\n\n      s0 = peg$currPos;\n      s1 = [];\n      s2 = peg$parsechar();\n      if (s2 !== peg$FAILED) {\n        while (s2 !== peg$FAILED) {\n          s1.push(s2);\n          s2 = peg$parsechar();\n        }\n      } else {\n        s1 = peg$c2;\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c41(s1);\n      }\n      s0 = s1;\n\n      return s0;\n    }\n\n    function peg$parsechar() {\n      var s0, s1, s2, s3, s4, s5;\n\n      s0 = peg$currPos;\n      if (peg$c42.test(input.charAt(peg$currPos))) {\n        s1 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c43); }\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c44(s1);\n      }\n      s0 = s1;\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        if (input.substr(peg$currPos, 2) === peg$c45) {\n          s1 = peg$c45;\n          peg$currPos += 2;\n        } else {\n          s1 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c46); }\n        }\n        if (s1 !== peg$FAILED) {\n          peg$reportedPos = s0;\n          s1 = peg$c47();\n        }\n        s0 = s1;\n        if (s0 === peg$FAILED) {\n          s0 = peg$currPos;\n          if (input.substr(peg$currPos, 2) === peg$c48) {\n            s1 = peg$c48;\n            peg$currPos += 2;\n          } else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c49); }\n          }\n          if (s1 !== peg$FAILED) {\n            peg$reportedPos = s0;\n            s1 = peg$c50();\n          }\n          s0 = s1;\n          if (s0 === peg$FAILED) {\n            s0 = peg$currPos;\n            if (input.substr(peg$currPos, 2) === peg$c51) {\n              s1 = peg$c51;\n              peg$currPos += 2;\n            } else {\n              s1 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c52); }\n            }\n            if (s1 !== peg$FAILED) {\n              peg$reportedPos = s0;\n              s1 = peg$c53();\n            }\n            s0 = s1;\n            if (s0 === peg$FAILED) {\n              s0 = peg$currPos;\n              if (input.substr(peg$currPos, 2) === peg$c54) {\n                s1 = peg$c54;\n                peg$currPos += 2;\n              } else {\n                s1 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c55); }\n              }\n              if (s1 !== peg$FAILED) {\n                peg$reportedPos = s0;\n                s1 = peg$c56();\n              }\n              s0 = s1;\n              if (s0 === peg$FAILED) {\n                s0 = peg$currPos;\n                if (input.substr(peg$currPos, 2) === peg$c57) {\n                  s1 = peg$c57;\n                  peg$currPos += 2;\n                } else {\n                  s1 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c58); }\n                }\n                if (s1 !== peg$FAILED) {\n                  s2 = peg$parsehexDigit();\n                  if (s2 !== peg$FAILED) {\n                    s3 = peg$parsehexDigit();\n                    if (s3 !== peg$FAILED) {\n                      s4 = peg$parsehexDigit();\n                      if (s4 !== peg$FAILED) {\n                        s5 = peg$parsehexDigit();\n                        if (s5 !== peg$FAILED) {\n                          peg$reportedPos = s0;\n                          s1 = peg$c59(s2, s3, s4, s5);\n                          s0 = s1;\n                        } else {\n                          peg$currPos = s0;\n                          s0 = peg$c2;\n                        }\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$c2;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$c2;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$c2;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$c2;\n                }\n              }\n            }\n          }\n        }\n      }\n\n      return s0;\n    }\n\n    function peg$parsedigits() {\n      var s0, s1, s2;\n\n      s0 = peg$currPos;\n      s1 = [];\n      if (peg$c60.test(input.charAt(peg$currPos))) {\n        s2 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s2 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c61); }\n      }\n      if (s2 !== peg$FAILED) {\n        while (s2 !== peg$FAILED) {\n          s1.push(s2);\n          if (peg$c60.test(input.charAt(peg$currPos))) {\n            s2 = input.charAt(peg$currPos);\n            peg$currPos++;\n          } else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c61); }\n          }\n        }\n      } else {\n        s1 = peg$c2;\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c62(s1);\n      }\n      s0 = s1;\n\n      return s0;\n    }\n\n    function peg$parsehexDigit() {\n      var s0;\n\n      if (peg$c63.test(input.charAt(peg$currPos))) {\n        s0 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c64); }\n      }\n\n      return s0;\n    }\n\n    function peg$parse_() {\n      var s0, s1, s2;\n\n      peg$silentFails++;\n      s0 = peg$currPos;\n      s1 = [];\n      s2 = peg$parsewhitespace();\n      while (s2 !== peg$FAILED) {\n        s1.push(s2);\n        s2 = peg$parsewhitespace();\n      }\n      if (s1 !== peg$FAILED) {\n        peg$reportedPos = s0;\n        s1 = peg$c66(s1);\n      }\n      s0 = s1;\n      peg$silentFails--;\n      if (s0 === peg$FAILED) {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c65); }\n      }\n\n      return s0;\n    }\n\n    function peg$parsewhitespace() {\n      var s0;\n\n      if (peg$c67.test(input.charAt(peg$currPos))) {\n        s0 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c68); }\n      }\n\n      return s0;\n    }\n\n    peg$result = peg$startRuleFunction();\n\n    if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n      return peg$result;\n    } else {\n      if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n        peg$fail({ type: \"end\", description: \"end of input\" });\n      }\n\n      throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n    }\n  }\n\n  return {\n    SyntaxError: SyntaxError,\n    parse:       parse\n  };\n}()).parse;\n\n\n/** @file messageformat.js - ICU PluralFormat + SelectFormat for JavaScript\n *  @author Alex Sexton - @SlexAxton\n *  @version 0.3.0-1\n *  @copyright 2012-2015 Alex Sexton, Eemeli Aro, and Contributors\n *  @license To use or fork, MIT. To contribute back, Dojo CLA  */\n\n\n/** Utility function for quoting an Object's key value iff required\n *  @private  */\nfunction propname(key, obj) {\n  if (/^[A-Z_$][0-9A-Z_$]*$/i.test(key)) {\n    return obj ? obj + '.' + key : key;\n  } else {\n    var jkey = JSON.stringify(key);\n    return obj ? obj + '[' + jkey + ']' : jkey;\n  }\n};\n\n\n/** Create a new message formatter\n *\n *  @class\n *  @global\n *  @param {string|string[]} [locale=\"en\"] - The locale to use, with fallbacks\n *  @param {function} [pluralFunc] - Optional custom pluralization function\n *  @param {function[]} [formatters] - Optional custom formatting functions  */\nfunction MessageFormat(locale, pluralFunc, formatters) {\n  this.lc = [locale];  \n  this.runtime.pluralFuncs = {};\n  this.runtime.pluralFuncs[this.lc[0]] = pluralFunc;\n  this.runtime.fmt = {};\n  if (formatters) for (var f in formatters) {\n    this.runtime.fmt[f] = formatters[f];\n  }\n}\n\n\n\n\n/** Parse an input string to its AST\n *\n *  Precompiled from `lib/messageformat-parser.pegjs` by\n *  {@link http://pegjs.org/ PEG.js}. Included in MessageFormat object\n *  to enable testing.\n *\n *  @private  */\n\n\n\n/** Pluralization functions from\n *  {@link http://github.com/eemeli/make-plural.js make-plural}\n *\n *  @memberof MessageFormat\n *  @type Object.<string,function>  */\nMessageFormat.plurals = {};\n\n\n/** Default number formatting functions in the style of ICU's\n *  {@link http://icu-project.org/apiref/icu4j/com/ibm/icu/text/MessageFormat.html simpleArg syntax}\n *  implemented using the\n *  {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl Intl}\n *  object defined by ECMA-402.\n *\n *  **Note**: Intl is not defined in default Node until 0.11.15 / 0.12.0, so\n *  earlier versions require a {@link https://www.npmjs.com/package/intl polyfill}.\n *  Therefore {@link MessageFormat.withIntlSupport} needs to be true for these\n *  functions to be available for inclusion in the output.\n *\n *  @see MessageFormat#setIntlSupport\n *\n *  @namespace\n *  @memberof MessageFormat\n *  @property {function} number - Represent a number as an integer, percent or currency value\n *  @property {function} date - Represent a date as a full/long/default/short string\n *  @property {function} time - Represent a time as a full/long/default/short string\n *\n *  @example\n *  > var MessageFormat = require('messageformat');\n *  > var mf = (new MessageFormat('en')).setIntlSupport(true);\n *  > mf.currency = 'EUR';\n *  > var mfunc = mf.compile(\"The total is {V,number,currency}.\");\n *  > mfunc({V:5.5})\n *  \"The total is €5.50.\"\n *\n *  @example\n *  > var MessageFormat = require('messageformat');\n *  > var mf = new MessageFormat('en', null, {number: MessageFormat.number});\n *  > mf.currency = 'EUR';\n *  > var mfunc = mf.compile(\"The total is {V,number,currency}.\");\n *  > mfunc({V:5.5})\n *  \"The total is €5.50.\"  */\nMessageFormat.formatters = {};\n\n/** Enable or disable support for the default formatters, which require the\n *  `Intl` object. Note that this can't be autodetected, as the environment\n *  in which the formatted text is compiled into Javascript functions is not\n *  necessarily the same environment in which they will get executed.\n *\n *  @see MessageFormat.formatters\n *\n *  @memberof MessageFormat\n *  @param {boolean} [enable=true]\n *  @returns {Object} The MessageFormat instance, to allow for chaining\n *  @example\n *  > var Intl = require('intl');\n *  > var MessageFormat = require('messageformat');\n *  > var mf = (new MessageFormat('en')).setIntlSupport(true);\n *  > mf.currency = 'EUR';\n *  > mf.compile(\"The total is {V,number,currency}.\")({V:5.5});\n *  \"The total is €5.50.\"  */\n\n\n\n/** A set of utility functions that are called by the compiled Javascript\n *  functions, these are included locally in the output of {@link\n *  MessageFormat#compile compile()}.\n *\n *  @namespace\n *  @memberof MessageFormat  */\nMessageFormat.prototype.runtime = {\n\n  /** Utility function for `#` in plural rules\n   *\n   *  @param {number} value - The value to operate on\n   *  @param {number} [offset=0] - An optional offset, set by the surrounding context  */\n  number: function(value, offset) {\n    if (isNaN(value)) throw new Error(\"'\" + value + \"' isn't a number.\");\n    return value - (offset || 0);\n  },\n\n  /** Utility function for `{N, plural|selectordinal, ...}`\n   *\n   *  @param {number} value - The key to use to find a pluralization rule\n   *  @param {number} offset - An offset to apply to `value`\n   *  @param {function} lcfunc - A locale function from `pluralFuncs`\n   *  @param {Object.<string,string>} data - The object from which results are looked up\n   *  @param {?boolean} isOrdinal - If true, use ordinal rather than cardinal rules\n   *  @returns {string} The result of the pluralization  */\n  plural: function(value, offset, lcfunc, data, isOrdinal) {\n    if ({}.hasOwnProperty.call(data, value)) return data[value]();\n    if (offset) value -= offset;\n    var key = lcfunc(value, isOrdinal);\n    if (key in data) return data[key]();\n    return data.other();\n  },\n\n  /** Utility function for `{N, select, ...}`\n   *\n   *  @param {number} value - The key to use to find a selection\n   *  @param {Object.<string,string>} data - The object from which results are looked up\n   *  @returns {string} The result of the select statement  */\n  select: function(value, data) {\n    if ({}.hasOwnProperty.call(data, value)) return data[value]();\n    return data.other()\n  },\n\n  /** Pluralization functions included in compiled output\n   *  @instance\n   *  @type Object.<string,function>  */\n  pluralFuncs: {},\n\n  /** Custom formatting functions called by `{var, fn[, args]*}` syntax\n   *\n   *  For examples, see {@link MessageFormat.formatters}\n   *\n   *  @instance\n   *  @see MessageFormat.formatters\n   *  @type Object.<string,function>  */\n  fmt: {},\n\n  /** Custom stringifier to clean up browser inconsistencies\n   *  @instance  */\n  toString: function () {\n    var _stringify = function(o, level) {\n      if (typeof o != 'object') {\n        var funcStr = o.toString().replace(/^(function )\\w*/, '$1');\n        var indent = /([ \\t]*)\\S.*$/.exec(funcStr);\n        return indent ? funcStr.replace(new RegExp('^' + indent[1], 'mg'), '') : funcStr;\n      }\n      var s = [];\n      for (var i in o) if (i != 'toString') {\n        if (level == 0) s.push('var ' + i + ' = ' + _stringify(o[i], level + 1) + ';\\n');\n        else s.push(propname(i) + ': ' + _stringify(o[i], level + 1));\n      }\n      if (level == 0) return s.join('');\n      if (s.length == 0) return '{}';\n      var indent = '  '; while (--level) indent += '  ';\n      return '{\\n' + s.join(',\\n').replace(/^/gm, indent) + '\\n}';\n    };\n    return _stringify(this, 0);\n  }\n};\n\n\n/** Recursively map an AST to its resulting string\n *\n *  @memberof MessageFormat\n *\n *  @param ast - the Ast node for which the JS code should be generated\n *\n *  @private  */\nMessageFormat.prototype._precompile = function(ast, data) {\n  data = data || { keys: {}, offset: {} };\n  var r = [], i, tmp, args = [];\n\n  switch ( ast.type ) {\n    case 'messageFormatPattern':\n      for ( i = 0; i < ast.statements.length; ++i ) {\n        r.push(this._precompile( ast.statements[i], data ));\n      }\n      tmp = r.join(' + ') || '\"\"';\n      return data.pf_count ? tmp : 'function(d) { return ' + tmp + '; }';\n\n    case 'messageFormatElement':\n      data.pf_count = data.pf_count || 0;\n      if ( ast.output ) {\n        return propname(ast.argumentIndex, 'd');\n      }\n      else {\n        data.keys[data.pf_count] = ast.argumentIndex;\n        return this._precompile( ast.elementFormat, data );\n      }\n      return '';\n\n    case 'elementFormat':\n      args = [ propname(data.keys[data.pf_count], 'd') ];\n      switch (ast.key) {\n        case 'select':\n          args.push(this._precompile(ast.val, data));\n          return 'select(' + args.join(', ') + ')';\n        case 'selectordinal':\n          args = args.concat([ 0, propname(this.lc[0], 'pluralFuncs'), this._precompile(ast.val, data), 1 ]);\n          return 'plural(' + args.join(', ') + ')';\n        case 'plural':\n          data.offset[data.pf_count || 0] = ast.val.offset || 0;\n          args = args.concat([ data.offset[data.pf_count] || 0, propname(this.lc[0], 'pluralFuncs'), this._precompile(ast.val, data) ]);\n          return 'plural(' + args.join(', ') + ')';\n        default:\n          if (this.withIntlSupport && !(ast.key in this.runtime.fmt) && (ast.key in MessageFormat.formatters)) {\n            tmp = MessageFormat.formatters[ast.key];\n            this.runtime.fmt[ast.key] = (typeof tmp(this) == 'function') ? tmp(this) : tmp;\n          }\n          args.push(JSON.stringify(this.lc));\n          if (ast.val && ast.val.length) args.push(JSON.stringify(ast.val.length == 1 ? ast.val[0] : ast.val));\n          return 'fmt.' + ast.key + '(' + args.join(', ') + ')';\n      }\n\n    case 'pluralFormatPattern':\n    case 'selectFormatPattern':\n      data.pf_count = data.pf_count || 0;\n      if (ast.type == 'selectFormatPattern') data.offset[data.pf_count] = 0;\n      var needOther = true;\n      for (i = 0; i < ast.pluralForms.length; ++i) {\n        var key = ast.pluralForms[i].key;\n        if (key === 'other') needOther = false;\n        var data_copy = JSON.parse(JSON.stringify(data));\n        data_copy.pf_count++;\n        r.push(propname(key) + ': function() { return ' + this._precompile(ast.pluralForms[i].val, data_copy) + ';}');\n      }\n      if (needOther) throw new Error(\"No 'other' form found in \" + ast.type + \" \" + data.pf_count);\n      return '{ ' + r.join(', ') + ' }';\n\n    case 'string':\n      return JSON.stringify(ast.val || \"\");\n\n    case 'octothorpe':\n      if (!data.pf_count) return '\"#\"';\n      args = [ propname(data.keys[data.pf_count-1], 'd') ];\n      if (data.offset[data.pf_count-1]) args.push(data.offset[data.pf_count-1]);\n      return 'number(' + args.join(', ') + ')';\n\n    default:\n      throw new Error( 'Bad AST type: ' + ast.type );\n  }\n};\n\n/** Compile messages into an executable function with clean string\n *  representation.\n *\n *  If `messages` is a single string including ICU MessageFormat declarations,\n *  `opt` is ignored and the returned function takes a single Object parameter\n *  `d` representing each of the input's defined variables. The returned\n *  function will be defined in a local scope that includes all the required\n *  runtime variables.\n *\n *  If `messages` is a map of keys to strings, or a map of namespace keys to\n *  such key/string maps, the returned function will fill the specified global\n *  with javascript functions matching the structure of the input. In such use,\n *  the output of `compile()` is expected to be serialized using `.toString()`,\n *  and will include definitions of the runtime functions. If `opt.global` is\n *  null, calling the output function will return the object itself.\n *\n *  Together, the input parameters should match the following patterns:\n *  ```js\n *  messages = \"string\" || { key0: \"string0\", key1: \"string1\", ... } || {\n *    ns0: { key0: \"string0\", key1: \"string1\", ...  },\n *    ns1: { key0: \"string0\", key1: \"string1\", ...  },\n *    ...\n *  }\n *\n *  opt = null || {\n *    locale: null || {\n *      ns0: \"lc0\" || [ \"lc0\", ... ],\n *      ns1: \"lc1\" || [ \"lc1\", ... ],\n *      ...\n *    },\n *    global: null || \"module.exports\" || \"exports\" || \"i18n\" || ...\n *  }\n *  ```\n *\n *  @memberof MessageFormat\n *  @param {string|Object}\n *      messages - The input message(s) to be compiled, in ICU MessageFormat\n *  @param {Object} [opt={}] - Options controlling output for non-simple intput\n *  @param {Object} [opt.locale] - The locales to use for the messages, with a\n *      structure matching that of `messages`\n *  @param {string} [opt.global=\"\"] - The global variable that the output\n *      function should use, or a null string for none. \"exports\" and\n *      \"module.exports\" are recognised as special cases.\n *  @returns {function} The first match found for the given locale(s)\n *\n *  @example\n * > var MessageFormat = require('messageformat'),\n * ...   mf = new MessageFormat('en'),\n * ...   mfunc0 = mf.compile('A {TYPE} example.');\n * > mfunc0({TYPE:'simple'})\n * 'A simple example.'\n * > mfunc0.toString()\n * 'function (d) { return \"A \" + d.TYPE + \" example.\"; }'\n *\n *  @example\n * > var msgSet = { a: 'A {TYPE} example.',\n * ...              b: 'This has {COUNT, plural, one{one member} other{# members}}.' },\n * ...   mfuncSet = mf.compile(msgSet);\n * > mfuncSet().a({TYPE:'more complex'})\n * 'A more complex example.'\n * > mfuncSet().b({COUNT:2})\n * 'This has 2 members.'\n *\n * > console.log(mfuncSet.toString())\n * function anonymous() {\n * var number = function (value, offset) {\n *   if (isNaN(value)) throw new Error(\"'\" + value + \"' isn't a number.\");\n *   return value - (offset || 0);\n * };\n * var plural = function (value, offset, lcfunc, data, isOrdinal) {\n *   if ({}.hasOwnProperty.call(data, value)) return data[value]();\n *   if (offset) value -= offset;\n *   var key = lcfunc(value, isOrdinal);\n *   if (key in data) return data[key]();\n *   return data.other();\n * };\n * var select = function (value, data) {\n *   if ({}.hasOwnProperty.call(data, value)) return data[value]();\n *   return data.other()\n * };\n * var pluralFuncs = {\n *   en: function (n, ord) {\n *     var s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n,\n *         n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);\n *     if (ord) return (n10 == 1 && n100 != 11) ? 'one'\n *         : (n10 == 2 && n100 != 12) ? 'two'\n *         : (n10 == 3 && n100 != 13) ? 'few'\n *         : 'other';\n *     return (n == 1 && v0) ? 'one' : 'other';\n *   }\n * };\n * var fmt = {};\n *\n * return {\n *   a: function(d) { return \"A \" + d.TYPE + \" example.\"; },\n *   b: function(d) { return \"This has \" + plural(d.COUNT, 0, pluralFuncs.en, { one: function() { return \"one member\";}, other: function() { return number(d.COUNT)+\" members\";} }) + \".\"; }\n * }\n * }\n *\n *  @example\n * > mf.runtime.pluralFuncs.fi = MessageFormat.plurals.fi;\n * > var multiSet = { en: { a: 'A {TYPE} example.',\n * ...                      b: 'This is the {COUNT, selectordinal, one{#st} two{#nd} few{#rd} other{#th}} example.' },\n * ...                fi: { a: '{TYPE} esimerkki.',\n * ...                      b: 'Tämä on {COUNT, selectordinal, other{#.}} esimerkki.' } },\n * ...   multiSetLocales = { en: 'en', fi: 'fi' },\n * ...   mfuncSet = mf.compile(multiSet, { locale: multiSetLocales, global: 'i18n' });\n * > mfuncSet(this);\n * > i18n.en.b({COUNT:3})\n * 'This is the 3rd example.'\n * > i18n.fi.b({COUNT:3})\n * 'Tämä on 3. esimerkki.'  */\nMessageFormat.prototype.compile = function ( messages, opt ) {\n  var r = {}, lc0 = this.lc,\n      compileMsg = function(self, msg) {\n        try {\n          var ast = MessageFormat._parse(msg);\n          return self._precompile(ast);\n        } catch (e) {\n          throw new Error((ast ? 'Precompiler' : 'Parser') + ' error: ' + e.toString());\n        }\n      },\n      stringify = function(r, level) {\n        if (!level) level = 0;\n        if (typeof r != 'object') return r;\n        var o = [], indent = '';\n        for (var i = 0; i < level; ++i) indent += '  ';\n        for (var k in r) o.push('\\n' + indent + '  ' + propname(k) + ': ' + stringify(r[k], level + 1));\n        return '{' + o.join(',') + '\\n' + indent + '}';\n      };\n\n  if (typeof messages == 'string') {\n    var f = new Function(\n        'number, plural, select, pluralFuncs, fmt',\n        'return ' + compileMsg(this, messages));\n    return f(this.runtime.number, this.runtime.plural, this.runtime.select,\n        this.runtime.pluralFuncs, this.runtime.fmt);\n  }\n\n  opt = opt || {};\n\n  for (var ns in messages) {\n    if (opt.locale) this.lc = opt.locale[ns] && [].concat(opt.locale[ns]) || lc0;\n    if (typeof messages[ns] == 'string') {\n      try { r[ns] = compileMsg(this, messages[ns]); }\n      catch (e) { e.message = e.message.replace(':', ' with `' + ns + '`:'); throw e; }\n    } else {\n      r[ns] = {};\n      for (var key in messages[ns]) {\n        try { r[ns][key] = compileMsg(this, messages[ns][key]); }\n        catch (e) { e.message = e.message.replace(':', ' with `' + key + '` in `' + ns + '`:'); throw e; }\n      }\n    }\n  }\n\n  this.lc = lc0;\n  var s = this.runtime.toString() + '\\n';\n  switch (opt.global || '') {\n    case 'exports':\n      var o = [];\n      for (var k in r) o.push(propname(k, 'exports') + ' = ' + stringify(r[k]));\n      return new Function(s + o.join(';\\n'));\n    case 'module.exports':\n      return new Function(s + 'module.exports = ' + stringify(r));\n    case '':\n      return new Function(s + 'return ' + stringify(r));\n    default:\n      return new Function('G', s + propname(opt.global, 'G') + ' = ' + stringify(r));\n  }\n};\n\n\nreturn MessageFormat;\n}());\n/* jshint ignore:end */\n\n\nvar createErrorPluralModulePresence = function() {\n\treturn createError( \"E_MISSING_PLURAL_MODULE\", \"Plural module not loaded.\" );\n};\n\n\n\n\nvar validateMessageBundle = function( cldr ) {\n\tvalidate(\n\t\t\"E_MISSING_MESSAGE_BUNDLE\",\n\t\t\"Missing message bundle for locale `{locale}`.\",\n\t\tcldr.attributes.bundle && cldr.get( \"globalize-messages/{bundle}\" ) !== undefined,\n\t\t{\n\t\t\tlocale: cldr.locale\n\t\t}\n\t);\n};\n\n\n\n\nvar validateMessagePresence = function( path, value ) {\n\tpath = path.join( \"/\" );\n\tvalidate( \"E_MISSING_MESSAGE\", \"Missing required message content `{path}`.\",\n\t\tvalue !== undefined, { path: path } );\n};\n\n\n\n\nvar validateMessageType = function( path, value ) {\n\tpath = path.join( \"/\" );\n\tvalidate(\n\t\t\"E_INVALID_MESSAGE\",\n\t\t\"Invalid message content `{path}`. {expected} expected.\",\n\t\ttypeof value === \"string\",\n\t\t{\n\t\t\texpected: \"a string\",\n\t\t\tpath: path\n\t\t}\n\t);\n};\n\n\n\n\nvar validateParameterTypeMessageVariables = function( value, name ) {\n\tvalidateParameterType(\n\t\tvalue,\n\t\tname,\n\t\tvalue === undefined || isPlainObject( value ) || Array.isArray( value ),\n\t\t\"Array or Plain Object\"\n\t);\n};\n\n\n\n\nvar messageFormatterFn = function( formatter ) {\n\treturn function messageFormatter( variables ) {\n\t\tif ( typeof variables === \"number\" || typeof variables === \"string\" ) {\n\t\t\tvariables = [].slice.call( arguments, 0 );\n\t\t}\n\t\tvalidateParameterTypeMessageVariables( variables, \"variables\" );\n\t\treturn formatter( variables );\n\t};\n};\n\n\n\n\nvar messageFormatterRuntimeBind = function( cldr, messageformatter ) {\n\tvar locale = cldr.locale,\n\t\torigToString = messageformatter.toString;\n\n\tmessageformatter.toString = function() {\n\t\tvar argNames, argValues, output,\n\t\t\targs = {};\n\n\t\t// Properly adjust SlexAxton/messageformat.js compiled variables with Globalize variables:\n\t\toutput = origToString.call( messageformatter );\n\n\t\tif ( /number\\(/.test( output ) ) {\n\t\t\targs.number = \"messageFormat.number\";\n\t\t}\n\n\t\tif ( /plural\\(/.test( output ) ) {\n\t\t\targs.plural = \"messageFormat.plural\";\n\t\t}\n\n\t\tif ( /select\\(/.test( output ) ) {\n\t\t\targs.select = \"messageFormat.select\";\n\t\t}\n\n\t\toutput.replace( /pluralFuncs(\\[([^\\]]+)\\]|\\.([a-zA-Z]+))/, function( match ) {\n\t\t\targs.pluralFuncs = \"{\" +\n\t\t\t\t\"\\\"\" + locale + \"\\\": Globalize(\\\"\" + locale + \"\\\").pluralGenerator()\" +\n\t\t\t\t\"}\";\n\t\t\treturn match;\n\t\t});\n\n\t\targNames = Object.keys( args ).join( \", \" );\n\t\targValues = Object.keys( args ).map(function( key ) {\n\t\t\treturn args[ key ];\n\t\t}).join( \", \" );\n\n\t\treturn \"(function( \" + argNames + \" ) {\\n\" +\n\t\t\t\"  return \" + output + \"\\n\" +\n\t\t\t\"})(\" + argValues + \")\";\n\t};\n\n\treturn messageformatter;\n};\n\n\n\n\nvar slice = [].slice;\n\n/**\n * .loadMessages( json )\n *\n * @json [JSON]\n *\n * Load translation data.\n */\nGlobalize.loadMessages = function( json ) {\n\tvar locale,\n\t\tcustomData = {\n\t\t\t\"globalize-messages\": json,\n\t\t\t\"main\": {}\n\t\t};\n\n\tvalidateParameterPresence( json, \"json\" );\n\tvalidateParameterTypePlainObject( json, \"json\" );\n\n\t// Set available bundles by populating customData main dataset.\n\tfor ( locale in json ) {\n\t\tif ( json.hasOwnProperty( locale ) ) {\n\t\t\tcustomData.main[ locale ] = {};\n\t\t}\n\t}\n\n\tCldr.load( customData );\n};\n\n/**\n * .messageFormatter( path )\n *\n * @path [String or Array]\n *\n * Format a message given its path.\n */\nGlobalize.messageFormatter =\nGlobalize.prototype.messageFormatter = function( path ) {\n\tvar cldr, formatter, message, pluralGenerator, returnFn,\n\t\targs = slice.call( arguments, 0 );\n\n\tvalidateParameterPresence( path, \"path\" );\n\tvalidateParameterType( path, \"path\", typeof path === \"string\" || Array.isArray( path ),\n\t\t\"a String nor an Array\" );\n\n\tpath = alwaysArray( path );\n\tcldr = this.cldr;\n\n\tvalidateDefaultLocale( cldr );\n\tvalidateMessageBundle( cldr );\n\n\tmessage = cldr.get( [ \"globalize-messages/{bundle}\" ].concat( path ) );\n\tvalidateMessagePresence( path, message );\n\n\t// If message is an Array, concatenate it.\n\tif ( Array.isArray( message ) ) {\n\t\tmessage = message.join( \" \" );\n\t}\n\tvalidateMessageType( path, message );\n\n\t// Is plural module present? Yes, use its generator. Nope, use an error generator.\n\tpluralGenerator = this.plural !== undefined ?\n\t\tthis.pluralGenerator() :\n\t\tcreateErrorPluralModulePresence;\n\n\tformatter = new MessageFormat( cldr.locale, pluralGenerator ).compile( message );\n\n\treturnFn = messageFormatterFn( formatter );\n\n\truntimeBind( args, cldr, returnFn,\n\t\t[ messageFormatterRuntimeBind( cldr, formatter ), pluralGenerator ] );\n\n\treturn returnFn;\n};\n\n/**\n * .formatMessage( path [, variables] )\n *\n * @path [String or Array]\n *\n * @variables [Number, String, Array or Object]\n *\n * Format a message given its path.\n */\nGlobalize.formatMessage =\nGlobalize.prototype.formatMessage = function( path /* , variables */ ) {\n\treturn this.messageFormatter( path ).apply( {}, slice.call( arguments, 1 ) );\n};\n\nreturn Globalize;\n\n\n\n\n}));\n\n","/**\n * CLDR JavaScript Library v0.5.4\n * http://jquery.com/\n *\n * Copyright 2013 Rafael Xavier de Souza\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2020-10-22T15:56Z\n */\n/*!\n * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier\n * http://git.io/h4lmVg\n */\n\n// Cldr\nmodule.exports = require( \"./cldr\" );\n\n// Extent Cldr with the following modules\nrequire( \"./cldr/event\" );\nrequire( \"./cldr/supplemental\" );\nrequire( \"./cldr/unresolved\" );\n","/**\n * CLDR JavaScript Library v0.5.4\n * http://jquery.com/\n *\n * Copyright 2013 Rafael Xavier de Souza\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2020-10-22T15:56Z\n */\n/*!\n * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier\n * http://git.io/h4lmVg\n */\n(function( root, factory ) {\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\t// AMD.\n\t\tdefine( factory );\n\t} else if ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// Node. CommonJS.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Global\n\t\troot.Cldr = factory();\n\t}\n\n}( this, function() {\n\n\n\tvar arrayIsArray = Array.isArray || function( obj ) {\n\t\treturn Object.prototype.toString.call( obj ) === \"[object Array]\";\n\t};\n\n\n\n\n\tvar pathNormalize = function( path, attributes ) {\n\t\tif ( arrayIsArray( path ) ) {\n\t\t\tpath = path.join( \"/\" );\n\t\t}\n\t\tif ( typeof path !== \"string\" ) {\n\t\t\tthrow new Error( \"invalid path \\\"\" + path + \"\\\"\" );\n\t\t}\n\t\t// 1: Ignore leading slash `/`\n\t\t// 2: Ignore leading `cldr/`\n\t\tpath = path\n\t\t\t.replace( /^\\// , \"\" ) /* 1 */\n\t\t\t.replace( /^cldr\\// , \"\" ); /* 2 */\n\n\t\t// Replace {attribute}'s\n\t\tpath = path.replace( /{[a-zA-Z]+}/g, function( name ) {\n\t\t\tname = name.replace( /^{([^}]*)}$/, \"$1\" );\n\t\t\treturn attributes[ name ];\n\t\t});\n\n\t\treturn path.split( \"/\" );\n\t};\n\n\n\n\n\tvar arraySome = function( array, callback ) {\n\t\tvar i, length;\n\t\tif ( array.some ) {\n\t\t\treturn array.some( callback );\n\t\t}\n\t\tfor ( i = 0, length = array.length; i < length; i++ ) {\n\t\t\tif ( callback( array[ i ], i, array ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\n\n\n\t/**\n\t * Return the maximized language id as defined in\n\t * http://www.unicode.org/reports/tr35/#Likely_Subtags\n\t * 1. Canonicalize.\n\t * 1.1 Make sure the input locale is in canonical form: uses the right\n\t * separator, and has the right casing.\n\t * TODO Right casing? What df? It seems languages are lowercase, scripts are\n\t * Capitalized, territory is uppercase. I am leaving this as an exercise to\n\t * the user.\n\t *\n\t * 1.2 Replace any deprecated subtags with their canonical values using the\n\t * <alias> data in supplemental metadata. Use the first value in the\n\t * replacement list, if it exists. Language tag replacements may have multiple\n\t * parts, such as \"sh\" ➞ \"sr_Latn\" or mo\" ➞ \"ro_MD\". In such a case, the\n\t * original script and/or region are retained if there is one. Thus\n\t * \"sh_Arab_AQ\" ➞ \"sr_Arab_AQ\", not \"sr_Latn_AQ\".\n\t * TODO What <alias> data?\n\t *\n\t * 1.3 If the tag is grandfathered (see <variable id=\"$grandfathered\"\n\t * type=\"choice\"> in the supplemental data), then return it.\n\t * TODO grandfathered?\n\t *\n\t * 1.4 Remove the script code 'Zzzz' and the region code 'ZZ' if they occur.\n\t * 1.5 Get the components of the cleaned-up source tag (languages, scripts,\n\t * and regions), plus any variants and extensions.\n\t * 2. Lookup. Lookup each of the following in order, and stop on the first\n\t * match:\n\t * 2.1 languages_scripts_regions\n\t * 2.2 languages_regions\n\t * 2.3 languages_scripts\n\t * 2.4 languages\n\t * 2.5 und_scripts\n\t * 3. Return\n\t * 3.1 If there is no match, either return an error value, or the match for\n\t * \"und\" (in APIs where a valid language tag is required).\n\t * 3.2 Otherwise there is a match = languagem_scriptm_regionm\n\t * 3.3 Let xr = xs if xs is not empty, and xm otherwise.\n\t * 3.4 Return the language tag composed of languager _ scriptr _ regionr +\n\t * variants + extensions.\n\t *\n\t * @subtags [Array] normalized language id subtags tuple (see init.js).\n\t */\n\tvar coreLikelySubtags = function( Cldr, cldr, subtags, options ) {\n\t\tvar match, matchFound,\n\t\t\tlanguage = subtags[ 0 ],\n\t\t\tscript = subtags[ 1 ],\n\t\t\tsep = Cldr.localeSep,\n\t\t\tterritory = subtags[ 2 ],\n\t\t\tvariants = subtags.slice( 3, 4 );\n\t\toptions = options || {};\n\n\t\t// Skip if (language, script, territory) is not empty [3.3]\n\t\tif ( language !== \"und\" && script !== \"Zzzz\" && territory !== \"ZZ\" ) {\n\t\t\treturn [ language, script, territory ].concat( variants );\n\t\t}\n\n\t\t// Skip if no supplemental likelySubtags data is present\n\t\tif ( typeof cldr.get( \"supplemental/likelySubtags\" ) === \"undefined\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// [2]\n\t\tmatchFound = arraySome([\n\t\t\t[ language, script, territory ],\n\t\t\t[ language, territory ],\n\t\t\t[ language, script ],\n\t\t\t[ language ],\n\t\t\t[ \"und\", script ]\n\t\t], function( test ) {\n\t\t\treturn match = !(/\\b(Zzzz|ZZ)\\b/).test( test.join( sep ) ) /* [1.4] */ && cldr.get( [ \"supplemental/likelySubtags\", test.join( sep ) ] );\n\t\t});\n\n\t\t// [3]\n\t\tif ( matchFound ) {\n\t\t\t// [3.2 .. 3.4]\n\t\t\tmatch = match.split( sep );\n\t\t\treturn [\n\t\t\t\tlanguage !== \"und\" ? language : match[ 0 ],\n\t\t\t\tscript !== \"Zzzz\" ? script : match[ 1 ],\n\t\t\t\tterritory !== \"ZZ\" ? territory : match[ 2 ]\n\t\t\t].concat( variants );\n\t\t} else if ( options.force ) {\n\t\t\t// [3.1.2]\n\t\t\treturn cldr.get( \"supplemental/likelySubtags/und\" ).split( sep );\n\t\t} else {\n\t\t\t// [3.1.1]\n\t\t\treturn;\n\t\t}\n\t};\n\n\n\n\t/**\n\t * Given a locale, remove any fields that Add Likely Subtags would add.\n\t * http://www.unicode.org/reports/tr35/#Likely_Subtags\n\t * 1. First get max = AddLikelySubtags(inputLocale). If an error is signaled,\n\t * return it.\n\t * 2. Remove the variants from max.\n\t * 3. Then for trial in {language, language _ region, language _ script}. If\n\t * AddLikelySubtags(trial) = max, then return trial + variants.\n\t * 4. If you do not get a match, return max + variants.\n\t * \n\t * @maxLanguageId [Array] maxLanguageId tuple (see init.js).\n\t */\n\tvar coreRemoveLikelySubtags = function( Cldr, cldr, maxLanguageId ) {\n\t\tvar match, matchFound,\n\t\t\tlanguage = maxLanguageId[ 0 ],\n\t\t\tscript = maxLanguageId[ 1 ],\n\t\t\tterritory = maxLanguageId[ 2 ],\n\t\t\tvariants = maxLanguageId[ 3 ];\n\n\t\t// [3]\n\t\tmatchFound = arraySome([\n\t\t\t[ [ language, \"Zzzz\", \"ZZ\" ], [ language ] ],\n\t\t\t[ [ language, \"Zzzz\", territory ], [ language, territory ] ],\n\t\t\t[ [ language, script, \"ZZ\" ], [ language, script ] ]\n\t\t], function( test ) {\n\t\t\tvar result = coreLikelySubtags( Cldr, cldr, test[ 0 ] );\n\t\t\tmatch = test[ 1 ];\n\t\t\treturn result && result[ 0 ] === maxLanguageId[ 0 ] &&\n\t\t\t\tresult[ 1 ] === maxLanguageId[ 1 ] &&\n\t\t\t\tresult[ 2 ] === maxLanguageId[ 2 ];\n\t\t});\n\n\t\tif ( matchFound ) {\n\t\t\tif ( variants ) {\n\t\t\t\tmatch.push( variants );\n\t\t\t}\n\t\t\treturn match;\n\t\t}\n\n\t\t// [4]\n\t\treturn maxLanguageId;\n\t};\n\n\n\n\n\t/**\n\t * subtags( locale )\n\t *\n\t * @locale [String]\n\t */\n\tvar coreSubtags = function( locale ) {\n\t\tvar aux, unicodeLanguageId,\n\t\t\tsubtags = [];\n\n\t\tlocale = locale.replace( /_/, \"-\" );\n\n\t\t// Unicode locale extensions.\n\t\taux = locale.split( \"-u-\" );\n\t\tif ( aux[ 1 ] ) {\n\t\t\taux[ 1 ] = aux[ 1 ].split( \"-t-\" );\n\t\t\tlocale = aux[ 0 ] + ( aux[ 1 ][ 1 ] ? \"-t-\" + aux[ 1 ][ 1 ] : \"\");\n\t\t\tsubtags[ 4 /* unicodeLocaleExtensions */ ] = aux[ 1 ][ 0 ];\n\t\t}\n\n\t\t// TODO normalize transformed extensions. Currently, skipped.\n\t\t// subtags[ x ] = locale.split( \"-t-\" )[ 1 ];\n\t\tunicodeLanguageId = locale.split( \"-t-\" )[ 0 ];\n\n\t\t// unicode_language_id = \"root\"\n\t\t//   | unicode_language_subtag         \n\t\t//     (sep unicode_script_subtag)? \n\t\t//     (sep unicode_region_subtag)?\n\t\t//     (sep unicode_variant_subtag)* ;\n\t\t//\n\t\t// Although unicode_language_subtag = alpha{2,8}, I'm using alpha{2,3}. Because, there's no language on CLDR lengthier than 3.\n\t\taux = unicodeLanguageId.match( /^(([a-z]{2,3})(-([A-Z][a-z]{3}))?(-([A-Z]{2}|[0-9]{3}))?)((-([a-zA-Z0-9]{5,8}|[0-9][a-zA-Z0-9]{3}))*)$|^(root)$/ );\n\t\tif ( aux === null ) {\n\t\t\treturn [ \"und\", \"Zzzz\", \"ZZ\" ];\n\t\t}\n\t\tsubtags[ 0 /* language */ ] = aux[ 10 ] /* root */ || aux[ 2 ] || \"und\";\n\t\tsubtags[ 1 /* script */ ] = aux[ 4 ] || \"Zzzz\";\n\t\tsubtags[ 2 /* territory */ ] = aux[ 6 ] || \"ZZ\";\n\t\tif ( aux[ 7 ] && aux[ 7 ].length ) {\n\t\t\tsubtags[ 3 /* variant */ ] = aux[ 7 ].slice( 1 ) /* remove leading \"-\" */;\n\t\t}\n\n\t\t// 0: language\n\t\t// 1: script\n\t\t// 2: territory (aka region)\n\t\t// 3: variant\n\t\t// 4: unicodeLocaleExtensions\n\t\treturn subtags;\n\t};\n\n\n\n\n\tvar arrayForEach = function( array, callback ) {\n\t\tvar i, length;\n\t\tif ( array.forEach ) {\n\t\t\treturn array.forEach( callback );\n\t\t}\n\t\tfor ( i = 0, length = array.length; i < length; i++ ) {\n\t\t\tcallback( array[ i ], i, array );\n\t\t}\n\t};\n\n\n\n\n\t/**\n\t * bundleLookup( minLanguageId )\n\t *\n\t * @Cldr [Cldr class]\n\t *\n\t * @cldr [Cldr instance]\n\t *\n\t * @minLanguageId [String] requested languageId after applied remove likely subtags.\n\t */\n\tvar bundleLookup = function( Cldr, cldr, minLanguageId ) {\n\t\tvar availableBundleMap = Cldr._availableBundleMap,\n\t\t\tavailableBundleMapQueue = Cldr._availableBundleMapQueue;\n\n\t\tif ( availableBundleMapQueue.length ) {\n\t\t\tarrayForEach( availableBundleMapQueue, function( bundle, i ) {\n\t\t\t\tvar existing, maxBundle, minBundle, subtags;\n\t\t\t\tsubtags = coreSubtags( bundle );\n\t\t\t\tmaxBundle = coreLikelySubtags( Cldr, cldr, subtags );\n\t\t\t\tif ( maxBundle === undefined ) {\n\t\t\t\t\tavailableBundleMapQueue.splice( i, 1 );\n\t\t\t\t\tthrow new Error( \"Could not find likelySubtags for \" + bundle );\n\t\t\t\t}\n\t\t\t\tminBundle = coreRemoveLikelySubtags( Cldr, cldr, maxBundle );\n\t\t\t\tminBundle = minBundle.join( Cldr.localeSep );\n\t\t\t\texisting = availableBundleMap[ minBundle ];\n\t\t\t\tif ( existing && existing.length < bundle.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tavailableBundleMap[ minBundle ] = bundle;\n\t\t\t});\n\t\t\tCldr._availableBundleMapQueue = [];\n\t\t}\n\n\t\treturn availableBundleMap[ minLanguageId ] || null;\n\t};\n\n\n\n\n\tvar objectKeys = function( object ) {\n\t\tvar i,\n\t\t\tresult = [];\n\n\t\tif ( Object.keys ) {\n\t\t\treturn Object.keys( object );\n\t\t}\n\n\t\tfor ( i in object ) {\n\t\t\tresult.push( i );\n\t\t}\n\n\t\treturn result;\n\t};\n\n\n\n\n\tvar createError = function( code, attributes ) {\n\t\tvar error, message;\n\n\t\tmessage = code + ( attributes && JSON ? \": \" + JSON.stringify( attributes ) : \"\" );\n\t\terror = new Error( message );\n\t\terror.code = code;\n\n\t\t// extend( error, attributes );\n\t\tarrayForEach( objectKeys( attributes ), function( attribute ) {\n\t\t\terror[ attribute ] = attributes[ attribute ];\n\t\t});\n\n\t\treturn error;\n\t};\n\n\n\n\n\tvar validate = function( code, check, attributes ) {\n\t\tif ( !check ) {\n\t\t\tthrow createError( code, attributes );\n\t\t}\n\t};\n\n\n\n\n\tvar validatePresence = function( value, name ) {\n\t\tvalidate( \"E_MISSING_PARAMETER\", typeof value !== \"undefined\", {\n\t\t\tname: name\n\t\t});\n\t};\n\n\n\n\n\tvar validateType = function( value, name, check, expected ) {\n\t\tvalidate( \"E_INVALID_PAR_TYPE\", check, {\n\t\t\texpected: expected,\n\t\t\tname: name,\n\t\t\tvalue: value\n\t\t});\n\t};\n\n\n\n\n\tvar validateTypePath = function( value, name ) {\n\t\tvalidateType( value, name, typeof value === \"string\" || arrayIsArray( value ), \"String or Array\" );\n\t};\n\n\n\n\n\t/**\n\t * Function inspired by jQuery Core, but reduced to our use case.\n\t */\n\tvar isPlainObject = function( obj ) {\n\t\treturn obj !== null && \"\" + obj === \"[object Object]\";\n\t};\n\n\n\n\n\tvar validateTypePlainObject = function( value, name ) {\n\t\tvalidateType( value, name, typeof value === \"undefined\" || isPlainObject( value ), \"Plain Object\" );\n\t};\n\n\n\n\n\tvar validateTypeString = function( value, name ) {\n\t\tvalidateType( value, name, typeof value === \"string\", \"a string\" );\n\t};\n\n\n\n\n\t// @path: normalized path\n\tvar resourceGet = function( data, path ) {\n\t\tvar i,\n\t\t\tnode = data,\n\t\t\tlength = path.length;\n\n\t\tfor ( i = 0; i < length - 1; i++ ) {\n\t\t\tnode = node[ path[ i ] ];\n\t\t\tif ( !node ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\t\treturn node[ path[ i ] ];\n\t};\n\n\n\n\n\t/**\n\t * setAvailableBundles( Cldr, json )\n\t *\n\t * @Cldr [Cldr class]\n\t *\n\t * @json resolved/unresolved cldr data.\n\t *\n\t * Set available bundles queue based on passed json CLDR data. Considers a bundle as any String at /main/{bundle}.\n\t */\n\tvar coreSetAvailableBundles = function( Cldr, json ) {\n\t\tvar bundle,\n\t\t\tavailableBundleMapQueue = Cldr._availableBundleMapQueue,\n\t\t\tmain = resourceGet( json, [ \"main\" ] );\n\n\t\tif ( main ) {\n\t\t\tfor ( bundle in main ) {\n\t\t\t\tif ( main.hasOwnProperty( bundle ) && bundle !== \"root\" &&\n\t\t\t\t\t\t\tavailableBundleMapQueue.indexOf( bundle ) === -1 ) {\n\t\t\t\t\tavailableBundleMapQueue.push( bundle );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\n\n\tvar alwaysArray = function( somethingOrArray ) {\n\t\treturn arrayIsArray( somethingOrArray ) ?  somethingOrArray : [ somethingOrArray ];\n\t};\n\n\n\tvar jsonMerge = (function() {\n\n\t// Returns new deeply merged JSON.\n\t//\n\t// Eg.\n\t// merge( { a: { b: 1, c: 2 } }, { a: { b: 3, d: 4 } } )\n\t// -> { a: { b: 3, c: 2, d: 4 } }\n\t//\n\t// @arguments JSON's\n\t// \n\tvar merge = function() {\n\t\tvar destination = {},\n\t\t\tsources = [].slice.call( arguments, 0 );\n\t\tarrayForEach( sources, function( source ) {\n\t\t\tvar prop;\n\t\t\tfor ( prop in source ) {\n\t\t\t\tif ( prop in destination && typeof destination[ prop ] === \"object\" && !arrayIsArray( destination[ prop ] ) ) {\n\n\t\t\t\t\t// Merge Objects\n\t\t\t\t\tdestination[ prop ] = merge( destination[ prop ], source[ prop ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Set new values\n\t\t\t\t\tdestination[ prop ] = source[ prop ];\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn destination;\n\t};\n\n\treturn merge;\n\n}());\n\n\n\t/**\n\t * load( Cldr, source, jsons )\n\t *\n\t * @Cldr [Cldr class]\n\t *\n\t * @source [Object]\n\t *\n\t * @jsons [arguments]\n\t */\n\tvar coreLoad = function( Cldr, source, jsons ) {\n\t\tvar i, j, json;\n\n\t\tvalidatePresence( jsons[ 0 ], \"json\" );\n\n\t\t// Support arbitrary parameters, e.g., `Cldr.load({...}, {...})`.\n\t\tfor ( i = 0; i < jsons.length; i++ ) {\n\n\t\t\t// Support array parameters, e.g., `Cldr.load([{...}, {...}])`.\n\t\t\tjson = alwaysArray( jsons[ i ] );\n\n\t\t\tfor ( j = 0; j < json.length; j++ ) {\n\t\t\t\tvalidateTypePlainObject( json[ j ], \"json\" );\n\t\t\t\tsource = jsonMerge( source, json[ j ] );\n\t\t\t\tcoreSetAvailableBundles( Cldr, json[ j ] );\n\t\t\t}\n\t\t}\n\n\t\treturn source;\n\t};\n\n\n\n\tvar itemGetResolved = function( Cldr, path, attributes ) {\n\t\t// Resolve path\n\t\tvar normalizedPath = pathNormalize( path, attributes );\n\n\t\treturn resourceGet( Cldr._resolved, normalizedPath );\n\t};\n\n\n\n\n\t/**\n\t * new Cldr()\n\t */\n\tvar Cldr = function( locale ) {\n\t\tthis.init( locale );\n\t};\n\n\t// Build optimization hack to avoid duplicating functions across modules.\n\tCldr._alwaysArray = alwaysArray;\n\tCldr._coreLoad = coreLoad;\n\tCldr._createError = createError;\n\tCldr._itemGetResolved = itemGetResolved;\n\tCldr._jsonMerge = jsonMerge;\n\tCldr._pathNormalize = pathNormalize;\n\tCldr._resourceGet = resourceGet;\n\tCldr._validatePresence = validatePresence;\n\tCldr._validateType = validateType;\n\tCldr._validateTypePath = validateTypePath;\n\tCldr._validateTypePlainObject = validateTypePlainObject;\n\n\tCldr._availableBundleMap = {};\n\tCldr._availableBundleMapQueue = [];\n\tCldr._resolved = {};\n\n\t// Allow user to override locale separator \"-\" (default) | \"_\". According to http://www.unicode.org/reports/tr35/#Unicode_language_identifier, both \"-\" and \"_\" are valid locale separators (eg. \"en_GB\", \"en-GB\"). According to http://unicode.org/cldr/trac/ticket/6786 its usage must be consistent throughout the data set.\n\tCldr.localeSep = \"-\";\n\n\t/**\n\t * Cldr.load( json [, json, ...] )\n\t *\n\t * @json [JSON] CLDR data or [Array] Array of @json's.\n\t *\n\t * Load resolved cldr data.\n\t */\n\tCldr.load = function() {\n\t\tCldr._resolved = coreLoad( Cldr, Cldr._resolved, arguments );\n\t};\n\n\t/**\n\t * .init() automatically run on instantiation/construction.\n\t */\n\tCldr.prototype.init = function( locale ) {\n\t\tvar attributes, language, maxLanguageId, minLanguageId, script, subtags, territory, unicodeLocaleExtensions, variant,\n\t\t\tsep = Cldr.localeSep,\n\t\t\tunicodeLocaleExtensionsRaw = \"\";\n\n\t\tvalidatePresence( locale, \"locale\" );\n\t\tvalidateTypeString( locale, \"locale\" );\n\n\t\tsubtags = coreSubtags( locale );\n\n\t\tif ( subtags.length === 5 ) {\n\t\t\tunicodeLocaleExtensions = subtags.pop();\n\t\t\tunicodeLocaleExtensionsRaw = sep + \"u\" + sep + unicodeLocaleExtensions;\n\t\t\t// Remove trailing null when there is unicodeLocaleExtensions but no variants.\n\t\t\tif ( !subtags[ 3 ] ) {\n\t\t\t\tsubtags.pop();\n\t\t\t}\n\t\t}\n\t\tvariant = subtags[ 3 ];\n\n\t\t// Normalize locale code.\n\t\t// Get (or deduce) the \"triple subtags\": language, territory (also aliased as region), and script subtags.\n\t\t// Get the variant subtags (calendar, collation, currency, etc).\n\t\t// refs:\n\t\t// - http://www.unicode.org/reports/tr35/#Field_Definitions\n\t\t// - http://www.unicode.org/reports/tr35/#Language_and_Locale_IDs\n\t\t// - http://www.unicode.org/reports/tr35/#Unicode_locale_identifier\n\n\t\t// When a locale id does not specify a language, or territory (region), or script, they are obtained by Likely Subtags.\n\t\tmaxLanguageId = coreLikelySubtags( Cldr, this, subtags, { force: true } ) || subtags;\n\t\tlanguage = maxLanguageId[ 0 ];\n\t\tscript = maxLanguageId[ 1 ];\n\t\tterritory = maxLanguageId[ 2 ];\n\n\t\tminLanguageId = coreRemoveLikelySubtags( Cldr, this, maxLanguageId ).join( sep );\n\n\t\t// Set attributes\n\t\tthis.attributes = attributes = {\n\t\t\tbundle: bundleLookup( Cldr, this, minLanguageId ),\n\n\t\t\t// Unicode Language Id\n\t\t\tminLanguageId: minLanguageId + unicodeLocaleExtensionsRaw,\n\t\t\tmaxLanguageId: maxLanguageId.join( sep ) + unicodeLocaleExtensionsRaw,\n\n\t\t\t// Unicode Language Id Subtabs\n\t\t\tlanguage: language,\n\t\t\tscript: script,\n\t\t\tterritory: territory,\n\t\t\tregion: territory, /* alias */\n\t\t\tvariant: variant\n\t\t};\n\n\t\t// Unicode locale extensions.\n\t\tunicodeLocaleExtensions && ( \"-\" + unicodeLocaleExtensions ).replace( /-[a-z]{3,8}|(-[a-z]{2})-([a-z]{3,8})/g, function( attribute, key, type ) {\n\n\t\t\tif ( key ) {\n\n\t\t\t\t// Extension is in the `keyword` form.\n\t\t\t\tattributes[ \"u\" + key ] = type;\n\t\t\t} else {\n\n\t\t\t\t// Extension is in the `attribute` form.\n\t\t\t\tattributes[ \"u\" + attribute ] = true;\n\t\t\t}\n\t\t});\n\n\t\tthis.locale = locale;\n\t};\n\n\t/**\n\t * .get()\n\t */\n\tCldr.prototype.get = function( path ) {\n\n\t\tvalidatePresence( path, \"path\" );\n\t\tvalidateTypePath( path, \"path\" );\n\n\t\treturn itemGetResolved( Cldr, path, this.attributes );\n\t};\n\n\t/**\n\t * .main()\n\t */\n\tCldr.prototype.main = function( path ) {\n\t\tvalidatePresence( path, \"path\" );\n\t\tvalidateTypePath( path, \"path\" );\n\n\t\tvalidate( \"E_MISSING_BUNDLE\", this.attributes.bundle !== null, {\n\t\t\tlocale: this.locale\n\t\t});\n\n\t\tpath = alwaysArray( path );\n\t\treturn this.get( [ \"main/{bundle}\" ].concat( path ) );\n\t};\n\n\treturn Cldr;\n\n\n\n\n}));\n","/**\n * CLDR JavaScript Library v0.5.4\n * http://jquery.com/\n *\n * Copyright 2013 Rafael Xavier de Souza\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2020-10-22T15:56Z\n */\n/*!\n * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier\n * http://git.io/h4lmVg\n */\n(function( factory ) {\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\t// AMD.\n\t\tdefine( [ \"../cldr\" ], factory );\n\t} else if ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// Node. CommonJS.\n\t\tmodule.exports = factory( require( \"../cldr\" ) );\n\t} else {\n\t\t// Global\n\t\tfactory( Cldr );\n\t}\n\n}(function( Cldr ) {\n\n\t// Build optimization hack to avoid duplicating functions across modules.\n\tvar pathNormalize = Cldr._pathNormalize,\n\t\tvalidatePresence = Cldr._validatePresence,\n\t\tvalidateType = Cldr._validateType;\n\n/*!\n * EventEmitter v4.2.7 - git.io/ee\n * Oliver Caldwell\n * MIT license\n * @preserve\n */\n\nvar EventEmitter;\n/* jshint ignore:start */\nEventEmitter = (function () {\n\n\n\t/**\n\t * Class for managing events.\n\t * Can be extended to provide event functionality in other classes.\n\t *\n\t * @class EventEmitter Manages event registering and emitting.\n\t */\n\tfunction EventEmitter() {}\n\n\t// Shortcuts to improve speed and size\n\tvar proto = EventEmitter.prototype;\n\tvar exports = {};\n\t\n\n\t/**\n\t * Finds the index of the listener for the event in it's storage array.\n\t *\n\t * @param {Function[]} listeners Array of listeners to search through.\n\t * @param {Function} listener Method to look for.\n\t * @return {Number} Index of the specified listener, -1 if not found\n\t * @api private\n\t */\n\tfunction indexOfListener(listeners, listener) {\n\t\tvar i = listeners.length;\n\t\twhile (i--) {\n\t\t\tif (listeners[i].listener === listener) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\t/**\n\t * Alias a method while keeping the context correct, to allow for overwriting of target method.\n\t *\n\t * @param {String} name The name of the target method.\n\t * @return {Function} The aliased method\n\t * @api private\n\t */\n\tfunction alias(name) {\n\t\treturn function aliasClosure() {\n\t\t\treturn this[name].apply(this, arguments);\n\t\t};\n\t}\n\n\t/**\n\t * Returns the listener array for the specified event.\n\t * Will initialise the event object and listener arrays if required.\n\t * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n\t * Each property in the object response is an array of listener functions.\n\t *\n\t * @param {String|RegExp} evt Name of the event to return the listeners from.\n\t * @return {Function[]|Object} All listener functions for the event.\n\t */\n\tproto.getListeners = function getListeners(evt) {\n\t\tvar events = this._getEvents();\n\t\tvar response;\n\t\tvar key;\n\n\t\t// Return a concatenated array of all matching events if\n\t\t// the selector is a regular expression.\n\t\tif (evt instanceof RegExp) {\n\t\t\tresponse = {};\n\t\t\tfor (key in events) {\n\t\t\t\tif (events.hasOwnProperty(key) && evt.test(key)) {\n\t\t\t\t\tresponse[key] = events[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tresponse = events[evt] || (events[evt] = []);\n\t\t}\n\n\t\treturn response;\n\t};\n\n\t/**\n\t * Takes a list of listener objects and flattens it into a list of listener functions.\n\t *\n\t * @param {Object[]} listeners Raw listener objects.\n\t * @return {Function[]} Just the listener functions.\n\t */\n\tproto.flattenListeners = function flattenListeners(listeners) {\n\t\tvar flatListeners = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < listeners.length; i += 1) {\n\t\t\tflatListeners.push(listeners[i].listener);\n\t\t}\n\n\t\treturn flatListeners;\n\t};\n\n\t/**\n\t * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n\t *\n\t * @param {String|RegExp} evt Name of the event to return the listeners from.\n\t * @return {Object} All listener functions for an event in an object.\n\t */\n\tproto.getListenersAsObject = function getListenersAsObject(evt) {\n\t\tvar listeners = this.getListeners(evt);\n\t\tvar response;\n\n\t\tif (listeners instanceof Array) {\n\t\t\tresponse = {};\n\t\t\tresponse[evt] = listeners;\n\t\t}\n\n\t\treturn response || listeners;\n\t};\n\n\t/**\n\t * Adds a listener function to the specified event.\n\t * The listener will not be added if it is a duplicate.\n\t * If the listener returns true then it will be removed after it is called.\n\t * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to attach the listener to.\n\t * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.addListener = function addListener(evt, listener) {\n\t\tvar listeners = this.getListenersAsObject(evt);\n\t\tvar listenerIsWrapped = typeof listener === 'object';\n\t\tvar key;\n\n\t\tfor (key in listeners) {\n\t\t\tif (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n\t\t\t\tlisteners[key].push(listenerIsWrapped ? listener : {\n\t\t\t\t\tlistener: listener,\n\t\t\t\t\tonce: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of addListener\n\t */\n\tproto.on = alias('addListener');\n\n\t/**\n\t * Semi-alias of addListener. It will add a listener that will be\n\t * automatically removed after it's first execution.\n\t *\n\t * @param {String|RegExp} evt Name of the event to attach the listener to.\n\t * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.addOnceListener = function addOnceListener(evt, listener) {\n\t\treturn this.addListener(evt, {\n\t\t\tlistener: listener,\n\t\t\tonce: true\n\t\t});\n\t};\n\n\t/**\n\t * Alias of addOnceListener.\n\t */\n\tproto.once = alias('addOnceListener');\n\n\t/**\n\t * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n\t * You need to tell it what event names should be matched by a regex.\n\t *\n\t * @param {String} evt Name of the event to create.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.defineEvent = function defineEvent(evt) {\n\t\tthis.getListeners(evt);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Uses defineEvent to define multiple events.\n\t *\n\t * @param {String[]} evts An array of event names to define.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.defineEvents = function defineEvents(evts) {\n\t\tfor (var i = 0; i < evts.length; i += 1) {\n\t\t\tthis.defineEvent(evts[i]);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Removes a listener function from the specified event.\n\t * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to remove the listener from.\n\t * @param {Function} listener Method to remove from the event.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.removeListener = function removeListener(evt, listener) {\n\t\tvar listeners = this.getListenersAsObject(evt);\n\t\tvar index;\n\t\tvar key;\n\n\t\tfor (key in listeners) {\n\t\t\tif (listeners.hasOwnProperty(key)) {\n\t\t\t\tindex = indexOfListener(listeners[key], listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\tlisteners[key].splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of removeListener\n\t */\n\tproto.off = alias('removeListener');\n\n\t/**\n\t * Adds listeners in bulk using the manipulateListeners method.\n\t * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n\t * You can also pass it a regular expression to add the array of listeners to all events that match it.\n\t * Yeah, this function does quite a bit. That's probably a bad thing.\n\t *\n\t * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n\t * @param {Function[]} [listeners] An optional array of listener functions to add.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.addListeners = function addListeners(evt, listeners) {\n\t\t// Pass through to manipulateListeners\n\t\treturn this.manipulateListeners(false, evt, listeners);\n\t};\n\n\t/**\n\t * Removes listeners in bulk using the manipulateListeners method.\n\t * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n\t * You can also pass it an event name and an array of listeners to be removed.\n\t * You can also pass it a regular expression to remove the listeners from all events that match it.\n\t *\n\t * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n\t * @param {Function[]} [listeners] An optional array of listener functions to remove.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.removeListeners = function removeListeners(evt, listeners) {\n\t\t// Pass through to manipulateListeners\n\t\treturn this.manipulateListeners(true, evt, listeners);\n\t};\n\n\t/**\n\t * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n\t * The first argument will determine if the listeners are removed (true) or added (false).\n\t * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n\t * You can also pass it an event name and an array of listeners to be added/removed.\n\t * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n\t *\n\t * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n\t * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n\t * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n\t\tvar i;\n\t\tvar value;\n\t\tvar single = remove ? this.removeListener : this.addListener;\n\t\tvar multiple = remove ? this.removeListeners : this.addListeners;\n\n\t\t// If evt is an object then pass each of it's properties to this method\n\t\tif (typeof evt === 'object' && !(evt instanceof RegExp)) {\n\t\t\tfor (i in evt) {\n\t\t\t\tif (evt.hasOwnProperty(i) && (value = evt[i])) {\n\t\t\t\t\t// Pass the single listener straight through to the singular method\n\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\tsingle.call(this, i, value);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Otherwise pass back to the multiple function\n\t\t\t\t\t\tmultiple.call(this, i, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// So evt must be a string\n\t\t\t// And listeners must be an array of listeners\n\t\t\t// Loop over it and pass each one to the multiple method\n\t\t\ti = listeners.length;\n\t\t\twhile (i--) {\n\t\t\t\tsingle.call(this, evt, listeners[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Removes all listeners from a specified event.\n\t * If you do not specify an event then all listeners will be removed.\n\t * That means every event will be emptied.\n\t * You can also pass a regex to remove all events that match it.\n\t *\n\t * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.removeEvent = function removeEvent(evt) {\n\t\tvar type = typeof evt;\n\t\tvar events = this._getEvents();\n\t\tvar key;\n\n\t\t// Remove different things depending on the state of evt\n\t\tif (type === 'string') {\n\t\t\t// Remove all listeners for the specified event\n\t\t\tdelete events[evt];\n\t\t}\n\t\telse if (evt instanceof RegExp) {\n\t\t\t// Remove all events matching the regex.\n\t\t\tfor (key in events) {\n\t\t\t\tif (events.hasOwnProperty(key) && evt.test(key)) {\n\t\t\t\t\tdelete events[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Remove all listeners in all events\n\t\t\tdelete this._events;\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of removeEvent.\n\t *\n\t * Added to mirror the node API.\n\t */\n\tproto.removeAllListeners = alias('removeEvent');\n\n\t/**\n\t * Emits an event of your choice.\n\t * When emitted, every listener attached to that event will be executed.\n\t * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n\t * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n\t * So they will not arrive within the array on the other side, they will be separate.\n\t * You can also pass a regular expression to emit to all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n\t * @param {Array} [args] Optional array of arguments to be passed to each listener.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.emitEvent = function emitEvent(evt, args) {\n\t\tvar listeners = this.getListenersAsObject(evt);\n\t\tvar listener;\n\t\tvar i;\n\t\tvar key;\n\t\tvar response;\n\n\t\tfor (key in listeners) {\n\t\t\tif (listeners.hasOwnProperty(key)) {\n\t\t\t\ti = listeners[key].length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\t// If the listener returns true then it shall be removed from the event\n\t\t\t\t\t// The function is executed either with a basic call or an apply if there is an args array\n\t\t\t\t\tlistener = listeners[key][i];\n\n\t\t\t\t\tif (listener.once === true) {\n\t\t\t\t\t\tthis.removeListener(evt, listener.listener);\n\t\t\t\t\t}\n\n\t\t\t\t\tresponse = listener.listener.apply(this, args || []);\n\n\t\t\t\t\tif (response === this._getOnceReturnValue()) {\n\t\t\t\t\t\tthis.removeListener(evt, listener.listener);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of emitEvent\n\t */\n\tproto.trigger = alias('emitEvent');\n\n\t/**\n\t * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n\t * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n\t * @param {...*} Optional additional arguments to be passed to each listener.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.emit = function emit(evt) {\n\t\tvar args = Array.prototype.slice.call(arguments, 1);\n\t\treturn this.emitEvent(evt, args);\n\t};\n\n\t/**\n\t * Sets the current value to check against when executing listeners. If a\n\t * listeners return value matches the one set here then it will be removed\n\t * after execution. This value defaults to true.\n\t *\n\t * @param {*} value The new value to check for when executing listeners.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.setOnceReturnValue = function setOnceReturnValue(value) {\n\t\tthis._onceReturnValue = value;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Fetches the current value to check against when executing listeners. If\n\t * the listeners return value matches this one then it should be removed\n\t * automatically. It will return true by default.\n\t *\n\t * @return {*|Boolean} The current value to check for or the default, true.\n\t * @api private\n\t */\n\tproto._getOnceReturnValue = function _getOnceReturnValue() {\n\t\tif (this.hasOwnProperty('_onceReturnValue')) {\n\t\t\treturn this._onceReturnValue;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t/**\n\t * Fetches the events object and creates one if required.\n\t *\n\t * @return {Object} The events storage object.\n\t * @api private\n\t */\n\tproto._getEvents = function _getEvents() {\n\t\treturn this._events || (this._events = {});\n\t};\n\n\t/**\n\t * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n\t *\n\t * @return {Function} Non conflicting EventEmitter class.\n\t */\n\tEventEmitter.noConflict = function noConflict() {\n\t\texports.EventEmitter = originalGlobalValue;\n\t\treturn EventEmitter;\n\t};\n\n\treturn EventEmitter;\n}());\n/* jshint ignore:end */\n\n\n\n\tvar validateTypeFunction = function( value, name ) {\n\t\tvalidateType( value, name, typeof value === \"undefined\" || typeof value === \"function\", \"Function\" );\n\t};\n\n\n\n\n\tvar superGet, superInit,\n\t\tglobalEe = new EventEmitter();\n\n\tfunction validateTypeEvent( value, name ) {\n\t\tvalidateType( value, name, typeof value === \"string\" || value instanceof RegExp, \"String or RegExp\" );\n\t}\n\n\tfunction validateThenCall( method, self ) {\n\t\treturn function( event, listener ) {\n\t\t\tvalidatePresence( event, \"event\" );\n\t\t\tvalidateTypeEvent( event, \"event\" );\n\n\t\t\tvalidatePresence( listener, \"listener\" );\n\t\t\tvalidateTypeFunction( listener, \"listener\" );\n\n\t\t\treturn self[ method ].apply( self, arguments );\n\t\t};\n\t}\n\n\tfunction off( self ) {\n\t\treturn validateThenCall( \"off\", self );\n\t}\n\n\tfunction on( self ) {\n\t\treturn validateThenCall( \"on\", self );\n\t}\n\n\tfunction once( self ) {\n\t\treturn validateThenCall( \"once\", self );\n\t}\n\n\tCldr.off = off( globalEe );\n\tCldr.on = on( globalEe );\n\tCldr.once = once( globalEe );\n\n\t/**\n\t * Overload Cldr.prototype.init().\n\t */\n\tsuperInit = Cldr.prototype.init;\n\tCldr.prototype.init = function() {\n\t\tvar ee;\n\t\tthis.ee = ee = new EventEmitter();\n\t\tthis.off = off( ee );\n\t\tthis.on = on( ee );\n\t\tthis.once = once( ee );\n\t\tsuperInit.apply( this, arguments );\n\t};\n\n\t/**\n\t * getOverload is encapsulated, because of cldr/unresolved. If it's loaded\n\t * after cldr/event (and note it overwrites .get), it can trigger this\n\t * overload again.\n\t */\n\tfunction getOverload() {\n\n\t\t/**\n\t\t * Overload Cldr.prototype.get().\n\t\t */\n\t\tsuperGet = Cldr.prototype.get;\n\t\tCldr.prototype.get = function( path ) {\n\t\t\tvar value = superGet.apply( this, arguments );\n\t\t\tpath = pathNormalize( path, this.attributes ).join( \"/\" );\n\t\t\tglobalEe.trigger( \"get\", [ path, value ] );\n\t\t\tthis.ee.trigger( \"get\", [ path, value ] );\n\t\t\treturn value;\n\t\t};\n\t}\n\n\tCldr._eventInit = getOverload;\n\tgetOverload();\n\n\treturn Cldr;\n\n\n\n\n}));\n","/**\n * CLDR JavaScript Library v0.5.4\n * http://jquery.com/\n *\n * Copyright 2013 Rafael Xavier de Souza\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2020-10-22T15:56Z\n */\n/*!\n * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier\n * http://git.io/h4lmVg\n */\n(function( factory ) {\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\t// AMD.\n\t\tdefine( [ \"../cldr\" ], factory );\n\t} else if ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// Node. CommonJS.\n\t\tmodule.exports = factory( require( \"../cldr\" ) );\n\t} else {\n\t\t// Global\n\t\tfactory( Cldr );\n\t}\n\n}(function( Cldr ) {\n\n\t// Build optimization hack to avoid duplicating functions across modules.\n\tvar alwaysArray = Cldr._alwaysArray;\n\n\n\n\tvar supplementalMain = function( cldr ) {\n\n\t\tvar prepend, supplemental;\n\t\t\n\t\tprepend = function( prepend ) {\n\t\t\treturn function( path ) {\n\t\t\t\tpath = alwaysArray( path );\n\t\t\t\treturn cldr.get( [ prepend ].concat( path ) );\n\t\t\t};\n\t\t};\n\n\t\tsupplemental = prepend( \"supplemental\" );\n\n\t\t// Week Data\n\t\t// http://www.unicode.org/reports/tr35/tr35-dates.html#Week_Data\n\t\tsupplemental.weekData = prepend( \"supplemental/weekData\" );\n\n\t\tsupplemental.weekData.firstDay = function() {\n\t\t\treturn cldr.get( \"supplemental/weekData/firstDay/{territory}\" ) ||\n\t\t\t\tcldr.get( \"supplemental/weekData/firstDay/001\" );\n\t\t};\n\n\t\tsupplemental.weekData.minDays = function() {\n\t\t\tvar minDays = cldr.get( \"supplemental/weekData/minDays/{territory}\" ) ||\n\t\t\t\tcldr.get( \"supplemental/weekData/minDays/001\" );\n\t\t\treturn parseInt( minDays, 10 );\n\t\t};\n\n\t\t// Time Data\n\t\t// http://www.unicode.org/reports/tr35/tr35-dates.html#Time_Data\n\t\tsupplemental.timeData = prepend( \"supplemental/timeData\" );\n\n\t\tsupplemental.timeData.allowed = function() {\n\t\t\treturn cldr.get( \"supplemental/timeData/{territory}/_allowed\" ) ||\n\t\t\t\tcldr.get( \"supplemental/timeData/001/_allowed\" );\n\t\t};\n\n\t\tsupplemental.timeData.preferred = function() {\n\t\t\treturn cldr.get( \"supplemental/timeData/{territory}/_preferred\" ) ||\n\t\t\t\tcldr.get( \"supplemental/timeData/001/_preferred\" );\n\t\t};\n\n\t\treturn supplemental;\n\n\t};\n\n\n\n\n\tvar initSuper = Cldr.prototype.init;\n\n\t/**\n\t * .init() automatically ran on construction.\n\t *\n\t * Overload .init().\n\t */\n\tCldr.prototype.init = function() {\n\t\tinitSuper.apply( this, arguments );\n\t\tthis.supplemental = supplementalMain( this );\n\t};\n\n\treturn Cldr;\n\n\n\n\n}));\n","/**\n * CLDR JavaScript Library v0.5.4\n * http://jquery.com/\n *\n * Copyright 2013 Rafael Xavier de Souza\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2020-10-22T15:56Z\n */\n/*!\n * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier\n * http://git.io/h4lmVg\n */\n(function( factory ) {\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\t// AMD.\n\t\tdefine( [ \"../cldr\" ], factory );\n\t} else if ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// Node. CommonJS.\n\t\tmodule.exports = factory( require( \"../cldr\" ) );\n\t} else {\n\t\t// Global\n\t\tfactory( Cldr );\n\t}\n\n}(function( Cldr ) {\n\n\t// Build optimization hack to avoid duplicating functions across modules.\n\tvar coreLoad = Cldr._coreLoad;\n\tvar jsonMerge = Cldr._jsonMerge;\n\tvar pathNormalize = Cldr._pathNormalize;\n\tvar resourceGet = Cldr._resourceGet;\n\tvar validatePresence = Cldr._validatePresence;\n\tvar validateTypePath = Cldr._validateTypePath;\n\n\n\n\tvar bundleParentLookup = function( Cldr, locale ) {\n\t\tvar normalizedPath, parent;\n\n\t\tif ( locale === \"root\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// First, try to find parent on supplemental data.\n\t\tnormalizedPath = pathNormalize( [ \"supplemental/parentLocales/parentLocale\", locale ] );\n\t\tparent = resourceGet( Cldr._resolved, normalizedPath ) || resourceGet( Cldr._raw, normalizedPath );\n\t\tif ( parent ) {\n\t\t\treturn parent;\n\t\t}\n\n\t\t// Or truncate locale.\n\t\tparent = locale.substr( 0, locale.lastIndexOf( Cldr.localeSep ) );\n\t\tif ( !parent ) {\n\t\t\treturn \"root\";\n\t\t}\n\n\t\treturn parent;\n\t};\n\n\n\n\n\t// @path: normalized path\n\tvar resourceSet = function( data, path, value ) {\n\t\tvar i,\n\t\t\tnode = data,\n\t\t\tlength = path.length;\n\n\t\tfor ( i = 0; i < length - 1; i++ ) {\n\t\t\tif ( !node[ path[ i ] ] ) {\n\t\t\t\tnode[ path[ i ] ] = {};\n\t\t\t}\n\t\t\tnode = node[ path[ i ] ];\n\t\t}\n\t\tnode[ path[ i ] ] = value;\n\t};\n\n\n\tvar itemLookup = (function() {\n\n\tvar lookup;\n\n\tlookup = function( Cldr, locale, path, attributes, childLocale ) {\n\t\tvar normalizedPath, parent, value;\n\n\t\t// 1: Finish recursion\n\t\t// 2: Avoid infinite loop\n\t\tif ( typeof locale === \"undefined\" /* 1 */ || locale === childLocale /* 2 */ ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolve path\n\t\tnormalizedPath = pathNormalize( path, attributes );\n\n\t\t// Check resolved (cached) data first\n\t\t// 1: Due to #16, never use the cached resolved non-leaf nodes. It may not\n\t\t//    represent its leafs in its entirety.\n\t\tvalue = resourceGet( Cldr._resolved, normalizedPath );\n\t\tif ( value !== undefined && typeof value !== \"object\" /* 1 */ ) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Check raw data\n\t\tvalue = resourceGet( Cldr._raw, normalizedPath );\n\n\t\tif ( value === undefined ) {\n\t\t\t// Or, lookup at parent locale\n\t\t\tparent = bundleParentLookup( Cldr, locale );\n\t\t\tvalue = lookup( Cldr, parent, path, jsonMerge( attributes, { bundle: parent }), locale );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\t// Set resolved (cached)\n\t\t\tresourceSet( Cldr._resolved, normalizedPath, value );\n\t\t}\n\n\t\treturn value;\n\t};\n\n\treturn lookup;\n\n}());\n\n\n\tCldr._raw = {};\n\n\t/**\n\t * Cldr.load( json [, json, ...] )\n\t *\n\t * @json [JSON] CLDR data or [Array] Array of @json's.\n\t *\n\t * Load resolved or unresolved cldr data.\n\t * Overwrite Cldr.load().\n\t */\n\tCldr.load = function() {\n\t\tCldr._raw = coreLoad( Cldr, Cldr._raw, arguments );\n\t};\n\n\t/**\n\t * Overwrite Cldr.prototype.get().\n\t */\n\tCldr.prototype.get = function( path ) {\n\t\tvalidatePresence( path, \"path\" );\n\t\tvalidateTypePath( path, \"path\" );\n\n\t\t// 1: use bundle as locale on item lookup for simplification purposes, because no other extended subtag is used anyway on bundle parent lookup.\n\t\t// 2: during init(), this method is called, but bundle is yet not defined. Use \"\" as a workaround in this very specific scenario.\n\t\treturn itemLookup( Cldr, this.attributes && this.attributes.bundle /* 1 */ || \"\" /* 2 */, path, this.attributes );\n\t};\n\n\t// In case cldr/unresolved is loaded after cldr/event, we trigger its overloads again. Because, .get is overwritten in here.\n\tif ( Cldr._eventInit ) {\n\t\tCldr._eventInit();\n\t}\n\n\treturn Cldr;\n\n\n\n\n}));\n","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n/**\n * Globalize v1.4.0\n *\n * http://github.com/jquery/globalize\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2018-07-17T20:38Z\n */\n/*!\n * Globalize v1.4.0 2018-07-17T20:38Z Released under the MIT license\n * http://git.io/TrdQbw\n */\n(function( root, factory ) {\n\n\t// UMD returnExports\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD\n\t\tdefine([\n\t\t\t\"cldr\",\n\t\t\t\"cldr/event\"\n\t\t], factory );\n\t} else if ( typeof exports === \"object\" ) {\n\n\t\t// Node, CommonJS\n\t\tmodule.exports = factory( require( \"cldrjs\" ) );\n\t} else {\n\n\t\t// Global\n\t\troot.Globalize = factory( root.Cldr );\n\t}\n}( this, function( Cldr ) {\n\n\n/**\n * A toString method that outputs meaningful values for objects or arrays and\n * still performs as fast as a plain string in case variable is string, or as\n * fast as `\"\" + number` in case variable is a number.\n * Ref: http://jsperf.com/my-stringify\n */\nvar toString = function( variable ) {\n\treturn typeof variable === \"string\" ? variable : ( typeof variable === \"number\" ? \"\" +\n\t\tvariable : JSON.stringify( variable ) );\n};\n\n\n\n\n/**\n * formatMessage( message, data )\n *\n * @message [String] A message with optional {vars} to be replaced.\n *\n * @data [Array or JSON] Object with replacing-variables content.\n *\n * Return the formatted message. For example:\n *\n * - formatMessage( \"{0} second\", [ 1 ] ); // 1 second\n *\n * - formatMessage( \"{0}/{1}\", [\"m\", \"s\"] ); // m/s\n *\n * - formatMessage( \"{name} <{email}>\", {\n *     name: \"Foo\",\n *     email: \"bar@baz.qux\"\n *   }); // Foo <bar@baz.qux>\n */\nvar formatMessage = function( message, data ) {\n\n\t// Replace {attribute}'s\n\tmessage = message.replace( /{[0-9a-zA-Z-_. ]+}/g, function( name ) {\n\t\tname = name.replace( /^{([^}]*)}$/, \"$1\" );\n\t\treturn toString( data[ name ] );\n\t});\n\n\treturn message;\n};\n\n\n\n\nvar objectExtend = function() {\n\tvar destination = arguments[ 0 ],\n\t\tsources = [].slice.call( arguments, 1 );\n\n\tsources.forEach(function( source ) {\n\t\tvar prop;\n\t\tfor ( prop in source ) {\n\t\t\tdestination[ prop ] = source[ prop ];\n\t\t}\n\t});\n\n\treturn destination;\n};\n\n\n\n\nvar createError = function( code, message, attributes ) {\n\tvar error;\n\n\tmessage = code + ( message ? \": \" + formatMessage( message, attributes ) : \"\" );\n\terror = new Error( message );\n\terror.code = code;\n\n\tobjectExtend( error, attributes );\n\n\treturn error;\n};\n\n\n\n\nvar runtimeStringify = function( args ) {\n\treturn JSON.stringify( args, function( key, value ) {\n\t\tif ( value && value.runtimeKey ) {\n\t\t\treturn value.runtimeKey;\n\t\t}\n\t\treturn value;\n\t} );\n};\n\n\n\n\n// Based on http://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery\nvar stringHash = function( str ) {\n\treturn [].reduce.call( str, function( hash, i ) {\n\t\tvar chr = i.charCodeAt( 0 );\n\t\thash = ( ( hash << 5 ) - hash ) + chr;\n\t\treturn hash | 0;\n\t}, 0 );\n};\n\n\n\n\nvar runtimeKey = function( fnName, locale, args, argsStr ) {\n\tvar hash;\n\targsStr = argsStr || runtimeStringify( args );\n\thash = stringHash( fnName + locale + argsStr );\n\treturn hash > 0 ? \"a\" + hash : \"b\" + Math.abs( hash );\n};\n\n\n\n\nvar functionName = function( fn ) {\n\tif ( fn.name !== undefined ) {\n\t\treturn fn.name;\n\t}\n\n\t// fn.name is not supported by IE.\n\tvar matches = /^function\\s+([\\w\\$]+)\\s*\\(/.exec( fn.toString() );\n\n\tif ( matches && matches.length > 0 ) {\n\t\treturn matches[ 1 ];\n\t}\n};\n\n\n\n\nvar runtimeBind = function( args, cldr, fn, runtimeArgs ) {\n\n\tvar argsStr = runtimeStringify( args ),\n\t\tfnName = functionName( fn ),\n\t\tlocale = cldr.locale;\n\n\t// If name of the function is not available, this is most likely due to uglification,\n\t// which most likely means we are in production, and runtimeBind here is not necessary.\n\tif ( !fnName ) {\n\t\treturn fn;\n\t}\n\n\tfn.runtimeKey = runtimeKey( fnName, locale, null, argsStr );\n\n\tfn.generatorString = function() {\n\t\treturn \"Globalize(\\\"\" + locale + \"\\\").\" + fnName + \"(\" + argsStr.slice( 1, -1 ) + \")\";\n\t};\n\n\tfn.runtimeArgs = runtimeArgs;\n\n\treturn fn;\n};\n\n\n\n\nvar validate = function( code, message, check, attributes ) {\n\tif ( !check ) {\n\t\tthrow createError( code, message, attributes );\n\t}\n};\n\n\n\n\nvar alwaysArray = function( stringOrArray ) {\n\treturn Array.isArray( stringOrArray ) ? stringOrArray : stringOrArray ? [ stringOrArray ] : [];\n};\n\n\n\n\nvar validateCldr = function( path, value, options ) {\n\tvar skipBoolean;\n\toptions = options || {};\n\n\tskipBoolean = alwaysArray( options.skip ).some(function( pathRe ) {\n\t\treturn pathRe.test( path );\n\t});\n\n\tvalidate( \"E_MISSING_CLDR\", \"Missing required CLDR content `{path}`.\", value || skipBoolean, {\n\t\tpath: path\n\t});\n};\n\n\n\n\nvar validateDefaultLocale = function( value ) {\n\tvalidate( \"E_DEFAULT_LOCALE_NOT_DEFINED\", \"Default locale has not been defined.\",\n\t\tvalue !== undefined, {} );\n};\n\n\n\n\nvar validateParameterPresence = function( value, name ) {\n\tvalidate( \"E_MISSING_PARAMETER\", \"Missing required parameter `{name}`.\",\n\t\tvalue !== undefined, { name: name });\n};\n\n\n\n\n/**\n * range( value, name, minimum, maximum )\n *\n * @value [Number].\n *\n * @name [String] name of variable.\n *\n * @minimum [Number]. The lowest valid value, inclusive.\n *\n * @maximum [Number]. The greatest valid value, inclusive.\n */\nvar validateParameterRange = function( value, name, minimum, maximum ) {\n\tvalidate(\n\t\t\"E_PAR_OUT_OF_RANGE\",\n\t\t\"Parameter `{name}` has value `{value}` out of range [{minimum}, {maximum}].\",\n\t\tvalue === undefined || value >= minimum && value <= maximum,\n\t\t{\n\t\t\tmaximum: maximum,\n\t\t\tminimum: minimum,\n\t\t\tname: name,\n\t\t\tvalue: value\n\t\t}\n\t);\n};\n\n\n\n\nvar validateParameterType = function( value, name, check, expected ) {\n\tvalidate(\n\t\t\"E_INVALID_PAR_TYPE\",\n\t\t\"Invalid `{name}` parameter ({value}). {expected} expected.\",\n\t\tcheck,\n\t\t{\n\t\t\texpected: expected,\n\t\t\tname: name,\n\t\t\tvalue: value\n\t\t}\n\t);\n};\n\n\n\n\nvar validateParameterTypeLocale = function( value, name ) {\n\tvalidateParameterType(\n\t\tvalue,\n\t\tname,\n\t\tvalue === undefined || typeof value === \"string\" || value instanceof Cldr,\n\t\t\"String or Cldr instance\"\n\t);\n};\n\n\n\n\n/**\n * Function inspired by jQuery Core, but reduced to our use case.\n */\nvar isPlainObject = function( obj ) {\n\treturn obj !== null && \"\" + obj === \"[object Object]\";\n};\n\n\n\n\nvar validateParameterTypePlainObject = function( value, name ) {\n\tvalidateParameterType(\n\t\tvalue,\n\t\tname,\n\t\tvalue === undefined || isPlainObject( value ),\n\t\t\"Plain Object\"\n\t);\n};\n\n\n\n\nvar alwaysCldr = function( localeOrCldr ) {\n\treturn localeOrCldr instanceof Cldr ? localeOrCldr : new Cldr( localeOrCldr );\n};\n\n\n\n\n// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions?redirectlocale=en-US&redirectslug=JavaScript%2FGuide%2FRegular_Expressions\nvar regexpEscape = function( string ) {\n\treturn string.replace( /([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, \"\\\\$1\" );\n};\n\n\n\n\nvar stringPad = function( str, count, right ) {\n\tvar length;\n\tif ( typeof str !== \"string\" ) {\n\t\tstr = String( str );\n\t}\n\tfor ( length = str.length; length < count; length += 1 ) {\n\t\tstr = ( right ? ( str + \"0\" ) : ( \"0\" + str ) );\n\t}\n\treturn str;\n};\n\n\n\n\nfunction validateLikelySubtags( cldr ) {\n\tcldr.once( \"get\", validateCldr );\n\tcldr.get( \"supplemental/likelySubtags\" );\n}\n\n/**\n * [new] Globalize( locale|cldr )\n *\n * @locale [String]\n *\n * @cldr [Cldr instance]\n *\n * Create a Globalize instance.\n */\nfunction Globalize( locale ) {\n\tif ( !( this instanceof Globalize ) ) {\n\t\treturn new Globalize( locale );\n\t}\n\n\tvalidateParameterPresence( locale, \"locale\" );\n\tvalidateParameterTypeLocale( locale, \"locale\" );\n\n\tthis.cldr = alwaysCldr( locale );\n\n\tvalidateLikelySubtags( this.cldr );\n}\n\n/**\n * Globalize.load( json, ... )\n *\n * @json [JSON]\n *\n * Load resolved or unresolved cldr data.\n * Somewhat equivalent to previous Globalize.addCultureInfo(...).\n */\nGlobalize.load = function() {\n\n\t// validations are delegated to Cldr.load().\n\tCldr.load.apply( Cldr, arguments );\n};\n\n/**\n * Globalize.locale( [locale|cldr] )\n *\n * @locale [String]\n *\n * @cldr [Cldr instance]\n *\n * Set default Cldr instance if locale or cldr argument is passed.\n *\n * Return the default Cldr instance.\n */\nGlobalize.locale = function( locale ) {\n\tvalidateParameterTypeLocale( locale, \"locale\" );\n\n\tif ( arguments.length ) {\n\t\tthis.cldr = alwaysCldr( locale );\n\t\tvalidateLikelySubtags( this.cldr );\n\t}\n\treturn this.cldr;\n};\n\n/**\n * Optimization to avoid duplicating some internal functions across modules.\n */\nGlobalize._alwaysArray = alwaysArray;\nGlobalize._createError = createError;\nGlobalize._formatMessage = formatMessage;\nGlobalize._isPlainObject = isPlainObject;\nGlobalize._objectExtend = objectExtend;\nGlobalize._regexpEscape = regexpEscape;\nGlobalize._runtimeBind = runtimeBind;\nGlobalize._stringPad = stringPad;\nGlobalize._validate = validate;\nGlobalize._validateCldr = validateCldr;\nGlobalize._validateDefaultLocale = validateDefaultLocale;\nGlobalize._validateParameterPresence = validateParameterPresence;\nGlobalize._validateParameterRange = validateParameterRange;\nGlobalize._validateParameterTypePlainObject = validateParameterTypePlainObject;\nGlobalize._validateParameterType = validateParameterType;\n\nreturn Globalize;\n\n\n\n\n}));\n\n","import { setLocale, getComputedLocale } from '../i18n/i18n';\nimport { Injector } from './Injector';\nimport { isThenable } from '../shim/Promise';\nexport const INJECTOR_KEY = '__i18n_injector';\nexport class I18nInjector extends Injector {\n    set(localeData = {}) {\n        const result = setLocale({ locale: localeData.locale || getComputedLocale() });\n        if (isThenable(result)) {\n            result.then(() => {\n                super.set(localeData);\n            });\n            return;\n        }\n        super.set(localeData);\n    }\n}\nexport function registerI18nInjector(localeData, registry) {\n    const injector = new I18nInjector(localeData);\n    registry.defineInjector(INJECTOR_KEY, (invalidator) => {\n        injector.setInvalidator(invalidator);\n        return () => injector;\n    });\n    return injector;\n}\nexport default I18nInjector;\n//# sourceMappingURL=I18nInjector.mjs.map","import { isWNode, isVNode } from './vdom';\nconst slice = Array.prototype.slice;\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Type guard that ensures that the value can be coerced to Object\n * to weed out host objects that do not derive from Object.\n * This function is used to check if we want to deep copy an object or not.\n * Note: In ES6 it is possible to modify an object's Symbol.toStringTag property, which will\n * change the value returned by `toString`. This is a rare edge case that is difficult to handle,\n * so it is not handled here.\n * @param  value The value to check\n * @return       If the value is coercible into an Object\n */\nfunction shouldDeepCopyObject(value) {\n    return Object.prototype.toString.call(value) === '[object Object]';\n}\nfunction copyArray(array, inherited) {\n    return array.map(function (item) {\n        if (Array.isArray(item)) {\n            return copyArray(item, inherited);\n        }\n        return !shouldDeepCopyObject(item)\n            ? item\n            : _mixin({\n                deep: true,\n                inherited: inherited,\n                sources: [item],\n                target: {}\n            });\n    });\n}\nfunction _mixin(kwArgs) {\n    const deep = kwArgs.deep;\n    const inherited = kwArgs.inherited;\n    const target = kwArgs.target;\n    const copied = kwArgs.copied || [];\n    const copiedClone = [...copied];\n    for (let i = 0; i < kwArgs.sources.length; i++) {\n        const source = kwArgs.sources[i];\n        if (source === null || source === undefined) {\n            continue;\n        }\n        for (let key in source) {\n            if (inherited || hasOwnProperty.call(source, key)) {\n                let value = source[key];\n                if (copiedClone.indexOf(value) !== -1) {\n                    continue;\n                }\n                if (deep) {\n                    if (Array.isArray(value)) {\n                        value = copyArray(value, inherited);\n                    }\n                    else if (shouldDeepCopyObject(value)) {\n                        const targetValue = target[key] || {};\n                        copied.push(source);\n                        value = _mixin({\n                            deep: true,\n                            inherited: inherited,\n                            sources: [value],\n                            target: targetValue,\n                            copied\n                        });\n                    }\n                }\n                target[key] = value;\n            }\n        }\n    }\n    return target;\n}\nexport function deepAssign(target, ...sources) {\n    return _mixin({\n        deep: true,\n        inherited: false,\n        sources: sources,\n        target: target\n    });\n}\nexport function deepMixin(target, ...sources) {\n    return _mixin({\n        deep: true,\n        inherited: true,\n        sources: sources,\n        target: target\n    });\n}\nexport function mixin(target, ...sources) {\n    return _mixin({\n        deep: false,\n        inherited: true,\n        sources: sources,\n        target: target\n    });\n}\n/**\n * Returns a function which invokes the given function with the given arguments prepended to its argument list.\n * Like `Function.prototype.bind`, but does not alter execution context.\n *\n * @param targetFunction The function that needs to be bound\n * @param suppliedArgs An optional array of arguments to prepend to the `targetFunction` arguments list\n * @return The bound function\n */\nexport function partial(targetFunction, ...suppliedArgs) {\n    return function () {\n        const args = arguments.length ? suppliedArgs.concat(slice.call(arguments)) : suppliedArgs;\n        return targetFunction.apply(this, args);\n    };\n}\nexport function guaranteeMinimumTimeout(callback, delay) {\n    const startTime = Date.now();\n    let timerId;\n    function timeoutHandler() {\n        const delta = Date.now() - startTime;\n        if (delay == null || delta >= delay) {\n            callback();\n        }\n        else {\n            timerId = setTimeout(timeoutHandler, delay - delta);\n        }\n    }\n    timerId = setTimeout(timeoutHandler, delay);\n    return {\n        destroy: () => {\n            if (timerId != null) {\n                clearTimeout(timerId);\n                timerId = null;\n            }\n        }\n    };\n}\nexport function debounce(callback, delay) {\n    let timer;\n    return function () {\n        timer && timer.destroy();\n        let context = this;\n        let args = arguments;\n        timer = guaranteeMinimumTimeout(function () {\n            callback.apply(context, args);\n            args = context = timer = null;\n        }, delay);\n    };\n}\nexport function throttle(callback, delay) {\n    let ran;\n    return function () {\n        if (ran) {\n            return;\n        }\n        ran = true;\n        let args = arguments;\n        callback.apply(this, args);\n        guaranteeMinimumTimeout(function () {\n            ran = null;\n        }, delay);\n    };\n}\nexport function uuid() {\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n        const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8;\n        return v.toString(16);\n    });\n}\nexport function decorate(dNodes, optionsOrModifier, predicate) {\n    let shallow = false;\n    let modifier;\n    if (typeof optionsOrModifier === 'function') {\n        modifier = optionsOrModifier;\n    }\n    else {\n        modifier = optionsOrModifier.modifier;\n        predicate = optionsOrModifier.predicate;\n        shallow = optionsOrModifier.shallow || false;\n    }\n    let nodes = Array.isArray(dNodes) ? [...dNodes] : [dNodes];\n    function breaker() {\n        nodes = [];\n    }\n    while (nodes.length) {\n        const node = nodes.shift();\n        if (node && node !== true) {\n            if (!shallow && (isWNode(node) || isVNode(node)) && node.children) {\n                nodes = [...nodes, ...node.children];\n            }\n            if (!predicate || predicate(node)) {\n                modifier(node, breaker);\n            }\n        }\n    }\n    return dNodes;\n}\n//# sourceMappingURL=util.mjs.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n            t[p[i]] = s[p[i]];\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n    if (m) return m.call(o);\r\n    return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n    result.default = mod;\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { create, node, invalidator } from '../vdom';\nconst factory = create({ node, invalidator });\nexport const validity = factory(function ({ middleware: { node, invalidator } }) {\n    return {\n        get(key, value) {\n            const domNode = node.get(key);\n            if (!domNode) {\n                return { valid: undefined, message: '' };\n            }\n            if (value !== domNode.value) {\n                setTimeout(() => invalidator());\n            }\n            return {\n                valid: domNode.validity.valid,\n                message: domNode.validationMessage\n            };\n        }\n    };\n});\nexport default validity;\n//# sourceMappingURL=validity.mjs.map","import { create, node } from '../vdom';\nconst factory = create({ node });\nconst defaultDimensions = {\n    client: {\n        height: 0,\n        left: 0,\n        top: 0,\n        width: 0\n    },\n    offset: {\n        height: 0,\n        left: 0,\n        top: 0,\n        width: 0\n    },\n    position: {\n        bottom: 0,\n        left: 0,\n        right: 0,\n        top: 0\n    },\n    scroll: {\n        height: 0,\n        left: 0,\n        top: 0,\n        width: 0\n    },\n    size: {\n        width: 0,\n        height: 0\n    }\n};\nexport const dimensions = factory(({ middleware: { node } }) => {\n    return {\n        get(key) {\n            const domNode = node.get(key);\n            if (!domNode) {\n                return {\n                    client: Object.assign({}, defaultDimensions.client),\n                    offset: Object.assign({}, defaultDimensions.offset),\n                    position: Object.assign({}, defaultDimensions.position),\n                    scroll: Object.assign({}, defaultDimensions.scroll),\n                    size: Object.assign({}, defaultDimensions.size)\n                };\n            }\n            const boundingDimensions = domNode.getBoundingClientRect();\n            const result = {\n                client: {\n                    height: domNode.clientHeight,\n                    left: domNode.clientLeft,\n                    top: domNode.clientTop,\n                    width: domNode.clientWidth\n                },\n                offset: {\n                    height: domNode.offsetHeight,\n                    left: domNode.offsetLeft,\n                    top: domNode.offsetTop,\n                    width: domNode.offsetWidth\n                },\n                position: {\n                    bottom: boundingDimensions.bottom,\n                    left: boundingDimensions.left,\n                    right: boundingDimensions.right,\n                    top: boundingDimensions.top\n                },\n                scroll: {\n                    height: domNode.scrollHeight,\n                    left: domNode.scrollLeft,\n                    top: domNode.scrollTop,\n                    width: domNode.scrollWidth\n                },\n                size: {\n                    width: boundingDimensions.width,\n                    height: boundingDimensions.height\n                }\n            };\n            return result;\n        }\n    };\n});\nexport default dimensions;\n//# sourceMappingURL=dimensions.mjs.map","var __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nimport Set from '../../shim/Set';\nimport Map from '../../shim/Map';\nimport { create, invalidator, diffProperty, destroy } from '../vdom';\nimport icache from './icache';\nimport { auto } from '../diff';\nfunction generateSynthIdString({ requestId, orderId }) {\n    return `${requestId}/${orderId}`;\n}\nclass RawCache {\n    constructor() {\n        this._subscriberCounter = 1;\n        this._rawCache = new Map();\n        this._syntheticIdToIdMap = new Map();\n        this._idToSyntheticIdMap = new Map();\n        this._syntheticIdToSubscriberMap = new Map();\n        this._subscriberMap = new Map();\n    }\n    subscribe(syntheticIds, invalidator) {\n        const subscriberId = `${this._subscriberCounter++}`;\n        syntheticIds.forEach((syntheticId) => {\n            const synthId = generateSynthIdString(syntheticId);\n            let subscribers = this._syntheticIdToSubscriberMap.get(synthId);\n            if (!subscribers) {\n                subscribers = new Set();\n            }\n            subscribers.add(subscriberId);\n            this._syntheticIdToSubscriberMap.set(synthId, subscribers);\n        });\n        this._subscriberMap.set(subscriberId, {\n            syntheticIds,\n            invalidator,\n            refs: new Set(syntheticIds.map(generateSynthIdString))\n        });\n    }\n    notify(syntheticId) {\n        const synthId = generateSynthIdString(syntheticId);\n        const subscriberIds = this._syntheticIdToSubscriberMap.get(synthId);\n        if (subscriberIds) {\n            [...subscriberIds].forEach((subscriberId) => {\n                const subscriber = this._subscriberMap.get(subscriberId);\n                if (subscriber) {\n                    subscriber.refs.delete(synthId);\n                    if (subscriber.refs.size === 0) {\n                        subscriber.invalidator();\n                        this._subscriberMap.delete(subscriberId);\n                    }\n                    const subscribers = this._syntheticIdToSubscriberMap.get(synthId);\n                    subscribers.delete(subscriber);\n                    this._syntheticIdToSubscriberMap.set(synthId, subscribers);\n                }\n            });\n        }\n    }\n    get(syntheticId) {\n        const synthId = generateSynthIdString(syntheticId);\n        const idDetails = this._syntheticIdToIdMap.get(synthId);\n        if (idDetails) {\n            if (idDetails.status === 'resolved') {\n                return this._rawCache.get(idDetails.id);\n            }\n            return {\n                status: idDetails.status,\n                mtime: Date.now(),\n                value: undefined,\n                stale: idDetails.stale\n            };\n        }\n    }\n    delete(id) {\n        this._idToSyntheticIdMap.delete(id);\n        this._rawCache.delete(id);\n    }\n    invalidate() {\n        this._rawCache.forEach((value, key) => {\n            this._rawCache.set(key, Object.assign({}, value, { stale: true }));\n        });\n        this._syntheticIdToIdMap.forEach((value, key) => {\n            this._syntheticIdToIdMap.set(key, Object.assign({}, value, { stale: true }));\n        });\n    }\n    addSyntheticId(syntheticId, status = 'pending') {\n        this._syntheticIdToIdMap.set(generateSynthIdString(syntheticId), { id: null, status });\n    }\n    getSyntheticIds(id) {\n        const ids = this._idToSyntheticIdMap.get(id);\n        if (ids) {\n            return [...ids.values()];\n        }\n        return [];\n    }\n    orphan(syntheticId) {\n        const synthId = generateSynthIdString(syntheticId);\n        this.notify(syntheticId);\n        this._syntheticIdToIdMap.set(synthId, { id: null, status: 'orphaned' });\n    }\n    set(syntheticId, item, idKey) {\n        const synthId = generateSynthIdString(syntheticId);\n        const id = item.value[idKey];\n        this._syntheticIdToIdMap.set(synthId, { id, status: 'resolved' });\n        const syntheticIds = this._idToSyntheticIdMap.get(id) || new Map();\n        syntheticIds.set(syntheticId.requestId, syntheticId);\n        this._idToSyntheticIdMap.set(id, syntheticIds);\n        this._rawCache.set(id, Object.assign({}, item, { stale: false }));\n        this.notify(syntheticId);\n    }\n}\nexport function defaultFilter(query, item, type = 'contains') {\n    const queryKeys = Object.keys(query);\n    for (let i = 0; i < queryKeys.length; i++) {\n        const queryKey = queryKeys[i];\n        const value = query[queryKeys[i]];\n        if (value) {\n            const itemValue = item[queryKey];\n            let result = true;\n            if (typeof itemValue === 'string' && typeof value === 'string' && type !== 'exact') {\n                if (type === 'contains') {\n                    result = item[queryKey].toLowerCase().indexOf(value.toLowerCase()) !== -1;\n                }\n                else {\n                    result = item[queryKey].toLowerCase().indexOf(value.toLowerCase()) === 0;\n                }\n            }\n            else {\n                result = value === item[queryKey];\n            }\n            if (!result) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\nexport function createResourceTemplate(templateOrWidget, template) {\n    template = template || templateOrWidget;\n    if (typeof template === 'function') {\n        return (templateOptions) => {\n            return {\n                template: {\n                    template,\n                    templateOptions\n                }\n            };\n        };\n    }\n    if (typeof template === 'string') {\n        return createResourceTemplate(({ data }) => ({\n            idKey: template,\n            read: (request, { put }) => {\n                const { query, offset } = request;\n                const filteredData = Object.keys(query).length\n                    ? data.filter((item) => item && defaultFilter(query, item, 'contains'))\n                    : data;\n                put({ data: filteredData.slice(offset), total: filteredData.length }, request);\n            }\n        }));\n    }\n    return {\n        template: {\n            template: () => template,\n            templateOptions: {}\n        }\n    };\n}\nconst factory = create({\n    invalidator,\n    destroy,\n    diffProperty,\n    icache\n}).properties();\n// The template cache, this holds the RawCache instance and request inprogress flags\nconst templateCacheMap = new Map();\nconst optionsCacheMap = new Map();\n// The reverse look up for the owning id, this is so that widgets passed a resource options can add their invalidator to subscribers\nconst optionsSetterToOwnerIdMap = new Map();\nlet optionsId = 0;\nfunction isTemplateWrapper(value) {\n    return Boolean(value && value.template && typeof value.template === 'function');\n}\nfunction isResourceWrapper(value) {\n    return Boolean(value && value.template && typeof value.template.template === 'function');\n}\nfunction transformQuery(query, transformConfig) {\n    if (Array.isArray(transformConfig)) {\n        return [...transformConfig].reverse().reduce((query, config) => {\n            return transformQuery(query, config);\n        }, Object.assign({}, query));\n    }\n    const queryKeys = Object.keys(query);\n    let transformedQuery = {};\n    for (let i = 0; i < queryKeys.length; i++) {\n        const queryKey = queryKeys[i];\n        transformedQuery[transformConfig[queryKey] || queryKey] = query[queryKey];\n    }\n    return transformedQuery;\n}\nfunction transformData(item, transformConfig) {\n    if (!transformConfig || !item) {\n        return item;\n    }\n    if (Array.isArray(transformConfig)) {\n        return transformConfig.reduce((transformedItem, config) => {\n            return transformData(transformedItem, config);\n        }, Object.assign({}, item));\n    }\n    let transformedItem = {};\n    let sourceKeys = [];\n    Object.keys(transformConfig).forEach((key) => {\n        const sourceKey = transformConfig[key];\n        transformedItem = Object.assign({}, transformedItem, { [key]: item[sourceKey] });\n        sourceKeys.push(sourceKey);\n    });\n    Object.keys(item)\n        .filter((key) => sourceKeys.indexOf(key) === -1)\n        .forEach((key) => {\n        transformedItem = Object.assign({}, transformedItem, { [key]: item[key] });\n    });\n    return transformedItem;\n}\nfunction getOrCreateResourceCaches(template) {\n    if (template === undefined) {\n        throw new Error('Resource template cannot be undefined.');\n    }\n    if (!isTemplateWrapper(template)) {\n        template = template.template;\n    }\n    const templateCache = templateCacheMap.get(template.template) || new Map();\n    templateCacheMap.set(template.template, templateCache);\n    const cacheKey = JSON.stringify(template.templateOptions);\n    let caches = templateCache.get(cacheKey);\n    if (!caches) {\n        caches = {\n            raw: new RawCache(),\n            requestCache: new Map(),\n            instance: template.template(template.templateOptions),\n            invalidators: new Set()\n        };\n        templateCache.set(cacheKey, caches);\n    }\n    return caches;\n}\nconst middleware = factory(({ id, properties, middleware: { invalidator, destroy, diffProperty, icache } }) => {\n    const uuid = icache.getOrSet('uuid', `${++optionsId}`);\n    const destroyFuncs = [];\n    diffProperty('resource', properties, ({ resource: currResource }, { resource: nextResource }) => {\n        if (!nextResource) {\n            return undefined;\n        }\n        if (!currResource ||\n            currResource.options !== nextResource.options ||\n            currResource.template !== nextResource.template) {\n            invalidator();\n        }\n        if (nextResource.options) {\n            const id = optionsSetterToOwnerIdMap.get(nextResource.options);\n            if (id) {\n                const optionsWrapper = optionsCacheMap.get(id);\n                if (optionsWrapper && !optionsWrapper.subscribers.has(invalidator)) {\n                    optionsWrapper.subscribers.add(invalidator);\n                    destroyFuncs.push(() => {\n                        optionsWrapper.subscribers.delete(invalidator);\n                    });\n                }\n            }\n        }\n        if (!currResource && !nextResource.template) {\n            const _a = nextResource, { template: _template, options, idKey } = _a, rest = __rest(_a, [\"template\", \"options\", \"idKey\"]);\n            const template = createResourceTemplate(idKey);\n            nextResource.template = template(rest).template;\n        }\n        else if (currResource && !nextResource.template) {\n            const _b = nextResource, { template: _template, options, idKey } = _b, rest = __rest(_b, [\"template\", \"options\", \"idKey\"]);\n            nextResource.template = {\n                template: currResource.template.template,\n                templateOptions: rest\n            };\n        }\n        return nextResource;\n    });\n    destroy(() => {\n        destroyFuncs.forEach((des) => des());\n    });\n    const resource = (options) => {\n        if (!options || !options.template) {\n            throw new Error('Resource cannot be undefined');\n        }\n        if (isTemplateWrapper(options)) {\n            return {\n                template: { template: Object.assign({}, options), transform: options.transform }\n            };\n        }\n        let transform = options.transform;\n        let existingTransform = options.template.transform;\n        if (existingTransform) {\n            if (transform) {\n                existingTransform = Array.isArray(existingTransform) ? existingTransform : [existingTransform];\n                transform = [...existingTransform, transform];\n            }\n            else {\n                transform = existingTransform;\n            }\n        }\n        if (isResourceWrapper(options)) {\n            return {\n                template: Object.assign({}, options, { transform }),\n                options: options.options,\n                transform\n            };\n        }\n        return {\n            template: Object.assign({}, options.template, { transform }),\n            options: options.options,\n            transform\n        };\n    };\n    function createOptions(setter, optionsId = uuid) {\n        const existingOptions = optionsCacheMap.get(optionsId);\n        if (existingOptions) {\n            return existingOptions.setter;\n        }\n        const optionsWrapper = {\n            options: {},\n            subscribers: new Set(),\n            setter: (options) => {\n                return options;\n            }\n        };\n        optionsWrapper.subscribers.add(invalidator);\n        function setOptions(newOptions) {\n            if (!newOptions) {\n                optionsWrapper.subscribers.add(invalidator);\n                return {\n                    offset: optionsWrapper.options.offset || 0,\n                    size: optionsWrapper.options.size || 30,\n                    query: optionsWrapper.options.query || {}\n                };\n            }\n            const updatedOptions = setter(optionsWrapper.options, newOptions);\n            if (auto(updatedOptions, optionsWrapper.options, 5).changed) {\n                optionsWrapper.options = updatedOptions;\n                optionsWrapper.subscribers.forEach((i) => {\n                    i();\n                });\n            }\n            return {\n                offset: optionsWrapper.options.offset || 0,\n                size: optionsWrapper.options.size || 30,\n                query: optionsWrapper.options.query || {}\n            };\n        }\n        setOptions({});\n        destroyFuncs.push(() => {\n            optionsCacheMap.delete(id);\n        });\n        optionsWrapper.setter = setOptions;\n        optionsCacheMap.set(optionsId, optionsWrapper);\n        optionsSetterToOwnerIdMap.set(setOptions, optionsId);\n        destroyFuncs.push(() => optionsSetterToOwnerIdMap.delete(setOptions));\n        return setOptions;\n    }\n    resource.createOptions = createOptions;\n    resource.template = function (template) {\n        const { instance, raw: cache, invalidators, requestCache } = getOrCreateResourceCaches(template);\n        const apiKeys = Object.keys(instance).filter((key) => typeof instance[key] === 'function');\n        let transform;\n        if (isResourceWrapper(template) && template.transform) {\n            transform = template.transform;\n        }\n        const templateApi = apiKeys.reduce((api, key) => {\n            api[key] = (args) => {\n                const put = (response, request) => {\n                    if (Array.isArray(response)) {\n                        response.forEach((item) => {\n                            const id = item[instance.idKey];\n                            const synthIds = cache.getSyntheticIds(id);\n                            cache.invalidate();\n                            synthIds.forEach((id) => {\n                                cache.set(id, {\n                                    value: item,\n                                    status: 'resolved',\n                                    mtime: Date.now()\n                                }, instance.idKey);\n                            });\n                            invalidators.forEach((invalidator) => invalidator());\n                        });\n                    }\n                    else {\n                        const { offset, query: requestQuery, size } = request;\n                        const query = transform ? transformQuery(requestQuery, transform) : requestQuery;\n                        const syntheticIds = [];\n                        for (let i = 0; i < offset + size - offset; i++) {\n                            syntheticIds.push({ requestId: JSON.stringify(query), orderId: `${offset + i}` });\n                        }\n                        response.data.forEach((item, idx) => {\n                            const syntheticId = syntheticIds.shift() || {\n                                requestId: JSON.stringify(query),\n                                orderId: `${offset + idx}`\n                            };\n                            cache.set(syntheticId, {\n                                value: item,\n                                status: 'resolved',\n                                mtime: Date.now()\n                            }, instance.idKey);\n                        });\n                        syntheticIds.forEach((id) => cache.orphan(id));\n                        const requestCacheData = requestCache.get(JSON.stringify(query));\n                        if (requestCacheData) {\n                            requestCacheData.total = response.total;\n                            requestCache.set(JSON.stringify(query), requestCacheData);\n                        }\n                    }\n                };\n                const del = (items) => {\n                    cache.invalidate();\n                    invalidators.forEach((invalidator) => invalidator());\n                    items.forEach((item) => {\n                        cache.delete(item[instance.idKey]);\n                    });\n                };\n                const get = (request) => {\n                    if (Array.isArray(request)) {\n                        return request.map((id) => {\n                            const [synthId] = cache.getSyntheticIds(id);\n                            if (synthId) {\n                                const item = cache.get(synthId);\n                                if (item) {\n                                    return item.value;\n                                }\n                            }\n                        });\n                    }\n                    let items = [];\n                    const { offset, size, query } = request;\n                    const end = offset + size;\n                    for (let i = 0; i < end - offset; i++) {\n                        const item = cache.get({ requestId: JSON.stringify(query), orderId: `${offset + i}` });\n                        if (!item || item.status === 'pending') {\n                            return;\n                        }\n                        if (item && item.status === 'resolved') {\n                            items.push(transformData(item.value, transform));\n                        }\n                    }\n                    return items;\n                };\n                instance[key](args, { put, del, get });\n            };\n            return api;\n        }, {});\n        function get(request, settings = {}) {\n            const caches = getOrCreateResourceCaches(template);\n            const { raw: cache, requestCache, invalidators } = caches;\n            if (Array.isArray(request)) {\n                return request.map((id) => {\n                    const [synthId] = cache.getSyntheticIds(id);\n                    if (synthId) {\n                        const item = cache.get(synthId);\n                        if (item) {\n                            return item.value;\n                        }\n                    }\n                });\n            }\n            const { meta = false, read } = settings;\n            if (read && !invalidators.has(invalidator)) {\n                invalidators.add(invalidator);\n                destroyFuncs.push(() => {\n                    invalidators.delete(invalidator);\n                });\n            }\n            let { size, offset, query } = request;\n            let transform;\n            if (isResourceWrapper(template) && template.transform) {\n                transform = template.transform;\n                query = transformQuery(query, transform);\n            }\n            const end = offset + size;\n            const stringifiedRequest = JSON.stringify(request);\n            const stringifiedQuery = JSON.stringify(query);\n            let requestCacheData = requestCache.get(stringifiedQuery) || {\n                inflightMap: new Map(),\n                total: undefined\n            };\n            const inflight = requestCacheData.inflightMap.get(stringifiedRequest) || false;\n            if (!settings.meta && inflight) {\n                return undefined;\n            }\n            const syntheticIds = [];\n            const orphanedIds = [];\n            let incompleteIds = [];\n            let shouldRead = false;\n            let resetOrphans = false;\n            if (!read) {\n                let items = [];\n                let requestStatus = 'read';\n                for (let i = 0; i < end - offset; i++) {\n                    const item = cache.get({ requestId: stringifiedQuery, orderId: `${offset + i}` });\n                    if (meta) {\n                        if (item) {\n                            const status = item.status === 'resolved' ? 'read' : 'reading';\n                            if (requestStatus === 'read' && status === 'reading') {\n                                requestStatus = 'reading';\n                            }\n                            items.push({ value: transformData(item.value, transform), status });\n                        }\n                        else {\n                            requestStatus = 'unread';\n                            items.push({ value: undefined, status: 'unread' });\n                        }\n                    }\n                    else {\n                        if (item && item.status === 'resolved') {\n                            items.push(transformData(item.value, transform));\n                        }\n                        else {\n                            items.push(undefined);\n                        }\n                    }\n                }\n                if (meta) {\n                    return { data: items, meta: { status: requestStatus, total: requestCacheData.total } };\n                }\n                return items;\n            }\n            let items = [];\n            for (let i = 0; i < end - offset; i++) {\n                const syntheticId = { requestId: stringifiedQuery, orderId: `${offset + i}` };\n                const item = cache.get(syntheticId);\n                syntheticIds.push(syntheticId);\n                if (item) {\n                    if (item.stale) {\n                        incompleteIds.push(syntheticId);\n                        if (item.value && item.status === 'resolved') {\n                            cache.set(syntheticId, Object.assign({}, item, { stale: false }), instance.idKey);\n                        }\n                        else if (item.status === 'orphaned') {\n                            cache.addSyntheticId(syntheticId, item.status);\n                        }\n                        shouldRead = true;\n                        if (orphanedIds.length) {\n                            resetOrphans = true;\n                        }\n                        items.push(item);\n                    }\n                    else if (item.status === 'resolved') {\n                        if (orphanedIds.length) {\n                            resetOrphans = true;\n                            shouldRead = true;\n                        }\n                        items.push(item);\n                    }\n                    else if (item.status === 'pending') {\n                        incompleteIds.push(syntheticId);\n                        if (orphanedIds.length) {\n                            resetOrphans = true;\n                            shouldRead = true;\n                        }\n                        items.push(item);\n                    }\n                    else {\n                        items.push(item);\n                        orphanedIds.push(syntheticId);\n                    }\n                }\n                else {\n                    incompleteIds.push(syntheticId);\n                    cache.addSyntheticId(syntheticId);\n                    items.push({\n                        status: 'pending',\n                        mtime: Date.now(),\n                        value: undefined\n                    });\n                    shouldRead = true;\n                }\n            }\n            if (resetOrphans) {\n                incompleteIds = [...incompleteIds, ...orphanedIds];\n                orphanedIds.forEach((id) => {\n                    cache.addSyntheticId(id);\n                });\n            }\n            if (incompleteIds.length) {\n                cache.subscribe(incompleteIds, () => {\n                    invalidator();\n                });\n            }\n            if (shouldRead) {\n                requestCacheData.inflightMap.set(stringifiedRequest, true);\n                requestCache.set(stringifiedQuery, requestCacheData);\n                settings.read && settings.read({ size, offset, query });\n                requestCacheData.inflightMap.set(stringifiedRequest, false);\n                requestCache.set(stringifiedQuery, requestCacheData);\n                if (!requestCacheData.inflightMap.get(stringifiedRequest)) {\n                    items = [];\n                    for (let i = 0; i < syntheticIds.length; i++) {\n                        const syntheticId = syntheticIds[i];\n                        const item = cache.get(syntheticId);\n                        if (item) {\n                            if (item.status !== 'orphaned') {\n                                items.push(item);\n                            }\n                        }\n                    }\n                }\n            }\n            if (!resetOrphans) {\n                items = items.filter((item) => item.status !== 'orphaned');\n            }\n            if (settings.meta) {\n                let requestStatus = 'read';\n                const data = items.map((item) => {\n                    let status = 'read';\n                    if (item.status !== 'resolved') {\n                        status = 'reading';\n                    }\n                    if (requestStatus === 'read' && status === 'reading') {\n                        requestStatus = 'reading';\n                    }\n                    return {\n                        value: transformData(item.value, transform),\n                        status\n                    };\n                });\n                return {\n                    data,\n                    meta: { status: requestStatus, total: requestCacheData.total }\n                };\n            }\n            const filteredItems = items\n                .filter((item) => item.status !== 'pending')\n                .map((item) => transformData(item.value, transform));\n            return items.length === filteredItems.length ? filteredItems : undefined;\n        }\n        return {\n            template: templateApi,\n            createOptions,\n            get\n        };\n    };\n    return resource;\n});\nexport function createResourceMiddleware() {\n    return middleware.withType();\n}\n//# sourceMappingURL=resources.mjs.map"],"sourceRoot":""}