{"version":3,"file":"js/global.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;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A;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAK;AACZ,OAAO,KAAK;AACZ;AACA;;AAEO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,IAAI;AAClB,cAAc,SAAG;AACjB;;AAEA;AACA,uBAAuB,eAAe;AACtC;AACA;;AAEA,yBAAyB,SAAS;AAClC,qBAAqB,kBAAkB;;AAEvC,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA,MAAM;;;AAGN;;AAEA,sBAAsB,SAAG,mBAAmB,IAAI,kBAAkB,KAAK,mBAAmB,GAAG;AAC7F,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,IAAI,mBAAmB,SAAG,kBAAkB,MAAM,mBAAmB,GAAG;AAC9F,cAAc,KAAK;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG,EAAE,SAAS;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,2BAA2B,oCAAoC;AAC/D;;AAEA,yBAAyB,qCAAqC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,mDAAmD;AAC7F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,yCAAyC,kDAAkD;AAC3F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,4CAA4C;AAC5C;AACA,GAAG;AACH,EAAE;;;AAGF,8DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxKiD,CAAC;;AAEnD;AACA;AACA;;AAEA,SAAS,qBAAM;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA,sBAAsB;AACtB,UAAU,qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,YAAY,SAAS;AACrB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,gBAAgB;;AAEzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;;AC9ByD;AACJ;AACM;AACR;AACZ,CAAC;AACxC;;AAEe;AACf;;AAEA,aAAa,kBAAkB;AAC/B,kBAAkB,eAAe;AACjC;AACA,cAAc,QAAG;AACjB,eAAe,QAAG;AAClB,kCAAkC,mBAAmB;AACrD;;AAEA,MAAM,gBAAgB;AACtB,SAAS,QAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BqD;AACtC;AACf;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;;AAEA;AACA;;ACT+C;AACE;AACN;AACK;AACjC;AACf,4CAA4C,WAAW;AACvD;AACA;AACA;;AAEA,MAAM,aAAa,UAAU,cAAc;AAC3C;AACA;;AAEA,yBAAyB,aAAa;AACtC;;ACfmD;AACJ;AACR;AACU;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;;AAEA;AACA;AACA;;AAEA,qBAAqB,eAAe;AACpC;AACA,YAAY,SAAS;AACrB,+DAA+D,cAAc;AAC7E;AACA;AACA,uCAAuC,aAAa;AACpD;;ACzBe;AACf,yBAAyB;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;;ACPuC;AACY;AACA;AACI;AACJ;AACM;AACJ;AACM;AACI;AAChB;AACV;AACM;AACiB;AAChB;;AAE5C;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,QAAQ,GAAG,gBAAgB,CAAC,eAAe,uBAAuB,SAAS,0EAA0E,gBAAgB,CAAC,eAAe,CAAC,kBAAkB;AACpO,EAAE;AACF;AACA;;;AAGA;AACA,wBAAwB,iBAAiB,CAAC,aAAa;AACvD,wDAAwD,gBAAgB;AACxE,4CAA4C,aAAa,YAAY,eAAe;;AAEpF,OAAO,SAAS;AAChB;AACA,IAAI;;;AAGJ;AACA,WAAW,SAAS,oBAAoB,QAAQ,oCAAoC,WAAW;AAC/F,GAAG;AACH,EAAE;AACF;;;AAGe;AACf;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAG;AACrB,oBAAoB,QAAG;AACvB,qBAAqB,QAAG;AACxB,mBAAmB,QAAG;AACtB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;ACrEqD;AACR;AACwB;AACF;AACpD;AACf;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD,8BAA8B,YAAY;AAC1C;AACA;AACA;;AAEA;AACA,SAAS,SAAG;AACZ;AACA;AACA;AACA;AACA;;AAEA,SAAS,MAAM;AACf;AACA;AACA;AACA;AACA;;AAEA,SAAS,KAAK;AACd;AACA;AACA;AACA;AACA;;AAEA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,wB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AAgB,gBAAgB,IAAI;AAC1C;AACA;;AAEA,0BAA0B,oBAAoB;AAC9C,UAAU,6BAA6B,gCAAgC,6BAA6B;AACpG;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA,iGAAiG,oBAAoB;AACrH;AACA,sBAAsB,gBAAgB,gBAAgB,IAAI,GAAG,oBAAoB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA,yBAAyB,gBAAgB;;AAEzC,2BAA2B,YAAY,gBAAgB,KAAK;AAC5D,sBAAsB,SAAG,EAAE,MAAM;AACjC;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAU;AACvB;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,uDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,8DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sC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gBAAgB,qBAAqB;AACrC;AACA;AACA,MAAM;AACN,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzD6C,CAAC;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA,2CAA2C;;AAE3C,SAAS,cAAc;AACvB;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACN;AACZ;AACM;AACM;AACD;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA,UAAU;;;AAGV;AAC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;;;;;;;;;;;;;;;;;;ACL5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,kEAAkE;AAClE,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wDAAwD,qBAAqB;AAC7E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,gCAAgC,iBAAiB,QAAQ,mBAAmB,GAAG;AAC/E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8CAA8C,MAAM;AACpD;;AAEA;AACA;AACA,wBAAwB,aAAa,IAAI,QAAQ;AACjD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,6BAA6B;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC,YAAY;AACjD,GAAG;AACH;AACA;;AAEA;AACA,2BAA2B,OAAO,OAAO,OAAO;AAChD;;AAEA;AACA;AACA,YAAY,OAAO,EAAE,0CAA0C;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,MAAM;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,6BAA6B;AAC7B,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB,SAAS,MAAM;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,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,aAAa;AACrC,uBAAuB,aAAa;AACpC,sBAAsB,aAAa;AACnC,uBAAuB,aAAa;AACpC,uBAAuB,YAAY;AACnC,2BAA2B,YAAY;AACvC,wBAAwB,aAAa;AACrC,uBAAuB,aAAa;AACpC,4BAA4B,YAAY;AACxC,4BAA4B,YAAY;AACxC,4BAA4B,aAAa;AACzC,iCAAiC,iBAAiB;AAClD,0BAA0B,aAAa;AACvC,8BAA8B,eAAe;AAC7C,0BAA0B,aAAa;AACvC,sBAAsB,aAAa;AACnC,uBAAuB,aAAa;AACpC,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,KAAK;AACf,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C,4BAA4B,YAAY;AACxC,4BAA4B,WAAW;AACvC;AACA,oCAAoC,YAAY,QAAQ,YAAY;AACpE,8BAA8B,eAAe;AAC7C,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C,8BAA8B,iBAAiB;AAC/C,0BAA0B,eAAe,QAAQ,mBAAmB;AACpE,gCAAgC,WAAW;AAC3C,iCAAiC,YAAY;AAC7C,KAAK;AACL;AACA;AACA;AACA;AACA,8BAA8B,GAAG;AACjC,4BAA4B,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,IAAI,aAAa;AACrC,SAAS,WAAW,IAAI,kBAAkB;AAC1C,yBAAyB,WAAW;AACpC,iCAAiC,WAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU,yCAAyC;AACnD,UAAU,4BAA4B;AACtC,UAAU,6BAA6B;AACvC,UAAU,UAAU;AACpB;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA,oBAAoB,QAAQ,QAAQ,eAAe;AACnD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,UAAU,iBAAiB;AAC3B,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,MAAM;AACN;AACA;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,UAAU,iBAAiB;AAC3B,UAAU,SAAS;AACnB,UAAU,UAAU;AACpB,UAAU,oBAAoB;AAC9B,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,IAAI,mBAAmB,IAAI,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,aAAa,IAAI,EAAE,IAAI,qBAAqB,EAAE,aAAa,IAAI,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,WAAW;AACrB,UAAU,mBAAmB;AAC7B,UAAU,UAAU;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB,QAAQ,eAAe;AACzD;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,WAAW;AACrB,UAAU,yDAAyD;AACnE,UAAU,kBAAkB;AAC5B,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,aAAa,GAAG,YAAY;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,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;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,UAAU,KAAK;AACf,UAAU,OAAO;AACjB,UAAU,wBAAwB;AAClC,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU,EAAE,aAAa;AAC1E,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA,UAAU,iBAAiB;AAC3B,UAAU,gBAAgB;AAC1B,UAAU,uBAAuB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,eAAe,EAAE,oCAAoC,8BAA8B,eAAe,iBAAiB,MAAM,EAAE,KAAK,WAAW,KAAK,YAAY,KAAK,aAAa,0BAA0B;AAC5O;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,eAAe;;AAElD;AACA,UAAU,iBAAiB;AAC3B;AACA,UAAU,WAAW;AACrB,UAAU,WAAW;AACrB;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB,kCAAkC,WAAW;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,KAAK;AACf;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qEAAqE,QAAQ;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,WAAW;AACrB,UAAU,OAAO;AACjB,UAAU,uCAAuC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,yBAAyB;AACnC,UAAU,2BAA2B;AACrC,UAAU,QAAQ;AAClB,UAAU,kBAAkB;AAC5B,UAAU,6BAA6B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,cAAc,+BAA+B;AAC7C,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,gCAAgC;AACvF;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,UAAU,mBAAmB;AAC7B,UAAU,OAAO;AACjB,UAAU,UAAU;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,QAAQ;AACR;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,cAAc,MAAM;AACpB,mEAAmE,IAAI;AACvE;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,eAAe;AAC7C,iCAAiC,mBAAmB;AACpD,2BAA2B,mBAAmB,MAAM,sBAAsB;;AAE1E;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,UAAU;AACvD;AACA,wBAAwB,qCAAqC;AAC7D;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,yBAAyB;AACnC,UAAU,+BAA+B;AACzC,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB,YAAY,yBAAyB;AACrC;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA,wCAAwC,qCAAqC;AAC7E;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA,sBAAsB,KAAK;AAC3B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA,YAAY,KAAK;AACjB;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,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;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,UAAU,KAAK;AACf;AACA;AACA;AACA,0DAA0D,cAAc,KAAK,eAAe;AAC5F,OAAO;AACP,KAAK;AACL;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,OAAO;AACjB,UAAU,mBAAmB;AAC7B,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAM,KAAK,eAAe;AACnD;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA,uDAAuD;AACvD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAA6C,8BAA8B;AAC7G;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,WAAW,KAAK;AAChE;AACA,iBAAiB;AACjB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS,EAAE,SAAS;AACzC,gBAAgB,WAAW;AAC3B;AACA;AACA,oBAAoB,KAAK,IAAI,OAAO;AACpC;AACA,OAAO;AACP,eAAe;AACf,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,sDAAsD;AACtD;AACA,2BAA2B,uCAAuC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,OAAO;AACnB,sCAAsC,YAAY;AAClD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gBAAgB;AACtD;AACA;AACA;AACA,yBAAyB,4BAA4B,EAAE,gCAAgC;AACvF;AACA,kBAAkB,SAAS,EAAE,0BAA0B;AACvD;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B,KAAK;AACL;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,aAAa,GAAG,MAAM;AACnF;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA,YAAY,eAAe;AAC3B,mBAAmB,qBAAqB;AACxC;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,qBAAqB;AACnC;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,IAAI,iCAAiC,IAAI,+BAA+B;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,aAAa,IAAI,EAAE,IAAI,qBAAqB,EAAE,aAAa,IAAI,EAAE;AACzF;AACA;AACA,YAAY,cAAc;AAC1B,4BAA4B,gBAAgB;AAC5C;AACA;AACA,cAAc,MAAM,EAAE,MAAM;AAC5B;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,aAAa;AACb;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA,oDAAoD;AACpD,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,SAAS,WAAW,IAAI,aAAa;AACrC,SAAS,WAAW,IAAI,kBAAkB;AAC1C,yBAAyB,WAAW;AACpC,iCAAiC,WAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB,IAAI,MAAM;AACtD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB,GAAG,OAAO;AAC/C,KAAK;AACL;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA,iBAAiB,KAAK,EAAE,+BAA+B,GAAG,mBAAmB,IAAI,IAAI;AACrF,KAAK;AACL;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,mBAAmB,UAAU,qBAAqB,EAAE,cAAc,GAAG;AAClG,6BAA6B,aAAa,OAAO;AACjD;AACA,KAAK;AACL;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA,gBAAgB,eAAe,EAAE,mCAAmC;AACpE;AACA;AACA;AACA,sBAAsB,uBAAuB,eAAe,eAAe,iBAAiB,MAAM,EAAE,KAAK,WAAW,KAAK,YAAY,KAAK,aAAa,+BAA+B;AACtL;AACA;AACA,YAAY,yFAAyF;AACrG;AACA,wBAAwB,QAAQ,WAAW,qBAAqB,EAAE,gB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AmB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,+BAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;AACD;;AAEA,kBAAkB,+BAAmB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,+BAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;AACD;;AAEA,kBAAkB,+BAAmB;;AAErC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,+BAAmB;;AAErE;;;AAGA;AACA,2EAA2E,OAAO;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,kCAAkC,+BAAmB;AACrD;;;AAGA,gCAAgC,+BAAmB;;AAEnD,gBAAgB,+BAAmB;;AAEnC,eAAe,+BAAmB;;AAElC,cAAc,+BAAmB;;AAEjC,aAAa,+BAAmB;;AAEhC,mBAAmB,+BAAmB;;AAEtC,kBAAkB,+BAAmB;;AAErC,iBAAiB,+BAAmB;;AAEpC,cAAc,+BAAmB;;AAEjC,iBAAiB,+BAAmB;;AAEpC,8BAA8B,+BAAmB;;AAEjD,kCAAkC,+BAAmB;AACrD,UAAU,sEAAsE;;;AAGhF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,4DAA4D;;AAE5D;AACA,MAAM;;;AAGN,+CAA+C;;AAE/C,2CAA2C;;AAE3C;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;;;AAGA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,0EAA0E;AAC1E,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,0EAA0E;AAC1E,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN,8DAA8D;;AAE9D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD,QAAQ,iDAAiD;AACzD,QAAQ,qCAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,uDAAuD;AACjE,UAAU,wDAAwD;AAClE,UAAU,2CAA2C;AACrD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU,yDAAyD;AACnE,UAAU,yCAAyC;AACnD,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA,MAAM;AACN;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT,QAAQ;;;AAGR;AACA;AACA,QAAQ;;;AAGR;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,MAAM;;;AAGN;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA;;AAEA,wEAAwE;;;AAGxE;AACA;AACA;;AAEA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;AAC3B;;AAEA,mEAAmE;;;AAGnE;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP,OAAO;;;AAGP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP,MAAM;;;AAGN;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,0CAA0C;;;AAG1C;AACA;AACA;;AAEA,kDAAkD;;AAElD;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;;;AAGN,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,yEAAyE;;;AAGzE;AACA,OAAO;;;AAGP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM;;;AAGN;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,oDAAoD;;AAEpD;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA,wEAAwE;;AAExE;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC;;AAEvC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,oDAAoD;;AAEpD;AACA;AACA,wFAAwF;;AAExF;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sDAAsD;AACtD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;;AAEA;AACA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;;AAGR;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,kCAAkC;AAClC;;;AAGA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,gCAAgC;AAChC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,sIAAsI;;AAEtI;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;;AAEA,qBAAqB,uBAAuB;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,kCAAkC;;AAElC,0DAA0D;;AAE1D;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;;;AAGtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA,sBAAsB;;;AAGtB;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uCAAuC;;AAEvC;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;;AAED,cAAc,gCAAmB;;AAEjC,kBAAkB,gCAAmB;;AAErC;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;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,MAAM;AACN;;;AAGA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA;;AAEA;;;AAGA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA,iCAAiC,gCAAmB;;AAEpD;;AAEA,kCAAkC,gCAAmB;;AAErD;;AAEA,8BAA8B,gCAAmB;;AAEjD;;AAEA,6BAA6B,gCAAmB;;AAEhD;;AAEA,sCAAsC,gCAAmB;;AAEzD;;AAEA,uCAAuC,gCAAmB;;AAE1D;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;;AAED,cAAc,gCAAmB;;AAEjC,kBAAkB,gCAAmB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;;AAED,kBAAkB,gCAAmB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,gDAAgD;;AAEhD;AACA,8CAA8C;;AAE9C,wDAAwD;;AAExD;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;;AAED,cAAc,gCAAmB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,gCAAgC;;AAEhC,gCAAgC;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,iDAAiD;AACjD;;AAEA,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,wCAAwC,gCAAmB;;AAE3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,wCAAwC,gCAAmB;;AAE3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA,2CAA2C;;;AAG3C;AACA,SAAS;;;AAGT;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA;;AAEA;;;AAGA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,gCAAmB;;AAErE;;;AAGA;AACA;AACA,CAAC;AACD;;AAEA,cAAc,gCAAmB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,OAAO;;AAEP;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,sBAAsB,sBAAsB,wBAAwB;AACvG;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA,OAAO;;AAEP;AACA;;AAEA;;;AAGA;AACA,2EAA2E,OAAO;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA;;AAEA;;;AAGA;AACA,2EAA2E,OAAO;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,iCAAmB;;AAErE;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA,cAAc,iCAAmB;;AAEjC,8BAA8B,iCAAmB;;AAEjD,+BAA+B,iCAAmB;;AAElD,gCAAgC,iCAAmB;;AAEnD,gCAAgC,iCAAmB;;AAEnD,cAAc,iCAAmB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA;;AAEA;;;AAGA;AACA,2EAA2E,OAAO;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA;;AAEA;;;AAGA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,iCAAmB;;AAErE;;;AAGA;AACA,2EAA2E,OAAO;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA,cAAc,iCAAmB;;AAEjC,8BAA8B,iCAAmB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AAC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;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA;AACA,CAAC;;;AAGD;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,KAAK;AAChB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,MAAM,KAAK,EAAE,EAAE;;AAEf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,KAAI,+BAA+B,CAAC;AACzD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA;;AAEA;AACA,qBAAqB,KAAI,+BAA+B,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;;;AAGA;AACA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,eAAe,UAAU;AACzB;;;AAGA;AACA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,KAAI,+BAA+B,CAAC;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;;;AAGA;AACA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA,uBAAuB,KAAI,+BAA+B,CAAC;AAC3D;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,eAAe;AACf;;;AAGA;AACA;AACA,uBAAuB,KAAI,gCAAgC,CAAC;AAC5D;;AAEA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAI,gCAAgC,CAAC;AAChE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,IAAI;AACJ;AACA;;;AAGA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa;;AAEjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,uBAAuB,KAAI,gCAAgC,CAAC;AAC5D;;AAEA;AACA;AACA,KAAK;AACL,uBAAuB,KAAI,gCAAgC,CAAC;AAC5D;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;;AAGA;AACA;AACA;;AAEA,kBAAkB,wBAAwB;AAC1C;;AAEA,QAAQ,KAAK,EAAE,EAAE;;AAEjB;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;;AAEA;;AAEA,MAAM,KAAK,EAAE,EAAE;;AAEf;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,KAAK,EAAE,uBAAuB;;AAEtC;AACA;;AAEA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,KAAI,gCAAgC,CAAC;AAC9D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,KAAI,gCAAgC,CAAC;AAC1D;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA,uEAAuE,aAAa;AACpF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,UAAU;AACvB;;AAEA;AACA,6EAA6E,aAAa;AAC1F;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,KAAI,gCAAgC,CAAC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,6CAA6C,YAAY;AACzD;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,IAAI,KAAK,EAAE,EAAE;;;;;AAKb,OAAO;;AAEP,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,mBAAmB,iCAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,iCAAmB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iCAAmB;AAC9B;AACA,gBAAgB,iCAAmB,wBAAwB,iCAAmB;AAC9E,oDAAoD,wCAAwC;AAC5F;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW,iCAAmB,2BAA2B;AACzD,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW,iCAAmB;AAC9B;AACA,kEAAkE,iBAAiB;AACnF;AACA,2DAA2D,aA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AqC;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB;AACpB;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;;;;;;;ACnFa;AACb,kBAAkB,mBAAO,CAAC,KAA0B;AACpD,8BAA8B,mBAAO,CAAC,IAAsC;AAC5E,2BAA2B,mBAAO,CAAC,IAAqC;AACxE,eAAe,mBAAO,CAAC,KAAwB;AAC/C,sBAAsB,mBAAO,CAAC,KAAgC;AAC9D,iBAAiB,mBAAO,CAAC,KAA0B;;AAEnD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBa;AACb,kBAAkB,mBAAO,CAAC,KAA0B;AACpD,qBAAqB,mBAAO,CAAC,KAA6B;AAC1D,8BAA8B,mBAAO,CAAC,IAAsC;AAC5E,eAAe,mBAAO,CAAC,KAAwB;AAC/C,oBAAoB,mBAAO,CAAC,KAA8B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB;AACpB;AACA;AACA;AACA;;;;;;;;;AC3Ca;AACb,kBAAkB,mBAAO,CAAC,KAA0B;AACpD,WAAW,mBAAO,CAAC,KAA4B;AAC/C,iCAAiC,mBAAO,CAAC,KAA4C;AACrF,+BAA+B,mBAAO,CAAC,KAAyC;AAChF,sBAAsB,mB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pD,YAAY,mBAAO,CAAC,KAAoB;AACxC,WAAW,mBAAO,CAAC,KAAmB;AACtC,iBAAiB,mBAAO,CAAC,KAA0B;AACnD,oBAAoB,mBAAO,CAAC,KAAsC;AAClE,8BAA8B,mBAAO,CAAC,KAAwC;AAC9E,aAAa,mBAAO,CAAC,IAA4B;AACjD,cAAc,mBAAO,CAAC,KAA6B;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;ACpHa;AACb,0BAA0B,mBAAO,CAAC,KAAqC;;AAEvE;AACA;;AAEA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;;;;;;;;;ACZa;AACb;AACA,oBAAoB,mBAAO,CAAC,KAA6B;AACzD,6BAA6B,mBAAO,CAAC,KAAuC;;AAE5E;AACA;AACA;;;;;;;;;ACPa;AACb,YAAY,mBAAO,CAAC,KAAyB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTa;AACb,0BAA0B,mBAAO,CAAC,KAAqC;;AAEvE;;AAEA;AACA;AACA;AACA,kFAAkF;AAClF;;;;;;;;;ACTa;AACb,6BAA6B,mBAAO,CAAC,KAAuC;;AAE5E;;AAEA;AACA;AACA;AACA;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C;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR,MAAM;AACN,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ,qBAAqB,aAAa;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO,IAAI,cAAc;AACzB;;AAEA;AACA;AACA;AACA,MAAM,gBAAgB;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,iFAAiF;AACrF;AACA,CAAC;;AAED;AACA;;;;;;;;;AC/Ra;AACb,QAAQ,mBAAO,C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,CAAC,KAAqB;AAC1C,mBAAmB,mBAAO,CAAC,KAA4B;AACvD,4BAA4B,mBAAO,CAAC,KAAuC;AAC3E,2BAA2B,mBAAO,CAAC,KAA8B;AACjE,kCAAkC,mBAAO,CAAC,KAA6C;AACvF,sBAAsB,mBAAO,CAAC,IAAgC;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACtCa;AACb,aAAa,mBAAO,CAAC,IAAwB;;AAE7C;;;;;;;;;ACHa;AACb,aAAa,mBAAO,CAAC,IAAwB;;AAE7C;;;;;;;;;ACHa;AACb,aAAa,mBAAO,CAAC,KAAkB;AACvC,mBAAO,CAAC,KAA4C;;AAEpD;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACrEA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,iBAAiB,qBAAuB;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;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mE,gBAAgB,IAAI,qBAAqB,kIAAkI,qBAAqB,SAAS,2DAA2D,gBAAgB,+BAA+B,WAAW,KAAK,SAAS,wGAAwG;;;;;;;;;;;;;;;;;;;;;ACDz1F;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kEAAkE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,CAAC,0CAA0C;AACpC;AACP;AACA;AACO;AACP;AACA;AACA;AACA,CAAC,kDAAkD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC+B;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACmC;AAC7B;AACP;AACA;AACA;AACA;AACA,CAAC,sDAAsD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACkC;AACnC;AACA;AACA;AACA;AACA;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;AACsB;AAChB;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpKA;AACA;AACA;AACA;AACA;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;AAC6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACoC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC6B;AAC9B;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,sCAAsC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC+B;AAChC;;;;AClCqD;AACoB;AACzE;AACA;AACA;AACA,aAAa,2BAA2B,UAAU,0BAAmB;AACrE,aAAa,2BAA2B,QAAQ,0BAAmB;AACnE,aAAa,2BAA2B,UAAU,0BAAmB;AACrE,aAAa,2BAA2B,UAAU,0BAAmB;AACrE,aAAa,2BAA2B,UAAU,0BAAmB;AACrE;AACA,gBAAgB,2BAA2B;AAC3C,gBAAgB,0BAAmB;AACnC;AACA;AACA,gBAAgB,2BAA2B;AAC3C,gBAAgB,0BAAmB;AACnC;AACA;AACA,gBAAgB,2BAA2B;AAC3C,gBAAgB,0BAAmB;AACnC;AACA,aAAa,2BAA2B,MAAM,0BAAmB;AACjE,aAAa,2BAA2B,SAAS,0BAAmB;AACpE,aAAa,2BAA2B,QAAQ,0BAAmB;AACnE,aAAa,2BAA2B,UAAU,0BAAmB;AACrE,aAAa,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;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACyE;AACzE;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC,aAAa,2BAA2B;AACxC;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,sBAAsB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA,6BAA6B;AAC7B;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,gDAAgD,wBAAwB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,CAAC;AACkC;AACnC;;AChJA,IAAI,oBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,IAAI,sBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACuE;AACF;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,sCAAsC,uBAAuB;AAC7D,wCAAwC,uBAAuB;AAC/D;AACA;AACA,sCAAsC,uBAAuB;AAC7D;AACA;AACA;AACA,eAAe,oBAAS;AACxB;AACA,mBAAmB,sBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,oBAAS;AACxB;AACA,mBAAmB,sBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC0B;AAC3B;;ACzIA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,IAAI,iBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,IAAI,mBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAS;AACxB,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,mBAAmB,mBAAW;AAC9B;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACqB;AACtB;;ACtTA,IAAI,iBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,IAAI,mBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0B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ACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,mBAAmB,mBAAW;AAC9B;AACA;AACA;AACA;AACA,gEAAgE,sBAAsB;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,2BAA2B;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,uBAAuB;AACjF;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8DAA8D,2BAA2B;AACzF;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AAC0B;AAC3B;;AC3HO;AACP;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,4CAA4C;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC8B;AAC/B;;AC5GA,IAAI,oBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACiM;AACnJ;AACA;AACE;AACE;AACE;AAC0B;AAC/E;AACA,IAAI,oBAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oBAAoB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,0BAA0B,eAAe;AACzC;AACA;AACA,iCAAiC,mBAAmB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,2BAA2B,kBAAkB;AAC7C,iBAAiB;AACjB,aAAa;AACb;AACA,uBAAuB,kBAAkB;AACzC,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gDAAgD,uBAAuB;AACvE;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,uBAAuB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,uBAAuB;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iDAAiD,uCAAuC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,wBAAwB;AACxD,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,gBAAgB;AACtF;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC,cAAc,mDAAmD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kBAAkB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA,SAAS;AACT;AACA,+BAA+B,kBAAkB;AACjD,8CAA8C,uBAAuB;AACrE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,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,iCAAiC;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,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACsB;AACvB;;ACv0BA,yCAAyC;AAClC;AACA;AACA;AACA,4CAA4C;AACnD;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC+B;AAChC;;ACnD6E;AAC9B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,kDAAkD;AAClD,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD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AAoB;AACpD;AACA;AACA;AACA;AACA,oEAAoE,kCAAkC;AACtG;AACA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC2B;AAC5B;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC+B;AAChC;;AChCA,IAAI,oBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,IAAI,sBAAW,IAAI,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AAC0D;AACiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAS;AACxB;AACA,mBAAmB,sBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,oBAAoB,yBAAyB,2BAA2B;AACtF;AACA;AACA;AACA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA,kEAAkE,OAAO,oBAAS;AAClF,mBAAmB,sBAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,+DAA+D,2BAA2B;AAC1F,4DAA4D,2BAA2B;AACvF;AACA;AACA,+DAA+D,2BAA2B;AAC1F,4DAA4D,2BAA2B;AACvF;AACA;AACA;AACA,aAAa;AACb,SAAS,IAAI;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,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACsB;AACvB;;ACvK0D;AACiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB,yBAAyB,2BAA2B;AACtF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,cAAc,oBAAoB;AAClC;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB;AACnD;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB;AACnD;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;AACA;AACA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yBAAyB;AAC/C;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB;AACnD;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC0B;AAC3B;;ACtK2E;AACjB;AAC1D;AACA;AACA,6BAA6B,oBAAoB;AACjD,qCAAqC,2BAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;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,4CAA4C,gBAAgB;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,CAAC;AAC4B;AAC7B;;ACrF2E;AACjB;AAC1D;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB,wBAAwB,2BAA2B;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,yBAAyB;AAClD;AACA;AACA;AACA,gEAAgE,+BAA+B;AAC/F,iEAAiE,+BAA+B;AAChG;AACA;AACA;AACA;AACA,yBAAyB,yBAAyB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;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;AACuB;AACxB;;ACrEmI;AACrF;AACS;AACc;AACpB;AACL;AACa;AACU;AACX;AACS;AACqB;AACjB;AACV;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4DAA4D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA,0BAA0B,WAAW;AACrC,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;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,6BAA6B,oBAAoB;AACjD;AACA,oDAAoD,oBAAoB;AACxE;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC,oCAAoC,oBAAoB;AACxD,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;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,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,yBAAyB;AAChE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,mCAAmC,yBAAyB;AAC5D;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,iDAAiD,uBAAuB;AACxE,aAAa;AACb;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,YAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,0BAA0B,IAAI;AAC9B;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA,sCAAsC,oBAAoB,yBAAyB,2BAA2B;AAC9G;AACA,cAAc,yBAAyB;AACvC;AACA,qCAAqC,oBAAoB,yBAAyB,2BAA2B;AAC7G;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW,oEAAoE,oCAAoC;AACjJ;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,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,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;AACpE,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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,mCAAmC,iBAAiB;AACpD,mCAAmC,yBAAyB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,eAAe;AAChD,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC6B;AAC9B;;ACjpB6C;AACe;AACP;AACK;AACb;AAC7C;;;;;;;ACLA;AACA,IAAI,KAA4D;AAChE,IAAI,CACsG;AAC1G,CAAC,6BAA6B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;;AAE1B;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4BAA4B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4BAA4B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C,YAAY,cAAc,mBAAmB,yBAAyB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD,sDAAsD,qBAAqB;AAC3E,oBAAoB;AACpB;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA,wBAAwB,iBAAiB,KAAK,eAAe;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,6CAA6C,cAAc;AAC3D;AACA;AACA,mCAAmC,cAAc;AACjD,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,YAAY;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA,gCAAgC,OAAO;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,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,UAAU;AACxD;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,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,aAAa;AACxF;AACA,+DAA+D;AAC/D;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA,6EAA6E;AAC7E;AACA;AACA,sBAAsB,YAAY,IAAI,oBAAoB;AAC1D;AACA,qFAAqF;AACrF;AACA,qDAAqD;AACrD,2CAA2C,KAAK,mBAAmB;AACnE;AACA,yEAAyE;AACzE;AACA;AACA;AACA,+EAA+E;AAC/E;AACA,gFAAgF,iBAAiB;AACjG;AACA,mFAAmF;AACnF;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA,yGAAyG;AACzG;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA,yEAAyE;AACzE;AACA;AACA;AACA,sDAAsD,KAAK,mBAAmB;AAC9E;AACA,qGAAqG;AACrG;AACA,yEAAyE;AACzE,gCAAgC,0BAA0B;AAC1D;AACA,yGAAyG;AACzG;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,YAAY,mBAAmB;AAC/B,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wCAAwC;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;AAC/B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;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,oEAAoE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,MAAM;AACxC;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,YAAY;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,6BAA6B;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,aAAa,iBAAiB,GAAG,YAAY,GAAG,gBAAgB;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;AACA;AACA,4BAA4B,6DAA6D;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,iEAAiE;AACjE;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA,gEAAgE;AAChE;AACA,uDAAuD;AACvD,8DAA8D;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY;AAC9D;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,YAAY;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY;AAC9D,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW;AACvC;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gDAAgD;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,gCAAgC;AACjG,gCAAgC,gCAAgC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,iCAAiC;AAC1G,yCAAyC,iCAAiC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,iCAAiC;AACzF,iDAAiD,iCAAiC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE,sEAAsE;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4BAA4B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4BAA4B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uBAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,YAAY;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,qBAAM,mDAAmD,qBAAM;AACnG,gCAAgC,+DAA+D,iBAAiB;AAChH;AACA,wCAAwC,MAAM,+BAA+B,YAAY;AACzF,uCAAuC,MAAM,mCAAmC,YAAY;AAC5F,oCAAoC;AACpC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,wBAAwB;AAC1F;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,yCAAyC,YAAY;AACrD;AACA,sCAAsC;AACtC;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,mBAAmB,yBAAyB;AAC5C,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,mBAAmB,8BAA8B;AACjD,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,mBAAmB,8BAA8B;AACjD,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,yCAAyC,YAAY;AACrD;AACA,sCAAsC;AACtC;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,mBAAmB,yBAAyB;AAC5C,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,mBAAmB,yBAAyB;AAC5C,qBAAqB,iBAAiB;AACtC;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,eAAe;AAC/E;AACA;AACA,gEAAgE,eAAe,eAAe,MAAM;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,mBAAmB,QAAQ;AAC3B,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,mBAAmB,QAAQ;AAC3B,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,mBAAmB,QAAQ;AAC3B,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,uBAAuB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA,qCAAqC,sBAAsB,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW,SAAS,0BAA0B;AAClE,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sCAAsC;AAC3C;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,aAAa;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,eAAe;AAC9E;AACA;AACA;AACA;AACA;AACA,iEAAiE,cAAc;AAC/E;AACA;AACA;AACA,8BAA8B,sBAAsB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,cAAc;AACjF;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;AACA;AACA;AACA,wEAAwE,cAAc;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gDAAgD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,4BAA4B;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,0DAA0D,YAAY;AACtE;AACA;AACA;AACA;AACA;AACA,qCAAqC,sBAAsB,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,cAAc;AAC5E;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;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA,gCAAgC,aAAa;AAC7C;AACA;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,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,aAAa;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,UAAU;AACtC;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,6DAA6D;AAC7D,yDAAyD;AACzD,wDAAwD;AACxD,iEAAiE;AACjE,qEAAqE;AACrE;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,KAAK;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;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,4BAA4B,sCAAsC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sBAAsB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA,2CAA2C,YAAY;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mCAAmC,KAAK;AACrF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,wBAAwB;AACpE;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,mBAAmB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,2BAA2B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;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,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;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;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kCAAkC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;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,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,aAAa;AACnD,yCAAyC;AACzC,uCAAuC;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,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;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,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,yCAAyC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA,4BAA4B,wCAAwC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,uGAAuG;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS;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,oCAAoC,WAAW;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,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qCAAqC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,kDAAkD;AAClD,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA,2CAA2C,0BAA0B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;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,2DAA2D;AAC3D;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;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,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;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,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,aAAa;AAC9C,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA,2DAA2D,wBAAwB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,uBAAuB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+CAA+C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+CAA+C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,mBAAmB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;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,4BAA4B,gBAAgB;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,2DAA2D,YAAY,wBAAwB;AAC/F;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA,cAAc;AACd,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA,yCAAyC;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,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,yBAAyB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,mBAAmB,0BAA0B;AAC7C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iBAAiB;AAChE;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mCAAmC;AAC3E;AACA,+CAA+C,yCAAyC;AACxF;AACA,oCAAoC,wBAAwB;AAC5D;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,wBAAwB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAmC;AAC/D,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,qBAAqB;AACnH;AACA;AACA;AACA;AACA;AACA,mGAAmG,qBAAqB;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,oBAAoB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,2CAA2C;AAC3C;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,gCAAgC,OAAO;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,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,gCAAgC,OAAO;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,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,8CAA8C;AAC9C;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW;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,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,UAAU;AAChF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,gBAAgB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,WAAW;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;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,KAAK,gEAAgE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0CAA0C;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA,gCAAgC,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wCAAwC;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,4BAA4B,eAAe;AAC3C,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G,gCAAgC;AAC9I;AACA;AACA;AACA,8GAA8G,0BAA0B;AACxI;AACA;AACA;AACA,8GAA8G,qBAAqB;AACnI;AACA;AACA;AACA,8GAA8G,2BAA2B;AACzI;AACA;AACA;AACA,8GAA8G,gEAAgE;AAC9K;AACA;AACA;AACA;AACA,8GAA8G,2BAA2B;AACzI;AACA;AACA;AACA;AACA,8GAA8G,2BAA2B;AACzI;AACA;AACA;AACA;AACA,8GAA8G,gDAAgD;AAC9J;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB,2BAA2B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gCAAgC;AAC7E,YAAY,qBAAqB,0BAA0B,wBAAwB;AACnF,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,WAAW;AACrE,oEAAoE,YAAY;AAChF;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,wBAAwB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAmC;AAC/D,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA,wDAAwD,SAAS;AACjE,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,KAAK,gCAAgC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,cAAc;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G;AAC3G;AACA;AACA,gIAAgI;AAChI;AACA,sFAAsF;AACtF;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,iCAAiC;AACjC,kCAAkC;AAClC,4BAA4B;AAC5B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW;AACvC;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,YAAY;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,0BAA0B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,+BAA+B;AAC/B,sDAAsD;AACtD,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,iBAAiB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qBAAqB;AACvE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,iCAAiC;AACjC,mCAAmC;AACnC,kCAAkC;AAClC,4BAA4B;AAC5B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,wDAAwD;AACxD,sDAAsD;AACtD,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,8CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,gBAAgB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD,2DAA2D,sBAAsB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gCAAgC,0DAA0D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,+BAA+B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;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;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS;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,8BAA8B;AAC9B,8BAA8B;AAC9B,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,cAAc;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,oCAAoC;AACpC;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,WAAW;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;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,6CAA6C,+BAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA,wCAAwC,aAAa;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;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,qCAAqC;AACrC;AACA;AACA;AACA;AACA,uEAAuE;AACvE,wDAAwD,aAAa;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,2BAA2B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,2CAA2C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,yBAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,iEAAiE;AACjE;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+CAA+C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wBAAwB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iDAAiD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wBAAwB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gCAAgC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,6CAA6C;AAC7F;AACA,mDAAmD,iCAAiC;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,oCAAoC;AACnF;AACA;AACA;AACA,wDAAwD,0CAA0C;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iCAAiC;AAChF;AACA;AACA;AACA;AACA;AACA,8EAA8E,qEAAqE;AACnJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iCAAiC;AAChF;AACA;AACA;AACA;AACA;AACA,oDAAoD,+FAA+F;AACnJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,yDAAyD;AACxG;AACA,oDAAoD,6CAA6C;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sCAAsC;AAC1E;AACA;AACA,wCAAwC,iCAAiC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,2BAA2B;AAC/D,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,+CAA+C;AACnF;AACA;AACA,wCAAwC,iCAAiC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA,YAAY,mEAAmE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2CAA2C;AACrE;AACA;AACA;AACA;AACA,0EAA0E;AAC1E,4CAA4C;AAC5C;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,UAAU,KAAK,cAAc;AACvE;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wBAAwB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAM;AACzB,mBAAmB,qBAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA,4DAA4D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,2DAA2D;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;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,6CAA6C,+BAA+B;AAC5E;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,wCAAwC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,mCAAmC;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gDAAgD;AACtF;AACA;AACA;AACA,0DAA0D,UAAU;AACpE;AACA;AACA;AACA;AACA;AACA,yDAAyD,8CAA8C;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA,uFAAuF;AACvF,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4CAA4C;AAClF,6CAA6C,kDAAkD;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iCAAiC;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,wCAAwC,gCAAgC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,8CAA8C;AAC3F,sCAAsC,4BAA4B;AAClE,6CAA6C,oCAAoC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,2BAA2B;AACrE;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4BAA4B;AAClE;AACA,6CAA6C,oCAAoC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gFAAgF;AAC5F,oCAAoC,cAAc;AAClD,qCAAqC,cAAc;AACnD,2CAA2C,cAAc;AACzD;AACA;AACA;AACA;AACA,4EAA4E,aAAa;AACzF;AACA;AACA;AACA,6DAA6D,0DAA0D;AACvH;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,mCAAmC,cAAc,MAAM,cAAc;AACrE;AACA;AACA;AACA,mEAAmE,cAAc;AACjF,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA,YAAY,6DAA6D,IAAI,cAAc;AAC3F;AACA;AACA;AACA;AACA;AACA,YAAY,4DAA4D;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,MAAM,cAAc;AACpD;AACA;AACA;AACA;AACA,kBAAkB,cAAc,MAAM,cAAc;AACpD;AACA;AACA,KAAK,wCAAwC;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,aAAa;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,yBAAyB;AACrD;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;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC,gCAAgC,WAAW;AAC3C,6CAA6C;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;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA,gCAAgC,YAAY;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,4BAA4B,cAAc;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY;AAC9D;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD,kDAAkD,YAAY;AAC9D;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,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,kDAAkD;AAClD,wBAAwB;AACxB;AACA;AACA;AACA,sCAAsC;AACtC,4BAA4B,OAAO;AACnC,gCAAgC,OAAO;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,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA,gCAAgC,OAAO;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,kDAAkD;AAClD;AACA;AACA;AACA;AACA,yDAAyD,cAAc;AACvE;AACA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD;AAClD,iCAAiC;AACjC,kCAAkC;AAClC,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,iBAAiB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA,sCAAsC,wCAAwC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,sBAAsB;AAC7E;AACA,4DAA4D,qBAAqB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,MAAM,GAAG,OAAO;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,sBAAsB;AAC7E;AACA,4DAA4D,qBAAqB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,YAAY;AAC1F;AACA,mEAAmE,aAAa;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA,qCAAqC,eAAe;AACpD;AACA,oDAAoD;AACpD,qDAAqD;AACrD,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,gBAAgB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd;AACA,wBAAwB,uBAAuB;AAC/C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;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;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;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,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,gBAAgB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA,wCAAwC,aAAa;AACrD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kDAAkD;AACjG,mFAAmF,gBAAgB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA,wCAAwC,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA,wCAAwC,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sBAAsB;AACrF;AACA,oEAAoE,qBAAqB;AACzF;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mDAAmD,aAAa;;AAEhE,CAAC;;;;;;;;AC7zuBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4BAA4B;AAC5B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL,4BAA4B;AAC5B;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,oEAAoE;AACpE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2DAA2D,eAAe;AAC1E,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,+BAA+B;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,6BAA6B,aAAa;AAClD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,KAA6B;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;ACxxCD;AACA;AACA;AACA;AACA;;AAEA;;AAEA,IAAI,KAAyB;AAC7B,UAAU,mBAAO,CAAC,KAAW;AAC7B,GAAG,SAAS,IAAyC;AACrD,EAAE,iCAAO,CAAC,0BAAW,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AAChC,GAAG,KAAK,EAIN;AACF,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;;;;;;AClHD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D,yCAAyC,QAAQ;AACjD,yDAAyD,QAAQ;AACjE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kCAAkC;AAC9E,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,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,SAAS;AACT;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA,eAAe;AACf,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,8FAA8F,kCAAkC,8BAA8B;AAC9J,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA,qDAAqD;AACrD,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;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,8BAA8B;AAC9B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,8DAA8D,8DAA8D;AAC5K;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,2DAA2D,cAAc;AACzE;AACA;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,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kCAAkC,qDAAqD;AACvF;AACA;AACA;AACA,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA,kCAAkC;AAClC,yDAAyD;AACzD;AACA;AACA;AACA,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,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,aAAa;AACb;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,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,aAAa;AACb;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;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,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,sCAAsC;AACtC;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,qBAAqB;AACrB;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;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,iCAAiC;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,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,SAAS;AACT;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA,iEAAe,YAAY,EAAC;AAC5B;;;;;;;;;;;;;AC5qFA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,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,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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+LAA+L,0CAA0C,gEAAgE;AACzS;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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,CAAC;;AAED,iEAAe,SAAS,EAAC;AACzB;;;;;;;;;;;;;ACneA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;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,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,qBAAqB;AACrB;AACA;AACA,gCAAgC,8BAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,qEAAqE;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB;AACjB;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,iEAAe,KAAK,EAAC;AACrB;;;;;;;;;;ACthBA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;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AA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;ACAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,iBAAiB,8BAAmB;AACpC,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;;AAER;AACA,2CAA2C;;AAE3C;AACA,+CAA+C;;AAE/C;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA,wCAAwC;AACxC;AACA;AACA;AACA,MAAM;;AAEN;AACA,KAAK;AACL;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC,+BAA+B;;AAEtE;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;;AAEN;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,EAAE;;AAEF,OAAO;AACP;AACA,CAAC;AACD;;;;;;;ACpgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrDA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvBA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCtBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WClBA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UElDA;UACA;UACA;UACA;UACA;UACA;UACA;UACA","sources":["webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/enums.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/math.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/within.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/modifiers/index.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/debounce.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/createPopper.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/popper.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/popper-lite.js","webpack://gotoAndPlay.components/./node_modules/@popperjs/core/lib/index.js","webpack://gotoAndPlay.components/./node_modules/@splidejs/splide/dist/js/splide.esm.js","webpack://gotoAndPlay.components/../node_modules/tslib/tslib.es6.js","webpack://gotoAndPlay.components/../node_modules/fast-deep-equal/index.js","webpack://gotoAndPlay.components/../src/index.ts","webpack://gotoAndPlay.components/./node_modules/choices.js/public/assets/scripts/choices.js","webpack://gotoAndPlay.components/./node_modules/core-js/actual/function/name.js","webpack://gotoAndPlay.components/./node_modules/core-js/actual/object/assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/actual/promise/index.js","webpack://gotoAndPlay.components/./node_modules/core-js/es/function/name.js","webpack://gotoAndPlay.components/./node_modules/core-js/es/object/assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/es/promise/index.js","webpack://gotoAndPlay.components/./node_modules/core-js/features/function/name.js","webpack://gotoAndPlay.components/./node_modules/core-js/features/object/assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/features/promise/index.js","webpack://gotoAndPlay.components/./node_modules/core-js/full/function/name.js","webpack://gotoAndPlay.components/./node_modules/core-js/full/object/assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/full/promise/index.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/a-callable.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/a-constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/a-possible-prototype.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/add-to-unscopables.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/an-instance.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/an-object.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/array-includes.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/array-slice.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/classof-raw.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/classof.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/correct-prototype-getter.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/create-iter-result-object.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/create-property-descriptor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/define-built-in-accessor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/define-built-in.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/define-global-property.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/descriptors.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/document-all.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/document-create-element.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/dom-iterables.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/dom-token-list-prototype.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-is-browser.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-is-deno.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-is-ios-pebble.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-is-ios.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-is-node.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-is-webos-webkit.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-user-agent.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/engine-v8-version.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/enum-bug-keys.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/error-stack-clear.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/error-stack-install.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/error-stack-installable.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/export.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/fails.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-apply.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-bind-context.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-bind-native.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-call.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-name.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-uncurry-this-accessor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-uncurry-this-clause.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/function-uncurry-this.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/get-built-in.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/get-iterator-method.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/get-iterator.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/get-method.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/global.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/has-own-property.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/hidden-keys.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/host-report-errors.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/html.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/ie8-dom-define.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/indexed-object.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/inspect-source.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/install-error-cause.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/internal-state.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-array-iterator-method.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-callable.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-forced.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-null-or-undefined.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-object.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-pure.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/is-symbol.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/iterate.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/iterator-close.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/iterator-create-constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/iterator-define.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/iterators-core.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/iterators.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/length-of-array-like.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/make-built-in.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/math-trunc.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/microtask.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/new-promise-capability.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/normalize-string-argument.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-create.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-define-properties.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-define-property.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-get-prototype-of.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-is-prototype-of.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-keys-internal.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-keys.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-set-prototype-of.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/object-to-string.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/ordinary-to-primitive.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/own-keys.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/path.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/perform.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/promise-constructor-detection.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/promise-native-constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/promise-resolve.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/promise-statics-incorrect-iteration.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/queue.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/require-object-coercible.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/set-species.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/set-to-string-tag.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/shared-key.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/shared-store.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/shared.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/species-constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/string-multibyte.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/symbol-constructor-detection.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/task.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-absolute-index.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-indexed-object.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-integer-or-infinity.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-length.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-object.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-primitive.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-property-key.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-string-tag-support.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/to-string.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/try-to-string.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/uid.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/use-symbol-as-uid.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/v8-prototype-define-bug.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/validate-arguments-length.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/weak-map-basic-detection.js","webpack://gotoAndPlay.components/./node_modules/core-js/internals/well-known-symbol.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.aggregate-error.constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.aggregate-error.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.array.iterator.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.function.name.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.object.assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.object.to-string.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.all-settled.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.all.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.any.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.catch.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.constructor.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.finally.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.race.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.reject.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.promise.resolve.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/es.string.iterator.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/esnext.aggregate-error.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/esnext.promise.all-settled.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/esnext.promise.any.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/esnext.promise.try.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/esnext.promise.with-resolvers.js","webpack://gotoAndPlay.components/./node_modules/core-js/modules/web.dom-collections.iterator.js","webpack://gotoAndPlay.components/./node_modules/core-js/stable/function/name.js","webpack://gotoAndPlay.components/./node_modules/core-js/stable/object/assign.js","webpack://gotoAndPlay.components/./node_modules/core-js/stable/promise/index.js","webpack://gotoAndPlay.components/./node_modules/debounce/index.js","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/arrow-down.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/arrow-left.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/arrow-right.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/arrow-up.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/attention.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/auditorium.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/blender.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/bubble.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/calendar.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/card.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/cart.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/caution.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/check-outline.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/check.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-bottom-16x16.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-bottom.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-left-large.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-left.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-right-large.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-right.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-top-16x16.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chevron-top.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/chicken.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/cinema-16x16.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/clear.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/clock.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/close.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/club-inverted.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/club-outline.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/club.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/copy-large.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/copy.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/delete.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/discount.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/edit.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/ellipsis.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/email.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/exit.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/facebook.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/filter-alternate.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/filter.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/format.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/genres.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/globe.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/hide.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/home.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/icecream.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/id.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/image.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/instagram.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/language.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/login.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/menu.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/movies.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/open-new-tab.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/open.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/phone.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/pin-alternate.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/pin.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/play-alt.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/play.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/plus.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/profile.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/proxy.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/qr.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/remove.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/restrict.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/scan.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/schedule.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/search.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/seat-couch.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/seat-kott.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/seat-maxi.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/seat-star.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/seat-twin.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/seat.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/settings.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/share.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/show.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/sound.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/star-empty.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/star-full.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/star.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/store-16x16.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/store.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/subtitle.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/tickets-inverted.svg","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/tickets.svg","webpack://gotoAndPlay.components/./node_modules/gumshoejs/dist/gumshoe.min.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/core.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/strings.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/utils.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/zxing-html5-qrcode-decoder.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/native-bar-code-detector.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/code-decoder.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/camera/core-impl.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/camera/factories.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/camera/retriever.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/state-manager.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/html5-qrcode.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/image-assets.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/storage.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/camera/permissions.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui/scanner/scan-type-selector.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui/scanner/base.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui/scanner/torch-button.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui/scanner/file-selection-ui.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui/scanner/camera-selection-ui.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/ui/scanner/camera-zoom-ui.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/html5-qrcode-scanner.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/esm/index.js","webpack://gotoAndPlay.components/./node_modules/html5-qrcode/third_party/zxing-js.umd.js","webpack://gotoAndPlay.components/./node_modules/iframe-resizer/js/iframeResizer.contentWindow.js","webpack://gotoAndPlay.components/./node_modules/lazysizes/plugins/native-loading/ls.native-loading.js","webpack://gotoAndPlay.components/./node_modules/lightgallery/lightgallery.es5.js","webpack://gotoAndPlay.components/./node_modules/lightgallery/plugins/thumbnail/lg-thumbnail.es5.js","webpack://gotoAndPlay.components/./node_modules/lightgallery/plugins/video/lg-video.es5.js","webpack://gotoAndPlay.components/./node_modules/@splidejs/splide/dist/css/splide.min.css","webpack://gotoAndPlay.components/./node_modules/lightgallery/scss/lightgallery-core.scss","webpack://gotoAndPlay.components/./src/patterns/components/alert/alert.scss","webpack://gotoAndPlay.components/./src/patterns/components/breadcrumbs/breadcrumbs.scss","webpack://gotoAndPlay.components/./src/patterns/components/button/button/button.scss","webpack://gotoAndPlay.components/./src/patterns/components/campaign-card/campaign-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/card/card.scss","webpack://gotoAndPlay.components/./src/patterns/components/cart-summary/cart-summary.scss","webpack://gotoAndPlay.components/./src/patterns/components/checkout-card/checkout-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/checkout-gift-card/checkout-gift-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/coupon/coupon.scss","webpack://gotoAndPlay.components/./src/patterns/components/discount/discount.scss","webpack://gotoAndPlay.components/./src/patterns/components/dropdown/dropdown.scss","webpack://gotoAndPlay.components/./src/patterns/components/editor/editor.scss","webpack://gotoAndPlay.components/./src/patterns/components/filter-radio/filter-radio.scss","webpack://gotoAndPlay.components/./src/patterns/components/footer/footer.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/check/check.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/choice-group/choice-group.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/day-picker/day-picker.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/filefield/filefield.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/number/number.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/radio-card/radio-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/radio/radio.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/select/select.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/textarea/textarea.scss","webpack://gotoAndPlay.components/./src/patterns/components/forms/textfield/textfield.scss","webpack://gotoAndPlay.components/./src/patterns/components/gallery/gallery.scss","webpack://gotoAndPlay.components/./src/patterns/components/genre-card/genre-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/gift/gift.scss","webpack://gotoAndPlay.components/./src/patterns/components/graph/graph.scss","webpack://gotoAndPlay.components/./src/patterns/components/grid/grid.scss","webpack://gotoAndPlay.components/./src/patterns/components/header/header.scss","webpack://gotoAndPlay.components/./src/patterns/components/helpers/helpers.scss","webpack://gotoAndPlay.components/./src/patterns/components/icon/icon.scss","webpack://gotoAndPlay.components/./src/patterns/components/image/image.scss","webpack://gotoAndPlay.components/./src/patterns/components/invoice/invoice.scss","webpack://gotoAndPlay.components/./src/patterns/components/languages/languages.scss","webpack://gotoAndPlay.components/./src/patterns/components/lightbox/lightbox.scss","webpack://gotoAndPlay.components/./src/patterns/components/logo/logo.scss","webpack://gotoAndPlay.components/./src/patterns/components/main/main.scss","webpack://gotoAndPlay.components/./src/patterns/components/map/map.scss","webpack://gotoAndPlay.components/./src/patterns/components/modal/modal.scss","webpack://gotoAndPlay.components/./src/patterns/components/movie-card/movie-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation-alternative-header/navigation-alternative-header.scss","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation-alternative/navigation-alternative.scss","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation-header/navigation-header.scss","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation/navigation.scss","webpack://gotoAndPlay.components/./src/patterns/components/news-card/news-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/notifications/notification-list/notification-list.scss","webpack://gotoAndPlay.components/./src/patterns/components/notifications/notification/notification.scss","webpack://gotoAndPlay.components/./src/patterns/components/pagination/pagination.scss","webpack://gotoAndPlay.components/./src/patterns/components/pass/pass.scss","webpack://gotoAndPlay.components/./src/patterns/components/payment/payment.scss","webpack://gotoAndPlay.components/./src/patterns/components/product-card/product-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/profile-menu/profile-menu.scss","webpack://gotoAndPlay.components/./src/patterns/components/progress/progress.scss","webpack://gotoAndPlay.components/./src/patterns/components/qr-scanner/qr-scanner.scss","webpack://gotoAndPlay.components/./src/patterns/components/rating/rating.scss","webpack://gotoAndPlay.components/./src/patterns/components/reset/reset.scss","webpack://gotoAndPlay.components/./src/patterns/components/scananother/scananother.scss","webpack://gotoAndPlay.components/./src/patterns/components/schedule-card/schedule-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/schedule-filter/schedule-filter.scss","webpack://gotoAndPlay.components/./src/patterns/components/screening-card/screening-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/section/section.scss","webpack://gotoAndPlay.components/./src/patterns/components/sidenav/sidenav.scss","webpack://gotoAndPlay.components/./src/patterns/components/spinner/spinner.scss","webpack://gotoAndPlay.components/./src/patterns/components/steps/steps.scss","webpack://gotoAndPlay.components/./src/patterns/components/sticky-button/sticky-button.scss","webpack://gotoAndPlay.components/./src/patterns/components/summary-card/summary-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/table-list/table-list.scss","webpack://gotoAndPlay.components/./src/patterns/components/table-status-list/table-status-list.scss","webpack://gotoAndPlay.components/./src/patterns/components/tag/tag.scss","webpack://gotoAndPlay.components/./src/patterns/components/ticket-card/ticket-card.scss","webpack://gotoAndPlay.components/./src/patterns/components/ticket-delivery/ticket-delivery.scss","webpack://gotoAndPlay.components/./src/patterns/components/ticket-list/ticket-list.scss","webpack://gotoAndPlay.components/./src/patterns/components/ticket/ticket.scss","webpack://gotoAndPlay.components/./src/patterns/components/timer/timer.scss","webpack://gotoAndPlay.components/./src/patterns/components/title/title.scss","webpack://gotoAndPlay.components/./src/patterns/components/typography/typography.scss","webpack://gotoAndPlay.components/./src/patterns/components/user/user.scss","webpack://gotoAndPlay.components/./src/patterns/components/video/video.scss","webpack://gotoAndPlay.components/./src/patterns/modules/calculator/calculator.scss","webpack://gotoAndPlay.components/./src/patterns/modules/card-carousel/card-carousel.scss","webpack://gotoAndPlay.components/./src/patterns/modules/carousel/carousel.scss","webpack://gotoAndPlay.components/./src/patterns/modules/checkout-gift-cards-success/checkout-gift-cards-success.scss","webpack://gotoAndPlay.components/./src/patterns/modules/checkout-success/checkout-success.scss","webpack://gotoAndPlay.components/./src/patterns/modules/chess/chess.scss","webpack://gotoAndPlay.components/./src/patterns/modules/contact/contact.scss","webpack://gotoAndPlay.components/./src/patterns/modules/content-1-2/content-1-2.scss","webpack://gotoAndPlay.components/./src/patterns/modules/content/content.scss","webpack://gotoAndPlay.components/./src/patterns/modules/cta/cta.scss","webpack://gotoAndPlay.components/./src/patterns/modules/faq/faq.scss","webpack://gotoAndPlay.components/./src/patterns/modules/form/form.scss","webpack://gotoAndPlay.components/./src/patterns/modules/hero/hero.scss","webpack://gotoAndPlay.components/./src/patterns/modules/icon-list/icon-list.scss","webpack://gotoAndPlay.components/./src/patterns/modules/media-chess/media-chess.scss","webpack://gotoAndPlay.components/./src/patterns/modules/movie-details/movie-details.scss","webpack://gotoAndPlay.components/./src/patterns/modules/news-list/news-list.scss","webpack://gotoAndPlay.components/./src/patterns/modules/pass-grid/pass-grid.scss","webpack://gotoAndPlay.components/./src/patterns/modules/pass-product/pass-product.scss","webpack://gotoAndPlay.components/./src/patterns/modules/perks/perks.scss","webpack://gotoAndPlay.components/./src/patterns/modules/price-slider/price-slider.scss","webpack://gotoAndPlay.components/./src/patterns/modules/product-card-grid/product-card-grid.scss","webpack://gotoAndPlay.components/./src/patterns/modules/profile/profile.scss","webpack://gotoAndPlay.components/./src/patterns/modules/recipient-modal/recipient-modal.scss","webpack://gotoAndPlay.components/./src/patterns/modules/recipient/recipient.scss","webpack://gotoAndPlay.components/./src/patterns/modules/register/register.scss","webpack://gotoAndPlay.components/./src/patterns/modules/schedule/schedule.scss","webpack://gotoAndPlay.components/./src/patterns/modules/specs/specs.scss","webpack://gotoAndPlay.components/./src/patterns/modules/step/step.scss","webpack://gotoAndPlay.components/./src/patterns/modules/table-slider/table-slider.scss","webpack://gotoAndPlay.components/./src/patterns/modules/theater-filter/theater-filter.scss","webpack://gotoAndPlay.components/./src/patterns/modules/video-hero/video-hero.scss","webpack://gotoAndPlay.components/./src/patterns/styles.fractal.scss","webpack://gotoAndPlay.components/./src/patterns/utilities/vertical-spacing/vertical-spacing.scss","webpack://gotoAndPlay.components/./src/patterns/views/checkout-gift-cards/checkout-gift-cards.scss","webpack://gotoAndPlay.components/./node_modules/smoothscroll-polyfill/dist/smoothscroll.js","webpack://gotoAndPlay.components/./src/patterns/components/alert/alert--example.ts","webpack://gotoAndPlay.components/./src/patterns/components/alert/alert.ts","webpack://gotoAndPlay.components/./src/patterns/components/breadcrumbs/breadcrumbs.ts","webpack://gotoAndPlay.components/./src/patterns/components/button/button/button.ts","webpack://gotoAndPlay.components/./src/patterns/components/button/index.ts","webpack://gotoAndPlay.components/./src/patterns/components/campaign-card/campaign-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/card/card.ts","webpack://gotoAndPlay.components/./src/patterns/components/cart-summary/cart-summary.ts","webpack://gotoAndPlay.components/./src/patterns/components/checkout-card/checkout-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/checkout-gift-card/checkout-gift-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/component/component.ts","webpack://gotoAndPlay.components/./src/patterns/components/coupon/coupon.ts","webpack://gotoAndPlay.components/./src/patterns/components/discount/discount.ts","webpack://gotoAndPlay.components/./src/patterns/components/dropdown/dropdown.ts","webpack://gotoAndPlay.components/./src/patterns/components/editor/editor.ts","webpack://gotoAndPlay.components/./src/patterns/components/filter-radio/filter-radio.ts","webpack://gotoAndPlay.components/./src/patterns/components/footer/footer.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/check/check.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/choice-group/choice-group.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/day-picker/day-picker.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/filefield/filefield.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/number/number.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/radio-card/radio-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/radio/radio.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/select/select--disabled-example.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/select/select.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/textarea/textarea.ts","webpack://gotoAndPlay.components/./src/patterns/components/forms/textfield/textfield.ts","webpack://gotoAndPlay.components/./src/patterns/components/gallery/gallery.ts","webpack://gotoAndPlay.components/./src/patterns/components/genre-card/genre-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/gift/gift.ts","webpack://gotoAndPlay.components/./src/patterns/components/graph/graph.ts","webpack://gotoAndPlay.components/./src/patterns/components/grid/grid.ts","webpack://gotoAndPlay.components/./src/patterns/components/header/header.ts","webpack://gotoAndPlay.components/./src/patterns/components/helpers/helpers.ts","webpack://gotoAndPlay.components/./src/patterns/components/icon/icon.ts","webpack://gotoAndPlay.components/./src/patterns/components/image/image.ts","webpack://gotoAndPlay.components/./src/patterns/components/invoice/invoice.ts","webpack://gotoAndPlay.components/./src/patterns/components/languages/languages.ts","webpack://gotoAndPlay.components/./src/patterns/components/lightbox/lightbox.ts","webpack://gotoAndPlay.components/./src/patterns/components/logo/logo.ts","webpack://gotoAndPlay.components/./src/patterns/components/main/main.ts","webpack://gotoAndPlay.components/./src/patterns/components/map/map.ts","webpack://gotoAndPlay.components/./src/patterns/components/modal/modal.ts","webpack://gotoAndPlay.components/./src/patterns/components/movie-card/movie-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation-alternative-header/navigation-alternative-header.ts","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation-alternative/navigation-alternative.ts","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation-header/navigation-header.ts","webpack://gotoAndPlay.components/./src/patterns/components/navigation/navigation/navigation.ts","webpack://gotoAndPlay.components/./src/patterns/components/news-card/news-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/notifications/browser-notification/browser-notification.ts","webpack://gotoAndPlay.components/./src/patterns/components/notifications/cookie-notification/cookie-notification.ts","webpack://gotoAndPlay.components/./src/patterns/components/notifications/notification-list/notification-list.ts","webpack://gotoAndPlay.components/./src/patterns/components/notifications/notification/notification.ts","webpack://gotoAndPlay.components/./src/patterns/components/pagination/pagination.ts","webpack://gotoAndPlay.components/./src/patterns/components/pass/pass.ts","webpack://gotoAndPlay.components/./src/patterns/components/payment/payment.ts","webpack://gotoAndPlay.components/./src/patterns/components/product-card/product-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/profile-menu/profile-menu.ts","webpack://gotoAndPlay.components/./src/patterns/components/progress/progress.ts","webpack://gotoAndPlay.components/./src/patterns/components/qr-scanner/qr-scanner.ts","webpack://gotoAndPlay.components/./src/patterns/components/rating/rating.ts","webpack://gotoAndPlay.components/./src/patterns/components/reset/reset.ts","webpack://gotoAndPlay.components/./src/patterns/components/scananother/scananother.ts","webpack://gotoAndPlay.components/./src/patterns/components/schedule-card/schedule-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/schedule-filter/schedule-filter.ts","webpack://gotoAndPlay.components/./src/patterns/components/screening-card/screening-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/section/section.ts","webpack://gotoAndPlay.components/./src/patterns/components/sidenav/sidenav.ts","webpack://gotoAndPlay.components/./src/patterns/components/spinner/spinner.ts","webpack://gotoAndPlay.components/./src/patterns/components/steps/steps.ts","webpack://gotoAndPlay.components/./src/patterns/components/sticky-button/sticky-button.ts","webpack://gotoAndPlay.components/./src/patterns/components/summary-card/summary-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/table-list/table-list.ts","webpack://gotoAndPlay.components/./src/patterns/components/table-status-list/table-status-list.ts","webpack://gotoAndPlay.components/./src/patterns/components/tag/tag.ts","webpack://gotoAndPlay.components/./src/patterns/components/ticket-card/ticket-card.ts","webpack://gotoAndPlay.components/./src/patterns/components/ticket-delivery/ticket-delivery.ts","webpack://gotoAndPlay.components/./src/patterns/components/ticket-list/ticket-list.ts","webpack://gotoAndPlay.components/./src/patterns/components/ticket/ticket.ts","webpack://gotoAndPlay.components/./src/patterns/components/timer/timer.ts","webpack://gotoAndPlay.components/./src/patterns/components/title/title.ts","webpack://gotoAndPlay.components/./src/patterns/components/typography/typography.ts","webpack://gotoAndPlay.components/./src/patterns/components/user/user.ts","webpack://gotoAndPlay.components/./src/patterns/components/video/video.ts","webpack://gotoAndPlay.components/./src/patterns/index.fractal.ts","webpack://gotoAndPlay.components/./src/patterns/index.ts","webpack://gotoAndPlay.components/./src/patterns/modules/calculator/calculator.ts","webpack://gotoAndPlay.components/./src/patterns/modules/card-carousel/card-carousel.ts","webpack://gotoAndPlay.components/./src/patterns/modules/carousel/carousel.ts","webpack://gotoAndPlay.components/./src/patterns/modules/checkout-gift-cards-success/checkout-gift-cards-success.ts","webpack://gotoAndPlay.components/./src/patterns/modules/checkout-success/checkout-success.ts","webpack://gotoAndPlay.components/./src/patterns/modules/chess/chess.ts","webpack://gotoAndPlay.components/./src/patterns/modules/contact/contact.ts","webpack://gotoAndPlay.components/./src/patterns/modules/content-1-2/content-1-2.ts","webpack://gotoAndPlay.components/./src/patterns/modules/content/content.ts","webpack://gotoAndPlay.components/./src/patterns/modules/cta/cta.ts","webpack://gotoAndPlay.components/./src/patterns/modules/faq/faq.ts","webpack://gotoAndPlay.components/./src/patterns/modules/form/form.ts","webpack://gotoAndPlay.components/./src/patterns/modules/hero/hero.ts","webpack://gotoAndPlay.components/./src/patterns/modules/icon-list/icon-list.ts","webpack://gotoAndPlay.components/./src/patterns/modules/media-chess/media-chess.ts","webpack://gotoAndPlay.components/./src/patterns/modules/movie-details/movie-details.ts","webpack://gotoAndPlay.components/./src/patterns/modules/news-list/news-list.ts","webpack://gotoAndPlay.components/./src/patterns/modules/pass-grid/pass-grid.ts","webpack://gotoAndPlay.components/./src/patterns/modules/pass-product/pass-product.ts","webpack://gotoAndPlay.components/./src/patterns/modules/perks/perks.ts","webpack://gotoAndPlay.components/./src/patterns/modules/price-slider/price-slider.ts","webpack://gotoAndPlay.components/./src/patterns/modules/product-card-grid/product-card-grid.ts","webpack://gotoAndPlay.components/./src/patterns/modules/profile/profile.ts","webpack://gotoAndPlay.components/./src/patterns/modules/recipient-modal/recipient-modal.ts","webpack://gotoAndPlay.components/./src/patterns/modules/recipient/recipient.ts","webpack://gotoAndPlay.components/./src/patterns/modules/register/register.ts","webpack://gotoAndPlay.components/./src/patterns/modules/schedule/schedule.ts","webpack://gotoAndPlay.components/./src/patterns/modules/specs/specs.ts","webpack://gotoAndPlay.components/./src/patterns/modules/step/step.ts","webpack://gotoAndPlay.components/./src/patterns/modules/table-slider/table-slider.ts","webpack://gotoAndPlay.components/./src/patterns/modules/theater-filter/theater-filter.ts","webpack://gotoAndPlay.components/./src/patterns/modules/video-hero/video-hero.ts","webpack://gotoAndPlay.components/./src/patterns/public-path.ts","webpack://gotoAndPlay.components/./src/patterns/utilities/cookie/cookie.ts","webpack://gotoAndPlay.components/./src/patterns/utilities/vertical-spacing/vertical-spacing.ts","webpack://gotoAndPlay.components/./src/patterns/views/checkout-gift-cards/checkout-gift-cards.ts","webpack://gotoAndPlay.components/./node_modules/what-input/dist/what-input.js","webpack://gotoAndPlay.components/./src/patterns/components/icon/import/svg/ sync nonrecursive ^\\.\\/.*\\.svg$","webpack://gotoAndPlay.components/./src/patterns/components/ sync ^\\.\\/.*(","webpack://gotoAndPlay.components/./src/patterns/modules/ sync ^\\.\\/.*(","webpack://gotoAndPlay.components/./src/patterns/utilities/ sync ^\\.\\/.*(","webpack://gotoAndPlay.components/./src/patterns/views/ sync ^\\.\\/.*(","webpack://gotoAndPlay.components/webpack/bootstrap","webpack://gotoAndPlay.components/webpack/runtime/chunk loaded","webpack://gotoAndPlay.components/webpack/runtime/define property getters","webpack://gotoAndPlay.components/webpack/runtime/global","webpack://gotoAndPlay.components/webpack/runtime/hasOwnProperty shorthand","webpack://gotoAndPlay.components/webpack/runtime/make namespace object","webpack://gotoAndPlay.components/webpack/runtime/publicPath","webpack://gotoAndPlay.components/webpack/runtime/jsonp chunk loading","webpack://gotoAndPlay.components/webpack/before-startup","webpack://gotoAndPlay.components/webpack/startup","webpack://gotoAndPlay.components/webpack/after-startup"],"sourcesContent":["export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","/*!\n * Splide.js\n * Version : 3.6.12\n * License : MIT\n * Copyright: 2022 Naotoshi Fujita\n */\nconst PROJECT_CODE = \"splide\";\nconst DATA_ATTRIBUTE = `data-${PROJECT_CODE}`;\n\nconst CREATED = 1;\nconst MOUNTED = 2;\nconst IDLE = 3;\nconst MOVING = 4;\nconst DESTROYED = 5;\nconst STATES = {\n CREATED,\n MOUNTED,\n IDLE,\n MOVING,\n DESTROYED\n};\n\nconst DEFAULT_EVENT_PRIORITY = 10;\nconst DEFAULT_USER_EVENT_PRIORITY = 20;\n\nfunction empty(array) {\n array.length = 0;\n}\n\nfunction isObject(subject) {\n return !isNull(subject) && typeof subject === \"object\";\n}\nfunction isArray(subject) {\n return Array.isArray(subject);\n}\nfunction isFunction(subject) {\n return typeof subject === \"function\";\n}\nfunction isString(subject) {\n return typeof subject === \"string\";\n}\nfunction isUndefined(subject) {\n return typeof subject === \"undefined\";\n}\nfunction isNull(subject) {\n return subject === null;\n}\nfunction isHTMLElement(subject) {\n return subject instanceof HTMLElement;\n}\n\nfunction toArray(value) {\n return isArray(value) ? value : [value];\n}\n\nfunction forEach(values, iteratee) {\n toArray(values).forEach(iteratee);\n}\n\nfunction includes(array, value) {\n return array.indexOf(value) > -1;\n}\n\nfunction push(array, items) {\n array.push(...toArray(items));\n return array;\n}\n\nconst arrayProto = Array.prototype;\n\nfunction slice(arrayLike, start, end) {\n return arrayProto.slice.call(arrayLike, start, end);\n}\n\nfunction find(arrayLike, predicate) {\n return slice(arrayLike).filter(predicate)[0];\n}\n\nfunction toggleClass(elm, classes, add) {\n if (elm) {\n forEach(classes, (name) => {\n if (name) {\n elm.classList[add ? \"add\" : \"remove\"](name);\n }\n });\n }\n}\n\nfunction addClass(elm, classes) {\n toggleClass(elm, isString(classes) ? classes.split(\" \") : classes, true);\n}\n\nfunction append(parent, children) {\n forEach(children, parent.appendChild.bind(parent));\n}\n\nfunction before(nodes, ref) {\n forEach(nodes, (node) => {\n const parent = ref.parentNode;\n if (parent) {\n parent.insertBefore(node, ref);\n }\n });\n}\n\nfunction matches(elm, selector) {\n return isHTMLElement(elm) && (elm[\"msMatchesSelector\"] || elm.matches).call(elm, selector);\n}\n\nfunction children(parent, selector) {\n return parent ? slice(parent.children).filter((child) => matches(child, selector)) : [];\n}\n\nfunction child(parent, selector) {\n return selector ? children(parent, selector)[0] : parent.firstElementChild;\n}\n\nfunction forOwn(object, iteratee, right) {\n if (object) {\n let keys = Object.keys(object);\n keys = right ? keys.reverse() : keys;\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \"__proto__\") {\n if (iteratee(object[key], key) === false) {\n break;\n }\n }\n }\n }\n return object;\n}\n\nfunction assign(object) {\n slice(arguments, 1).forEach((source) => {\n forOwn(source, (value, key) => {\n object[key] = source[key];\n });\n });\n return object;\n}\n\nfunction merge(object, source) {\n forOwn(source, (value, key) => {\n if (isArray(value)) {\n object[key] = value.slice();\n } else if (isObject(value)) {\n object[key] = merge(isObject(object[key]) ? object[key] : {}, value);\n } else {\n object[key] = value;\n }\n });\n return object;\n}\n\nfunction removeAttribute(elm, attrs) {\n if (elm) {\n forEach(attrs, (attr) => {\n elm.removeAttribute(attr);\n });\n }\n}\n\nfunction setAttribute(elm, attrs, value) {\n if (isObject(attrs)) {\n forOwn(attrs, (value2, name) => {\n setAttribute(elm, name, value2);\n });\n } else {\n isNull(value) ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value));\n }\n}\n\nfunction create(tag, attrs, parent) {\n const elm = document.createElement(tag);\n if (attrs) {\n isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs);\n }\n parent && append(parent, elm);\n return elm;\n}\n\nfunction style(elm, prop, value) {\n if (isUndefined(value)) {\n return getComputedStyle(elm)[prop];\n }\n if (!isNull(value)) {\n const { style: style2 } = elm;\n value = `${value}`;\n if (style2[prop] !== value) {\n style2[prop] = value;\n }\n }\n}\n\nfunction display(elm, display2) {\n style(elm, \"display\", display2);\n}\n\nfunction focus(elm) {\n elm[\"setActive\"] && elm[\"setActive\"]() || elm.focus({ preventScroll: true });\n}\n\nfunction getAttribute(elm, attr) {\n return elm.getAttribute(attr);\n}\n\nfunction hasClass(elm, className) {\n return elm && elm.classList.contains(className);\n}\n\nfunction rect(target) {\n return target.getBoundingClientRect();\n}\n\nfunction remove(nodes) {\n forEach(nodes, (node) => {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n}\n\nfunction measure(parent, value) {\n if (isString(value)) {\n const div = create(\"div\", { style: `width: ${value}; position: absolute;` }, parent);\n value = rect(div).width;\n remove(div);\n }\n return value;\n}\n\nfunction parseHtml(html) {\n return child(new DOMParser().parseFromString(html, \"text/html\").body);\n}\n\nfunction prevent(e, stopPropagation) {\n e.preventDefault();\n if (stopPropagation) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n}\n\nfunction query(parent, selector) {\n return parent && parent.querySelector(selector);\n}\n\nfunction queryAll(parent, selector) {\n return slice(parent.querySelectorAll(selector));\n}\n\nfunction removeClass(elm, classes) {\n toggleClass(elm, classes, false);\n}\n\nfunction unit(value) {\n return isString(value) ? value : value ? `${value}px` : \"\";\n}\n\nfunction assert(condition, message = \"\") {\n if (!condition) {\n throw new Error(`[${PROJECT_CODE}] ${message}`);\n }\n}\n\nfunction nextTick(callback) {\n setTimeout(callback);\n}\n\nconst noop = () => {\n};\n\nfunction raf(func) {\n return requestAnimationFrame(func);\n}\n\nconst { min, max, floor, ceil, abs } = Math;\n\nfunction approximatelyEqual(x, y, epsilon) {\n return abs(x - y) < epsilon;\n}\n\nfunction between(number, minOrMax, maxOrMin, exclusive) {\n const minimum = min(minOrMax, maxOrMin);\n const maximum = max(minOrMax, maxOrMin);\n return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum;\n}\n\nfunction clamp(number, x, y) {\n const minimum = min(x, y);\n const maximum = max(x, y);\n return min(max(minimum, number), maximum);\n}\n\nfunction sign(x) {\n return +(x > 0) - +(x < 0);\n}\n\nfunction camelToKebab(string) {\n return string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\nfunction format(string, replacements) {\n forEach(replacements, (replacement) => {\n string = string.replace(\"%s\", `${replacement}`);\n });\n return string;\n}\n\nfunction pad(number) {\n return number < 10 ? `0${number}` : `${number}`;\n}\n\nconst ids = {};\nfunction uniqueId(prefix) {\n return `${prefix}${pad(ids[prefix] = (ids[prefix] || 0) + 1)}`;\n}\n\nfunction EventBus() {\n let handlers = {};\n function on(events, callback, key, priority = DEFAULT_EVENT_PRIORITY) {\n forEachEvent(events, (event, namespace) => {\n handlers[event] = handlers[event] || [];\n push(handlers[event], {\n _event: event,\n _callback: callback,\n _namespace: namespace,\n _priority: priority,\n _key: key\n }).sort((handler1, handler2) => handler1._priority - handler2._priority);\n });\n }\n function off(events, key) {\n forEachEvent(events, (event, namespace) => {\n const eventHandlers = handlers[event];\n handlers[event] = eventHandlers && eventHandlers.filter((handler) => {\n return handler._key ? handler._key !== key : key || handler._namespace !== namespace;\n });\n });\n }\n function offBy(key) {\n forOwn(handlers, (eventHandlers, event) => {\n off(event, key);\n });\n }\n function emit(event) {\n (handlers[event] || []).forEach((handler) => {\n handler._callback.apply(handler, slice(arguments, 1));\n });\n }\n function destroy() {\n handlers = {};\n }\n function forEachEvent(events, iteratee) {\n toArray(events).join(\" \").split(\" \").forEach((eventNS) => {\n const fragments = eventNS.split(\".\");\n iteratee(fragments[0], fragments[1]);\n });\n }\n return {\n on,\n off,\n offBy,\n emit,\n destroy\n };\n}\n\nconst EVENT_MOUNTED = \"mounted\";\nconst EVENT_READY = \"ready\";\nconst EVENT_MOVE = \"move\";\nconst EVENT_MOVED = \"moved\";\nconst EVENT_SHIFTED = \"shifted\";\nconst EVENT_CLICK = \"click\";\nconst EVENT_ACTIVE = \"active\";\nconst EVENT_INACTIVE = \"inactive\";\nconst EVENT_VISIBLE = \"visible\";\nconst EVENT_HIDDEN = \"hidden\";\nconst EVENT_SLIDE_KEYDOWN = \"slide:keydown\";\nconst EVENT_REFRESH = \"refresh\";\nconst EVENT_UPDATED = \"updated\";\nconst EVENT_RESIZE = \"resize\";\nconst EVENT_RESIZED = \"resized\";\nconst EVENT_REPOSITIONED = \"repositioned\";\nconst EVENT_DRAG = \"drag\";\nconst EVENT_DRAGGING = \"dragging\";\nconst EVENT_DRAGGED = \"dragged\";\nconst EVENT_SCROLL = \"scroll\";\nconst EVENT_SCROLLED = \"scrolled\";\nconst EVENT_DESTROY = \"destroy\";\nconst EVENT_ARROWS_MOUNTED = \"arrows:mounted\";\nconst EVENT_ARROWS_UPDATED = \"arrows:updated\";\nconst EVENT_PAGINATION_MOUNTED = \"pagination:mounted\";\nconst EVENT_PAGINATION_UPDATED = \"pagination:updated\";\nconst EVENT_NAVIGATION_MOUNTED = \"navigation:mounted\";\nconst EVENT_AUTOPLAY_PLAY = \"autoplay:play\";\nconst EVENT_AUTOPLAY_PLAYING = \"autoplay:playing\";\nconst EVENT_AUTOPLAY_PAUSE = \"autoplay:pause\";\nconst EVENT_LAZYLOAD_LOADED = \"lazyload:loaded\";\n\nfunction EventInterface(Splide2) {\n const { event } = Splide2;\n const key = {};\n let listeners = [];\n function on(events, callback, priority) {\n event.on(events, callback, key, priority);\n }\n function off(events) {\n event.off(events, key);\n }\n function bind(targets, events, callback, options) {\n forEachEvent(targets, events, (target, event2) => {\n listeners.push([target, event2, callback, options]);\n target.addEventListener(event2, callback, options);\n });\n }\n function unbind(targets, events, callback) {\n forEachEvent(targets, events, (target, event2) => {\n listeners = listeners.filter((listener) => {\n if (listener[0] === target && listener[1] === event2 && (!callback || listener[2] === callback)) {\n target.removeEventListener(event2, listener[2], listener[3]);\n return false;\n }\n return true;\n });\n });\n }\n function forEachEvent(targets, events, iteratee) {\n forEach(targets, (target) => {\n if (target) {\n events.split(\" \").forEach(iteratee.bind(null, target));\n }\n });\n }\n function destroy() {\n listeners = listeners.filter((data) => unbind(data[0], data[1]));\n event.offBy(key);\n }\n event.on(EVENT_DESTROY, destroy, key);\n return {\n on,\n off,\n emit: event.emit,\n bind,\n unbind,\n destroy\n };\n}\n\nfunction RequestInterval(interval, onInterval, onUpdate, limit) {\n const { now } = Date;\n let startTime;\n let rate = 0;\n let id;\n let paused = true;\n let count = 0;\n function update() {\n if (!paused) {\n const elapsed = now() - startTime;\n if (elapsed >= interval) {\n rate = 1;\n startTime = now();\n } else {\n rate = elapsed / interval;\n }\n if (onUpdate) {\n onUpdate(rate);\n }\n if (rate === 1) {\n onInterval();\n if (limit && ++count >= limit) {\n return pause();\n }\n }\n raf(update);\n }\n }\n function start(resume) {\n !resume && cancel();\n startTime = now() - (resume ? rate * interval : 0);\n paused = false;\n raf(update);\n }\n function pause() {\n paused = true;\n }\n function rewind() {\n startTime = now();\n rate = 0;\n if (onUpdate) {\n onUpdate(rate);\n }\n }\n function cancel() {\n cancelAnimationFrame(id);\n rate = 0;\n id = 0;\n paused = true;\n }\n function set(time) {\n interval = time;\n }\n function isPaused() {\n return paused;\n }\n return {\n start,\n rewind,\n pause,\n cancel,\n set,\n isPaused\n };\n}\n\nfunction State(initialState) {\n let state = initialState;\n function set(value) {\n state = value;\n }\n function is(states) {\n return includes(toArray(states), state);\n }\n return { set, is };\n}\n\nfunction Throttle(func, duration) {\n let interval;\n function throttled() {\n if (!interval) {\n interval = RequestInterval(duration || 0, () => {\n func.apply(this, arguments);\n interval = null;\n }, null, 1);\n interval.start();\n }\n }\n return throttled;\n}\n\nfunction Options(Splide2, Components2, options) {\n const throttledObserve = Throttle(observe);\n let initialOptions;\n let points;\n let currPoint;\n function setup() {\n try {\n merge(options, JSON.parse(getAttribute(Splide2.root, DATA_ATTRIBUTE)));\n } catch (e) {\n assert(false, e.message);\n }\n initialOptions = merge({}, options);\n const { breakpoints } = options;\n if (breakpoints) {\n const isMin = options.mediaQuery === \"min\";\n points = Object.keys(breakpoints).sort((n, m) => isMin ? +m - +n : +n - +m).map((point) => [\n point,\n matchMedia(`(${isMin ? \"min\" : \"max\"}-width:${point}px)`)\n ]);\n observe();\n }\n }\n function mount() {\n if (points) {\n addEventListener(\"resize\", throttledObserve);\n }\n }\n function destroy(completely) {\n if (completely) {\n removeEventListener(\"resize\", throttledObserve);\n }\n }\n function observe() {\n const item = find(points, (item2) => item2[1].matches) || [];\n if (item[0] !== currPoint) {\n onMatch(currPoint = item[0]);\n }\n }\n function onMatch(point) {\n const newOptions = options.breakpoints[point] || initialOptions;\n if (newOptions.destroy) {\n Splide2.options = initialOptions;\n Splide2.destroy(newOptions.destroy === \"completely\");\n } else {\n if (Splide2.state.is(DESTROYED)) {\n destroy(true);\n Splide2.mount();\n }\n Splide2.options = newOptions;\n }\n }\n return {\n setup,\n mount,\n destroy\n };\n}\n\nconst RTL = \"rtl\";\nconst TTB = \"ttb\";\n\nconst ORIENTATION_MAP = {\n marginRight: [\"marginBottom\", \"marginLeft\"],\n autoWidth: [\"autoHeight\"],\n fixedWidth: [\"fixedHeight\"],\n paddingLeft: [\"paddingTop\", \"paddingRight\"],\n paddingRight: [\"paddingBottom\", \"paddingLeft\"],\n width: [\"height\"],\n left: [\"top\", \"right\"],\n right: [\"bottom\", \"left\"],\n x: [\"y\"],\n X: [\"Y\"],\n Y: [\"X\"],\n ArrowLeft: [\"ArrowUp\", \"ArrowRight\"],\n ArrowRight: [\"ArrowDown\", \"ArrowLeft\"]\n};\nfunction Direction(Splide2, Components2, options) {\n function resolve(prop, axisOnly) {\n const { direction } = options;\n const index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1;\n return ORIENTATION_MAP[prop][index] || prop;\n }\n function orient(value) {\n return value * (options.direction === RTL ? 1 : -1);\n }\n return {\n resolve,\n orient\n };\n}\n\nconst CLASS_ROOT = PROJECT_CODE;\nconst CLASS_SLIDER = `${PROJECT_CODE}__slider`;\nconst CLASS_TRACK = `${PROJECT_CODE}__track`;\nconst CLASS_LIST = `${PROJECT_CODE}__list`;\nconst CLASS_SLIDE = `${PROJECT_CODE}__slide`;\nconst CLASS_CLONE = `${CLASS_SLIDE}--clone`;\nconst CLASS_CONTAINER = `${CLASS_SLIDE}__container`;\nconst CLASS_ARROWS = `${PROJECT_CODE}__arrows`;\nconst CLASS_ARROW = `${PROJECT_CODE}__arrow`;\nconst CLASS_ARROW_PREV = `${CLASS_ARROW}--prev`;\nconst CLASS_ARROW_NEXT = `${CLASS_ARROW}--next`;\nconst CLASS_PAGINATION = `${PROJECT_CODE}__pagination`;\nconst CLASS_PAGINATION_PAGE = `${CLASS_PAGINATION}__page`;\nconst CLASS_PROGRESS = `${PROJECT_CODE}__progress`;\nconst CLASS_PROGRESS_BAR = `${CLASS_PROGRESS}__bar`;\nconst CLASS_AUTOPLAY = `${PROJECT_CODE}__autoplay`;\nconst CLASS_PLAY = `${PROJECT_CODE}__play`;\nconst CLASS_PAUSE = `${PROJECT_CODE}__pause`;\nconst CLASS_SPINNER = `${PROJECT_CODE}__spinner`;\nconst CLASS_INITIALIZED = \"is-initialized\";\nconst CLASS_ACTIVE = \"is-active\";\nconst CLASS_PREV = \"is-prev\";\nconst CLASS_NEXT = \"is-next\";\nconst CLASS_VISIBLE = \"is-visible\";\nconst CLASS_LOADING = \"is-loading\";\nconst STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING];\nconst CLASSES = {\n slide: CLASS_SLIDE,\n clone: CLASS_CLONE,\n arrows: CLASS_ARROWS,\n arrow: CLASS_ARROW,\n prev: CLASS_ARROW_PREV,\n next: CLASS_ARROW_NEXT,\n pagination: CLASS_PAGINATION,\n page: CLASS_PAGINATION_PAGE,\n spinner: CLASS_SPINNER\n};\n\nfunction Elements(Splide2, Components2, options) {\n const { on } = EventInterface(Splide2);\n const { root } = Splide2;\n const elements = {};\n const slides = [];\n let classes;\n let slider;\n let track;\n let list;\n function setup() {\n collect();\n identify();\n addClass(root, classes = getClasses());\n }\n function mount() {\n on(EVENT_REFRESH, refresh, DEFAULT_EVENT_PRIORITY - 2);\n on(EVENT_UPDATED, update);\n }\n function destroy() {\n [root, track, list].forEach((elm) => {\n removeAttribute(elm, \"style\");\n });\n empty(slides);\n removeClass(root, classes);\n }\n function refresh() {\n destroy();\n setup();\n }\n function update() {\n removeClass(root, classes);\n addClass(root, classes = getClasses());\n }\n function collect() {\n slider = child(root, `.${CLASS_SLIDER}`);\n track = query(root, `.${CLASS_TRACK}`);\n list = child(track, `.${CLASS_LIST}`);\n assert(track && list, \"A track/list element is missing.\");\n push(slides, children(list, `.${CLASS_SLIDE}:not(.${CLASS_CLONE})`));\n const autoplay = find(`.${CLASS_AUTOPLAY}`);\n const arrows = find(`.${CLASS_ARROWS}`);\n assign(elements, {\n root,\n slider,\n track,\n list,\n slides,\n arrows,\n autoplay,\n prev: query(arrows, `.${CLASS_ARROW_PREV}`),\n next: query(arrows, `.${CLASS_ARROW_NEXT}`),\n bar: query(find(`.${CLASS_PROGRESS}`), `.${CLASS_PROGRESS_BAR}`),\n play: query(autoplay, `.${CLASS_PLAY}`),\n pause: query(autoplay, `.${CLASS_PAUSE}`)\n });\n }\n function identify() {\n const id = root.id || uniqueId(PROJECT_CODE);\n root.id = id;\n track.id = track.id || `${id}-track`;\n list.id = list.id || `${id}-list`;\n }\n function find(selector) {\n return child(root, selector) || child(slider, selector);\n }\n function getClasses() {\n return [\n `${CLASS_ROOT}--${options.type}`,\n `${CLASS_ROOT}--${options.direction}`,\n options.drag && `${CLASS_ROOT}--draggable`,\n options.isNavigation && `${CLASS_ROOT}--nav`,\n CLASS_ACTIVE\n ];\n }\n return assign(elements, {\n setup,\n mount,\n destroy\n });\n}\n\nconst ROLE = \"role\";\nconst ARIA_CONTROLS = \"aria-controls\";\nconst ARIA_CURRENT = \"aria-current\";\nconst ARIA_LABEL = \"aria-label\";\nconst ARIA_HIDDEN = \"aria-hidden\";\nconst TAB_INDEX = \"tabindex\";\nconst DISABLED = \"disabled\";\nconst ARIA_ORIENTATION = \"aria-orientation\";\nconst ALL_ATTRIBUTES = [\n ROLE,\n ARIA_CONTROLS,\n ARIA_CURRENT,\n ARIA_LABEL,\n ARIA_HIDDEN,\n ARIA_ORIENTATION,\n TAB_INDEX,\n DISABLED\n];\n\nconst SLIDE = \"slide\";\nconst LOOP = \"loop\";\nconst FADE = \"fade\";\n\nfunction Slide$1(Splide2, index, slideIndex, slide) {\n const { on, emit, bind, destroy: destroyEvents } = EventInterface(Splide2);\n const { Components, root, options } = Splide2;\n const { isNavigation, updateOnMove } = options;\n const { resolve } = Components.Direction;\n const styles = getAttribute(slide, \"style\");\n const isClone = slideIndex > -1;\n const container = child(slide, `.${CLASS_CONTAINER}`);\n const focusableNodes = options.focusableNodes && queryAll(slide, options.focusableNodes);\n let destroyed;\n function mount() {\n if (!isClone) {\n slide.id = `${root.id}-slide${pad(index + 1)}`;\n }\n bind(slide, \"click keydown\", (e) => {\n emit(e.type === \"click\" ? EVENT_CLICK : EVENT_SLIDE_KEYDOWN, self, e);\n });\n on([EVENT_REFRESH, EVENT_REPOSITIONED, EVENT_SHIFTED, EVENT_MOVED, EVENT_SCROLLED], update);\n on(EVENT_NAVIGATION_MOUNTED, initNavigation);\n if (updateOnMove) {\n on(EVENT_MOVE, onMove);\n }\n }\n function destroy() {\n destroyed = true;\n destroyEvents();\n removeClass(slide, STATUS_CLASSES);\n removeAttribute(slide, ALL_ATTRIBUTES);\n setAttribute(slide, \"style\", styles);\n }\n function initNavigation() {\n const idx = isClone ? slideIndex : index;\n const label = format(options.i18n.slideX, idx + 1);\n const controls = Splide2.splides.map((target) => target.splide.root.id).join(\" \");\n setAttribute(slide, ARIA_LABEL, label);\n setAttribute(slide, ARIA_CONTROLS, controls);\n setAttribute(slide, ROLE, \"menuitem\");\n updateActivity(isActive());\n }\n function onMove() {\n if (!destroyed) {\n update();\n }\n }\n function update() {\n if (!destroyed) {\n const { index: currIndex } = Splide2;\n updateActivity(isActive());\n updateVisibility(isVisible());\n toggleClass(slide, CLASS_PREV, index === currIndex - 1);\n toggleClass(slide, CLASS_NEXT, index === currIndex + 1);\n }\n }\n function updateActivity(active) {\n if (active !== hasClass(slide, CLASS_ACTIVE)) {\n toggleClass(slide, CLASS_ACTIVE, active);\n if (isNavigation) {\n setAttribute(slide, ARIA_CURRENT, active || null);\n }\n emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self);\n }\n }\n function updateVisibility(visible) {\n const hidden = !visible && (!isActive() || isClone);\n setAttribute(slide, ARIA_HIDDEN, hidden || null);\n setAttribute(slide, TAB_INDEX, !hidden && options.slideFocus ? 0 : null);\n if (focusableNodes) {\n focusableNodes.forEach((node) => {\n setAttribute(node, TAB_INDEX, hidden ? -1 : null);\n });\n }\n if (visible !== hasClass(slide, CLASS_VISIBLE)) {\n toggleClass(slide, CLASS_VISIBLE, visible);\n emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self);\n }\n }\n function style$1(prop, value, useContainer) {\n style(useContainer && container || slide, prop, value);\n }\n function isActive() {\n const { index: curr } = Splide2;\n return curr === index || options.cloneStatus && curr === slideIndex;\n }\n function isVisible() {\n if (Splide2.is(FADE)) {\n return isActive();\n }\n const trackRect = rect(Components.Elements.track);\n const slideRect = rect(slide);\n const left = resolve(\"left\");\n const right = resolve(\"right\");\n return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]);\n }\n function isWithin(from, distance) {\n let diff = abs(from - index);\n if (!isClone && (options.rewind || Splide2.is(LOOP))) {\n diff = min(diff, Splide2.length - diff);\n }\n return diff <= distance;\n }\n const self = {\n index,\n slideIndex,\n slide,\n container,\n isClone,\n mount,\n destroy,\n update,\n style: style$1,\n isWithin\n };\n return self;\n}\n\nfunction Slides(Splide2, Components2, options) {\n const { on, emit, bind } = EventInterface(Splide2);\n const { slides, list } = Components2.Elements;\n const Slides2 = [];\n function mount() {\n init();\n on(EVENT_REFRESH, refresh);\n on([EVENT_MOUNTED, EVENT_REFRESH], () => {\n Slides2.sort((Slide1, Slide2) => Slide1.index - Slide2.index);\n });\n }\n function init() {\n slides.forEach((slide, index) => {\n register(slide, index, -1);\n });\n }\n function destroy() {\n forEach$1((Slide2) => {\n Slide2.destroy();\n });\n empty(Slides2);\n }\n function refresh() {\n destroy();\n init();\n }\n function update() {\n forEach$1((Slide2) => {\n Slide2.update();\n });\n }\n function register(slide, index, slideIndex) {\n const object = Slide$1(Splide2, index, slideIndex, slide);\n object.mount();\n Slides2.push(object);\n }\n function get(excludeClones) {\n return excludeClones ? filter((Slide2) => !Slide2.isClone) : Slides2;\n }\n function getIn(page) {\n const { Controller } = Components2;\n const index = Controller.toIndex(page);\n const max = Controller.hasFocus() ? 1 : options.perPage;\n return filter((Slide2) => between(Slide2.index, index, index + max - 1));\n }\n function getAt(index) {\n return filter(index)[0];\n }\n function add(items, index) {\n forEach(items, (slide) => {\n if (isString(slide)) {\n slide = parseHtml(slide);\n }\n if (isHTMLElement(slide)) {\n const ref = slides[index];\n ref ? before(slide, ref) : append(list, slide);\n addClass(slide, options.classes.slide);\n observeImages(slide, emit.bind(null, EVENT_RESIZE));\n }\n });\n emit(EVENT_REFRESH);\n }\n function remove$1(matcher) {\n remove(filter(matcher).map((Slide2) => Slide2.slide));\n emit(EVENT_REFRESH);\n }\n function forEach$1(iteratee, excludeClones) {\n get(excludeClones).forEach(iteratee);\n }\n function filter(matcher) {\n return Slides2.filter(isFunction(matcher) ? matcher : (Slide2) => isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index));\n }\n function style(prop, value, useContainer) {\n forEach$1((Slide2) => {\n Slide2.style(prop, value, useContainer);\n });\n }\n function observeImages(elm, callback) {\n const images = queryAll(elm, \"img\");\n let { length } = images;\n if (length) {\n images.forEach((img) => {\n bind(img, \"load error\", () => {\n if (!--length) {\n callback();\n }\n });\n });\n } else {\n callback();\n }\n }\n function getLength(excludeClones) {\n return excludeClones ? slides.length : Slides2.length;\n }\n function isEnough() {\n return Slides2.length > options.perPage;\n }\n return {\n mount,\n destroy,\n update,\n register,\n get,\n getIn,\n getAt,\n add,\n remove: remove$1,\n forEach: forEach$1,\n filter,\n style,\n getLength,\n isEnough\n };\n}\n\nfunction Layout(Splide2, Components2, options) {\n const { on, bind, emit } = EventInterface(Splide2);\n const { Slides } = Components2;\n const { resolve } = Components2.Direction;\n const { root, track, list } = Components2.Elements;\n const { getAt } = Slides;\n let vertical;\n let rootRect;\n function mount() {\n init();\n bind(window, \"resize load\", Throttle(emit.bind(this, EVENT_RESIZE)));\n on([EVENT_UPDATED, EVENT_REFRESH], init);\n on(EVENT_RESIZE, resize);\n }\n function init() {\n rootRect = null;\n vertical = options.direction === TTB;\n style(root, \"maxWidth\", unit(options.width));\n style(track, resolve(\"paddingLeft\"), cssPadding(false));\n style(track, resolve(\"paddingRight\"), cssPadding(true));\n resize();\n }\n function resize() {\n const newRect = rect(root);\n if (!rootRect || rootRect.width !== newRect.width || rootRect.height !== newRect.height) {\n style(track, \"height\", cssTrackHeight());\n Slides.style(resolve(\"marginRight\"), unit(options.gap));\n Slides.style(\"width\", cssSlideWidth() || null);\n setSlidesHeight();\n rootRect = newRect;\n emit(EVENT_RESIZED);\n }\n }\n function setSlidesHeight() {\n Slides.style(\"height\", cssSlideHeight() || null, true);\n }\n function cssPadding(right) {\n const { padding } = options;\n const prop = resolve(right ? \"right\" : \"left\");\n return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || \"0px\";\n }\n function cssTrackHeight() {\n let height = \"\";\n if (vertical) {\n height = cssHeight();\n assert(height, \"height or heightRatio is missing.\");\n height = `calc(${height} - ${cssPadding(false)} - ${cssPadding(true)})`;\n }\n return height;\n }\n function cssHeight() {\n return unit(options.height || rect(list).width * options.heightRatio);\n }\n function cssSlideWidth() {\n return options.autoWidth ? \"\" : unit(options.fixedWidth) || (vertical ? \"\" : cssSlideSize());\n }\n function cssSlideHeight() {\n return unit(options.fixedHeight) || (vertical ? options.autoHeight ? \"\" : cssSlideSize() : cssHeight());\n }\n function cssSlideSize() {\n const gap = unit(options.gap);\n return `calc((100%${gap && ` + ${gap}`})/${options.perPage || 1}${gap && ` - ${gap}`})`;\n }\n function listSize() {\n return rect(list)[resolve(\"width\")];\n }\n function slideSize(index, withoutGap) {\n const Slide = getAt(index || 0);\n return Slide ? rect(Slide.slide)[resolve(\"width\")] + (withoutGap ? 0 : getGap()) : 0;\n }\n function totalSize(index, withoutGap) {\n const Slide = getAt(index);\n if (Slide) {\n const right = rect(Slide.slide)[resolve(\"right\")];\n const left = rect(list)[resolve(\"left\")];\n return abs(right - left) + (withoutGap ? 0 : getGap());\n }\n return 0;\n }\n function sliderSize() {\n return totalSize(Splide2.length - 1, true) - totalSize(-1, true);\n }\n function getGap() {\n const Slide = getAt(0);\n return Slide && parseFloat(style(Slide.slide, resolve(\"marginRight\"))) || 0;\n }\n function getPadding(right) {\n return parseFloat(style(track, resolve(`padding${right ? \"Right\" : \"Left\"}`))) || 0;\n }\n return {\n mount,\n listSize,\n slideSize,\n sliderSize,\n totalSize,\n getPadding\n };\n}\n\nfunction Clones(Splide2, Components2, options) {\n const { on, emit } = EventInterface(Splide2);\n const { Elements, Slides } = Components2;\n const { resolve } = Components2.Direction;\n const clones = [];\n let cloneCount;\n function mount() {\n init();\n on(EVENT_REFRESH, refresh);\n on([EVENT_UPDATED, EVENT_RESIZE], observe);\n }\n function init() {\n if (cloneCount = computeCloneCount()) {\n generate(cloneCount);\n emit(EVENT_RESIZE);\n }\n }\n function destroy() {\n remove(clones);\n empty(clones);\n }\n function refresh() {\n destroy();\n init();\n }\n function observe() {\n if (cloneCount < computeCloneCount()) {\n emit(EVENT_REFRESH);\n }\n }\n function generate(count) {\n const slides = Slides.get().slice();\n const { length } = slides;\n if (length) {\n while (slides.length < count) {\n push(slides, slides);\n }\n push(slides.slice(-count), slides.slice(0, count)).forEach((Slide, index) => {\n const isHead = index < count;\n const clone = cloneDeep(Slide.slide, index);\n isHead ? before(clone, slides[0].slide) : append(Elements.list, clone);\n push(clones, clone);\n Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index);\n });\n }\n }\n function cloneDeep(elm, index) {\n const clone = elm.cloneNode(true);\n addClass(clone, options.classes.clone);\n clone.id = `${Splide2.root.id}-clone${pad(index + 1)}`;\n return clone;\n }\n function computeCloneCount() {\n let { clones: clones2 } = options;\n if (!Splide2.is(LOOP)) {\n clones2 = 0;\n } else if (!clones2) {\n const fixedSize = measure(Elements.list, options[resolve(\"fixedWidth\")]);\n const fixedCount = fixedSize && ceil(rect(Elements.track)[resolve(\"width\")] / fixedSize);\n const baseCount = fixedCount || options[resolve(\"autoWidth\")] && Splide2.length || options.perPage;\n clones2 = baseCount * (options.drag ? (options.flickMaxPages || 1) + 1 : 2);\n }\n return clones2;\n }\n return {\n mount,\n destroy\n };\n}\n\nfunction Move(Splide2, Components2, options) {\n const { on, emit } = EventInterface(Splide2);\n const { slideSize, getPadding, totalSize, listSize, sliderSize } = Components2.Layout;\n const { resolve, orient } = Components2.Direction;\n const { list, track } = Components2.Elements;\n let Transition;\n function mount() {\n Transition = Components2.Transition;\n on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition);\n }\n function destroy() {\n removeAttribute(list, \"style\");\n }\n function reposition() {\n if (!isBusy()) {\n Components2.Scroll.cancel();\n jump(Splide2.index);\n emit(EVENT_REPOSITIONED);\n }\n }\n function move(dest, index, prev, callback) {\n if (!isBusy()) {\n const { set } = Splide2.state;\n const position = getPosition();\n if (dest !== index) {\n Transition.cancel();\n translate(shift(position, dest > index), true);\n }\n set(MOVING);\n emit(EVENT_MOVE, index, prev, dest);\n Transition.start(index, () => {\n set(IDLE);\n emit(EVENT_MOVED, index, prev, dest);\n if (options.trimSpace === \"move\" && dest !== prev && position === getPosition()) {\n Components2.Controller.go(dest > prev ? \">\" : \"<\", false, callback);\n } else {\n callback && callback();\n }\n });\n }\n }\n function jump(index) {\n translate(toPosition(index, true));\n }\n function translate(position, preventLoop) {\n if (!Splide2.is(FADE)) {\n const destination = preventLoop ? position : loop(position);\n list.style.transform = `translate${resolve(\"X\")}(${destination}px)`;\n position !== destination && emit(EVENT_SHIFTED);\n }\n }\n function loop(position) {\n if (Splide2.is(LOOP)) {\n const diff = orient(position - getPosition());\n const exceededMin = exceededLimit(false, position) && diff < 0;\n const exceededMax = exceededLimit(true, position) && diff > 0;\n if (exceededMin || exceededMax) {\n position = shift(position, exceededMax);\n }\n }\n return position;\n }\n function shift(position, backwards) {\n const excess = position - getLimit(backwards);\n const size = sliderSize();\n position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1);\n return position;\n }\n function cancel() {\n translate(getPosition());\n Transition.cancel();\n }\n function toIndex(position) {\n const Slides = Components2.Slides.get();\n let index = 0;\n let minDistance = Infinity;\n for (let i = 0; i < Slides.length; i++) {\n const slideIndex = Slides[i].index;\n const distance = abs(toPosition(slideIndex, true) - position);\n if (distance <= minDistance) {\n minDistance = distance;\n index = slideIndex;\n } else {\n break;\n }\n }\n return index;\n }\n function toPosition(index, trimming) {\n const position = orient(totalSize(index - 1) - offset(index));\n return trimming ? trim(position) : position;\n }\n function getPosition() {\n const left = resolve(\"left\");\n return rect(list)[left] - rect(track)[left] + orient(getPadding(false));\n }\n function trim(position) {\n if (options.trimSpace && Splide2.is(SLIDE)) {\n position = clamp(position, 0, orient(sliderSize() - listSize()));\n }\n return position;\n }\n function offset(index) {\n const { focus } = options;\n return focus === \"center\" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0;\n }\n function getLimit(max) {\n return toPosition(max ? Components2.Controller.getEnd() : 0, !!options.trimSpace);\n }\n function isBusy() {\n return Splide2.state.is(MOVING) && options.waitForTransition;\n }\n function exceededLimit(max, position) {\n position = isUndefined(position) ? getPosition() : position;\n const exceededMin = max !== true && orient(position) < orient(getLimit(false));\n const exceededMax = max !== false && orient(position) > orient(getLimit(true));\n return exceededMin || exceededMax;\n }\n return {\n mount,\n destroy,\n move,\n jump,\n translate,\n shift,\n cancel,\n toIndex,\n toPosition,\n getPosition,\n getLimit,\n isBusy,\n exceededLimit\n };\n}\n\nfunction Controller(Splide2, Components2, options) {\n const { on } = EventInterface(Splide2);\n const { Move } = Components2;\n const { getPosition, getLimit } = Move;\n const { isEnough, getLength } = Components2.Slides;\n const isLoop = Splide2.is(LOOP);\n const isSlide = Splide2.is(SLIDE);\n let currIndex = options.start || 0;\n let prevIndex = currIndex;\n let slideCount;\n let perMove;\n let perPage;\n function mount() {\n init();\n on([EVENT_UPDATED, EVENT_REFRESH], init, DEFAULT_EVENT_PRIORITY - 1);\n }\n function init() {\n slideCount = getLength(true);\n perMove = options.perMove;\n perPage = options.perPage;\n currIndex = clamp(currIndex, 0, slideCount - 1);\n }\n function go(control, allowSameIndex, callback) {\n const dest = parse(control);\n if (options.useScroll) {\n scroll(dest, true, true, options.speed, callback);\n } else {\n const index = loop(dest);\n if (index > -1 && !Move.isBusy() && (allowSameIndex || index !== currIndex)) {\n setIndex(index);\n Move.move(dest, index, prevIndex, callback);\n }\n }\n }\n function scroll(destination, useIndex, snap, duration, callback) {\n const dest = useIndex ? destination : toDest(destination);\n Components2.Scroll.scroll(useIndex || snap ? Move.toPosition(dest, true) : destination, duration, () => {\n setIndex(Move.toIndex(Move.getPosition()));\n callback && callback();\n });\n }\n function parse(control) {\n let index = currIndex;\n if (isString(control)) {\n const [, indicator, number] = control.match(/([+\\-<>])(\\d+)?/) || [];\n if (indicator === \"+\" || indicator === \"-\") {\n index = computeDestIndex(currIndex + +`${indicator}${+number || 1}`, currIndex, true);\n } else if (indicator === \">\") {\n index = number ? toIndex(+number) : getNext(true);\n } else if (indicator === \"<\") {\n index = getPrev(true);\n }\n } else {\n index = isLoop ? control : clamp(control, 0, getEnd());\n }\n return index;\n }\n function getNext(destination) {\n return getAdjacent(false, destination);\n }\n function getPrev(destination) {\n return getAdjacent(true, destination);\n }\n function getAdjacent(prev, destination) {\n const number = perMove || (hasFocus() ? 1 : perPage);\n const dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex);\n if (dest === -1 && isSlide) {\n if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) {\n return prev ? 0 : getEnd();\n }\n }\n return destination ? dest : loop(dest);\n }\n function computeDestIndex(dest, from, incremental) {\n if (isEnough()) {\n const end = getEnd();\n if (dest < 0 || dest > end) {\n if (between(0, dest, from, true) || between(end, from, dest, true)) {\n dest = toIndex(toPage(dest));\n } else {\n if (isLoop) {\n dest = perMove || hasFocus() ? dest : dest < 0 ? -(slideCount % perPage || perPage) : slideCount;\n } else if (options.rewind) {\n dest = dest < 0 ? end : 0;\n } else {\n dest = -1;\n }\n }\n } else {\n if (!incremental && dest !== from) {\n dest = perMove ? dest : toIndex(toPage(from) + (dest < from ? -1 : 1));\n }\n }\n } else {\n dest = -1;\n }\n return dest;\n }\n function getEnd() {\n let end = slideCount - perPage;\n if (hasFocus() || isLoop && perMove) {\n end = slideCount - 1;\n }\n return max(end, 0);\n }\n function loop(index) {\n if (isLoop) {\n return isEnough() ? index % slideCount + (index < 0 ? slideCount : 0) : -1;\n }\n return index;\n }\n function toIndex(page) {\n return clamp(hasFocus() ? page : perPage * page, 0, getEnd());\n }\n function toPage(index) {\n if (!hasFocus()) {\n index = between(index, slideCount - perPage, slideCount - 1) ? slideCount - 1 : index;\n index = floor(index / perPage);\n }\n return index;\n }\n function toDest(destination) {\n const closest = Move.toIndex(destination);\n return isSlide ? clamp(closest, 0, getEnd()) : closest;\n }\n function setIndex(index) {\n if (index !== currIndex) {\n prevIndex = currIndex;\n currIndex = index;\n }\n }\n function getIndex(prev) {\n return prev ? prevIndex : currIndex;\n }\n function hasFocus() {\n return !isUndefined(options.focus) || options.isNavigation;\n }\n return {\n mount,\n go,\n scroll,\n getNext,\n getPrev,\n getAdjacent,\n getEnd,\n setIndex,\n getIndex,\n toIndex,\n toPage,\n toDest,\n hasFocus\n };\n}\n\nconst XML_NAME_SPACE = \"http://www.w3.org/2000/svg\";\nconst PATH = \"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z\";\nconst SIZE = 40;\n\nfunction Arrows(Splide2, Components2, options) {\n const { on, bind, emit } = EventInterface(Splide2);\n const { classes, i18n } = options;\n const { Elements, Controller } = Components2;\n let wrapper = Elements.arrows;\n let prev = Elements.prev;\n let next = Elements.next;\n let created;\n const arrows = {};\n function mount() {\n init();\n on(EVENT_UPDATED, init);\n }\n function init() {\n if (options.arrows) {\n if (!prev || !next) {\n createArrows();\n }\n }\n if (prev && next) {\n if (!arrows.prev) {\n const { id } = Elements.track;\n setAttribute(prev, ARIA_CONTROLS, id);\n setAttribute(next, ARIA_CONTROLS, id);\n arrows.prev = prev;\n arrows.next = next;\n listen();\n emit(EVENT_ARROWS_MOUNTED, prev, next);\n } else {\n display(wrapper, options.arrows === false ? \"none\" : \"\");\n }\n }\n }\n function destroy() {\n if (created) {\n remove(wrapper);\n } else {\n removeAttribute(prev, ALL_ATTRIBUTES);\n removeAttribute(next, ALL_ATTRIBUTES);\n }\n }\n function listen() {\n const { go } = Controller;\n on([EVENT_MOUNTED, EVENT_MOVED, EVENT_UPDATED, EVENT_REFRESH, EVENT_SCROLLED], update);\n bind(next, \"click\", () => {\n go(\">\", true);\n });\n bind(prev, \"click\", () => {\n go(\"<\", true);\n });\n }\n function createArrows() {\n wrapper = create(\"div\", classes.arrows);\n prev = createArrow(true);\n next = createArrow(false);\n created = true;\n append(wrapper, [prev, next]);\n before(wrapper, child(options.arrows === \"slider\" && Elements.slider || Splide2.root));\n }\n function createArrow(prev2) {\n const arrow = ``;\n }\n html() {\n const { rootClass, listTag, arrows, beforeTrack, afterTrack, slider, beforeSlider, afterSlider } = this.config;\n let html = \"\";\n html += `
`;\n html += ``;\n if (slider) {\n html += beforeSlider || \"\";\n html += `
`;\n }\n html += beforeTrack || \"\";\n if (arrows) {\n html += this.renderArrows();\n }\n html += `
`;\n html += `<${listTag} class=\"splide__list\">`;\n html += this.renderSlides();\n html += ``;\n html += `
`;\n html += afterTrack || \"\";\n if (slider) {\n html += `
`;\n html += afterSlider || \"\";\n }\n html += `
`;\n return html;\n }\n}\n\nexport { CLASSES, CLASS_ACTIVE, CLASS_ARROW, CLASS_ARROWS, CLASS_ARROW_NEXT, CLASS_ARROW_PREV, CLASS_AUTOPLAY, CLASS_CLONE, CLASS_CONTAINER, CLASS_INITIALIZED, CLASS_LIST, CLASS_LOADING, CLASS_NEXT, CLASS_PAGINATION, CLASS_PAGINATION_PAGE, CLASS_PAUSE, CLASS_PLAY, CLASS_PREV, CLASS_PROGRESS, CLASS_PROGRESS_BAR, CLASS_ROOT, CLASS_SLIDE, CLASS_SLIDER, CLASS_SPINNER, CLASS_TRACK, CLASS_VISIBLE, EVENT_ACTIVE, EVENT_ARROWS_MOUNTED, EVENT_ARROWS_UPDATED, EVENT_AUTOPLAY_PAUSE, EVENT_AUTOPLAY_PLAY, EVENT_AUTOPLAY_PLAYING, EVENT_CLICK, EVENT_DESTROY, EVENT_DRAG, EVENT_DRAGGED, EVENT_DRAGGING, EVENT_HIDDEN, EVENT_INACTIVE, EVENT_LAZYLOAD_LOADED, EVENT_MOUNTED, EVENT_MOVE, EVENT_MOVED, EVENT_NAVIGATION_MOUNTED, EVENT_PAGINATION_MOUNTED, EVENT_PAGINATION_UPDATED, EVENT_READY, EVENT_REFRESH, EVENT_REPOSITIONED, EVENT_RESIZE, EVENT_RESIZED, EVENT_SCROLL, EVENT_SCROLLED, EVENT_SHIFTED, EVENT_SLIDE_KEYDOWN, EVENT_UPDATED, EVENT_VISIBLE, EventBus, EventInterface, RequestInterval, STATUS_CLASSES, Splide, SplideRenderer, State, Throttle, Splide as default };\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\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++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\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 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\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) : adopt(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 __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") 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 throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\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 __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\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\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n",null,"/*! choices.js v9.1.0 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Choices\"] = factory();\n\telse\n\t\troot[\"Choices\"] = factory();\n})(window, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 282:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.clearChoices = exports.activateChoices = exports.filterChoices = exports.addChoice = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar addChoice = function (_a) {\n var value = _a.value,\n label = _a.label,\n id = _a.id,\n groupId = _a.groupId,\n disabled = _a.disabled,\n elementId = _a.elementId,\n customProperties = _a.customProperties,\n placeholder = _a.placeholder,\n keyCode = _a.keyCode;\n return {\n type: constants_1.ACTION_TYPES.ADD_CHOICE,\n value: value,\n label: label,\n id: id,\n groupId: groupId,\n disabled: disabled,\n elementId: elementId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n\nexports.addChoice = addChoice;\n\nvar filterChoices = function (results) {\n return {\n type: constants_1.ACTION_TYPES.FILTER_CHOICES,\n results: results\n };\n};\n\nexports.filterChoices = filterChoices;\n\nvar activateChoices = function (active) {\n if (active === void 0) {\n active = true;\n }\n\n return {\n type: constants_1.ACTION_TYPES.ACTIVATE_CHOICES,\n active: active\n };\n};\n\nexports.activateChoices = activateChoices;\n\nvar clearChoices = function () {\n return {\n type: constants_1.ACTION_TYPES.CLEAR_CHOICES\n };\n};\n\nexports.clearChoices = clearChoices;\n\n/***/ }),\n\n/***/ 783:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addGroup = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar addGroup = function (_a) {\n var value = _a.value,\n id = _a.id,\n active = _a.active,\n disabled = _a.disabled;\n return {\n type: constants_1.ACTION_TYPES.ADD_GROUP,\n value: value,\n id: id,\n active: active,\n disabled: disabled\n };\n};\n\nexports.addGroup = addGroup;\n\n/***/ }),\n\n/***/ 464:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.highlightItem = exports.removeItem = exports.addItem = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar addItem = function (_a) {\n var value = _a.value,\n label = _a.label,\n id = _a.id,\n choiceId = _a.choiceId,\n groupId = _a.groupId,\n customProperties = _a.customProperties,\n placeholder = _a.placeholder,\n keyCode = _a.keyCode;\n return {\n type: constants_1.ACTION_TYPES.ADD_ITEM,\n value: value,\n label: label,\n id: id,\n choiceId: choiceId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n\nexports.addItem = addItem;\n\nvar removeItem = function (id, choiceId) {\n return {\n type: constants_1.ACTION_TYPES.REMOVE_ITEM,\n id: id,\n choiceId: choiceId\n };\n};\n\nexports.removeItem = removeItem;\n\nvar highlightItem = function (id, highlighted) {\n return {\n type: constants_1.ACTION_TYPES.HIGHLIGHT_ITEM,\n id: id,\n highlighted: highlighted\n };\n};\n\nexports.highlightItem = highlightItem;\n\n/***/ }),\n\n/***/ 137:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.setIsLoading = exports.resetTo = exports.clearAll = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar clearAll = function () {\n return {\n type: constants_1.ACTION_TYPES.CLEAR_ALL\n };\n};\n\nexports.clearAll = clearAll;\n\nvar resetTo = function (state) {\n return {\n type: constants_1.ACTION_TYPES.RESET_TO,\n state: state\n };\n};\n\nexports.resetTo = resetTo;\n\nvar setIsLoading = function (isLoading) {\n return {\n type: constants_1.ACTION_TYPES.SET_IS_LOADING,\n isLoading: isLoading\n };\n};\n\nexports.setIsLoading = setIsLoading;\n\n/***/ }),\n\n/***/ 373:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar deepmerge_1 = __importDefault(__webpack_require__(996));\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n\nvar fuse_js_1 = __importDefault(__webpack_require__(70));\n\nvar choices_1 = __webpack_require__(282);\n\nvar groups_1 = __webpack_require__(783);\n\nvar items_1 = __webpack_require__(464);\n\nvar misc_1 = __webpack_require__(137);\n\nvar components_1 = __webpack_require__(520);\n\nvar constants_1 = __webpack_require__(883);\n\nvar defaults_1 = __webpack_require__(789);\n\nvar utils_1 = __webpack_require__(799);\n\nvar reducers_1 = __webpack_require__(655);\n\nvar store_1 = __importDefault(__webpack_require__(744));\n\nvar templates_1 = __importDefault(__webpack_require__(686));\n/** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */\n\n\nvar IS_IE11 = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style;\nvar USER_DEFAULTS = {};\n/**\n * Choices\n * @author Josh Johnson\n */\n\nvar Choices =\n/** @class */\nfunction () {\n function Choices(element, userConfig) {\n var _this = this;\n\n if (element === void 0) {\n element = '[data-choice]';\n }\n\n if (userConfig === void 0) {\n userConfig = {};\n }\n\n this.config = deepmerge_1.default.all([defaults_1.DEFAULT_CONFIG, Choices.defaults.options, userConfig], // When merging array configs, replace with a copy of the userConfig array,\n // instead of concatenating with the default array\n {\n arrayMerge: function (_, sourceArray) {\n return __spreadArray([], sourceArray, true);\n }\n });\n var invalidConfigOptions = (0, utils_1.diff)(this.config, defaults_1.DEFAULT_CONFIG);\n\n if (invalidConfigOptions.length) {\n console.warn('Unknown config option(s) passed', invalidConfigOptions.join(', '));\n }\n\n var passedElement = typeof element === 'string' ? document.querySelector(element) : element;\n\n if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) {\n throw TypeError('Expected one of the following types text|select-one|select-multiple');\n }\n\n this._isTextElement = passedElement.type === constants_1.TEXT_TYPE;\n this._isSelectOneElement = passedElement.type === constants_1.SELECT_ONE_TYPE;\n this._isSelectMultipleElement = passedElement.type === constants_1.SELECT_MULTIPLE_TYPE;\n this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement;\n this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled;\n\n if (!['auto', 'always'].includes(\"\".concat(this.config.renderSelectedChoices))) {\n this.config.renderSelectedChoices = 'auto';\n }\n\n if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== 'function') {\n var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter);\n this.config.addItemFilter = re.test.bind(re);\n }\n\n if (this._isTextElement) {\n this.passedElement = new components_1.WrappedInput({\n element: passedElement,\n classNames: this.config.classNames,\n delimiter: this.config.delimiter\n });\n } else {\n this.passedElement = new components_1.WrappedSelect({\n element: passedElement,\n classNames: this.config.classNames,\n template: function (data) {\n return _this._templates.option(data);\n }\n });\n }\n\n this.initialised = false;\n this._store = new store_1.default();\n this._initialState = reducers_1.defaultState;\n this._currentState = reducers_1.defaultState;\n this._prevState = reducers_1.defaultState;\n this._currentValue = '';\n this._canSearch = !!this.config.searchEnabled;\n this._isScrollingOnIe = false;\n this._highlightPosition = 0;\n this._wasTap = true;\n this._placeholderValue = this._generatePlaceholderValue();\n this._baseId = (0, utils_1.generateId)(this.passedElement.element, 'choices-');\n /**\n * setting direction in cases where it's explicitly set on passedElement\n * or when calculated direction is different from the document\n */\n\n this._direction = this.passedElement.dir;\n\n if (!this._direction) {\n var elementDirection = window.getComputedStyle(this.passedElement.element).direction;\n var documentDirection = window.getComputedStyle(document.documentElement).direction;\n\n if (elementDirection !== documentDirection) {\n this._direction = elementDirection;\n }\n }\n\n this._idNames = {\n itemChoice: 'item-choice'\n };\n\n if (this._isSelectElement) {\n // Assign preset groups from passed element\n this._presetGroups = this.passedElement.optionGroups; // Assign preset options from passed element\n\n this._presetOptions = this.passedElement.options;\n } // Assign preset choices from passed object\n\n\n this._presetChoices = this.config.choices; // Assign preset items from passed object first\n\n this._presetItems = this.config.items; // Add any values passed from attribute\n\n if (this.passedElement.value && this._isTextElement) {\n var splitValues = this.passedElement.value.split(this.config.delimiter);\n this._presetItems = this._presetItems.concat(splitValues);\n } // Create array of choices from option elements\n\n\n if (this.passedElement.options) {\n this.passedElement.options.forEach(function (option) {\n _this._presetChoices.push({\n value: option.value,\n label: option.innerHTML,\n selected: !!option.selected,\n disabled: option.disabled || option.parentNode.disabled,\n placeholder: option.value === '' || option.hasAttribute('placeholder'),\n customProperties: option.dataset['custom-properties']\n });\n });\n }\n\n this._render = this._render.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this._onKeyUp = this._onKeyUp.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onMouseOver = this._onMouseOver.bind(this);\n this._onFormReset = this._onFormReset.bind(this);\n this._onSelectKey = this._onSelectKey.bind(this);\n this._onEnterKey = this._onEnterKey.bind(this);\n this._onEscapeKey = this._onEscapeKey.bind(this);\n this._onDirectionKey = this._onDirectionKey.bind(this);\n this._onDeleteKey = this._onDeleteKey.bind(this); // If element has already been initialised with Choices, fail silently\n\n if (this.passedElement.isActive) {\n if (!this.config.silent) {\n console.warn('Trying to initialise Choices on element already initialised', {\n element: element\n });\n }\n\n this.initialised = true;\n return;\n } // Let's go\n\n\n this.init();\n }\n\n Object.defineProperty(Choices, \"defaults\", {\n get: function () {\n return Object.preventExtensions({\n get options() {\n return USER_DEFAULTS;\n },\n\n get templates() {\n return templates_1.default;\n }\n\n });\n },\n enumerable: false,\n configurable: true\n });\n\n Choices.prototype.init = function () {\n if (this.initialised) {\n return;\n }\n\n this._createTemplates();\n\n this._createElements();\n\n this._createStructure();\n\n this._store.subscribe(this._render);\n\n this._render();\n\n this._addEventListeners();\n\n var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');\n\n if (shouldDisable) {\n this.disable();\n }\n\n this.initialised = true;\n var callbackOnInit = this.config.callbackOnInit; // Run callback if it is a function\n\n if (callbackOnInit && typeof callbackOnInit === 'function') {\n callbackOnInit.call(this);\n }\n };\n\n Choices.prototype.destroy = function () {\n if (!this.initialised) {\n return;\n }\n\n this._removeEventListeners();\n\n this.passedElement.reveal();\n this.containerOuter.unwrap(this.passedElement.element);\n this.clearStore();\n\n if (this._isSelectElement) {\n this.passedElement.options = this._presetOptions;\n }\n\n this._templates = templates_1.default;\n this.initialised = false;\n };\n\n Choices.prototype.enable = function () {\n if (this.passedElement.isDisabled) {\n this.passedElement.enable();\n }\n\n if (this.containerOuter.isDisabled) {\n this._addEventListeners();\n\n this.input.enable();\n this.containerOuter.enable();\n }\n\n return this;\n };\n\n Choices.prototype.disable = function () {\n if (!this.passedElement.isDisabled) {\n this.passedElement.disable();\n }\n\n if (!this.containerOuter.isDisabled) {\n this._removeEventListeners();\n\n this.input.disable();\n this.containerOuter.disable();\n }\n\n return this;\n };\n\n Choices.prototype.highlightItem = function (item, runEvent) {\n if (runEvent === void 0) {\n runEvent = true;\n }\n\n if (!item || !item.id) {\n return this;\n }\n\n var id = item.id,\n _a = item.groupId,\n groupId = _a === void 0 ? -1 : _a,\n _b = item.value,\n value = _b === void 0 ? '' : _b,\n _c = item.label,\n label = _c === void 0 ? '' : _c;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch((0, items_1.highlightItem)(id, true));\n\n if (runEvent) {\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n }\n\n return this;\n };\n\n Choices.prototype.unhighlightItem = function (item) {\n if (!item || !item.id) {\n return this;\n }\n\n var id = item.id,\n _a = item.groupId,\n groupId = _a === void 0 ? -1 : _a,\n _b = item.value,\n value = _b === void 0 ? '' : _b,\n _c = item.label,\n label = _c === void 0 ? '' : _c;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch((0, items_1.highlightItem)(id, false));\n\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n return this;\n };\n\n Choices.prototype.highlightAll = function () {\n var _this = this;\n\n this._store.items.forEach(function (item) {\n return _this.highlightItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.unhighlightAll = function () {\n var _this = this;\n\n this._store.items.forEach(function (item) {\n return _this.unhighlightItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.removeActiveItemsByValue = function (value) {\n var _this = this;\n\n this._store.activeItems.filter(function (item) {\n return item.value === value;\n }).forEach(function (item) {\n return _this._removeItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.removeActiveItems = function (excludedId) {\n var _this = this;\n\n this._store.activeItems.filter(function (_a) {\n var id = _a.id;\n return id !== excludedId;\n }).forEach(function (item) {\n return _this._removeItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.removeHighlightedItems = function (runEvent) {\n var _this = this;\n\n if (runEvent === void 0) {\n runEvent = false;\n }\n\n this._store.highlightedActiveItems.forEach(function (item) {\n _this._removeItem(item); // If this action was performed by the user\n // trigger the event\n\n\n if (runEvent) {\n _this._triggerChange(item.value);\n }\n });\n\n return this;\n };\n\n Choices.prototype.showDropdown = function (preventInputFocus) {\n var _this = this;\n\n if (this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this.dropdown.show();\n\n _this.containerOuter.open(_this.dropdown.distanceFromTopWindow);\n\n if (!preventInputFocus && _this._canSearch) {\n _this.input.focus();\n }\n\n _this.passedElement.triggerEvent(constants_1.EVENTS.showDropdown, {});\n });\n return this;\n };\n\n Choices.prototype.hideDropdown = function (preventInputBlur) {\n var _this = this;\n\n if (!this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this.dropdown.hide();\n\n _this.containerOuter.close();\n\n if (!preventInputBlur && _this._canSearch) {\n _this.input.removeActiveDescendant();\n\n _this.input.blur();\n }\n\n _this.passedElement.triggerEvent(constants_1.EVENTS.hideDropdown, {});\n });\n return this;\n };\n\n Choices.prototype.getValue = function (valueOnly) {\n if (valueOnly === void 0) {\n valueOnly = false;\n }\n\n var values = this._store.activeItems.reduce(function (selectedItems, item) {\n var itemValue = valueOnly ? item.value : item;\n selectedItems.push(itemValue);\n return selectedItems;\n }, []);\n\n return this._isSelectOneElement ? values[0] : values;\n };\n\n Choices.prototype.setValue = function (items) {\n var _this = this;\n\n if (!this.initialised) {\n return this;\n }\n\n items.forEach(function (value) {\n return _this._setChoiceOrItem(value);\n });\n return this;\n };\n\n Choices.prototype.setChoiceByValue = function (value) {\n var _this = this;\n\n if (!this.initialised || this._isTextElement) {\n return this;\n } // If only one value has been passed, convert to array\n\n\n var choiceValue = Array.isArray(value) ? value : [value]; // Loop through each value and\n\n choiceValue.forEach(function (val) {\n return _this._findAndSelectChoiceByValue(val);\n });\n return this;\n };\n /**\n * Set choices of select input via an array of objects (or function that returns array of object or promise of it),\n * a value field name and a label field name.\n * This behaves the same as passing items via the choices option but can be called after initialising Choices.\n * This can also be used to add groups of choices (see example 2); Optionally pass a true `replaceChoices` value to remove any existing choices.\n * Optionally pass a `customProperties` object to add additional data to your choices (useful when searching/filtering etc).\n *\n * **Input types affected:** select-one, select-multiple\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([\n * {value: 'One', label: 'Label One', disabled: true},\n * {value: 'Two', label: 'Label Two', selected: true},\n * {value: 'Three', label: 'Label Three'},\n * ], 'value', 'label', false);\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices(async () => {\n * try {\n * const items = await fetch('/items');\n * return items.json()\n * } catch(err) {\n * console.error(err)\n * }\n * });\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([{\n * label: 'Group one',\n * id: 1,\n * disabled: false,\n * choices: [\n * {value: 'Child One', label: 'Child One', selected: true},\n * {value: 'Child Two', label: 'Child Two', disabled: true},\n * {value: 'Child Three', label: 'Child Three'},\n * ]\n * },\n * {\n * label: 'Group two',\n * id: 2,\n * disabled: false,\n * choices: [\n * {value: 'Child Four', label: 'Child Four', disabled: true},\n * {value: 'Child Five', label: 'Child Five'},\n * {value: 'Child Six', label: 'Child Six', customProperties: {\n * description: 'Custom description about child six',\n * random: 'Another random custom property'\n * }},\n * ]\n * }], 'value', 'label', false);\n * ```\n */\n\n\n Choices.prototype.setChoices = function (choicesArrayOrFetcher, value, label, replaceChoices) {\n var _this = this;\n\n if (choicesArrayOrFetcher === void 0) {\n choicesArrayOrFetcher = [];\n }\n\n if (value === void 0) {\n value = 'value';\n }\n\n if (label === void 0) {\n label = 'label';\n }\n\n if (replaceChoices === void 0) {\n replaceChoices = false;\n }\n\n if (!this.initialised) {\n throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");\n }\n\n if (!this._isSelectElement) {\n throw new TypeError(\"setChoices can't be used with INPUT based Choices\");\n }\n\n if (typeof value !== 'string' || !value) {\n throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");\n } // Clear choices if needed\n\n\n if (replaceChoices) {\n this.clearChoices();\n }\n\n if (typeof choicesArrayOrFetcher === 'function') {\n // it's a choices fetcher function\n var fetcher_1 = choicesArrayOrFetcher(this);\n\n if (typeof Promise === 'function' && fetcher_1 instanceof Promise) {\n // that's a promise\n // eslint-disable-next-line no-promise-executor-return\n return new Promise(function (resolve) {\n return requestAnimationFrame(resolve);\n }).then(function () {\n return _this._handleLoadingState(true);\n }).then(function () {\n return fetcher_1;\n }).then(function (data) {\n return _this.setChoices(data, value, label, replaceChoices);\n }).catch(function (err) {\n if (!_this.config.silent) {\n console.error(err);\n }\n }).then(function () {\n return _this._handleLoadingState(false);\n }).then(function () {\n return _this;\n });\n } // function returned something else than promise, let's check if it's an array of choices\n\n\n if (!Array.isArray(fetcher_1)) {\n throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \".concat(typeof fetcher_1));\n } // recursion with results, it's sync and choices were cleared already\n\n\n return this.setChoices(fetcher_1, value, label, false);\n }\n\n if (!Array.isArray(choicesArrayOrFetcher)) {\n throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");\n }\n\n this.containerOuter.removeLoadingState();\n\n this._startLoading();\n\n choicesArrayOrFetcher.forEach(function (groupOrChoice) {\n if (groupOrChoice.choices) {\n _this._addGroup({\n id: groupOrChoice.id ? parseInt(\"\".concat(groupOrChoice.id), 10) : null,\n group: groupOrChoice,\n valueKey: value,\n labelKey: label\n });\n } else {\n var choice = groupOrChoice;\n\n _this._addChoice({\n value: choice[value],\n label: choice[label],\n isSelected: !!choice.selected,\n isDisabled: !!choice.disabled,\n placeholder: !!choice.placeholder,\n customProperties: choice.customProperties\n });\n }\n });\n\n this._stopLoading();\n\n return this;\n };\n\n Choices.prototype.clearChoices = function () {\n this._store.dispatch((0, choices_1.clearChoices)());\n\n return this;\n };\n\n Choices.prototype.clearStore = function () {\n this._store.dispatch((0, misc_1.clearAll)());\n\n return this;\n };\n\n Choices.prototype.clearInput = function () {\n var shouldSetInputWidth = !this._isSelectOneElement;\n this.input.clear(shouldSetInputWidth);\n\n if (!this._isTextElement && this._canSearch) {\n this._isSearching = false;\n\n this._store.dispatch((0, choices_1.activateChoices)(true));\n }\n\n return this;\n };\n\n Choices.prototype._render = function () {\n if (this._store.isLoading()) {\n return;\n }\n\n this._currentState = this._store.state;\n var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items;\n var shouldRenderChoices = this._isSelectElement;\n var shouldRenderItems = this._currentState.items !== this._prevState.items;\n\n if (!stateChanged) {\n return;\n }\n\n if (shouldRenderChoices) {\n this._renderChoices();\n }\n\n if (shouldRenderItems) {\n this._renderItems();\n }\n\n this._prevState = this._currentState;\n };\n\n Choices.prototype._renderChoices = function () {\n var _this = this;\n\n var _a = this._store,\n activeGroups = _a.activeGroups,\n activeChoices = _a.activeChoices;\n var choiceListFragment = document.createDocumentFragment();\n this.choiceList.clear();\n\n if (this.config.resetScrollPosition) {\n requestAnimationFrame(function () {\n return _this.choiceList.scrollToTop();\n });\n } // If we have grouped options\n\n\n if (activeGroups.length >= 1 && !this._isSearching) {\n // If we have a placeholder choice along with groups\n var activePlaceholders = activeChoices.filter(function (activeChoice) {\n return activeChoice.placeholder === true && activeChoice.groupId === -1;\n });\n\n if (activePlaceholders.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment);\n }\n\n choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment);\n } else if (activeChoices.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment);\n } // If we have choices to show\n\n\n if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) {\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, this.input.value); // ...and we can select them\n\n\n if (canAddItem.response) {\n // ...append them and highlight the first choice\n this.choiceList.append(choiceListFragment);\n\n this._highlightChoice();\n } else {\n var notice = this._getTemplate('notice', canAddItem.notice);\n\n this.choiceList.append(notice);\n }\n } else {\n // Otherwise show a notice\n var dropdownItem = void 0;\n var notice = void 0;\n\n if (this._isSearching) {\n notice = typeof this.config.noResultsText === 'function' ? this.config.noResultsText() : this.config.noResultsText;\n dropdownItem = this._getTemplate('notice', notice, 'no-results');\n } else {\n notice = typeof this.config.noChoicesText === 'function' ? this.config.noChoicesText() : this.config.noChoicesText;\n dropdownItem = this._getTemplate('notice', notice, 'no-choices');\n }\n\n this.choiceList.append(dropdownItem);\n }\n };\n\n Choices.prototype._renderItems = function () {\n var activeItems = this._store.activeItems || [];\n this.itemList.clear(); // Create a fragment to store our list items\n // (so we don't have to update the DOM for each item)\n\n var itemListFragment = this._createItemsFragment(activeItems); // If we have items to add, append them\n\n\n if (itemListFragment.childNodes) {\n this.itemList.append(itemListFragment);\n }\n };\n\n Choices.prototype._createGroupsFragment = function (groups, choices, fragment) {\n var _this = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n var getGroupChoices = function (group) {\n return choices.filter(function (choice) {\n if (_this._isSelectOneElement) {\n return choice.groupId === group.id;\n }\n\n return choice.groupId === group.id && (_this.config.renderSelectedChoices === 'always' || !choice.selected);\n });\n }; // If sorting is enabled, filter groups\n\n\n if (this.config.shouldSort) {\n groups.sort(this.config.sorter);\n }\n\n groups.forEach(function (group) {\n var groupChoices = getGroupChoices(group);\n\n if (groupChoices.length >= 1) {\n var dropdownGroup = _this._getTemplate('choiceGroup', group);\n\n fragment.appendChild(dropdownGroup);\n\n _this._createChoicesFragment(groupChoices, fragment, true);\n }\n });\n return fragment;\n };\n\n Choices.prototype._createChoicesFragment = function (choices, fragment, withinGroup) {\n var _this = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n if (withinGroup === void 0) {\n withinGroup = false;\n } // Create a fragment to store our list items (so we don't have to update the DOM for each item)\n\n\n var _a = this.config,\n renderSelectedChoices = _a.renderSelectedChoices,\n searchResultLimit = _a.searchResultLimit,\n renderChoiceLimit = _a.renderChoiceLimit;\n var filter = this._isSearching ? utils_1.sortByScore : this.config.sorter;\n\n var appendChoice = function (choice) {\n var shouldRender = renderSelectedChoices === 'auto' ? _this._isSelectOneElement || !choice.selected : true;\n\n if (shouldRender) {\n var dropdownItem = _this._getTemplate('choice', choice, _this.config.itemSelectText);\n\n fragment.appendChild(dropdownItem);\n }\n };\n\n var rendererableChoices = choices;\n\n if (renderSelectedChoices === 'auto' && !this._isSelectOneElement) {\n rendererableChoices = choices.filter(function (choice) {\n return !choice.selected;\n });\n } // Split array into placeholders and \"normal\" choices\n\n\n var _b = rendererableChoices.reduce(function (acc, choice) {\n if (choice.placeholder) {\n acc.placeholderChoices.push(choice);\n } else {\n acc.normalChoices.push(choice);\n }\n\n return acc;\n }, {\n placeholderChoices: [],\n normalChoices: []\n }),\n placeholderChoices = _b.placeholderChoices,\n normalChoices = _b.normalChoices; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort || this._isSearching) {\n normalChoices.sort(filter);\n }\n\n var choiceLimit = rendererableChoices.length; // Prepend placeholeder\n\n var sortedChoices = this._isSelectOneElement ? __spreadArray(__spreadArray([], placeholderChoices, true), normalChoices, true) : normalChoices;\n\n if (this._isSearching) {\n choiceLimit = searchResultLimit;\n } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) {\n choiceLimit = renderChoiceLimit;\n } // Add each choice to dropdown within range\n\n\n for (var i = 0; i < choiceLimit; i += 1) {\n if (sortedChoices[i]) {\n appendChoice(sortedChoices[i]);\n }\n }\n\n return fragment;\n };\n\n Choices.prototype._createItemsFragment = function (items, fragment) {\n var _this = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n } // Create fragment to add elements to\n\n\n var _a = this.config,\n shouldSortItems = _a.shouldSortItems,\n sorter = _a.sorter,\n removeItemButton = _a.removeItemButton; // If sorting is enabled, filter items\n\n if (shouldSortItems && !this._isSelectOneElement) {\n items.sort(sorter);\n }\n\n if (this._isTextElement) {\n // Update the value of the hidden input\n this.passedElement.value = items.map(function (_a) {\n var value = _a.value;\n return value;\n }).join(this.config.delimiter);\n } else {\n // Update the options of the hidden input\n this.passedElement.options = items;\n }\n\n var addItemToFragment = function (item) {\n // Create new list element\n var listItem = _this._getTemplate('item', item, removeItemButton); // Append it to list\n\n\n fragment.appendChild(listItem);\n }; // Add each list item to list\n\n\n items.forEach(addItemToFragment);\n return fragment;\n };\n\n Choices.prototype._triggerChange = function (value) {\n if (value === undefined || value === null) {\n return;\n }\n\n this.passedElement.triggerEvent(constants_1.EVENTS.change, {\n value: value\n });\n };\n\n Choices.prototype._selectPlaceholderChoice = function (placeholderChoice) {\n this._addItem({\n value: placeholderChoice.value,\n label: placeholderChoice.label,\n choiceId: placeholderChoice.id,\n groupId: placeholderChoice.groupId,\n placeholder: placeholderChoice.placeholder\n });\n\n this._triggerChange(placeholderChoice.value);\n };\n\n Choices.prototype._handleButtonAction = function (activeItems, element) {\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n\n var itemId = element.parentNode && element.parentNode.dataset.id;\n var itemToRemove = itemId && activeItems.find(function (item) {\n return item.id === parseInt(itemId, 10);\n });\n\n if (!itemToRemove) {\n return;\n } // Remove item associated with button\n\n\n this._removeItem(itemToRemove);\n\n this._triggerChange(itemToRemove.value);\n\n if (this._isSelectOneElement && this._store.placeholderChoice) {\n this._selectPlaceholderChoice(this._store.placeholderChoice);\n }\n };\n\n Choices.prototype._handleItemAction = function (activeItems, element, hasShiftKey) {\n var _this = this;\n\n if (hasShiftKey === void 0) {\n hasShiftKey = false;\n }\n\n if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) {\n return;\n }\n\n var passedId = element.dataset.id; // We only want to select one item with a click\n // so we deselect any items that aren't the target\n // unless shift is being pressed\n\n activeItems.forEach(function (item) {\n if (item.id === parseInt(\"\".concat(passedId), 10) && !item.highlighted) {\n _this.highlightItem(item);\n } else if (!hasShiftKey && item.highlighted) {\n _this.unhighlightItem(item);\n }\n }); // Focus input as without focus, a user cannot do anything with a\n // highlighted item\n\n this.input.focus();\n };\n\n Choices.prototype._handleChoiceAction = function (activeItems, element) {\n if (!activeItems || !element) {\n return;\n } // If we are clicking on an option\n\n\n var id = element.dataset.id;\n\n var choice = id && this._store.getChoiceById(id);\n\n if (!choice) {\n return;\n }\n\n var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : undefined;\n var hasActiveDropdown = this.dropdown.isActive; // Update choice keyCode\n\n choice.keyCode = passedKeyCode;\n this.passedElement.triggerEvent(constants_1.EVENTS.choice, {\n choice: choice\n });\n\n if (!choice.selected && !choice.disabled) {\n var canAddItem = this._canAddItem(activeItems, choice.value);\n\n if (canAddItem.response) {\n this._addItem({\n value: choice.value,\n label: choice.label,\n choiceId: choice.id,\n groupId: choice.groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder,\n keyCode: choice.keyCode\n });\n\n this._triggerChange(choice.value);\n }\n }\n\n this.clearInput(); // We want to close the dropdown if we are dealing with a single select box\n\n if (hasActiveDropdown && this._isSelectOneElement) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n Choices.prototype._handleBackspace = function (activeItems) {\n if (!this.config.removeItems || !activeItems) {\n return;\n }\n\n var lastItem = activeItems[activeItems.length - 1];\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n }); // If editing the last item is allowed and there are not other selected items,\n // we can edit the item value. Otherwise if we can remove items, remove all selected items\n\n if (this.config.editItems && !hasHighlightedItems && lastItem) {\n this.input.value = lastItem.value;\n this.input.setWidth();\n\n this._removeItem(lastItem);\n\n this._triggerChange(lastItem.value);\n } else {\n if (!hasHighlightedItems) {\n // Highlight last item if none already highlighted\n this.highlightItem(lastItem, false);\n }\n\n this.removeHighlightedItems(true);\n }\n };\n\n Choices.prototype._startLoading = function () {\n this._store.dispatch((0, misc_1.setIsLoading)(true));\n };\n\n Choices.prototype._stopLoading = function () {\n this._store.dispatch((0, misc_1.setIsLoading)(false));\n };\n\n Choices.prototype._handleLoadingState = function (setLoading) {\n if (setLoading === void 0) {\n setLoading = true;\n }\n\n var placeholderItem = this.itemList.getChild(\".\".concat(this.config.classNames.placeholder));\n\n if (setLoading) {\n this.disable();\n this.containerOuter.addLoadingState();\n\n if (this._isSelectOneElement) {\n if (!placeholderItem) {\n placeholderItem = this._getTemplate('placeholder', this.config.loadingText);\n\n if (placeholderItem) {\n this.itemList.append(placeholderItem);\n }\n } else {\n placeholderItem.innerHTML = this.config.loadingText;\n }\n } else {\n this.input.placeholder = this.config.loadingText;\n }\n } else {\n this.enable();\n this.containerOuter.removeLoadingState();\n\n if (this._isSelectOneElement) {\n if (placeholderItem) {\n placeholderItem.innerHTML = this._placeholderValue || '';\n }\n } else {\n this.input.placeholder = this._placeholderValue || '';\n }\n }\n };\n\n Choices.prototype._handleSearch = function (value) {\n if (!value || !this.input.isFocussed) {\n return;\n }\n\n var choices = this._store.choices;\n var _a = this.config,\n searchFloor = _a.searchFloor,\n searchChoices = _a.searchChoices;\n var hasUnactiveChoices = choices.some(function (option) {\n return !option.active;\n }); // Check that we have a value to search and the input was an alphanumeric character\n\n if (value && value.length >= searchFloor) {\n var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event\n\n this.passedElement.triggerEvent(constants_1.EVENTS.search, {\n value: value,\n resultCount: resultCount\n });\n } else if (hasUnactiveChoices) {\n // Otherwise reset choices to active\n this._isSearching = false;\n\n this._store.dispatch((0, choices_1.activateChoices)(true));\n }\n };\n\n Choices.prototype._canAddItem = function (activeItems, value) {\n var canAddItem = true;\n var notice = typeof this.config.addItemText === 'function' ? this.config.addItemText(value) : this.config.addItemText;\n\n if (!this._isSelectOneElement) {\n var isDuplicateValue = (0, utils_1.existsInArray)(activeItems, value);\n\n if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) {\n // If there is a max entry limit and we have reached that limit\n // don't update\n canAddItem = false;\n notice = typeof this.config.maxItemText === 'function' ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText;\n }\n\n if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) {\n canAddItem = false;\n notice = typeof this.config.uniqueItemText === 'function' ? this.config.uniqueItemText(value) : this.config.uniqueItemText;\n }\n\n if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === 'function' && !this.config.addItemFilter(value)) {\n canAddItem = false;\n notice = typeof this.config.customAddItemText === 'function' ? this.config.customAddItemText(value) : this.config.customAddItemText;\n }\n }\n\n return {\n response: canAddItem,\n notice: notice\n };\n };\n\n Choices.prototype._searchChoices = function (value) {\n var newValue = typeof value === 'string' ? value.trim() : value;\n var currentValue = typeof this._currentValue === 'string' ? this._currentValue.trim() : this._currentValue;\n\n if (newValue.length < 1 && newValue === \"\".concat(currentValue, \" \")) {\n return 0;\n } // If new value matches the desired length and is not the same as the current value with a space\n\n\n var haystack = this._store.searchableChoices;\n var needle = newValue;\n\n var keys = __spreadArray([], this.config.searchFields, true);\n\n var options = Object.assign(this.config.fuseOptions, {\n keys: keys,\n includeMatches: true\n });\n var fuse = new fuse_js_1.default(haystack, options);\n var results = fuse.search(needle); // see https://github.com/krisk/Fuse/issues/303\n\n this._currentValue = newValue;\n this._highlightPosition = 0;\n this._isSearching = true;\n\n this._store.dispatch((0, choices_1.filterChoices)(results));\n\n return results.length;\n };\n\n Choices.prototype._addEventListeners = function () {\n var documentElement = document.documentElement; // capture events - can cancel event processing or propagation\n\n documentElement.addEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.addEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.addEventListener('mousedown', this._onMouseDown, true); // passive events - doesn't call `preventDefault` or `stopPropagation`\n\n documentElement.addEventListener('click', this._onClick, {\n passive: true\n });\n documentElement.addEventListener('touchmove', this._onTouchMove, {\n passive: true\n });\n this.dropdown.element.addEventListener('mouseover', this._onMouseOver, {\n passive: true\n });\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.containerOuter.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n }\n\n this.input.element.addEventListener('keyup', this._onKeyUp, {\n passive: true\n });\n this.input.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.input.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n\n if (this.input.element.form) {\n this.input.element.form.addEventListener('reset', this._onFormReset, {\n passive: true\n });\n }\n\n this.input.addEventListeners();\n };\n\n Choices.prototype._removeEventListeners = function () {\n var documentElement = document.documentElement;\n documentElement.removeEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.removeEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.removeEventListener('mousedown', this._onMouseDown, true);\n documentElement.removeEventListener('click', this._onClick);\n documentElement.removeEventListener('touchmove', this._onTouchMove);\n this.dropdown.element.removeEventListener('mouseover', this._onMouseOver);\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.removeEventListener('focus', this._onFocus);\n this.containerOuter.element.removeEventListener('blur', this._onBlur);\n }\n\n this.input.element.removeEventListener('keyup', this._onKeyUp);\n this.input.element.removeEventListener('focus', this._onFocus);\n this.input.element.removeEventListener('blur', this._onBlur);\n\n if (this.input.element.form) {\n this.input.element.form.removeEventListener('reset', this._onFormReset);\n }\n\n this.input.removeEventListeners();\n };\n\n Choices.prototype._onKeyDown = function (event) {\n var keyCode = event.keyCode;\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren();\n var keyString = String.fromCharCode(keyCode);\n var wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString);\n var BACK_KEY = constants_1.KEY_CODES.BACK_KEY,\n DELETE_KEY = constants_1.KEY_CODES.DELETE_KEY,\n ENTER_KEY = constants_1.KEY_CODES.ENTER_KEY,\n A_KEY = constants_1.KEY_CODES.A_KEY,\n ESC_KEY = constants_1.KEY_CODES.ESC_KEY,\n UP_KEY = constants_1.KEY_CODES.UP_KEY,\n DOWN_KEY = constants_1.KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = constants_1.KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY;\n\n if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {\n this.showDropdown();\n\n if (!this.input.isFocussed) {\n /*\n We update the input value with the pressed key as\n the input was not focussed at the time of key press\n therefore does not have the value of the key.\n */\n this.input.value += keyString.toLowerCase();\n }\n }\n\n switch (keyCode) {\n case A_KEY:\n return this._onSelectKey(event, hasItems);\n\n case ENTER_KEY:\n return this._onEnterKey(event, activeItems, hasActiveDropdown);\n\n case ESC_KEY:\n return this._onEscapeKey(hasActiveDropdown);\n\n case UP_KEY:\n case PAGE_UP_KEY:\n case DOWN_KEY:\n case PAGE_DOWN_KEY:\n return this._onDirectionKey(event, hasActiveDropdown);\n\n case DELETE_KEY:\n case BACK_KEY:\n return this._onDeleteKey(event, activeItems, hasFocusedInput);\n\n default:\n }\n };\n\n Choices.prototype._onKeyUp = function (_a) {\n var target = _a.target,\n keyCode = _a.keyCode;\n var value = this.input.value;\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n var backKey = constants_1.KEY_CODES.BACK_KEY,\n deleteKey = constants_1.KEY_CODES.DELETE_KEY; // We are typing into a text input and have a value, we want to show a dropdown\n // notice. Otherwise hide the dropdown\n\n if (this._isTextElement) {\n var canShowDropdownNotice = canAddItem.notice && value;\n\n if (canShowDropdownNotice) {\n var dropdownItem = this._getTemplate('notice', canAddItem.notice);\n\n this.dropdown.element.innerHTML = dropdownItem.outerHTML;\n this.showDropdown(true);\n } else {\n this.hideDropdown(true);\n }\n } else {\n var wasRemovalKeyCode = keyCode === backKey || keyCode === deleteKey;\n var userHasRemovedValue = wasRemovalKeyCode && target && !target.value;\n var canReactivateChoices = !this._isTextElement && this._isSearching;\n var canSearch = this._canSearch && canAddItem.response;\n\n if (userHasRemovedValue && canReactivateChoices) {\n this._isSearching = false;\n\n this._store.dispatch((0, choices_1.activateChoices)(true));\n } else if (canSearch) {\n this._handleSearch(this.input.value);\n }\n }\n\n this._canSearch = this.config.searchEnabled;\n };\n\n Choices.prototype._onSelectKey = function (event, hasItems) {\n var ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If CTRL + A or CMD + A have been pressed and there are items to select\n\n if (hasCtrlDownKeyPressed && hasItems) {\n this._canSearch = false;\n var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;\n\n if (shouldHightlightAll) {\n this.highlightAll();\n }\n }\n };\n\n Choices.prototype._onEnterKey = function (event, activeItems, hasActiveDropdown) {\n var target = event.target;\n var enterKey = constants_1.KEY_CODES.ENTER_KEY;\n var targetWasButton = target && target.hasAttribute('data-button');\n\n if (this._isTextElement && target && target.value) {\n var value = this.input.value;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n if (canAddItem.response) {\n this.hideDropdown(true);\n\n this._addItem({\n value: value\n });\n\n this._triggerChange(value);\n\n this.clearInput();\n }\n }\n\n if (targetWasButton) {\n this._handleButtonAction(activeItems, target);\n\n event.preventDefault();\n }\n\n if (hasActiveDropdown) {\n var highlightedChoice = this.dropdown.getChild(\".\".concat(this.config.classNames.highlightedState));\n\n if (highlightedChoice) {\n // add enter keyCode value\n if (activeItems[0]) {\n activeItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n }\n\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n\n event.preventDefault();\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n };\n\n Choices.prototype._onEscapeKey = function (hasActiveDropdown) {\n if (hasActiveDropdown) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n Choices.prototype._onDirectionKey = function (event, hasActiveDropdown) {\n var keyCode = event.keyCode,\n metaKey = event.metaKey;\n var downKey = constants_1.KEY_CODES.DOWN_KEY,\n pageUpKey = constants_1.KEY_CODES.PAGE_UP_KEY,\n pageDownKey = constants_1.KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options\n\n if (hasActiveDropdown || this._isSelectOneElement) {\n this.showDropdown();\n this._canSearch = false;\n var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1;\n var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey;\n var selectableChoiceIdentifier = '[data-choice-selectable]';\n var nextEl = void 0;\n\n if (skipKey) {\n if (directionInt > 0) {\n nextEl = this.dropdown.element.querySelector(\"\".concat(selectableChoiceIdentifier, \":last-of-type\"));\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n } else {\n var currentEl = this.dropdown.element.querySelector(\".\".concat(this.config.classNames.highlightedState));\n\n if (currentEl) {\n nextEl = (0, utils_1.getAdjacentEl)(currentEl, selectableChoiceIdentifier, directionInt);\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n }\n\n if (nextEl) {\n // We prevent default to stop the cursor moving\n // when pressing the arrow\n if (!(0, utils_1.isScrolledIntoView)(nextEl, this.choiceList.element, directionInt)) {\n this.choiceList.scrollToChildElement(nextEl, directionInt);\n }\n\n this._highlightChoice(nextEl);\n } // Prevent default to maintain cursor position whilst\n // traversing dropdown options\n\n\n event.preventDefault();\n }\n };\n\n Choices.prototype._onDeleteKey = function (event, activeItems, hasFocusedInput) {\n var target = event.target; // If backspace or delete key is pressed and the input has no value\n\n if (!this._isSelectOneElement && !target.value && hasFocusedInput) {\n this._handleBackspace(activeItems);\n\n event.preventDefault();\n }\n };\n\n Choices.prototype._onTouchMove = function () {\n if (this._wasTap) {\n this._wasTap = false;\n }\n };\n\n Choices.prototype._onTouchEnd = function (event) {\n var target = (event || event.touches[0]).target;\n var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target);\n\n if (touchWasWithinContainer) {\n var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element;\n\n if (containerWasExactTarget) {\n if (this._isTextElement) {\n this.input.focus();\n } else if (this._isSelectMultipleElement) {\n this.showDropdown();\n }\n } // Prevents focus event firing\n\n\n event.stopPropagation();\n }\n\n this._wasTap = true;\n };\n /**\n * Handles mousedown event in capture mode for containetOuter.element\n */\n\n\n Choices.prototype._onMouseDown = function (event) {\n var target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n } // If we have our mouse down on the scrollbar and are on IE11...\n\n\n if (IS_IE11 && this.choiceList.element.contains(target)) {\n // check if click was on a scrollbar area\n var firstChoice = this.choiceList.element.firstElementChild;\n var isOnScrollbar = this._direction === 'ltr' ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft;\n this._isScrollingOnIe = isOnScrollbar;\n }\n\n if (target === this.input.element) {\n return;\n }\n\n var item = target.closest('[data-button],[data-item],[data-choice]');\n\n if (item instanceof HTMLElement) {\n var hasShiftKey = event.shiftKey;\n var activeItems = this._store.activeItems;\n var dataset = item.dataset;\n\n if ('button' in dataset) {\n this._handleButtonAction(activeItems, item);\n } else if ('item' in dataset) {\n this._handleItemAction(activeItems, item, hasShiftKey);\n } else if ('choice' in dataset) {\n this._handleChoiceAction(activeItems, item);\n }\n }\n\n event.preventDefault();\n };\n /**\n * Handles mouseover event over this.dropdown\n * @param {MouseEvent} event\n */\n\n\n Choices.prototype._onMouseOver = function (_a) {\n var target = _a.target;\n\n if (target instanceof HTMLElement && 'choice' in target.dataset) {\n this._highlightChoice(target);\n }\n };\n\n Choices.prototype._onClick = function (_a) {\n var target = _a.target;\n var clickWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (clickWasWithinContainer) {\n if (!this.dropdown.isActive && !this.containerOuter.isDisabled) {\n if (this._isTextElement) {\n if (document.activeElement !== this.input.element) {\n this.input.focus();\n }\n } else {\n this.showDropdown();\n this.containerOuter.focus();\n }\n } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) {\n this.hideDropdown();\n }\n } else {\n var hasHighlightedItems = this._store.highlightedActiveItems.length > 0;\n\n if (hasHighlightedItems) {\n this.unhighlightAll();\n }\n\n this.containerOuter.removeFocusState();\n this.hideDropdown(true);\n }\n };\n\n Choices.prototype._onFocus = function (_a) {\n var _b;\n\n var _this = this;\n\n var target = _a.target;\n var focusWasWithinContainer = target && this.containerOuter.element.contains(target);\n\n if (!focusWasWithinContainer) {\n return;\n }\n\n var focusActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.addFocusState();\n }\n }, _b[constants_1.SELECT_ONE_TYPE] = function () {\n _this.containerOuter.addFocusState();\n\n if (target === _this.input.element) {\n _this.showDropdown(true);\n }\n }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this.input.element) {\n _this.showDropdown(true); // If element is a select box, the focused element is the container and the dropdown\n // isn't already open, focus and show dropdown\n\n\n _this.containerOuter.addFocusState();\n }\n }, _b);\n focusActions[this.passedElement.element.type]();\n };\n\n Choices.prototype._onBlur = function (_a) {\n var _b;\n\n var _this = this;\n\n var target = _a.target;\n var blurWasWithinContainer = target && this.containerOuter.element.contains(target);\n\n if (blurWasWithinContainer && !this._isScrollingOnIe) {\n var activeItems = this._store.activeItems;\n var hasHighlightedItems_1 = activeItems.some(function (item) {\n return item.highlighted;\n });\n var blurActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.removeFocusState();\n\n if (hasHighlightedItems_1) {\n _this.unhighlightAll();\n }\n\n _this.hideDropdown(true);\n }\n }, _b[constants_1.SELECT_ONE_TYPE] = function () {\n _this.containerOuter.removeFocusState();\n\n if (target === _this.input.element || target === _this.containerOuter.element && !_this._canSearch) {\n _this.hideDropdown(true);\n }\n }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.removeFocusState();\n\n _this.hideDropdown(true);\n\n if (hasHighlightedItems_1) {\n _this.unhighlightAll();\n }\n }\n }, _b);\n blurActions[this.passedElement.element.type]();\n } else {\n // On IE11, clicking the scollbar blurs our input and thus\n // closes the dropdown. To stop this, we refocus our input\n // if we know we are on IE *and* are scrolling.\n this._isScrollingOnIe = false;\n this.input.element.focus();\n }\n };\n\n Choices.prototype._onFormReset = function () {\n this._store.dispatch((0, misc_1.resetTo)(this._initialState));\n };\n\n Choices.prototype._highlightChoice = function (el) {\n var _this = this;\n\n if (el === void 0) {\n el = null;\n }\n\n var choices = Array.from(this.dropdown.element.querySelectorAll('[data-choice-selectable]'));\n\n if (!choices.length) {\n return;\n }\n\n var passedEl = el;\n var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(\".\".concat(this.config.classNames.highlightedState))); // Remove any highlighted choices\n\n highlightedChoices.forEach(function (choice) {\n choice.classList.remove(_this.config.classNames.highlightedState);\n choice.setAttribute('aria-selected', 'false');\n });\n\n if (passedEl) {\n this._highlightPosition = choices.indexOf(passedEl);\n } else {\n // Highlight choice based on last known highlight location\n if (choices.length > this._highlightPosition) {\n // If we have an option to highlight\n passedEl = choices[this._highlightPosition];\n } else {\n // Otherwise highlight the option before\n passedEl = choices[choices.length - 1];\n }\n\n if (!passedEl) {\n passedEl = choices[0];\n }\n }\n\n passedEl.classList.add(this.config.classNames.highlightedState);\n passedEl.setAttribute('aria-selected', 'true');\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightChoice, {\n el: passedEl\n });\n\n if (this.dropdown.isActive) {\n // IE11 ignores aria-label and blocks virtual keyboard\n // if aria-activedescendant is set without a dropdown\n this.input.setActiveDescendant(passedEl.id);\n this.containerOuter.setActiveDescendant(passedEl.id);\n }\n };\n\n Choices.prototype._addItem = function (_a) {\n var value = _a.value,\n _b = _a.label,\n label = _b === void 0 ? null : _b,\n _c = _a.choiceId,\n choiceId = _c === void 0 ? -1 : _c,\n _d = _a.groupId,\n groupId = _d === void 0 ? -1 : _d,\n _e = _a.customProperties,\n customProperties = _e === void 0 ? {} : _e,\n _f = _a.placeholder,\n placeholder = _f === void 0 ? false : _f,\n _g = _a.keyCode,\n keyCode = _g === void 0 ? -1 : _g;\n var passedValue = typeof value === 'string' ? value.trim() : value;\n var items = this._store.items;\n var passedLabel = label || passedValue;\n var passedOptionId = choiceId || -1;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n var id = items ? items.length + 1 : 1; // If a prepended value has been passed, prepend it\n\n if (this.config.prependValue) {\n passedValue = this.config.prependValue + passedValue.toString();\n } // If an appended value has been passed, append it\n\n\n if (this.config.appendValue) {\n passedValue += this.config.appendValue.toString();\n }\n\n this._store.dispatch((0, items_1.addItem)({\n value: passedValue,\n label: passedLabel,\n id: id,\n choiceId: passedOptionId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (this._isSelectOneElement) {\n this.removeActiveItems(id);\n } // Trigger change event\n\n\n this.passedElement.triggerEvent(constants_1.EVENTS.addItem, {\n id: id,\n value: passedValue,\n label: passedLabel,\n customProperties: customProperties,\n groupValue: group && group.value ? group.value : null,\n keyCode: keyCode\n });\n };\n\n Choices.prototype._removeItem = function (item) {\n var id = item.id,\n value = item.value,\n label = item.label,\n customProperties = item.customProperties,\n choiceId = item.choiceId,\n groupId = item.groupId;\n var group = groupId && groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n if (!id || !choiceId) {\n return;\n }\n\n this._store.dispatch((0, items_1.removeItem)(id, choiceId));\n\n this.passedElement.triggerEvent(constants_1.EVENTS.removeItem, {\n id: id,\n value: value,\n label: label,\n customProperties: customProperties,\n groupValue: group && group.value ? group.value : null\n });\n };\n\n Choices.prototype._addChoice = function (_a) {\n var value = _a.value,\n _b = _a.label,\n label = _b === void 0 ? null : _b,\n _c = _a.isSelected,\n isSelected = _c === void 0 ? false : _c,\n _d = _a.isDisabled,\n isDisabled = _d === void 0 ? false : _d,\n _e = _a.groupId,\n groupId = _e === void 0 ? -1 : _e,\n _f = _a.customProperties,\n customProperties = _f === void 0 ? {} : _f,\n _g = _a.placeholder,\n placeholder = _g === void 0 ? false : _g,\n _h = _a.keyCode,\n keyCode = _h === void 0 ? -1 : _h;\n\n if (typeof value === 'undefined' || value === null) {\n return;\n } // Generate unique id\n\n\n var choices = this._store.choices;\n var choiceLabel = label || value;\n var choiceId = choices ? choices.length + 1 : 1;\n var choiceElementId = \"\".concat(this._baseId, \"-\").concat(this._idNames.itemChoice, \"-\").concat(choiceId);\n\n this._store.dispatch((0, choices_1.addChoice)({\n id: choiceId,\n groupId: groupId,\n elementId: choiceElementId,\n value: value,\n label: choiceLabel,\n disabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (isSelected) {\n this._addItem({\n value: value,\n label: choiceLabel,\n choiceId: choiceId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n });\n }\n };\n\n Choices.prototype._addGroup = function (_a) {\n var _this = this;\n\n var group = _a.group,\n id = _a.id,\n _b = _a.valueKey,\n valueKey = _b === void 0 ? 'value' : _b,\n _c = _a.labelKey,\n labelKey = _c === void 0 ? 'label' : _c;\n var groupChoices = (0, utils_1.isType)('Object', group) ? group.choices : Array.from(group.getElementsByTagName('OPTION'));\n var groupId = id || Math.floor(new Date().valueOf() * Math.random());\n var isDisabled = group.disabled ? group.disabled : false;\n\n if (groupChoices) {\n this._store.dispatch((0, groups_1.addGroup)({\n value: group.label,\n id: groupId,\n active: true,\n disabled: isDisabled\n }));\n\n var addGroupChoices = function (choice) {\n var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled;\n\n _this._addChoice({\n value: choice[valueKey],\n label: (0, utils_1.isType)('Object', choice) ? choice[labelKey] : choice.innerHTML,\n isSelected: choice.selected,\n isDisabled: isOptDisabled,\n groupId: groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder\n });\n };\n\n groupChoices.forEach(addGroupChoices);\n } else {\n this._store.dispatch((0, groups_1.addGroup)({\n value: group.label,\n id: group.id,\n active: false,\n disabled: group.disabled\n }));\n }\n };\n\n Choices.prototype._getTemplate = function (template) {\n var _a;\n\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var classNames = this.config.classNames;\n return (_a = this._templates[template]).call.apply(_a, __spreadArray([this, classNames], args, false));\n };\n\n Choices.prototype._createTemplates = function () {\n var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates;\n var userTemplates = {};\n\n if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === 'function') {\n userTemplates = callbackOnCreateTemplates.call(this, utils_1.strToEl);\n }\n\n this._templates = (0, deepmerge_1.default)(templates_1.default, userTemplates);\n };\n\n Choices.prototype._createElements = function () {\n this.containerOuter = new components_1.Container({\n element: this._getTemplate('containerOuter', this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.containerInner = new components_1.Container({\n element: this._getTemplate('containerInner'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.input = new components_1.Input({\n element: this._getTemplate('input', this._placeholderValue),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n preventPaste: !this.config.paste\n });\n this.choiceList = new components_1.List({\n element: this._getTemplate('choiceList', this._isSelectOneElement)\n });\n this.itemList = new components_1.List({\n element: this._getTemplate('itemList', this._isSelectOneElement)\n });\n this.dropdown = new components_1.Dropdown({\n element: this._getTemplate('dropdown'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type\n });\n };\n\n Choices.prototype._createStructure = function () {\n // Hide original element\n this.passedElement.conceal(); // Wrap input in container preserving DOM ordering\n\n this.containerInner.wrap(this.passedElement.element); // Wrapper inner container with outer container\n\n this.containerOuter.wrap(this.containerInner.element);\n\n if (this._isSelectOneElement) {\n this.input.placeholder = this.config.searchPlaceholderValue || '';\n } else if (this._placeholderValue) {\n this.input.placeholder = this._placeholderValue;\n this.input.setWidth();\n }\n\n this.containerOuter.element.appendChild(this.containerInner.element);\n this.containerOuter.element.appendChild(this.dropdown.element);\n this.containerInner.element.appendChild(this.itemList.element);\n\n if (!this._isTextElement) {\n this.dropdown.element.appendChild(this.choiceList.element);\n }\n\n if (!this._isSelectOneElement) {\n this.containerInner.element.appendChild(this.input.element);\n } else if (this.config.searchEnabled) {\n this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild);\n }\n\n if (this._isSelectElement) {\n this._highlightPosition = 0;\n this._isSearching = false;\n\n this._startLoading();\n\n if (this._presetGroups.length) {\n this._addPredefinedGroups(this._presetGroups);\n } else {\n this._addPredefinedChoices(this._presetChoices);\n }\n\n this._stopLoading();\n }\n\n if (this._isTextElement) {\n this._addPredefinedItems(this._presetItems);\n }\n };\n\n Choices.prototype._addPredefinedGroups = function (groups) {\n var _this = this; // If we have a placeholder option\n\n\n var placeholderChoice = this.passedElement.placeholderOption;\n\n if (placeholderChoice && placeholderChoice.parentNode && placeholderChoice.parentNode.tagName === 'SELECT') {\n this._addChoice({\n value: placeholderChoice.value,\n label: placeholderChoice.innerHTML,\n isSelected: placeholderChoice.selected,\n isDisabled: placeholderChoice.disabled,\n placeholder: true\n });\n }\n\n groups.forEach(function (group) {\n return _this._addGroup({\n group: group,\n id: group.id || null\n });\n });\n };\n\n Choices.prototype._addPredefinedChoices = function (choices) {\n var _this = this; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort) {\n choices.sort(this.config.sorter);\n }\n\n var hasSelectedChoice = choices.some(function (choice) {\n return choice.selected;\n });\n var firstEnabledChoiceIndex = choices.findIndex(function (choice) {\n return choice.disabled === undefined || !choice.disabled;\n });\n choices.forEach(function (choice, index) {\n var _a = choice.value,\n value = _a === void 0 ? '' : _a,\n label = choice.label,\n customProperties = choice.customProperties,\n placeholder = choice.placeholder;\n\n if (_this._isSelectElement) {\n // If the choice is actually a group\n if (choice.choices) {\n _this._addGroup({\n group: choice,\n id: choice.id || null\n });\n } else {\n /**\n * If there is a selected choice already or the choice is not the first in\n * the array, add each choice normally.\n *\n * Otherwise we pre-select the first enabled choice in the array (\"select-one\" only)\n */\n var shouldPreselect = _this._isSelectOneElement && !hasSelectedChoice && index === firstEnabledChoiceIndex;\n var isSelected = shouldPreselect ? true : choice.selected;\n var isDisabled = choice.disabled;\n\n _this._addChoice({\n value: value,\n label: label,\n isSelected: !!isSelected,\n isDisabled: !!isDisabled,\n placeholder: !!placeholder,\n customProperties: customProperties\n });\n }\n } else {\n _this._addChoice({\n value: value,\n label: label,\n isSelected: !!choice.selected,\n isDisabled: !!choice.disabled,\n placeholder: !!choice.placeholder,\n customProperties: customProperties\n });\n }\n });\n };\n\n Choices.prototype._addPredefinedItems = function (items) {\n var _this = this;\n\n items.forEach(function (item) {\n if (typeof item === 'object' && item.value) {\n _this._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n\n if (typeof item === 'string') {\n _this._addItem({\n value: item\n });\n }\n });\n };\n\n Choices.prototype._setChoiceOrItem = function (item) {\n var _this = this;\n\n var itemType = (0, utils_1.getType)(item).toLowerCase();\n var handleType = {\n object: function () {\n if (!item.value) {\n return;\n } // If we are dealing with a select input, we need to create an option first\n // that is then selected. For text inputs we can just add items normally.\n\n\n if (!_this._isTextElement) {\n _this._addChoice({\n value: item.value,\n label: item.label,\n isSelected: true,\n isDisabled: false,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n } else {\n _this._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n },\n string: function () {\n if (!_this._isTextElement) {\n _this._addChoice({\n value: item,\n label: item,\n isSelected: true,\n isDisabled: false\n });\n } else {\n _this._addItem({\n value: item\n });\n }\n }\n };\n handleType[itemType]();\n };\n\n Choices.prototype._findAndSelectChoiceByValue = function (value) {\n var _this = this;\n\n var choices = this._store.choices; // Check 'value' property exists and the choice isn't already selected\n\n var foundChoice = choices.find(function (choice) {\n return _this.config.valueComparer(choice.value, value);\n });\n\n if (foundChoice && !foundChoice.selected) {\n this._addItem({\n value: foundChoice.value,\n label: foundChoice.label,\n choiceId: foundChoice.id,\n groupId: foundChoice.groupId,\n customProperties: foundChoice.customProperties,\n placeholder: foundChoice.placeholder,\n keyCode: foundChoice.keyCode\n });\n }\n };\n\n Choices.prototype._generatePlaceholderValue = function () {\n if (this._isSelectElement && this.passedElement.placeholderOption) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : null;\n }\n\n var _a = this.config,\n placeholder = _a.placeholder,\n placeholderValue = _a.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n\n return null;\n };\n\n return Choices;\n}();\n\nexports[\"default\"] = Choices;\n\n/***/ }),\n\n/***/ 613:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar utils_1 = __webpack_require__(799);\n\nvar constants_1 = __webpack_require__(883);\n\nvar Container =\n/** @class */\nfunction () {\n function Container(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames,\n position = _a.position;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.position = position;\n this.isOpen = false;\n this.isFlipped = false;\n this.isFocussed = false;\n this.isDisabled = false;\n this.isLoading = false;\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n Container.prototype.addEventListeners = function () {\n this.element.addEventListener('focus', this._onFocus);\n this.element.addEventListener('blur', this._onBlur);\n };\n\n Container.prototype.removeEventListeners = function () {\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n };\n /**\n * Determine whether container should be flipped based on passed\n * dropdown position\n */\n\n\n Container.prototype.shouldFlip = function (dropdownPos) {\n if (typeof dropdownPos !== 'number') {\n return false;\n } // If flip is enabled and the dropdown bottom position is\n // greater than the window height flip the dropdown.\n\n\n var shouldFlip = false;\n\n if (this.position === 'auto') {\n shouldFlip = !window.matchMedia(\"(min-height: \".concat(dropdownPos + 1, \"px)\")).matches;\n } else if (this.position === 'top') {\n shouldFlip = true;\n }\n\n return shouldFlip;\n };\n\n Container.prototype.setActiveDescendant = function (activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n Container.prototype.removeActiveDescendant = function () {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n Container.prototype.open = function (dropdownPos) {\n this.element.classList.add(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isOpen = true;\n\n if (this.shouldFlip(dropdownPos)) {\n this.element.classList.add(this.classNames.flippedState);\n this.isFlipped = true;\n }\n };\n\n Container.prototype.close = function () {\n this.element.classList.remove(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'false');\n this.removeActiveDescendant();\n this.isOpen = false; // A dropdown flips if it does not have space within the page\n\n if (this.isFlipped) {\n this.element.classList.remove(this.classNames.flippedState);\n this.isFlipped = false;\n }\n };\n\n Container.prototype.focus = function () {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n Container.prototype.addFocusState = function () {\n this.element.classList.add(this.classNames.focusState);\n };\n\n Container.prototype.removeFocusState = function () {\n this.element.classList.remove(this.classNames.focusState);\n };\n\n Container.prototype.enable = function () {\n this.element.classList.remove(this.classNames.disabledState);\n this.element.removeAttribute('aria-disabled');\n\n if (this.type === constants_1.SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '0');\n }\n\n this.isDisabled = false;\n };\n\n Container.prototype.disable = function () {\n this.element.classList.add(this.classNames.disabledState);\n this.element.setAttribute('aria-disabled', 'true');\n\n if (this.type === constants_1.SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '-1');\n }\n\n this.isDisabled = true;\n };\n\n Container.prototype.wrap = function (element) {\n (0, utils_1.wrap)(element, this.element);\n };\n\n Container.prototype.unwrap = function (element) {\n if (this.element.parentNode) {\n // Move passed element outside this element\n this.element.parentNode.insertBefore(element, this.element); // Remove this element\n\n this.element.parentNode.removeChild(this.element);\n }\n };\n\n Container.prototype.addLoadingState = function () {\n this.element.classList.add(this.classNames.loadingState);\n this.element.setAttribute('aria-busy', 'true');\n this.isLoading = true;\n };\n\n Container.prototype.removeLoadingState = function () {\n this.element.classList.remove(this.classNames.loadingState);\n this.element.removeAttribute('aria-busy');\n this.isLoading = false;\n };\n\n Container.prototype._onFocus = function () {\n this.isFocussed = true;\n };\n\n Container.prototype._onBlur = function () {\n this.isFocussed = false;\n };\n\n return Container;\n}();\n\nexports[\"default\"] = Container;\n\n/***/ }),\n\n/***/ 217:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar Dropdown =\n/** @class */\nfunction () {\n function Dropdown(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.isActive = false;\n }\n\n Object.defineProperty(Dropdown.prototype, \"distanceFromTopWindow\", {\n /**\n * Bottom position of dropdown in viewport coordinates\n */\n get: function () {\n return this.element.getBoundingClientRect().bottom;\n },\n enumerable: false,\n configurable: true\n });\n\n Dropdown.prototype.getChild = function (selector) {\n return this.element.querySelector(selector);\n };\n /**\n * Show dropdown to user by adding active state class\n */\n\n\n Dropdown.prototype.show = function () {\n this.element.classList.add(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isActive = true;\n return this;\n };\n /**\n * Hide dropdown from user\n */\n\n\n Dropdown.prototype.hide = function () {\n this.element.classList.remove(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'false');\n this.isActive = false;\n return this;\n };\n\n return Dropdown;\n}();\n\nexports[\"default\"] = Dropdown;\n\n/***/ }),\n\n/***/ 520:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.WrappedSelect = exports.WrappedInput = exports.List = exports.Input = exports.Container = exports.Dropdown = void 0;\n\nvar dropdown_1 = __importDefault(__webpack_require__(217));\n\nexports.Dropdown = dropdown_1.default;\n\nvar container_1 = __importDefault(__webpack_require__(613));\n\nexports.Container = container_1.default;\n\nvar input_1 = __importDefault(__webpack_require__(11));\n\nexports.Input = input_1.default;\n\nvar list_1 = __importDefault(__webpack_require__(624));\n\nexports.List = list_1.default;\n\nvar wrapped_input_1 = __importDefault(__webpack_require__(541));\n\nexports.WrappedInput = wrapped_input_1.default;\n\nvar wrapped_select_1 = __importDefault(__webpack_require__(982));\n\nexports.WrappedSelect = wrapped_select_1.default;\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar utils_1 = __webpack_require__(799);\n\nvar constants_1 = __webpack_require__(883);\n\nvar Input =\n/** @class */\nfunction () {\n function Input(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames,\n preventPaste = _a.preventPaste;\n this.element = element;\n this.type = type;\n this.classNames = classNames;\n this.preventPaste = preventPaste;\n this.isFocussed = this.element.isEqualNode(document.activeElement);\n this.isDisabled = element.disabled;\n this._onPaste = this._onPaste.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n Object.defineProperty(Input.prototype, \"placeholder\", {\n set: function (placeholder) {\n this.element.placeholder = placeholder;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"value\", {\n get: function () {\n return (0, utils_1.sanitise)(this.element.value);\n },\n set: function (value) {\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n\n Input.prototype.addEventListeners = function () {\n this.element.addEventListener('paste', this._onPaste);\n this.element.addEventListener('input', this._onInput, {\n passive: true\n });\n this.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n Input.prototype.removeEventListeners = function () {\n this.element.removeEventListener('input', this._onInput);\n this.element.removeEventListener('paste', this._onPaste);\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n };\n\n Input.prototype.enable = function () {\n this.element.removeAttribute('disabled');\n this.isDisabled = false;\n };\n\n Input.prototype.disable = function () {\n this.element.setAttribute('disabled', '');\n this.isDisabled = true;\n };\n\n Input.prototype.focus = function () {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n Input.prototype.blur = function () {\n if (this.isFocussed) {\n this.element.blur();\n }\n };\n\n Input.prototype.clear = function (setWidth) {\n if (setWidth === void 0) {\n setWidth = true;\n }\n\n if (this.element.value) {\n this.element.value = '';\n }\n\n if (setWidth) {\n this.setWidth();\n }\n\n return this;\n };\n /**\n * Set the correct input width based on placeholder\n * value or input value\n */\n\n\n Input.prototype.setWidth = function () {\n // Resize input to contents or placeholder\n var _a = this.element,\n style = _a.style,\n value = _a.value,\n placeholder = _a.placeholder;\n style.minWidth = \"\".concat(placeholder.length + 1, \"ch\");\n style.width = \"\".concat(value.length + 1, \"ch\");\n };\n\n Input.prototype.setActiveDescendant = function (activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n Input.prototype.removeActiveDescendant = function () {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n Input.prototype._onInput = function () {\n if (this.type !== constants_1.SELECT_ONE_TYPE) {\n this.setWidth();\n }\n };\n\n Input.prototype._onPaste = function (event) {\n if (this.preventPaste) {\n event.preventDefault();\n }\n };\n\n Input.prototype._onFocus = function () {\n this.isFocussed = true;\n };\n\n Input.prototype._onBlur = function () {\n this.isFocussed = false;\n };\n\n return Input;\n}();\n\nexports[\"default\"] = Input;\n\n/***/ }),\n\n/***/ 624:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar constants_1 = __webpack_require__(883);\n\nvar List =\n/** @class */\nfunction () {\n function List(_a) {\n var element = _a.element;\n this.element = element;\n this.scrollPos = this.element.scrollTop;\n this.height = this.element.offsetHeight;\n }\n\n List.prototype.clear = function () {\n this.element.innerHTML = '';\n };\n\n List.prototype.append = function (node) {\n this.element.appendChild(node);\n };\n\n List.prototype.getChild = function (selector) {\n return this.element.querySelector(selector);\n };\n\n List.prototype.hasChildren = function () {\n return this.element.hasChildNodes();\n };\n\n List.prototype.scrollToTop = function () {\n this.element.scrollTop = 0;\n };\n\n List.prototype.scrollToChildElement = function (element, direction) {\n var _this = this;\n\n if (!element) {\n return;\n }\n\n var listHeight = this.element.offsetHeight; // Scroll position of dropdown\n\n var listScrollPosition = this.element.scrollTop + listHeight;\n var elementHeight = element.offsetHeight; // Distance from bottom of element to top of parent\n\n var elementPos = element.offsetTop + elementHeight; // Difference between the element and scroll position\n\n var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop;\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n };\n\n List.prototype._scrollDown = function (scrollPos, strength, destination) {\n var easing = (destination - scrollPos) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos + distance;\n };\n\n List.prototype._scrollUp = function (scrollPos, strength, destination) {\n var easing = (scrollPos - destination) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos - distance;\n };\n\n List.prototype._animateScroll = function (destination, direction) {\n var _this = this;\n\n var strength = constants_1.SCROLLING_SPEED;\n var choiceListScrollTop = this.element.scrollTop;\n var continueAnimation = false;\n\n if (direction > 0) {\n this._scrollDown(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop < destination) {\n continueAnimation = true;\n }\n } else {\n this._scrollUp(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop > destination) {\n continueAnimation = true;\n }\n }\n\n if (continueAnimation) {\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n }\n };\n\n return List;\n}();\n\nexports[\"default\"] = List;\n\n/***/ }),\n\n/***/ 730:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar utils_1 = __webpack_require__(799);\n\nvar WrappedElement =\n/** @class */\nfunction () {\n function WrappedElement(_a) {\n var element = _a.element,\n classNames = _a.classNames;\n this.element = element;\n this.classNames = classNames;\n\n if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) {\n throw new TypeError('Invalid element passed');\n }\n\n this.isDisabled = false;\n }\n\n Object.defineProperty(WrappedElement.prototype, \"isActive\", {\n get: function () {\n return this.element.dataset.choice === 'active';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedElement.prototype, \"dir\", {\n get: function () {\n return this.element.dir;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedElement.prototype, \"value\", {\n get: function () {\n return this.element.value;\n },\n set: function (value) {\n // you must define setter here otherwise it will be readonly property\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n\n WrappedElement.prototype.conceal = function () {\n // Hide passed input\n this.element.classList.add(this.classNames.input);\n this.element.hidden = true; // Remove element from tab index\n\n this.element.tabIndex = -1; // Backup original styles if any\n\n var origStyle = this.element.getAttribute('style');\n\n if (origStyle) {\n this.element.setAttribute('data-choice-orig-style', origStyle);\n }\n\n this.element.setAttribute('data-choice', 'active');\n };\n\n WrappedElement.prototype.reveal = function () {\n // Reinstate passed element\n this.element.classList.remove(this.classNames.input);\n this.element.hidden = false;\n this.element.removeAttribute('tabindex'); // Recover original styles if any\n\n var origStyle = this.element.getAttribute('data-choice-orig-style');\n\n if (origStyle) {\n this.element.removeAttribute('data-choice-orig-style');\n this.element.setAttribute('style', origStyle);\n } else {\n this.element.removeAttribute('style');\n }\n\n this.element.removeAttribute('data-choice'); // Re-assign values - this is weird, I know\n // @todo Figure out why we need to do this\n\n this.element.value = this.element.value; // eslint-disable-line no-self-assign\n };\n\n WrappedElement.prototype.enable = function () {\n this.element.removeAttribute('disabled');\n this.element.disabled = false;\n this.isDisabled = false;\n };\n\n WrappedElement.prototype.disable = function () {\n this.element.setAttribute('disabled', '');\n this.element.disabled = true;\n this.isDisabled = true;\n };\n\n WrappedElement.prototype.triggerEvent = function (eventType, data) {\n (0, utils_1.dispatchEvent)(this.element, eventType, data);\n };\n\n return WrappedElement;\n}();\n\nexports[\"default\"] = WrappedElement;\n\n/***/ }),\n\n/***/ 541:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar wrapped_element_1 = __importDefault(__webpack_require__(730));\n\nvar WrappedInput =\n/** @class */\nfunction (_super) {\n __extends(WrappedInput, _super);\n\n function WrappedInput(_a) {\n var element = _a.element,\n classNames = _a.classNames,\n delimiter = _a.delimiter;\n\n var _this = _super.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n\n _this.delimiter = delimiter;\n return _this;\n }\n\n Object.defineProperty(WrappedInput.prototype, \"value\", {\n get: function () {\n return this.element.value;\n },\n set: function (value) {\n this.element.setAttribute('value', value);\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n return WrappedInput;\n}(wrapped_element_1.default);\n\nexports[\"default\"] = WrappedInput;\n\n/***/ }),\n\n/***/ 982:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar wrapped_element_1 = __importDefault(__webpack_require__(730));\n\nvar WrappedSelect =\n/** @class */\nfunction (_super) {\n __extends(WrappedSelect, _super);\n\n function WrappedSelect(_a) {\n var element = _a.element,\n classNames = _a.classNames,\n template = _a.template;\n\n var _this = _super.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n\n _this.template = template;\n return _this;\n }\n\n Object.defineProperty(WrappedSelect.prototype, \"placeholderOption\", {\n get: function () {\n return this.element.querySelector('option[value=\"\"]') || // Backward compatibility layer for the non-standard placeholder attribute supported in older versions.\n this.element.querySelector('option[placeholder]');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedSelect.prototype, \"optionGroups\", {\n get: function () {\n return Array.from(this.element.getElementsByTagName('OPTGROUP'));\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedSelect.prototype, \"options\", {\n get: function () {\n return Array.from(this.element.options);\n },\n set: function (options) {\n var _this = this;\n\n var fragment = document.createDocumentFragment();\n\n var addOptionToFragment = function (data) {\n // Create a standard select option\n var option = _this.template(data); // Append it to fragment\n\n\n fragment.appendChild(option);\n }; // Add each list item to list\n\n\n options.forEach(function (optionData) {\n return addOptionToFragment(optionData);\n });\n this.appendDocFragment(fragment);\n },\n enumerable: false,\n configurable: true\n });\n\n WrappedSelect.prototype.appendDocFragment = function (fragment) {\n this.element.innerHTML = '';\n this.element.appendChild(fragment);\n };\n\n return WrappedSelect;\n}(wrapped_element_1.default);\n\nexports[\"default\"] = WrappedSelect;\n\n/***/ }),\n\n/***/ 883:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.SCROLLING_SPEED = exports.SELECT_MULTIPLE_TYPE = exports.SELECT_ONE_TYPE = exports.TEXT_TYPE = exports.KEY_CODES = exports.ACTION_TYPES = exports.EVENTS = void 0;\nexports.EVENTS = {\n showDropdown: 'showDropdown',\n hideDropdown: 'hideDropdown',\n change: 'change',\n choice: 'choice',\n search: 'search',\n addItem: 'addItem',\n removeItem: 'removeItem',\n highlightItem: 'highlightItem',\n highlightChoice: 'highlightChoice',\n unhighlightItem: 'unhighlightItem'\n};\nexports.ACTION_TYPES = {\n ADD_CHOICE: 'ADD_CHOICE',\n FILTER_CHOICES: 'FILTER_CHOICES',\n ACTIVATE_CHOICES: 'ACTIVATE_CHOICES',\n CLEAR_CHOICES: 'CLEAR_CHOICES',\n ADD_GROUP: 'ADD_GROUP',\n ADD_ITEM: 'ADD_ITEM',\n REMOVE_ITEM: 'REMOVE_ITEM',\n HIGHLIGHT_ITEM: 'HIGHLIGHT_ITEM',\n CLEAR_ALL: 'CLEAR_ALL',\n RESET_TO: 'RESET_TO',\n SET_IS_LOADING: 'SET_IS_LOADING'\n};\nexports.KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nexports.TEXT_TYPE = 'text';\nexports.SELECT_ONE_TYPE = 'select-one';\nexports.SELECT_MULTIPLE_TYPE = 'select-multiple';\nexports.SCROLLING_SPEED = 4;\n\n/***/ }),\n\n/***/ 789:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.DEFAULT_CONFIG = exports.DEFAULT_CLASSNAMES = void 0;\n\nvar utils_1 = __webpack_require__(799);\n\nexports.DEFAULT_CLASSNAMES = {\n containerOuter: 'choices',\n containerInner: 'choices__inner',\n input: 'choices__input',\n inputCloned: 'choices__input--cloned',\n list: 'choices__list',\n listItems: 'choices__list--multiple',\n listSingle: 'choices__list--single',\n listDropdown: 'choices__list--dropdown',\n item: 'choices__item',\n itemSelectable: 'choices__item--selectable',\n itemDisabled: 'choices__item--disabled',\n itemChoice: 'choices__item--choice',\n placeholder: 'choices__placeholder',\n group: 'choices__group',\n groupHeading: 'choices__heading',\n button: 'choices__button',\n activeState: 'is-active',\n focusState: 'is-focused',\n openState: 'is-open',\n disabledState: 'is-disabled',\n highlightedState: 'is-highlighted',\n selectedState: 'is-selected',\n flippedState: 'is-flipped',\n loadingState: 'is-loading',\n noResults: 'has-no-results',\n noChoices: 'has-no-choices'\n};\nexports.DEFAULT_CONFIG = {\n items: [],\n choices: [],\n silent: false,\n renderChoiceLimit: -1,\n maxItemCount: -1,\n addItems: true,\n addItemFilter: null,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n duplicateItemsAllowed: true,\n delimiter: ',',\n paste: true,\n searchEnabled: true,\n searchChoices: true,\n searchFloor: 1,\n searchResultLimit: 4,\n searchFields: ['label', 'value'],\n position: 'auto',\n resetScrollPosition: true,\n shouldSort: true,\n shouldSortItems: false,\n sorter: utils_1.sortByAlpha,\n placeholder: true,\n placeholderValue: null,\n searchPlaceholderValue: null,\n prependValue: null,\n appendValue: null,\n renderSelectedChoices: 'auto',\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n uniqueItemText: 'Only unique values can be added',\n customAddItemText: 'Only values matching specific conditions can be added',\n addItemText: function (value) {\n return \"Press Enter to add \\\"\".concat((0, utils_1.sanitise)(value), \"\\\"\");\n },\n maxItemText: function (maxItemCount) {\n return \"Only \".concat(maxItemCount, \" values can be added\");\n },\n valueComparer: function (value1, value2) {\n return value1 === value2;\n },\n fuseOptions: {\n includeScore: true\n },\n callbackOnInit: null,\n callbackOnCreateTemplates: null,\n classNames: exports.DEFAULT_CLASSNAMES\n};\n\n/***/ }),\n\n/***/ 799:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.diff = exports.cloneObject = exports.existsInArray = exports.dispatchEvent = exports.sortByScore = exports.sortByAlpha = exports.strToEl = exports.sanitise = exports.isScrolledIntoView = exports.getAdjacentEl = exports.wrap = exports.isType = exports.getType = exports.generateId = exports.generateChars = exports.getRandomNumber = void 0;\n\nvar getRandomNumber = function (min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n};\n\nexports.getRandomNumber = getRandomNumber;\n\nvar generateChars = function (length) {\n return Array.from({\n length: length\n }, function () {\n return (0, exports.getRandomNumber)(0, 36).toString(36);\n }).join('');\n};\n\nexports.generateChars = generateChars;\n\nvar generateId = function (element, prefix) {\n var id = element.id || element.name && \"\".concat(element.name, \"-\").concat((0, exports.generateChars)(2)) || (0, exports.generateChars)(4);\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = \"\".concat(prefix, \"-\").concat(id);\n return id;\n};\n\nexports.generateId = generateId;\n\nvar getType = function (obj) {\n return Object.prototype.toString.call(obj).slice(8, -1);\n};\n\nexports.getType = getType;\n\nvar isType = function (type, obj) {\n return obj !== undefined && obj !== null && (0, exports.getType)(obj) === type;\n};\n\nexports.isType = isType;\n\nvar wrap = function (element, wrapper) {\n if (wrapper === void 0) {\n wrapper = document.createElement('div');\n }\n\n if (element.parentNode) {\n if (element.nextSibling) {\n element.parentNode.insertBefore(wrapper, element.nextSibling);\n } else {\n element.parentNode.appendChild(wrapper);\n }\n }\n\n return wrapper.appendChild(element);\n};\n\nexports.wrap = wrap;\n\nvar getAdjacentEl = function (startEl, selector, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n var prop = \"\".concat(direction > 0 ? 'next' : 'previous', \"ElementSibling\");\n var sibling = startEl[prop];\n\n while (sibling) {\n if (sibling.matches(selector)) {\n return sibling;\n }\n\n sibling = sibling[prop];\n }\n\n return sibling;\n};\n\nexports.getAdjacentEl = getAdjacentEl;\n\nvar isScrolledIntoView = function (element, parent, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!element) {\n return false;\n }\n\n var isVisible;\n\n if (direction > 0) {\n // In view from bottom\n isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight;\n } else {\n // In view from top\n isVisible = element.offsetTop >= parent.scrollTop;\n }\n\n return isVisible;\n};\n\nexports.isScrolledIntoView = isScrolledIntoView;\n\nvar sanitise = function (value) {\n if (typeof value !== 'string') {\n return value;\n }\n\n return value.replace(/&/g, '&').replace(/>/g, '&rt;').replace(/ -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(\"\".concat(addItemAction_1.choiceId), 10)) {\n choice.selected = true;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'REMOVE_ITEM':\n {\n var removeItemAction_1 = action; // When an item is removed and it has an associated choice,\n // we want to re-enable it so it can be chosen again\n\n if (removeItemAction_1.choiceId && removeItemAction_1.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(\"\".concat(removeItemAction_1.choiceId), 10)) {\n choice.selected = false;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'FILTER_CHOICES':\n {\n var filterChoicesAction_1 = action;\n return state.map(function (obj) {\n var choice = obj; // Set active state based on whether choice is\n // within filtered results\n\n choice.active = filterChoicesAction_1.results.some(function (_a) {\n var item = _a.item,\n score = _a.score;\n\n if (item.id === choice.id) {\n choice.score = score;\n return true;\n }\n\n return false;\n });\n return choice;\n });\n }\n\n case 'ACTIVATE_CHOICES':\n {\n var activateChoicesAction_1 = action;\n return state.map(function (obj) {\n var choice = obj;\n choice.active = activateChoicesAction_1.active;\n return choice;\n });\n }\n\n case 'CLEAR_CHOICES':\n {\n return exports.defaultState;\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nexports[\"default\"] = choices;\n\n/***/ }),\n\n/***/ 871:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = [];\n\nfunction groups(state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n\n if (action === void 0) {\n action = {};\n }\n\n switch (action.type) {\n case 'ADD_GROUP':\n {\n var addGroupAction = action;\n return __spreadArray(__spreadArray([], state, true), [{\n id: addGroupAction.id,\n value: addGroupAction.value,\n active: addGroupAction.active,\n disabled: addGroupAction.disabled\n }], false);\n }\n\n case 'CLEAR_CHOICES':\n {\n return [];\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nexports[\"default\"] = groups;\n\n/***/ }),\n\n/***/ 655:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\n\nvar redux_1 = __webpack_require__(857);\n\nvar items_1 = __importDefault(__webpack_require__(52));\n\nvar groups_1 = __importDefault(__webpack_require__(871));\n\nvar choices_1 = __importDefault(__webpack_require__(273));\n\nvar loading_1 = __importDefault(__webpack_require__(502));\n\nvar utils_1 = __webpack_require__(799);\n\nexports.defaultState = {\n groups: [],\n items: [],\n choices: [],\n loading: false\n};\nvar appReducer = (0, redux_1.combineReducers)({\n items: items_1.default,\n groups: groups_1.default,\n choices: choices_1.default,\n loading: loading_1.default\n});\n\nvar rootReducer = function (passedState, action) {\n var state = passedState; // If we are clearing all items, groups and options we reassign\n // state and then pass that state to our proper reducer. This isn't\n // mutating our actual state\n // See: http://stackoverflow.com/a/35641992\n\n if (action.type === 'CLEAR_ALL') {\n state = exports.defaultState;\n } else if (action.type === 'RESET_TO') {\n return (0, utils_1.cloneObject)(action.state);\n }\n\n return appReducer(state, action);\n};\n\nexports[\"default\"] = rootReducer;\n\n/***/ }),\n\n/***/ 52:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = [];\n\nfunction items(state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n\n if (action === void 0) {\n action = {};\n }\n\n switch (action.type) {\n case 'ADD_ITEM':\n {\n var addItemAction = action; // Add object to items array\n\n var newState = __spreadArray(__spreadArray([], state, true), [{\n id: addItemAction.id,\n choiceId: addItemAction.choiceId,\n groupId: addItemAction.groupId,\n value: addItemAction.value,\n label: addItemAction.label,\n active: true,\n highlighted: false,\n customProperties: addItemAction.customProperties,\n placeholder: addItemAction.placeholder || false,\n keyCode: null\n }], false);\n\n return newState.map(function (obj) {\n var item = obj;\n item.highlighted = false;\n return item;\n });\n }\n\n case 'REMOVE_ITEM':\n {\n // Set item to inactive\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.active = false;\n }\n\n return item;\n });\n }\n\n case 'HIGHLIGHT_ITEM':\n {\n var highlightItemAction_1 = action;\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === highlightItemAction_1.id) {\n item.highlighted = highlightItemAction_1.highlighted;\n }\n\n return item;\n });\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nexports[\"default\"] = items;\n\n/***/ }),\n\n/***/ 502:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = false;\n\nvar general = function (state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n\n if (action === void 0) {\n action = {};\n }\n\n switch (action.type) {\n case 'SET_IS_LOADING':\n {\n return action.isLoading;\n }\n\n default:\n {\n return state;\n }\n }\n};\n\nexports[\"default\"] = general;\n\n/***/ }),\n\n/***/ 744:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nvar redux_1 = __webpack_require__(857);\n\nvar index_1 = __importDefault(__webpack_require__(655));\n\nvar Store =\n/** @class */\nfunction () {\n function Store() {\n this._store = (0, redux_1.createStore)(index_1.default, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());\n }\n /**\n * Subscribe store to function call (wrapped Redux method)\n */\n\n\n Store.prototype.subscribe = function (onChange) {\n this._store.subscribe(onChange);\n };\n /**\n * Dispatch event to store (wrapped Redux method)\n */\n\n\n Store.prototype.dispatch = function (action) {\n this._store.dispatch(action);\n };\n\n Object.defineProperty(Store.prototype, \"state\", {\n /**\n * Get store object (wrapping Redux method)\n */\n get: function () {\n return this._store.getState();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"items\", {\n /**\n * Get items from store\n */\n get: function () {\n return this.state.items;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeItems\", {\n /**\n * Get active items from store\n */\n get: function () {\n return this.items.filter(function (item) {\n return item.active === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"highlightedActiveItems\", {\n /**\n * Get highlighted items from store\n */\n get: function () {\n return this.items.filter(function (item) {\n return item.active && item.highlighted;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"choices\", {\n /**\n * Get choices from store\n */\n get: function () {\n return this.state.choices;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeChoices\", {\n /**\n * Get active choices from store\n */\n get: function () {\n return this.choices.filter(function (choice) {\n return choice.active === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"selectableChoices\", {\n /**\n * Get selectable choices from store\n */\n get: function () {\n return this.choices.filter(function (choice) {\n return choice.disabled !== true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"searchableChoices\", {\n /**\n * Get choices that can be searched (excluding placeholders)\n */\n get: function () {\n return this.selectableChoices.filter(function (choice) {\n return choice.placeholder !== true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"placeholderChoice\", {\n /**\n * Get placeholder choice from store\n */\n get: function () {\n return __spreadArray([], this.choices, true).reverse().find(function (choice) {\n return choice.placeholder === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"groups\", {\n /**\n * Get groups from store\n */\n get: function () {\n return this.state.groups;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeGroups\", {\n /**\n * Get active groups from store\n */\n get: function () {\n var _a = this,\n groups = _a.groups,\n choices = _a.choices;\n\n return groups.filter(function (group) {\n var isActive = group.active === true && group.disabled === false;\n var hasActiveOptions = choices.some(function (choice) {\n return choice.active === true && choice.disabled === false;\n });\n return isActive && hasActiveOptions;\n }, []);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Get loading state from store\n */\n\n Store.prototype.isLoading = function () {\n return this.state.loading;\n };\n /**\n * Get single choice by it's ID\n */\n\n\n Store.prototype.getChoiceById = function (id) {\n return this.activeChoices.find(function (choice) {\n return choice.id === parseInt(id, 10);\n });\n };\n /**\n * Get group by group id\n */\n\n\n Store.prototype.getGroupById = function (id) {\n return this.groups.find(function (group) {\n return group.id === id;\n });\n };\n\n return Store;\n}();\n\nexports[\"default\"] = Store;\n\n/***/ }),\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/**\n * Helpers to create HTML elements used by Choices\n * Can be overridden by providing `callbackOnCreateTemplates` option\n */\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar templates = {\n containerOuter: function (_a, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType) {\n var containerOuter = _a.containerOuter;\n var div = Object.assign(document.createElement('div'), {\n className: containerOuter\n });\n div.dataset.type = passedElementType;\n\n if (dir) {\n div.dir = dir;\n }\n\n if (isSelectOneElement) {\n div.tabIndex = 0;\n }\n\n if (isSelectElement) {\n div.setAttribute('role', searchEnabled ? 'combobox' : 'listbox');\n\n if (searchEnabled) {\n div.setAttribute('aria-autocomplete', 'list');\n }\n }\n\n div.setAttribute('aria-haspopup', 'true');\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n containerInner: function (_a) {\n var containerInner = _a.containerInner;\n return Object.assign(document.createElement('div'), {\n className: containerInner\n });\n },\n itemList: function (_a, isSelectOneElement) {\n var list = _a.list,\n listSingle = _a.listSingle,\n listItems = _a.listItems;\n return Object.assign(document.createElement('div'), {\n className: \"\".concat(list, \" \").concat(isSelectOneElement ? listSingle : listItems)\n });\n },\n placeholder: function (_a, value) {\n var placeholder = _a.placeholder;\n return Object.assign(document.createElement('div'), {\n className: placeholder,\n innerHTML: value\n });\n },\n item: function (_a, _b, removeItemButton) {\n var item = _a.item,\n button = _a.button,\n highlightedState = _a.highlightedState,\n itemSelectable = _a.itemSelectable,\n placeholder = _a.placeholder;\n var id = _b.id,\n value = _b.value,\n label = _b.label,\n customProperties = _b.customProperties,\n active = _b.active,\n disabled = _b.disabled,\n highlighted = _b.highlighted,\n isPlaceholder = _b.placeholder;\n var div = Object.assign(document.createElement('div'), {\n className: item,\n innerHTML: label\n });\n Object.assign(div.dataset, {\n item: '',\n id: id,\n value: value,\n customProperties: customProperties\n });\n\n if (active) {\n div.setAttribute('aria-selected', 'true');\n }\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.classList.add(highlighted ? highlightedState : itemSelectable);\n\n if (removeItemButton) {\n if (disabled) {\n div.classList.remove(itemSelectable);\n }\n\n div.dataset.deletable = '';\n /** @todo This MUST be localizable, not hardcoded! */\n\n var REMOVE_ITEM_TEXT = 'Remove item';\n var removeButton = Object.assign(document.createElement('button'), {\n type: 'button',\n className: button,\n innerHTML: REMOVE_ITEM_TEXT\n });\n removeButton.setAttribute('aria-label', \"\".concat(REMOVE_ITEM_TEXT, \": '\").concat(value, \"'\"));\n removeButton.dataset.button = '';\n div.appendChild(removeButton);\n }\n\n return div;\n },\n choiceList: function (_a, isSelectOneElement) {\n var list = _a.list;\n var div = Object.assign(document.createElement('div'), {\n className: list\n });\n\n if (!isSelectOneElement) {\n div.setAttribute('aria-multiselectable', 'true');\n }\n\n div.setAttribute('role', 'listbox');\n return div;\n },\n choiceGroup: function (_a, _b) {\n var group = _a.group,\n groupHeading = _a.groupHeading,\n itemDisabled = _a.itemDisabled;\n var id = _b.id,\n value = _b.value,\n disabled = _b.disabled;\n var div = Object.assign(document.createElement('div'), {\n className: \"\".concat(group, \" \").concat(disabled ? itemDisabled : '')\n });\n div.setAttribute('role', 'group');\n Object.assign(div.dataset, {\n group: '',\n id: id,\n value: value\n });\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n div.appendChild(Object.assign(document.createElement('div'), {\n className: groupHeading,\n innerHTML: value\n }));\n return div;\n },\n choice: function (_a, _b, selectText) {\n var item = _a.item,\n itemChoice = _a.itemChoice,\n itemSelectable = _a.itemSelectable,\n selectedState = _a.selectedState,\n itemDisabled = _a.itemDisabled,\n placeholder = _a.placeholder;\n var id = _b.id,\n value = _b.value,\n label = _b.label,\n groupId = _b.groupId,\n elementId = _b.elementId,\n isDisabled = _b.disabled,\n isSelected = _b.selected,\n isPlaceholder = _b.placeholder;\n var div = Object.assign(document.createElement('div'), {\n id: elementId,\n innerHTML: label,\n className: \"\".concat(item, \" \").concat(itemChoice)\n });\n\n if (isSelected) {\n div.classList.add(selectedState);\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.setAttribute('role', groupId && groupId > 0 ? 'treeitem' : 'option');\n Object.assign(div.dataset, {\n choice: '',\n id: id,\n value: value,\n selectText: selectText\n });\n\n if (isDisabled) {\n div.classList.add(itemDisabled);\n div.dataset.choiceDisabled = '';\n div.setAttribute('aria-disabled', 'true');\n } else {\n div.classList.add(itemSelectable);\n div.dataset.choiceSelectable = '';\n }\n\n return div;\n },\n input: function (_a, placeholderValue) {\n var input = _a.input,\n inputCloned = _a.inputCloned;\n var inp = Object.assign(document.createElement('input'), {\n type: 'text',\n className: \"\".concat(input, \" \").concat(inputCloned),\n autocomplete: 'off',\n autocapitalize: 'off',\n spellcheck: false\n });\n inp.setAttribute('role', 'textbox');\n inp.setAttribute('aria-autocomplete', 'list');\n inp.setAttribute('aria-label', placeholderValue);\n return inp;\n },\n dropdown: function (_a) {\n var list = _a.list,\n listDropdown = _a.listDropdown;\n var div = document.createElement('div');\n div.classList.add(list, listDropdown);\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n notice: function (_a, innerHTML, type) {\n var item = _a.item,\n itemChoice = _a.itemChoice,\n noResults = _a.noResults,\n noChoices = _a.noChoices;\n\n if (type === void 0) {\n type = '';\n }\n\n var classes = [item, itemChoice];\n\n if (type === 'no-choices') {\n classes.push(noChoices);\n } else if (type === 'no-results') {\n classes.push(noResults);\n }\n\n return Object.assign(document.createElement('div'), {\n innerHTML: innerHTML,\n className: classes.join(' ')\n });\n },\n option: function (_a) {\n var label = _a.label,\n value = _a.value,\n customProperties = _a.customProperties,\n active = _a.active,\n disabled = _a.disabled;\n var opt = new Option(label, value, false, active);\n\n if (customProperties) {\n opt.dataset.customProperties = \"\".concat(customProperties);\n }\n\n opt.disabled = !!disabled;\n return opt;\n }\n};\nexports[\"default\"] = templates;\n\n/***/ }),\n\n/***/ 996:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n/***/ }),\n\n/***/ 70:\n/***/ (function(module) {\n\n/*!\n * Fuse.js v3.4.6 - Lightweight fuzzy-search (http://fusejs.io)\n * \n * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n */\n!function(e,t){ true?module.exports=t():0}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\\nSearch pattern: \"'.concat(e,'\"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,o=n.fullSearcher,i=this._search(r,o),a=i.weights,s=i.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&\"number\"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:\"_prepareSearchers\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},o=[];if(\"string\"==typeof n[0]){for(var i=0,a=n.length;i1)throw new Error(\"Key weight has to be > 0 and <= 1\");d=d.name}else s[d]={weight:1};this._analyze({key:d,value:this.options.getFn(l,d),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:o}}},{key:\"_analyze\",value:function(e,t){var n=e.key,r=e.arrayIndex,o=void 0===r?-1:r,i=e.value,a=e.record,c=e.index,h=t.tokenSearchers,l=void 0===h?[]:h,u=t.fullSearcher,f=void 0===u?[]:u,d=t.resultMap,v=void 0===d?{}:d,p=t.results,g=void 0===p?[]:p;if(null!=i){var y=!1,m=-1,k=0;if(\"string\"==typeof i){this._log(\"\\nKey: \".concat(\"\"===n?\"-\":n));var S=f.search(i);if(this._log('Full text: \"'.concat(i,'\", score: ').concat(S.score)),this.options.tokenize){for(var x=i.split(this.options.tokenSeparator),b=[],M=0;M-1&&(P=(P+m)/2),this._log(\"Score average:\",P);var F=!this.options.tokenize||!this.options.matchAllTokens||k>=l.length;if(this._log(\"\\nCheck Matches: \".concat(F)),(y||S.isMatch)&&F){var T=v[c];T?T.output.push({key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}):(v[c]={item:a,output:[{key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}]},g.push(v[c]))}}else if(s(i))for(var z=0,E=i.length;z-1&&(a.arrayIndex=i.arrayIndex),t.matches.push(a)}}}),this.options.includeScore&&o.push(function(e,t){t.score=e.score});for(var i=0,a=e.length;in)return o(e,this.pattern,r);var a=this.options,s=a.location,c=a.distance,h=a.threshold,l=a.findAllMatches,u=a.minMatchCharLength;return i(e,this.pattern,this.patternAlphabet,{location:s,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s},function(e,t){var n=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,\"\\\\$&\").replace(r,\"|\")),i=e.match(o),a=!!i,s=[];if(a)for(var c=0,h=i.length;c=P;z-=1){var E=z-1,K=n[e.charAt(E)];if(K&&(x[E]=1),T[z]=(T[z+1]<<1|1)&K,0!==I&&(T[z]|=(L[z+1]|L[z])<<1|1|L[z+1]),T[z]&C&&(w=r(t,{errors:I,currentLocation:E,expectedLocation:g,distance:h}))<=m){if(m=w,(k=E)<=g)break;P=Math.max(1,2*g-k)}}if(r(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:h})>m)break;L=T}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(x,p)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,a=t.expectedLocation,s=void 0===a?0:a,c=t.distance,h=void 0===c?100:c,l=r/e.length,u=Math.abs(s-i);return h?l+u/h:u?1:l}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,a=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(12) : 0);\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(13) : 0);\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {}\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (false) {}\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) { var warningMessage; }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var actionType = action && action.type;\n throw new Error( true ? formatProdErrorMessage(14) : 0);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error( true ? formatProdErrorMessage(16) : 0);\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error( true ? formatProdErrorMessage(15) : 0);\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2(_objectSpread2({}, store), {}, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (false) {}\n\n\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(373);\n/******/ \t__webpack_exports__ = __webpack_exports__[\"default\"];\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});","'use strict';\nvar parent = require('../../stable/function/name');\n\nmodule.exports = parent;\n","'use strict';\nvar parent = require('../../stable/object/assign');\n\nmodule.exports = parent;\n","'use strict';\nvar parent = require('../../stable/promise');\nrequire('../../modules/esnext.promise.with-resolvers');\n\nmodule.exports = parent;\n","'use strict';\nrequire('../../modules/es.function.name');\n","'use strict';\nrequire('../../modules/es.object.assign');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.assign;\n","'use strict';\nrequire('../../modules/es.aggregate-error');\nrequire('../../modules/es.array.iterator');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.promise');\nrequire('../../modules/es.promise.all-settled');\nrequire('../../modules/es.promise.any');\nrequire('../../modules/es.promise.finally');\nrequire('../../modules/es.string.iterator');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Promise;\n","'use strict';\nmodule.exports = require('../../full/function/name');\n","'use strict';\nmodule.exports = require('../../full/object/assign');\n","'use strict';\nmodule.exports = require('../../full/promise');\n","'use strict';\nvar parent = require('../../actual/function/name');\n\nmodule.exports = parent;\n","'use strict';\nvar parent = require('../../actual/object/assign');\n\nmodule.exports = parent;\n","'use strict';\nvar parent = require('../../actual/promise');\n// TODO: Remove from `core-js@4`\nrequire('../../modules/esnext.aggregate-error');\nrequire('../../modules/esnext.promise.all-settled');\nrequire('../../modules/esnext.promise.try');\nrequire('../../modules/esnext.promise.any');\n\nmodule.exports = parent;\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a function');\n};\n","'use strict';\nvar isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a constructor');\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n if (typeof argument == 'object' || isCallable(argument)) return argument;\n throw $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] === undefined) {\n defineProperty(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it, Prototype) {\n if (isPrototypeOf(Prototype, it)) return it;\n throw $TypeError('Incorrect invocation');\n};\n","'use strict';\nvar isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw $TypeError($String(argument) + ' is not an object');\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el !== el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value !== value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis([].slice);\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n try {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n } catch (error) { return false; } // workaround of old WebKit + `eval` bug\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n return { value: value, done: done };\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","'use strict';\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineProperty = require('../internals/object-define-property');\n\nmodule.exports = function (target, name, descriptor) {\n if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });\n if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });\n return defineProperty.f(target, name, descriptor);\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n","'use strict';\nvar global = require('../internals/global');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n","'use strict';\nvar documentAll = typeof document == 'object' && document.all;\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nvar IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;\n\nmodule.exports = {\n all: documentAll,\n IS_HTMLDDA: IS_HTMLDDA\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","'use strict';\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","'use strict';\n// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","'use strict';\nvar IS_DENO = require('../internals/engine-is-deno');\nvar IS_NODE = require('../internals/engine-is-node');\n\nmodule.exports = !IS_DENO && !IS_NODE\n && typeof window == 'object'\n && typeof document == 'object';\n","'use strict';\n/* global Deno -- Deno case */\nmodule.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line redos/no-vulnerable -- safe\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n","'use strict';\nvar global = require('../internals/global');\nvar classof = require('../internals/classof-raw');\n\nmodule.exports = classof(global.process) === 'process';\n","'use strict';\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","'use strict';\nmodule.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';\n","'use strict';\nvar global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","'use strict';\n// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar $Error = Error;\nvar replace = uncurryThis(''.replace);\n\nvar TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');\n// eslint-disable-next-line redos/no-vulnerable -- safe\nvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\nvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\n\nmodule.exports = function (stack, dropEntries) {\n if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n } return stack;\n};\n","'use strict';\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar clearErrorStack = require('../internals/error-stack-clear');\nvar ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');\n\n// non-standard V8\nvar captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (error, C, stack, dropEntries) {\n if (ERROR_STACK_INSTALLABLE) {\n if (captureStackTrace) captureStackTrace(error, C);\n else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));\n }\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = !fails(function () {\n var error = Error('a');\n if (!('stack' in error)) return true;\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));\n return error.stack !== 7;\n});\n","'use strict';\nvar global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n","'use strict';\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\n\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) { /* empty */ }\n};\n","'use strict';\nvar classofRaw = require('../internals/classof-raw');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n","'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","'use strict';\nvar classof = require('../internals/classof');\nvar getMethod = require('../internals/get-method');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n || getMethod(it, '@@iterator')\n || Iterators[classof(it)];\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw $TypeError(tryToString(argument) + ' is not iterable');\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n","'use strict';\nvar check = function (it) {\n return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || this || Function('return this')();\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nmodule.exports = function (a, b) {\n try {\n // eslint-disable-next-line no-console -- safe\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n } catch (error) { /* empty */ }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a !== 7;\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\n// `InstallErrorCause` abstract operation\n// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause\nmodule.exports = function (O, options) {\n if (isObject(options) && 'cause' in options) {\n createNonEnumerableProperty(O, 'cause', options.cause);\n }\n};\n","'use strict';\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","'use strict';\nvar $documentAll = require('../internals/document-all');\n\nvar documentAll = $documentAll.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = $documentAll.IS_HTMLDDA ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function () { /* empty */ };\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n }\n try {\n // we can't check .prototype since constructors produced by .bind haven't it\n // `Function#toString` throws on some built-it function in some legacy engines\n // (for example, `DOMQuad` and similar in FF41-)\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\n\nisConstructorLegacy.sham = true;\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value === POLYFILL ? true\n : value === NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","'use strict';\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n return it === null || it === undefined;\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar $documentAll = require('../internals/document-all');\n\nvar documentAll = $documentAll.all;\n\nmodule.exports = $documentAll.IS_HTMLDDA ? function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;\n} : function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","'use strict';\nmodule.exports = false;\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar $TypeError = TypeError;\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_RECORD = !!(options && options.IS_RECORD);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_RECORD) {\n iterator = iterable.iterator;\n } else if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = IS_RECORD ? iterable.next : iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n }\n\n return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return call(nativeIterator, this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nmodule.exports = {};\n","'use strict';\nvar toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar $String = String;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar stringSlice = uncurryThis(''.slice);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (stringSlice($String(name), 0, 7) === 'Symbol(') {\n name = '[' + replace($String(name), /^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = join(TEMPLATE, typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n","'use strict';\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n","'use strict';\nvar global = require('../internals/global');\nvar bind = require('../internals/function-bind-context');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar Queue = require('../internals/queue');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar microtask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\nvar notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!microtask) {\n var queue = new Queue();\n\n var flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (fn = queue.get()) try {\n fn();\n } catch (error) {\n if (queue.head) notify();\n throw error;\n }\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = bind(promise.then, promise);\n notify = function () {\n then(flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessage\n // - onreadystatechange\n // - setTimeout\n } else {\n // `webpack` dev server bug on IE global methods - use bind(fn, global)\n macrotask = bind(macrotask, global);\n notify = function () {\n macrotask(flush);\n };\n }\n\n microtask = function (fn) {\n if (!queue.head) notify();\n queue.add(fn);\n };\n}\n\nmodule.exports = microtask;\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar $TypeError = TypeError;\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw $TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\nvar toString = require('../internals/to-string');\n\nmodule.exports = function (argument, $default) {\n return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\nvar concat = uncurryThis([].concat);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol('assign detection');\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","'use strict';\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","'use strict';\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","'use strict';\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw $TypeError(\"Can't convert object to primitive value\");\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","'use strict';\nvar global = require('../internals/global');\n\nmodule.exports = global;\n","'use strict';\nmodule.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","'use strict';\nvar global = require('../internals/global');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar isCallable = require('../internals/is-callable');\nvar isForced = require('../internals/is-forced');\nvar inspectSource = require('../internals/inspect-source');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_DENO = require('../internals/engine-is-deno');\nvar IS_PURE = require('../internals/is-pure');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar SPECIES = wellKnownSymbol('species');\nvar SUBCLASSING = false;\nvar NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\n\nvar FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution\n if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {\n // Detect correctness of subclassing with @@species support\n var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT;\n});\n\nmodule.exports = {\n CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,\n REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,\n SUBCLASSING: SUBCLASSING\n};\n","'use strict';\nvar global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\nmodule.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {\n NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });\n});\n","'use strict';\nvar Queue = function () {\n this.head = null;\n this.tail = null;\n};\n\nQueue.prototype = {\n add: function (item) {\n var entry = { item: item, next: null };\n var tail = this.tail;\n if (tail) tail.next = entry;\n else this.head = entry;\n this.tail = entry;\n },\n get: function () {\n var entry = this.head;\n if (entry) {\n var next = this.head = entry.next;\n if (next === null) this.tail = null;\n return entry.item;\n }\n }\n};\n\nmodule.exports = Queue;\n","'use strict';\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (isNullOrUndefined(it)) throw $TypeError(\"Can't call method on \" + it);\n return it;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineBuiltInAccessor(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (target, TAG, STATIC) {\n if (target && !STATIC) target = target.prototype;\n if (target && !hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","'use strict';\nvar global = require('../internals/global');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || defineGlobalProperty(SHARED, {});\n\nmodule.exports = store;\n","'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.32.2',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar stringSlice = uncurryThis(''.slice);\n\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toIntegerOrInfinity(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = charCodeAt(S, position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING\n ? charAt(S, position)\n : first\n : CONVERT_TO_STRING\n ? stringSlice(S, position, position + 2)\n : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar $String = global.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol('symbol detection');\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar bind = require('../internals/function-bind-context');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar fails = require('../internals/fails');\nvar html = require('../internals/html');\nvar arraySlice = require('../internals/array-slice');\nvar createElement = require('../internals/document-create-element');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar Dispatch = global.Dispatch;\nvar Function = global.Function;\nvar MessageChannel = global.MessageChannel;\nvar String = global.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar $location, defer, channel, port;\n\nfails(function () {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n $location = global.location;\n});\n\nvar run = function (id) {\n if (hasOwn(queue, id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar eventListener = function (event) {\n run(event.data);\n};\n\nvar globalPostMessageDefer = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), $location.protocol + '//' + $location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(handler) {\n validateArgumentsLength(arguments.length, 1);\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(fn, undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = eventListener;\n defer = bind(port.postMessage, port);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n $location && $location.protocol !== 'file:' &&\n !fails(globalPostMessageDefer)\n ) {\n defer = globalPostMessageDefer;\n global.addEventListener('message', eventListener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","'use strict';\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","'use strict';\nvar trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","'use strict';\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n","'use strict';\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","'use strict';\nvar classof = require('../internals/classof');\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return $String(argument);\n};\n","'use strict';\nvar $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype !== 42;\n});\n","'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (passed, required) {\n if (passed < required) throw $TypeError('Not enough arguments');\n return passed;\n};\n","'use strict';\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n","'use strict';\nvar global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar Symbol = global.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name)) {\n WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n ? Symbol[name]\n : createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar installErrorCause = require('../internals/install-error-cause');\nvar installErrorStack = require('../internals/error-stack-install');\nvar iterate = require('../internals/iterate');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Error = Error;\nvar push = [].push;\n\nvar $AggregateError = function AggregateError(errors, message /* , options */) {\n var isInstance = isPrototypeOf(AggregateErrorPrototype, this);\n var that;\n if (setPrototypeOf) {\n that = setPrototypeOf($Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);\n } else {\n that = isInstance ? this : create(AggregateErrorPrototype);\n createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');\n }\n if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n installErrorStack(that, $AggregateError, that.stack, 1);\n if (arguments.length > 2) installErrorCause(that, arguments[2]);\n var errorsArray = [];\n iterate(errors, push, { that: errorsArray });\n createNonEnumerableProperty(that, 'errors', errorsArray);\n return that;\n};\n\nif (setPrototypeOf) setPrototypeOf($AggregateError, $Error);\nelse copyConstructorProperties($AggregateError, $Error, { name: true });\n\nvar AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {\n constructor: createPropertyDescriptor(1, $AggregateError),\n message: createPropertyDescriptor(1, ''),\n name: createPropertyDescriptor(1, 'AggregateError')\n});\n\n// `AggregateError` constructor\n// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n$({ global: true, constructor: true, arity: 2 }, {\n AggregateError: $AggregateError\n});\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.aggregate-error.constructor');\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineProperty = require('../internals/object-define-property').f;\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n switch (kind) {\n case 'keys': return createIterResultObject(index, false);\n case 'values': return createIterResultObject(target[index], false);\n } return createIterResultObject([index, target[index]], false);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n defineProperty(values, 'name', { value: 'values' });\n} catch (error) { /* empty */ }\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\n\nvar FunctionPrototype = Function.prototype;\nvar functionToString = uncurryThis(FunctionPrototype.toString);\nvar nameRE = /function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/;\nvar regExpExec = uncurryThis(nameRE.exec);\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineBuiltInAccessor(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return regExpExec(nameRE, functionToString(this))[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {\n assign: assign\n});\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.allSettled` method\n// https://tc39.es/ecma262/#sec-promise.allsettled\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n allSettled: function allSettled(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call(promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'fulfilled', value: value };\n --remaining || resolve(values);\n }, function (error) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'rejected', reason: error };\n --remaining || resolve(values);\n });\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.all` method\n// https://tc39.es/ecma262/#sec-promise.all\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call($promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n// `Promise.any` method\n// https://tc39.es/ecma262/#sec-promise.any\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n any: function any(iterable) {\n var C = this;\n var AggregateError = getBuiltIn('AggregateError');\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aCallable(C.resolve);\n var errors = [];\n var counter = 0;\n var remaining = 1;\n var alreadyResolved = false;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyRejected = false;\n remaining++;\n call(promiseResolve, C, promise).then(function (value) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyResolved = true;\n resolve(value);\n }, function (error) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyRejected = true;\n errors[index] = error;\n --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n });\n });\n --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// `Promise.prototype.catch` method\n// https://tc39.es/ecma262/#sec-promise.prototype.catch\n$({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n});\n\n// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['catch'];\n if (NativePromisePrototype['catch'] !== method) {\n defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });\n }\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar IS_NODE = require('../internals/engine-is-node');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar perform = require('../internals/perform');\nvar Queue = require('../internals/queue');\nvar InternalStateModule = require('../internals/internal-state');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar PromiseConstructorDetection = require('../internals/promise-constructor-detection');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\nvar PROMISE = 'Promise';\nvar FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;\nvar NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;\nvar NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar PromiseConstructor = NativePromiseConstructor;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\n\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\n\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar callReaction = function (reaction, state) {\n var value = state.value;\n var ok = state.state === FULFILLED;\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n call(then, result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n microtask(function () {\n var reactions = state.reactions;\n var reaction;\n while (reaction = reactions.get()) {\n callReaction(reaction, state);\n }\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n call(then, value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED_PROMISE_CONSTRUCTOR) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromisePrototype);\n aCallable(executor);\n call(Internal, this);\n var state = getInternalPromiseState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n\n PromisePrototype = PromiseConstructor.prototype;\n\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: new Queue(),\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n state.parent = true;\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n if (state.state === PENDING) state.reactions.add(reaction);\n else microtask(function () {\n callReaction(reaction, state);\n });\n return reaction.promise;\n });\n\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalPromiseState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!NATIVE_PROMISE_SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n call(nativeThen, that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromisePrototype);\n }\n }\n}\n\n$({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromiseConstructor && fails(function () {\n // eslint-disable-next-line unicorn/no-thenable -- required for testing\n NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = isCallable(onFinally);\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromisePrototype['finally'] !== method) {\n defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });\n }\n}\n","'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/es.promise.constructor');\nrequire('../modules/es.promise.all');\nrequire('../modules/es.promise.catch');\nrequire('../modules/es.promise.race');\nrequire('../modules/es.promise.reject');\nrequire('../modules/es.promise.resolve');\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.race` method\n// https://tc39.es/ecma262/#sec-promise.race\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n call($promiseResolve, C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\n// `Promise.reject` method\n// https://tc39.es/ecma262/#sec-promise.reject\n$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n reject: function reject(r) {\n var capability = newPromiseCapabilityModule.f(this);\n call(capability.reject, undefined, r);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar promiseResolve = require('../internals/promise-resolve');\n\nvar PromiseConstructorWrapper = getBuiltIn('Promise');\nvar CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;\n\n// `Promise.resolve` method\n// https://tc39.es/ecma262/#sec-promise.resolve\n$({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {\n resolve: function resolve(x) {\n return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);\n }\n});\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return createIterResultObject(undefined, true);\n point = charAt(string, index);\n state.index += point.length;\n return createIterResultObject(point, false);\n});\n","'use strict';\n// TODO: Remove from `core-js@4`\nrequire('../modules/es.aggregate-error');\n","'use strict';\n// TODO: Remove from `core-js@4`\nrequire('../modules/es.promise.all-settled.js');\n","'use strict';\n// TODO: Remove from `core-js@4`\nrequire('../modules/es.promise.any');\n","'use strict';\n// TODO: Remove from `core-js@4`\nvar $ = require('../internals/export');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\n\n// `Promise.try` method\n// https://github.com/tc39/proposal-promise-try\n$({ target: 'Promise', stat: true, forced: true }, {\n 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapabilityModule.f(this);\n var result = perform(callbackfn);\n (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);\n return promiseCapability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\n// `Promise.withResolvers` method\n// https://github.com/tc39/proposal-promise-with-resolvers\n$({ target: 'Promise', stat: true }, {\n withResolvers: function withResolvers() {\n var promiseCapability = newPromiseCapabilityModule.f(this);\n return {\n promise: promiseCapability.promise,\n resolve: promiseCapability.resolve,\n reject: promiseCapability.reject\n };\n }\n});\n","'use strict';\nvar global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","'use strict';\nvar parent = require('../../es/function/name');\n\nmodule.exports = parent;\n","'use strict';\nvar parent = require('../../es/object/assign');\n\nmodule.exports = parent;\n","'use strict';\nvar parent = require('../../es/promise');\nrequire('../../modules/web.dom-collections.iterator');\n\nmodule.exports = parent;\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#arrow-down';\n var viewUrl = 'svg/global.svg#view-arrow-down';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#arrow-left';\n var viewUrl = 'svg/global.svg#view-arrow-left';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#arrow-right';\n var viewUrl = 'svg/global.svg#view-arrow-right';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#arrow-up';\n var viewUrl = 'svg/global.svg#view-arrow-up';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#attention';\n var viewUrl = 'svg/global.svg#view-attention';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#auditorium';\n var viewUrl = 'svg/global.svg#view-auditorium';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#blender';\n var viewUrl = 'svg/global.svg#view-blender';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#bubble';\n var viewUrl = 'svg/global.svg#view-bubble';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#calendar';\n var viewUrl = 'svg/global.svg#view-calendar';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#card';\n var viewUrl = 'svg/global.svg#view-card';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#cart';\n var viewUrl = 'svg/global.svg#view-cart';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#caution';\n var viewUrl = 'svg/global.svg#view-caution';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#check-outline';\n var viewUrl = 'svg/global.svg#view-check-outline';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#check';\n var viewUrl = 'svg/global.svg#view-check';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-bottom-16x16';\n var viewUrl = 'svg/global.svg#view-chevron-bottom-16x16';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-bottom';\n var viewUrl = 'svg/global.svg#view-chevron-bottom';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-left-large';\n var viewUrl = 'svg/global.svg#view-chevron-left-large';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-left';\n var viewUrl = 'svg/global.svg#view-chevron-left';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-right-large';\n var viewUrl = 'svg/global.svg#view-chevron-right-large';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-right';\n var viewUrl = 'svg/global.svg#view-chevron-right';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-top-16x16';\n var viewUrl = 'svg/global.svg#view-chevron-top-16x16';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chevron-top';\n var viewUrl = 'svg/global.svg#view-chevron-top';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#chicken';\n var viewUrl = 'svg/global.svg#view-chicken';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#cinema-16x16';\n var viewUrl = 'svg/global.svg#view-cinema-16x16';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#clear';\n var viewUrl = 'svg/global.svg#view-clear';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#clock';\n var viewUrl = 'svg/global.svg#view-clock';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#close';\n var viewUrl = 'svg/global.svg#view-close';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#club-inverted';\n var viewUrl = 'svg/global.svg#view-club-inverted';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#club-outline';\n var viewUrl = 'svg/global.svg#view-club-outline';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#club';\n var viewUrl = 'svg/global.svg#view-club';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#copy-large';\n var viewUrl = 'svg/global.svg#view-copy-large';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#copy';\n var viewUrl = 'svg/global.svg#view-copy';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#delete';\n var viewUrl = 'svg/global.svg#view-delete';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#discount';\n var viewUrl = 'svg/global.svg#view-discount';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#edit';\n var viewUrl = 'svg/global.svg#view-edit';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#ellipsis';\n var viewUrl = 'svg/global.svg#view-ellipsis';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#email';\n var viewUrl = 'svg/global.svg#view-email';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#exit';\n var viewUrl = 'svg/global.svg#view-exit';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#facebook';\n var viewUrl = 'svg/global.svg#view-facebook';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#filter-alternate';\n var viewUrl = 'svg/global.svg#view-filter-alternate';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#filter';\n var viewUrl = 'svg/global.svg#view-filter';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#format';\n var viewUrl = 'svg/global.svg#view-format';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#genres';\n var viewUrl = 'svg/global.svg#view-genres';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#globe';\n var viewUrl = 'svg/global.svg#view-globe';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#hide';\n var viewUrl = 'svg/global.svg#view-hide';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#home';\n var viewUrl = 'svg/global.svg#view-home';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#icecream';\n var viewUrl = 'svg/global.svg#view-icecream';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#id';\n var viewUrl = 'svg/global.svg#view-id';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#image';\n var viewUrl = 'svg/global.svg#view-image';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#instagram';\n var viewUrl = 'svg/global.svg#view-instagram';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#language';\n var viewUrl = 'svg/global.svg#view-language';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#login';\n var viewUrl = 'svg/global.svg#view-login';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#menu';\n var viewUrl = 'svg/global.svg#view-menu';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#movies';\n var viewUrl = 'svg/global.svg#view-movies';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#open-new-tab';\n var viewUrl = 'svg/global.svg#view-open-new-tab';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#open';\n var viewUrl = 'svg/global.svg#view-open';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#phone';\n var viewUrl = 'svg/global.svg#view-phone';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#pin-alternate';\n var viewUrl = 'svg/global.svg#view-pin-alternate';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#pin';\n var viewUrl = 'svg/global.svg#view-pin';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#play-alt';\n var viewUrl = 'svg/global.svg#view-play-alt';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 20 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#play';\n var viewUrl = 'svg/global.svg#view-play';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#plus';\n var viewUrl = 'svg/global.svg#view-plus';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#profile';\n var viewUrl = 'svg/global.svg#view-profile';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#proxy';\n var viewUrl = 'svg/global.svg#view-proxy';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#qr';\n var viewUrl = 'svg/global.svg#view-qr';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#remove';\n var viewUrl = 'svg/global.svg#view-remove';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#restrict';\n var viewUrl = 'svg/global.svg#view-restrict';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#scan';\n var viewUrl = 'svg/global.svg#view-scan';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#schedule';\n var viewUrl = 'svg/global.svg#view-schedule';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#search';\n var viewUrl = 'svg/global.svg#view-search';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#seat-couch';\n var viewUrl = 'svg/global.svg#view-seat-couch';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 106 56',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#seat-kott';\n var viewUrl = 'svg/global.svg#view-seat-kott';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 106 56',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#seat-maxi';\n var viewUrl = 'svg/global.svg#view-seat-maxi';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 106 56',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#seat-star';\n var viewUrl = 'svg/global.svg#view-seat-star';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 106 56',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#seat-twin';\n var viewUrl = 'svg/global.svg#view-seat-twin';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 106 56',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#seat';\n var viewUrl = 'svg/global.svg#view-seat';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#settings';\n var viewUrl = 'svg/global.svg#view-settings';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#share';\n var viewUrl = 'svg/global.svg#view-share';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#show';\n var viewUrl = 'svg/global.svg#view-show';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#sound';\n var viewUrl = 'svg/global.svg#view-sound';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 12 12',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#star-empty';\n var viewUrl = 'svg/global.svg#view-star-empty';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 32 32',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#star-full';\n var viewUrl = 'svg/global.svg#view-star-full';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#star';\n var viewUrl = 'svg/global.svg#view-star';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#store-16x16';\n var viewUrl = 'svg/global.svg#view-store-16x16';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 16 16',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#store';\n var viewUrl = 'svg/global.svg#view-store';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#subtitle';\n var viewUrl = 'svg/global.svg#view-subtitle';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#tickets-inverted';\n var viewUrl = 'svg/global.svg#view-tickets-inverted';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","var publicPath = __webpack_public_path__;\n var symbolUrl = 'svg/global.svg#tickets';\n var viewUrl = 'svg/global.svg#view-tickets';\n\n \n\n module.exports = {\n symbol: publicPath + symbolUrl,\n view: publicPath + viewUrl,\n viewBox: '0 0 24 24',\n title: '',\n toString: function () {\n return JSON.stringify(this.view);\n }\n };","/*! gumshoejs v5.1.2 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/gumshoe */\n!(function(e,t){\"function\"==typeof define&&define.amd?define([],(function(){return t(e)})):\"object\"==typeof exports?module.exports=t(e):e.Gumshoe=t(e)})(\"undefined\"!=typeof global?global:\"undefined\"!=typeof window?window:this,(function(e){\"use strict\";var t={navClass:\"active\",contentClass:\"active\",nested:!1,nestedClass:\"active\",offset:0,reflow:!1,events:!0},n=function(e,t,n){if(n.settings.events){var o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t.dispatchEvent(o)}},o=function(e){var t=0;if(e.offsetParent)for(;e;)t+=e.offsetTop,e=e.offsetParent;return t>=0?t:0},s=function(e){e&&e.sort((function(e,t){return o(e.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},r=function(e,t){var n=e[e.length-1];if(function(e,t){return!(!i()||!c(e.content,t,!0))}(n,t))return n;for(var o=e.length-1;o>=0;o--)if(c(e[o].content,t))return e[o]},a=function(e,t){if(t.nested&&e.parentNode){var n=e.parentNode.closest(\"li\");n&&(n.classList.remove(t.nestedClass),a(n,t))}},l=function(e,t){if(e){var o=e.nav.closest(\"li\");o&&(o.classList.remove(t.navClass),e.content.classList.remove(t.contentClass),a(o,t),n(\"gumshoeDeactivate\",o,{link:e.nav,content:e.content,settings:t}))}},u=function(e,t){if(t.nested){var n=e.parentNode.closest(\"li\");n&&(n.classList.add(t.nestedClass),u(n,t))}};return function(o,c){var i,a,f,d,v,m={};m.setup=function(){i=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(i,(function(e){var t=document.getElementById(decodeURIComponent(e.hash.substr(1)));t&&a.push({nav:e,content:t})})),s(a)},m.detect=function(){var e=r(a,v);e?f&&e.content===f.content||(l(f,v),(function(e,t){if(e){var o=e.nav.closest(\"li\");o&&(o.classList.add(t.navClass),e.content.classList.add(t.contentClass),u(o,t),n(\"gumshoeActivate\",o,{link:e.nav,content:e.content,settings:t}))}})(e,v),f=e):f&&(l(f,v),f=null)};var p=function(t){d&&e.cancelAnimationFrame(d),d=e.requestAnimationFrame(m.detect)},h=function(t){d&&e.cancelAnimationFrame(d),d=e.requestAnimationFrame((function(){s(a),m.detect()}))};m.destroy=function(){f&&l(f,v),e.removeEventListener(\"scroll\",p,!1),v.reflow&&e.removeEventListener(\"resize\",h,!1),a=null,i=null,f=null,d=null,v=null};return v=(function(){var e={};return Array.prototype.forEach.call(arguments,(function(t){for(var n in t){if(!t.hasOwnProperty(n))return;e[n]=t[n]}})),e})(t,c||{}),m.setup(),m.detect(),e.addEventListener(\"scroll\",p,!1),v.reflow&&e.addEventListener(\"resize\",h,!1),m}}));","export var Html5QrcodeSupportedFormats;\n(function (Html5QrcodeSupportedFormats) {\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"QR_CODE\"] = 0] = \"QR_CODE\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"AZTEC\"] = 1] = \"AZTEC\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODABAR\"] = 2] = \"CODABAR\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODE_39\"] = 3] = \"CODE_39\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODE_93\"] = 4] = \"CODE_93\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODE_128\"] = 5] = \"CODE_128\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"DATA_MATRIX\"] = 6] = \"DATA_MATRIX\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"MAXICODE\"] = 7] = \"MAXICODE\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"ITF\"] = 8] = \"ITF\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"EAN_13\"] = 9] = \"EAN_13\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"EAN_8\"] = 10] = \"EAN_8\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"PDF_417\"] = 11] = \"PDF_417\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"RSS_14\"] = 12] = \"RSS_14\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"RSS_EXPANDED\"] = 13] = \"RSS_EXPANDED\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"UPC_A\"] = 14] = \"UPC_A\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"UPC_E\"] = 15] = \"UPC_E\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"UPC_EAN_EXTENSION\"] = 16] = \"UPC_EAN_EXTENSION\";\n})(Html5QrcodeSupportedFormats || (Html5QrcodeSupportedFormats = {}));\nvar html5QrcodeSupportedFormatsTextMap = new Map([\n [Html5QrcodeSupportedFormats.QR_CODE, \"QR_CODE\"],\n [Html5QrcodeSupportedFormats.AZTEC, \"AZTEC\"],\n [Html5QrcodeSupportedFormats.CODABAR, \"CODABAR\"],\n [Html5QrcodeSupportedFormats.CODE_39, \"CODE_39\"],\n [Html5QrcodeSupportedFormats.CODE_93, \"CODE_93\"],\n [Html5QrcodeSupportedFormats.CODE_128, \"CODE_128\"],\n [Html5QrcodeSupportedFormats.DATA_MATRIX, \"DATA_MATRIX\"],\n [Html5QrcodeSupportedFormats.MAXICODE, \"MAXICODE\"],\n [Html5QrcodeSupportedFormats.ITF, \"ITF\"],\n [Html5QrcodeSupportedFormats.EAN_13, \"EAN_13\"],\n [Html5QrcodeSupportedFormats.EAN_8, \"EAN_8\"],\n [Html5QrcodeSupportedFormats.PDF_417, \"PDF_417\"],\n [Html5QrcodeSupportedFormats.RSS_14, \"RSS_14\"],\n [Html5QrcodeSupportedFormats.RSS_EXPANDED, \"RSS_EXPANDED\"],\n [Html5QrcodeSupportedFormats.UPC_A, \"UPC_A\"],\n [Html5QrcodeSupportedFormats.UPC_E, \"UPC_E\"],\n [Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION, \"UPC_EAN_EXTENSION\"]\n]);\nexport var DecodedTextType;\n(function (DecodedTextType) {\n DecodedTextType[DecodedTextType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n DecodedTextType[DecodedTextType[\"URL\"] = 1] = \"URL\";\n})(DecodedTextType || (DecodedTextType = {}));\nexport function isValidHtml5QrcodeSupportedFormats(format) {\n return Object.values(Html5QrcodeSupportedFormats).includes(format);\n}\nexport var Html5QrcodeScanType;\n(function (Html5QrcodeScanType) {\n Html5QrcodeScanType[Html5QrcodeScanType[\"SCAN_TYPE_CAMERA\"] = 0] = \"SCAN_TYPE_CAMERA\";\n Html5QrcodeScanType[Html5QrcodeScanType[\"SCAN_TYPE_FILE\"] = 1] = \"SCAN_TYPE_FILE\";\n})(Html5QrcodeScanType || (Html5QrcodeScanType = {}));\nvar Html5QrcodeConstants = (function () {\n function Html5QrcodeConstants() {\n }\n Html5QrcodeConstants.GITHUB_PROJECT_URL = \"https://github.com/mebjas/html5-qrcode\";\n Html5QrcodeConstants.SCAN_DEFAULT_FPS = 2;\n Html5QrcodeConstants.DEFAULT_DISABLE_FLIP = false;\n Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED = true;\n Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE = [\n Html5QrcodeScanType.SCAN_TYPE_CAMERA,\n Html5QrcodeScanType.SCAN_TYPE_FILE\n ];\n return Html5QrcodeConstants;\n}());\nexport { Html5QrcodeConstants };\nvar QrcodeResultFormat = (function () {\n function QrcodeResultFormat(format, formatName) {\n this.format = format;\n this.formatName = formatName;\n }\n QrcodeResultFormat.prototype.toString = function () {\n return this.formatName;\n };\n QrcodeResultFormat.create = function (format) {\n if (!html5QrcodeSupportedFormatsTextMap.has(format)) {\n throw \"\".concat(format, \" not in html5QrcodeSupportedFormatsTextMap\");\n }\n return new QrcodeResultFormat(format, html5QrcodeSupportedFormatsTextMap.get(format));\n };\n return QrcodeResultFormat;\n}());\nexport { QrcodeResultFormat };\nvar Html5QrcodeResultFactory = (function () {\n function Html5QrcodeResultFactory() {\n }\n Html5QrcodeResultFactory.createFromText = function (decodedText) {\n var qrcodeResult = {\n text: decodedText\n };\n return {\n decodedText: decodedText,\n result: qrcodeResult\n };\n };\n Html5QrcodeResultFactory.createFromQrcodeResult = function (qrcodeResult) {\n return {\n decodedText: qrcodeResult.text,\n result: qrcodeResult\n };\n };\n return Html5QrcodeResultFactory;\n}());\nexport { Html5QrcodeResultFactory };\nexport var Html5QrcodeErrorTypes;\n(function (Html5QrcodeErrorTypes) {\n Html5QrcodeErrorTypes[Html5QrcodeErrorTypes[\"UNKWOWN_ERROR\"] = 0] = \"UNKWOWN_ERROR\";\n Html5QrcodeErrorTypes[Html5QrcodeErrorTypes[\"IMPLEMENTATION_ERROR\"] = 1] = \"IMPLEMENTATION_ERROR\";\n Html5QrcodeErrorTypes[Html5QrcodeErrorTypes[\"NO_CODE_FOUND_ERROR\"] = 2] = \"NO_CODE_FOUND_ERROR\";\n})(Html5QrcodeErrorTypes || (Html5QrcodeErrorTypes = {}));\nvar Html5QrcodeErrorFactory = (function () {\n function Html5QrcodeErrorFactory() {\n }\n Html5QrcodeErrorFactory.createFrom = function (error) {\n return {\n errorMessage: error,\n type: Html5QrcodeErrorTypes.UNKWOWN_ERROR\n };\n };\n return Html5QrcodeErrorFactory;\n}());\nexport { Html5QrcodeErrorFactory };\nvar BaseLoggger = (function () {\n function BaseLoggger(verbose) {\n this.verbose = verbose;\n }\n BaseLoggger.prototype.log = function (message) {\n if (this.verbose) {\n console.log(message);\n }\n };\n BaseLoggger.prototype.warn = function (message) {\n if (this.verbose) {\n console.warn(message);\n }\n };\n BaseLoggger.prototype.logError = function (message, isExperimental) {\n if (this.verbose || isExperimental === true) {\n console.error(message);\n }\n };\n BaseLoggger.prototype.logErrors = function (errors) {\n if (errors.length === 0) {\n throw \"Logger#logError called without arguments\";\n }\n if (this.verbose) {\n console.error(errors);\n }\n };\n return BaseLoggger;\n}());\nexport { BaseLoggger };\nexport function isNullOrUndefined(obj) {\n return (typeof obj === \"undefined\") || obj === null;\n}\nexport function clip(value, minValue, maxValue) {\n if (value > maxValue) {\n return maxValue;\n }\n if (value < minValue) {\n return minValue;\n }\n return value;\n}\n//# sourceMappingURL=core.js.map","var Html5QrcodeStrings = (function () {\n function Html5QrcodeStrings() {\n }\n Html5QrcodeStrings.codeParseError = function (exception) {\n return \"QR code parse error, error = \".concat(exception);\n };\n Html5QrcodeStrings.errorGettingUserMedia = function (error) {\n return \"Error getting userMedia, error = \".concat(error);\n };\n Html5QrcodeStrings.onlyDeviceSupportedError = function () {\n return \"The device doesn't support navigator.mediaDevices , only \"\n + \"supported cameraIdOrConfig in this case is deviceId parameter \"\n + \"(string).\";\n };\n Html5QrcodeStrings.cameraStreamingNotSupported = function () {\n return \"Camera streaming not supported by the browser.\";\n };\n Html5QrcodeStrings.unableToQuerySupportedDevices = function () {\n return \"Unable to query supported devices, unknown error.\";\n };\n Html5QrcodeStrings.insecureContextCameraQueryError = function () {\n return \"Camera access is only supported in secure context like https \"\n + \"or localhost.\";\n };\n Html5QrcodeStrings.scannerPaused = function () {\n return \"Scanner paused\";\n };\n return Html5QrcodeStrings;\n}());\nexport { Html5QrcodeStrings };\nvar Html5QrcodeScannerStrings = (function () {\n function Html5QrcodeScannerStrings() {\n }\n Html5QrcodeScannerStrings.scanningStatus = function () {\n return \"Scanning\";\n };\n Html5QrcodeScannerStrings.idleStatus = function () {\n return \"Idle\";\n };\n Html5QrcodeScannerStrings.errorStatus = function () {\n return \"Error\";\n };\n Html5QrcodeScannerStrings.permissionStatus = function () {\n return \"Permission\";\n };\n Html5QrcodeScannerStrings.noCameraFoundErrorStatus = function () {\n return \"No Cameras\";\n };\n Html5QrcodeScannerStrings.lastMatch = function (decodedText) {\n return \"Last Match: \".concat(decodedText);\n };\n Html5QrcodeScannerStrings.codeScannerTitle = function () {\n return \"Code Scanner\";\n };\n Html5QrcodeScannerStrings.cameraPermissionTitle = function () {\n return \"Request Camera Permissions\";\n };\n Html5QrcodeScannerStrings.cameraPermissionRequesting = function () {\n return \"Requesting camera permissions...\";\n };\n Html5QrcodeScannerStrings.noCameraFound = function () {\n return \"No camera found\";\n };\n Html5QrcodeScannerStrings.scanButtonStopScanningText = function () {\n return \"Stop Scanning\";\n };\n Html5QrcodeScannerStrings.scanButtonStartScanningText = function () {\n return \"Start Scanning\";\n };\n Html5QrcodeScannerStrings.torchOnButton = function () {\n return \"Switch On Torch\";\n };\n Html5QrcodeScannerStrings.torchOffButton = function () {\n return \"Switch Off Torch\";\n };\n Html5QrcodeScannerStrings.torchOnFailedMessage = function () {\n return \"Failed to turn on torch\";\n };\n Html5QrcodeScannerStrings.torchOffFailedMessage = function () {\n return \"Failed to turn off torch\";\n };\n Html5QrcodeScannerStrings.scanButtonScanningStarting = function () {\n return \"Launching Camera...\";\n };\n Html5QrcodeScannerStrings.textIfCameraScanSelected = function () {\n return \"Scan an Image File\";\n };\n Html5QrcodeScannerStrings.textIfFileScanSelected = function () {\n return \"Scan using camera directly\";\n };\n Html5QrcodeScannerStrings.selectCamera = function () {\n return \"Select Camera\";\n };\n Html5QrcodeScannerStrings.fileSelectionChooseImage = function () {\n return \"Choose Image\";\n };\n Html5QrcodeScannerStrings.fileSelectionChooseAnother = function () {\n return \"Choose Another\";\n };\n Html5QrcodeScannerStrings.fileSelectionNoImageSelected = function () {\n return \"No image choosen\";\n };\n Html5QrcodeScannerStrings.anonymousCameraPrefix = function () {\n return \"Anonymous Camera\";\n };\n Html5QrcodeScannerStrings.dragAndDropMessage = function () {\n return \"Or drop an image to scan\";\n };\n Html5QrcodeScannerStrings.dragAndDropMessageOnlyImages = function () {\n return \"Or drop an image to scan (other files not supported)\";\n };\n Html5QrcodeScannerStrings.zoom = function () {\n return \"zoom\";\n };\n Html5QrcodeScannerStrings.loadingImage = function () {\n return \"Loading image...\";\n };\n Html5QrcodeScannerStrings.cameraScanAltText = function () {\n return \"Camera based scan\";\n };\n Html5QrcodeScannerStrings.fileScanAltText = function () {\n return \"Fule based scan\";\n };\n return Html5QrcodeScannerStrings;\n}());\nexport { Html5QrcodeScannerStrings };\nvar LibraryInfoStrings = (function () {\n function LibraryInfoStrings() {\n }\n LibraryInfoStrings.poweredBy = function () {\n return \"Powered by \";\n };\n LibraryInfoStrings.reportIssues = function () {\n return \"Report issues\";\n };\n return LibraryInfoStrings;\n}());\nexport { LibraryInfoStrings };\n//# sourceMappingURL=strings.js.map","var VideoConstraintsUtil = (function () {\n function VideoConstraintsUtil() {\n }\n VideoConstraintsUtil.isMediaStreamConstraintsValid = function (videoConstraints, logger) {\n if (typeof videoConstraints !== \"object\") {\n var typeofVideoConstraints = typeof videoConstraints;\n logger.logError(\"videoConstraints should be of type object, the \"\n + \"object passed is of type \".concat(typeofVideoConstraints, \".\"), true);\n return false;\n }\n var bannedKeys = [\n \"autoGainControl\",\n \"channelCount\",\n \"echoCancellation\",\n \"latency\",\n \"noiseSuppression\",\n \"sampleRate\",\n \"sampleSize\",\n \"volume\"\n ];\n var bannedkeysSet = new Set(bannedKeys);\n var keysInVideoConstraints = Object.keys(videoConstraints);\n for (var _i = 0, keysInVideoConstraints_1 = keysInVideoConstraints; _i < keysInVideoConstraints_1.length; _i++) {\n var key = keysInVideoConstraints_1[_i];\n if (bannedkeysSet.has(key)) {\n logger.logError(\"\".concat(key, \" is not supported videoConstaints.\"), true);\n return false;\n }\n }\n return true;\n };\n return VideoConstraintsUtil;\n}());\nexport { VideoConstraintsUtil };\n//# sourceMappingURL=utils.js.map","import * as ZXing from \"../third_party/zxing-js.umd\";\nimport { QrcodeResultFormat, Html5QrcodeSupportedFormats } from \"./core\";\nvar ZXingHtml5QrcodeDecoder = (function () {\n function ZXingHtml5QrcodeDecoder(requestedFormats, verbose, logger) {\n this.formatMap = new Map([\n [Html5QrcodeSupportedFormats.QR_CODE, ZXing.BarcodeFormat.QR_CODE],\n [Html5QrcodeSupportedFormats.AZTEC, ZXing.BarcodeFormat.AZTEC],\n [Html5QrcodeSupportedFormats.CODABAR, ZXing.BarcodeFormat.CODABAR],\n [Html5QrcodeSupportedFormats.CODE_39, ZXing.BarcodeFormat.CODE_39],\n [Html5QrcodeSupportedFormats.CODE_93, ZXing.BarcodeFormat.CODE_93],\n [\n Html5QrcodeSupportedFormats.CODE_128,\n ZXing.BarcodeFormat.CODE_128\n ],\n [\n Html5QrcodeSupportedFormats.DATA_MATRIX,\n ZXing.BarcodeFormat.DATA_MATRIX\n ],\n [\n Html5QrcodeSupportedFormats.MAXICODE,\n ZXing.BarcodeFormat.MAXICODE\n ],\n [Html5QrcodeSupportedFormats.ITF, ZXing.BarcodeFormat.ITF],\n [Html5QrcodeSupportedFormats.EAN_13, ZXing.BarcodeFormat.EAN_13],\n [Html5QrcodeSupportedFormats.EAN_8, ZXing.BarcodeFormat.EAN_8],\n [Html5QrcodeSupportedFormats.PDF_417, ZXing.BarcodeFormat.PDF_417],\n [Html5QrcodeSupportedFormats.RSS_14, ZXing.BarcodeFormat.RSS_14],\n [\n Html5QrcodeSupportedFormats.RSS_EXPANDED,\n ZXing.BarcodeFormat.RSS_EXPANDED\n ],\n [Html5QrcodeSupportedFormats.UPC_A, ZXing.BarcodeFormat.UPC_A],\n [Html5QrcodeSupportedFormats.UPC_E, ZXing.BarcodeFormat.UPC_E],\n [\n Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION,\n ZXing.BarcodeFormat.UPC_EAN_EXTENSION\n ]\n ]);\n this.reverseFormatMap = this.createReverseFormatMap();\n if (!ZXing) {\n throw \"Use html5qrcode.min.js without edit, ZXing not found.\";\n }\n this.verbose = verbose;\n this.logger = logger;\n var formats = this.createZXingFormats(requestedFormats);\n var hints = new Map();\n hints.set(ZXing.DecodeHintType.POSSIBLE_FORMATS, formats);\n hints.set(ZXing.DecodeHintType.TRY_HARDER, false);\n this.hints = hints;\n }\n ZXingHtml5QrcodeDecoder.prototype.decodeAsync = function (canvas) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n resolve(_this.decode(canvas));\n }\n catch (error) {\n reject(error);\n }\n });\n };\n ZXingHtml5QrcodeDecoder.prototype.decode = function (canvas) {\n var zxingDecoder = new ZXing.MultiFormatReader(this.verbose, this.hints);\n var luminanceSource = new ZXing.HTMLCanvasElementLuminanceSource(canvas);\n var binaryBitmap = new ZXing.BinaryBitmap(new ZXing.HybridBinarizer(luminanceSource));\n var result = zxingDecoder.decode(binaryBitmap);\n return {\n text: result.text,\n format: QrcodeResultFormat.create(this.toHtml5QrcodeSupportedFormats(result.format)),\n debugData: this.createDebugData()\n };\n };\n ZXingHtml5QrcodeDecoder.prototype.createReverseFormatMap = function () {\n var result = new Map();\n this.formatMap.forEach(function (value, key, _) {\n result.set(value, key);\n });\n return result;\n };\n ZXingHtml5QrcodeDecoder.prototype.toHtml5QrcodeSupportedFormats = function (zxingFormat) {\n if (!this.reverseFormatMap.has(zxingFormat)) {\n throw \"reverseFormatMap doesn't have \".concat(zxingFormat);\n }\n return this.reverseFormatMap.get(zxingFormat);\n };\n ZXingHtml5QrcodeDecoder.prototype.createZXingFormats = function (requestedFormats) {\n var zxingFormats = [];\n for (var _i = 0, requestedFormats_1 = requestedFormats; _i < requestedFormats_1.length; _i++) {\n var requestedFormat = requestedFormats_1[_i];\n if (this.formatMap.has(requestedFormat)) {\n zxingFormats.push(this.formatMap.get(requestedFormat));\n }\n else {\n this.logger.logError(\"\".concat(requestedFormat, \" is not supported by\")\n + \"ZXingHtml5QrcodeShim\");\n }\n }\n return zxingFormats;\n };\n ZXingHtml5QrcodeDecoder.prototype.createDebugData = function () {\n return { decoderName: \"zxing-js\" };\n };\n return ZXingHtml5QrcodeDecoder;\n}());\nexport { ZXingHtml5QrcodeDecoder };\n//# sourceMappingURL=zxing-html5-qrcode-decoder.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { QrcodeResultFormat, Html5QrcodeSupportedFormats } from \"./core\";\nvar BarcodeDetectorDelegate = (function () {\n function BarcodeDetectorDelegate(requestedFormats, verbose, logger) {\n this.formatMap = new Map([\n [Html5QrcodeSupportedFormats.QR_CODE, \"qr_code\"],\n [Html5QrcodeSupportedFormats.AZTEC, \"aztec\"],\n [Html5QrcodeSupportedFormats.CODABAR, \"codabar\"],\n [Html5QrcodeSupportedFormats.CODE_39, \"code_39\"],\n [Html5QrcodeSupportedFormats.CODE_93, \"code_93\"],\n [Html5QrcodeSupportedFormats.CODE_128, \"code_128\"],\n [Html5QrcodeSupportedFormats.DATA_MATRIX, \"data_matrix\"],\n [Html5QrcodeSupportedFormats.ITF, \"itf\"],\n [Html5QrcodeSupportedFormats.EAN_13, \"ean_13\"],\n [Html5QrcodeSupportedFormats.EAN_8, \"ean_8\"],\n [Html5QrcodeSupportedFormats.PDF_417, \"pdf417\"],\n [Html5QrcodeSupportedFormats.UPC_A, \"upc_a\"],\n [Html5QrcodeSupportedFormats.UPC_E, \"upc_e\"]\n ]);\n this.reverseFormatMap = this.createReverseFormatMap();\n if (!BarcodeDetectorDelegate.isSupported()) {\n throw \"Use html5qrcode.min.js without edit, Use \"\n + \"BarcodeDetectorDelegate only if it isSupported();\";\n }\n this.verbose = verbose;\n this.logger = logger;\n var formats = this.createBarcodeDetectorFormats(requestedFormats);\n this.detector = new BarcodeDetector(formats);\n if (!this.detector) {\n throw \"BarcodeDetector detector not supported\";\n }\n }\n BarcodeDetectorDelegate.isSupported = function () {\n if (!(\"BarcodeDetector\" in window)) {\n return false;\n }\n var dummyDetector = new BarcodeDetector({ formats: [\"qr_code\"] });\n return typeof dummyDetector !== \"undefined\";\n };\n BarcodeDetectorDelegate.prototype.decodeAsync = function (canvas) {\n return __awaiter(this, void 0, void 0, function () {\n var barcodes, largestBarcode;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, this.detector.detect(canvas)];\n case 1:\n barcodes = _a.sent();\n if (!barcodes || barcodes.length === 0) {\n throw \"No barcode or QR code detected.\";\n }\n largestBarcode = this.selectLargestBarcode(barcodes);\n return [2, {\n text: largestBarcode.rawValue,\n format: QrcodeResultFormat.create(this.toHtml5QrcodeSupportedFormats(largestBarcode.format)),\n debugData: this.createDebugData()\n }];\n }\n });\n });\n };\n BarcodeDetectorDelegate.prototype.selectLargestBarcode = function (barcodes) {\n var largestBarcode = null;\n var maxArea = 0;\n for (var _i = 0, barcodes_1 = barcodes; _i < barcodes_1.length; _i++) {\n var barcode = barcodes_1[_i];\n var area = barcode.boundingBox.width * barcode.boundingBox.height;\n if (area > maxArea) {\n maxArea = area;\n largestBarcode = barcode;\n }\n }\n if (!largestBarcode) {\n throw \"No largest barcode found\";\n }\n return largestBarcode;\n };\n BarcodeDetectorDelegate.prototype.createBarcodeDetectorFormats = function (requestedFormats) {\n var formats = [];\n for (var _i = 0, requestedFormats_1 = requestedFormats; _i < requestedFormats_1.length; _i++) {\n var requestedFormat = requestedFormats_1[_i];\n if (this.formatMap.has(requestedFormat)) {\n formats.push(this.formatMap.get(requestedFormat));\n }\n else {\n this.logger.warn(\"\".concat(requestedFormat, \" is not supported by\")\n + \"BarcodeDetectorDelegate\");\n }\n }\n return { formats: formats };\n };\n BarcodeDetectorDelegate.prototype.toHtml5QrcodeSupportedFormats = function (barcodeDetectorFormat) {\n if (!this.reverseFormatMap.has(barcodeDetectorFormat)) {\n throw \"reverseFormatMap doesn't have \".concat(barcodeDetectorFormat);\n }\n return this.reverseFormatMap.get(barcodeDetectorFormat);\n };\n BarcodeDetectorDelegate.prototype.createReverseFormatMap = function () {\n var result = new Map();\n this.formatMap.forEach(function (value, key, _) {\n result.set(value, key);\n });\n return result;\n };\n BarcodeDetectorDelegate.prototype.createDebugData = function () {\n return { decoderName: \"BarcodeDetector\" };\n };\n return BarcodeDetectorDelegate;\n}());\nexport { BarcodeDetectorDelegate };\n//# sourceMappingURL=native-bar-code-detector.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { ZXingHtml5QrcodeDecoder } from \"./zxing-html5-qrcode-decoder\";\nimport { BarcodeDetectorDelegate } from \"./native-bar-code-detector\";\nvar Html5QrcodeShim = (function () {\n function Html5QrcodeShim(requestedFormats, useBarCodeDetectorIfSupported, verbose, logger) {\n this.EXECUTIONS_TO_REPORT_PERFORMANCE = 100;\n this.executions = 0;\n this.executionResults = [];\n this.wasPrimaryDecoderUsedInLastDecode = false;\n this.verbose = verbose;\n if (useBarCodeDetectorIfSupported\n && BarcodeDetectorDelegate.isSupported()) {\n this.primaryDecoder = new BarcodeDetectorDelegate(requestedFormats, verbose, logger);\n this.secondaryDecoder = new ZXingHtml5QrcodeDecoder(requestedFormats, verbose, logger);\n }\n else {\n this.primaryDecoder = new ZXingHtml5QrcodeDecoder(requestedFormats, verbose, logger);\n }\n }\n Html5QrcodeShim.prototype.decodeAsync = function (canvas) {\n return __awaiter(this, void 0, void 0, function () {\n var startTime;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = performance.now();\n _a.label = 1;\n case 1:\n _a.trys.push([1, , 3, 4]);\n return [4, this.getDecoder().decodeAsync(canvas)];\n case 2: return [2, _a.sent()];\n case 3:\n this.possiblyLogPerformance(startTime);\n return [7];\n case 4: return [2];\n }\n });\n });\n };\n Html5QrcodeShim.prototype.decodeRobustlyAsync = function (canvas) {\n return __awaiter(this, void 0, void 0, function () {\n var startTime, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = performance.now();\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, 4, 5]);\n return [4, this.primaryDecoder.decodeAsync(canvas)];\n case 2: return [2, _a.sent()];\n case 3:\n error_1 = _a.sent();\n if (this.secondaryDecoder) {\n return [2, this.secondaryDecoder.decodeAsync(canvas)];\n }\n throw error_1;\n case 4:\n this.possiblyLogPerformance(startTime);\n return [7];\n case 5: return [2];\n }\n });\n });\n };\n Html5QrcodeShim.prototype.getDecoder = function () {\n if (!this.secondaryDecoder) {\n return this.primaryDecoder;\n }\n if (this.wasPrimaryDecoderUsedInLastDecode === false) {\n this.wasPrimaryDecoderUsedInLastDecode = true;\n return this.primaryDecoder;\n }\n this.wasPrimaryDecoderUsedInLastDecode = false;\n return this.secondaryDecoder;\n };\n Html5QrcodeShim.prototype.possiblyLogPerformance = function (startTime) {\n if (!this.verbose) {\n return;\n }\n var executionTime = performance.now() - startTime;\n this.executionResults.push(executionTime);\n this.executions++;\n this.possiblyFlushPerformanceReport();\n };\n Html5QrcodeShim.prototype.possiblyFlushPerformanceReport = function () {\n if (this.executions < this.EXECUTIONS_TO_REPORT_PERFORMANCE) {\n return;\n }\n var sum = 0;\n for (var _i = 0, _a = this.executionResults; _i < _a.length; _i++) {\n var executionTime = _a[_i];\n sum += executionTime;\n }\n var mean = sum / this.executionResults.length;\n console.log(\"\".concat(mean, \" ms for \").concat(this.executionResults.length, \" last runs.\"));\n this.executions = 0;\n this.executionResults = [];\n };\n return Html5QrcodeShim;\n}());\nexport { Html5QrcodeShim };\n//# sourceMappingURL=code-decoder.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar AbstractCameraCapability = (function () {\n function AbstractCameraCapability(name, track) {\n this.name = name;\n this.track = track;\n }\n AbstractCameraCapability.prototype.isSupported = function () {\n if (!this.track.getCapabilities) {\n return false;\n }\n return this.name in this.track.getCapabilities();\n };\n AbstractCameraCapability.prototype.apply = function (value) {\n var constraint = {};\n constraint[this.name] = value;\n var constraints = { advanced: [constraint] };\n return this.track.applyConstraints(constraints);\n };\n AbstractCameraCapability.prototype.value = function () {\n var settings = this.track.getSettings();\n if (this.name in settings) {\n var settingValue = settings[this.name];\n return settingValue;\n }\n return null;\n };\n return AbstractCameraCapability;\n}());\nvar AbstractRangeCameraCapability = (function (_super) {\n __extends(AbstractRangeCameraCapability, _super);\n function AbstractRangeCameraCapability(name, track) {\n return _super.call(this, name, track) || this;\n }\n AbstractRangeCameraCapability.prototype.min = function () {\n return this.getCapabilities().min;\n };\n AbstractRangeCameraCapability.prototype.max = function () {\n return this.getCapabilities().max;\n };\n AbstractRangeCameraCapability.prototype.step = function () {\n return this.getCapabilities().step;\n };\n AbstractRangeCameraCapability.prototype.apply = function (value) {\n var constraint = {};\n constraint[this.name] = value;\n var constraints = { advanced: [constraint] };\n return this.track.applyConstraints(constraints);\n };\n AbstractRangeCameraCapability.prototype.getCapabilities = function () {\n this.failIfNotSupported();\n var capabilities = this.track.getCapabilities();\n var capability = capabilities[this.name];\n return {\n min: capability.min,\n max: capability.max,\n step: capability.step,\n };\n };\n AbstractRangeCameraCapability.prototype.failIfNotSupported = function () {\n if (!this.isSupported()) {\n throw new Error(\"\".concat(this.name, \" capability not supported\"));\n }\n };\n return AbstractRangeCameraCapability;\n}(AbstractCameraCapability));\nvar ZoomFeatureImpl = (function (_super) {\n __extends(ZoomFeatureImpl, _super);\n function ZoomFeatureImpl(track) {\n return _super.call(this, \"zoom\", track) || this;\n }\n return ZoomFeatureImpl;\n}(AbstractRangeCameraCapability));\nvar TorchFeatureImpl = (function (_super) {\n __extends(TorchFeatureImpl, _super);\n function TorchFeatureImpl(track) {\n return _super.call(this, \"torch\", track) || this;\n }\n return TorchFeatureImpl;\n}(AbstractCameraCapability));\nvar CameraCapabilitiesImpl = (function () {\n function CameraCapabilitiesImpl(track) {\n this.track = track;\n }\n CameraCapabilitiesImpl.prototype.zoomFeature = function () {\n return new ZoomFeatureImpl(this.track);\n };\n CameraCapabilitiesImpl.prototype.torchFeature = function () {\n return new TorchFeatureImpl(this.track);\n };\n return CameraCapabilitiesImpl;\n}());\nvar RenderedCameraImpl = (function () {\n function RenderedCameraImpl(parentElement, mediaStream, callbacks) {\n this.isClosed = false;\n this.parentElement = parentElement;\n this.mediaStream = mediaStream;\n this.callbacks = callbacks;\n this.surface = this.createVideoElement(this.parentElement.clientWidth);\n parentElement.append(this.surface);\n }\n RenderedCameraImpl.prototype.createVideoElement = function (width) {\n var videoElement = document.createElement(\"video\");\n videoElement.style.width = \"\".concat(width, \"px\");\n videoElement.style.display = \"block\";\n videoElement.muted = true;\n videoElement.setAttribute(\"muted\", \"true\");\n videoElement.playsInline = true;\n return videoElement;\n };\n RenderedCameraImpl.prototype.setupSurface = function () {\n var _this = this;\n this.surface.onabort = function () {\n throw \"RenderedCameraImpl video surface onabort() called\";\n };\n this.surface.onerror = function () {\n throw \"RenderedCameraImpl video surface onerror() called\";\n };\n var onVideoStart = function () {\n var videoWidth = _this.surface.clientWidth;\n var videoHeight = _this.surface.clientHeight;\n _this.callbacks.onRenderSurfaceReady(videoWidth, videoHeight);\n _this.surface.removeEventListener(\"playing\", onVideoStart);\n };\n this.surface.addEventListener(\"playing\", onVideoStart);\n this.surface.srcObject = this.mediaStream;\n this.surface.play();\n };\n RenderedCameraImpl.create = function (parentElement, mediaStream, options, callbacks) {\n return __awaiter(this, void 0, void 0, function () {\n var renderedCamera, aspectRatioConstraint;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n renderedCamera = new RenderedCameraImpl(parentElement, mediaStream, callbacks);\n if (!options.aspectRatio) return [3, 2];\n aspectRatioConstraint = {\n aspectRatio: options.aspectRatio\n };\n return [4, renderedCamera.getFirstTrackOrFail().applyConstraints(aspectRatioConstraint)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n renderedCamera.setupSurface();\n return [2, renderedCamera];\n }\n });\n });\n };\n RenderedCameraImpl.prototype.failIfClosed = function () {\n if (this.isClosed) {\n throw \"The RenderedCamera has already been closed.\";\n }\n };\n RenderedCameraImpl.prototype.getFirstTrackOrFail = function () {\n this.failIfClosed();\n if (this.mediaStream.getVideoTracks().length === 0) {\n throw \"No video tracks found\";\n }\n return this.mediaStream.getVideoTracks()[0];\n };\n RenderedCameraImpl.prototype.pause = function () {\n this.failIfClosed();\n this.surface.pause();\n };\n RenderedCameraImpl.prototype.resume = function (onResumeCallback) {\n this.failIfClosed();\n var $this = this;\n var onVideoResume = function () {\n setTimeout(onResumeCallback, 200);\n $this.surface.removeEventListener(\"playing\", onVideoResume);\n };\n this.surface.addEventListener(\"playing\", onVideoResume);\n this.surface.play();\n };\n RenderedCameraImpl.prototype.isPaused = function () {\n this.failIfClosed();\n return this.surface.paused;\n };\n RenderedCameraImpl.prototype.getSurface = function () {\n this.failIfClosed();\n return this.surface;\n };\n RenderedCameraImpl.prototype.getRunningTrackCapabilities = function () {\n return this.getFirstTrackOrFail().getCapabilities();\n };\n RenderedCameraImpl.prototype.getRunningTrackSettings = function () {\n return this.getFirstTrackOrFail().getSettings();\n };\n RenderedCameraImpl.prototype.applyVideoConstraints = function (constraints) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (\"aspectRatio\" in constraints) {\n throw \"Changing 'aspectRatio' in run-time is not yet supported.\";\n }\n return [2, this.getFirstTrackOrFail().applyConstraints(constraints)];\n });\n });\n };\n RenderedCameraImpl.prototype.close = function () {\n if (this.isClosed) {\n return Promise.resolve();\n }\n var $this = this;\n return new Promise(function (resolve, _) {\n var tracks = $this.mediaStream.getVideoTracks();\n var tracksToClose = tracks.length;\n var tracksClosed = 0;\n $this.mediaStream.getVideoTracks().forEach(function (videoTrack) {\n $this.mediaStream.removeTrack(videoTrack);\n videoTrack.stop();\n ++tracksClosed;\n if (tracksClosed >= tracksToClose) {\n $this.isClosed = true;\n $this.parentElement.removeChild($this.surface);\n resolve();\n }\n });\n });\n };\n RenderedCameraImpl.prototype.getCapabilities = function () {\n return new CameraCapabilitiesImpl(this.getFirstTrackOrFail());\n };\n return RenderedCameraImpl;\n}());\nvar CameraImpl = (function () {\n function CameraImpl(mediaStream) {\n this.mediaStream = mediaStream;\n }\n CameraImpl.prototype.render = function (parentElement, options, callbacks) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2, RenderedCameraImpl.create(parentElement, this.mediaStream, options, callbacks)];\n });\n });\n };\n CameraImpl.create = function (videoConstraints) {\n return __awaiter(this, void 0, void 0, function () {\n var constraints, mediaStream;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!navigator.mediaDevices) {\n throw \"navigator.mediaDevices not supported\";\n }\n constraints = {\n audio: false,\n video: videoConstraints\n };\n return [4, navigator.mediaDevices.getUserMedia(constraints)];\n case 1:\n mediaStream = _a.sent();\n return [2, new CameraImpl(mediaStream)];\n }\n });\n });\n };\n return CameraImpl;\n}());\nexport { CameraImpl };\n//# sourceMappingURL=core-impl.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { CameraImpl } from \"./core-impl\";\nvar CameraFactory = (function () {\n function CameraFactory() {\n }\n CameraFactory.failIfNotSupported = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!navigator.mediaDevices) {\n throw \"navigator.mediaDevices not supported\";\n }\n return [2, new CameraFactory()];\n });\n });\n };\n CameraFactory.prototype.create = function (videoConstraints) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2, CameraImpl.create(videoConstraints)];\n });\n });\n };\n return CameraFactory;\n}());\nexport { CameraFactory };\n//# sourceMappingURL=factories.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Html5QrcodeStrings } from \"../strings\";\nvar CameraRetriever = (function () {\n function CameraRetriever() {\n }\n CameraRetriever.retrieve = function () {\n if (navigator.mediaDevices) {\n return CameraRetriever.getCamerasFromMediaDevices();\n }\n var mst = MediaStreamTrack;\n if (MediaStreamTrack && mst.getSources) {\n return CameraRetriever.getCamerasFromMediaStreamTrack();\n }\n return CameraRetriever.rejectWithError();\n };\n CameraRetriever.rejectWithError = function () {\n var errorMessage = Html5QrcodeStrings.unableToQuerySupportedDevices();\n if (!CameraRetriever.isHttpsOrLocalhost()) {\n errorMessage = Html5QrcodeStrings.insecureContextCameraQueryError();\n }\n return Promise.reject(errorMessage);\n };\n CameraRetriever.isHttpsOrLocalhost = function () {\n if (location.protocol === \"https:\") {\n return true;\n }\n var host = location.host.split(\":\")[0];\n return host === \"127.0.0.1\" || host === \"localhost\";\n };\n CameraRetriever.getCamerasFromMediaDevices = function () {\n return __awaiter(this, void 0, void 0, function () {\n var closeActiveStreams, mediaStream, devices, results, _i, devices_1, device;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n closeActiveStreams = function (stream) {\n var tracks = stream.getVideoTracks();\n for (var _i = 0, tracks_1 = tracks; _i < tracks_1.length; _i++) {\n var track = tracks_1[_i];\n track.enabled = false;\n track.stop();\n stream.removeTrack(track);\n }\n };\n return [4, navigator.mediaDevices.getUserMedia({ audio: false, video: true })];\n case 1:\n mediaStream = _a.sent();\n return [4, navigator.mediaDevices.enumerateDevices()];\n case 2:\n devices = _a.sent();\n results = [];\n for (_i = 0, devices_1 = devices; _i < devices_1.length; _i++) {\n device = devices_1[_i];\n if (device.kind === \"videoinput\") {\n results.push({\n id: device.deviceId,\n label: device.label\n });\n }\n }\n closeActiveStreams(mediaStream);\n return [2, results];\n }\n });\n });\n };\n CameraRetriever.getCamerasFromMediaStreamTrack = function () {\n return new Promise(function (resolve, _) {\n var callback = function (sourceInfos) {\n var results = [];\n for (var _i = 0, sourceInfos_1 = sourceInfos; _i < sourceInfos_1.length; _i++) {\n var sourceInfo = sourceInfos_1[_i];\n if (sourceInfo.kind === \"video\") {\n results.push({\n id: sourceInfo.id,\n label: sourceInfo.label\n });\n }\n }\n resolve(results);\n };\n var mst = MediaStreamTrack;\n mst.getSources(callback);\n });\n };\n return CameraRetriever;\n}());\nexport { CameraRetriever };\n//# sourceMappingURL=retriever.js.map","export var Html5QrcodeScannerState;\n(function (Html5QrcodeScannerState) {\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"NOT_STARTED\"] = 1] = \"NOT_STARTED\";\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"SCANNING\"] = 2] = \"SCANNING\";\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"PAUSED\"] = 3] = \"PAUSED\";\n})(Html5QrcodeScannerState || (Html5QrcodeScannerState = {}));\nvar StateManagerImpl = (function () {\n function StateManagerImpl() {\n this.state = Html5QrcodeScannerState.NOT_STARTED;\n this.onGoingTransactionNewState = Html5QrcodeScannerState.UNKNOWN;\n }\n StateManagerImpl.prototype.directTransition = function (newState) {\n this.failIfTransitionOngoing();\n this.validateTransition(newState);\n this.state = newState;\n };\n StateManagerImpl.prototype.startTransition = function (newState) {\n this.failIfTransitionOngoing();\n this.validateTransition(newState);\n this.onGoingTransactionNewState = newState;\n return this;\n };\n StateManagerImpl.prototype.execute = function () {\n if (this.onGoingTransactionNewState\n === Html5QrcodeScannerState.UNKNOWN) {\n throw \"Transaction is already cancelled, cannot execute().\";\n }\n var tempNewState = this.onGoingTransactionNewState;\n this.onGoingTransactionNewState = Html5QrcodeScannerState.UNKNOWN;\n this.directTransition(tempNewState);\n };\n StateManagerImpl.prototype.cancel = function () {\n if (this.onGoingTransactionNewState\n === Html5QrcodeScannerState.UNKNOWN) {\n throw \"Transaction is already cancelled, cannot cancel().\";\n }\n this.onGoingTransactionNewState = Html5QrcodeScannerState.UNKNOWN;\n };\n StateManagerImpl.prototype.getState = function () {\n return this.state;\n };\n StateManagerImpl.prototype.failIfTransitionOngoing = function () {\n if (this.onGoingTransactionNewState\n !== Html5QrcodeScannerState.UNKNOWN) {\n throw \"Cannot transition to a new state, already under transition\";\n }\n };\n StateManagerImpl.prototype.validateTransition = function (newState) {\n switch (this.state) {\n case Html5QrcodeScannerState.UNKNOWN:\n throw \"Transition from unknown is not allowed\";\n case Html5QrcodeScannerState.NOT_STARTED:\n this.failIfNewStateIs(newState, [Html5QrcodeScannerState.PAUSED]);\n break;\n case Html5QrcodeScannerState.SCANNING:\n break;\n case Html5QrcodeScannerState.PAUSED:\n break;\n }\n };\n StateManagerImpl.prototype.failIfNewStateIs = function (newState, disallowedStatesToTransition) {\n for (var _i = 0, disallowedStatesToTransition_1 = disallowedStatesToTransition; _i < disallowedStatesToTransition_1.length; _i++) {\n var disallowedState = disallowedStatesToTransition_1[_i];\n if (newState === disallowedState) {\n throw \"Cannot transition from \".concat(this.state, \" to \").concat(newState);\n }\n }\n };\n return StateManagerImpl;\n}());\nvar StateManagerProxy = (function () {\n function StateManagerProxy(stateManager) {\n this.stateManager = stateManager;\n }\n StateManagerProxy.prototype.startTransition = function (newState) {\n return this.stateManager.startTransition(newState);\n };\n StateManagerProxy.prototype.directTransition = function (newState) {\n this.stateManager.directTransition(newState);\n };\n StateManagerProxy.prototype.getState = function () {\n return this.stateManager.getState();\n };\n StateManagerProxy.prototype.canScanFile = function () {\n return this.stateManager.getState() === Html5QrcodeScannerState.NOT_STARTED;\n };\n StateManagerProxy.prototype.isScanning = function () {\n return this.stateManager.getState() !== Html5QrcodeScannerState.NOT_STARTED;\n };\n StateManagerProxy.prototype.isStrictlyScanning = function () {\n return this.stateManager.getState() === Html5QrcodeScannerState.SCANNING;\n };\n StateManagerProxy.prototype.isPaused = function () {\n return this.stateManager.getState() === Html5QrcodeScannerState.PAUSED;\n };\n return StateManagerProxy;\n}());\nexport { StateManagerProxy };\nvar StateManagerFactory = (function () {\n function StateManagerFactory() {\n }\n StateManagerFactory.create = function () {\n return new StateManagerProxy(new StateManagerImpl());\n };\n return StateManagerFactory;\n}());\nexport { StateManagerFactory };\n//# sourceMappingURL=state-manager.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BaseLoggger, Html5QrcodeResultFactory, Html5QrcodeErrorFactory, Html5QrcodeSupportedFormats, isValidHtml5QrcodeSupportedFormats, Html5QrcodeConstants, isNullOrUndefined } from \"./core\";\nimport { Html5QrcodeStrings } from \"./strings\";\nimport { VideoConstraintsUtil } from \"./utils\";\nimport { Html5QrcodeShim } from \"./code-decoder\";\nimport { CameraFactory } from \"./camera/factories\";\nimport { CameraRetriever } from \"./camera/retriever\";\nimport { StateManagerFactory, Html5QrcodeScannerState } from \"./state-manager\";\nvar Constants = (function (_super) {\n __extends(Constants, _super);\n function Constants() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Constants.DEFAULT_WIDTH = 300;\n Constants.DEFAULT_WIDTH_OFFSET = 2;\n Constants.FILE_SCAN_MIN_HEIGHT = 300;\n Constants.FILE_SCAN_HIDDEN_CANVAS_PADDING = 100;\n Constants.MIN_QR_BOX_SIZE = 50;\n Constants.SHADED_LEFT = 1;\n Constants.SHADED_RIGHT = 2;\n Constants.SHADED_TOP = 3;\n Constants.SHADED_BOTTOM = 4;\n Constants.SHADED_REGION_ELEMENT_ID = \"qr-shaded-region\";\n Constants.VERBOSE = false;\n Constants.BORDER_SHADER_DEFAULT_COLOR = \"#ffffff\";\n Constants.BORDER_SHADER_MATCH_COLOR = \"rgb(90, 193, 56)\";\n return Constants;\n}(Html5QrcodeConstants));\nvar InternalHtml5QrcodeConfig = (function () {\n function InternalHtml5QrcodeConfig(config, logger) {\n this.logger = logger;\n this.fps = Constants.SCAN_DEFAULT_FPS;\n if (!config) {\n this.disableFlip = Constants.DEFAULT_DISABLE_FLIP;\n }\n else {\n if (config.fps) {\n this.fps = config.fps;\n }\n this.disableFlip = config.disableFlip === true;\n this.qrbox = config.qrbox;\n this.aspectRatio = config.aspectRatio;\n this.videoConstraints = config.videoConstraints;\n }\n }\n InternalHtml5QrcodeConfig.prototype.isMediaStreamConstraintsValid = function () {\n if (!this.videoConstraints) {\n this.logger.logError(\"Empty videoConstraints\", true);\n return false;\n }\n return VideoConstraintsUtil.isMediaStreamConstraintsValid(this.videoConstraints, this.logger);\n };\n InternalHtml5QrcodeConfig.prototype.isShadedBoxEnabled = function () {\n return !isNullOrUndefined(this.qrbox);\n };\n InternalHtml5QrcodeConfig.create = function (config, logger) {\n return new InternalHtml5QrcodeConfig(config, logger);\n };\n return InternalHtml5QrcodeConfig;\n}());\nvar Html5Qrcode = (function () {\n function Html5Qrcode(elementId, configOrVerbosityFlag) {\n this.element = null;\n this.canvasElement = null;\n this.scannerPausedUiElement = null;\n this.hasBorderShaders = null;\n this.borderShaders = null;\n this.qrMatch = null;\n this.renderedCamera = null;\n this.qrRegion = null;\n this.context = null;\n this.lastScanImageFile = null;\n this.isScanning = false;\n if (!document.getElementById(elementId)) {\n throw \"HTML Element with id=\".concat(elementId, \" not found\");\n }\n this.elementId = elementId;\n this.verbose = false;\n var experimentalFeatureConfig;\n var configObject;\n if (typeof configOrVerbosityFlag == \"boolean\") {\n this.verbose = configOrVerbosityFlag === true;\n }\n else if (configOrVerbosityFlag) {\n configObject = configOrVerbosityFlag;\n this.verbose = configObject.verbose === true;\n experimentalFeatureConfig = configObject.experimentalFeatures;\n }\n this.logger = new BaseLoggger(this.verbose);\n this.qrcode = new Html5QrcodeShim(this.getSupportedFormats(configOrVerbosityFlag), this.getUseBarCodeDetectorIfSupported(configObject), this.verbose, this.logger);\n this.foreverScanTimeout;\n this.shouldScan = true;\n this.stateManagerProxy = StateManagerFactory.create();\n }\n Html5Qrcode.prototype.start = function (cameraIdOrConfig, configuration, qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n if (!cameraIdOrConfig) {\n throw \"cameraIdOrConfig is required\";\n }\n if (!qrCodeSuccessCallback\n || typeof qrCodeSuccessCallback != \"function\") {\n throw \"qrCodeSuccessCallback is required and should be a function.\";\n }\n var qrCodeErrorCallbackInternal;\n if (qrCodeErrorCallback) {\n qrCodeErrorCallbackInternal = qrCodeErrorCallback;\n }\n else {\n qrCodeErrorCallbackInternal\n = this.verbose ? this.logger.log : function () { };\n }\n var internalConfig = InternalHtml5QrcodeConfig.create(configuration, this.logger);\n this.clearElement();\n var videoConstraintsAvailableAndValid = false;\n if (internalConfig.videoConstraints) {\n if (!internalConfig.isMediaStreamConstraintsValid()) {\n this.logger.logError(\"'videoConstraints' is not valid 'MediaStreamConstraints, \"\n + \"it will be ignored.'\", true);\n }\n else {\n videoConstraintsAvailableAndValid = true;\n }\n }\n var areVideoConstraintsEnabled = videoConstraintsAvailableAndValid;\n var element = document.getElementById(this.elementId);\n var rootElementWidth = element.clientWidth\n ? element.clientWidth : Constants.DEFAULT_WIDTH;\n element.style.position = \"relative\";\n this.shouldScan = true;\n this.element = element;\n var $this = this;\n var toScanningStateChangeTransaction = this.stateManagerProxy.startTransition(Html5QrcodeScannerState.SCANNING);\n return new Promise(function (resolve, reject) {\n var videoConstraints = areVideoConstraintsEnabled\n ? internalConfig.videoConstraints\n : $this.createVideoConstraints(cameraIdOrConfig);\n if (!videoConstraints) {\n toScanningStateChangeTransaction.cancel();\n reject(\"videoConstraints should be defined\");\n return;\n }\n var cameraRenderingOptions = {};\n if (!areVideoConstraintsEnabled || internalConfig.aspectRatio) {\n cameraRenderingOptions.aspectRatio = internalConfig.aspectRatio;\n }\n var renderingCallbacks = {\n onRenderSurfaceReady: function (viewfinderWidth, viewfinderHeight) {\n $this.setupUi(viewfinderWidth, viewfinderHeight, internalConfig);\n $this.isScanning = true;\n $this.foreverScan(internalConfig, qrCodeSuccessCallback, qrCodeErrorCallbackInternal);\n }\n };\n CameraFactory.failIfNotSupported().then(function (factory) {\n factory.create(videoConstraints).then(function (camera) {\n return camera.render(_this.element, cameraRenderingOptions, renderingCallbacks)\n .then(function (renderedCamera) {\n $this.renderedCamera = renderedCamera;\n toScanningStateChangeTransaction.execute();\n resolve(null);\n })\n .catch(function (error) {\n toScanningStateChangeTransaction.cancel();\n reject(error);\n });\n }).catch(function (error) {\n toScanningStateChangeTransaction.cancel();\n reject(Html5QrcodeStrings.errorGettingUserMedia(error));\n });\n }).catch(function (_) {\n toScanningStateChangeTransaction.cancel();\n reject(Html5QrcodeStrings.cameraStreamingNotSupported());\n });\n });\n };\n Html5Qrcode.prototype.pause = function (shouldPauseVideo) {\n if (!this.stateManagerProxy.isStrictlyScanning()) {\n throw \"Cannot pause, scanner is not scanning.\";\n }\n this.stateManagerProxy.directTransition(Html5QrcodeScannerState.PAUSED);\n this.showPausedState();\n if (isNullOrUndefined(shouldPauseVideo) || shouldPauseVideo !== true) {\n shouldPauseVideo = false;\n }\n if (shouldPauseVideo && this.renderedCamera) {\n this.renderedCamera.pause();\n }\n };\n Html5Qrcode.prototype.resume = function () {\n if (!this.stateManagerProxy.isPaused()) {\n throw \"Cannot result, scanner is not paused.\";\n }\n if (!this.renderedCamera) {\n throw \"renderedCamera doesn't exist while trying resume()\";\n }\n var $this = this;\n var transitionToScanning = function () {\n $this.stateManagerProxy.directTransition(Html5QrcodeScannerState.SCANNING);\n $this.hidePausedState();\n };\n if (!this.renderedCamera.isPaused()) {\n transitionToScanning();\n return;\n }\n this.renderedCamera.resume(function () {\n transitionToScanning();\n });\n };\n Html5Qrcode.prototype.getState = function () {\n return this.stateManagerProxy.getState();\n };\n Html5Qrcode.prototype.stop = function () {\n var _this = this;\n if (!this.stateManagerProxy.isScanning()) {\n throw \"Cannot stop, scanner is not running or paused.\";\n }\n var toStoppedStateTransaction = this.stateManagerProxy.startTransition(Html5QrcodeScannerState.NOT_STARTED);\n this.shouldScan = false;\n if (this.foreverScanTimeout) {\n clearTimeout(this.foreverScanTimeout);\n }\n var removeQrRegion = function () {\n if (!_this.element) {\n return;\n }\n var childElement = document.getElementById(Constants.SHADED_REGION_ELEMENT_ID);\n if (childElement) {\n _this.element.removeChild(childElement);\n }\n };\n var $this = this;\n return this.renderedCamera.close().then(function () {\n $this.renderedCamera = null;\n if ($this.element) {\n $this.element.removeChild($this.canvasElement);\n $this.canvasElement = null;\n }\n removeQrRegion();\n if ($this.qrRegion) {\n $this.qrRegion = null;\n }\n if ($this.context) {\n $this.context = null;\n }\n toStoppedStateTransaction.execute();\n $this.hidePausedState();\n $this.isScanning = false;\n return Promise.resolve();\n });\n };\n Html5Qrcode.prototype.scanFile = function (imageFile, showImage) {\n return this.scanFileV2(imageFile, showImage)\n .then(function (html5qrcodeResult) { return html5qrcodeResult.decodedText; });\n };\n Html5Qrcode.prototype.scanFileV2 = function (imageFile, showImage) {\n var _this = this;\n if (!imageFile || !(imageFile instanceof File)) {\n throw \"imageFile argument is mandatory and should be instance \"\n + \"of File. Use 'event.target.files[0]'.\";\n }\n if (isNullOrUndefined(showImage)) {\n showImage = true;\n }\n if (!this.stateManagerProxy.canScanFile()) {\n throw \"Cannot start file scan - ongoing camera scan\";\n }\n return new Promise(function (resolve, reject) {\n _this.possiblyCloseLastScanImageFile();\n _this.clearElement();\n _this.lastScanImageFile = URL.createObjectURL(imageFile);\n var inputImage = new Image;\n inputImage.onload = function () {\n var imageWidth = inputImage.width;\n var imageHeight = inputImage.height;\n var element = document.getElementById(_this.elementId);\n var containerWidth = element.clientWidth\n ? element.clientWidth : Constants.DEFAULT_WIDTH;\n var containerHeight = Math.max(element.clientHeight ? element.clientHeight : imageHeight, Constants.FILE_SCAN_MIN_HEIGHT);\n var config = _this.computeCanvasDrawConfig(imageWidth, imageHeight, containerWidth, containerHeight);\n if (showImage) {\n var visibleCanvas = _this.createCanvasElement(containerWidth, containerHeight, \"qr-canvas-visible\");\n visibleCanvas.style.display = \"inline-block\";\n element.appendChild(visibleCanvas);\n var context_1 = visibleCanvas.getContext(\"2d\");\n if (!context_1) {\n throw \"Unable to get 2d context from canvas\";\n }\n context_1.canvas.width = containerWidth;\n context_1.canvas.height = containerHeight;\n context_1.drawImage(inputImage, 0, 0, imageWidth, imageHeight, config.x, config.y, config.width, config.height);\n }\n var padding = Constants.FILE_SCAN_HIDDEN_CANVAS_PADDING;\n var hiddenImageWidth = Math.max(inputImage.width, config.width);\n var hiddenImageHeight = Math.max(inputImage.height, config.height);\n var hiddenCanvasWidth = hiddenImageWidth + 2 * padding;\n var hiddenCanvasHeight = hiddenImageHeight + 2 * padding;\n var hiddenCanvas = _this.createCanvasElement(hiddenCanvasWidth, hiddenCanvasHeight);\n element.appendChild(hiddenCanvas);\n var context = hiddenCanvas.getContext(\"2d\");\n if (!context) {\n throw \"Unable to get 2d context from canvas\";\n }\n context.canvas.width = hiddenCanvasWidth;\n context.canvas.height = hiddenCanvasHeight;\n context.drawImage(inputImage, 0, 0, imageWidth, imageHeight, padding, padding, hiddenImageWidth, hiddenImageHeight);\n try {\n _this.qrcode.decodeRobustlyAsync(hiddenCanvas)\n .then(function (result) {\n resolve(Html5QrcodeResultFactory.createFromQrcodeResult(result));\n })\n .catch(reject);\n }\n catch (exception) {\n reject(\"QR code parse error, error = \".concat(exception));\n }\n };\n inputImage.onerror = reject;\n inputImage.onabort = reject;\n inputImage.onstalled = reject;\n inputImage.onsuspend = reject;\n inputImage.src = URL.createObjectURL(imageFile);\n });\n };\n Html5Qrcode.prototype.clear = function () {\n this.clearElement();\n };\n Html5Qrcode.getCameras = function () {\n return CameraRetriever.retrieve();\n };\n Html5Qrcode.prototype.getRunningTrackCapabilities = function () {\n return this.getRenderedCameraOrFail().getRunningTrackCapabilities();\n };\n Html5Qrcode.prototype.getRunningTrackSettings = function () {\n return this.getRenderedCameraOrFail().getRunningTrackSettings();\n };\n Html5Qrcode.prototype.getRunningTrackCameraCapabilities = function () {\n return this.getRenderedCameraOrFail().getCapabilities();\n };\n Html5Qrcode.prototype.applyVideoConstraints = function (videoConstaints) {\n if (!videoConstaints) {\n throw \"videoConstaints is required argument.\";\n }\n else if (!VideoConstraintsUtil.isMediaStreamConstraintsValid(videoConstaints, this.logger)) {\n throw \"invalid videoConstaints passed, check logs for more details\";\n }\n return this.getRenderedCameraOrFail().applyVideoConstraints(videoConstaints);\n };\n Html5Qrcode.prototype.getRenderedCameraOrFail = function () {\n if (this.renderedCamera == null) {\n throw \"Scanning is not in running state, call this API only when\"\n + \" QR code scanning using camera is in running state.\";\n }\n return this.renderedCamera;\n };\n Html5Qrcode.prototype.getSupportedFormats = function (configOrVerbosityFlag) {\n var allFormats = [\n Html5QrcodeSupportedFormats.QR_CODE,\n Html5QrcodeSupportedFormats.AZTEC,\n Html5QrcodeSupportedFormats.CODABAR,\n Html5QrcodeSupportedFormats.CODE_39,\n Html5QrcodeSupportedFormats.CODE_93,\n Html5QrcodeSupportedFormats.CODE_128,\n Html5QrcodeSupportedFormats.DATA_MATRIX,\n Html5QrcodeSupportedFormats.MAXICODE,\n Html5QrcodeSupportedFormats.ITF,\n Html5QrcodeSupportedFormats.EAN_13,\n Html5QrcodeSupportedFormats.EAN_8,\n Html5QrcodeSupportedFormats.PDF_417,\n Html5QrcodeSupportedFormats.RSS_14,\n Html5QrcodeSupportedFormats.RSS_EXPANDED,\n Html5QrcodeSupportedFormats.UPC_A,\n Html5QrcodeSupportedFormats.UPC_E,\n Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION,\n ];\n if (!configOrVerbosityFlag\n || typeof configOrVerbosityFlag == \"boolean\") {\n return allFormats;\n }\n if (!configOrVerbosityFlag.formatsToSupport) {\n return allFormats;\n }\n if (!Array.isArray(configOrVerbosityFlag.formatsToSupport)) {\n throw \"configOrVerbosityFlag.formatsToSupport should be undefined \"\n + \"or an array.\";\n }\n if (configOrVerbosityFlag.formatsToSupport.length === 0) {\n throw \"Atleast 1 formatsToSupport is needed.\";\n }\n var supportedFormats = [];\n for (var _i = 0, _a = configOrVerbosityFlag.formatsToSupport; _i < _a.length; _i++) {\n var format = _a[_i];\n if (isValidHtml5QrcodeSupportedFormats(format)) {\n supportedFormats.push(format);\n }\n else {\n this.logger.warn(\"Invalid format: \".concat(format, \" passed in config, ignoring.\"));\n }\n }\n if (supportedFormats.length === 0) {\n throw \"None of formatsToSupport match supported values.\";\n }\n return supportedFormats;\n };\n Html5Qrcode.prototype.getUseBarCodeDetectorIfSupported = function (config) {\n if (isNullOrUndefined(config)) {\n return true;\n }\n if (!isNullOrUndefined(config.useBarCodeDetectorIfSupported)) {\n return config.useBarCodeDetectorIfSupported !== false;\n }\n if (isNullOrUndefined(config.experimentalFeatures)) {\n return true;\n }\n var experimentalFeatures = config.experimentalFeatures;\n if (isNullOrUndefined(experimentalFeatures.useBarCodeDetectorIfSupported)) {\n return true;\n }\n return experimentalFeatures.useBarCodeDetectorIfSupported !== false;\n };\n Html5Qrcode.prototype.validateQrboxSize = function (viewfinderWidth, viewfinderHeight, internalConfig) {\n var _this = this;\n var qrboxSize = internalConfig.qrbox;\n this.validateQrboxConfig(qrboxSize);\n var qrDimensions = this.toQrdimensions(viewfinderWidth, viewfinderHeight, qrboxSize);\n var validateMinSize = function (size) {\n if (size < Constants.MIN_QR_BOX_SIZE) {\n throw \"minimum size of 'config.qrbox' dimension value is\"\n + \" \".concat(Constants.MIN_QR_BOX_SIZE, \"px.\");\n }\n };\n var correctWidthBasedOnRootElementSize = function (configWidth) {\n if (configWidth > viewfinderWidth) {\n _this.logger.warn(\"`qrbox.width` or `qrbox` is larger than the\"\n + \" width of the root element. The width will be truncated\"\n + \" to the width of root element.\");\n configWidth = viewfinderWidth;\n }\n return configWidth;\n };\n validateMinSize(qrDimensions.width);\n validateMinSize(qrDimensions.height);\n qrDimensions.width = correctWidthBasedOnRootElementSize(qrDimensions.width);\n };\n Html5Qrcode.prototype.validateQrboxConfig = function (qrboxSize) {\n if (typeof qrboxSize === \"number\") {\n return;\n }\n if (typeof qrboxSize === \"function\") {\n return;\n }\n if (qrboxSize.width === undefined || qrboxSize.height === undefined) {\n throw \"Invalid instance of QrDimensions passed for \"\n + \"'config.qrbox'. Both 'width' and 'height' should be set.\";\n }\n };\n Html5Qrcode.prototype.toQrdimensions = function (viewfinderWidth, viewfinderHeight, qrboxSize) {\n if (typeof qrboxSize === \"number\") {\n return { width: qrboxSize, height: qrboxSize };\n }\n else if (typeof qrboxSize === \"function\") {\n try {\n return qrboxSize(viewfinderWidth, viewfinderHeight);\n }\n catch (error) {\n throw new Error(\"qrbox config was passed as a function but it failed with \"\n + \"unknown error\" + error);\n }\n }\n return qrboxSize;\n };\n Html5Qrcode.prototype.setupUi = function (viewfinderWidth, viewfinderHeight, internalConfig) {\n if (internalConfig.isShadedBoxEnabled()) {\n this.validateQrboxSize(viewfinderWidth, viewfinderHeight, internalConfig);\n }\n var qrboxSize = isNullOrUndefined(internalConfig.qrbox) ?\n { width: viewfinderWidth, height: viewfinderHeight } : internalConfig.qrbox;\n this.validateQrboxConfig(qrboxSize);\n var qrDimensions = this.toQrdimensions(viewfinderWidth, viewfinderHeight, qrboxSize);\n if (qrDimensions.height > viewfinderHeight) {\n this.logger.warn(\"[Html5Qrcode] config.qrbox has height that is\"\n + \"greater than the height of the video stream. Shading will be\"\n + \" ignored\");\n }\n var shouldShadingBeApplied = internalConfig.isShadedBoxEnabled()\n && qrDimensions.height <= viewfinderHeight;\n var defaultQrRegion = {\n x: 0,\n y: 0,\n width: viewfinderWidth,\n height: viewfinderHeight\n };\n var qrRegion = shouldShadingBeApplied\n ? this.getShadedRegionBounds(viewfinderWidth, viewfinderHeight, qrDimensions)\n : defaultQrRegion;\n var canvasElement = this.createCanvasElement(qrRegion.width, qrRegion.height);\n var contextAttributes = { willReadFrequently: true };\n var context = canvasElement.getContext(\"2d\", contextAttributes);\n context.canvas.width = qrRegion.width;\n context.canvas.height = qrRegion.height;\n this.element.append(canvasElement);\n if (shouldShadingBeApplied) {\n this.possiblyInsertShadingElement(this.element, viewfinderWidth, viewfinderHeight, qrDimensions);\n }\n this.createScannerPausedUiElement(this.element);\n this.qrRegion = qrRegion;\n this.context = context;\n this.canvasElement = canvasElement;\n };\n Html5Qrcode.prototype.createScannerPausedUiElement = function (rootElement) {\n var scannerPausedUiElement = document.createElement(\"div\");\n scannerPausedUiElement.innerText = Html5QrcodeStrings.scannerPaused();\n scannerPausedUiElement.style.display = \"none\";\n scannerPausedUiElement.style.position = \"absolute\";\n scannerPausedUiElement.style.top = \"0px\";\n scannerPausedUiElement.style.zIndex = \"1\";\n scannerPausedUiElement.style.background = \"rgba(9, 9, 9, 0.46)\";\n scannerPausedUiElement.style.color = \"#FFECEC\";\n scannerPausedUiElement.style.textAlign = \"center\";\n scannerPausedUiElement.style.width = \"100%\";\n rootElement.appendChild(scannerPausedUiElement);\n this.scannerPausedUiElement = scannerPausedUiElement;\n };\n Html5Qrcode.prototype.scanContext = function (qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n if (this.stateManagerProxy.isPaused()) {\n return Promise.resolve(false);\n }\n return this.qrcode.decodeAsync(this.canvasElement)\n .then(function (result) {\n qrCodeSuccessCallback(result.text, Html5QrcodeResultFactory.createFromQrcodeResult(result));\n _this.possiblyUpdateShaders(true);\n return true;\n }).catch(function (error) {\n _this.possiblyUpdateShaders(false);\n var errorMessage = Html5QrcodeStrings.codeParseError(error);\n qrCodeErrorCallback(errorMessage, Html5QrcodeErrorFactory.createFrom(errorMessage));\n return false;\n });\n };\n Html5Qrcode.prototype.foreverScan = function (internalConfig, qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n if (!this.shouldScan) {\n return;\n }\n if (!this.renderedCamera) {\n return;\n }\n var videoElement = this.renderedCamera.getSurface();\n var widthRatio = videoElement.videoWidth / videoElement.clientWidth;\n var heightRatio = videoElement.videoHeight / videoElement.clientHeight;\n if (!this.qrRegion) {\n throw \"qrRegion undefined when localMediaStream is ready.\";\n }\n var sWidthOffset = this.qrRegion.width * widthRatio;\n var sHeightOffset = this.qrRegion.height * heightRatio;\n var sxOffset = this.qrRegion.x * widthRatio;\n var syOffset = this.qrRegion.y * heightRatio;\n this.context.drawImage(videoElement, sxOffset, syOffset, sWidthOffset, sHeightOffset, 0, 0, this.qrRegion.width, this.qrRegion.height);\n var triggerNextScan = function () {\n _this.foreverScanTimeout = setTimeout(function () {\n _this.foreverScan(internalConfig, qrCodeSuccessCallback, qrCodeErrorCallback);\n }, _this.getTimeoutFps(internalConfig.fps));\n };\n this.scanContext(qrCodeSuccessCallback, qrCodeErrorCallback)\n .then(function (isSuccessfull) {\n if (!isSuccessfull && internalConfig.disableFlip !== true) {\n _this.context.translate(_this.context.canvas.width, 0);\n _this.context.scale(-1, 1);\n _this.scanContext(qrCodeSuccessCallback, qrCodeErrorCallback)\n .finally(function () {\n triggerNextScan();\n });\n }\n else {\n triggerNextScan();\n }\n }).catch(function (error) {\n _this.logger.logError(\"Error happend while scanning context\", error);\n triggerNextScan();\n });\n };\n Html5Qrcode.prototype.createVideoConstraints = function (cameraIdOrConfig) {\n if (typeof cameraIdOrConfig == \"string\") {\n return { deviceId: { exact: cameraIdOrConfig } };\n }\n else if (typeof cameraIdOrConfig == \"object\") {\n var facingModeKey = \"facingMode\";\n var deviceIdKey = \"deviceId\";\n var allowedFacingModeValues_1 = { \"user\": true, \"environment\": true };\n var exactKey = \"exact\";\n var isValidFacingModeValue = function (value) {\n if (value in allowedFacingModeValues_1) {\n return true;\n }\n else {\n throw \"config has invalid 'facingMode' value = \"\n + \"'\".concat(value, \"'\");\n }\n };\n var keys = Object.keys(cameraIdOrConfig);\n if (keys.length !== 1) {\n throw \"'cameraIdOrConfig' object should have exactly 1 key,\"\n + \" if passed as an object, found \".concat(keys.length, \" keys\");\n }\n var key = Object.keys(cameraIdOrConfig)[0];\n if (key !== facingModeKey && key !== deviceIdKey) {\n throw \"Only '\".concat(facingModeKey, \"' and '\").concat(deviceIdKey, \"' \")\n + \" are supported for 'cameraIdOrConfig'\";\n }\n if (key === facingModeKey) {\n var facingMode = cameraIdOrConfig.facingMode;\n if (typeof facingMode == \"string\") {\n if (isValidFacingModeValue(facingMode)) {\n return { facingMode: facingMode };\n }\n }\n else if (typeof facingMode == \"object\") {\n if (exactKey in facingMode) {\n if (isValidFacingModeValue(facingMode[\"\".concat(exactKey)])) {\n return {\n facingMode: {\n exact: facingMode[\"\".concat(exactKey)]\n }\n };\n }\n }\n else {\n throw \"'facingMode' should be string or object with\"\n + \" \".concat(exactKey, \" as key.\");\n }\n }\n else {\n var type_1 = (typeof facingMode);\n throw \"Invalid type of 'facingMode' = \".concat(type_1);\n }\n }\n else {\n var deviceId = cameraIdOrConfig.deviceId;\n if (typeof deviceId == \"string\") {\n return { deviceId: deviceId };\n }\n else if (typeof deviceId == \"object\") {\n if (exactKey in deviceId) {\n return {\n deviceId: { exact: deviceId[\"\".concat(exactKey)] }\n };\n }\n else {\n throw \"'deviceId' should be string or object with\"\n + \" \".concat(exactKey, \" as key.\");\n }\n }\n else {\n var type_2 = (typeof deviceId);\n throw \"Invalid type of 'deviceId' = \".concat(type_2);\n }\n }\n }\n var type = (typeof cameraIdOrConfig);\n throw \"Invalid type of 'cameraIdOrConfig' = \".concat(type);\n };\n Html5Qrcode.prototype.computeCanvasDrawConfig = function (imageWidth, imageHeight, containerWidth, containerHeight) {\n if (imageWidth <= containerWidth\n && imageHeight <= containerHeight) {\n var xoffset = (containerWidth - imageWidth) / 2;\n var yoffset = (containerHeight - imageHeight) / 2;\n return {\n x: xoffset,\n y: yoffset,\n width: imageWidth,\n height: imageHeight\n };\n }\n else {\n var formerImageWidth = imageWidth;\n var formerImageHeight = imageHeight;\n if (imageWidth > containerWidth) {\n imageHeight = (containerWidth / imageWidth) * imageHeight;\n imageWidth = containerWidth;\n }\n if (imageHeight > containerHeight) {\n imageWidth = (containerHeight / imageHeight) * imageWidth;\n imageHeight = containerHeight;\n }\n this.logger.log(\"Image downsampled from \"\n + \"\".concat(formerImageWidth, \"X\").concat(formerImageHeight)\n + \" to \".concat(imageWidth, \"X\").concat(imageHeight, \".\"));\n return this.computeCanvasDrawConfig(imageWidth, imageHeight, containerWidth, containerHeight);\n }\n };\n Html5Qrcode.prototype.clearElement = function () {\n if (this.stateManagerProxy.isScanning()) {\n throw \"Cannot clear while scan is ongoing, close it first.\";\n }\n var element = document.getElementById(this.elementId);\n if (element) {\n element.innerHTML = \"\";\n }\n };\n Html5Qrcode.prototype.possiblyUpdateShaders = function (qrMatch) {\n if (this.qrMatch === qrMatch) {\n return;\n }\n if (this.hasBorderShaders\n && this.borderShaders\n && this.borderShaders.length) {\n this.borderShaders.forEach(function (shader) {\n shader.style.backgroundColor = qrMatch\n ? Constants.BORDER_SHADER_MATCH_COLOR\n : Constants.BORDER_SHADER_DEFAULT_COLOR;\n });\n }\n this.qrMatch = qrMatch;\n };\n Html5Qrcode.prototype.possiblyCloseLastScanImageFile = function () {\n if (this.lastScanImageFile) {\n URL.revokeObjectURL(this.lastScanImageFile);\n this.lastScanImageFile = null;\n }\n };\n Html5Qrcode.prototype.createCanvasElement = function (width, height, customId) {\n var canvasWidth = width;\n var canvasHeight = height;\n var canvasElement = document.createElement(\"canvas\");\n canvasElement.style.width = \"\".concat(canvasWidth, \"px\");\n canvasElement.style.height = \"\".concat(canvasHeight, \"px\");\n canvasElement.style.display = \"none\";\n canvasElement.id = isNullOrUndefined(customId)\n ? \"qr-canvas\" : customId;\n return canvasElement;\n };\n Html5Qrcode.prototype.getShadedRegionBounds = function (width, height, qrboxSize) {\n if (qrboxSize.width > width || qrboxSize.height > height) {\n throw \"'config.qrbox' dimensions should not be greater than the \"\n + \"dimensions of the root HTML element.\";\n }\n return {\n x: (width - qrboxSize.width) / 2,\n y: (height - qrboxSize.height) / 2,\n width: qrboxSize.width,\n height: qrboxSize.height\n };\n };\n Html5Qrcode.prototype.possiblyInsertShadingElement = function (element, width, height, qrboxSize) {\n if ((width - qrboxSize.width) < 1 || (height - qrboxSize.height) < 1) {\n return;\n }\n var shadingElement = document.createElement(\"div\");\n shadingElement.style.position = \"absolute\";\n var rightLeftBorderSize = (width - qrboxSize.width) / 2;\n var topBottomBorderSize = (height - qrboxSize.height) / 2;\n shadingElement.style.borderLeft\n = \"\".concat(rightLeftBorderSize, \"px solid rgba(0, 0, 0, 0.48)\");\n shadingElement.style.borderRight\n = \"\".concat(rightLeftBorderSize, \"px solid rgba(0, 0, 0, 0.48)\");\n shadingElement.style.borderTop\n = \"\".concat(topBottomBorderSize, \"px solid rgba(0, 0, 0, 0.48)\");\n shadingElement.style.borderBottom\n = \"\".concat(topBottomBorderSize, \"px solid rgba(0, 0, 0, 0.48)\");\n shadingElement.style.boxSizing = \"border-box\";\n shadingElement.style.top = \"0px\";\n shadingElement.style.bottom = \"0px\";\n shadingElement.style.left = \"0px\";\n shadingElement.style.right = \"0px\";\n shadingElement.id = \"\".concat(Constants.SHADED_REGION_ELEMENT_ID);\n if ((width - qrboxSize.width) < 11\n || (height - qrboxSize.height) < 11) {\n this.hasBorderShaders = false;\n }\n else {\n var smallSize = 5;\n var largeSize = 40;\n this.insertShaderBorders(shadingElement, largeSize, smallSize, -smallSize, null, 0, true);\n this.insertShaderBorders(shadingElement, largeSize, smallSize, -smallSize, null, 0, false);\n this.insertShaderBorders(shadingElement, largeSize, smallSize, null, -smallSize, 0, true);\n this.insertShaderBorders(shadingElement, largeSize, smallSize, null, -smallSize, 0, false);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, -smallSize, null, -smallSize, true);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, null, -smallSize, -smallSize, true);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, -smallSize, null, -smallSize, false);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, null, -smallSize, -smallSize, false);\n this.hasBorderShaders = true;\n }\n element.append(shadingElement);\n };\n Html5Qrcode.prototype.insertShaderBorders = function (shaderElem, width, height, top, bottom, side, isLeft) {\n var elem = document.createElement(\"div\");\n elem.style.position = \"absolute\";\n elem.style.backgroundColor = Constants.BORDER_SHADER_DEFAULT_COLOR;\n elem.style.width = \"\".concat(width, \"px\");\n elem.style.height = \"\".concat(height, \"px\");\n if (top !== null) {\n elem.style.top = \"\".concat(top, \"px\");\n }\n if (bottom !== null) {\n elem.style.bottom = \"\".concat(bottom, \"px\");\n }\n if (isLeft) {\n elem.style.left = \"\".concat(side, \"px\");\n }\n else {\n elem.style.right = \"\".concat(side, \"px\");\n }\n if (!this.borderShaders) {\n this.borderShaders = [];\n }\n this.borderShaders.push(elem);\n shaderElem.appendChild(elem);\n };\n Html5Qrcode.prototype.showPausedState = function () {\n if (!this.scannerPausedUiElement) {\n throw \"[internal error] scanner paused UI element not found\";\n }\n this.scannerPausedUiElement.style.display = \"block\";\n };\n Html5Qrcode.prototype.hidePausedState = function () {\n if (!this.scannerPausedUiElement) {\n throw \"[internal error] scanner paused UI element not found\";\n }\n this.scannerPausedUiElement.style.display = \"none\";\n };\n Html5Qrcode.prototype.getTimeoutFps = function (fps) {\n return 1000 / fps;\n };\n return Html5Qrcode;\n}());\nexport { Html5Qrcode };\n//# sourceMappingURL=html5-qrcode.js.map","var SVG_XML_PREFIX = \"data:image/svg+xml;base64,\";\nexport var ASSET_CAMERA_SCAN = SVG_XML_PREFIX + \"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3LjUwMyAyMS41ODcgMTcuNTM0IDI2LjE3Ny45MzEgMTAuNTAzID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VwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=\";\n//# sourceMappingURL=image-assets.js.map","var PersistedDataFactory = (function () {\n function PersistedDataFactory() {\n }\n PersistedDataFactory.createDefault = function () {\n return {\n hasPermission: false,\n lastUsedCameraId: null\n };\n };\n return PersistedDataFactory;\n}());\nvar PersistedDataManager = (function () {\n function PersistedDataManager() {\n this.data = PersistedDataFactory.createDefault();\n var data = localStorage.getItem(PersistedDataManager.LOCAL_STORAGE_KEY);\n if (!data) {\n this.reset();\n }\n else {\n this.data = JSON.parse(data);\n }\n }\n PersistedDataManager.prototype.hasCameraPermissions = function () {\n return this.data.hasPermission;\n };\n PersistedDataManager.prototype.getLastUsedCameraId = function () {\n return this.data.lastUsedCameraId;\n };\n PersistedDataManager.prototype.setHasPermission = function (hasPermission) {\n this.data.hasPermission = hasPermission;\n this.flush();\n };\n PersistedDataManager.prototype.setLastUsedCameraId = function (lastUsedCameraId) {\n this.data.lastUsedCameraId = lastUsedCameraId;\n this.flush();\n };\n PersistedDataManager.prototype.resetLastUsedCameraId = function () {\n this.data.lastUsedCameraId = null;\n this.flush();\n };\n PersistedDataManager.prototype.reset = function () {\n this.data = PersistedDataFactory.createDefault();\n this.flush();\n };\n PersistedDataManager.prototype.flush = function () {\n localStorage.setItem(PersistedDataManager.LOCAL_STORAGE_KEY, JSON.stringify(this.data));\n };\n PersistedDataManager.LOCAL_STORAGE_KEY = \"HTML5_QRCODE_DATA\";\n return PersistedDataManager;\n}());\nexport { PersistedDataManager };\n//# sourceMappingURL=storage.js.map","import { ASSET_CLOSE_ICON_16PX, ASSET_INFO_ICON_16PX } from \"./image-assets\";\nimport { LibraryInfoStrings } from \"./strings\";\nvar LibraryInfoDiv = (function () {\n function LibraryInfoDiv() {\n this.infoDiv = document.createElement(\"div\");\n }\n LibraryInfoDiv.prototype.renderInto = function (parent) {\n this.infoDiv.style.position = \"absolute\";\n this.infoDiv.style.top = \"10px\";\n this.infoDiv.style.right = \"10px\";\n this.infoDiv.style.zIndex = \"2\";\n this.infoDiv.style.display = \"none\";\n this.infoDiv.style.padding = \"5pt\";\n this.infoDiv.style.border = \"1px solid #171717\";\n this.infoDiv.style.fontSize = \"10pt\";\n this.infoDiv.style.background = \"rgb(0 0 0 / 69%)\";\n this.infoDiv.style.borderRadius = \"5px\";\n this.infoDiv.style.textAlign = \"center\";\n this.infoDiv.style.fontWeight = \"400\";\n this.infoDiv.style.color = \"white\";\n this.infoDiv.innerText = LibraryInfoStrings.poweredBy();\n var projectLink = document.createElement(\"a\");\n projectLink.innerText = \"ScanApp\";\n projectLink.href = \"https://scanapp.org\";\n projectLink.target = \"new\";\n projectLink.style.color = \"white\";\n this.infoDiv.appendChild(projectLink);\n var breakElemFirst = document.createElement(\"br\");\n var breakElemSecond = document.createElement(\"br\");\n this.infoDiv.appendChild(breakElemFirst);\n this.infoDiv.appendChild(breakElemSecond);\n var reportIssueLink = document.createElement(\"a\");\n reportIssueLink.innerText = LibraryInfoStrings.reportIssues();\n reportIssueLink.href = \"https://github.com/mebjas/html5-qrcode/issues\";\n reportIssueLink.target = \"new\";\n reportIssueLink.style.color = \"white\";\n this.infoDiv.appendChild(reportIssueLink);\n parent.appendChild(this.infoDiv);\n };\n LibraryInfoDiv.prototype.show = function () {\n this.infoDiv.style.display = \"block\";\n };\n LibraryInfoDiv.prototype.hide = function () {\n this.infoDiv.style.display = \"none\";\n };\n return LibraryInfoDiv;\n}());\nvar LibraryInfoIcon = (function () {\n function LibraryInfoIcon(onTapIn, onTapOut) {\n this.isShowingInfoIcon = true;\n this.onTapIn = onTapIn;\n this.onTapOut = onTapOut;\n this.infoIcon = document.createElement(\"img\");\n }\n LibraryInfoIcon.prototype.renderInto = function (parent) {\n var _this = this;\n this.infoIcon.alt = \"Info icon\";\n this.infoIcon.src = ASSET_INFO_ICON_16PX;\n this.infoIcon.style.position = \"absolute\";\n this.infoIcon.style.top = \"4px\";\n this.infoIcon.style.right = \"4px\";\n this.infoIcon.style.opacity = \"0.6\";\n this.infoIcon.style.cursor = \"pointer\";\n this.infoIcon.style.zIndex = \"2\";\n this.infoIcon.style.width = \"16px\";\n this.infoIcon.style.height = \"16px\";\n this.infoIcon.onmouseover = function (_) { return _this.onHoverIn(); };\n this.infoIcon.onmouseout = function (_) { return _this.onHoverOut(); };\n this.infoIcon.onclick = function (_) { return _this.onClick(); };\n parent.appendChild(this.infoIcon);\n };\n LibraryInfoIcon.prototype.onHoverIn = function () {\n if (this.isShowingInfoIcon) {\n this.infoIcon.style.opacity = \"1\";\n }\n };\n LibraryInfoIcon.prototype.onHoverOut = function () {\n if (this.isShowingInfoIcon) {\n this.infoIcon.style.opacity = \"0.6\";\n }\n };\n LibraryInfoIcon.prototype.onClick = function () {\n if (this.isShowingInfoIcon) {\n this.isShowingInfoIcon = false;\n this.onTapIn();\n this.infoIcon.src = ASSET_CLOSE_ICON_16PX;\n this.infoIcon.style.opacity = \"1\";\n }\n else {\n this.isShowingInfoIcon = true;\n this.onTapOut();\n this.infoIcon.src = ASSET_INFO_ICON_16PX;\n this.infoIcon.style.opacity = \"0.6\";\n }\n };\n return LibraryInfoIcon;\n}());\nvar LibraryInfoContainer = (function () {\n function LibraryInfoContainer() {\n var _this = this;\n this.infoDiv = new LibraryInfoDiv();\n this.infoIcon = new LibraryInfoIcon(function () {\n _this.infoDiv.show();\n }, function () {\n _this.infoDiv.hide();\n });\n }\n LibraryInfoContainer.prototype.renderInto = function (parent) {\n this.infoDiv.renderInto(parent);\n this.infoIcon.renderInto(parent);\n };\n return LibraryInfoContainer;\n}());\nexport { LibraryInfoContainer };\n//# sourceMappingURL=ui.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar CameraPermissions = (function () {\n function CameraPermissions() {\n }\n CameraPermissions.hasPermissions = function () {\n return __awaiter(this, void 0, void 0, function () {\n var devices, _i, devices_1, device;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, navigator.mediaDevices.enumerateDevices()];\n case 1:\n devices = _a.sent();\n for (_i = 0, devices_1 = devices; _i < devices_1.length; _i++) {\n device = devices_1[_i];\n if (device.kind === \"videoinput\" && device.label) {\n return [2, true];\n }\n }\n return [2, false];\n }\n });\n });\n };\n return CameraPermissions;\n}());\nexport { CameraPermissions };\n//# sourceMappingURL=permissions.js.map","import { Html5QrcodeScanType, Html5QrcodeConstants } from \"../../core\";\nvar ScanTypeSelector = (function () {\n function ScanTypeSelector(supportedScanTypes) {\n this.supportedScanTypes = this.validateAndReturnScanTypes(supportedScanTypes);\n }\n ScanTypeSelector.prototype.getDefaultScanType = function () {\n return this.supportedScanTypes[0];\n };\n ScanTypeSelector.prototype.hasMoreThanOneScanType = function () {\n return this.supportedScanTypes.length > 1;\n };\n ScanTypeSelector.prototype.isCameraScanRequired = function () {\n for (var _i = 0, _a = this.supportedScanTypes; _i < _a.length; _i++) {\n var scanType = _a[_i];\n if (ScanTypeSelector.isCameraScanType(scanType)) {\n return true;\n }\n }\n return false;\n };\n ScanTypeSelector.isCameraScanType = function (scanType) {\n return scanType === Html5QrcodeScanType.SCAN_TYPE_CAMERA;\n };\n ScanTypeSelector.isFileScanType = function (scanType) {\n return scanType === Html5QrcodeScanType.SCAN_TYPE_FILE;\n };\n ScanTypeSelector.prototype.validateAndReturnScanTypes = function (supportedScanTypes) {\n if (!supportedScanTypes || supportedScanTypes.length === 0) {\n return Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE;\n }\n var maxExpectedValues = Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE.length;\n if (supportedScanTypes.length > maxExpectedValues) {\n throw \"Max \".concat(maxExpectedValues, \" values expected for \")\n + \"supportedScanTypes\";\n }\n for (var _i = 0, supportedScanTypes_1 = supportedScanTypes; _i < supportedScanTypes_1.length; _i++) {\n var scanType = supportedScanTypes_1[_i];\n if (!Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE\n .includes(scanType)) {\n throw \"Unsupported scan type \".concat(scanType);\n }\n }\n return supportedScanTypes;\n };\n return ScanTypeSelector;\n}());\nexport { ScanTypeSelector };\n//# sourceMappingURL=scan-type-selector.js.map","var PublicUiElementIdAndClasses = (function () {\n function PublicUiElementIdAndClasses() {\n }\n PublicUiElementIdAndClasses.ALL_ELEMENT_CLASS = \"html5-qrcode-element\";\n PublicUiElementIdAndClasses.CAMERA_PERMISSION_BUTTON_ID = \"html5-qrcode-button-camera-permission\";\n PublicUiElementIdAndClasses.CAMERA_START_BUTTON_ID = \"html5-qrcode-button-camera-start\";\n PublicUiElementIdAndClasses.CAMERA_STOP_BUTTON_ID = \"html5-qrcode-button-camera-stop\";\n PublicUiElementIdAndClasses.TORCH_BUTTON_ID = \"html5-qrcode-button-torch\";\n PublicUiElementIdAndClasses.CAMERA_SELECTION_SELECT_ID = \"html5-qrcode-select-camera\";\n PublicUiElementIdAndClasses.FILE_SELECTION_BUTTON_ID = \"html5-qrcode-button-file-selection\";\n PublicUiElementIdAndClasses.ZOOM_SLIDER_ID = \"html5-qrcode-input-range-zoom\";\n PublicUiElementIdAndClasses.SCAN_TYPE_CHANGE_ANCHOR_ID = \"html5-qrcode-anchor-scan-type-change\";\n PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_ON = \"html5-qrcode-button-torch-on\";\n PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_OFF = \"html5-qrcode-button-torch-off\";\n return PublicUiElementIdAndClasses;\n}());\nexport { PublicUiElementIdAndClasses };\nvar BaseUiElementFactory = (function () {\n function BaseUiElementFactory() {\n }\n BaseUiElementFactory.createElement = function (elementType, elementId) {\n var element = (document.createElement(elementType));\n element.id = elementId;\n element.classList.add(PublicUiElementIdAndClasses.ALL_ELEMENT_CLASS);\n if (elementType === \"button\") {\n element.setAttribute(\"type\", \"button\");\n }\n return element;\n };\n return BaseUiElementFactory;\n}());\nexport { BaseUiElementFactory };\n//# sourceMappingURL=base.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Html5QrcodeScannerStrings } from \"../../strings\";\nimport { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nvar TorchController = (function () {\n function TorchController(torchCapability, buttonController, onTorchActionFailureCallback) {\n this.isTorchOn = false;\n this.torchCapability = torchCapability;\n this.buttonController = buttonController;\n this.onTorchActionFailureCallback = onTorchActionFailureCallback;\n }\n TorchController.prototype.isTorchEnabled = function () {\n return this.isTorchOn;\n };\n TorchController.prototype.flipState = function () {\n return __awaiter(this, void 0, void 0, function () {\n var isTorchOnExpected, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.buttonController.disable();\n isTorchOnExpected = !this.isTorchOn;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this.torchCapability.apply(isTorchOnExpected)];\n case 2:\n _a.sent();\n this.updateUiBasedOnLatestSettings(this.torchCapability.value(), isTorchOnExpected);\n return [3, 4];\n case 3:\n error_1 = _a.sent();\n this.propagateFailure(isTorchOnExpected, error_1);\n this.buttonController.enable();\n return [3, 4];\n case 4: return [2];\n }\n });\n });\n };\n TorchController.prototype.updateUiBasedOnLatestSettings = function (isTorchOn, isTorchOnExpected) {\n if (isTorchOn === isTorchOnExpected) {\n this.buttonController.setText(isTorchOnExpected\n ? Html5QrcodeScannerStrings.torchOffButton()\n : Html5QrcodeScannerStrings.torchOnButton());\n this.isTorchOn = isTorchOnExpected;\n }\n else {\n this.propagateFailure(isTorchOnExpected);\n }\n this.buttonController.enable();\n };\n TorchController.prototype.propagateFailure = function (isTorchOnExpected, error) {\n var errorMessage = isTorchOnExpected\n ? Html5QrcodeScannerStrings.torchOnFailedMessage()\n : Html5QrcodeScannerStrings.torchOffFailedMessage();\n if (error) {\n errorMessage += \"; Error = \" + error;\n }\n this.onTorchActionFailureCallback(errorMessage);\n };\n TorchController.prototype.reset = function () {\n this.isTorchOn = false;\n };\n return TorchController;\n}());\nvar TorchButton = (function () {\n function TorchButton(torchCapability, onTorchActionFailureCallback) {\n this.onTorchActionFailureCallback = onTorchActionFailureCallback;\n this.torchButton\n = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.TORCH_BUTTON_ID);\n this.torchController = new TorchController(torchCapability, this, onTorchActionFailureCallback);\n }\n TorchButton.prototype.render = function (parentElement, torchButtonOptions) {\n var _this = this;\n this.torchButton.innerText\n = Html5QrcodeScannerStrings.torchOnButton();\n this.torchButton.style.display = torchButtonOptions.display;\n this.torchButton.style.marginLeft = torchButtonOptions.marginLeft;\n var $this = this;\n this.torchButton.addEventListener(\"click\", function (_) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, $this.torchController.flipState()];\n case 1:\n _a.sent();\n if ($this.torchController.isTorchEnabled()) {\n $this.torchButton.classList.remove(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_OFF);\n $this.torchButton.classList.add(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_ON);\n }\n else {\n $this.torchButton.classList.remove(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_ON);\n $this.torchButton.classList.add(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_OFF);\n }\n return [2];\n }\n });\n }); });\n parentElement.appendChild(this.torchButton);\n };\n TorchButton.prototype.updateTorchCapability = function (torchCapability) {\n this.torchController = new TorchController(torchCapability, this, this.onTorchActionFailureCallback);\n };\n TorchButton.prototype.getTorchButton = function () {\n return this.torchButton;\n };\n TorchButton.prototype.hide = function () {\n this.torchButton.style.display = \"none\";\n };\n TorchButton.prototype.show = function () {\n this.torchButton.style.display = \"inline-block\";\n };\n TorchButton.prototype.disable = function () {\n this.torchButton.disabled = true;\n };\n TorchButton.prototype.enable = function () {\n this.torchButton.disabled = false;\n };\n TorchButton.prototype.setText = function (text) {\n this.torchButton.innerText = text;\n };\n TorchButton.prototype.reset = function () {\n this.torchButton.innerText = Html5QrcodeScannerStrings.torchOnButton();\n this.torchController.reset();\n };\n TorchButton.create = function (parentElement, torchCapability, torchButtonOptions, onTorchActionFailureCallback) {\n var button = new TorchButton(torchCapability, onTorchActionFailureCallback);\n button.render(parentElement, torchButtonOptions);\n return button;\n };\n return TorchButton;\n}());\nexport { TorchButton };\n//# sourceMappingURL=torch-button.js.map","import { Html5QrcodeScannerStrings } from \"../../strings\";\nimport { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nvar FileSelectionUi = (function () {\n function FileSelectionUi(parentElement, showOnRender, onFileSelected) {\n this.fileBasedScanRegion = this.createFileBasedScanRegion();\n this.fileBasedScanRegion.style.display\n = showOnRender ? \"block\" : \"none\";\n parentElement.appendChild(this.fileBasedScanRegion);\n var fileScanLabel = document.createElement(\"label\");\n fileScanLabel.setAttribute(\"for\", this.getFileScanInputId());\n fileScanLabel.style.display = \"inline-block\";\n this.fileBasedScanRegion.appendChild(fileScanLabel);\n this.fileSelectionButton\n = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.FILE_SELECTION_BUTTON_ID);\n this.setInitialValueToButton();\n this.fileSelectionButton.addEventListener(\"click\", function (_) {\n fileScanLabel.click();\n });\n fileScanLabel.append(this.fileSelectionButton);\n this.fileScanInput\n = BaseUiElementFactory.createElement(\"input\", this.getFileScanInputId());\n this.fileScanInput.type = \"file\";\n this.fileScanInput.accept = \"image/*\";\n this.fileScanInput.style.display = \"none\";\n fileScanLabel.appendChild(this.fileScanInput);\n var $this = this;\n this.fileScanInput.addEventListener(\"change\", function (e) {\n if (e == null || e.target == null) {\n return;\n }\n var target = e.target;\n if (target.files && target.files.length === 0) {\n return;\n }\n var fileList = target.files;\n var file = fileList[0];\n var fileName = file.name;\n $this.setImageNameToButton(fileName);\n onFileSelected(file);\n });\n var dragAndDropMessage = this.createDragAndDropMessage();\n this.fileBasedScanRegion.appendChild(dragAndDropMessage);\n this.fileBasedScanRegion.addEventListener(\"dragenter\", function (event) {\n $this.fileBasedScanRegion.style.border\n = $this.fileBasedScanRegionActiveBorder();\n event.stopPropagation();\n event.preventDefault();\n });\n this.fileBasedScanRegion.addEventListener(\"dragleave\", function (event) {\n $this.fileBasedScanRegion.style.border\n = $this.fileBasedScanRegionDefaultBorder();\n event.stopPropagation();\n event.preventDefault();\n });\n this.fileBasedScanRegion.addEventListener(\"dragover\", function (event) {\n $this.fileBasedScanRegion.style.border\n = $this.fileBasedScanRegionActiveBorder();\n event.stopPropagation();\n event.preventDefault();\n });\n this.fileBasedScanRegion.addEventListener(\"drop\", function (event) {\n event.stopPropagation();\n event.preventDefault();\n $this.fileBasedScanRegion.style.border\n = $this.fileBasedScanRegionDefaultBorder();\n var dataTransfer = event.dataTransfer;\n if (dataTransfer) {\n var files = dataTransfer.files;\n if (!files || files.length === 0) {\n return;\n }\n var isAnyFileImage = false;\n for (var i = 0; i < files.length; ++i) {\n var file = files.item(i);\n if (!file) {\n continue;\n }\n var imageType = /image.*/;\n if (!file.type.match(imageType)) {\n continue;\n }\n isAnyFileImage = true;\n var fileName = file.name;\n $this.setImageNameToButton(fileName);\n onFileSelected(file);\n dragAndDropMessage.innerText\n = Html5QrcodeScannerStrings.dragAndDropMessage();\n break;\n }\n if (!isAnyFileImage) {\n dragAndDropMessage.innerText\n = Html5QrcodeScannerStrings\n .dragAndDropMessageOnlyImages();\n }\n }\n });\n }\n FileSelectionUi.prototype.hide = function () {\n this.fileBasedScanRegion.style.display = \"none\";\n this.fileScanInput.disabled = true;\n };\n FileSelectionUi.prototype.show = function () {\n this.fileBasedScanRegion.style.display = \"block\";\n this.fileScanInput.disabled = false;\n };\n FileSelectionUi.prototype.isShowing = function () {\n return this.fileBasedScanRegion.style.display === \"block\";\n };\n FileSelectionUi.prototype.resetValue = function () {\n this.fileScanInput.value = \"\";\n this.setInitialValueToButton();\n };\n FileSelectionUi.prototype.createFileBasedScanRegion = function () {\n var fileBasedScanRegion = document.createElement(\"div\");\n fileBasedScanRegion.style.textAlign = \"center\";\n fileBasedScanRegion.style.margin = \"auto\";\n fileBasedScanRegion.style.width = \"80%\";\n fileBasedScanRegion.style.maxWidth = \"600px\";\n fileBasedScanRegion.style.border\n = this.fileBasedScanRegionDefaultBorder();\n fileBasedScanRegion.style.padding = \"10px\";\n fileBasedScanRegion.style.marginBottom = \"10px\";\n return fileBasedScanRegion;\n };\n FileSelectionUi.prototype.fileBasedScanRegionDefaultBorder = function () {\n return \"6px dashed #ebebeb\";\n };\n FileSelectionUi.prototype.fileBasedScanRegionActiveBorder = function () {\n return \"6px dashed rgb(153 151 151)\";\n };\n FileSelectionUi.prototype.createDragAndDropMessage = function () {\n var dragAndDropMessage = document.createElement(\"div\");\n dragAndDropMessage.innerText\n = Html5QrcodeScannerStrings.dragAndDropMessage();\n dragAndDropMessage.style.fontWeight = \"400\";\n return dragAndDropMessage;\n };\n FileSelectionUi.prototype.setImageNameToButton = function (imageFileName) {\n var MAX_CHARS = 20;\n if (imageFileName.length > MAX_CHARS) {\n var start8Chars = imageFileName.substring(0, 8);\n var length_1 = imageFileName.length;\n var last8Chars = imageFileName.substring(length_1 - 8, length_1);\n imageFileName = \"\".concat(start8Chars, \"....\").concat(last8Chars);\n }\n var newText = Html5QrcodeScannerStrings.fileSelectionChooseAnother()\n + \" - \"\n + imageFileName;\n this.fileSelectionButton.innerText = newText;\n };\n FileSelectionUi.prototype.setInitialValueToButton = function () {\n var initialText = Html5QrcodeScannerStrings.fileSelectionChooseImage()\n + \" - \"\n + Html5QrcodeScannerStrings.fileSelectionNoImageSelected();\n this.fileSelectionButton.innerText = initialText;\n };\n FileSelectionUi.prototype.getFileScanInputId = function () {\n return \"html5-qrcode-private-filescan-input\";\n };\n FileSelectionUi.create = function (parentElement, showOnRender, onFileSelected) {\n var button = new FileSelectionUi(parentElement, showOnRender, onFileSelected);\n return button;\n };\n return FileSelectionUi;\n}());\nexport { FileSelectionUi };\n//# sourceMappingURL=file-selection-ui.js.map","import { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nimport { Html5QrcodeScannerStrings } from \"../../strings\";\nvar CameraSelectionUi = (function () {\n function CameraSelectionUi(cameras) {\n this.selectElement = BaseUiElementFactory\n .createElement(\"select\", PublicUiElementIdAndClasses.CAMERA_SELECTION_SELECT_ID);\n this.cameras = cameras;\n this.options = [];\n }\n CameraSelectionUi.prototype.render = function (parentElement) {\n var cameraSelectionContainer = document.createElement(\"span\");\n cameraSelectionContainer.style.marginRight = \"10px\";\n var numCameras = this.cameras.length;\n if (numCameras === 0) {\n throw new Error(\"No cameras found\");\n }\n if (numCameras === 1) {\n cameraSelectionContainer.style.display = \"none\";\n }\n else {\n var selectCameraString = Html5QrcodeScannerStrings.selectCamera();\n cameraSelectionContainer.innerText\n = \"\".concat(selectCameraString, \" (\").concat(this.cameras.length, \") \");\n }\n var anonymousCameraId = 1;\n for (var _i = 0, _a = this.cameras; _i < _a.length; _i++) {\n var camera = _a[_i];\n var value = camera.id;\n var name_1 = camera.label == null ? value : camera.label;\n if (!name_1 || name_1 === \"\") {\n name_1 = [\n Html5QrcodeScannerStrings.anonymousCameraPrefix(),\n anonymousCameraId++\n ].join(\" \");\n }\n var option = document.createElement(\"option\");\n option.value = value;\n option.innerText = name_1;\n this.options.push(option);\n this.selectElement.appendChild(option);\n }\n cameraSelectionContainer.appendChild(this.selectElement);\n parentElement.appendChild(cameraSelectionContainer);\n };\n CameraSelectionUi.prototype.disable = function () {\n this.selectElement.disabled = true;\n };\n CameraSelectionUi.prototype.isDisabled = function () {\n return this.selectElement.disabled === true;\n };\n CameraSelectionUi.prototype.enable = function () {\n this.selectElement.disabled = false;\n };\n CameraSelectionUi.prototype.getValue = function () {\n return this.selectElement.value;\n };\n CameraSelectionUi.prototype.hasValue = function (value) {\n for (var _i = 0, _a = this.options; _i < _a.length; _i++) {\n var option = _a[_i];\n if (option.value === value) {\n return true;\n }\n }\n return false;\n };\n CameraSelectionUi.prototype.setValue = function (value) {\n if (!this.hasValue(value)) {\n throw new Error(\"\".concat(value, \" is not present in the camera list.\"));\n }\n this.selectElement.value = value;\n };\n CameraSelectionUi.prototype.hasSingleItem = function () {\n return this.cameras.length === 1;\n };\n CameraSelectionUi.prototype.numCameras = function () {\n return this.cameras.length;\n };\n CameraSelectionUi.create = function (parentElement, cameras) {\n var cameraSelectUi = new CameraSelectionUi(cameras);\n cameraSelectUi.render(parentElement);\n return cameraSelectUi;\n };\n return CameraSelectionUi;\n}());\nexport { CameraSelectionUi };\n//# sourceMappingURL=camera-selection-ui.js.map","import { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nimport { Html5QrcodeScannerStrings } from \"../../strings\";\nvar CameraZoomUi = (function () {\n function CameraZoomUi() {\n this.onChangeCallback = null;\n this.zoomElementContainer = document.createElement(\"div\");\n this.rangeInput = BaseUiElementFactory.createElement(\"input\", PublicUiElementIdAndClasses.ZOOM_SLIDER_ID);\n this.rangeInput.type = \"range\";\n this.rangeText = document.createElement(\"span\");\n this.rangeInput.min = \"1\";\n this.rangeInput.max = \"5\";\n this.rangeInput.value = \"1\";\n this.rangeInput.step = \"0.1\";\n }\n CameraZoomUi.prototype.render = function (parentElement, renderOnCreate) {\n this.zoomElementContainer.style.display\n = renderOnCreate ? \"block\" : \"none\";\n this.zoomElementContainer.style.padding = \"5px 10px\";\n this.zoomElementContainer.style.textAlign = \"center\";\n parentElement.appendChild(this.zoomElementContainer);\n this.rangeInput.style.display = \"inline-block\";\n this.rangeInput.style.width = \"50%\";\n this.rangeInput.style.height = \"5px\";\n this.rangeInput.style.background = \"#d3d3d3\";\n this.rangeInput.style.outline = \"none\";\n this.rangeInput.style.opacity = \"0.7\";\n var zoomString = Html5QrcodeScannerStrings.zoom();\n this.rangeText.innerText = \"\".concat(this.rangeInput.value, \"x \").concat(zoomString);\n this.rangeText.style.marginRight = \"10px\";\n var $this = this;\n this.rangeInput.addEventListener(\"input\", function () { return $this.onValueChange(); });\n this.rangeInput.addEventListener(\"change\", function () { return $this.onValueChange(); });\n this.zoomElementContainer.appendChild(this.rangeInput);\n this.zoomElementContainer.appendChild(this.rangeText);\n };\n CameraZoomUi.prototype.onValueChange = function () {\n var zoomString = Html5QrcodeScannerStrings.zoom();\n this.rangeText.innerText = \"\".concat(this.rangeInput.value, \"x \").concat(zoomString);\n if (this.onChangeCallback) {\n this.onChangeCallback(parseFloat(this.rangeInput.value));\n }\n };\n CameraZoomUi.prototype.setValues = function (minValue, maxValue, defaultValue, step) {\n this.rangeInput.min = minValue.toString();\n this.rangeInput.max = maxValue.toString();\n this.rangeInput.step = step.toString();\n this.rangeInput.value = defaultValue.toString();\n this.onValueChange();\n };\n CameraZoomUi.prototype.show = function () {\n this.zoomElementContainer.style.display = \"block\";\n };\n CameraZoomUi.prototype.hide = function () {\n this.zoomElementContainer.style.display = \"none\";\n };\n CameraZoomUi.prototype.setOnCameraZoomValueChangeCallback = function (onChangeCallback) {\n this.onChangeCallback = onChangeCallback;\n };\n CameraZoomUi.prototype.removeOnCameraZoomValueChangeCallback = function () {\n this.onChangeCallback = null;\n };\n CameraZoomUi.create = function (parentElement, renderOnCreate) {\n var cameraZoomUi = new CameraZoomUi();\n cameraZoomUi.render(parentElement, renderOnCreate);\n return cameraZoomUi;\n };\n return CameraZoomUi;\n}());\nexport { CameraZoomUi };\n//# sourceMappingURL=camera-zoom-ui.js.map","import { Html5QrcodeConstants, Html5QrcodeScanType, Html5QrcodeErrorFactory, BaseLoggger, isNullOrUndefined, clip, } from \"./core\";\nimport { Html5Qrcode, } from \"./html5-qrcode\";\nimport { Html5QrcodeScannerStrings, } from \"./strings\";\nimport { ASSET_FILE_SCAN, ASSET_CAMERA_SCAN, } from \"./image-assets\";\nimport { PersistedDataManager } from \"./storage\";\nimport { LibraryInfoContainer } from \"./ui\";\nimport { CameraPermissions } from \"./camera/permissions\";\nimport { ScanTypeSelector } from \"./ui/scanner/scan-type-selector\";\nimport { TorchButton } from \"./ui/scanner/torch-button\";\nimport { FileSelectionUi } from \"./ui/scanner/file-selection-ui\";\nimport { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./ui/scanner/base\";\nimport { CameraSelectionUi } from \"./ui/scanner/camera-selection-ui\";\nimport { CameraZoomUi } from \"./ui/scanner/camera-zoom-ui\";\nvar Html5QrcodeScannerStatus;\n(function (Html5QrcodeScannerStatus) {\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_DEFAULT\"] = 0] = \"STATUS_DEFAULT\";\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_SUCCESS\"] = 1] = \"STATUS_SUCCESS\";\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_WARNING\"] = 2] = \"STATUS_WARNING\";\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_REQUESTING_PERMISSION\"] = 3] = \"STATUS_REQUESTING_PERMISSION\";\n})(Html5QrcodeScannerStatus || (Html5QrcodeScannerStatus = {}));\nfunction toHtml5QrcodeCameraScanConfig(config) {\n return {\n fps: config.fps,\n qrbox: config.qrbox,\n aspectRatio: config.aspectRatio,\n disableFlip: config.disableFlip,\n videoConstraints: config.videoConstraints\n };\n}\nfunction toHtml5QrcodeFullConfig(config, verbose) {\n return {\n formatsToSupport: config.formatsToSupport,\n useBarCodeDetectorIfSupported: config.useBarCodeDetectorIfSupported,\n experimentalFeatures: config.experimentalFeatures,\n verbose: verbose\n };\n}\nvar Html5QrcodeScanner = (function () {\n function Html5QrcodeScanner(elementId, config, verbose) {\n this.lastMatchFound = null;\n this.cameraScanImage = null;\n this.fileScanImage = null;\n this.fileSelectionUi = null;\n this.elementId = elementId;\n this.config = this.createConfig(config);\n this.verbose = verbose === true;\n if (!document.getElementById(elementId)) {\n throw \"HTML Element with id=\".concat(elementId, \" not found\");\n }\n this.scanTypeSelector = new ScanTypeSelector(this.config.supportedScanTypes);\n this.currentScanType = this.scanTypeSelector.getDefaultScanType();\n this.sectionSwapAllowed = true;\n this.logger = new BaseLoggger(this.verbose);\n this.persistedDataManager = new PersistedDataManager();\n if (config.rememberLastUsedCamera !== true) {\n this.persistedDataManager.reset();\n }\n }\n Html5QrcodeScanner.prototype.render = function (qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n this.lastMatchFound = null;\n this.qrCodeSuccessCallback\n = function (decodedText, result) {\n if (qrCodeSuccessCallback) {\n qrCodeSuccessCallback(decodedText, result);\n }\n else {\n if (_this.lastMatchFound === decodedText) {\n return;\n }\n _this.lastMatchFound = decodedText;\n _this.setHeaderMessage(Html5QrcodeScannerStrings.lastMatch(decodedText), Html5QrcodeScannerStatus.STATUS_SUCCESS);\n }\n };\n this.qrCodeErrorCallback =\n function (errorMessage, error) {\n if (qrCodeErrorCallback) {\n qrCodeErrorCallback(errorMessage, error);\n }\n };\n var container = document.getElementById(this.elementId);\n if (!container) {\n throw \"HTML Element with id=\".concat(this.elementId, \" not found\");\n }\n container.innerHTML = \"\";\n this.createBasicLayout(container);\n this.html5Qrcode = new Html5Qrcode(this.getScanRegionId(), toHtml5QrcodeFullConfig(this.config, this.verbose));\n };\n Html5QrcodeScanner.prototype.pause = function (shouldPauseVideo) {\n if (isNullOrUndefined(shouldPauseVideo) || shouldPauseVideo !== true) {\n shouldPauseVideo = false;\n }\n this.getHtml5QrcodeOrFail().pause(shouldPauseVideo);\n };\n Html5QrcodeScanner.prototype.resume = function () {\n this.getHtml5QrcodeOrFail().resume();\n };\n Html5QrcodeScanner.prototype.getState = function () {\n return this.getHtml5QrcodeOrFail().getState();\n };\n Html5QrcodeScanner.prototype.clear = function () {\n var _this = this;\n var emptyHtmlContainer = function () {\n var mainContainer = document.getElementById(_this.elementId);\n if (mainContainer) {\n mainContainer.innerHTML = \"\";\n _this.resetBasicLayout(mainContainer);\n }\n };\n if (this.html5Qrcode) {\n return new Promise(function (resolve, reject) {\n if (!_this.html5Qrcode) {\n resolve();\n return;\n }\n if (_this.html5Qrcode.isScanning) {\n _this.html5Qrcode.stop().then(function (_) {\n if (!_this.html5Qrcode) {\n resolve();\n return;\n }\n _this.html5Qrcode.clear();\n emptyHtmlContainer();\n resolve();\n }).catch(function (error) {\n if (_this.verbose) {\n _this.logger.logError(\"Unable to stop qrcode scanner\", error);\n }\n reject(error);\n });\n }\n else {\n _this.html5Qrcode.clear();\n emptyHtmlContainer();\n resolve();\n }\n });\n }\n return Promise.resolve();\n };\n Html5QrcodeScanner.prototype.getRunningTrackCapabilities = function () {\n return this.getHtml5QrcodeOrFail().getRunningTrackCapabilities();\n };\n Html5QrcodeScanner.prototype.getRunningTrackSettings = function () {\n return this.getHtml5QrcodeOrFail().getRunningTrackSettings();\n };\n Html5QrcodeScanner.prototype.applyVideoConstraints = function (videoConstaints) {\n return this.getHtml5QrcodeOrFail().applyVideoConstraints(videoConstaints);\n };\n Html5QrcodeScanner.prototype.getHtml5QrcodeOrFail = function () {\n if (!this.html5Qrcode) {\n throw \"Code scanner not initialized.\";\n }\n return this.html5Qrcode;\n };\n Html5QrcodeScanner.prototype.createConfig = function (config) {\n if (config) {\n if (!config.fps) {\n config.fps = Html5QrcodeConstants.SCAN_DEFAULT_FPS;\n }\n if (config.rememberLastUsedCamera !== (!Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED)) {\n config.rememberLastUsedCamera\n = Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED;\n }\n if (!config.supportedScanTypes) {\n config.supportedScanTypes\n = Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE;\n }\n return config;\n }\n return {\n fps: Html5QrcodeConstants.SCAN_DEFAULT_FPS,\n rememberLastUsedCamera: Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED,\n supportedScanTypes: Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE\n };\n };\n Html5QrcodeScanner.prototype.createBasicLayout = function (parent) {\n parent.style.position = \"relative\";\n parent.style.padding = \"0px\";\n parent.style.border = \"1px solid silver\";\n this.createHeader(parent);\n var qrCodeScanRegion = document.createElement(\"div\");\n var scanRegionId = this.getScanRegionId();\n qrCodeScanRegion.id = scanRegionId;\n qrCodeScanRegion.style.width = \"100%\";\n qrCodeScanRegion.style.minHeight = \"100px\";\n qrCodeScanRegion.style.textAlign = \"center\";\n parent.appendChild(qrCodeScanRegion);\n if (ScanTypeSelector.isCameraScanType(this.currentScanType)) {\n this.insertCameraScanImageToScanRegion();\n }\n else {\n this.insertFileScanImageToScanRegion();\n }\n var qrCodeDashboard = document.createElement(\"div\");\n var dashboardId = this.getDashboardId();\n qrCodeDashboard.id = dashboardId;\n qrCodeDashboard.style.width = \"100%\";\n parent.appendChild(qrCodeDashboard);\n this.setupInitialDashboard(qrCodeDashboard);\n };\n Html5QrcodeScanner.prototype.resetBasicLayout = function (mainContainer) {\n mainContainer.style.border = \"none\";\n };\n Html5QrcodeScanner.prototype.setupInitialDashboard = function (dashboard) {\n this.createSection(dashboard);\n this.createSectionControlPanel();\n if (this.scanTypeSelector.hasMoreThanOneScanType()) {\n this.createSectionSwap();\n }\n };\n Html5QrcodeScanner.prototype.createHeader = function (dashboard) {\n var header = document.createElement(\"div\");\n header.style.textAlign = \"left\";\n header.style.margin = \"0px\";\n dashboard.appendChild(header);\n var libraryInfo = new LibraryInfoContainer();\n libraryInfo.renderInto(header);\n var headerMessageContainer = document.createElement(\"div\");\n headerMessageContainer.id = this.getHeaderMessageContainerId();\n headerMessageContainer.style.display = \"none\";\n headerMessageContainer.style.textAlign = \"center\";\n headerMessageContainer.style.fontSize = \"14px\";\n headerMessageContainer.style.padding = \"2px 10px\";\n headerMessageContainer.style.margin = \"4px\";\n headerMessageContainer.style.borderTop = \"1px solid #f6f6f6\";\n header.appendChild(headerMessageContainer);\n };\n Html5QrcodeScanner.prototype.createSection = function (dashboard) {\n var section = document.createElement(\"div\");\n section.id = this.getDashboardSectionId();\n section.style.width = \"100%\";\n section.style.padding = \"10px 0px 10px 0px\";\n section.style.textAlign = \"left\";\n dashboard.appendChild(section);\n };\n Html5QrcodeScanner.prototype.createCameraListUi = function (scpCameraScanRegion, requestPermissionContainer, requestPermissionButton) {\n var $this = this;\n $this.showHideScanTypeSwapLink(false);\n $this.setHeaderMessage(Html5QrcodeScannerStrings.cameraPermissionRequesting());\n var createPermissionButtonIfNotExists = function () {\n if (!requestPermissionButton) {\n $this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n }\n };\n Html5Qrcode.getCameras().then(function (cameras) {\n $this.persistedDataManager.setHasPermission(true);\n $this.showHideScanTypeSwapLink(true);\n $this.resetHeaderMessage();\n if (cameras && cameras.length > 0) {\n scpCameraScanRegion.removeChild(requestPermissionContainer);\n $this.renderCameraSelection(cameras);\n }\n else {\n $this.setHeaderMessage(Html5QrcodeScannerStrings.noCameraFound(), Html5QrcodeScannerStatus.STATUS_WARNING);\n createPermissionButtonIfNotExists();\n }\n }).catch(function (error) {\n $this.persistedDataManager.setHasPermission(false);\n if (requestPermissionButton) {\n requestPermissionButton.disabled = false;\n }\n else {\n createPermissionButtonIfNotExists();\n }\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n $this.showHideScanTypeSwapLink(true);\n });\n };\n Html5QrcodeScanner.prototype.createPermissionButton = function (scpCameraScanRegion, requestPermissionContainer) {\n var $this = this;\n var requestPermissionButton = BaseUiElementFactory\n .createElement(\"button\", this.getCameraPermissionButtonId());\n requestPermissionButton.innerText\n = Html5QrcodeScannerStrings.cameraPermissionTitle();\n requestPermissionButton.addEventListener(\"click\", function () {\n requestPermissionButton.disabled = true;\n $this.createCameraListUi(scpCameraScanRegion, requestPermissionContainer, requestPermissionButton);\n });\n requestPermissionContainer.appendChild(requestPermissionButton);\n };\n Html5QrcodeScanner.prototype.createPermissionsUi = function (scpCameraScanRegion, requestPermissionContainer) {\n var $this = this;\n if (ScanTypeSelector.isCameraScanType(this.currentScanType)\n && this.persistedDataManager.hasCameraPermissions()) {\n CameraPermissions.hasPermissions().then(function (hasPermissions) {\n if (hasPermissions) {\n $this.createCameraListUi(scpCameraScanRegion, requestPermissionContainer);\n }\n else {\n $this.persistedDataManager.setHasPermission(false);\n $this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n }\n }).catch(function (_) {\n $this.persistedDataManager.setHasPermission(false);\n $this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n });\n return;\n }\n this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n };\n Html5QrcodeScanner.prototype.createSectionControlPanel = function () {\n var section = document.getElementById(this.getDashboardSectionId());\n var sectionControlPanel = document.createElement(\"div\");\n section.appendChild(sectionControlPanel);\n var scpCameraScanRegion = document.createElement(\"div\");\n scpCameraScanRegion.id = this.getDashboardSectionCameraScanRegionId();\n scpCameraScanRegion.style.display\n = ScanTypeSelector.isCameraScanType(this.currentScanType)\n ? \"block\" : \"none\";\n sectionControlPanel.appendChild(scpCameraScanRegion);\n var requestPermissionContainer = document.createElement(\"div\");\n requestPermissionContainer.style.textAlign = \"center\";\n scpCameraScanRegion.appendChild(requestPermissionContainer);\n if (this.scanTypeSelector.isCameraScanRequired()) {\n this.createPermissionsUi(scpCameraScanRegion, requestPermissionContainer);\n }\n this.renderFileScanUi(sectionControlPanel);\n };\n Html5QrcodeScanner.prototype.renderFileScanUi = function (parent) {\n var showOnRender = ScanTypeSelector.isFileScanType(this.currentScanType);\n var $this = this;\n var onFileSelected = function (file) {\n if (!$this.html5Qrcode) {\n throw \"html5Qrcode not defined\";\n }\n if (!ScanTypeSelector.isFileScanType($this.currentScanType)) {\n return;\n }\n $this.setHeaderMessage(Html5QrcodeScannerStrings.loadingImage());\n $this.html5Qrcode.scanFileV2(file, true)\n .then(function (html5qrcodeResult) {\n $this.resetHeaderMessage();\n $this.qrCodeSuccessCallback(html5qrcodeResult.decodedText, html5qrcodeResult);\n })\n .catch(function (error) {\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n $this.qrCodeErrorCallback(error, Html5QrcodeErrorFactory.createFrom(error));\n });\n };\n this.fileSelectionUi = FileSelectionUi.create(parent, showOnRender, onFileSelected);\n };\n Html5QrcodeScanner.prototype.renderCameraSelection = function (cameras) {\n var _this = this;\n var $this = this;\n var scpCameraScanRegion = document.getElementById(this.getDashboardSectionCameraScanRegionId());\n scpCameraScanRegion.style.textAlign = \"center\";\n var cameraZoomUi = CameraZoomUi.create(scpCameraScanRegion, false);\n var renderCameraZoomUiIfSupported = function (cameraCapabilities) {\n var zoomCapability = cameraCapabilities.zoomFeature();\n if (!zoomCapability.isSupported()) {\n return;\n }\n cameraZoomUi.setOnCameraZoomValueChangeCallback(function (zoomValue) {\n zoomCapability.apply(zoomValue);\n });\n var defaultZoom = 1;\n if (_this.config.defaultZoomValueIfSupported) {\n defaultZoom = _this.config.defaultZoomValueIfSupported;\n }\n defaultZoom = clip(defaultZoom, zoomCapability.min(), zoomCapability.max());\n cameraZoomUi.setValues(zoomCapability.min(), zoomCapability.max(), defaultZoom, zoomCapability.step());\n cameraZoomUi.show();\n };\n var cameraSelectUi = CameraSelectionUi.create(scpCameraScanRegion, cameras);\n var cameraActionContainer = document.createElement(\"span\");\n var cameraActionStartButton = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.CAMERA_START_BUTTON_ID);\n cameraActionStartButton.innerText\n = Html5QrcodeScannerStrings.scanButtonStartScanningText();\n cameraActionContainer.appendChild(cameraActionStartButton);\n var cameraActionStopButton = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.CAMERA_STOP_BUTTON_ID);\n cameraActionStopButton.innerText\n = Html5QrcodeScannerStrings.scanButtonStopScanningText();\n cameraActionStopButton.style.display = \"none\";\n cameraActionStopButton.disabled = true;\n cameraActionContainer.appendChild(cameraActionStopButton);\n var torchButton;\n var createAndShowTorchButtonIfSupported = function (cameraCapabilities) {\n if (!cameraCapabilities.torchFeature().isSupported()) {\n if (torchButton) {\n torchButton.hide();\n }\n return;\n }\n if (!torchButton) {\n torchButton = TorchButton.create(cameraActionContainer, cameraCapabilities.torchFeature(), { display: \"none\", marginLeft: \"5px\" }, function (errorMessage) {\n $this.setHeaderMessage(errorMessage, Html5QrcodeScannerStatus.STATUS_WARNING);\n });\n }\n else {\n torchButton.updateTorchCapability(cameraCapabilities.torchFeature());\n }\n torchButton.show();\n };\n scpCameraScanRegion.appendChild(cameraActionContainer);\n var resetCameraActionStartButton = function (shouldShow) {\n if (!shouldShow) {\n cameraActionStartButton.style.display = \"none\";\n }\n cameraActionStartButton.innerText\n = Html5QrcodeScannerStrings\n .scanButtonStartScanningText();\n cameraActionStartButton.style.opacity = \"1\";\n cameraActionStartButton.disabled = false;\n if (shouldShow) {\n cameraActionStartButton.style.display = \"inline-block\";\n }\n };\n cameraActionStartButton.addEventListener(\"click\", function (_) {\n cameraActionStartButton.innerText\n = Html5QrcodeScannerStrings.scanButtonScanningStarting();\n cameraSelectUi.disable();\n cameraActionStartButton.disabled = true;\n cameraActionStartButton.style.opacity = \"0.5\";\n if (_this.scanTypeSelector.hasMoreThanOneScanType()) {\n $this.showHideScanTypeSwapLink(false);\n }\n $this.resetHeaderMessage();\n var cameraId = cameraSelectUi.getValue();\n $this.persistedDataManager.setLastUsedCameraId(cameraId);\n $this.html5Qrcode.start(cameraId, toHtml5QrcodeCameraScanConfig($this.config), $this.qrCodeSuccessCallback, $this.qrCodeErrorCallback)\n .then(function (_) {\n cameraActionStopButton.disabled = false;\n cameraActionStopButton.style.display = \"inline-block\";\n resetCameraActionStartButton(false);\n var cameraCapabilities = $this.html5Qrcode.getRunningTrackCameraCapabilities();\n if (_this.config.showTorchButtonIfSupported === true) {\n createAndShowTorchButtonIfSupported(cameraCapabilities);\n }\n if (_this.config.showZoomSliderIfSupported === true) {\n renderCameraZoomUiIfSupported(cameraCapabilities);\n }\n })\n .catch(function (error) {\n $this.showHideScanTypeSwapLink(true);\n cameraSelectUi.enable();\n resetCameraActionStartButton(true);\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n });\n });\n if (cameraSelectUi.hasSingleItem()) {\n cameraActionStartButton.click();\n }\n cameraActionStopButton.addEventListener(\"click\", function (_) {\n if (!$this.html5Qrcode) {\n throw \"html5Qrcode not defined\";\n }\n cameraActionStopButton.disabled = true;\n $this.html5Qrcode.stop()\n .then(function (_) {\n if (_this.scanTypeSelector.hasMoreThanOneScanType()) {\n $this.showHideScanTypeSwapLink(true);\n }\n cameraSelectUi.enable();\n cameraActionStartButton.disabled = false;\n cameraActionStopButton.style.display = \"none\";\n cameraActionStartButton.style.display = \"inline-block\";\n if (torchButton) {\n torchButton.reset();\n torchButton.hide();\n }\n cameraZoomUi.removeOnCameraZoomValueChangeCallback();\n cameraZoomUi.hide();\n $this.insertCameraScanImageToScanRegion();\n }).catch(function (error) {\n cameraActionStopButton.disabled = false;\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n });\n });\n if ($this.persistedDataManager.getLastUsedCameraId()) {\n var cameraId = $this.persistedDataManager.getLastUsedCameraId();\n if (cameraSelectUi.hasValue(cameraId)) {\n cameraSelectUi.setValue(cameraId);\n cameraActionStartButton.click();\n }\n else {\n $this.persistedDataManager.resetLastUsedCameraId();\n }\n }\n };\n Html5QrcodeScanner.prototype.createSectionSwap = function () {\n var $this = this;\n var TEXT_IF_CAMERA_SCAN_SELECTED = Html5QrcodeScannerStrings.textIfCameraScanSelected();\n var TEXT_IF_FILE_SCAN_SELECTED = Html5QrcodeScannerStrings.textIfFileScanSelected();\n var section = document.getElementById(this.getDashboardSectionId());\n var switchContainer = document.createElement(\"div\");\n switchContainer.style.textAlign = \"center\";\n var switchScanTypeLink = BaseUiElementFactory.createElement(\"span\", this.getDashboardSectionSwapLinkId());\n switchScanTypeLink.style.textDecoration = \"underline\";\n switchScanTypeLink.style.cursor = \"pointer\";\n switchScanTypeLink.innerText\n = ScanTypeSelector.isCameraScanType(this.currentScanType)\n ? TEXT_IF_CAMERA_SCAN_SELECTED : TEXT_IF_FILE_SCAN_SELECTED;\n switchScanTypeLink.addEventListener(\"click\", function () {\n if (!$this.sectionSwapAllowed) {\n if ($this.verbose) {\n $this.logger.logError(\"Section swap called when not allowed\");\n }\n return;\n }\n $this.resetHeaderMessage();\n $this.fileSelectionUi.resetValue();\n $this.sectionSwapAllowed = false;\n if (ScanTypeSelector.isCameraScanType($this.currentScanType)) {\n $this.clearScanRegion();\n $this.getCameraScanRegion().style.display = \"none\";\n $this.fileSelectionUi.show();\n switchScanTypeLink.innerText = TEXT_IF_FILE_SCAN_SELECTED;\n $this.currentScanType = Html5QrcodeScanType.SCAN_TYPE_FILE;\n $this.insertFileScanImageToScanRegion();\n }\n else {\n $this.clearScanRegion();\n $this.getCameraScanRegion().style.display = \"block\";\n $this.fileSelectionUi.hide();\n switchScanTypeLink.innerText = TEXT_IF_CAMERA_SCAN_SELECTED;\n $this.currentScanType = Html5QrcodeScanType.SCAN_TYPE_CAMERA;\n $this.insertCameraScanImageToScanRegion();\n $this.startCameraScanIfPermissionExistsOnSwap();\n }\n $this.sectionSwapAllowed = true;\n });\n switchContainer.appendChild(switchScanTypeLink);\n section.appendChild(switchContainer);\n };\n Html5QrcodeScanner.prototype.startCameraScanIfPermissionExistsOnSwap = function () {\n var _this = this;\n var $this = this;\n if (this.persistedDataManager.hasCameraPermissions()) {\n CameraPermissions.hasPermissions().then(function (hasPermissions) {\n if (hasPermissions) {\n var permissionButton = document.getElementById($this.getCameraPermissionButtonId());\n if (!permissionButton) {\n _this.logger.logError(\"Permission button not found, fail;\");\n throw \"Permission button not found\";\n }\n permissionButton.click();\n }\n else {\n $this.persistedDataManager.setHasPermission(false);\n }\n }).catch(function (_) {\n $this.persistedDataManager.setHasPermission(false);\n });\n return;\n }\n };\n Html5QrcodeScanner.prototype.resetHeaderMessage = function () {\n var messageDiv = document.getElementById(this.getHeaderMessageContainerId());\n messageDiv.style.display = \"none\";\n };\n Html5QrcodeScanner.prototype.setHeaderMessage = function (messageText, scannerStatus) {\n if (!scannerStatus) {\n scannerStatus = Html5QrcodeScannerStatus.STATUS_DEFAULT;\n }\n var messageDiv = this.getHeaderMessageDiv();\n messageDiv.innerText = messageText;\n messageDiv.style.display = \"block\";\n switch (scannerStatus) {\n case Html5QrcodeScannerStatus.STATUS_SUCCESS:\n messageDiv.style.background = \"rgba(106, 175, 80, 0.26)\";\n messageDiv.style.color = \"#477735\";\n break;\n case Html5QrcodeScannerStatus.STATUS_WARNING:\n messageDiv.style.background = \"rgba(203, 36, 49, 0.14)\";\n messageDiv.style.color = \"#cb2431\";\n break;\n case Html5QrcodeScannerStatus.STATUS_DEFAULT:\n default:\n messageDiv.style.background = \"rgba(0, 0, 0, 0)\";\n messageDiv.style.color = \"rgb(17, 17, 17)\";\n break;\n }\n };\n Html5QrcodeScanner.prototype.showHideScanTypeSwapLink = function (shouldDisplay) {\n if (this.scanTypeSelector.hasMoreThanOneScanType()) {\n if (shouldDisplay !== true) {\n shouldDisplay = false;\n }\n this.sectionSwapAllowed = shouldDisplay;\n this.getDashboardSectionSwapLink().style.display\n = shouldDisplay ? \"inline-block\" : \"none\";\n }\n };\n Html5QrcodeScanner.prototype.insertCameraScanImageToScanRegion = function () {\n var $this = this;\n var qrCodeScanRegion = document.getElementById(this.getScanRegionId());\n if (this.cameraScanImage) {\n qrCodeScanRegion.innerHTML = \"
\";\n qrCodeScanRegion.appendChild(this.cameraScanImage);\n return;\n }\n this.cameraScanImage = new Image;\n this.cameraScanImage.onload = function (_) {\n qrCodeScanRegion.innerHTML = \"
\";\n qrCodeScanRegion.appendChild($this.cameraScanImage);\n };\n this.cameraScanImage.width = 64;\n this.cameraScanImage.style.opacity = \"0.8\";\n this.cameraScanImage.src = ASSET_CAMERA_SCAN;\n this.cameraScanImage.alt = Html5QrcodeScannerStrings.cameraScanAltText();\n };\n Html5QrcodeScanner.prototype.insertFileScanImageToScanRegion = function () {\n var $this = this;\n var qrCodeScanRegion = document.getElementById(this.getScanRegionId());\n if (this.fileScanImage) {\n qrCodeScanRegion.innerHTML = \"
\";\n qrCodeScanRegion.appendChild(this.fileScanImage);\n return;\n }\n this.fileScanImage = new Image;\n this.fileScanImage.onload = function (_) {\n qrCodeScanRegion.innerHTML = \"
\";\n qrCodeScanRegion.appendChild($this.fileScanImage);\n };\n this.fileScanImage.width = 64;\n this.fileScanImage.style.opacity = \"0.8\";\n this.fileScanImage.src = ASSET_FILE_SCAN;\n this.fileScanImage.alt = Html5QrcodeScannerStrings.fileScanAltText();\n };\n Html5QrcodeScanner.prototype.clearScanRegion = function () {\n var qrCodeScanRegion = document.getElementById(this.getScanRegionId());\n qrCodeScanRegion.innerHTML = \"\";\n };\n Html5QrcodeScanner.prototype.getDashboardSectionId = function () {\n return \"\".concat(this.elementId, \"__dashboard_section\");\n };\n Html5QrcodeScanner.prototype.getDashboardSectionCameraScanRegionId = function () {\n return \"\".concat(this.elementId, \"__dashboard_section_csr\");\n };\n Html5QrcodeScanner.prototype.getDashboardSectionSwapLinkId = function () {\n return PublicUiElementIdAndClasses.SCAN_TYPE_CHANGE_ANCHOR_ID;\n };\n Html5QrcodeScanner.prototype.getScanRegionId = function () {\n return \"\".concat(this.elementId, \"__scan_region\");\n };\n Html5QrcodeScanner.prototype.getDashboardId = function () {\n return \"\".concat(this.elementId, \"__dashboard\");\n };\n Html5QrcodeScanner.prototype.getHeaderMessageContainerId = function () {\n return \"\".concat(this.elementId, \"__header_message\");\n };\n Html5QrcodeScanner.prototype.getCameraPermissionButtonId = function () {\n return PublicUiElementIdAndClasses.CAMERA_PERMISSION_BUTTON_ID;\n };\n Html5QrcodeScanner.prototype.getCameraScanRegion = function () {\n return document.getElementById(this.getDashboardSectionCameraScanRegionId());\n };\n Html5QrcodeScanner.prototype.getDashboardSectionSwapLink = function () {\n return document.getElementById(this.getDashboardSectionSwapLinkId());\n };\n Html5QrcodeScanner.prototype.getHeaderMessageDiv = function () {\n return document.getElementById(this.getHeaderMessageContainerId());\n };\n return Html5QrcodeScanner;\n}());\nexport { Html5QrcodeScanner };\n//# sourceMappingURL=html5-qrcode-scanner.js.map","export { Html5Qrcode } from \"./html5-qrcode\";\nexport { Html5QrcodeScanner } from \"./html5-qrcode-scanner\";\nexport { Html5QrcodeSupportedFormats } from \"./core\";\nexport { Html5QrcodeScannerState } from \"./state-manager\";\nexport { Html5QrcodeScanType } from \"./core\";\n//# sourceMappingURL=index.js.map","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ZXing = {}));\n}(this, (function (exports) { 'use strict';\n\n function isNullOrUndefined(obj) {\n return obj === null || obj === undefined;\n }\n\n /*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /* global Reflect, Promise */\n\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n\n function __extends(d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n\n function fixProto(target, prototype) {\n var setPrototypeOf = Object.setPrototypeOf;\n setPrototypeOf ? setPrototypeOf(target, prototype) : (target.__proto__ = prototype);\n }\n\n function fixStack(target, fn) {\n if (fn === void 0) {\n fn = target.constructor;\n }\n var captureStackTrace = Error.captureStackTrace;\n captureStackTrace && captureStackTrace(target, fn);\n }\n\n var CustomError = (function (_super) {\n __extends(CustomError, _super);\n function CustomError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n Object.defineProperty(_this, 'name', {\n value: _newTarget.name,\n enumerable: false\n });\n fixProto(_this, _newTarget.prototype);\n fixStack(_this);\n return _this;\n }\n \n return CustomError;\n })(Error);\n\n /**\n * Custom Error class of type Exception.\n */\n class Exception extends CustomError {\n /**\n * Allows Exception to be constructed directly\n * with some message and prototype definition.\n */\n constructor(message = undefined) {\n super(message);\n this.message = message;\n }\n getKind() {\n const ex = this.constructor;\n return ex.kind;\n }\n }\n /**\n * It's typed as string so it can be extended and overriden.\n */\n Exception.kind = 'Exception';\n\n /**\n * Custom Error class of type Exception.\n */\n class ArgumentException extends Exception {\n }\n ArgumentException.kind = 'ArgumentException';\n\n /**\n * Custom Error class of type Exception.\n */\n class IllegalArgumentException extends Exception {\n }\n IllegalArgumentException.kind = 'IllegalArgumentException';\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n class BinaryBitmap {\n constructor(binarizer) {\n this.binarizer = binarizer;\n if (binarizer === null) {\n throw new IllegalArgumentException('Binarizer must be non-null.');\n }\n }\n /**\n * @return The width of the bitmap.\n */\n getWidth() {\n return this.binarizer.getWidth();\n }\n /**\n * @return The height of the bitmap.\n */\n getHeight() {\n return this.binarizer.getHeight();\n }\n /**\n * Converts one row of luminance data to 1 bit data. May actually do the conversion, or return\n * cached data. Callers should assume this method is expensive and call it as seldom as possible.\n * This method is intended for decoding 1D barcodes and may choose to apply sharpening.\n *\n * @param y The row to fetch, which must be in [0, bitmap height)\n * @param row An optional preallocated array. If null or too small, it will be ignored.\n * If used, the Binarizer will call BitArray.clear(). Always use the returned object.\n * @return The array of bits for this row (true means black).\n * @throws NotFoundException if row can't be binarized\n */\n getBlackRow(y /*int*/, row) {\n return this.binarizer.getBlackRow(y, row);\n }\n /**\n * Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive\n * and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or\n * may not apply sharpening. Therefore, a row from this matrix may not be identical to one\n * fetched using getBlackRow(), so don't mix and match between them.\n *\n * @return The 2D array of bits for the image (true means black).\n * @throws NotFoundException if image can't be binarized to make a matrix\n */\n getBlackMatrix() {\n // The matrix is created on demand the first time it is requested, then cached. There are two\n // reasons for this:\n // 1. This work will never be done if the caller only installs 1D Reader objects, or if a\n // 1D Reader finds a barcode before the 2D Readers run.\n // 2. This work will only be done once even if the caller installs multiple 2D Readers.\n if (this.matrix === null || this.matrix === undefined) {\n this.matrix = this.binarizer.getBlackMatrix();\n }\n return this.matrix;\n }\n /**\n * @return Whether this bitmap can be cropped.\n */\n isCropSupported() {\n return this.binarizer.getLuminanceSource().isCropSupported();\n }\n /**\n * Returns a new object with cropped image data. Implementations may keep a reference to the\n * original data rather than a copy. Only callable if isCropSupported() is true.\n *\n * @param left The left coordinate, which must be in [0,getWidth())\n * @param top The top coordinate, which must be in [0,getHeight())\n * @param width The width of the rectangle to crop.\n * @param height The height of the rectangle to crop.\n * @return A cropped version of this object.\n */\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n const newSource = this.binarizer.getLuminanceSource().crop(left, top, width, height);\n return new BinaryBitmap(this.binarizer.createBinarizer(newSource));\n }\n /**\n * @return Whether this bitmap supports counter-clockwise rotation.\n */\n isRotateSupported() {\n return this.binarizer.getLuminanceSource().isRotateSupported();\n }\n /**\n * Returns a new object with rotated image data by 90 degrees counterclockwise.\n * Only callable if {@link #isRotateSupported()} is true.\n *\n * @return A rotated version of this object.\n */\n rotateCounterClockwise() {\n const newSource = this.binarizer.getLuminanceSource().rotateCounterClockwise();\n return new BinaryBitmap(this.binarizer.createBinarizer(newSource));\n }\n /**\n * Returns a new object with rotated image data by 45 degrees counterclockwise.\n * Only callable if {@link #isRotateSupported()} is true.\n *\n * @return A rotated version of this object.\n */\n rotateCounterClockwise45() {\n const newSource = this.binarizer.getLuminanceSource().rotateCounterClockwise45();\n return new BinaryBitmap(this.binarizer.createBinarizer(newSource));\n }\n /*@Override*/\n toString() {\n try {\n return this.getBlackMatrix().toString();\n }\n catch (e /*: NotFoundException*/) {\n return '';\n }\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class ChecksumException extends Exception {\n static getChecksumInstance() {\n return new ChecksumException();\n }\n }\n ChecksumException.kind = 'ChecksumException';\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This class hierarchy provides a set of methods to convert luminance data to 1 bit data.\n * It allows the algorithm to vary polymorphically, for example allowing a very expensive\n * thresholding technique for servers and a fast one for mobile. It also permits the implementation\n * to vary, e.g. a JNI version for Android and a Java fallback version for other platforms.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class Binarizer {\n constructor(source) {\n this.source = source;\n }\n getLuminanceSource() {\n return this.source;\n }\n getWidth() {\n return this.source.getWidth();\n }\n getHeight() {\n return this.source.getHeight();\n }\n }\n\n class System {\n // public static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length)\n /**\n * Makes a copy of a array.\n */\n static arraycopy(src, srcPos, dest, destPos, length) {\n // TODO: better use split or set?\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n /**\n * Returns the current time in milliseconds.\n */\n static currentTimeMillis() {\n return Date.now();\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class IndexOutOfBoundsException extends Exception {\n }\n IndexOutOfBoundsException.kind = 'IndexOutOfBoundsException';\n\n /**\n * Custom Error class of type Exception.\n */\n class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {\n constructor(index = undefined, message = undefined) {\n super(message);\n this.index = index;\n this.message = message;\n }\n }\n ArrayIndexOutOfBoundsException.kind = 'ArrayIndexOutOfBoundsException';\n\n class Arrays {\n /**\n * Assigns the specified int value to each element of the specified array\n * of ints.\n *\n * @param a the array to be filled\n * @param val the value to be stored in all elements of the array\n */\n static fill(a, val) {\n for (let i = 0, len = a.length; i < len; i++)\n a[i] = val;\n }\n /**\n * Assigns the specified int value to each element of the specified\n * range of the specified array of ints. The range to be filled\n * extends from index {@code fromIndex}, inclusive, to index\n * {@code toIndex}, exclusive. (If {@code fromIndex==toIndex}, the\n * range to be filled is empty.)\n *\n * @param a the array to be filled\n * @param fromIndex the index of the first element (inclusive) to be\n * filled with the specified value\n * @param toIndex the index of the last element (exclusive) to be\n * filled with the specified value\n * @param val the value to be stored in all elements of the array\n * @throws IllegalArgumentException if {@code fromIndex > toIndex}\n * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or\n * {@code toIndex > a.length}\n */\n static fillWithin(a, fromIndex, toIndex, val) {\n Arrays.rangeCheck(a.length, fromIndex, toIndex);\n for (let i = fromIndex; i < toIndex; i++)\n a[i] = val;\n }\n /**\n * Checks that {@code fromIndex} and {@code toIndex} are in\n * the range and throws an exception if they aren't.\n */\n static rangeCheck(arrayLength, fromIndex, toIndex) {\n if (fromIndex > toIndex) {\n throw new IllegalArgumentException('fromIndex(' + fromIndex + ') > toIndex(' + toIndex + ')');\n }\n if (fromIndex < 0) {\n throw new ArrayIndexOutOfBoundsException(fromIndex);\n }\n if (toIndex > arrayLength) {\n throw new ArrayIndexOutOfBoundsException(toIndex);\n }\n }\n static asList(...args) {\n return args;\n }\n static create(rows, cols, value) {\n let arr = Array.from({ length: rows });\n return arr.map(x => Array.from({ length: cols }).fill(value));\n }\n static createInt32Array(rows, cols, value) {\n let arr = Array.from({ length: rows });\n return arr.map(x => Int32Array.from({ length: cols }).fill(value));\n }\n static equals(first, second) {\n if (!first) {\n return false;\n }\n if (!second) {\n return false;\n }\n if (!first.length) {\n return false;\n }\n if (!second.length) {\n return false;\n }\n if (first.length !== second.length) {\n return false;\n }\n for (let i = 0, length = first.length; i < length; i++) {\n if (first[i] !== second[i]) {\n return false;\n }\n }\n return true;\n }\n static hashCode(a) {\n if (a === null) {\n return 0;\n }\n let result = 1;\n for (const element of a) {\n result = 31 * result + element;\n }\n return result;\n }\n static fillUint8Array(a, value) {\n for (let i = 0; i !== a.length; i++) {\n a[i] = value;\n }\n }\n static copyOf(original, newLength) {\n return original.slice(0, newLength);\n }\n static copyOfUint8Array(original, newLength) {\n if (original.length <= newLength) {\n const newArray = new Uint8Array(newLength);\n newArray.set(original);\n return newArray;\n }\n return original.slice(0, newLength);\n }\n static copyOfRange(original, from, to) {\n const newLength = to - from;\n const copy = new Int32Array(newLength);\n System.arraycopy(original, from, copy, 0, newLength);\n return copy;\n }\n /*\n * Returns the index of of the element in a sorted array or (-n-1) where n is the insertion point\n * for the new element.\n * Parameters:\n * ar - A sorted array\n * el - An element to search for\n * comparator - A comparator function. The function takes two arguments: (a, b) and returns:\n * a negative number if a is less than b;\n * 0 if a is equal to b;\n * a positive number of a is greater than b.\n * The array may contain duplicate elements. If there are more than one equal elements in the array,\n * the returned value can be the index of any one of the equal elements.\n *\n * http://jsfiddle.net/aryzhov/pkfst550/\n */\n static binarySearch(ar, el, comparator) {\n if (undefined === comparator) {\n comparator = Arrays.numberComparator;\n }\n let m = 0;\n let n = ar.length - 1;\n while (m <= n) {\n const k = (n + m) >> 1;\n const cmp = comparator(el, ar[k]);\n if (cmp > 0) {\n m = k + 1;\n }\n else if (cmp < 0) {\n n = k - 1;\n }\n else {\n return k;\n }\n }\n return -m - 1;\n }\n static numberComparator(a, b) {\n return a - b;\n }\n }\n\n /**\n * Ponyfill for Java's Integer class.\n */\n class Integer {\n static numberOfTrailingZeros(i) {\n let y;\n if (i === 0)\n return 32;\n let n = 31;\n y = i << 16;\n if (y !== 0) {\n n -= 16;\n i = y;\n }\n y = i << 8;\n if (y !== 0) {\n n -= 8;\n i = y;\n }\n y = i << 4;\n if (y !== 0) {\n n -= 4;\n i = y;\n }\n y = i << 2;\n if (y !== 0) {\n n -= 2;\n i = y;\n }\n return n - ((i << 1) >>> 31);\n }\n static numberOfLeadingZeros(i) {\n // HD, Figure 5-6\n if (i === 0) {\n return 32;\n }\n let n = 1;\n if (i >>> 16 === 0) {\n n += 16;\n i <<= 16;\n }\n if (i >>> 24 === 0) {\n n += 8;\n i <<= 8;\n }\n if (i >>> 28 === 0) {\n n += 4;\n i <<= 4;\n }\n if (i >>> 30 === 0) {\n n += 2;\n i <<= 2;\n }\n n -= i >>> 31;\n return n;\n }\n static toHexString(i) {\n return i.toString(16);\n }\n static toBinaryString(intNumber) {\n return String(parseInt(String(intNumber), 2));\n }\n // Returns the number of one-bits in the two's complement binary representation of the specified int value. This function is sometimes referred to as the population count.\n // Returns:\n // the number of one-bits in the two's complement binary representation of the specified int value.\n static bitCount(i) {\n // HD, Figure 5-2\n i = i - ((i >>> 1) & 0x55555555);\n i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);\n i = (i + (i >>> 4)) & 0x0f0f0f0f;\n i = i + (i >>> 8);\n i = i + (i >>> 16);\n return i & 0x3f;\n }\n static truncDivision(dividend, divisor) {\n return Math.trunc(dividend / divisor);\n }\n /**\n * Converts A string to an integer.\n * @param s A string to convert into a number.\n * @param radix A value between 2 and 36 that specifies the base of the number in numString. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.\n */\n static parseInt(num, radix = undefined) {\n return parseInt(num, radix);\n }\n }\n Integer.MIN_VALUE_32_BITS = -2147483648;\n Integer.MAX_VALUE = Number.MAX_SAFE_INTEGER;\n\n /**\n *

A simple, fast array of bits, represented compactly by an array of ints internally.

\n *\n * @author Sean Owen\n */\n class BitArray /*implements Cloneable*/ {\n // For testing only\n constructor(size /*int*/, bits) {\n if (undefined === size) {\n this.size = 0;\n this.bits = new Int32Array(1);\n }\n else {\n this.size = size;\n if (undefined === bits || null === bits) {\n this.bits = BitArray.makeArray(size);\n }\n else {\n this.bits = bits;\n }\n }\n }\n getSize() {\n return this.size;\n }\n getSizeInBytes() {\n return Math.floor((this.size + 7) / 8);\n }\n ensureCapacity(size /*int*/) {\n if (size > this.bits.length * 32) {\n const newBits = BitArray.makeArray(size);\n System.arraycopy(this.bits, 0, newBits, 0, this.bits.length);\n this.bits = newBits;\n }\n }\n /**\n * @param i bit to get\n * @return true iff bit i is set\n */\n get(i /*int*/) {\n return (this.bits[Math.floor(i / 32)] & (1 << (i & 0x1F))) !== 0;\n }\n /**\n * Sets bit i.\n *\n * @param i bit to set\n */\n set(i /*int*/) {\n this.bits[Math.floor(i / 32)] |= 1 << (i & 0x1F);\n }\n /**\n * Flips bit i.\n *\n * @param i bit to set\n */\n flip(i /*int*/) {\n this.bits[Math.floor(i / 32)] ^= 1 << (i & 0x1F);\n }\n /**\n * @param from first bit to check\n * @return index of first bit that is set, starting from the given index, or size if none are set\n * at or beyond this given index\n * @see #getNextUnset(int)\n */\n getNextSet(from /*int*/) {\n const size = this.size;\n if (from >= size) {\n return size;\n }\n const bits = this.bits;\n let bitsOffset = Math.floor(from / 32);\n let currentBits = bits[bitsOffset];\n // mask off lesser bits first\n currentBits &= ~((1 << (from & 0x1F)) - 1);\n const length = bits.length;\n while (currentBits === 0) {\n if (++bitsOffset === length) {\n return size;\n }\n currentBits = bits[bitsOffset];\n }\n const result = (bitsOffset * 32) + Integer.numberOfTrailingZeros(currentBits);\n return result > size ? size : result;\n }\n /**\n * @param from index to start looking for unset bit\n * @return index of next unset bit, or {@code size} if none are unset until the end\n * @see #getNextSet(int)\n */\n getNextUnset(from /*int*/) {\n const size = this.size;\n if (from >= size) {\n return size;\n }\n const bits = this.bits;\n let bitsOffset = Math.floor(from / 32);\n let currentBits = ~bits[bitsOffset];\n // mask off lesser bits first\n currentBits &= ~((1 << (from & 0x1F)) - 1);\n const length = bits.length;\n while (currentBits === 0) {\n if (++bitsOffset === length) {\n return size;\n }\n currentBits = ~bits[bitsOffset];\n }\n const result = (bitsOffset * 32) + Integer.numberOfTrailingZeros(currentBits);\n return result > size ? size : result;\n }\n /**\n * Sets a block of 32 bits, starting at bit i.\n *\n * @param i first bit to set\n * @param newBits the new value of the next 32 bits. Note again that the least-significant bit\n * corresponds to bit i, the next-least-significant to i+1, and so on.\n */\n setBulk(i /*int*/, newBits /*int*/) {\n this.bits[Math.floor(i / 32)] = newBits;\n }\n /**\n * Sets a range of bits.\n *\n * @param start start of range, inclusive.\n * @param end end of range, exclusive\n */\n setRange(start /*int*/, end /*int*/) {\n if (end < start || start < 0 || end > this.size) {\n throw new IllegalArgumentException();\n }\n if (end === start) {\n return;\n }\n end--; // will be easier to treat this as the last actually set bit -- inclusive\n const firstInt = Math.floor(start / 32);\n const lastInt = Math.floor(end / 32);\n const bits = this.bits;\n for (let i = firstInt; i <= lastInt; i++) {\n const firstBit = i > firstInt ? 0 : start & 0x1F;\n const lastBit = i < lastInt ? 31 : end & 0x1F;\n // Ones from firstBit to lastBit, inclusive\n const mask = (2 << lastBit) - (1 << firstBit);\n bits[i] |= mask;\n }\n }\n /**\n * Clears all bits (sets to false).\n */\n clear() {\n const max = this.bits.length;\n const bits = this.bits;\n for (let i = 0; i < max; i++) {\n bits[i] = 0;\n }\n }\n /**\n * Efficient method to check if a range of bits is set, or not set.\n *\n * @param start start of range, inclusive.\n * @param end end of range, exclusive\n * @param value if true, checks that bits in range are set, otherwise checks that they are not set\n * \n * @return true iff all bits are set or not set in range, according to value argument\n * @throws IllegalArgumentException if end is less than start or the range is not contained in the array\n */\n isRange(start /*int*/, end /*int*/, value) {\n if (end < start || start < 0 || end > this.size) {\n throw new IllegalArgumentException();\n }\n if (end === start) {\n return true; // empty range matches\n }\n end--; // will be easier to treat this as the last actually set bit -- inclusive\n const firstInt = Math.floor(start / 32);\n const lastInt = Math.floor(end / 32);\n const bits = this.bits;\n for (let i = firstInt; i <= lastInt; i++) {\n const firstBit = i > firstInt ? 0 : start & 0x1F;\n const lastBit = i < lastInt ? 31 : end & 0x1F;\n // Ones from firstBit to lastBit, inclusive\n const mask = (2 << lastBit) - (1 << firstBit) & 0xFFFFFFFF;\n // TYPESCRIPTPORT: & 0xFFFFFFFF added to discard anything after 32 bits, as ES has 53 bits\n // Return false if we're looking for 1s and the masked bits[i] isn't all 1s (is: that,\n // equals the mask, or we're looking for 0s and the masked portion is not all 0s\n if ((bits[i] & mask) !== (value ? mask : 0)) {\n return false;\n }\n }\n return true;\n }\n appendBit(bit) {\n this.ensureCapacity(this.size + 1);\n if (bit) {\n this.bits[Math.floor(this.size / 32)] |= 1 << (this.size & 0x1F);\n }\n this.size++;\n }\n /**\n * Appends the least-significant bits, from value, in order from most-significant to\n * least-significant. For example, appending 6 bits from 0x000001E will append the bits\n * 0, 1, 1, 1, 1, 0 in that order.\n *\n * @param value {@code int} containing bits to append\n * @param numBits bits from value to append\n */\n appendBits(value /*int*/, numBits /*int*/) {\n if (numBits < 0 || numBits > 32) {\n throw new IllegalArgumentException('Num bits must be between 0 and 32');\n }\n this.ensureCapacity(this.size + numBits);\n // const appendBit = this.appendBit;\n for (let numBitsLeft = numBits; numBitsLeft > 0; numBitsLeft--) {\n this.appendBit(((value >> (numBitsLeft - 1)) & 0x01) === 1);\n }\n }\n appendBitArray(other) {\n const otherSize = other.size;\n this.ensureCapacity(this.size + otherSize);\n // const appendBit = this.appendBit;\n for (let i = 0; i < otherSize; i++) {\n this.appendBit(other.get(i));\n }\n }\n xor(other) {\n if (this.size !== other.size) {\n throw new IllegalArgumentException('Sizes don\\'t match');\n }\n const bits = this.bits;\n for (let i = 0, length = bits.length; i < length; i++) {\n // The last int could be incomplete (i.e. not have 32 bits in\n // it) but there is no problem since 0 XOR 0 == 0.\n bits[i] ^= other.bits[i];\n }\n }\n /**\n *\n * @param bitOffset first bit to start writing\n * @param array array to write into. Bytes are written most-significant byte first. This is the opposite\n * of the internal representation, which is exposed by {@link #getBitArray()}\n * @param offset position in array to start writing\n * @param numBytes how many bytes to write\n */\n toBytes(bitOffset /*int*/, array, offset /*int*/, numBytes /*int*/) {\n for (let i = 0; i < numBytes; i++) {\n let theByte = 0;\n for (let j = 0; j < 8; j++) {\n if (this.get(bitOffset)) {\n theByte |= 1 << (7 - j);\n }\n bitOffset++;\n }\n array[offset + i] = /*(byte)*/ theByte;\n }\n }\n /**\n * @return underlying array of ints. The first element holds the first 32 bits, and the least\n * significant bit is bit 0.\n */\n getBitArray() {\n return this.bits;\n }\n /**\n * Reverses all bits in the array.\n */\n reverse() {\n const newBits = new Int32Array(this.bits.length);\n // reverse all int's first\n const len = Math.floor((this.size - 1) / 32);\n const oldBitsLen = len + 1;\n const bits = this.bits;\n for (let i = 0; i < oldBitsLen; i++) {\n let x = bits[i];\n x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1);\n x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2);\n x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4);\n x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8);\n x = ((x >> 16) & 0x0000ffff) | ((x & 0x0000ffff) << 16);\n newBits[len - i] = /*(int)*/ x;\n }\n // now correct the int's if the bit size isn't a multiple of 32\n if (this.size !== oldBitsLen * 32) {\n const leftOffset = oldBitsLen * 32 - this.size;\n let currentInt = newBits[0] >>> leftOffset;\n for (let i = 1; i < oldBitsLen; i++) {\n const nextInt = newBits[i];\n currentInt |= nextInt << (32 - leftOffset);\n newBits[i - 1] = currentInt;\n currentInt = nextInt >>> leftOffset;\n }\n newBits[oldBitsLen - 1] = currentInt;\n }\n this.bits = newBits;\n }\n static makeArray(size /*int*/) {\n return new Int32Array(Math.floor((size + 31) / 32));\n }\n /*@Override*/\n equals(o) {\n if (!(o instanceof BitArray)) {\n return false;\n }\n const other = o;\n return this.size === other.size && Arrays.equals(this.bits, other.bits);\n }\n /*@Override*/\n hashCode() {\n return 31 * this.size + Arrays.hashCode(this.bits);\n }\n /*@Override*/\n toString() {\n let result = '';\n for (let i = 0, size = this.size; i < size; i++) {\n if ((i & 0x07) === 0) {\n result += ' ';\n }\n result += this.get(i) ? 'X' : '.';\n }\n return result;\n }\n /*@Override*/\n clone() {\n return new BitArray(this.size, this.bits.slice());\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing {*/\n /**\n * Encapsulates a type of hint that a caller may pass to a barcode reader to help it\n * more quickly or accurately decode it. It is up to implementations to decide what,\n * if anything, to do with the information that is supplied.\n *\n * @author Sean Owen\n * @author dswitkin@google.com (Daniel Switkin)\n * @see Reader#decode(BinaryBitmap,java.util.Map)\n */\n var DecodeHintType;\n (function (DecodeHintType) {\n /**\n * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.\n */\n DecodeHintType[DecodeHintType[\"OTHER\"] = 0] = \"OTHER\"; /*(Object.class)*/\n /**\n * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;\n * use {@link Boolean#TRUE}.\n */\n DecodeHintType[DecodeHintType[\"PURE_BARCODE\"] = 1] = \"PURE_BARCODE\"; /*(Void.class)*/\n /**\n * Image is known to be of one of a few possible formats.\n * Maps to a {@link List} of {@link BarcodeFormat}s.\n */\n DecodeHintType[DecodeHintType[\"POSSIBLE_FORMATS\"] = 2] = \"POSSIBLE_FORMATS\"; /*(List.class)*/\n /**\n * Spend more time to try to find a barcode; optimize for accuracy, not speed.\n * Doesn't matter what it maps to; use {@link Boolean#TRUE}.\n */\n DecodeHintType[DecodeHintType[\"TRY_HARDER\"] = 3] = \"TRY_HARDER\"; /*(Void.class)*/\n /**\n * Specifies what character encoding to use when decoding, where applicable (type String)\n */\n DecodeHintType[DecodeHintType[\"CHARACTER_SET\"] = 4] = \"CHARACTER_SET\"; /*(String.class)*/\n /**\n * Allowed lengths of encoded data -- reject anything else. Maps to an {@code Int32Array}.\n */\n DecodeHintType[DecodeHintType[\"ALLOWED_LENGTHS\"] = 5] = \"ALLOWED_LENGTHS\"; /*(Int32Array.class)*/\n /**\n * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;\n * use {@link Boolean#TRUE}.\n */\n DecodeHintType[DecodeHintType[\"ASSUME_CODE_39_CHECK_DIGIT\"] = 6] = \"ASSUME_CODE_39_CHECK_DIGIT\"; /*(Void.class)*/\n /**\n * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.\n * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;\n * use {@link Boolean#TRUE}.\n */\n DecodeHintType[DecodeHintType[\"ASSUME_GS1\"] = 7] = \"ASSUME_GS1\"; /*(Void.class)*/\n /**\n * If true, return the start and end digits in a Codabar barcode instead of stripping them. They\n * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them\n * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.\n */\n DecodeHintType[DecodeHintType[\"RETURN_CODABAR_START_END\"] = 8] = \"RETURN_CODABAR_START_END\"; /*(Void.class)*/\n /**\n * The caller needs to be notified via callback when a possible {@link ResultPoint}\n * is found. Maps to a {@link ResultPointCallback}.\n */\n DecodeHintType[DecodeHintType[\"NEED_RESULT_POINT_CALLBACK\"] = 9] = \"NEED_RESULT_POINT_CALLBACK\"; /*(ResultPointCallback.class)*/\n /**\n * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.\n * Maps to an {@code Int32Array} of the allowed extension lengths, for example [2], [5], or [2, 5].\n * If it is optional to have an extension, do not set this hint. If this is set,\n * and a UPC or EAN barcode is found but an extension is not, then no result will be returned\n * at all.\n */\n DecodeHintType[DecodeHintType[\"ALLOWED_EAN_EXTENSIONS\"] = 10] = \"ALLOWED_EAN_EXTENSIONS\"; /*(Int32Array.class)*/\n // End of enumeration values.\n /**\n * Data type the hint is expecting.\n * Among the possible values the {@link Void} stands out as being used for\n * hints that do not expect a value to be supplied (flag hints). Such hints\n * will possibly have their value ignored, or replaced by a\n * {@link Boolean#TRUE}. Hint suppliers should probably use\n * {@link Boolean#TRUE} as directed by the actual hint documentation.\n */\n // private valueType: Class\n // DecodeHintType(valueType: Class) {\n // this.valueType = valueType\n // }\n // public getValueType(): Class {\n // return valueType\n // }\n })(DecodeHintType || (DecodeHintType = {}));\n var DecodeHintType$1 = DecodeHintType;\n\n /**\n * Custom Error class of type Exception.\n */\n class FormatException extends Exception {\n static getFormatInstance() {\n return new FormatException();\n }\n }\n FormatException.kind = 'FormatException';\n\n /*import java.util.HashMap;*/\n /*import java.util.Map;*/\n var CharacterSetValueIdentifiers;\n (function (CharacterSetValueIdentifiers) {\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"Cp437\"] = 0] = \"Cp437\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_1\"] = 1] = \"ISO8859_1\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_2\"] = 2] = \"ISO8859_2\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_3\"] = 3] = \"ISO8859_3\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_4\"] = 4] = \"ISO8859_4\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_5\"] = 5] = \"ISO8859_5\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_6\"] = 6] = \"ISO8859_6\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_7\"] = 7] = \"ISO8859_7\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_8\"] = 8] = \"ISO8859_8\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_9\"] = 9] = \"ISO8859_9\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_10\"] = 10] = \"ISO8859_10\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_11\"] = 11] = \"ISO8859_11\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_13\"] = 12] = \"ISO8859_13\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_14\"] = 13] = \"ISO8859_14\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_15\"] = 14] = \"ISO8859_15\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ISO8859_16\"] = 15] = \"ISO8859_16\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"SJIS\"] = 16] = \"SJIS\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"Cp1250\"] = 17] = \"Cp1250\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"Cp1251\"] = 18] = \"Cp1251\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"Cp1252\"] = 19] = \"Cp1252\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"Cp1256\"] = 20] = \"Cp1256\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"UnicodeBigUnmarked\"] = 21] = \"UnicodeBigUnmarked\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"UTF8\"] = 22] = \"UTF8\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"ASCII\"] = 23] = \"ASCII\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"Big5\"] = 24] = \"Big5\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"GB18030\"] = 25] = \"GB18030\";\n CharacterSetValueIdentifiers[CharacterSetValueIdentifiers[\"EUC_KR\"] = 26] = \"EUC_KR\";\n })(CharacterSetValueIdentifiers || (CharacterSetValueIdentifiers = {}));\n /**\n * Encapsulates a Character Set ECI, according to \"Extended Channel Interpretations\" 5.3.1.1\n * of ISO 18004.\n *\n * @author Sean Owen\n */\n class CharacterSetECI {\n constructor(valueIdentifier, valuesParam, name, ...otherEncodingNames) {\n this.valueIdentifier = valueIdentifier;\n this.name = name;\n if (typeof valuesParam === 'number') {\n this.values = Int32Array.from([valuesParam]);\n }\n else {\n this.values = valuesParam;\n }\n this.otherEncodingNames = otherEncodingNames;\n CharacterSetECI.VALUE_IDENTIFIER_TO_ECI.set(valueIdentifier, this);\n CharacterSetECI.NAME_TO_ECI.set(name, this);\n const values = this.values;\n for (let i = 0, length = values.length; i !== length; i++) {\n const v = values[i];\n CharacterSetECI.VALUES_TO_ECI.set(v, this);\n }\n for (const otherName of otherEncodingNames) {\n CharacterSetECI.NAME_TO_ECI.set(otherName, this);\n }\n }\n // CharacterSetECI(value: number /*int*/) {\n // this(new Int32Array {value})\n // }\n // CharacterSetECI(value: number /*int*/, String... otherEncodingNames) {\n // this.values = new Int32Array {value}\n // this.otherEncodingNames = otherEncodingNames\n // }\n // CharacterSetECI(values: Int32Array, String... otherEncodingNames) {\n // this.values = values\n // this.otherEncodingNames = otherEncodingNames\n // }\n getValueIdentifier() {\n return this.valueIdentifier;\n }\n getName() {\n return this.name;\n }\n getValue() {\n return this.values[0];\n }\n /**\n * @param value character set ECI value\n * @return {@code CharacterSetECI} representing ECI of given value, or null if it is legal but\n * unsupported\n * @throws FormatException if ECI value is invalid\n */\n static getCharacterSetECIByValue(value /*int*/) {\n if (value < 0 || value >= 900) {\n throw new FormatException('incorect value');\n }\n const characterSet = CharacterSetECI.VALUES_TO_ECI.get(value);\n if (undefined === characterSet) {\n throw new FormatException('incorect value');\n }\n return characterSet;\n }\n /**\n * @param name character set ECI encoding name\n * @return CharacterSetECI representing ECI for character encoding, or null if it is legal\n * but unsupported\n */\n static getCharacterSetECIByName(name) {\n const characterSet = CharacterSetECI.NAME_TO_ECI.get(name);\n if (undefined === characterSet) {\n throw new FormatException('incorect value');\n }\n return characterSet;\n }\n equals(o) {\n if (!(o instanceof CharacterSetECI)) {\n return false;\n }\n const other = o;\n return this.getName() === other.getName();\n }\n }\n CharacterSetECI.VALUE_IDENTIFIER_TO_ECI = new Map();\n CharacterSetECI.VALUES_TO_ECI = new Map();\n CharacterSetECI.NAME_TO_ECI = new Map();\n // Enum name is a Java encoding valid for java.lang and java.io\n // TYPESCRIPTPORT: changed the main label for ISO as the TextEncoder did not recognized them in the form from java\n // (eg ISO8859_1 must be ISO88591 or ISO8859-1 or ISO-8859-1)\n // later on: well, except 16 wich does not work with ISO885916 so used ISO-8859-1 form for default\n CharacterSetECI.Cp437 = new CharacterSetECI(CharacterSetValueIdentifiers.Cp437, Int32Array.from([0, 2]), 'Cp437');\n CharacterSetECI.ISO8859_1 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_1, Int32Array.from([1, 3]), 'ISO-8859-1', 'ISO88591', 'ISO8859_1');\n CharacterSetECI.ISO8859_2 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_2, 4, 'ISO-8859-2', 'ISO88592', 'ISO8859_2');\n CharacterSetECI.ISO8859_3 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_3, 5, 'ISO-8859-3', 'ISO88593', 'ISO8859_3');\n CharacterSetECI.ISO8859_4 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_4, 6, 'ISO-8859-4', 'ISO88594', 'ISO8859_4');\n CharacterSetECI.ISO8859_5 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_5, 7, 'ISO-8859-5', 'ISO88595', 'ISO8859_5');\n CharacterSetECI.ISO8859_6 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_6, 8, 'ISO-8859-6', 'ISO88596', 'ISO8859_6');\n CharacterSetECI.ISO8859_7 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_7, 9, 'ISO-8859-7', 'ISO88597', 'ISO8859_7');\n CharacterSetECI.ISO8859_8 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_8, 10, 'ISO-8859-8', 'ISO88598', 'ISO8859_8');\n CharacterSetECI.ISO8859_9 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_9, 11, 'ISO-8859-9', 'ISO88599', 'ISO8859_9');\n CharacterSetECI.ISO8859_10 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_10, 12, 'ISO-8859-10', 'ISO885910', 'ISO8859_10');\n CharacterSetECI.ISO8859_11 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_11, 13, 'ISO-8859-11', 'ISO885911', 'ISO8859_11');\n CharacterSetECI.ISO8859_13 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_13, 15, 'ISO-8859-13', 'ISO885913', 'ISO8859_13');\n CharacterSetECI.ISO8859_14 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_14, 16, 'ISO-8859-14', 'ISO885914', 'ISO8859_14');\n CharacterSetECI.ISO8859_15 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_15, 17, 'ISO-8859-15', 'ISO885915', 'ISO8859_15');\n CharacterSetECI.ISO8859_16 = new CharacterSetECI(CharacterSetValueIdentifiers.ISO8859_16, 18, 'ISO-8859-16', 'ISO885916', 'ISO8859_16');\n CharacterSetECI.SJIS = new CharacterSetECI(CharacterSetValueIdentifiers.SJIS, 20, 'SJIS', 'Shift_JIS');\n CharacterSetECI.Cp1250 = new CharacterSetECI(CharacterSetValueIdentifiers.Cp1250, 21, 'Cp1250', 'windows-1250');\n CharacterSetECI.Cp1251 = new CharacterSetECI(CharacterSetValueIdentifiers.Cp1251, 22, 'Cp1251', 'windows-1251');\n CharacterSetECI.Cp1252 = new CharacterSetECI(CharacterSetValueIdentifiers.Cp1252, 23, 'Cp1252', 'windows-1252');\n CharacterSetECI.Cp1256 = new CharacterSetECI(CharacterSetValueIdentifiers.Cp1256, 24, 'Cp1256', 'windows-1256');\n CharacterSetECI.UnicodeBigUnmarked = new CharacterSetECI(CharacterSetValueIdentifiers.UnicodeBigUnmarked, 25, 'UnicodeBigUnmarked', 'UTF-16BE', 'UnicodeBig');\n CharacterSetECI.UTF8 = new CharacterSetECI(CharacterSetValueIdentifiers.UTF8, 26, 'UTF8', 'UTF-8');\n CharacterSetECI.ASCII = new CharacterSetECI(CharacterSetValueIdentifiers.ASCII, Int32Array.from([27, 170]), 'ASCII', 'US-ASCII');\n CharacterSetECI.Big5 = new CharacterSetECI(CharacterSetValueIdentifiers.Big5, 28, 'Big5');\n CharacterSetECI.GB18030 = new CharacterSetECI(CharacterSetValueIdentifiers.GB18030, 29, 'GB18030', 'GB2312', 'EUC_CN', 'GBK');\n CharacterSetECI.EUC_KR = new CharacterSetECI(CharacterSetValueIdentifiers.EUC_KR, 30, 'EUC_KR', 'EUC-KR');\n\n /**\n * Custom Error class of type Exception.\n */\n class UnsupportedOperationException extends Exception {\n }\n UnsupportedOperationException.kind = 'UnsupportedOperationException';\n\n /**\n * Responsible for en/decoding strings.\n */\n class StringEncoding {\n /**\n * Decodes some Uint8Array to a string format.\n */\n static decode(bytes, encoding) {\n const encodingName = this.encodingName(encoding);\n if (this.customDecoder) {\n return this.customDecoder(bytes, encodingName);\n }\n // Increases browser support.\n if (typeof TextDecoder === 'undefined' || this.shouldDecodeOnFallback(encodingName)) {\n return this.decodeFallback(bytes, encodingName);\n }\n return new TextDecoder(encodingName).decode(bytes);\n }\n /**\n * Checks if the decoding method should use the fallback for decoding\n * once Node TextDecoder doesn't support all encoding formats.\n *\n * @param encodingName\n */\n static shouldDecodeOnFallback(encodingName) {\n return !StringEncoding.isBrowser() && encodingName === 'ISO-8859-1';\n }\n /**\n * Encodes some string into a Uint8Array.\n */\n static encode(s, encoding) {\n const encodingName = this.encodingName(encoding);\n if (this.customEncoder) {\n return this.customEncoder(s, encodingName);\n }\n // Increases browser support.\n if (typeof TextEncoder === 'undefined') {\n return this.encodeFallback(s);\n }\n // TextEncoder only encodes to UTF8 by default as specified by encoding.spec.whatwg.org\n return new TextEncoder().encode(s);\n }\n static isBrowser() {\n return (typeof window !== 'undefined' && {}.toString.call(window) === '[object Window]');\n }\n /**\n * Returns the string value from some encoding character set.\n */\n static encodingName(encoding) {\n return typeof encoding === 'string'\n ? encoding\n : encoding.getName();\n }\n /**\n * Returns character set from some encoding character set.\n */\n static encodingCharacterSet(encoding) {\n if (encoding instanceof CharacterSetECI) {\n return encoding;\n }\n return CharacterSetECI.getCharacterSetECIByName(encoding);\n }\n /**\n * Runs a fallback for the native decoding funcion.\n */\n static decodeFallback(bytes, encoding) {\n const characterSet = this.encodingCharacterSet(encoding);\n if (StringEncoding.isDecodeFallbackSupported(characterSet)) {\n let s = '';\n for (let i = 0, length = bytes.length; i < length; i++) {\n let h = bytes[i].toString(16);\n if (h.length < 2) {\n h = '0' + h;\n }\n s += '%' + h;\n }\n return decodeURIComponent(s);\n }\n if (characterSet.equals(CharacterSetECI.UnicodeBigUnmarked)) {\n return String.fromCharCode.apply(null, new Uint16Array(bytes.buffer));\n }\n throw new UnsupportedOperationException(`Encoding ${this.encodingName(encoding)} not supported by fallback.`);\n }\n static isDecodeFallbackSupported(characterSet) {\n return characterSet.equals(CharacterSetECI.UTF8) ||\n characterSet.equals(CharacterSetECI.ISO8859_1) ||\n characterSet.equals(CharacterSetECI.ASCII);\n }\n /**\n * Runs a fallback for the native encoding funcion.\n *\n * @see https://stackoverflow.com/a/17192845/4367683\n */\n static encodeFallback(s) {\n const encodedURIstring = btoa(unescape(encodeURIComponent(s)));\n const charList = encodedURIstring.split('');\n const uintArray = [];\n for (let i = 0; i < charList.length; i++) {\n uintArray.push(charList[i].charCodeAt(0));\n }\n return new Uint8Array(uintArray);\n }\n }\n\n /*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Common string-related functions.\n *\n * @author Sean Owen\n * @author Alex Dupre\n */\n class StringUtils {\n // SHIFT_JIS.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING) ||\n // EUC_JP.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING);\n static castAsNonUtf8Char(code, encoding = null) {\n // ISO 8859-1 is the Java default as UTF-8 is JavaScripts\n // you can see this method as a Java version of String.fromCharCode\n const e = encoding ? encoding.getName() : this.ISO88591;\n // use passed format (fromCharCode will return UTF8 encoding)\n return StringEncoding.decode(new Uint8Array([code]), e);\n }\n /**\n * @param bytes bytes encoding a string, whose encoding should be guessed\n * @param hints decode hints if applicable\n * @return name of guessed encoding; at the moment will only guess one of:\n * {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform\n * default encoding if none of these can possibly be correct\n */\n static guessEncoding(bytes, hints) {\n if (hints !== null && hints !== undefined && undefined !== hints.get(DecodeHintType$1.CHARACTER_SET)) {\n return hints.get(DecodeHintType$1.CHARACTER_SET).toString();\n }\n // For now, merely tries to distinguish ISO-8859-1, UTF-8 and Shift_JIS,\n // which should be by far the most common encodings.\n const length = bytes.length;\n let canBeISO88591 = true;\n let canBeShiftJIS = true;\n let canBeUTF8 = true;\n let utf8BytesLeft = 0;\n // int utf8LowChars = 0\n let utf2BytesChars = 0;\n let utf3BytesChars = 0;\n let utf4BytesChars = 0;\n let sjisBytesLeft = 0;\n // int sjisLowChars = 0\n let sjisKatakanaChars = 0;\n // int sjisDoubleBytesChars = 0\n let sjisCurKatakanaWordLength = 0;\n let sjisCurDoubleBytesWordLength = 0;\n let sjisMaxKatakanaWordLength = 0;\n let sjisMaxDoubleBytesWordLength = 0;\n // int isoLowChars = 0\n // int isoHighChars = 0\n let isoHighOther = 0;\n const utf8bom = bytes.length > 3 &&\n bytes[0] === /*(byte) */ 0xEF &&\n bytes[1] === /*(byte) */ 0xBB &&\n bytes[2] === /*(byte) */ 0xBF;\n for (let i = 0; i < length && (canBeISO88591 || canBeShiftJIS || canBeUTF8); i++) {\n const value = bytes[i] & 0xFF;\n // UTF-8 stuff\n if (canBeUTF8) {\n if (utf8BytesLeft > 0) {\n if ((value & 0x80) === 0) {\n canBeUTF8 = false;\n }\n else {\n utf8BytesLeft--;\n }\n }\n else if ((value & 0x80) !== 0) {\n if ((value & 0x40) === 0) {\n canBeUTF8 = false;\n }\n else {\n utf8BytesLeft++;\n if ((value & 0x20) === 0) {\n utf2BytesChars++;\n }\n else {\n utf8BytesLeft++;\n if ((value & 0x10) === 0) {\n utf3BytesChars++;\n }\n else {\n utf8BytesLeft++;\n if ((value & 0x08) === 0) {\n utf4BytesChars++;\n }\n else {\n canBeUTF8 = false;\n }\n }\n }\n }\n } // else {\n // utf8LowChars++\n // }\n }\n // ISO-8859-1 stuff\n if (canBeISO88591) {\n if (value > 0x7F && value < 0xA0) {\n canBeISO88591 = false;\n }\n else if (value > 0x9F) {\n if (value < 0xC0 || value === 0xD7 || value === 0xF7) {\n isoHighOther++;\n } // else {\n // isoHighChars++\n // }\n } // else {\n // isoLowChars++\n // }\n }\n // Shift_JIS stuff\n if (canBeShiftJIS) {\n if (sjisBytesLeft > 0) {\n if (value < 0x40 || value === 0x7F || value > 0xFC) {\n canBeShiftJIS = false;\n }\n else {\n sjisBytesLeft--;\n }\n }\n else if (value === 0x80 || value === 0xA0 || value > 0xEF) {\n canBeShiftJIS = false;\n }\n else if (value > 0xA0 && value < 0xE0) {\n sjisKatakanaChars++;\n sjisCurDoubleBytesWordLength = 0;\n sjisCurKatakanaWordLength++;\n if (sjisCurKatakanaWordLength > sjisMaxKatakanaWordLength) {\n sjisMaxKatakanaWordLength = sjisCurKatakanaWordLength;\n }\n }\n else if (value > 0x7F) {\n sjisBytesLeft++;\n // sjisDoubleBytesChars++\n sjisCurKatakanaWordLength = 0;\n sjisCurDoubleBytesWordLength++;\n if (sjisCurDoubleBytesWordLength > sjisMaxDoubleBytesWordLength) {\n sjisMaxDoubleBytesWordLength = sjisCurDoubleBytesWordLength;\n }\n }\n else {\n // sjisLowChars++\n sjisCurKatakanaWordLength = 0;\n sjisCurDoubleBytesWordLength = 0;\n }\n }\n }\n if (canBeUTF8 && utf8BytesLeft > 0) {\n canBeUTF8 = false;\n }\n if (canBeShiftJIS && sjisBytesLeft > 0) {\n canBeShiftJIS = false;\n }\n // Easy -- if there is BOM or at least 1 valid not-single byte character (and no evidence it can't be UTF-8), done\n if (canBeUTF8 && (utf8bom || utf2BytesChars + utf3BytesChars + utf4BytesChars > 0)) {\n return StringUtils.UTF8;\n }\n // Easy -- if assuming Shift_JIS or at least 3 valid consecutive not-ascii characters (and no evidence it can't be), done\n if (canBeShiftJIS && (StringUtils.ASSUME_SHIFT_JIS || sjisMaxKatakanaWordLength >= 3 || sjisMaxDoubleBytesWordLength >= 3)) {\n return StringUtils.SHIFT_JIS;\n }\n // Distinguishing Shift_JIS and ISO-8859-1 can be a little tough for short words. The crude heuristic is:\n // - If we saw\n // - only two consecutive katakana chars in the whole text, or\n // - at least 10% of bytes that could be \"upper\" not-alphanumeric Latin1,\n // - then we conclude Shift_JIS, else ISO-8859-1\n if (canBeISO88591 && canBeShiftJIS) {\n return (sjisMaxKatakanaWordLength === 2 && sjisKatakanaChars === 2) || isoHighOther * 10 >= length\n ? StringUtils.SHIFT_JIS : StringUtils.ISO88591;\n }\n // Otherwise, try in order ISO-8859-1, Shift JIS, UTF-8 and fall back to default platform encoding\n if (canBeISO88591) {\n return StringUtils.ISO88591;\n }\n if (canBeShiftJIS) {\n return StringUtils.SHIFT_JIS;\n }\n if (canBeUTF8) {\n return StringUtils.UTF8;\n }\n // Otherwise, we take a wild guess with platform encoding\n return StringUtils.PLATFORM_DEFAULT_ENCODING;\n }\n /**\n *\n * @see https://stackoverflow.com/a/13439711/4367683\n *\n * @param append The new string to append.\n * @param args Argumets values to be formated.\n */\n static format(append, ...args) {\n let i = -1;\n function callback(exp, p0, p1, p2, p3, p4) {\n if (exp === '%%')\n return '%';\n if (args[++i] === undefined)\n return undefined;\n exp = p2 ? parseInt(p2.substr(1)) : undefined;\n let base = p3 ? parseInt(p3.substr(1)) : undefined;\n let val;\n switch (p4) {\n case 's':\n val = args[i];\n break;\n case 'c':\n val = args[i][0];\n break;\n case 'f':\n val = parseFloat(args[i]).toFixed(exp);\n break;\n case 'p':\n val = parseFloat(args[i]).toPrecision(exp);\n break;\n case 'e':\n val = parseFloat(args[i]).toExponential(exp);\n break;\n case 'x':\n val = parseInt(args[i]).toString(base ? base : 16);\n break;\n case 'd':\n val = parseFloat(parseInt(args[i], base ? base : 10).toPrecision(exp)).toFixed(0);\n break;\n }\n val = typeof val === 'object' ? JSON.stringify(val) : (+val).toString(base);\n let size = parseInt(p1); /* padding size */\n let ch = p1 && (p1[0] + '') === '0' ? '0' : ' '; /* isnull? */\n while (val.length < size)\n val = p0 !== undefined ? val + ch : ch + val; /* isminus? */\n return val;\n }\n let regex = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;\n return append.replace(regex, callback);\n }\n /**\n *\n */\n static getBytes(str, encoding) {\n return StringEncoding.encode(str, encoding);\n }\n /**\n * Returns the charcode at the specified index or at index zero.\n */\n static getCharCode(str, index = 0) {\n return str.charCodeAt(index);\n }\n /**\n * Returns char for given charcode\n */\n static getCharAt(charCode) {\n return String.fromCharCode(charCode);\n }\n }\n StringUtils.SHIFT_JIS = CharacterSetECI.SJIS.getName(); // \"SJIS\"\n StringUtils.GB2312 = 'GB2312';\n StringUtils.ISO88591 = CharacterSetECI.ISO8859_1.getName(); // \"ISO8859_1\"\n StringUtils.EUC_JP = 'EUC_JP';\n StringUtils.UTF8 = CharacterSetECI.UTF8.getName(); // \"UTF8\"\n StringUtils.PLATFORM_DEFAULT_ENCODING = StringUtils.UTF8; // \"UTF8\"//Charset.defaultCharset().name()\n StringUtils.ASSUME_SHIFT_JIS = false;\n\n class StringBuilder {\n constructor(value = '') {\n this.value = value;\n }\n enableDecoding(encoding) {\n this.encoding = encoding;\n return this;\n }\n append(s) {\n if (typeof s === 'string') {\n this.value += s.toString();\n }\n else if (this.encoding) {\n // use passed format (fromCharCode will return UTF8 encoding)\n this.value += StringUtils.castAsNonUtf8Char(s, this.encoding);\n }\n else {\n // correctly converts from UTF-8, but not other encodings\n this.value += String.fromCharCode(s);\n }\n return this;\n }\n appendChars(str, offset, len) {\n for (let i = offset; offset < offset + len; i++) {\n this.append(str[i]);\n }\n return this;\n }\n length() {\n return this.value.length;\n }\n charAt(n) {\n return this.value.charAt(n);\n }\n deleteCharAt(n) {\n this.value = this.value.substr(0, n) + this.value.substring(n + 1);\n }\n setCharAt(n, c) {\n this.value = this.value.substr(0, n) + c + this.value.substr(n + 1);\n }\n substring(start, end) {\n return this.value.substring(start, end);\n }\n /**\n * @note helper method for RSS Expanded\n */\n setLengthToZero() {\n this.value = '';\n }\n toString() {\n return this.value;\n }\n insert(n, c) {\n this.value = this.value.substr(0, n) + c + this.value.substr(n + c.length);\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Represents a 2D matrix of bits. In function arguments below, and throughout the common\n * module, x is the column position, and y is the row position. The ordering is always x, y.\n * The origin is at the top-left.

\n *\n *

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins\n * with a new int. This is done intentionally so that we can copy out a row into a BitArray very\n * efficiently.

\n *\n *

The ordering of bits is row-major. Within each int, the least significant bits are used first,\n * meaning they represent lower x values. This is compatible with BitArray's implementation.

\n *\n * @author Sean Owen\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class BitMatrix /*implements Cloneable*/ {\n /**\n * Creates an empty square {@link BitMatrix}.\n *\n * @param dimension height and width\n */\n // public constructor(dimension: number /*int*/) {\n // this(dimension, dimension)\n // }\n /**\n * Creates an empty {@link BitMatrix}.\n *\n * @param width bit matrix width\n * @param height bit matrix height\n */\n // public constructor(width: number /*int*/, height: number /*int*/) {\n // if (width < 1 || height < 1) {\n // throw new IllegalArgumentException(\"Both dimensions must be greater than 0\")\n // }\n // this.width = width\n // this.height = height\n // this.rowSize = (width + 31) / 32\n // bits = new int[rowSize * height];\n // }\n constructor(width /*int*/, height /*int*/, rowSize /*int*/, bits) {\n this.width = width;\n this.height = height;\n this.rowSize = rowSize;\n this.bits = bits;\n if (undefined === height || null === height) {\n height = width;\n }\n this.height = height;\n if (width < 1 || height < 1) {\n throw new IllegalArgumentException('Both dimensions must be greater than 0');\n }\n if (undefined === rowSize || null === rowSize) {\n rowSize = Math.floor((width + 31) / 32);\n }\n this.rowSize = rowSize;\n if (undefined === bits || null === bits) {\n this.bits = new Int32Array(this.rowSize * this.height);\n }\n }\n /**\n * Interprets a 2D array of booleans as a {@link BitMatrix}, where \"true\" means an \"on\" bit.\n *\n * @function parse\n * @param image bits of the image, as a row-major 2D array. Elements are arrays representing rows\n * @return {@link BitMatrix} representation of image\n */\n static parseFromBooleanArray(image) {\n const height = image.length;\n const width = image[0].length;\n const bits = new BitMatrix(width, height);\n for (let i = 0; i < height; i++) {\n const imageI = image[i];\n for (let j = 0; j < width; j++) {\n if (imageI[j]) {\n bits.set(j, i);\n }\n }\n }\n return bits;\n }\n /**\n *\n * @function parse\n * @param stringRepresentation\n * @param setString\n * @param unsetString\n */\n static parseFromString(stringRepresentation, setString, unsetString) {\n if (stringRepresentation === null) {\n throw new IllegalArgumentException('stringRepresentation cannot be null');\n }\n const bits = new Array(stringRepresentation.length);\n let bitsPos = 0;\n let rowStartPos = 0;\n let rowLength = -1;\n let nRows = 0;\n let pos = 0;\n while (pos < stringRepresentation.length) {\n if (stringRepresentation.charAt(pos) === '\\n' ||\n stringRepresentation.charAt(pos) === '\\r') {\n if (bitsPos > rowStartPos) {\n if (rowLength === -1) {\n rowLength = bitsPos - rowStartPos;\n }\n else if (bitsPos - rowStartPos !== rowLength) {\n throw new IllegalArgumentException('row lengths do not match');\n }\n rowStartPos = bitsPos;\n nRows++;\n }\n pos++;\n }\n else if (stringRepresentation.substring(pos, pos + setString.length) === setString) {\n pos += setString.length;\n bits[bitsPos] = true;\n bitsPos++;\n }\n else if (stringRepresentation.substring(pos, pos + unsetString.length) === unsetString) {\n pos += unsetString.length;\n bits[bitsPos] = false;\n bitsPos++;\n }\n else {\n throw new IllegalArgumentException('illegal character encountered: ' + stringRepresentation.substring(pos));\n }\n }\n // no EOL at end?\n if (bitsPos > rowStartPos) {\n if (rowLength === -1) {\n rowLength = bitsPos - rowStartPos;\n }\n else if (bitsPos - rowStartPos !== rowLength) {\n throw new IllegalArgumentException('row lengths do not match');\n }\n nRows++;\n }\n const matrix = new BitMatrix(rowLength, nRows);\n for (let i = 0; i < bitsPos; i++) {\n if (bits[i]) {\n matrix.set(Math.floor(i % rowLength), Math.floor(i / rowLength));\n }\n }\n return matrix;\n }\n /**\n *

Gets the requested bit, where true means black.

\n *\n * @param x The horizontal component (i.e. which column)\n * @param y The vertical component (i.e. which row)\n * @return value of given bit in matrix\n */\n get(x /*int*/, y /*int*/) {\n const offset = y * this.rowSize + Math.floor(x / 32);\n return ((this.bits[offset] >>> (x & 0x1f)) & 1) !== 0;\n }\n /**\n *

Sets the given bit to true.

\n *\n * @param x The horizontal component (i.e. which column)\n * @param y The vertical component (i.e. which row)\n */\n set(x /*int*/, y /*int*/) {\n const offset = y * this.rowSize + Math.floor(x / 32);\n this.bits[offset] |= (1 << (x & 0x1f)) & 0xFFFFFFFF;\n }\n unset(x /*int*/, y /*int*/) {\n const offset = y * this.rowSize + Math.floor(x / 32);\n this.bits[offset] &= ~((1 << (x & 0x1f)) & 0xFFFFFFFF);\n }\n /**\n *

Flips the given bit.

\n *\n * @param x The horizontal component (i.e. which column)\n * @param y The vertical component (i.e. which row)\n */\n flip(x /*int*/, y /*int*/) {\n const offset = y * this.rowSize + Math.floor(x / 32);\n this.bits[offset] ^= ((1 << (x & 0x1f)) & 0xFFFFFFFF);\n }\n /**\n * Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding\n * mask bit is set.\n *\n * @param mask XOR mask\n */\n xor(mask) {\n if (this.width !== mask.getWidth() || this.height !== mask.getHeight()\n || this.rowSize !== mask.getRowSize()) {\n throw new IllegalArgumentException('input matrix dimensions do not match');\n }\n const rowArray = new BitArray(Math.floor(this.width / 32) + 1);\n const rowSize = this.rowSize;\n const bits = this.bits;\n for (let y = 0, height = this.height; y < height; y++) {\n const offset = y * rowSize;\n const row = mask.getRow(y, rowArray).getBitArray();\n for (let x = 0; x < rowSize; x++) {\n bits[offset + x] ^= row[x];\n }\n }\n }\n /**\n * Clears all bits (sets to false).\n */\n clear() {\n const bits = this.bits;\n const max = bits.length;\n for (let i = 0; i < max; i++) {\n bits[i] = 0;\n }\n }\n /**\n *

Sets a square region of the bit matrix to true.

\n *\n * @param left The horizontal position to begin at (inclusive)\n * @param top The vertical position to begin at (inclusive)\n * @param width The width of the region\n * @param height The height of the region\n */\n setRegion(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n if (top < 0 || left < 0) {\n throw new IllegalArgumentException('Left and top must be nonnegative');\n }\n if (height < 1 || width < 1) {\n throw new IllegalArgumentException('Height and width must be at least 1');\n }\n const right = left + width;\n const bottom = top + height;\n if (bottom > this.height || right > this.width) {\n throw new IllegalArgumentException('The region must fit inside the matrix');\n }\n const rowSize = this.rowSize;\n const bits = this.bits;\n for (let y = top; y < bottom; y++) {\n const offset = y * rowSize;\n for (let x = left; x < right; x++) {\n bits[offset + Math.floor(x / 32)] |= ((1 << (x & 0x1f)) & 0xFFFFFFFF);\n }\n }\n }\n /**\n * A fast method to retrieve one row of data from the matrix as a BitArray.\n *\n * @param y The row to retrieve\n * @param row An optional caller-allocated BitArray, will be allocated if null or too small\n * @return The resulting BitArray - this reference should always be used even when passing\n * your own row\n */\n getRow(y /*int*/, row) {\n if (row === null || row === undefined || row.getSize() < this.width) {\n row = new BitArray(this.width);\n }\n else {\n row.clear();\n }\n const rowSize = this.rowSize;\n const bits = this.bits;\n const offset = y * rowSize;\n for (let x = 0; x < rowSize; x++) {\n row.setBulk(x * 32, bits[offset + x]);\n }\n return row;\n }\n /**\n * @param y row to set\n * @param row {@link BitArray} to copy from\n */\n setRow(y /*int*/, row) {\n System.arraycopy(row.getBitArray(), 0, this.bits, y * this.rowSize, this.rowSize);\n }\n /**\n * Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees\n */\n rotate180() {\n const width = this.getWidth();\n const height = this.getHeight();\n let topRow = new BitArray(width);\n let bottomRow = new BitArray(width);\n for (let i = 0, length = Math.floor((height + 1) / 2); i < length; i++) {\n topRow = this.getRow(i, topRow);\n bottomRow = this.getRow(height - 1 - i, bottomRow);\n topRow.reverse();\n bottomRow.reverse();\n this.setRow(i, bottomRow);\n this.setRow(height - 1 - i, topRow);\n }\n }\n /**\n * This is useful in detecting the enclosing rectangle of a 'pure' barcode.\n *\n * @return {@code left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white\n */\n getEnclosingRectangle() {\n const width = this.width;\n const height = this.height;\n const rowSize = this.rowSize;\n const bits = this.bits;\n let left = width;\n let top = height;\n let right = -1;\n let bottom = -1;\n for (let y = 0; y < height; y++) {\n for (let x32 = 0; x32 < rowSize; x32++) {\n const theBits = bits[y * rowSize + x32];\n if (theBits !== 0) {\n if (y < top) {\n top = y;\n }\n if (y > bottom) {\n bottom = y;\n }\n if (x32 * 32 < left) {\n let bit = 0;\n while (((theBits << (31 - bit)) & 0xFFFFFFFF) === 0) {\n bit++;\n }\n if ((x32 * 32 + bit) < left) {\n left = x32 * 32 + bit;\n }\n }\n if (x32 * 32 + 31 > right) {\n let bit = 31;\n while ((theBits >>> bit) === 0) {\n bit--;\n }\n if ((x32 * 32 + bit) > right) {\n right = x32 * 32 + bit;\n }\n }\n }\n }\n }\n if (right < left || bottom < top) {\n return null;\n }\n return Int32Array.from([left, top, right - left + 1, bottom - top + 1]);\n }\n /**\n * This is useful in detecting a corner of a 'pure' barcode.\n *\n * @return {@code x,y} coordinate of top-left-most 1 bit, or null if it is all white\n */\n getTopLeftOnBit() {\n const rowSize = this.rowSize;\n const bits = this.bits;\n let bitsOffset = 0;\n while (bitsOffset < bits.length && bits[bitsOffset] === 0) {\n bitsOffset++;\n }\n if (bitsOffset === bits.length) {\n return null;\n }\n const y = bitsOffset / rowSize;\n let x = (bitsOffset % rowSize) * 32;\n const theBits = bits[bitsOffset];\n let bit = 0;\n while (((theBits << (31 - bit)) & 0xFFFFFFFF) === 0) {\n bit++;\n }\n x += bit;\n return Int32Array.from([x, y]);\n }\n getBottomRightOnBit() {\n const rowSize = this.rowSize;\n const bits = this.bits;\n let bitsOffset = bits.length - 1;\n while (bitsOffset >= 0 && bits[bitsOffset] === 0) {\n bitsOffset--;\n }\n if (bitsOffset < 0) {\n return null;\n }\n const y = Math.floor(bitsOffset / rowSize);\n let x = Math.floor(bitsOffset % rowSize) * 32;\n const theBits = bits[bitsOffset];\n let bit = 31;\n while ((theBits >>> bit) === 0) {\n bit--;\n }\n x += bit;\n return Int32Array.from([x, y]);\n }\n /**\n * @return The width of the matrix\n */\n getWidth() {\n return this.width;\n }\n /**\n * @return The height of the matrix\n */\n getHeight() {\n return this.height;\n }\n /**\n * @return The row size of the matrix\n */\n getRowSize() {\n return this.rowSize;\n }\n /*@Override*/\n equals(o) {\n if (!(o instanceof BitMatrix)) {\n return false;\n }\n const other = o;\n return this.width === other.width && this.height === other.height && this.rowSize === other.rowSize &&\n Arrays.equals(this.bits, other.bits);\n }\n /*@Override*/\n hashCode() {\n let hash = this.width;\n hash = 31 * hash + this.width;\n hash = 31 * hash + this.height;\n hash = 31 * hash + this.rowSize;\n hash = 31 * hash + Arrays.hashCode(this.bits);\n return hash;\n }\n /**\n * @return string representation using \"X\" for set and \" \" for unset bits\n */\n /*@Override*/\n // public toString(): string {\n // return toString(\": \"X, \" \")\n // }\n /**\n * @param setString representation of a set bit\n * @param unsetString representation of an unset bit\n * @return string representation of entire matrix utilizing given strings\n */\n // public toString(setString: string = \"X \", unsetString: string = \" \"): string {\n // return this.buildToString(setString, unsetString, \"\\n\")\n // }\n /**\n * @param setString representation of a set bit\n * @param unsetString representation of an unset bit\n * @param lineSeparator newline character in string representation\n * @return string representation of entire matrix utilizing given strings and line separator\n * @deprecated call {@link #toString(String,String)} only, which uses \\n line separator always\n */\n // @Deprecated\n toString(setString = 'X ', unsetString = ' ', lineSeparator = '\\n') {\n return this.buildToString(setString, unsetString, lineSeparator);\n }\n buildToString(setString, unsetString, lineSeparator) {\n let result = new StringBuilder();\n // result.append(lineSeparator);\n for (let y = 0, height = this.height; y < height; y++) {\n for (let x = 0, width = this.width; x < width; x++) {\n result.append(this.get(x, y) ? setString : unsetString);\n }\n result.append(lineSeparator);\n }\n return result.toString();\n }\n /*@Override*/\n clone() {\n return new BitMatrix(this.width, this.height, this.rowSize, this.bits.slice());\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class NotFoundException extends Exception {\n static getNotFoundInstance() {\n return new NotFoundException();\n }\n }\n NotFoundException.kind = 'NotFoundException';\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This Binarizer implementation uses the old ZXing global histogram approach. It is suitable\n * for low-end mobile devices which don't have enough CPU or memory to use a local thresholding\n * algorithm. However, because it picks a global black point, it cannot handle difficult shadows\n * and gradients.\n *\n * Faster mobile devices and all desktop applications should probably use HybridBinarizer instead.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Sean Owen\n */\n class GlobalHistogramBinarizer extends Binarizer {\n constructor(source) {\n super(source);\n this.luminances = GlobalHistogramBinarizer.EMPTY;\n this.buckets = new Int32Array(GlobalHistogramBinarizer.LUMINANCE_BUCKETS);\n }\n // Applies simple sharpening to the row data to improve performance of the 1D Readers.\n /*@Override*/\n getBlackRow(y /*int*/, row) {\n const source = this.getLuminanceSource();\n const width = source.getWidth();\n if (row === undefined || row === null || row.getSize() < width) {\n row = new BitArray(width);\n }\n else {\n row.clear();\n }\n this.initArrays(width);\n const localLuminances = source.getRow(y, this.luminances);\n const localBuckets = this.buckets;\n for (let x = 0; x < width; x++) {\n localBuckets[(localLuminances[x] & 0xff) >> GlobalHistogramBinarizer.LUMINANCE_SHIFT]++;\n }\n const blackPoint = GlobalHistogramBinarizer.estimateBlackPoint(localBuckets);\n if (width < 3) {\n // Special case for very small images\n for (let x = 0; x < width; x++) {\n if ((localLuminances[x] & 0xff) < blackPoint) {\n row.set(x);\n }\n }\n }\n else {\n let left = localLuminances[0] & 0xff;\n let center = localLuminances[1] & 0xff;\n for (let x = 1; x < width - 1; x++) {\n const right = localLuminances[x + 1] & 0xff;\n // A simple -1 4 -1 box filter with a weight of 2.\n if (((center * 4) - left - right) / 2 < blackPoint) {\n row.set(x);\n }\n left = center;\n center = right;\n }\n }\n return row;\n }\n // Does not sharpen the data, as this call is intended to only be used by 2D Readers.\n /*@Override*/\n getBlackMatrix() {\n const source = this.getLuminanceSource();\n const width = source.getWidth();\n const height = source.getHeight();\n const matrix = new BitMatrix(width, height);\n // Quickly calculates the histogram by sampling four rows from the image. This proved to be\n // more robust on the blackbox tests than sampling a diagonal as we used to do.\n this.initArrays(width);\n const localBuckets = this.buckets;\n for (let y = 1; y < 5; y++) {\n const row = Math.floor((height * y) / 5);\n const localLuminances = source.getRow(row, this.luminances);\n const right = Math.floor((width * 4) / 5);\n for (let x = Math.floor(width / 5); x < right; x++) {\n const pixel = localLuminances[x] & 0xff;\n localBuckets[pixel >> GlobalHistogramBinarizer.LUMINANCE_SHIFT]++;\n }\n }\n const blackPoint = GlobalHistogramBinarizer.estimateBlackPoint(localBuckets);\n // We delay reading the entire image luminance until the black point estimation succeeds.\n // Although we end up reading four rows twice, it is consistent with our motto of\n // \"fail quickly\" which is necessary for continuous scanning.\n const localLuminances = source.getMatrix();\n for (let y = 0; y < height; y++) {\n const offset = y * width;\n for (let x = 0; x < width; x++) {\n const pixel = localLuminances[offset + x] & 0xff;\n if (pixel < blackPoint) {\n matrix.set(x, y);\n }\n }\n }\n return matrix;\n }\n /*@Override*/\n createBinarizer(source) {\n return new GlobalHistogramBinarizer(source);\n }\n initArrays(luminanceSize /*int*/) {\n if (this.luminances.length < luminanceSize) {\n this.luminances = new Uint8ClampedArray(luminanceSize);\n }\n const buckets = this.buckets;\n for (let x = 0; x < GlobalHistogramBinarizer.LUMINANCE_BUCKETS; x++) {\n buckets[x] = 0;\n }\n }\n static estimateBlackPoint(buckets) {\n // Find the tallest peak in the histogram.\n const numBuckets = buckets.length;\n let maxBucketCount = 0;\n let firstPeak = 0;\n let firstPeakSize = 0;\n for (let x = 0; x < numBuckets; x++) {\n if (buckets[x] > firstPeakSize) {\n firstPeak = x;\n firstPeakSize = buckets[x];\n }\n if (buckets[x] > maxBucketCount) {\n maxBucketCount = buckets[x];\n }\n }\n // Find the second-tallest peak which is somewhat far from the tallest peak.\n let secondPeak = 0;\n let secondPeakScore = 0;\n for (let x = 0; x < numBuckets; x++) {\n const distanceToBiggest = x - firstPeak;\n // Encourage more distant second peaks by multiplying by square of distance.\n const score = buckets[x] * distanceToBiggest * distanceToBiggest;\n if (score > secondPeakScore) {\n secondPeak = x;\n secondPeakScore = score;\n }\n }\n // Make sure firstPeak corresponds to the black peak.\n if (firstPeak > secondPeak) {\n const temp = firstPeak;\n firstPeak = secondPeak;\n secondPeak = temp;\n }\n // If there is too little contrast in the image to pick a meaningful black point, throw rather\n // than waste time trying to decode the image, and risk false positives.\n if (secondPeak - firstPeak <= numBuckets / 16) {\n throw new NotFoundException();\n }\n // Find a valley between them that is low and closer to the white peak.\n let bestValley = secondPeak - 1;\n let bestValleyScore = -1;\n for (let x = secondPeak - 1; x > firstPeak; x--) {\n const fromFirst = x - firstPeak;\n const score = fromFirst * fromFirst * (secondPeak - x) * (maxBucketCount - buckets[x]);\n if (score > bestValleyScore) {\n bestValley = x;\n bestValleyScore = score;\n }\n }\n return bestValley << GlobalHistogramBinarizer.LUMINANCE_SHIFT;\n }\n }\n GlobalHistogramBinarizer.LUMINANCE_BITS = 5;\n GlobalHistogramBinarizer.LUMINANCE_SHIFT = 8 - GlobalHistogramBinarizer.LUMINANCE_BITS;\n GlobalHistogramBinarizer.LUMINANCE_BUCKETS = 1 << GlobalHistogramBinarizer.LUMINANCE_BITS;\n GlobalHistogramBinarizer.EMPTY = Uint8ClampedArray.from([0]);\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This class implements a local thresholding algorithm, which while slower than the\n * GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for\n * high frequency images of barcodes with black data on white backgrounds. For this application,\n * it does a much better job than a global blackpoint with severe shadows and gradients.\n * However it tends to produce artifacts on lower frequency images and is therefore not\n * a good general purpose binarizer for uses outside ZXing.\n *\n * This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers,\n * and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already\n * inherently local, and only fails for horizontal gradients. We can revisit that problem later,\n * but for now it was not a win to use local blocks for 1D.\n *\n * This Binarizer is the default for the unit tests and the recommended class for library users.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class HybridBinarizer extends GlobalHistogramBinarizer {\n constructor(source) {\n super(source);\n this.matrix = null;\n }\n /**\n * Calculates the final BitMatrix once for all requests. This could be called once from the\n * constructor instead, but there are some advantages to doing it lazily, such as making\n * profiling easier, and not doing heavy lifting when callers don't expect it.\n */\n /*@Override*/\n getBlackMatrix() {\n if (this.matrix !== null) {\n return this.matrix;\n }\n const source = this.getLuminanceSource();\n const width = source.getWidth();\n const height = source.getHeight();\n if (width >= HybridBinarizer.MINIMUM_DIMENSION && height >= HybridBinarizer.MINIMUM_DIMENSION) {\n const luminances = source.getMatrix();\n let subWidth = width >> HybridBinarizer.BLOCK_SIZE_POWER;\n if ((width & HybridBinarizer.BLOCK_SIZE_MASK) !== 0) {\n subWidth++;\n }\n let subHeight = height >> HybridBinarizer.BLOCK_SIZE_POWER;\n if ((height & HybridBinarizer.BLOCK_SIZE_MASK) !== 0) {\n subHeight++;\n }\n const blackPoints = HybridBinarizer.calculateBlackPoints(luminances, subWidth, subHeight, width, height);\n const newMatrix = new BitMatrix(width, height);\n HybridBinarizer.calculateThresholdForBlock(luminances, subWidth, subHeight, width, height, blackPoints, newMatrix);\n this.matrix = newMatrix;\n }\n else {\n // If the image is too small, fall back to the global histogram approach.\n this.matrix = super.getBlackMatrix();\n }\n return this.matrix;\n }\n /*@Override*/\n createBinarizer(source) {\n return new HybridBinarizer(source);\n }\n /**\n * For each block in the image, calculate the average black point using a 5x5 grid\n * of the blocks around it. Also handles the corner cases (fractional blocks are computed based\n * on the last pixels in the row/column which are also used in the previous block).\n */\n static calculateThresholdForBlock(luminances, subWidth /*int*/, subHeight /*int*/, width /*int*/, height /*int*/, blackPoints, matrix) {\n const maxYOffset = height - HybridBinarizer.BLOCK_SIZE;\n const maxXOffset = width - HybridBinarizer.BLOCK_SIZE;\n for (let y = 0; y < subHeight; y++) {\n let yoffset = y << HybridBinarizer.BLOCK_SIZE_POWER;\n if (yoffset > maxYOffset) {\n yoffset = maxYOffset;\n }\n const top = HybridBinarizer.cap(y, 2, subHeight - 3);\n for (let x = 0; x < subWidth; x++) {\n let xoffset = x << HybridBinarizer.BLOCK_SIZE_POWER;\n if (xoffset > maxXOffset) {\n xoffset = maxXOffset;\n }\n const left = HybridBinarizer.cap(x, 2, subWidth - 3);\n let sum = 0;\n for (let z = -2; z <= 2; z++) {\n const blackRow = blackPoints[top + z];\n sum += blackRow[left - 2] + blackRow[left - 1] + blackRow[left] + blackRow[left + 1] + blackRow[left + 2];\n }\n const average = sum / 25;\n HybridBinarizer.thresholdBlock(luminances, xoffset, yoffset, average, width, matrix);\n }\n }\n }\n static cap(value /*int*/, min /*int*/, max /*int*/) {\n return value < min ? min : value > max ? max : value;\n }\n /**\n * Applies a single threshold to a block of pixels.\n */\n static thresholdBlock(luminances, xoffset /*int*/, yoffset /*int*/, threshold /*int*/, stride /*int*/, matrix) {\n for (let y = 0, offset = yoffset * stride + xoffset; y < HybridBinarizer.BLOCK_SIZE; y++, offset += stride) {\n for (let x = 0; x < HybridBinarizer.BLOCK_SIZE; x++) {\n // Comparison needs to be <= so that black == 0 pixels are black even if the threshold is 0.\n if ((luminances[offset + x] & 0xFF) <= threshold) {\n matrix.set(xoffset + x, yoffset + y);\n }\n }\n }\n }\n /**\n * Calculates a single black point for each block of pixels and saves it away.\n * See the following thread for a discussion of this algorithm:\n * http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0\n */\n static calculateBlackPoints(luminances, subWidth /*int*/, subHeight /*int*/, width /*int*/, height /*int*/) {\n const maxYOffset = height - HybridBinarizer.BLOCK_SIZE;\n const maxXOffset = width - HybridBinarizer.BLOCK_SIZE;\n // tslint:disable-next-line:whitespace\n const blackPoints = new Array(subHeight); // subWidth\n for (let y = 0; y < subHeight; y++) {\n blackPoints[y] = new Int32Array(subWidth);\n let yoffset = y << HybridBinarizer.BLOCK_SIZE_POWER;\n if (yoffset > maxYOffset) {\n yoffset = maxYOffset;\n }\n for (let x = 0; x < subWidth; x++) {\n let xoffset = x << HybridBinarizer.BLOCK_SIZE_POWER;\n if (xoffset > maxXOffset) {\n xoffset = maxXOffset;\n }\n let sum = 0;\n let min = 0xFF;\n let max = 0;\n for (let yy = 0, offset = yoffset * width + xoffset; yy < HybridBinarizer.BLOCK_SIZE; yy++, offset += width) {\n for (let xx = 0; xx < HybridBinarizer.BLOCK_SIZE; xx++) {\n const pixel = luminances[offset + xx] & 0xFF;\n sum += pixel;\n // still looking for good contrast\n if (pixel < min) {\n min = pixel;\n }\n if (pixel > max) {\n max = pixel;\n }\n }\n // short-circuit min/max tests once dynamic range is met\n if (max - min > HybridBinarizer.MIN_DYNAMIC_RANGE) {\n // finish the rest of the rows quickly\n for (yy++, offset += width; yy < HybridBinarizer.BLOCK_SIZE; yy++, offset += width) {\n for (let xx = 0; xx < HybridBinarizer.BLOCK_SIZE; xx++) {\n sum += luminances[offset + xx] & 0xFF;\n }\n }\n }\n }\n // The default estimate is the average of the values in the block.\n let average = sum >> (HybridBinarizer.BLOCK_SIZE_POWER * 2);\n if (max - min <= HybridBinarizer.MIN_DYNAMIC_RANGE) {\n // If variation within the block is low, assume this is a block with only light or only\n // dark pixels. In that case we do not want to use the average, as it would divide this\n // low contrast area into black and white pixels, essentially creating data out of noise.\n //\n // The default assumption is that the block is light/background. Since no estimate for\n // the level of dark pixels exists locally, use half the min for the block.\n average = min / 2;\n if (y > 0 && x > 0) {\n // Correct the \"white background\" assumption for blocks that have neighbors by comparing\n // the pixels in this block to the previously calculated black points. This is based on\n // the fact that dark barcode symbology is always surrounded by some amount of light\n // background for which reasonable black point estimates were made. The bp estimated at\n // the boundaries is used for the interior.\n // The (min < bp) is arbitrary but works better than other heuristics that were tried.\n const averageNeighborBlackPoint = (blackPoints[y - 1][x] + (2 * blackPoints[y][x - 1]) + blackPoints[y - 1][x - 1]) / 4;\n if (min < averageNeighborBlackPoint) {\n average = averageNeighborBlackPoint;\n }\n }\n }\n blackPoints[y][x] = average;\n }\n }\n return blackPoints;\n }\n }\n // This class uses 5x5 blocks to compute local luminance, where each block is 8x8 pixels.\n // So this is the smallest dimension in each axis we can accept.\n HybridBinarizer.BLOCK_SIZE_POWER = 3;\n HybridBinarizer.BLOCK_SIZE = 1 << HybridBinarizer.BLOCK_SIZE_POWER; // ...0100...00\n HybridBinarizer.BLOCK_SIZE_MASK = HybridBinarizer.BLOCK_SIZE - 1; // ...0011...11\n HybridBinarizer.MINIMUM_DIMENSION = HybridBinarizer.BLOCK_SIZE * 5;\n HybridBinarizer.MIN_DYNAMIC_RANGE = 24;\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing {*/\n /**\n * The purpose of this class hierarchy is to abstract different bitmap implementations across\n * platforms into a standard interface for requesting greyscale luminance values. The interface\n * only provides immutable methods; therefore crop and rotation create copies. This is to ensure\n * that one Reader does not modify the original luminance source and leave it in an unknown state\n * for other Readers in the chain.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class LuminanceSource {\n constructor(width /*int*/, height /*int*/) {\n this.width = width;\n this.height = height;\n }\n /**\n * @return The width of the bitmap.\n */\n getWidth() {\n return this.width;\n }\n /**\n * @return The height of the bitmap.\n */\n getHeight() {\n return this.height;\n }\n /**\n * @return Whether this subclass supports cropping.\n */\n isCropSupported() {\n return false;\n }\n /**\n * Returns a new object with cropped image data. Implementations may keep a reference to the\n * original data rather than a copy. Only callable if isCropSupported() is true.\n *\n * @param left The left coordinate, which must be in [0,getWidth())\n * @param top The top coordinate, which must be in [0,getHeight())\n * @param width The width of the rectangle to crop.\n * @param height The height of the rectangle to crop.\n * @return A cropped version of this object.\n */\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n throw new UnsupportedOperationException('This luminance source does not support cropping.');\n }\n /**\n * @return Whether this subclass supports counter-clockwise rotation.\n */\n isRotateSupported() {\n return false;\n }\n /**\n * Returns a new object with rotated image data by 90 degrees counterclockwise.\n * Only callable if {@link #isRotateSupported()} is true.\n *\n * @return A rotated version of this object.\n */\n rotateCounterClockwise() {\n throw new UnsupportedOperationException('This luminance source does not support rotation by 90 degrees.');\n }\n /**\n * Returns a new object with rotated image data by 45 degrees counterclockwise.\n * Only callable if {@link #isRotateSupported()} is true.\n *\n * @return A rotated version of this object.\n */\n rotateCounterClockwise45() {\n throw new UnsupportedOperationException('This luminance source does not support rotation by 45 degrees.');\n }\n /*@Override*/\n toString() {\n const row = new Uint8ClampedArray(this.width);\n let result = new StringBuilder();\n for (let y = 0; y < this.height; y++) {\n const sourceRow = this.getRow(y, row);\n for (let x = 0; x < this.width; x++) {\n const luminance = sourceRow[x] & 0xFF;\n let c;\n if (luminance < 0x40) {\n c = '#';\n }\n else if (luminance < 0x80) {\n c = '+';\n }\n else if (luminance < 0xC0) {\n c = '.';\n }\n else {\n c = ' ';\n }\n result.append(c);\n }\n result.append('\\n');\n }\n return result.toString();\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing {*/\n /**\n * A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes\n * white and vice versa, and each value becomes (255-value).\n *\n * @author Sean Owen\n */\n class InvertedLuminanceSource extends LuminanceSource {\n constructor(delegate) {\n super(delegate.getWidth(), delegate.getHeight());\n this.delegate = delegate;\n }\n /*@Override*/\n getRow(y /*int*/, row) {\n const sourceRow = this.delegate.getRow(y, row);\n const width = this.getWidth();\n for (let i = 0; i < width; i++) {\n sourceRow[i] = /*(byte)*/ (255 - (sourceRow[i] & 0xFF));\n }\n return sourceRow;\n }\n /*@Override*/\n getMatrix() {\n const matrix = this.delegate.getMatrix();\n const length = this.getWidth() * this.getHeight();\n const invertedMatrix = new Uint8ClampedArray(length);\n for (let i = 0; i < length; i++) {\n invertedMatrix[i] = /*(byte)*/ (255 - (matrix[i] & 0xFF));\n }\n return invertedMatrix;\n }\n /*@Override*/\n isCropSupported() {\n return this.delegate.isCropSupported();\n }\n /*@Override*/\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n return new InvertedLuminanceSource(this.delegate.crop(left, top, width, height));\n }\n /*@Override*/\n isRotateSupported() {\n return this.delegate.isRotateSupported();\n }\n /**\n * @return original delegate {@link LuminanceSource} since invert undoes itself\n */\n /*@Override*/\n invert() {\n return this.delegate;\n }\n /*@Override*/\n rotateCounterClockwise() {\n return new InvertedLuminanceSource(this.delegate.rotateCounterClockwise());\n }\n /*@Override*/\n rotateCounterClockwise45() {\n return new InvertedLuminanceSource(this.delegate.rotateCounterClockwise45());\n }\n }\n\n /**\n * @deprecated Moving to @zxing/browser\n */\n class HTMLCanvasElementLuminanceSource extends LuminanceSource {\n constructor(canvas) {\n super(canvas.width, canvas.height);\n this.canvas = canvas;\n this.tempCanvasElement = null;\n this.buffer = HTMLCanvasElementLuminanceSource.makeBufferFromCanvasImageData(canvas);\n }\n static makeBufferFromCanvasImageData(canvas) {\n const imageData = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);\n return HTMLCanvasElementLuminanceSource.toGrayscaleBuffer(imageData.data, canvas.width, canvas.height);\n }\n static toGrayscaleBuffer(imageBuffer, width, height) {\n const grayscaleBuffer = new Uint8ClampedArray(width * height);\n for (let i = 0, j = 0, length = imageBuffer.length; i < length; i += 4, j++) {\n let gray;\n const alpha = imageBuffer[i + 3];\n // The color of fully-transparent pixels is irrelevant. They are often, technically, fully-transparent\n // black (0 alpha, and then 0 RGB). They are often used, of course as the \"white\" area in a\n // barcode image. Force any such pixel to be white:\n if (alpha === 0) {\n gray = 0xFF;\n }\n else {\n const pixelR = imageBuffer[i];\n const pixelG = imageBuffer[i + 1];\n const pixelB = imageBuffer[i + 2];\n // .299R + 0.587G + 0.114B (YUV/YIQ for PAL and NTSC),\n // (306*R) >> 10 is approximately equal to R*0.299, and so on.\n // 0x200 >> 10 is 0.5, it implements rounding.\n gray = (306 * pixelR +\n 601 * pixelG +\n 117 * pixelB +\n 0x200) >> 10;\n }\n grayscaleBuffer[j] = gray;\n }\n return grayscaleBuffer;\n }\n getRow(y /*int*/, row) {\n if (y < 0 || y >= this.getHeight()) {\n throw new IllegalArgumentException('Requested row is outside the image: ' + y);\n }\n const width = this.getWidth();\n const start = y * width;\n if (row === null) {\n row = this.buffer.slice(start, start + width);\n }\n else {\n if (row.length < width) {\n row = new Uint8ClampedArray(width);\n }\n // The underlying raster of image consists of bytes with the luminance values\n // TODO: can avoid set/slice?\n row.set(this.buffer.slice(start, start + width));\n }\n return row;\n }\n getMatrix() {\n return this.buffer;\n }\n isCropSupported() {\n return true;\n }\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n super.crop(left, top, width, height);\n return this;\n }\n /**\n * This is always true, since the image is a gray-scale image.\n *\n * @return true\n */\n isRotateSupported() {\n return true;\n }\n rotateCounterClockwise() {\n this.rotate(-90);\n return this;\n }\n rotateCounterClockwise45() {\n this.rotate(-45);\n return this;\n }\n getTempCanvasElement() {\n if (null === this.tempCanvasElement) {\n const tempCanvasElement = this.canvas.ownerDocument.createElement('canvas');\n tempCanvasElement.width = this.canvas.width;\n tempCanvasElement.height = this.canvas.height;\n this.tempCanvasElement = tempCanvasElement;\n }\n return this.tempCanvasElement;\n }\n rotate(angle) {\n const tempCanvasElement = this.getTempCanvasElement();\n const tempContext = tempCanvasElement.getContext('2d');\n const angleRadians = angle * HTMLCanvasElementLuminanceSource.DEGREE_TO_RADIANS;\n // Calculate and set new dimensions for temp canvas\n const width = this.canvas.width;\n const height = this.canvas.height;\n const newWidth = Math.ceil(Math.abs(Math.cos(angleRadians)) * width + Math.abs(Math.sin(angleRadians)) * height);\n const newHeight = Math.ceil(Math.abs(Math.sin(angleRadians)) * width + Math.abs(Math.cos(angleRadians)) * height);\n tempCanvasElement.width = newWidth;\n tempCanvasElement.height = newHeight;\n // Draw at center of temp canvas to prevent clipping of image data\n tempContext.translate(newWidth / 2, newHeight / 2);\n tempContext.rotate(angleRadians);\n tempContext.drawImage(this.canvas, width / -2, height / -2);\n this.buffer = HTMLCanvasElementLuminanceSource.makeBufferFromCanvasImageData(tempCanvasElement);\n return this;\n }\n invert() {\n return new InvertedLuminanceSource(this);\n }\n }\n HTMLCanvasElementLuminanceSource.DEGREE_TO_RADIANS = Math.PI / 180;\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * Video input device metadata containing the id and label of the device if available.\n */\n class VideoInputDevice {\n /**\n * Creates an instance of VideoInputDevice.\n *\n * @param {string} deviceId the video input device id\n * @param {string} label the label of the device if available\n */\n constructor(deviceId, label, groupId) {\n this.deviceId = deviceId;\n this.label = label;\n /** @inheritdoc */\n this.kind = 'videoinput';\n this.groupId = groupId || undefined;\n }\n /** @inheritdoc */\n toJSON() {\n return {\n kind: this.kind,\n groupId: this.groupId,\n deviceId: this.deviceId,\n label: this.label,\n };\n }\n }\n\n var __awaiter = ((globalThis || global || self || window || undefined) && (globalThis || global || self || window || undefined).__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n /**\n * @deprecated Moving to @zxing/browser\n *\n * Base class for browser code reader.\n */\n class BrowserCodeReader {\n /**\n * Creates an instance of BrowserCodeReader.\n * @param {Reader} reader The reader instance to decode the barcode\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent successful decode tries\n *\n * @memberOf BrowserCodeReader\n */\n constructor(reader, timeBetweenScansMillis = 500, _hints) {\n this.reader = reader;\n this.timeBetweenScansMillis = timeBetweenScansMillis;\n this._hints = _hints;\n /**\n * This will break the loop.\n */\n this._stopContinuousDecode = false;\n /**\n * This will break the loop.\n */\n this._stopAsyncDecode = false;\n /**\n * Delay time between decode attempts made by the scanner.\n */\n this._timeBetweenDecodingAttempts = 0;\n }\n /**\n * If navigator is present.\n */\n get hasNavigator() {\n return typeof navigator !== 'undefined';\n }\n /**\n * If mediaDevices under navigator is supported.\n */\n get isMediaDevicesSuported() {\n return this.hasNavigator && !!navigator.mediaDevices;\n }\n /**\n * If enumerateDevices under navigator is supported.\n */\n get canEnumerateDevices() {\n return !!(this.isMediaDevicesSuported && navigator.mediaDevices.enumerateDevices);\n }\n /** Time between two decoding tries in milli seconds. */\n get timeBetweenDecodingAttempts() {\n return this._timeBetweenDecodingAttempts;\n }\n /**\n * Change the time span the decoder waits between two decoding tries.\n *\n * @param {number} millis Time between two decoding tries in milli seconds.\n */\n set timeBetweenDecodingAttempts(millis) {\n this._timeBetweenDecodingAttempts = millis < 0 ? 0 : millis;\n }\n /**\n * Sets the hints.\n */\n set hints(hints) {\n this._hints = hints || null;\n }\n /**\n * Sets the hints.\n */\n get hints() {\n return this._hints;\n }\n /**\n * Lists all the available video input devices.\n */\n listVideoInputDevices() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.hasNavigator) {\n throw new Error('Can\\'t enumerate devices, navigator is not present.');\n }\n if (!this.canEnumerateDevices) {\n throw new Error('Can\\'t enumerate devices, method not supported.');\n }\n const devices = yield navigator.mediaDevices.enumerateDevices();\n const videoDevices = [];\n for (const device of devices) {\n const kind = device.kind === 'video' ? 'videoinput' : device.kind;\n if (kind !== 'videoinput') {\n continue;\n }\n const deviceId = device.deviceId || device.id;\n const label = device.label || `Video device ${videoDevices.length + 1}`;\n const groupId = device.groupId;\n const videoDevice = { deviceId, label, kind, groupId };\n videoDevices.push(videoDevice);\n }\n return videoDevices;\n });\n }\n /**\n * Obtain the list of available devices with type 'videoinput'.\n *\n * @returns {Promise} an array of available video input devices\n *\n * @memberOf BrowserCodeReader\n *\n * @deprecated Use `listVideoInputDevices` instead.\n */\n getVideoInputDevices() {\n return __awaiter(this, void 0, void 0, function* () {\n const devices = yield this.listVideoInputDevices();\n return devices.map(d => new VideoInputDevice(d.deviceId, d.label));\n });\n }\n /**\n * Let's you find a device using it's Id.\n */\n findDeviceById(deviceId) {\n return __awaiter(this, void 0, void 0, function* () {\n const devices = yield this.listVideoInputDevices();\n if (!devices) {\n return null;\n }\n return devices.find(x => x.deviceId === deviceId);\n });\n }\n /**\n * Decodes the barcode from the device specified by deviceId while showing the video in the specified video element.\n *\n * @param deviceId the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.\n * @param video the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns The decoding result.\n *\n * @memberOf BrowserCodeReader\n *\n * @deprecated Use `decodeOnceFromVideoDevice` instead.\n */\n decodeFromInputVideoDevice(deviceId, videoSource) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.decodeOnceFromVideoDevice(deviceId, videoSource);\n });\n }\n /**\n * In one attempt, tries to decode the barcode from the device specified by deviceId while showing the video in the specified video element.\n *\n * @param deviceId the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.\n * @param video the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeOnceFromVideoDevice(deviceId, videoSource) {\n return __awaiter(this, void 0, void 0, function* () {\n this.reset();\n let videoConstraints;\n if (!deviceId) {\n videoConstraints = { facingMode: 'environment' };\n }\n else {\n videoConstraints = { deviceId: { exact: deviceId } };\n }\n const constraints = { video: videoConstraints };\n return yield this.decodeOnceFromConstraints(constraints, videoSource);\n });\n }\n /**\n * In one attempt, tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.\n *\n * @param constraints the media stream constraints to get s valid media stream to decode from\n * @param video the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeOnceFromConstraints(constraints, videoSource) {\n return __awaiter(this, void 0, void 0, function* () {\n const stream = yield navigator.mediaDevices.getUserMedia(constraints);\n return yield this.decodeOnceFromStream(stream, videoSource);\n });\n }\n /**\n * In one attempt, tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.\n *\n * @param {MediaStream} [constraints] the media stream constraints to get s valid media stream to decode from\n * @param {string|HTMLVideoElement} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns {Promise} The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeOnceFromStream(stream, videoSource) {\n return __awaiter(this, void 0, void 0, function* () {\n this.reset();\n const video = yield this.attachStreamToVideo(stream, videoSource);\n const result = yield this.decodeOnce(video);\n return result;\n });\n }\n /**\n * Continuously decodes the barcode from the device specified by device while showing the video in the specified video element.\n *\n * @param {string|null} [deviceId] the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.\n * @param {string|HTMLVideoElement|null} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns {Promise}\n *\n * @memberOf BrowserCodeReader\n *\n * @deprecated Use `decodeFromVideoDevice` instead.\n */\n decodeFromInputVideoDeviceContinuously(deviceId, videoSource, callbackFn) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.decodeFromVideoDevice(deviceId, videoSource, callbackFn);\n });\n }\n /**\n * Continuously tries to decode the barcode from the device specified by device while showing the video in the specified video element.\n *\n * @param {string|null} [deviceId] the id of one of the devices obtained after calling getVideoInputDevices. Can be undefined, in this case it will decode from one of the available devices, preffering the main camera (environment facing) if available.\n * @param {string|HTMLVideoElement|null} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns {Promise}\n *\n * @memberOf BrowserCodeReader\n */\n decodeFromVideoDevice(deviceId, videoSource, callbackFn) {\n return __awaiter(this, void 0, void 0, function* () {\n let videoConstraints;\n if (!deviceId) {\n videoConstraints = { facingMode: 'environment' };\n }\n else {\n videoConstraints = { deviceId: { exact: deviceId } };\n }\n const constraints = { video: videoConstraints };\n return yield this.decodeFromConstraints(constraints, videoSource, callbackFn);\n });\n }\n /**\n * Continuously tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.\n *\n * @param {MediaStream} [constraints] the media stream constraints to get s valid media stream to decode from\n * @param {string|HTMLVideoElement} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns {Promise} The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeFromConstraints(constraints, videoSource, callbackFn) {\n return __awaiter(this, void 0, void 0, function* () {\n const stream = yield navigator.mediaDevices.getUserMedia(constraints);\n return yield this.decodeFromStream(stream, videoSource, callbackFn);\n });\n }\n /**\n * In one attempt, tries to decode the barcode from a stream obtained from the given constraints while showing the video in the specified video element.\n *\n * @param {MediaStream} [constraints] the media stream constraints to get s valid media stream to decode from\n * @param {string|HTMLVideoElement} [video] the video element in page where to show the video while decoding. Can be either an element id or directly an HTMLVideoElement. Can be undefined, in which case no video will be shown.\n * @returns {Promise} The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeFromStream(stream, videoSource, callbackFn) {\n return __awaiter(this, void 0, void 0, function* () {\n this.reset();\n const video = yield this.attachStreamToVideo(stream, videoSource);\n return yield this.decodeContinuously(video, callbackFn);\n });\n }\n /**\n * Breaks the decoding loop.\n */\n stopAsyncDecode() {\n this._stopAsyncDecode = true;\n }\n /**\n * Breaks the decoding loop.\n */\n stopContinuousDecode() {\n this._stopContinuousDecode = true;\n }\n /**\n * Sets the new stream and request a new decoding-with-delay.\n *\n * @param stream The stream to be shown in the video element.\n * @param decodeFn A callback for the decode method.\n */\n attachStreamToVideo(stream, videoSource) {\n return __awaiter(this, void 0, void 0, function* () {\n const videoElement = this.prepareVideoElement(videoSource);\n this.addVideoSource(videoElement, stream);\n this.videoElement = videoElement;\n this.stream = stream;\n yield this.playVideoOnLoadAsync(videoElement);\n return videoElement;\n });\n }\n /**\n *\n * @param videoElement\n */\n playVideoOnLoadAsync(videoElement) {\n return new Promise((resolve, reject) => this.playVideoOnLoad(videoElement, () => resolve()));\n }\n /**\n * Binds listeners and callbacks to the videoElement.\n *\n * @param element\n * @param callbackFn\n */\n playVideoOnLoad(element, callbackFn) {\n this.videoEndedListener = () => this.stopStreams();\n this.videoCanPlayListener = () => this.tryPlayVideo(element);\n element.addEventListener('ended', this.videoEndedListener);\n element.addEventListener('canplay', this.videoCanPlayListener);\n element.addEventListener('playing', callbackFn);\n // if canplay was already fired, we won't know when to play, so just give it a try\n this.tryPlayVideo(element);\n }\n /**\n * Checks if the given video element is currently playing.\n */\n isVideoPlaying(video) {\n return video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2;\n }\n /**\n * Just tries to play the video and logs any errors.\n * The play call is only made is the video is not already playing.\n */\n tryPlayVideo(videoElement) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isVideoPlaying(videoElement)) {\n console.warn('Trying to play video that is already playing.');\n return;\n }\n try {\n yield videoElement.play();\n }\n catch (_a) {\n console.warn('It was not possible to play the video.');\n }\n });\n }\n /**\n * Searches and validates a media element.\n */\n getMediaElement(mediaElementId, type) {\n const mediaElement = document.getElementById(mediaElementId);\n if (!mediaElement) {\n throw new ArgumentException(`element with id '${mediaElementId}' not found`);\n }\n if (mediaElement.nodeName.toLowerCase() !== type.toLowerCase()) {\n throw new ArgumentException(`element with id '${mediaElementId}' must be an ${type} element`);\n }\n return mediaElement;\n }\n /**\n * Decodes the barcode from an image.\n *\n * @param {(string|HTMLImageElement)} [source] The image element that can be either an element id or the element itself. Can be undefined in which case the decoding will be done from the imageUrl parameter.\n * @param {string} [url]\n * @returns {Promise} The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeFromImage(source, url) {\n if (!source && !url) {\n throw new ArgumentException('either imageElement with a src set or an url must be provided');\n }\n if (url && !source) {\n return this.decodeFromImageUrl(url);\n }\n return this.decodeFromImageElement(source);\n }\n /**\n * Decodes the barcode from a video.\n *\n * @param {(string|HTMLImageElement)} [source] The image element that can be either an element id or the element itself. Can be undefined in which case the decoding will be done from the imageUrl parameter.\n * @param {string} [url]\n * @returns {Promise} The decoding result.\n *\n * @memberOf BrowserCodeReader\n */\n decodeFromVideo(source, url) {\n if (!source && !url) {\n throw new ArgumentException('Either an element with a src set or an URL must be provided');\n }\n if (url && !source) {\n return this.decodeFromVideoUrl(url);\n }\n return this.decodeFromVideoElement(source);\n }\n /**\n * Decodes continuously the barcode from a video.\n *\n * @param {(string|HTMLImageElement)} [source] The image element that can be either an element id or the element itself. Can be undefined in which case the decoding will be done from the imageUrl parameter.\n * @param {string} [url]\n * @returns {Promise} The decoding result.\n *\n * @memberOf BrowserCodeReader\n *\n * @experimental\n */\n decodeFromVideoContinuously(source, url, callbackFn) {\n if (undefined === source && undefined === url) {\n throw new ArgumentException('Either an element with a src set or an URL must be provided');\n }\n if (url && !source) {\n return this.decodeFromVideoUrlContinuously(url, callbackFn);\n }\n return this.decodeFromVideoElementContinuously(source, callbackFn);\n }\n /**\n * Decodes something from an image HTML element.\n */\n decodeFromImageElement(source) {\n if (!source) {\n throw new ArgumentException('An image element must be provided.');\n }\n this.reset();\n const element = this.prepareImageElement(source);\n this.imageElement = element;\n let task;\n if (this.isImageLoaded(element)) {\n task = this.decodeOnce(element, false, true);\n }\n else {\n task = this._decodeOnLoadImage(element);\n }\n return task;\n }\n /**\n * Decodes something from an image HTML element.\n */\n decodeFromVideoElement(source) {\n const element = this._decodeFromVideoElementSetup(source);\n return this._decodeOnLoadVideo(element);\n }\n /**\n * Decodes something from an image HTML element.\n */\n decodeFromVideoElementContinuously(source, callbackFn) {\n const element = this._decodeFromVideoElementSetup(source);\n return this._decodeOnLoadVideoContinuously(element, callbackFn);\n }\n /**\n * Sets up the video source so it can be decoded when loaded.\n *\n * @param source The video source element.\n */\n _decodeFromVideoElementSetup(source) {\n if (!source) {\n throw new ArgumentException('A video element must be provided.');\n }\n this.reset();\n const element = this.prepareVideoElement(source);\n // defines the video element before starts decoding\n this.videoElement = element;\n return element;\n }\n /**\n * Decodes an image from a URL.\n */\n decodeFromImageUrl(url) {\n if (!url) {\n throw new ArgumentException('An URL must be provided.');\n }\n this.reset();\n const element = this.prepareImageElement();\n this.imageElement = element;\n const decodeTask = this._decodeOnLoadImage(element);\n element.src = url;\n return decodeTask;\n }\n /**\n * Decodes an image from a URL.\n */\n decodeFromVideoUrl(url) {\n if (!url) {\n throw new ArgumentException('An URL must be provided.');\n }\n this.reset();\n // creates a new element\n const element = this.prepareVideoElement();\n const decodeTask = this.decodeFromVideoElement(element);\n element.src = url;\n return decodeTask;\n }\n /**\n * Decodes an image from a URL.\n *\n * @experimental\n */\n decodeFromVideoUrlContinuously(url, callbackFn) {\n if (!url) {\n throw new ArgumentException('An URL must be provided.');\n }\n this.reset();\n // creates a new element\n const element = this.prepareVideoElement();\n const decodeTask = this.decodeFromVideoElementContinuously(element, callbackFn);\n element.src = url;\n return decodeTask;\n }\n _decodeOnLoadImage(element) {\n return new Promise((resolve, reject) => {\n this.imageLoadedListener = () => this.decodeOnce(element, false, true).then(resolve, reject);\n element.addEventListener('load', this.imageLoadedListener);\n });\n }\n _decodeOnLoadVideo(videoElement) {\n return __awaiter(this, void 0, void 0, function* () {\n // plays the video\n yield this.playVideoOnLoadAsync(videoElement);\n // starts decoding after played the video\n return yield this.decodeOnce(videoElement);\n });\n }\n _decodeOnLoadVideoContinuously(videoElement, callbackFn) {\n return __awaiter(this, void 0, void 0, function* () {\n // plays the video\n yield this.playVideoOnLoadAsync(videoElement);\n // starts decoding after played the video\n this.decodeContinuously(videoElement, callbackFn);\n });\n }\n isImageLoaded(img) {\n // During the onload event, IE correctly identifies any images that\n // weren’t downloaded as not complete. Others should too. Gecko-based\n // browsers act like NS4 in that they report this incorrectly.\n if (!img.complete) {\n return false;\n }\n // However, they do have two very useful properties: naturalWidth and\n // naturalHeight. These give the true size of the image. If it failed\n // to load, either of these should be zero.\n if (img.naturalWidth === 0) {\n return false;\n }\n // No other way of checking: assume it’s ok.\n return true;\n }\n prepareImageElement(imageSource) {\n let imageElement;\n if (typeof imageSource === 'undefined') {\n imageElement = document.createElement('img');\n imageElement.width = 200;\n imageElement.height = 200;\n }\n if (typeof imageSource === 'string') {\n imageElement = this.getMediaElement(imageSource, 'img');\n }\n if (imageSource instanceof HTMLImageElement) {\n imageElement = imageSource;\n }\n return imageElement;\n }\n /**\n * Sets a HTMLVideoElement for scanning or creates a new one.\n *\n * @param videoSource The HTMLVideoElement to be set.\n */\n prepareVideoElement(videoSource) {\n let videoElement;\n if (!videoSource && typeof document !== 'undefined') {\n videoElement = document.createElement('video');\n videoElement.width = 200;\n videoElement.height = 200;\n }\n if (typeof videoSource === 'string') {\n videoElement = this.getMediaElement(videoSource, 'video');\n }\n if (videoSource instanceof HTMLVideoElement) {\n videoElement = videoSource;\n }\n // Needed for iOS 11\n videoElement.setAttribute('autoplay', 'true');\n videoElement.setAttribute('muted', 'true');\n videoElement.setAttribute('playsinline', 'true');\n return videoElement;\n }\n /**\n * Tries to decode from the video input until it finds some value.\n */\n decodeOnce(element, retryIfNotFound = true, retryIfChecksumOrFormatError = true) {\n this._stopAsyncDecode = false;\n const loop = (resolve, reject) => {\n if (this._stopAsyncDecode) {\n reject(new NotFoundException('Video stream has ended before any code could be detected.'));\n this._stopAsyncDecode = undefined;\n return;\n }\n try {\n const result = this.decode(element);\n resolve(result);\n }\n catch (e) {\n const ifNotFound = retryIfNotFound && e instanceof NotFoundException;\n const isChecksumOrFormatError = e instanceof ChecksumException || e instanceof FormatException;\n const ifChecksumOrFormat = isChecksumOrFormatError && retryIfChecksumOrFormatError;\n if (ifNotFound || ifChecksumOrFormat) {\n // trying again\n return setTimeout(loop, this._timeBetweenDecodingAttempts, resolve, reject);\n }\n reject(e);\n }\n };\n return new Promise((resolve, reject) => loop(resolve, reject));\n }\n /**\n * Continuously decodes from video input.\n */\n decodeContinuously(element, callbackFn) {\n this._stopContinuousDecode = false;\n const loop = () => {\n if (this._stopContinuousDecode) {\n this._stopContinuousDecode = undefined;\n return;\n }\n try {\n const result = this.decode(element);\n callbackFn(result, null);\n setTimeout(loop, this.timeBetweenScansMillis);\n }\n catch (e) {\n callbackFn(null, e);\n const isChecksumOrFormatError = e instanceof ChecksumException || e instanceof FormatException;\n const isNotFound = e instanceof NotFoundException;\n if (isChecksumOrFormatError || isNotFound) {\n // trying again\n setTimeout(loop, this._timeBetweenDecodingAttempts);\n }\n }\n };\n loop();\n }\n /**\n * Gets the BinaryBitmap for ya! (and decodes it)\n */\n decode(element) {\n // get binary bitmap for decode function\n const binaryBitmap = this.createBinaryBitmap(element);\n return this.decodeBitmap(binaryBitmap);\n }\n /**\n * Returns true if media element is indeed a {@link HtmlVideoElement}.\n */\n _isHTMLVideoElement(mediaElement) {\n const potentialVideo = mediaElement;\n return potentialVideo.videoWidth !== 0;\n }\n /**\n * Overwriting this allows you to manipulate the next frame in anyway\n * you want before decode.\n */\n drawFrameOnCanvas(\n srcElement, dimensions, canvasElementContext) {\n if (!dimensions) {\n dimensions = {\n sx: 0,\n sy: 0,\n sWidth: srcElement.videoWidth,\n sHeight: srcElement.videoHeight,\n dx: 0,\n dy: 0,\n dWidth: srcElement.videoWidth,\n dHeight: srcElement.videoHeight};\n }\n if (!canvasElementContext) {\n canvasElementContext = this.captureCanvasContext;\n }\n canvasElementContext.drawImage(\n srcElement,\n dimensions.sx,\n dimensions.sy,\n dimensions.sWidth,\n dimensions.sHeight,\n dimensions.dx,\n dimensions.dy,\n dimensions.dWidth,\n dimensions.dHeight);\n }\n /**\n * Ovewriting this allows you to manipulate the snapshot image in anyway\n * you want before decode.\n */\n drawImageOnCanvas(\n srcElement,\n dimensions,\n canvasElementContext = this.captureCanvasContext) {\n if (!dimensions) {\n dimensions = {\n sx: 0,\n sy: 0,\n sWidth: srcElement.naturalWidth,\n sHeight: srcElement.naturalHeight,\n dx: 0,\n dy: 0,\n dWidth: srcElement.naturalWidth,\n dHeight: srcElement.naturalHeight\n };\n }\n if (!canvasElementContext) {\n canvasElementContext = this.captureCanvasContext;\n }\n canvasElementContext.drawImage(\n srcElement,\n dimensions.sx,\n dimensions.sy,\n dimensions.sWidth,\n dimensions.sHeight,\n dimensions.dx,\n dimensions.dy,\n dimensions.dWidth,\n dimensions.dHeight);\n }\n /**\n * Creates a binaryBitmap based in some image source.\n *\n * @param mediaElement HTML element containing drawable image source.\n */\n createBinaryBitmap(mediaElement) {\n const ctx = this.getCaptureCanvasContext(mediaElement);\n if (this._isHTMLVideoElement(mediaElement)) {\n this.drawFrameOnCanvas(mediaElement);\n } else {\n this.drawImageOnCanvas(mediaElement);\n }\n const canvas = this.getCaptureCanvas(mediaElement);\n const luminanceSource = new HTMLCanvasElementLuminanceSource(canvas);\n const hybridBinarizer = new HybridBinarizer(luminanceSource);\n\n return new BinaryBitmap(hybridBinarizer);\n }\n\n getCaptureCanvasContext(mediaElement) {\n if (!this.captureCanvasContext) {\n const elem = this.getCaptureCanvas(mediaElement);\n const ctx = elem.getContext('2d');\n this.captureCanvasContext = ctx;\n }\n return this.captureCanvasContext;\n }\n getCaptureCanvas(mediaElement) {\n if (!this.captureCanvas) {\n const elem = this.createCaptureCanvas(mediaElement);\n this.captureCanvas = elem;\n }\n return this.captureCanvas;\n }\n /**\n * Call the encapsulated readers decode\n */\n decodeBitmap(binaryBitmap) {\n return this.reader.decode(binaryBitmap, this._hints);\n }\n /**\n * 🖌 Prepares the canvas for capture and scan frames.\n */\n createCaptureCanvas(mediaElement) {\n if (typeof document === 'undefined') {\n this._destroyCaptureCanvas();\n return null;\n }\n const canvasElement = document.createElement('canvas');\n let width;\n let height;\n if (typeof mediaElement !== 'undefined') {\n if (mediaElement instanceof HTMLVideoElement) {\n width = mediaElement.videoWidth;\n height = mediaElement.videoHeight;\n }\n else if (mediaElement instanceof HTMLImageElement) {\n width = mediaElement.naturalWidth || mediaElement.width;\n height = mediaElement.naturalHeight || mediaElement.height;\n }\n }\n canvasElement.style.width = width + 'px';\n canvasElement.style.height = height + 'px';\n canvasElement.width = width;\n canvasElement.height = height;\n return canvasElement;\n }\n /**\n * Stops the continuous scan and cleans the stream.\n */\n stopStreams() {\n if (this.stream) {\n this.stream.getVideoTracks().forEach(t => t.stop());\n this.stream = undefined;\n }\n if (this._stopAsyncDecode === false) {\n this.stopAsyncDecode();\n }\n if (this._stopContinuousDecode === false) {\n this.stopContinuousDecode();\n }\n }\n /**\n * Resets the code reader to the initial state. Cancels any ongoing barcode scanning from video or camera.\n *\n * @memberOf BrowserCodeReader\n */\n reset() {\n // stops the camera, preview and scan 🔴\n this.stopStreams();\n // clean and forget about HTML elements\n this._destroyVideoElement();\n this._destroyImageElement();\n this._destroyCaptureCanvas();\n }\n _destroyVideoElement() {\n if (!this.videoElement) {\n return;\n }\n // first gives freedon to the element 🕊\n if (typeof this.videoEndedListener !== 'undefined') {\n this.videoElement.removeEventListener('ended', this.videoEndedListener);\n }\n if (typeof this.videoPlayingEventListener !== 'undefined') {\n this.videoElement.removeEventListener('playing', this.videoPlayingEventListener);\n }\n if (typeof this.videoCanPlayListener !== 'undefined') {\n this.videoElement.removeEventListener('loadedmetadata', this.videoCanPlayListener);\n }\n // then forgets about that element 😢\n this.cleanVideoSource(this.videoElement);\n this.videoElement = undefined;\n }\n _destroyImageElement() {\n if (!this.imageElement) {\n return;\n }\n // first gives freedon to the element 🕊\n if (undefined !== this.imageLoadedListener) {\n this.imageElement.removeEventListener('load', this.imageLoadedListener);\n }\n // then forget about that element 😢\n this.imageElement.src = undefined;\n this.imageElement.removeAttribute('src');\n this.imageElement = undefined;\n }\n /**\n * Cleans canvas references 🖌\n */\n _destroyCaptureCanvas() {\n // then forget about that element 😢\n this.captureCanvasContext = undefined;\n this.captureCanvas = undefined;\n }\n /**\n * Defines what the videoElement src will be.\n *\n * @param videoElement\n * @param stream\n */\n addVideoSource(videoElement, stream) {\n // Older browsers may not have `srcObject`\n try {\n // @note Throws Exception if interrupted by a new loaded request\n videoElement.srcObject = stream;\n }\n catch (err) {\n // @note Avoid using this in new browsers, as it is going away.\n videoElement.src = URL.createObjectURL(stream);\n }\n }\n /**\n * Unbinds a HTML video src property.\n *\n * @param videoElement\n */\n cleanVideoSource(videoElement) {\n try {\n videoElement.srcObject = null;\n }\n catch (err) {\n videoElement.src = '';\n }\n this.videoElement.removeAttribute('src');\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates the result of decoding a barcode within an image.

\n *\n * @author Sean Owen\n */\n class Result {\n // public constructor(private text: string,\n // Uint8Array rawBytes,\n // ResultPoconst resultPoints: Int32Array,\n // BarcodeFormat format) {\n // this(text, rawBytes, resultPoints, format, System.currentTimeMillis())\n // }\n // public constructor(text: string,\n // Uint8Array rawBytes,\n // ResultPoconst resultPoints: Int32Array,\n // BarcodeFormat format,\n // long timestamp) {\n // this(text, rawBytes, rawBytes == null ? 0 : 8 * rawBytes.length,\n // resultPoints, format, timestamp)\n // }\n constructor(text, rawBytes, numBits = rawBytes == null ? 0 : 8 * rawBytes.length, resultPoints, format, timestamp = System.currentTimeMillis()) {\n this.text = text;\n this.rawBytes = rawBytes;\n this.numBits = numBits;\n this.resultPoints = resultPoints;\n this.format = format;\n this.timestamp = timestamp;\n this.text = text;\n this.rawBytes = rawBytes;\n if (undefined === numBits || null === numBits) {\n this.numBits = (rawBytes === null || rawBytes === undefined) ? 0 : 8 * rawBytes.length;\n }\n else {\n this.numBits = numBits;\n }\n this.resultPoints = resultPoints;\n this.format = format;\n this.resultMetadata = null;\n if (undefined === timestamp || null === timestamp) {\n this.timestamp = System.currentTimeMillis();\n }\n else {\n this.timestamp = timestamp;\n }\n }\n /**\n * @return raw text encoded by the barcode\n */\n getText() {\n return this.text;\n }\n /**\n * @return raw bytes encoded by the barcode, if applicable, otherwise {@code null}\n */\n getRawBytes() {\n return this.rawBytes;\n }\n /**\n * @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length\n * @since 3.3.0\n */\n getNumBits() {\n return this.numBits;\n }\n /**\n * @return points related to the barcode in the image. These are typically points\n * identifying finder patterns or the corners of the barcode. The exact meaning is\n * specific to the type of barcode that was decoded.\n */\n getResultPoints() {\n return this.resultPoints;\n }\n /**\n * @return {@link BarcodeFormat} representing the format of the barcode that was decoded\n */\n getBarcodeFormat() {\n return this.format;\n }\n /**\n * @return {@link Map} mapping {@link ResultMetadataType} keys to values. May be\n * {@code null}. This contains optional metadata about what was detected about the barcode,\n * like orientation.\n */\n getResultMetadata() {\n return this.resultMetadata;\n }\n putMetadata(type, value) {\n if (this.resultMetadata === null) {\n this.resultMetadata = new Map();\n }\n this.resultMetadata.set(type, value);\n }\n putAllMetadata(metadata) {\n if (metadata !== null) {\n if (this.resultMetadata === null) {\n this.resultMetadata = metadata;\n }\n else {\n this.resultMetadata = new Map(metadata);\n }\n }\n }\n addResultPoints(newPoints) {\n const oldPoints = this.resultPoints;\n if (oldPoints === null) {\n this.resultPoints = newPoints;\n }\n else if (newPoints !== null && newPoints.length > 0) {\n const allPoints = new Array(oldPoints.length + newPoints.length);\n System.arraycopy(oldPoints, 0, allPoints, 0, oldPoints.length);\n System.arraycopy(newPoints, 0, allPoints, oldPoints.length, newPoints.length);\n this.resultPoints = allPoints;\n }\n }\n getTimestamp() {\n return this.timestamp;\n }\n /*@Override*/\n toString() {\n return this.text;\n }\n }\n\n /*\n * Direct port to TypeScript of ZXing by Adrian Toșcă\n */\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing {*/\n /**\n * Enumerates barcode formats known to this package. Please keep alphabetized.\n *\n * @author Sean Owen\n */\n var BarcodeFormat;\n (function (BarcodeFormat) {\n /** Aztec 2D barcode format. */\n BarcodeFormat[BarcodeFormat[\"AZTEC\"] = 0] = \"AZTEC\";\n /** CODABAR 1D format. */\n BarcodeFormat[BarcodeFormat[\"CODABAR\"] = 1] = \"CODABAR\";\n /** Code 39 1D format. */\n BarcodeFormat[BarcodeFormat[\"CODE_39\"] = 2] = \"CODE_39\";\n /** Code 93 1D format. */\n BarcodeFormat[BarcodeFormat[\"CODE_93\"] = 3] = \"CODE_93\";\n /** Code 128 1D format. */\n BarcodeFormat[BarcodeFormat[\"CODE_128\"] = 4] = \"CODE_128\";\n /** Data Matrix 2D barcode format. */\n BarcodeFormat[BarcodeFormat[\"DATA_MATRIX\"] = 5] = \"DATA_MATRIX\";\n /** EAN-8 1D format. */\n BarcodeFormat[BarcodeFormat[\"EAN_8\"] = 6] = \"EAN_8\";\n /** EAN-13 1D format. */\n BarcodeFormat[BarcodeFormat[\"EAN_13\"] = 7] = \"EAN_13\";\n /** ITF (Interleaved Two of Five) 1D format. */\n BarcodeFormat[BarcodeFormat[\"ITF\"] = 8] = \"ITF\";\n /** MaxiCode 2D barcode format. */\n BarcodeFormat[BarcodeFormat[\"MAXICODE\"] = 9] = \"MAXICODE\";\n /** PDF417 format. */\n BarcodeFormat[BarcodeFormat[\"PDF_417\"] = 10] = \"PDF_417\";\n /** QR Code 2D barcode format. */\n BarcodeFormat[BarcodeFormat[\"QR_CODE\"] = 11] = \"QR_CODE\";\n /** RSS 14 */\n BarcodeFormat[BarcodeFormat[\"RSS_14\"] = 12] = \"RSS_14\";\n /** RSS EXPANDED */\n BarcodeFormat[BarcodeFormat[\"RSS_EXPANDED\"] = 13] = \"RSS_EXPANDED\";\n /** UPC-A 1D format. */\n BarcodeFormat[BarcodeFormat[\"UPC_A\"] = 14] = \"UPC_A\";\n /** UPC-E 1D format. */\n BarcodeFormat[BarcodeFormat[\"UPC_E\"] = 15] = \"UPC_E\";\n /** UPC/EAN extension format. Not a stand-alone format. */\n BarcodeFormat[BarcodeFormat[\"UPC_EAN_EXTENSION\"] = 16] = \"UPC_EAN_EXTENSION\";\n })(BarcodeFormat || (BarcodeFormat = {}));\n var BarcodeFormat$1 = BarcodeFormat;\n\n /*namespace com.google.zxing {*/\n /**\n * Represents some type of metadata about the result of the decoding that the decoder\n * wishes to communicate back to the caller.\n *\n * @author Sean Owen\n */\n var ResultMetadataType;\n (function (ResultMetadataType) {\n /**\n * Unspecified, application-specific metadata. Maps to an unspecified {@link Object}.\n */\n ResultMetadataType[ResultMetadataType[\"OTHER\"] = 0] = \"OTHER\";\n /**\n * Denotes the likely approximate orientation of the barcode in the image. This value\n * is given as degrees rotated clockwise from the normal, upright orientation.\n * For example a 1D barcode which was found by reading top-to-bottom would be\n * said to have orientation \"90\". This key maps to an {@link Integer} whose\n * value is in the range [0,360).\n */\n ResultMetadataType[ResultMetadataType[\"ORIENTATION\"] = 1] = \"ORIENTATION\";\n /**\n *

2D barcode formats typically encode text, but allow for a sort of 'byte mode'\n * which is sometimes used to encode binary data. While {@link Result} makes available\n * the complete raw bytes in the barcode for these formats, it does not offer the bytes\n * from the byte segments alone.

\n *\n *

This maps to a {@link java.util.List} of byte arrays corresponding to the\n * raw bytes in the byte segments in the barcode, in order.

\n */\n ResultMetadataType[ResultMetadataType[\"BYTE_SEGMENTS\"] = 2] = \"BYTE_SEGMENTS\";\n /**\n * Error correction level used, if applicable. The value type depends on the\n * format, but is typically a String.\n */\n ResultMetadataType[ResultMetadataType[\"ERROR_CORRECTION_LEVEL\"] = 3] = \"ERROR_CORRECTION_LEVEL\";\n /**\n * For some periodicals, indicates the issue number as an {@link Integer}.\n */\n ResultMetadataType[ResultMetadataType[\"ISSUE_NUMBER\"] = 4] = \"ISSUE_NUMBER\";\n /**\n * For some products, indicates the suggested retail price in the barcode as a\n * formatted {@link String}.\n */\n ResultMetadataType[ResultMetadataType[\"SUGGESTED_PRICE\"] = 5] = \"SUGGESTED_PRICE\";\n /**\n * For some products, the possible country of manufacture as a {@link String} denoting the\n * ISO country code. Some map to multiple possible countries, like \"US/CA\".\n */\n ResultMetadataType[ResultMetadataType[\"POSSIBLE_COUNTRY\"] = 6] = \"POSSIBLE_COUNTRY\";\n /**\n * For some products, the extension text\n */\n ResultMetadataType[ResultMetadataType[\"UPC_EAN_EXTENSION\"] = 7] = \"UPC_EAN_EXTENSION\";\n /**\n * PDF417-specific metadata\n */\n ResultMetadataType[ResultMetadataType[\"PDF417_EXTRA_METADATA\"] = 8] = \"PDF417_EXTRA_METADATA\";\n /**\n * If the code format supports structured append and the current scanned code is part of one then the\n * sequence number is given with it.\n */\n ResultMetadataType[ResultMetadataType[\"STRUCTURED_APPEND_SEQUENCE\"] = 9] = \"STRUCTURED_APPEND_SEQUENCE\";\n /**\n * If the code format supports structured append and the current scanned code is part of one then the\n * parity is given with it.\n */\n ResultMetadataType[ResultMetadataType[\"STRUCTURED_APPEND_PARITY\"] = 10] = \"STRUCTURED_APPEND_PARITY\";\n })(ResultMetadataType || (ResultMetadataType = {}));\n var ResultMetadataType$1 = ResultMetadataType;\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing.common {*/\n /*import java.util.List;*/\n /**\n *

Encapsulates the result of decoding a matrix of bits. This typically\n * applies to 2D barcode formats. For now it contains the raw bytes obtained,\n * as well as a String interpretation of those bytes, if applicable.

\n *\n * @author Sean Owen\n */\n class DecoderResult {\n // public constructor(rawBytes: Uint8Array,\n // text: string,\n // List byteSegments,\n // String ecLevel) {\n // this(rawBytes, text, byteSegments, ecLevel, -1, -1)\n // }\n constructor(rawBytes, text, byteSegments, ecLevel, structuredAppendSequenceNumber = -1, structuredAppendParity = -1) {\n this.rawBytes = rawBytes;\n this.text = text;\n this.byteSegments = byteSegments;\n this.ecLevel = ecLevel;\n this.structuredAppendSequenceNumber = structuredAppendSequenceNumber;\n this.structuredAppendParity = structuredAppendParity;\n this.numBits = (rawBytes === undefined || rawBytes === null) ? 0 : 8 * rawBytes.length;\n }\n /**\n * @return raw bytes representing the result, or {@code null} if not applicable\n */\n getRawBytes() {\n return this.rawBytes;\n }\n /**\n * @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length\n * @since 3.3.0\n */\n getNumBits() {\n return this.numBits;\n }\n /**\n * @param numBits overrides the number of bits that are valid in {@link #getRawBytes()}\n * @since 3.3.0\n */\n setNumBits(numBits /*int*/) {\n this.numBits = numBits;\n }\n /**\n * @return text representation of the result\n */\n getText() {\n return this.text;\n }\n /**\n * @return list of byte segments in the result, or {@code null} if not applicable\n */\n getByteSegments() {\n return this.byteSegments;\n }\n /**\n * @return name of error correction level used, or {@code null} if not applicable\n */\n getECLevel() {\n return this.ecLevel;\n }\n /**\n * @return number of errors corrected, or {@code null} if not applicable\n */\n getErrorsCorrected() {\n return this.errorsCorrected;\n }\n setErrorsCorrected(errorsCorrected /*Integer*/) {\n this.errorsCorrected = errorsCorrected;\n }\n /**\n * @return number of erasures corrected, or {@code null} if not applicable\n */\n getErasures() {\n return this.erasures;\n }\n setErasures(erasures /*Integer*/) {\n this.erasures = erasures;\n }\n /**\n * @return arbitrary additional metadata\n */\n getOther() {\n return this.other;\n }\n setOther(other) {\n this.other = other;\n }\n hasStructuredAppend() {\n return this.structuredAppendParity >= 0 && this.structuredAppendSequenceNumber >= 0;\n }\n getStructuredAppendParity() {\n return this.structuredAppendParity;\n }\n getStructuredAppendSequenceNumber() {\n return this.structuredAppendSequenceNumber;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

This class contains utility methods for performing mathematical operations over\n * the Galois Fields. Operations use a given primitive polynomial in calculations.

\n *\n *

Throughout this package, elements of the GF are represented as an {@code int}\n * for convenience and speed (but at the cost of memory).\n *

\n *\n * @author Sean Owen\n * @author David Olivier\n */\n class AbstractGenericGF {\n /**\n * @return 2 to the power of a in GF(size)\n */\n exp(a) {\n return this.expTable[a];\n }\n /**\n * @return base 2 log of a in GF(size)\n */\n log(a /*int*/) {\n if (a === 0) {\n throw new IllegalArgumentException();\n }\n return this.logTable[a];\n }\n /**\n * Implements both addition and subtraction -- they are the same in GF(size).\n *\n * @return sum/difference of a and b\n */\n static addOrSubtract(a /*int*/, b /*int*/) {\n return a ^ b;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Represents a polynomial whose coefficients are elements of a GF.\n * Instances of this class are immutable.

\n *\n *

Much credit is due to William Rucklidge since portions of this code are an indirect\n * port of his C++ Reed-Solomon implementation.

\n *\n * @author Sean Owen\n */\n class GenericGFPoly {\n /**\n * @param field the {@link GenericGF} instance representing the field to use\n * to perform computations\n * @param coefficients coefficients as ints representing elements of GF(size), arranged\n * from most significant (highest-power term) coefficient to least significant\n * @throws IllegalArgumentException if argument is null or empty,\n * or if leading coefficient is 0 and this is not a\n * constant polynomial (that is, it is not the monomial \"0\")\n */\n constructor(field, coefficients) {\n if (coefficients.length === 0) {\n throw new IllegalArgumentException();\n }\n this.field = field;\n const coefficientsLength = coefficients.length;\n if (coefficientsLength > 1 && coefficients[0] === 0) {\n // Leading term must be non-zero for anything except the constant polynomial \"0\"\n let firstNonZero = 1;\n while (firstNonZero < coefficientsLength && coefficients[firstNonZero] === 0) {\n firstNonZero++;\n }\n if (firstNonZero === coefficientsLength) {\n this.coefficients = Int32Array.from([0]);\n }\n else {\n this.coefficients = new Int32Array(coefficientsLength - firstNonZero);\n System.arraycopy(coefficients, firstNonZero, this.coefficients, 0, this.coefficients.length);\n }\n }\n else {\n this.coefficients = coefficients;\n }\n }\n getCoefficients() {\n return this.coefficients;\n }\n /**\n * @return degree of this polynomial\n */\n getDegree() {\n return this.coefficients.length - 1;\n }\n /**\n * @return true iff this polynomial is the monomial \"0\"\n */\n isZero() {\n return this.coefficients[0] === 0;\n }\n /**\n * @return coefficient of x^degree term in this polynomial\n */\n getCoefficient(degree /*int*/) {\n return this.coefficients[this.coefficients.length - 1 - degree];\n }\n /**\n * @return evaluation of this polynomial at a given point\n */\n evaluateAt(a /*int*/) {\n if (a === 0) {\n // Just return the x^0 coefficient\n return this.getCoefficient(0);\n }\n const coefficients = this.coefficients;\n let result;\n if (a === 1) {\n // Just the sum of the coefficients\n result = 0;\n for (let i = 0, length = coefficients.length; i !== length; i++) {\n const coefficient = coefficients[i];\n result = AbstractGenericGF.addOrSubtract(result, coefficient);\n }\n return result;\n }\n result = coefficients[0];\n const size = coefficients.length;\n const field = this.field;\n for (let i = 1; i < size; i++) {\n result = AbstractGenericGF.addOrSubtract(field.multiply(a, result), coefficients[i]);\n }\n return result;\n }\n addOrSubtract(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('GenericGFPolys do not have same GenericGF field');\n }\n if (this.isZero()) {\n return other;\n }\n if (other.isZero()) {\n return this;\n }\n let smallerCoefficients = this.coefficients;\n let largerCoefficients = other.coefficients;\n if (smallerCoefficients.length > largerCoefficients.length) {\n const temp = smallerCoefficients;\n smallerCoefficients = largerCoefficients;\n largerCoefficients = temp;\n }\n let sumDiff = new Int32Array(largerCoefficients.length);\n const lengthDiff = largerCoefficients.length - smallerCoefficients.length;\n // Copy high-order terms only found in higher-degree polynomial's coefficients\n System.arraycopy(largerCoefficients, 0, sumDiff, 0, lengthDiff);\n for (let i = lengthDiff; i < largerCoefficients.length; i++) {\n sumDiff[i] = AbstractGenericGF.addOrSubtract(smallerCoefficients[i - lengthDiff], largerCoefficients[i]);\n }\n return new GenericGFPoly(this.field, sumDiff);\n }\n multiply(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('GenericGFPolys do not have same GenericGF field');\n }\n if (this.isZero() || other.isZero()) {\n return this.field.getZero();\n }\n const aCoefficients = this.coefficients;\n const aLength = aCoefficients.length;\n const bCoefficients = other.coefficients;\n const bLength = bCoefficients.length;\n const product = new Int32Array(aLength + bLength - 1);\n const field = this.field;\n for (let i = 0; i < aLength; i++) {\n const aCoeff = aCoefficients[i];\n for (let j = 0; j < bLength; j++) {\n product[i + j] = AbstractGenericGF.addOrSubtract(product[i + j], field.multiply(aCoeff, bCoefficients[j]));\n }\n }\n return new GenericGFPoly(field, product);\n }\n multiplyScalar(scalar /*int*/) {\n if (scalar === 0) {\n return this.field.getZero();\n }\n if (scalar === 1) {\n return this;\n }\n const size = this.coefficients.length;\n const field = this.field;\n const product = new Int32Array(size);\n const coefficients = this.coefficients;\n for (let i = 0; i < size; i++) {\n product[i] = field.multiply(coefficients[i], scalar);\n }\n return new GenericGFPoly(field, product);\n }\n multiplyByMonomial(degree /*int*/, coefficient /*int*/) {\n if (degree < 0) {\n throw new IllegalArgumentException();\n }\n if (coefficient === 0) {\n return this.field.getZero();\n }\n const coefficients = this.coefficients;\n const size = coefficients.length;\n const product = new Int32Array(size + degree);\n const field = this.field;\n for (let i = 0; i < size; i++) {\n product[i] = field.multiply(coefficients[i], coefficient);\n }\n return new GenericGFPoly(field, product);\n }\n divide(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('GenericGFPolys do not have same GenericGF field');\n }\n if (other.isZero()) {\n throw new IllegalArgumentException('Divide by 0');\n }\n const field = this.field;\n let quotient = field.getZero();\n let remainder = this;\n const denominatorLeadingTerm = other.getCoefficient(other.getDegree());\n const inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm);\n while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) {\n const degreeDifference = remainder.getDegree() - other.getDegree();\n const scale = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm);\n const term = other.multiplyByMonomial(degreeDifference, scale);\n const iterationQuotient = field.buildMonomial(degreeDifference, scale);\n quotient = quotient.addOrSubtract(iterationQuotient);\n remainder = remainder.addOrSubtract(term);\n }\n return [quotient, remainder];\n }\n /*@Override*/\n toString() {\n let result = '';\n for (let degree = this.getDegree(); degree >= 0; degree--) {\n let coefficient = this.getCoefficient(degree);\n if (coefficient !== 0) {\n if (coefficient < 0) {\n result += ' - ';\n coefficient = -coefficient;\n }\n else {\n if (result.length > 0) {\n result += ' + ';\n }\n }\n if (degree === 0 || coefficient !== 1) {\n const alphaPower = this.field.log(coefficient);\n if (alphaPower === 0) {\n result += '1';\n }\n else if (alphaPower === 1) {\n result += 'a';\n }\n else {\n result += 'a^';\n result += alphaPower;\n }\n }\n if (degree !== 0) {\n if (degree === 1) {\n result += 'x';\n }\n else {\n result += 'x^';\n result += degree;\n }\n }\n }\n }\n return result;\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class ArithmeticException extends Exception {\n }\n ArithmeticException.kind = 'ArithmeticException';\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

This class contains utility methods for performing mathematical operations over\n * the Galois Fields. Operations use a given primitive polynomial in calculations.

\n *\n *

Throughout this package, elements of the GF are represented as an {@code int}\n * for convenience and speed (but at the cost of memory).\n *

\n *\n * @author Sean Owen\n * @author David Olivier\n */\n class GenericGF extends AbstractGenericGF {\n /**\n * Create a representation of GF(size) using the given primitive polynomial.\n *\n * @param primitive irreducible polynomial whose coefficients are represented by\n * the bits of an int, where the least-significant bit represents the constant\n * coefficient\n * @param size the size of the field\n * @param b the factor b in the generator polynomial can be 0- or 1-based\n * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))).\n * In most cases it should be 1, but for QR code it is 0.\n */\n constructor(primitive /*int*/, size /*int*/, generatorBase /*int*/) {\n super();\n this.primitive = primitive;\n this.size = size;\n this.generatorBase = generatorBase;\n const expTable = new Int32Array(size);\n let x = 1;\n for (let i = 0; i < size; i++) {\n expTable[i] = x;\n x *= 2; // we're assuming the generator alpha is 2\n if (x >= size) {\n x ^= primitive;\n x &= size - 1;\n }\n }\n this.expTable = expTable;\n const logTable = new Int32Array(size);\n for (let i = 0; i < size - 1; i++) {\n logTable[expTable[i]] = i;\n }\n this.logTable = logTable;\n // logTable[0] == 0 but this should never be used\n this.zero = new GenericGFPoly(this, Int32Array.from([0]));\n this.one = new GenericGFPoly(this, Int32Array.from([1]));\n }\n getZero() {\n return this.zero;\n }\n getOne() {\n return this.one;\n }\n /**\n * @return the monomial representing coefficient * x^degree\n */\n buildMonomial(degree /*int*/, coefficient /*int*/) {\n if (degree < 0) {\n throw new IllegalArgumentException();\n }\n if (coefficient === 0) {\n return this.zero;\n }\n const coefficients = new Int32Array(degree + 1);\n coefficients[0] = coefficient;\n return new GenericGFPoly(this, coefficients);\n }\n /**\n * @return multiplicative inverse of a\n */\n inverse(a /*int*/) {\n if (a === 0) {\n throw new ArithmeticException();\n }\n return this.expTable[this.size - this.logTable[a] - 1];\n }\n /**\n * @return product of a and b in GF(size)\n */\n multiply(a /*int*/, b /*int*/) {\n if (a === 0 || b === 0) {\n return 0;\n }\n return this.expTable[(this.logTable[a] + this.logTable[b]) % (this.size - 1)];\n }\n getSize() {\n return this.size;\n }\n getGeneratorBase() {\n return this.generatorBase;\n }\n /*@Override*/\n toString() {\n return ('GF(0x' + Integer.toHexString(this.primitive) + ',' + this.size + ')');\n }\n equals(o) {\n return o === this;\n }\n }\n GenericGF.AZTEC_DATA_12 = new GenericGF(0x1069, 4096, 1); // x^12 + x^6 + x^5 + x^3 + 1\n GenericGF.AZTEC_DATA_10 = new GenericGF(0x409, 1024, 1); // x^10 + x^3 + 1\n GenericGF.AZTEC_DATA_6 = new GenericGF(0x43, 64, 1); // x^6 + x + 1\n GenericGF.AZTEC_PARAM = new GenericGF(0x13, 16, 1); // x^4 + x + 1\n GenericGF.QR_CODE_FIELD_256 = new GenericGF(0x011d, 256, 0); // x^8 + x^4 + x^3 + x^2 + 1\n GenericGF.DATA_MATRIX_FIELD_256 = new GenericGF(0x012d, 256, 1); // x^8 + x^5 + x^3 + x^2 + 1\n GenericGF.AZTEC_DATA_8 = GenericGF.DATA_MATRIX_FIELD_256;\n GenericGF.MAXICODE_FIELD_64 = GenericGF.AZTEC_DATA_6;\n\n /**\n * Custom Error class of type Exception.\n */\n class ReedSolomonException extends Exception {\n }\n ReedSolomonException.kind = 'ReedSolomonException';\n\n /**\n * Custom Error class of type Exception.\n */\n class IllegalStateException extends Exception {\n }\n IllegalStateException.kind = 'IllegalStateException';\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Implements Reed-Solomon decoding, as the name implies.

\n *\n *

The algorithm will not be explained here, but the following references were helpful\n * in creating this implementation:

\n *\n * \n *\n *

Much credit is due to William Rucklidge since portions of this code are an indirect\n * port of his C++ Reed-Solomon implementation.

\n *\n * @author Sean Owen\n * @author William Rucklidge\n * @author sanfordsquires\n */\n class ReedSolomonDecoder {\n constructor(field) {\n this.field = field;\n }\n /**\n *

Decodes given set of received codewords, which include both data and error-correction\n * codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,\n * in the input.

\n *\n * @param received data and error-correction codewords\n * @param twoS number of error-correction codewords available\n * @throws ReedSolomonException if decoding fails for any reason\n */\n decode(received, twoS /*int*/) {\n const field = this.field;\n const poly = new GenericGFPoly(field, received);\n const syndromeCoefficients = new Int32Array(twoS);\n let noError = true;\n for (let i = 0; i < twoS; i++) {\n const evalResult = poly.evaluateAt(field.exp(i + field.getGeneratorBase()));\n syndromeCoefficients[syndromeCoefficients.length - 1 - i] = evalResult;\n if (evalResult !== 0) {\n noError = false;\n }\n }\n if (noError) {\n return;\n }\n const syndrome = new GenericGFPoly(field, syndromeCoefficients);\n const sigmaOmega = this.runEuclideanAlgorithm(field.buildMonomial(twoS, 1), syndrome, twoS);\n const sigma = sigmaOmega[0];\n const omega = sigmaOmega[1];\n const errorLocations = this.findErrorLocations(sigma);\n const errorMagnitudes = this.findErrorMagnitudes(omega, errorLocations);\n for (let i = 0; i < errorLocations.length; i++) {\n const position = received.length - 1 - field.log(errorLocations[i]);\n if (position < 0) {\n throw new ReedSolomonException('Bad error location');\n }\n received[position] = GenericGF.addOrSubtract(received[position], errorMagnitudes[i]);\n }\n }\n runEuclideanAlgorithm(a, b, R /*int*/) {\n // Assume a's degree is >= b's\n if (a.getDegree() < b.getDegree()) {\n const temp = a;\n a = b;\n b = temp;\n }\n const field = this.field;\n let rLast = a;\n let r = b;\n let tLast = field.getZero();\n let t = field.getOne();\n // Run Euclidean algorithm until r's degree is less than R/2\n while (r.getDegree() >= (R / 2 | 0)) {\n let rLastLast = rLast;\n let tLastLast = tLast;\n rLast = r;\n tLast = t;\n // Divide rLastLast by rLast, with quotient in q and remainder in r\n if (rLast.isZero()) {\n // Oops, Euclidean algorithm already terminated?\n throw new ReedSolomonException('r_{i-1} was zero');\n }\n r = rLastLast;\n let q = field.getZero();\n const denominatorLeadingTerm = rLast.getCoefficient(rLast.getDegree());\n const dltInverse = field.inverse(denominatorLeadingTerm);\n while (r.getDegree() >= rLast.getDegree() && !r.isZero()) {\n const degreeDiff = r.getDegree() - rLast.getDegree();\n const scale = field.multiply(r.getCoefficient(r.getDegree()), dltInverse);\n q = q.addOrSubtract(field.buildMonomial(degreeDiff, scale));\n r = r.addOrSubtract(rLast.multiplyByMonomial(degreeDiff, scale));\n }\n t = q.multiply(tLast).addOrSubtract(tLastLast);\n if (r.getDegree() >= rLast.getDegree()) {\n throw new IllegalStateException('Division algorithm failed to reduce polynomial?');\n }\n }\n const sigmaTildeAtZero = t.getCoefficient(0);\n if (sigmaTildeAtZero === 0) {\n throw new ReedSolomonException('sigmaTilde(0) was zero');\n }\n const inverse = field.inverse(sigmaTildeAtZero);\n const sigma = t.multiplyScalar(inverse);\n const omega = r.multiplyScalar(inverse);\n return [sigma, omega];\n }\n findErrorLocations(errorLocator) {\n // This is a direct application of Chien's search\n const numErrors = errorLocator.getDegree();\n if (numErrors === 1) { // shortcut\n return Int32Array.from([errorLocator.getCoefficient(1)]);\n }\n const result = new Int32Array(numErrors);\n let e = 0;\n const field = this.field;\n for (let i = 1; i < field.getSize() && e < numErrors; i++) {\n if (errorLocator.evaluateAt(i) === 0) {\n result[e] = field.inverse(i);\n e++;\n }\n }\n if (e !== numErrors) {\n throw new ReedSolomonException('Error locator degree does not match number of roots');\n }\n return result;\n }\n findErrorMagnitudes(errorEvaluator, errorLocations) {\n // This is directly applying Forney's Formula\n const s = errorLocations.length;\n const result = new Int32Array(s);\n const field = this.field;\n for (let i = 0; i < s; i++) {\n const xiInverse = field.inverse(errorLocations[i]);\n let denominator = 1;\n for (let j = 0; j < s; j++) {\n if (i !== j) {\n // denominator = field.multiply(denominator,\n // GenericGF.addOrSubtract(1, field.multiply(errorLocations[j], xiInverse)))\n // Above should work but fails on some Apple and Linux JDKs due to a Hotspot bug.\n // Below is a funny-looking workaround from Steven Parkes\n const term = field.multiply(errorLocations[j], xiInverse);\n const termPlus1 = (term & 0x1) === 0 ? term | 1 : term & ~1;\n denominator = field.multiply(denominator, termPlus1);\n }\n }\n result[i] = field.multiply(errorEvaluator.evaluateAt(xiInverse), field.inverse(denominator));\n if (field.getGeneratorBase() !== 0) {\n result[i] = field.multiply(result[i], xiInverse);\n }\n }\n return result;\n }\n }\n\n /*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.Arrays;\n var Table;\n (function (Table) {\n Table[Table[\"UPPER\"] = 0] = \"UPPER\";\n Table[Table[\"LOWER\"] = 1] = \"LOWER\";\n Table[Table[\"MIXED\"] = 2] = \"MIXED\";\n Table[Table[\"DIGIT\"] = 3] = \"DIGIT\";\n Table[Table[\"PUNCT\"] = 4] = \"PUNCT\";\n Table[Table[\"BINARY\"] = 5] = \"BINARY\";\n })(Table || (Table = {}));\n /**\n *

The main class which implements Aztec Code decoding -- as opposed to locating and extracting\n * the Aztec Code from an image.

\n *\n * @author David Olivier\n */\n class Decoder {\n decode(detectorResult) {\n this.ddata = detectorResult;\n let matrix = detectorResult.getBits();\n let rawbits = this.extractBits(matrix);\n let correctedBits = this.correctBits(rawbits);\n let rawBytes = Decoder.convertBoolArrayToByteArray(correctedBits);\n let result = Decoder.getEncodedData(correctedBits);\n let decoderResult = new DecoderResult(rawBytes, result, null, null);\n decoderResult.setNumBits(correctedBits.length);\n return decoderResult;\n }\n // This method is used for testing the high-level encoder\n static highLevelDecode(correctedBits) {\n return this.getEncodedData(correctedBits);\n }\n /**\n * Gets the string encoded in the aztec code bits\n *\n * @return the decoded string\n */\n static getEncodedData(correctedBits) {\n let endIndex = correctedBits.length;\n let latchTable = Table.UPPER; // table most recently latched to\n let shiftTable = Table.UPPER; // table to use for the next read\n let result = '';\n let index = 0;\n while (index < endIndex) {\n if (shiftTable === Table.BINARY) {\n if (endIndex - index < 5) {\n break;\n }\n let length = Decoder.readCode(correctedBits, index, 5);\n index += 5;\n if (length === 0) {\n if (endIndex - index < 11) {\n break;\n }\n length = Decoder.readCode(correctedBits, index, 11) + 31;\n index += 11;\n }\n for (let charCount = 0; charCount < length; charCount++) {\n if (endIndex - index < 8) {\n index = endIndex; // Force outer loop to exit\n break;\n }\n const code = Decoder.readCode(correctedBits, index, 8);\n result += /*(char)*/ StringUtils.castAsNonUtf8Char(code);\n index += 8;\n }\n // Go back to whatever mode we had been in\n shiftTable = latchTable;\n }\n else {\n let size = shiftTable === Table.DIGIT ? 4 : 5;\n if (endIndex - index < size) {\n break;\n }\n let code = Decoder.readCode(correctedBits, index, size);\n index += size;\n let str = Decoder.getCharacter(shiftTable, code);\n if (str.startsWith('CTRL_')) {\n // Table changes\n // ISO/IEC 24778:2008 prescribes ending a shift sequence in the mode from which it was invoked.\n // That's including when that mode is a shift.\n // Our test case dlusbs.png for issue #642 exercises that.\n latchTable = shiftTable; // Latch the current mode, so as to return to Upper after U/S B/S\n shiftTable = Decoder.getTable(str.charAt(5));\n if (str.charAt(6) === 'L') {\n latchTable = shiftTable;\n }\n }\n else {\n result += str;\n // Go back to whatever mode we had been in\n shiftTable = latchTable;\n }\n }\n }\n return result;\n }\n /**\n * gets the table corresponding to the char passed\n */\n static getTable(t) {\n switch (t) {\n case 'L':\n return Table.LOWER;\n case 'P':\n return Table.PUNCT;\n case 'M':\n return Table.MIXED;\n case 'D':\n return Table.DIGIT;\n case 'B':\n return Table.BINARY;\n case 'U':\n default:\n return Table.UPPER;\n }\n }\n /**\n * Gets the character (or string) corresponding to the passed code in the given table\n *\n * @param table the table used\n * @param code the code of the character\n */\n static getCharacter(table, code) {\n switch (table) {\n case Table.UPPER:\n return Decoder.UPPER_TABLE[code];\n case Table.LOWER:\n return Decoder.LOWER_TABLE[code];\n case Table.MIXED:\n return Decoder.MIXED_TABLE[code];\n case Table.PUNCT:\n return Decoder.PUNCT_TABLE[code];\n case Table.DIGIT:\n return Decoder.DIGIT_TABLE[code];\n default:\n // Should not reach here.\n throw new IllegalStateException('Bad table');\n }\n }\n /**\n *

Performs RS error correction on an array of bits.

\n *\n * @return the corrected array\n * @throws FormatException if the input contains too many errors\n */\n correctBits(rawbits) {\n let gf;\n let codewordSize;\n if (this.ddata.getNbLayers() <= 2) {\n codewordSize = 6;\n gf = GenericGF.AZTEC_DATA_6;\n }\n else if (this.ddata.getNbLayers() <= 8) {\n codewordSize = 8;\n gf = GenericGF.AZTEC_DATA_8;\n }\n else if (this.ddata.getNbLayers() <= 22) {\n codewordSize = 10;\n gf = GenericGF.AZTEC_DATA_10;\n }\n else {\n codewordSize = 12;\n gf = GenericGF.AZTEC_DATA_12;\n }\n let numDataCodewords = this.ddata.getNbDatablocks();\n let numCodewords = rawbits.length / codewordSize;\n if (numCodewords < numDataCodewords) {\n throw new FormatException();\n }\n let offset = rawbits.length % codewordSize;\n let dataWords = new Int32Array(numCodewords);\n for (let i = 0; i < numCodewords; i++, offset += codewordSize) {\n dataWords[i] = Decoder.readCode(rawbits, offset, codewordSize);\n }\n try {\n let rsDecoder = new ReedSolomonDecoder(gf);\n rsDecoder.decode(dataWords, numCodewords - numDataCodewords);\n }\n catch (ex) {\n throw new FormatException(ex);\n }\n // Now perform the unstuffing operation.\n // First, count how many bits are going to be thrown out as stuffing\n let mask = (1 << codewordSize) - 1;\n let stuffedBits = 0;\n for (let i = 0; i < numDataCodewords; i++) {\n let dataWord = dataWords[i];\n if (dataWord === 0 || dataWord === mask) {\n throw new FormatException();\n }\n else if (dataWord === 1 || dataWord === mask - 1) {\n stuffedBits++;\n }\n }\n // Now, actually unpack the bits and remove the stuffing\n let correctedBits = new Array(numDataCodewords * codewordSize - stuffedBits);\n let index = 0;\n for (let i = 0; i < numDataCodewords; i++) {\n let dataWord = dataWords[i];\n if (dataWord === 1 || dataWord === mask - 1) {\n // next codewordSize-1 bits are all zeros or all ones\n correctedBits.fill(dataWord > 1, index, index + codewordSize - 1);\n // Arrays.fill(correctedBits, index, index + codewordSize - 1, dataWord > 1);\n index += codewordSize - 1;\n }\n else {\n for (let bit = codewordSize - 1; bit >= 0; --bit) {\n correctedBits[index++] = (dataWord & (1 << bit)) !== 0;\n }\n }\n }\n return correctedBits;\n }\n /**\n * Gets the array of bits from an Aztec Code matrix\n *\n * @return the array of bits\n */\n extractBits(matrix) {\n let compact = this.ddata.isCompact();\n let layers = this.ddata.getNbLayers();\n let baseMatrixSize = (compact ? 11 : 14) + layers * 4; // not including alignment lines\n let alignmentMap = new Int32Array(baseMatrixSize);\n let rawbits = new Array(this.totalBitsInLayer(layers, compact));\n if (compact) {\n for (let i = 0; i < alignmentMap.length; i++) {\n alignmentMap[i] = i;\n }\n }\n else {\n let matrixSize = baseMatrixSize + 1 + 2 * Integer.truncDivision((Integer.truncDivision(baseMatrixSize, 2) - 1), 15);\n let origCenter = baseMatrixSize / 2;\n let center = Integer.truncDivision(matrixSize, 2);\n for (let i = 0; i < origCenter; i++) {\n let newOffset = i + Integer.truncDivision(i, 15);\n alignmentMap[origCenter - i - 1] = center - newOffset - 1;\n alignmentMap[origCenter + i] = center + newOffset + 1;\n }\n }\n for (let i = 0, rowOffset = 0; i < layers; i++) {\n let rowSize = (layers - i) * 4 + (compact ? 9 : 12);\n // The top-left most point of this layer is (not including alignment lines)\n let low = i * 2;\n // The bottom-right most point of this layer is (not including alignment lines)\n let high = baseMatrixSize - 1 - low;\n // We pull bits from the two 2 x rowSize columns and two rowSize x 2 rows\n for (let j = 0; j < rowSize; j++) {\n let columnOffset = j * 2;\n for (let k = 0; k < 2; k++) {\n // left column\n rawbits[rowOffset + columnOffset + k] =\n matrix.get(alignmentMap[low + k], alignmentMap[low + j]);\n // bottom row\n rawbits[rowOffset + 2 * rowSize + columnOffset + k] =\n matrix.get(alignmentMap[low + j], alignmentMap[high - k]);\n // right column\n rawbits[rowOffset + 4 * rowSize + columnOffset + k] =\n matrix.get(alignmentMap[high - k], alignmentMap[high - j]);\n // top row\n rawbits[rowOffset + 6 * rowSize + columnOffset + k] =\n matrix.get(alignmentMap[high - j], alignmentMap[low + k]);\n }\n }\n rowOffset += rowSize * 8;\n }\n return rawbits;\n }\n /**\n * Reads a code of given length and at given index in an array of bits\n */\n static readCode(rawbits, startIndex, length) {\n let res = 0;\n for (let i = startIndex; i < startIndex + length; i++) {\n res <<= 1;\n if (rawbits[i]) {\n res |= 0x01;\n }\n }\n return res;\n }\n /**\n * Reads a code of length 8 in an array of bits, padding with zeros\n */\n static readByte(rawbits, startIndex) {\n let n = rawbits.length - startIndex;\n if (n >= 8) {\n return Decoder.readCode(rawbits, startIndex, 8);\n }\n return Decoder.readCode(rawbits, startIndex, n) << (8 - n);\n }\n /**\n * Packs a bit array into bytes, most significant bit first\n */\n static convertBoolArrayToByteArray(boolArr) {\n let byteArr = new Uint8Array((boolArr.length + 7) / 8);\n for (let i = 0; i < byteArr.length; i++) {\n byteArr[i] = Decoder.readByte(boolArr, 8 * i);\n }\n return byteArr;\n }\n totalBitsInLayer(layers, compact) {\n return ((compact ? 88 : 112) + 16 * layers) * layers;\n }\n }\n Decoder.UPPER_TABLE = [\n 'CTRL_PS', ' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'CTRL_LL', 'CTRL_ML', 'CTRL_DL', 'CTRL_BS'\n ];\n Decoder.LOWER_TABLE = [\n 'CTRL_PS', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',\n 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'CTRL_US', 'CTRL_ML', 'CTRL_DL', 'CTRL_BS'\n ];\n Decoder.MIXED_TABLE = [\n // Module parse failed: Octal literal in strict mode (50:29)\n // so number string were scaped\n 'CTRL_PS', ' ', '\\\\1', '\\\\2', '\\\\3', '\\\\4', '\\\\5', '\\\\6', '\\\\7', '\\b', '\\t', '\\n',\n '\\\\13', '\\f', '\\r', '\\\\33', '\\\\34', '\\\\35', '\\\\36', '\\\\37', '@', '\\\\', '^', '_',\n '`', '|', '~', '\\\\177', 'CTRL_LL', 'CTRL_UL', 'CTRL_PL', 'CTRL_BS'\n ];\n Decoder.PUNCT_TABLE = [\n '', '\\r', '\\r\\n', '. ', ', ', ': ', '!', '\"', '#', '$', '%', '&', '\\'', '(', ')',\n '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '[', ']', '{', '}', 'CTRL_UL'\n ];\n Decoder.DIGIT_TABLE = [\n 'CTRL_PS', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',', '.', 'CTRL_UL', 'CTRL_US'\n ];\n\n /*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing.common.detector {*/\n /**\n * General math-related and numeric utility functions.\n */\n class MathUtils {\n constructor() { }\n /**\n * Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its\n * argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut\n * differ slightly from {@link Math#round(float)} in that half rounds down for negative\n * values. -2.5 rounds to -3, not -2. For purposes here it makes no difference.\n *\n * @param d real value to round\n * @return nearest {@code int}\n */\n static round(d /*float*/) {\n if (NaN === d)\n return 0;\n if (d <= Number.MIN_SAFE_INTEGER)\n return Number.MIN_SAFE_INTEGER;\n if (d >= Number.MAX_SAFE_INTEGER)\n return Number.MAX_SAFE_INTEGER;\n return /*(int) */ (d + (d < 0.0 ? -0.5 : 0.5)) | 0;\n }\n // TYPESCRIPTPORT: maybe remove round method and call directly Math.round, it looks like it doesn't make sense for js\n /**\n * @param aX point A x coordinate\n * @param aY point A y coordinate\n * @param bX point B x coordinate\n * @param bY point B y coordinate\n * @return Euclidean distance between points A and B\n */\n static distance(aX /*float|int*/, aY /*float|int*/, bX /*float|int*/, bY /*float|int*/) {\n const xDiff = aX - bX;\n const yDiff = aY - bY;\n return /*(float) */ Math.sqrt(xDiff * xDiff + yDiff * yDiff);\n }\n /**\n * @param aX point A x coordinate\n * @param aY point A y coordinate\n * @param bX point B x coordinate\n * @param bY point B y coordinate\n * @return Euclidean distance between points A and B\n */\n // public static distance(aX: number /*int*/, aY: number /*int*/, bX: number /*int*/, bY: number /*int*/): float {\n // const xDiff = aX - bX\n // const yDiff = aY - bY\n // return (float) Math.sqrt(xDiff * xDiff + yDiff * yDiff);\n // }\n /**\n * @param array values to sum\n * @return sum of values in array\n */\n static sum(array) {\n let count = 0;\n for (let i = 0, length = array.length; i !== length; i++) {\n const a = array[i];\n count += a;\n }\n return count;\n }\n }\n\n /**\n * Ponyfill for Java's Float class.\n */\n class Float {\n /**\n * SincTS has no difference between int and float, there's all numbers,\n * this is used only to polyfill Java code.\n */\n static floatToIntBits(f) {\n return f;\n }\n }\n /**\n * The float max value in JS is the number max value.\n */\n Float.MAX_VALUE = Number.MAX_SAFE_INTEGER;\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates a point of interest in an image containing a barcode. Typically, this\n * would be the location of a finder pattern or the corner of the barcode, for example.

\n *\n * @author Sean Owen\n */\n class ResultPoint {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n getX() {\n return this.x;\n }\n getY() {\n return this.y;\n }\n /*@Override*/\n equals(other) {\n if (other instanceof ResultPoint) {\n const otherPoint = other;\n return this.x === otherPoint.x && this.y === otherPoint.y;\n }\n return false;\n }\n /*@Override*/\n hashCode() {\n return 31 * Float.floatToIntBits(this.x) + Float.floatToIntBits(this.y);\n }\n /*@Override*/\n toString() {\n return '(' + this.x + ',' + this.y + ')';\n }\n /**\n * Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC\n * and BC is less than AC, and the angle between BC and BA is less than 180 degrees.\n *\n * @param patterns array of three {@code ResultPoint} to order\n */\n static orderBestPatterns(patterns) {\n // Find distances between pattern centers\n const zeroOneDistance = this.distance(patterns[0], patterns[1]);\n const oneTwoDistance = this.distance(patterns[1], patterns[2]);\n const zeroTwoDistance = this.distance(patterns[0], patterns[2]);\n let pointA;\n let pointB;\n let pointC;\n // Assume one closest to other two is B; A and C will just be guesses at first\n if (oneTwoDistance >= zeroOneDistance && oneTwoDistance >= zeroTwoDistance) {\n pointB = patterns[0];\n pointA = patterns[1];\n pointC = patterns[2];\n }\n else if (zeroTwoDistance >= oneTwoDistance && zeroTwoDistance >= zeroOneDistance) {\n pointB = patterns[1];\n pointA = patterns[0];\n pointC = patterns[2];\n }\n else {\n pointB = patterns[2];\n pointA = patterns[0];\n pointC = patterns[1];\n }\n // Use cross product to figure out whether A and C are correct or flipped.\n // This asks whether BC x BA has a positive z component, which is the arrangement\n // we want for A, B, C. If it's negative, then we've got it flipped around and\n // should swap A and C.\n if (this.crossProductZ(pointA, pointB, pointC) < 0.0) {\n const temp = pointA;\n pointA = pointC;\n pointC = temp;\n }\n patterns[0] = pointA;\n patterns[1] = pointB;\n patterns[2] = pointC;\n }\n /**\n * @param pattern1 first pattern\n * @param pattern2 second pattern\n * @return distance between two points\n */\n static distance(pattern1, pattern2) {\n return MathUtils.distance(pattern1.x, pattern1.y, pattern2.x, pattern2.y);\n }\n /**\n * Returns the z component of the cross product between vectors BC and BA.\n */\n static crossProductZ(pointA, pointB, pointC) {\n const bX = pointB.x;\n const bY = pointB.y;\n return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates the result of detecting a barcode in an image. This includes the raw\n * matrix of black/white pixels corresponding to the barcode, and possibly points of interest\n * in the image, like the location of finder patterns or corners of the barcode in the image.

\n *\n * @author Sean Owen\n */\n class DetectorResult {\n constructor(bits, points) {\n this.bits = bits;\n this.points = points;\n }\n getBits() {\n return this.bits;\n }\n getPoints() {\n return this.points;\n }\n }\n\n /*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Extends {@link DetectorResult} with more information specific to the Aztec format,\n * like the number of layers and whether it's compact.

\n *\n * @author Sean Owen\n */\n class AztecDetectorResult extends DetectorResult {\n constructor(bits, points, compact, nbDatablocks, nbLayers) {\n super(bits, points);\n this.compact = compact;\n this.nbDatablocks = nbDatablocks;\n this.nbLayers = nbLayers;\n }\n getNbLayers() {\n return this.nbLayers;\n }\n getNbDatablocks() {\n return this.nbDatablocks;\n }\n isCompact() {\n return this.compact;\n }\n }\n\n /*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

\n * Detects a candidate barcode-like rectangular region within an image. It\n * starts around the center of the image, increases the size of the candidate\n * region until it finds a white rectangular region. By keeping track of the\n * last black points it encountered, it determines the corners of the barcode.\n *

\n *\n * @author David Olivier\n */\n class WhiteRectangleDetector {\n // public constructor(private image: BitMatrix) /*throws NotFoundException*/ {\n // this(image, INIT_SIZE, image.getWidth() / 2, image.getHeight() / 2)\n // }\n /**\n * @param image barcode image to find a rectangle in\n * @param initSize initial size of search area around center\n * @param x x position of search center\n * @param y y position of search center\n * @throws NotFoundException if image is too small to accommodate {@code initSize}\n */\n constructor(image, initSize /*int*/, x /*int*/, y /*int*/) {\n this.image = image;\n this.height = image.getHeight();\n this.width = image.getWidth();\n if (undefined === initSize || null === initSize) {\n initSize = WhiteRectangleDetector.INIT_SIZE;\n }\n if (undefined === x || null === x) {\n x = image.getWidth() / 2 | 0;\n }\n if (undefined === y || null === y) {\n y = image.getHeight() / 2 | 0;\n }\n const halfsize = initSize / 2 | 0;\n this.leftInit = x - halfsize;\n this.rightInit = x + halfsize;\n this.upInit = y - halfsize;\n this.downInit = y + halfsize;\n if (this.upInit < 0 || this.leftInit < 0 || this.downInit >= this.height || this.rightInit >= this.width) {\n throw new NotFoundException();\n }\n }\n /**\n *

\n * Detects a candidate barcode-like rectangular region within an image. It\n * starts around the center of the image, increases the size of the candidate\n * region until it finds a white rectangular region.\n *

\n *\n * @return {@link ResultPoint}[] describing the corners of the rectangular\n * region. The first and last points are opposed on the diagonal, as\n * are the second and third. The first point will be the topmost\n * point and the last, the bottommost. The second point will be\n * leftmost and the third, the rightmost\n * @throws NotFoundException if no Data Matrix Code can be found\n */\n detect() {\n let left = this.leftInit;\n let right = this.rightInit;\n let up = this.upInit;\n let down = this.downInit;\n let sizeExceeded = false;\n let aBlackPointFoundOnBorder = true;\n let atLeastOneBlackPointFoundOnBorder = false;\n let atLeastOneBlackPointFoundOnRight = false;\n let atLeastOneBlackPointFoundOnBottom = false;\n let atLeastOneBlackPointFoundOnLeft = false;\n let atLeastOneBlackPointFoundOnTop = false;\n const width = this.width;\n const height = this.height;\n while (aBlackPointFoundOnBorder) {\n aBlackPointFoundOnBorder = false;\n // .....\n // . |\n // .....\n let rightBorderNotWhite = true;\n while ((rightBorderNotWhite || !atLeastOneBlackPointFoundOnRight) && right < width) {\n rightBorderNotWhite = this.containsBlackPoint(up, down, right, false);\n if (rightBorderNotWhite) {\n right++;\n aBlackPointFoundOnBorder = true;\n atLeastOneBlackPointFoundOnRight = true;\n }\n else if (!atLeastOneBlackPointFoundOnRight) {\n right++;\n }\n }\n if (right >= width) {\n sizeExceeded = true;\n break;\n }\n // .....\n // . .\n // .___.\n let bottomBorderNotWhite = true;\n while ((bottomBorderNotWhite || !atLeastOneBlackPointFoundOnBottom) && down < height) {\n bottomBorderNotWhite = this.containsBlackPoint(left, right, down, true);\n if (bottomBorderNotWhite) {\n down++;\n aBlackPointFoundOnBorder = true;\n atLeastOneBlackPointFoundOnBottom = true;\n }\n else if (!atLeastOneBlackPointFoundOnBottom) {\n down++;\n }\n }\n if (down >= height) {\n sizeExceeded = true;\n break;\n }\n // .....\n // | .\n // .....\n let leftBorderNotWhite = true;\n while ((leftBorderNotWhite || !atLeastOneBlackPointFoundOnLeft) && left >= 0) {\n leftBorderNotWhite = this.containsBlackPoint(up, down, left, false);\n if (leftBorderNotWhite) {\n left--;\n aBlackPointFoundOnBorder = true;\n atLeastOneBlackPointFoundOnLeft = true;\n }\n else if (!atLeastOneBlackPointFoundOnLeft) {\n left--;\n }\n }\n if (left < 0) {\n sizeExceeded = true;\n break;\n }\n // .___.\n // . .\n // .....\n let topBorderNotWhite = true;\n while ((topBorderNotWhite || !atLeastOneBlackPointFoundOnTop) && up >= 0) {\n topBorderNotWhite = this.containsBlackPoint(left, right, up, true);\n if (topBorderNotWhite) {\n up--;\n aBlackPointFoundOnBorder = true;\n atLeastOneBlackPointFoundOnTop = true;\n }\n else if (!atLeastOneBlackPointFoundOnTop) {\n up--;\n }\n }\n if (up < 0) {\n sizeExceeded = true;\n break;\n }\n if (aBlackPointFoundOnBorder) {\n atLeastOneBlackPointFoundOnBorder = true;\n }\n }\n if (!sizeExceeded && atLeastOneBlackPointFoundOnBorder) {\n const maxSize = right - left;\n let z = null;\n for (let i = 1; z === null && i < maxSize; i++) {\n z = this.getBlackPointOnSegment(left, down - i, left + i, down);\n }\n if (z == null) {\n throw new NotFoundException();\n }\n let t = null;\n // go down right\n for (let i = 1; t === null && i < maxSize; i++) {\n t = this.getBlackPointOnSegment(left, up + i, left + i, up);\n }\n if (t == null) {\n throw new NotFoundException();\n }\n let x = null;\n // go down left\n for (let i = 1; x === null && i < maxSize; i++) {\n x = this.getBlackPointOnSegment(right, up + i, right - i, up);\n }\n if (x == null) {\n throw new NotFoundException();\n }\n let y = null;\n // go up left\n for (let i = 1; y === null && i < maxSize; i++) {\n y = this.getBlackPointOnSegment(right, down - i, right - i, down);\n }\n if (y == null) {\n throw new NotFoundException();\n }\n return this.centerEdges(y, z, x, t);\n }\n else {\n throw new NotFoundException();\n }\n }\n getBlackPointOnSegment(aX /*float*/, aY /*float*/, bX /*float*/, bY /*float*/) {\n const dist = MathUtils.round(MathUtils.distance(aX, aY, bX, bY));\n const xStep = (bX - aX) / dist;\n const yStep = (bY - aY) / dist;\n const image = this.image;\n for (let i = 0; i < dist; i++) {\n const x = MathUtils.round(aX + i * xStep);\n const y = MathUtils.round(aY + i * yStep);\n if (image.get(x, y)) {\n return new ResultPoint(x, y);\n }\n }\n return null;\n }\n /**\n * recenters the points of a constant distance towards the center\n *\n * @param y bottom most point\n * @param z left most point\n * @param x right most point\n * @param t top most point\n * @return {@link ResultPoint}[] describing the corners of the rectangular\n * region. The first and last points are opposed on the diagonal, as\n * are the second and third. The first point will be the topmost\n * point and the last, the bottommost. The second point will be\n * leftmost and the third, the rightmost\n */\n centerEdges(y, z, x, t) {\n //\n // t t\n // z x\n // x OR z\n // y y\n //\n const yi = y.getX();\n const yj = y.getY();\n const zi = z.getX();\n const zj = z.getY();\n const xi = x.getX();\n const xj = x.getY();\n const ti = t.getX();\n const tj = t.getY();\n const CORR = WhiteRectangleDetector.CORR;\n if (yi < this.width / 2.0) {\n return [\n new ResultPoint(ti - CORR, tj + CORR),\n new ResultPoint(zi + CORR, zj + CORR),\n new ResultPoint(xi - CORR, xj - CORR),\n new ResultPoint(yi + CORR, yj - CORR)\n ];\n }\n else {\n return [\n new ResultPoint(ti + CORR, tj + CORR),\n new ResultPoint(zi + CORR, zj - CORR),\n new ResultPoint(xi - CORR, xj + CORR),\n new ResultPoint(yi - CORR, yj - CORR)\n ];\n }\n }\n /**\n * Determines whether a segment contains a black point\n *\n * @param a min value of the scanned coordinate\n * @param b max value of the scanned coordinate\n * @param fixed value of fixed coordinate\n * @param horizontal set to true if scan must be horizontal, false if vertical\n * @return true if a black point has been found, else false.\n */\n containsBlackPoint(a /*int*/, b /*int*/, fixed /*int*/, horizontal) {\n const image = this.image;\n if (horizontal) {\n for (let x = a; x <= b; x++) {\n if (image.get(x, fixed)) {\n return true;\n }\n }\n }\n else {\n for (let y = a; y <= b; y++) {\n if (image.get(fixed, y)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n WhiteRectangleDetector.INIT_SIZE = 10;\n WhiteRectangleDetector.CORR = 1;\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Implementations of this class can, given locations of finder patterns for a QR code in an\n * image, sample the right points in the image to reconstruct the QR code, accounting for\n * perspective distortion. It is abstracted since it is relatively expensive and should be allowed\n * to take advantage of platform-specific optimized implementations, like Sun's Java Advanced\n * Imaging library, but which may not be available in other environments such as J2ME, and vice\n * versa.\n *\n * The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)}\n * with an instance of a class which implements this interface.\n *\n * @author Sean Owen\n */\n class GridSampler {\n /**\n *

Checks a set of points that have been transformed to sample points on an image against\n * the image's dimensions to see if the point are even within the image.

\n *\n *

This method will actually \"nudge\" the endpoints back onto the image if they are found to be\n * barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder\n * patterns in an image where the QR Code runs all the way to the image border.

\n *\n *

For efficiency, the method will check points from either end of the line until one is found\n * to be within the image. Because the set of points are assumed to be linear, this is valid.

\n *\n * @param image image into which the points should map\n * @param points actual points in x1,y1,...,xn,yn form\n * @throws NotFoundException if an endpoint is lies outside the image boundaries\n */\n static checkAndNudgePoints(image, points) {\n const width = image.getWidth();\n const height = image.getHeight();\n // Check and nudge points from start until we see some that are OK:\n let nudged = true;\n for (let offset = 0; offset < points.length && nudged; offset += 2) {\n const x = Math.floor(points[offset]);\n const y = Math.floor(points[offset + 1]);\n if (x < -1 || x > width || y < -1 || y > height) {\n throw new NotFoundException();\n }\n nudged = false;\n if (x === -1) {\n points[offset] = 0.0;\n nudged = true;\n }\n else if (x === width) {\n points[offset] = width - 1;\n nudged = true;\n }\n if (y === -1) {\n points[offset + 1] = 0.0;\n nudged = true;\n }\n else if (y === height) {\n points[offset + 1] = height - 1;\n nudged = true;\n }\n }\n // Check and nudge points from end:\n nudged = true;\n for (let offset = points.length - 2; offset >= 0 && nudged; offset -= 2) {\n const x = Math.floor(points[offset]);\n const y = Math.floor(points[offset + 1]);\n if (x < -1 || x > width || y < -1 || y > height) {\n throw new NotFoundException();\n }\n nudged = false;\n if (x === -1) {\n points[offset] = 0.0;\n nudged = true;\n }\n else if (x === width) {\n points[offset] = width - 1;\n nudged = true;\n }\n if (y === -1) {\n points[offset + 1] = 0.0;\n nudged = true;\n }\n else if (y === height) {\n points[offset + 1] = height - 1;\n nudged = true;\n }\n }\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing.common {*/\n /**\n *

This class implements a perspective transform in two dimensions. Given four source and four\n * destination points, it will compute the transformation implied between them. The code is based\n * directly upon section 3.4.2 of George Wolberg's \"Digital Image Warping\"; see pages 54-56.

\n *\n * @author Sean Owen\n */\n class PerspectiveTransform {\n constructor(a11 /*float*/, a21 /*float*/, a31 /*float*/, a12 /*float*/, a22 /*float*/, a32 /*float*/, a13 /*float*/, a23 /*float*/, a33 /*float*/) {\n this.a11 = a11;\n this.a21 = a21;\n this.a31 = a31;\n this.a12 = a12;\n this.a22 = a22;\n this.a32 = a32;\n this.a13 = a13;\n this.a23 = a23;\n this.a33 = a33;\n }\n static quadrilateralToQuadrilateral(x0 /*float*/, y0 /*float*/, x1 /*float*/, y1 /*float*/, x2 /*float*/, y2 /*float*/, x3 /*float*/, y3 /*float*/, x0p /*float*/, y0p /*float*/, x1p /*float*/, y1p /*float*/, x2p /*float*/, y2p /*float*/, x3p /*float*/, y3p /*float*/) {\n const qToS = PerspectiveTransform.quadrilateralToSquare(x0, y0, x1, y1, x2, y2, x3, y3);\n const sToQ = PerspectiveTransform.squareToQuadrilateral(x0p, y0p, x1p, y1p, x2p, y2p, x3p, y3p);\n return sToQ.times(qToS);\n }\n transformPoints(points) {\n const max = points.length;\n const a11 = this.a11;\n const a12 = this.a12;\n const a13 = this.a13;\n const a21 = this.a21;\n const a22 = this.a22;\n const a23 = this.a23;\n const a31 = this.a31;\n const a32 = this.a32;\n const a33 = this.a33;\n for (let i = 0; i < max; i += 2) {\n const x = points[i];\n const y = points[i + 1];\n const denominator = a13 * x + a23 * y + a33;\n points[i] = (a11 * x + a21 * y + a31) / denominator;\n points[i + 1] = (a12 * x + a22 * y + a32) / denominator;\n }\n }\n transformPointsWithValues(xValues, yValues) {\n const a11 = this.a11;\n const a12 = this.a12;\n const a13 = this.a13;\n const a21 = this.a21;\n const a22 = this.a22;\n const a23 = this.a23;\n const a31 = this.a31;\n const a32 = this.a32;\n const a33 = this.a33;\n const n = xValues.length;\n for (let i = 0; i < n; i++) {\n const x = xValues[i];\n const y = yValues[i];\n const denominator = a13 * x + a23 * y + a33;\n xValues[i] = (a11 * x + a21 * y + a31) / denominator;\n yValues[i] = (a12 * x + a22 * y + a32) / denominator;\n }\n }\n static squareToQuadrilateral(x0 /*float*/, y0 /*float*/, x1 /*float*/, y1 /*float*/, x2 /*float*/, y2 /*float*/, x3 /*float*/, y3 /*float*/) {\n const dx3 = x0 - x1 + x2 - x3;\n const dy3 = y0 - y1 + y2 - y3;\n if (dx3 === 0.0 && dy3 === 0.0) {\n // Affine\n return new PerspectiveTransform(x1 - x0, x2 - x1, x0, y1 - y0, y2 - y1, y0, 0.0, 0.0, 1.0);\n }\n else {\n const dx1 = x1 - x2;\n const dx2 = x3 - x2;\n const dy1 = y1 - y2;\n const dy2 = y3 - y2;\n const denominator = dx1 * dy2 - dx2 * dy1;\n const a13 = (dx3 * dy2 - dx2 * dy3) / denominator;\n const a23 = (dx1 * dy3 - dx3 * dy1) / denominator;\n return new PerspectiveTransform(x1 - x0 + a13 * x1, x3 - x0 + a23 * x3, x0, y1 - y0 + a13 * y1, y3 - y0 + a23 * y3, y0, a13, a23, 1.0);\n }\n }\n static quadrilateralToSquare(x0 /*float*/, y0 /*float*/, x1 /*float*/, y1 /*float*/, x2 /*float*/, y2 /*float*/, x3 /*float*/, y3 /*float*/) {\n // Here, the adjoint serves as the inverse:\n return PerspectiveTransform.squareToQuadrilateral(x0, y0, x1, y1, x2, y2, x3, y3).buildAdjoint();\n }\n buildAdjoint() {\n // Adjoint is the transpose of the cofactor matrix:\n return new PerspectiveTransform(this.a22 * this.a33 - this.a23 * this.a32, this.a23 * this.a31 - this.a21 * this.a33, this.a21 * this.a32 - this.a22 * this.a31, this.a13 * this.a32 - this.a12 * this.a33, this.a11 * this.a33 - this.a13 * this.a31, this.a12 * this.a31 - this.a11 * this.a32, this.a12 * this.a23 - this.a13 * this.a22, this.a13 * this.a21 - this.a11 * this.a23, this.a11 * this.a22 - this.a12 * this.a21);\n }\n times(other) {\n return new PerspectiveTransform(this.a11 * other.a11 + this.a21 * other.a12 + this.a31 * other.a13, this.a11 * other.a21 + this.a21 * other.a22 + this.a31 * other.a23, this.a11 * other.a31 + this.a21 * other.a32 + this.a31 * other.a33, this.a12 * other.a11 + this.a22 * other.a12 + this.a32 * other.a13, this.a12 * other.a21 + this.a22 * other.a22 + this.a32 * other.a23, this.a12 * other.a31 + this.a22 * other.a32 + this.a32 * other.a33, this.a13 * other.a11 + this.a23 * other.a12 + this.a33 * other.a13, this.a13 * other.a21 + this.a23 * other.a22 + this.a33 * other.a23, this.a13 * other.a31 + this.a23 * other.a32 + this.a33 * other.a33);\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Sean Owen\n */\n class DefaultGridSampler extends GridSampler {\n /*@Override*/\n sampleGrid(image, dimensionX /*int*/, dimensionY /*int*/, p1ToX /*float*/, p1ToY /*float*/, p2ToX /*float*/, p2ToY /*float*/, p3ToX /*float*/, p3ToY /*float*/, p4ToX /*float*/, p4ToY /*float*/, p1FromX /*float*/, p1FromY /*float*/, p2FromX /*float*/, p2FromY /*float*/, p3FromX /*float*/, p3FromY /*float*/, p4FromX /*float*/, p4FromY /*float*/) {\n const transform = PerspectiveTransform.quadrilateralToQuadrilateral(p1ToX, p1ToY, p2ToX, p2ToY, p3ToX, p3ToY, p4ToX, p4ToY, p1FromX, p1FromY, p2FromX, p2FromY, p3FromX, p3FromY, p4FromX, p4FromY);\n return this.sampleGridWithTransform(image, dimensionX, dimensionY, transform);\n }\n /*@Override*/\n sampleGridWithTransform(image, dimensionX /*int*/, dimensionY /*int*/, transform) {\n if (dimensionX <= 0 || dimensionY <= 0) {\n throw new NotFoundException();\n }\n const bits = new BitMatrix(dimensionX, dimensionY);\n const points = new Float32Array(2 * dimensionX);\n for (let y = 0; y < dimensionY; y++) {\n const max = points.length;\n const iValue = y + 0.5;\n for (let x = 0; x < max; x += 2) {\n points[x] = (x / 2) + 0.5;\n points[x + 1] = iValue;\n }\n transform.transformPoints(points);\n // Quick check to see if points transformed to something inside the image\n // sufficient to check the endpoints\n GridSampler.checkAndNudgePoints(image, points);\n try {\n for (let x = 0; x < max; x += 2) {\n if (image.get(Math.floor(points[x]), Math.floor(points[x + 1]))) {\n // Black(-ish) pixel\n bits.set(x / 2, y);\n }\n }\n }\n catch (aioobe /*: ArrayIndexOutOfBoundsException*/) {\n // This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting\n // transform gets \"twisted\" such that it maps a straight line of points to a set of points\n // whose endpoints are in bounds, but others are not. There is probably some mathematical\n // way to detect this about the transformation that I don't know yet.\n // This results in an ugly runtime exception despite our clever checks above -- can't have\n // that. We could check each point's coordinates but that feels duplicative. We settle for\n // catching and wrapping ArrayIndexOutOfBoundsException.\n throw new NotFoundException();\n }\n }\n return bits;\n }\n }\n\n class GridSamplerInstance {\n /**\n * Sets the implementation of GridSampler used by the library. One global\n * instance is stored, which may sound problematic. But, the implementation provided\n * ought to be appropriate for the entire platform, and all uses of this library\n * in the whole lifetime of the JVM. For instance, an Android activity can swap in\n * an implementation that takes advantage of native platform libraries.\n *\n * @param newGridSampler The platform-specific object to install.\n */\n static setGridSampler(newGridSampler) {\n GridSamplerInstance.gridSampler = newGridSampler;\n }\n /**\n * @return the current implementation of GridSampler\n */\n static getInstance() {\n return GridSamplerInstance.gridSampler;\n }\n }\n GridSamplerInstance.gridSampler = new DefaultGridSampler();\n\n /*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n class Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n toResultPoint() {\n return new ResultPoint(this.getX(), this.getY());\n }\n getX() {\n return this.x;\n }\n getY() {\n return this.y;\n }\n }\n /**\n * Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code\n * is rotated or skewed, or partially obscured.\n *\n * @author David Olivier\n * @author Frank Yellin\n */\n class Detector {\n constructor(image) {\n this.EXPECTED_CORNER_BITS = new Int32Array([\n 0xee0,\n 0x1dc,\n 0x83b,\n 0x707,\n ]);\n this.image = image;\n }\n detect() {\n return this.detectMirror(false);\n }\n /**\n * Detects an Aztec Code in an image.\n *\n * @param isMirror if true, image is a mirror-image of original\n * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code\n * @throws NotFoundException if no Aztec Code can be found\n */\n detectMirror(isMirror) {\n // 1. Get the center of the aztec matrix\n let pCenter = this.getMatrixCenter();\n // 2. Get the center points of the four diagonal points just outside the bull's eye\n // [topRight, bottomRight, bottomLeft, topLeft]\n let bullsEyeCorners = this.getBullsEyeCorners(pCenter);\n if (isMirror) {\n let temp = bullsEyeCorners[0];\n bullsEyeCorners[0] = bullsEyeCorners[2];\n bullsEyeCorners[2] = temp;\n }\n // 3. Get the size of the matrix and other parameters from the bull's eye\n this.extractParameters(bullsEyeCorners);\n // 4. Sample the grid\n let bits = this.sampleGrid(this.image, bullsEyeCorners[this.shift % 4], bullsEyeCorners[(this.shift + 1) % 4], bullsEyeCorners[(this.shift + 2) % 4], bullsEyeCorners[(this.shift + 3) % 4]);\n // 5. Get the corners of the matrix.\n let corners = this.getMatrixCornerPoints(bullsEyeCorners);\n return new AztecDetectorResult(bits, corners, this.compact, this.nbDataBlocks, this.nbLayers);\n }\n /**\n * Extracts the number of data layers and data blocks from the layer around the bull's eye.\n *\n * @param bullsEyeCorners the array of bull's eye corners\n * @throws NotFoundException in case of too many errors or invalid parameters\n */\n extractParameters(bullsEyeCorners) {\n if (!this.isValidPoint(bullsEyeCorners[0]) || !this.isValidPoint(bullsEyeCorners[1]) ||\n !this.isValidPoint(bullsEyeCorners[2]) || !this.isValidPoint(bullsEyeCorners[3])) {\n throw new NotFoundException();\n }\n let length = 2 * this.nbCenterLayers;\n // Get the bits around the bull's eye\n let sides = new Int32Array([\n this.sampleLine(bullsEyeCorners[0], bullsEyeCorners[1], length),\n this.sampleLine(bullsEyeCorners[1], bullsEyeCorners[2], length),\n this.sampleLine(bullsEyeCorners[2], bullsEyeCorners[3], length),\n this.sampleLine(bullsEyeCorners[3], bullsEyeCorners[0], length) // Top\n ]);\n // bullsEyeCorners[shift] is the corner of the bulls'eye that has three\n // orientation marks.\n // sides[shift] is the row/column that goes from the corner with three\n // orientation marks to the corner with two.\n this.shift = this.getRotation(sides, length);\n // Flatten the parameter bits into a single 28- or 40-bit long\n let parameterData = 0;\n for (let i = 0; i < 4; i++) {\n let side = sides[(this.shift + i) % 4];\n if (this.compact) {\n // Each side of the form ..XXXXXXX. where Xs are parameter data\n parameterData <<= 7;\n parameterData += (side >> 1) & 0x7F;\n }\n else {\n // Each side of the form ..XXXXX.XXXXX. where Xs are parameter data\n parameterData <<= 10;\n parameterData += ((side >> 2) & (0x1f << 5)) + ((side >> 1) & 0x1F);\n }\n }\n // Corrects parameter data using RS. Returns just the data portion\n // without the error correction.\n let correctedData = this.getCorrectedParameterData(parameterData, this.compact);\n if (this.compact) {\n // 8 bits: 2 bits layers and 6 bits data blocks\n this.nbLayers = (correctedData >> 6) + 1;\n this.nbDataBlocks = (correctedData & 0x3F) + 1;\n }\n else {\n // 16 bits: 5 bits layers and 11 bits data blocks\n this.nbLayers = (correctedData >> 11) + 1;\n this.nbDataBlocks = (correctedData & 0x7FF) + 1;\n }\n }\n getRotation(sides, length) {\n // In a normal pattern, we expect to See\n // ** .* D A\n // * *\n //\n // . *\n // .. .. C B\n //\n // Grab the 3 bits from each of the sides the form the locator pattern and concatenate\n // into a 12-bit integer. Start with the bit at A\n let cornerBits = 0;\n sides.forEach((side, idx, arr) => {\n // XX......X where X's are orientation marks\n let t = ((side >> (length - 2)) << 1) + (side & 1);\n cornerBits = (cornerBits << 3) + t;\n });\n // for (var side in sides) {\n // // XX......X where X's are orientation marks\n // var t = ((side >> (length - 2)) << 1) + (side & 1);\n // cornerBits = (cornerBits << 3) + t;\n // }\n // Mov the bottom bit to the top, so that the three bits of the locator pattern at A are\n // together. cornerBits is now:\n // 3 orientation bits at A || 3 orientation bits at B || ... || 3 orientation bits at D\n cornerBits = ((cornerBits & 1) << 11) + (cornerBits >> 1);\n // The result shift indicates which element of BullsEyeCorners[] goes into the top-left\n // corner. Since the four rotation values have a Hamming distance of 8, we\n // can easily tolerate two errors.\n for (let shift = 0; shift < 4; shift++) {\n if (Integer.bitCount(cornerBits ^ this.EXPECTED_CORNER_BITS[shift]) <= 2) {\n return shift;\n }\n }\n throw new NotFoundException();\n }\n /**\n * Corrects the parameter bits using Reed-Solomon algorithm.\n *\n * @param parameterData parameter bits\n * @param compact true if this is a compact Aztec code\n * @throws NotFoundException if the array contains too many errors\n */\n getCorrectedParameterData(parameterData, compact) {\n let numCodewords;\n let numDataCodewords;\n if (compact) {\n numCodewords = 7;\n numDataCodewords = 2;\n }\n else {\n numCodewords = 10;\n numDataCodewords = 4;\n }\n let numECCodewords = numCodewords - numDataCodewords;\n let parameterWords = new Int32Array(numCodewords);\n for (let i = numCodewords - 1; i >= 0; --i) {\n parameterWords[i] = parameterData & 0xF;\n parameterData >>= 4;\n }\n try {\n let rsDecoder = new ReedSolomonDecoder(GenericGF.AZTEC_PARAM);\n rsDecoder.decode(parameterWords, numECCodewords);\n }\n catch (ignored) {\n throw new NotFoundException();\n }\n // Toss the error correction. Just return the data as an integer\n let result = 0;\n for (let i = 0; i < numDataCodewords; i++) {\n result = (result << 4) + parameterWords[i];\n }\n return result;\n }\n /**\n * Finds the corners of a bull-eye centered on the passed point.\n * This returns the centers of the diagonal points just outside the bull's eye\n * Returns [topRight, bottomRight, bottomLeft, topLeft]\n *\n * @param pCenter Center point\n * @return The corners of the bull-eye\n * @throws NotFoundException If no valid bull-eye can be found\n */\n getBullsEyeCorners(pCenter) {\n let pina = pCenter;\n let pinb = pCenter;\n let pinc = pCenter;\n let pind = pCenter;\n let color = true;\n for (this.nbCenterLayers = 1; this.nbCenterLayers < 9; this.nbCenterLayers++) {\n let pouta = this.getFirstDifferent(pina, color, 1, -1);\n let poutb = this.getFirstDifferent(pinb, color, 1, 1);\n let poutc = this.getFirstDifferent(pinc, color, -1, 1);\n let poutd = this.getFirstDifferent(pind, color, -1, -1);\n // d a\n //\n // c b\n if (this.nbCenterLayers > 2) {\n let q = (this.distancePoint(poutd, pouta) * this.nbCenterLayers) / (this.distancePoint(pind, pina) * (this.nbCenterLayers + 2));\n if (q < 0.75 || q > 1.25 || !this.isWhiteOrBlackRectangle(pouta, poutb, poutc, poutd)) {\n break;\n }\n }\n pina = pouta;\n pinb = poutb;\n pinc = poutc;\n pind = poutd;\n color = !color;\n }\n if (this.nbCenterLayers !== 5 && this.nbCenterLayers !== 7) {\n throw new NotFoundException();\n }\n this.compact = this.nbCenterLayers === 5;\n // Expand the square by .5 pixel in each direction so that we're on the border\n // between the white square and the black square\n let pinax = new ResultPoint(pina.getX() + 0.5, pina.getY() - 0.5);\n let pinbx = new ResultPoint(pinb.getX() + 0.5, pinb.getY() + 0.5);\n let pincx = new ResultPoint(pinc.getX() - 0.5, pinc.getY() + 0.5);\n let pindx = new ResultPoint(pind.getX() - 0.5, pind.getY() - 0.5);\n // Expand the square so that its corners are the centers of the points\n // just outside the bull's eye.\n return this.expandSquare([pinax, pinbx, pincx, pindx], 2 * this.nbCenterLayers - 3, 2 * this.nbCenterLayers);\n }\n /**\n * Finds a candidate center point of an Aztec code from an image\n *\n * @return the center point\n */\n getMatrixCenter() {\n let pointA;\n let pointB;\n let pointC;\n let pointD;\n // Get a white rectangle that can be the border of the matrix in center bull's eye or\n try {\n let cornerPoints = new WhiteRectangleDetector(this.image).detect();\n pointA = cornerPoints[0];\n pointB = cornerPoints[1];\n pointC = cornerPoints[2];\n pointD = cornerPoints[3];\n }\n catch (e) {\n // This exception can be in case the initial rectangle is white\n // In that case, surely in the bull's eye, we try to expand the rectangle.\n let cx = this.image.getWidth() / 2;\n let cy = this.image.getHeight() / 2;\n pointA = this.getFirstDifferent(new Point(cx + 7, cy - 7), false, 1, -1).toResultPoint();\n pointB = this.getFirstDifferent(new Point(cx + 7, cy + 7), false, 1, 1).toResultPoint();\n pointC = this.getFirstDifferent(new Point(cx - 7, cy + 7), false, -1, 1).toResultPoint();\n pointD = this.getFirstDifferent(new Point(cx - 7, cy - 7), false, -1, -1).toResultPoint();\n }\n // Compute the center of the rectangle\n let cx = MathUtils.round((pointA.getX() + pointD.getX() + pointB.getX() + pointC.getX()) / 4.0);\n let cy = MathUtils.round((pointA.getY() + pointD.getY() + pointB.getY() + pointC.getY()) / 4.0);\n // Redetermine the white rectangle starting from previously computed center.\n // This will ensure that we end up with a white rectangle in center bull's eye\n // in order to compute a more accurate center.\n try {\n let cornerPoints = new WhiteRectangleDetector(this.image, 15, cx, cy).detect();\n pointA = cornerPoints[0];\n pointB = cornerPoints[1];\n pointC = cornerPoints[2];\n pointD = cornerPoints[3];\n }\n catch (e) {\n // This exception can be in case the initial rectangle is white\n // In that case we try to expand the rectangle.\n pointA = this.getFirstDifferent(new Point(cx + 7, cy - 7), false, 1, -1).toResultPoint();\n pointB = this.getFirstDifferent(new Point(cx + 7, cy + 7), false, 1, 1).toResultPoint();\n pointC = this.getFirstDifferent(new Point(cx - 7, cy + 7), false, -1, 1).toResultPoint();\n pointD = this.getFirstDifferent(new Point(cx - 7, cy - 7), false, -1, -1).toResultPoint();\n }\n // Recompute the center of the rectangle\n cx = MathUtils.round((pointA.getX() + pointD.getX() + pointB.getX() + pointC.getX()) / 4.0);\n cy = MathUtils.round((pointA.getY() + pointD.getY() + pointB.getY() + pointC.getY()) / 4.0);\n return new Point(cx, cy);\n }\n /**\n * Gets the Aztec code corners from the bull's eye corners and the parameters.\n *\n * @param bullsEyeCorners the array of bull's eye corners\n * @return the array of aztec code corners\n */\n getMatrixCornerPoints(bullsEyeCorners) {\n return this.expandSquare(bullsEyeCorners, 2 * this.nbCenterLayers, this.getDimension());\n }\n /**\n * Creates a BitMatrix by sampling the provided image.\n * topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the\n * diagonal just outside the bull's eye.\n */\n sampleGrid(image, topLeft, topRight, bottomRight, bottomLeft) {\n let sampler = GridSamplerInstance.getInstance();\n let dimension = this.getDimension();\n let low = dimension / 2 - this.nbCenterLayers;\n let high = dimension / 2 + this.nbCenterLayers;\n return sampler.sampleGrid(image, dimension, dimension, low, low, // topleft\n high, low, // topright\n high, high, // bottomright\n low, high, // bottomleft\n topLeft.getX(), topLeft.getY(), topRight.getX(), topRight.getY(), bottomRight.getX(), bottomRight.getY(), bottomLeft.getX(), bottomLeft.getY());\n }\n /**\n * Samples a line.\n *\n * @param p1 start point (inclusive)\n * @param p2 end point (exclusive)\n * @param size number of bits\n * @return the array of bits as an int (first bit is high-order bit of result)\n */\n sampleLine(p1, p2, size) {\n let result = 0;\n let d = this.distanceResultPoint(p1, p2);\n let moduleSize = d / size;\n let px = p1.getX();\n let py = p1.getY();\n let dx = moduleSize * (p2.getX() - p1.getX()) / d;\n let dy = moduleSize * (p2.getY() - p1.getY()) / d;\n for (let i = 0; i < size; i++) {\n if (this.image.get(MathUtils.round(px + i * dx), MathUtils.round(py + i * dy))) {\n result |= 1 << (size - i - 1);\n }\n }\n return result;\n }\n /**\n * @return true if the border of the rectangle passed in parameter is compound of white points only\n * or black points only\n */\n isWhiteOrBlackRectangle(p1, p2, p3, p4) {\n let corr = 3;\n p1 = new Point(p1.getX() - corr, p1.getY() + corr);\n p2 = new Point(p2.getX() - corr, p2.getY() - corr);\n p3 = new Point(p3.getX() + corr, p3.getY() - corr);\n p4 = new Point(p4.getX() + corr, p4.getY() + corr);\n let cInit = this.getColor(p4, p1);\n if (cInit === 0) {\n return false;\n }\n let c = this.getColor(p1, p2);\n if (c !== cInit) {\n return false;\n }\n c = this.getColor(p2, p3);\n if (c !== cInit) {\n return false;\n }\n c = this.getColor(p3, p4);\n return c === cInit;\n }\n /**\n * Gets the color of a segment\n *\n * @return 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else\n */\n getColor(p1, p2) {\n let d = this.distancePoint(p1, p2);\n let dx = (p2.getX() - p1.getX()) / d;\n let dy = (p2.getY() - p1.getY()) / d;\n let error = 0;\n let px = p1.getX();\n let py = p1.getY();\n let colorModel = this.image.get(p1.getX(), p1.getY());\n let iMax = Math.ceil(d);\n for (let i = 0; i < iMax; i++) {\n px += dx;\n py += dy;\n if (this.image.get(MathUtils.round(px), MathUtils.round(py)) !== colorModel) {\n error++;\n }\n }\n let errRatio = error / d;\n if (errRatio > 0.1 && errRatio < 0.9) {\n return 0;\n }\n return (errRatio <= 0.1) === colorModel ? 1 : -1;\n }\n /**\n * Gets the coordinate of the first point with a different color in the given direction\n */\n getFirstDifferent(init, color, dx, dy) {\n let x = init.getX() + dx;\n let y = init.getY() + dy;\n while (this.isValid(x, y) && this.image.get(x, y) === color) {\n x += dx;\n y += dy;\n }\n x -= dx;\n y -= dy;\n while (this.isValid(x, y) && this.image.get(x, y) === color) {\n x += dx;\n }\n x -= dx;\n while (this.isValid(x, y) && this.image.get(x, y) === color) {\n y += dy;\n }\n y -= dy;\n return new Point(x, y);\n }\n /**\n * Expand the square represented by the corner points by pushing out equally in all directions\n *\n * @param cornerPoints the corners of the square, which has the bull's eye at its center\n * @param oldSide the original length of the side of the square in the target bit matrix\n * @param newSide the new length of the size of the square in the target bit matrix\n * @return the corners of the expanded square\n */\n expandSquare(cornerPoints, oldSide, newSide) {\n let ratio = newSide / (2.0 * oldSide);\n let dx = cornerPoints[0].getX() - cornerPoints[2].getX();\n let dy = cornerPoints[0].getY() - cornerPoints[2].getY();\n let centerx = (cornerPoints[0].getX() + cornerPoints[2].getX()) / 2.0;\n let centery = (cornerPoints[0].getY() + cornerPoints[2].getY()) / 2.0;\n let result0 = new ResultPoint(centerx + ratio * dx, centery + ratio * dy);\n let result2 = new ResultPoint(centerx - ratio * dx, centery - ratio * dy);\n dx = cornerPoints[1].getX() - cornerPoints[3].getX();\n dy = cornerPoints[1].getY() - cornerPoints[3].getY();\n centerx = (cornerPoints[1].getX() + cornerPoints[3].getX()) / 2.0;\n centery = (cornerPoints[1].getY() + cornerPoints[3].getY()) / 2.0;\n let result1 = new ResultPoint(centerx + ratio * dx, centery + ratio * dy);\n let result3 = new ResultPoint(centerx - ratio * dx, centery - ratio * dy);\n let results = [result0, result1, result2, result3];\n return results;\n }\n isValid(x, y) {\n return x >= 0 && x < this.image.getWidth() && y > 0 && y < this.image.getHeight();\n }\n isValidPoint(point) {\n let x = MathUtils.round(point.getX());\n let y = MathUtils.round(point.getY());\n return this.isValid(x, y);\n }\n distancePoint(a, b) {\n return MathUtils.distance(a.getX(), a.getY(), b.getX(), b.getY());\n }\n distanceResultPoint(a, b) {\n return MathUtils.distance(a.getX(), a.getY(), b.getX(), b.getY());\n }\n getDimension() {\n if (this.compact) {\n return 4 * this.nbLayers + 11;\n }\n if (this.nbLayers <= 4) {\n return 4 * this.nbLayers + 15;\n }\n return 4 * this.nbLayers + 2 * (Integer.truncDivision((this.nbLayers - 4), 8) + 1) + 15;\n }\n }\n\n /*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.List;\n // import java.util.Map;\n /**\n * This implementation can detect and decode Aztec codes in an image.\n *\n * @author David Olivier\n */\n class AztecReader {\n /**\n * Locates and decodes a Data Matrix code in an image.\n *\n * @return a String representing the content encoded by the Data Matrix code\n * @throws NotFoundException if a Data Matrix code cannot be found\n * @throws FormatException if a Data Matrix code cannot be decoded\n */\n decode(image, hints = null) {\n let exception = null;\n let detector = new Detector(image.getBlackMatrix());\n let points = null;\n let decoderResult = null;\n try {\n let detectorResult = detector.detectMirror(false);\n points = detectorResult.getPoints();\n this.reportFoundResultPoints(hints, points);\n decoderResult = new Decoder().decode(detectorResult);\n }\n catch (e) {\n exception = e;\n }\n if (decoderResult == null) {\n try {\n let detectorResult = detector.detectMirror(true);\n points = detectorResult.getPoints();\n this.reportFoundResultPoints(hints, points);\n decoderResult = new Decoder().decode(detectorResult);\n }\n catch (e) {\n if (exception != null) {\n throw exception;\n }\n throw e;\n }\n }\n let result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), decoderResult.getNumBits(), points, BarcodeFormat$1.AZTEC, System.currentTimeMillis());\n let byteSegments = decoderResult.getByteSegments();\n if (byteSegments != null) {\n result.putMetadata(ResultMetadataType$1.BYTE_SEGMENTS, byteSegments);\n }\n let ecLevel = decoderResult.getECLevel();\n if (ecLevel != null) {\n result.putMetadata(ResultMetadataType$1.ERROR_CORRECTION_LEVEL, ecLevel);\n }\n return result;\n }\n reportFoundResultPoints(hints, points) {\n if (hints != null) {\n let rpcb = hints.get(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK);\n if (rpcb != null) {\n points.forEach((point, idx, arr) => {\n rpcb.foundPossibleResultPoint(point);\n });\n }\n }\n }\n // @Override\n reset() {\n // do nothing\n }\n }\n\n /**\n * Aztec Code reader to use from browser.\n *\n * @class BrowserAztecCodeReader\n * @extends {BrowserCodeReader}\n */\n class BrowserAztecCodeReader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserAztecCodeReader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n *\n * @memberOf BrowserAztecCodeReader\n */\n constructor(timeBetweenScansMillis = 500) {\n super(new AztecReader(), timeBetweenScansMillis);\n }\n }\n\n /**\n * Encapsulates functionality and implementation that is common to all families\n * of one-dimensional barcodes.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Sean Owen\n */\n class OneDReader {\n /*\n @Override\n public Result decode(BinaryBitmap image) throws NotFoundException, FormatException {\n return decode(image, null);\n }\n */\n // Note that we don't try rotation without the try harder flag, even if rotation was supported.\n // @Override\n decode(image, hints) {\n try {\n return this.doDecode(image, hints);\n }\n catch (nfe) {\n const tryHarder = hints && (hints.get(DecodeHintType$1.TRY_HARDER) === true);\n if (tryHarder && image.isRotateSupported()) {\n const rotatedImage = image.rotateCounterClockwise();\n const result = this.doDecode(rotatedImage, hints);\n // Record that we found it rotated 90 degrees CCW / 270 degrees CW\n const metadata = result.getResultMetadata();\n let orientation = 270;\n if (metadata !== null && (metadata.get(ResultMetadataType$1.ORIENTATION) === true)) {\n // But if we found it reversed in doDecode(), add in that result here:\n orientation = (orientation + metadata.get(ResultMetadataType$1.ORIENTATION) % 360);\n }\n result.putMetadata(ResultMetadataType$1.ORIENTATION, orientation);\n // Update result points\n const points = result.getResultPoints();\n if (points !== null) {\n const height = rotatedImage.getHeight();\n for (let i = 0; i < points.length; i++) {\n points[i] = new ResultPoint(height - points[i].getY() - 1, points[i].getX());\n }\n }\n return result;\n }\n else {\n throw new NotFoundException();\n }\n }\n }\n // @Override\n reset() {\n // do nothing\n }\n /**\n * We're going to examine rows from the middle outward, searching alternately above and below the\n * middle, and farther out each time. rowStep is the number of rows between each successive\n * attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then\n * middle + rowStep, then middle - (2 * rowStep), etc.\n * rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily\n * decided that moving up and down by about 1/16 of the image is pretty good; we try more of the\n * image if \"trying harder\".\n *\n * @param image The image to decode\n * @param hints Any hints that were requested\n * @return The contents of the decoded barcode\n * @throws NotFoundException Any spontaneous errors which occur\n */\n doDecode(image, hints) {\n const width = image.getWidth();\n const height = image.getHeight();\n let row = new BitArray(width);\n const tryHarder = hints && (hints.get(DecodeHintType$1.TRY_HARDER) === true);\n const rowStep = Math.max(1, height >> (tryHarder ? 8 : 5));\n let maxLines;\n if (tryHarder) {\n maxLines = height; // Look at the whole image, not just the center\n }\n else {\n maxLines = 15; // 15 rows spaced 1/32 apart is roughly the middle half of the image\n }\n const middle = Math.trunc(height / 2);\n for (let x = 0; x < maxLines; x++) {\n // Scanning from the middle out. Determine which row we're looking at next:\n const rowStepsAboveOrBelow = Math.trunc((x + 1) / 2);\n const isAbove = (x & 0x01) === 0; // i.e. is x even?\n const rowNumber = middle + rowStep * (isAbove ? rowStepsAboveOrBelow : -rowStepsAboveOrBelow);\n if (rowNumber < 0 || rowNumber >= height) {\n // Oops, if we run off the top or bottom, stop\n break;\n }\n // Estimate black point for this row and load it:\n try {\n row = image.getBlackRow(rowNumber, row);\n }\n catch (ignored) {\n continue;\n }\n // While we have the image data in a BitArray, it's fairly cheap to reverse it in place to\n // handle decoding upside down barcodes.\n for (let attempt = 0; attempt < 2; attempt++) {\n if (attempt === 1) { // trying again?\n row.reverse(); // reverse the row and continue\n // This means we will only ever draw result points *once* in the life of this method\n // since we want to avoid drawing the wrong points after flipping the row, and,\n // don't want to clutter with noise from every single row scan -- just the scans\n // that start on the center line.\n if (hints && (hints.get(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK) === true)) {\n const newHints = new Map();\n hints.forEach((hint, key) => newHints.set(key, hint));\n newHints.delete(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK);\n hints = newHints;\n }\n }\n try {\n // Look for a barcode\n const result = this.decodeRow(rowNumber, row, hints);\n // We found our barcode\n if (attempt === 1) {\n // But it was upside down, so note that\n result.putMetadata(ResultMetadataType$1.ORIENTATION, 180);\n // And remember to flip the result points horizontally.\n const points = result.getResultPoints();\n if (points !== null) {\n points[0] = new ResultPoint(width - points[0].getX() - 1, points[0].getY());\n points[1] = new ResultPoint(width - points[1].getX() - 1, points[1].getY());\n }\n }\n return result;\n }\n catch (re) {\n // continue -- just couldn't decode this row\n }\n }\n }\n throw new NotFoundException();\n }\n /**\n * Records the size of successive runs of white and black pixels in a row, starting at a given point.\n * The values are recorded in the given array, and the number of runs recorded is equal to the size\n * of the array. If the row starts on a white pixel at the given start point, then the first count\n * recorded is the run of white pixels starting from that point; likewise it is the count of a run\n * of black pixels if the row begin on a black pixels at that point.\n *\n * @param row row to count from\n * @param start offset into row to start at\n * @param counters array into which to record counts\n * @throws NotFoundException if counters cannot be filled entirely from row before running out\n * of pixels\n */\n static recordPattern(row, start, counters) {\n const numCounters = counters.length;\n for (let index = 0; index < numCounters; index++)\n counters[index] = 0;\n const end = row.getSize();\n if (start >= end) {\n throw new NotFoundException();\n }\n let isWhite = !row.get(start);\n let counterPosition = 0;\n let i = start;\n while (i < end) {\n if (row.get(i) !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (++counterPosition === numCounters) {\n break;\n }\n else {\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n i++;\n }\n // If we read fully the last section of pixels and filled up our counters -- or filled\n // the last counter but ran off the side of the image, OK. Otherwise, a problem.\n if (!(counterPosition === numCounters || (counterPosition === numCounters - 1 && i === end))) {\n throw new NotFoundException();\n }\n }\n static recordPatternInReverse(row, start, counters) {\n // This could be more efficient I guess\n let numTransitionsLeft = counters.length;\n let last = row.get(start);\n while (start > 0 && numTransitionsLeft >= 0) {\n if (row.get(--start) !== last) {\n numTransitionsLeft--;\n last = !last;\n }\n }\n if (numTransitionsLeft >= 0) {\n throw new NotFoundException();\n }\n OneDReader.recordPattern(row, start + 1, counters);\n }\n /**\n * Determines how closely a set of observed counts of runs of black/white values matches a given\n * target pattern. This is reported as the ratio of the total variance from the expected pattern\n * proportions across all pattern elements, to the length of the pattern.\n *\n * @param counters observed counters\n * @param pattern expected pattern\n * @param maxIndividualVariance The most any counter can differ before we give up\n * @return ratio of total variance between counters and pattern compared to total pattern size\n */\n static patternMatchVariance(counters, pattern, maxIndividualVariance) {\n const numCounters = counters.length;\n let total = 0;\n let patternLength = 0;\n for (let i = 0; i < numCounters; i++) {\n total += counters[i];\n patternLength += pattern[i];\n }\n if (total < patternLength) {\n // If we don't even have one pixel per unit of bar width, assume this is too small\n // to reliably match, so fail:\n return Number.POSITIVE_INFINITY;\n }\n const unitBarWidth = total / patternLength;\n maxIndividualVariance *= unitBarWidth;\n let totalVariance = 0.0;\n for (let x = 0; x < numCounters; x++) {\n const counter = counters[x];\n const scaledPattern = pattern[x] * unitBarWidth;\n const variance = counter > scaledPattern ? counter - scaledPattern : scaledPattern - counter;\n if (variance > maxIndividualVariance) {\n return Number.POSITIVE_INFINITY;\n }\n totalVariance += variance;\n }\n return totalVariance / total;\n }\n }\n\n /**\n *

Decodes Code 128 barcodes.

\n *\n * @author Sean Owen\n */\n class Code128Reader extends OneDReader {\n static findStartPattern(row) {\n const width = row.getSize();\n const rowOffset = row.getNextSet(0);\n let counterPosition = 0;\n let counters = Int32Array.from([0, 0, 0, 0, 0, 0]);\n let patternStart = rowOffset;\n let isWhite = false;\n const patternLength = 6;\n for (let i = rowOffset; i < width; i++) {\n if (row.get(i) !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition === (patternLength - 1)) {\n let bestVariance = Code128Reader.MAX_AVG_VARIANCE;\n let bestMatch = -1;\n for (let startCode = Code128Reader.CODE_START_A; startCode <= Code128Reader.CODE_START_C; startCode++) {\n const variance = OneDReader.patternMatchVariance(counters, Code128Reader.CODE_PATTERNS[startCode], Code128Reader.MAX_INDIVIDUAL_VARIANCE);\n if (variance < bestVariance) {\n bestVariance = variance;\n bestMatch = startCode;\n }\n }\n // Look for whitespace before start pattern, >= 50% of width of start pattern\n if (bestMatch >= 0 &&\n row.isRange(Math.max(0, patternStart - (i - patternStart) / 2), patternStart, false)) {\n return Int32Array.from([patternStart, i, bestMatch]);\n }\n patternStart += counters[0] + counters[1];\n counters = counters.slice(2, counters.length - 1);\n counters[counterPosition - 1] = 0;\n counters[counterPosition] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n throw new NotFoundException();\n }\n static decodeCode(row, counters, rowOffset) {\n OneDReader.recordPattern(row, rowOffset, counters);\n let bestVariance = Code128Reader.MAX_AVG_VARIANCE; // worst variance we'll accept\n let bestMatch = -1;\n for (let d = 0; d < Code128Reader.CODE_PATTERNS.length; d++) {\n const pattern = Code128Reader.CODE_PATTERNS[d];\n const variance = this.patternMatchVariance(counters, pattern, Code128Reader.MAX_INDIVIDUAL_VARIANCE);\n if (variance < bestVariance) {\n bestVariance = variance;\n bestMatch = d;\n }\n }\n // TODO We're overlooking the fact that the STOP pattern has 7 values, not 6.\n if (bestMatch >= 0) {\n return bestMatch;\n }\n else {\n throw new NotFoundException();\n }\n }\n decodeRow(rowNumber, row, hints) {\n const convertFNC1 = hints && (hints.get(DecodeHintType$1.ASSUME_GS1) === true);\n const startPatternInfo = Code128Reader.findStartPattern(row);\n const startCode = startPatternInfo[2];\n let currentRawCodesIndex = 0;\n const rawCodes = new Uint8Array(20);\n rawCodes[currentRawCodesIndex++] = startCode;\n let codeSet;\n switch (startCode) {\n case Code128Reader.CODE_START_A:\n codeSet = Code128Reader.CODE_CODE_A;\n break;\n case Code128Reader.CODE_START_B:\n codeSet = Code128Reader.CODE_CODE_B;\n break;\n case Code128Reader.CODE_START_C:\n codeSet = Code128Reader.CODE_CODE_C;\n break;\n default:\n throw new FormatException();\n }\n let done = false;\n let isNextShifted = false;\n let result = '';\n let lastStart = startPatternInfo[0];\n let nextStart = startPatternInfo[1];\n const counters = Int32Array.from([0, 0, 0, 0, 0, 0]);\n let lastCode = 0;\n let code = 0;\n let checksumTotal = startCode;\n let multiplier = 0;\n let lastCharacterWasPrintable = true;\n let upperMode = false;\n let shiftUpperMode = false;\n while (!done) {\n const unshift = isNextShifted;\n isNextShifted = false;\n // Save off last code\n lastCode = code;\n // Decode another code from image\n code = Code128Reader.decodeCode(row, counters, nextStart);\n rawCodes[currentRawCodesIndex++] = code;\n // Remember whether the last code was printable or not (excluding CODE_STOP)\n if (code !== Code128Reader.CODE_STOP) {\n lastCharacterWasPrintable = true;\n }\n // Add to checksum computation (if not CODE_STOP of course)\n if (code !== Code128Reader.CODE_STOP) {\n multiplier++;\n checksumTotal += multiplier * code;\n }\n // Advance to where the next code will to start\n lastStart = nextStart;\n nextStart += counters.reduce((previous, current) => previous + current, 0);\n // Take care of illegal start codes\n switch (code) {\n case Code128Reader.CODE_START_A:\n case Code128Reader.CODE_START_B:\n case Code128Reader.CODE_START_C:\n throw new FormatException();\n }\n switch (codeSet) {\n case Code128Reader.CODE_CODE_A:\n if (code < 64) {\n if (shiftUpperMode === upperMode) {\n result += String.fromCharCode((' '.charCodeAt(0) + code));\n }\n else {\n result += String.fromCharCode((' '.charCodeAt(0) + code + 128));\n }\n shiftUpperMode = false;\n }\n else if (code < 96) {\n if (shiftUpperMode === upperMode) {\n result += String.fromCharCode((code - 64));\n }\n else {\n result += String.fromCharCode((code + 64));\n }\n shiftUpperMode = false;\n }\n else {\n // Don't let CODE_STOP, which always appears, affect whether whether we think the last\n // code was printable or not.\n if (code !== Code128Reader.CODE_STOP) {\n lastCharacterWasPrintable = false;\n }\n switch (code) {\n case Code128Reader.CODE_FNC_1:\n if (convertFNC1) {\n if (result.length === 0) {\n // GS1 specification 5.4.3.7. and 5.4.6.4. If the first char after the start code\n // is FNC1 then this is GS1-128. We add the symbology identifier.\n result += ']C1';\n }\n else {\n // GS1 specification 5.4.7.5. Every subsequent FNC1 is returned as ASCII 29 (GS)\n result += String.fromCharCode(29);\n }\n }\n break;\n case Code128Reader.CODE_FNC_2:\n case Code128Reader.CODE_FNC_3:\n // do nothing?\n break;\n case Code128Reader.CODE_FNC_4_A:\n if (!upperMode && shiftUpperMode) {\n upperMode = true;\n shiftUpperMode = false;\n }\n else if (upperMode && shiftUpperMode) {\n upperMode = false;\n shiftUpperMode = false;\n }\n else {\n shiftUpperMode = true;\n }\n break;\n case Code128Reader.CODE_SHIFT:\n isNextShifted = true;\n codeSet = Code128Reader.CODE_CODE_B;\n break;\n case Code128Reader.CODE_CODE_B:\n codeSet = Code128Reader.CODE_CODE_B;\n break;\n case Code128Reader.CODE_CODE_C:\n codeSet = Code128Reader.CODE_CODE_C;\n break;\n case Code128Reader.CODE_STOP:\n done = true;\n break;\n }\n }\n break;\n case Code128Reader.CODE_CODE_B:\n if (code < 96) {\n if (shiftUpperMode === upperMode) {\n result += String.fromCharCode((' '.charCodeAt(0) + code));\n }\n else {\n result += String.fromCharCode((' '.charCodeAt(0) + code + 128));\n }\n shiftUpperMode = false;\n }\n else {\n if (code !== Code128Reader.CODE_STOP) {\n lastCharacterWasPrintable = false;\n }\n switch (code) {\n case Code128Reader.CODE_FNC_1:\n if (convertFNC1) {\n if (result.length === 0) {\n // GS1 specification 5.4.3.7. and 5.4.6.4. If the first char after the start code\n // is FNC1 then this is GS1-128. We add the symbology identifier.\n result += ']C1';\n }\n else {\n // GS1 specification 5.4.7.5. Every subsequent FNC1 is returned as ASCII 29 (GS)\n result += String.fromCharCode(29);\n }\n }\n break;\n case Code128Reader.CODE_FNC_2:\n case Code128Reader.CODE_FNC_3:\n // do nothing?\n break;\n case Code128Reader.CODE_FNC_4_B:\n if (!upperMode && shiftUpperMode) {\n upperMode = true;\n shiftUpperMode = false;\n }\n else if (upperMode && shiftUpperMode) {\n upperMode = false;\n shiftUpperMode = false;\n }\n else {\n shiftUpperMode = true;\n }\n break;\n case Code128Reader.CODE_SHIFT:\n isNextShifted = true;\n codeSet = Code128Reader.CODE_CODE_A;\n break;\n case Code128Reader.CODE_CODE_A:\n codeSet = Code128Reader.CODE_CODE_A;\n break;\n case Code128Reader.CODE_CODE_C:\n codeSet = Code128Reader.CODE_CODE_C;\n break;\n case Code128Reader.CODE_STOP:\n done = true;\n break;\n }\n }\n break;\n case Code128Reader.CODE_CODE_C:\n if (code < 100) {\n if (code < 10) {\n result += '0';\n }\n result += code;\n }\n else {\n if (code !== Code128Reader.CODE_STOP) {\n lastCharacterWasPrintable = false;\n }\n switch (code) {\n case Code128Reader.CODE_FNC_1:\n if (convertFNC1) {\n if (result.length === 0) {\n // GS1 specification 5.4.3.7. and 5.4.6.4. If the first char after the start code\n // is FNC1 then this is GS1-128. We add the symbology identifier.\n result += ']C1';\n }\n else {\n // GS1 specification 5.4.7.5. Every subsequent FNC1 is returned as ASCII 29 (GS)\n result += String.fromCharCode(29);\n }\n }\n break;\n case Code128Reader.CODE_CODE_A:\n codeSet = Code128Reader.CODE_CODE_A;\n break;\n case Code128Reader.CODE_CODE_B:\n codeSet = Code128Reader.CODE_CODE_B;\n break;\n case Code128Reader.CODE_STOP:\n done = true;\n break;\n }\n }\n break;\n }\n // Unshift back to another code set if we were shifted\n if (unshift) {\n codeSet = codeSet === Code128Reader.CODE_CODE_A ? Code128Reader.CODE_CODE_B : Code128Reader.CODE_CODE_A;\n }\n }\n const lastPatternSize = nextStart - lastStart;\n // Check for ample whitespace following pattern, but, to do this we first need to remember that\n // we fudged decoding CODE_STOP since it actually has 7 bars, not 6. There is a black bar left\n // to read off. Would be slightly better to properly read. Here we just skip it:\n nextStart = row.getNextUnset(nextStart);\n if (!row.isRange(nextStart, Math.min(row.getSize(), nextStart + (nextStart - lastStart) / 2), false)) {\n throw new NotFoundException();\n }\n // Pull out from sum the value of the penultimate check code\n checksumTotal -= multiplier * lastCode;\n // lastCode is the checksum then:\n if (checksumTotal % 103 !== lastCode) {\n throw new ChecksumException();\n }\n // Need to pull out the check digits from string\n const resultLength = result.length;\n if (resultLength === 0) {\n // false positive\n throw new NotFoundException();\n }\n // Only bother if the result had at least one character, and if the checksum digit happened to\n // be a printable character. If it was just interpreted as a control code, nothing to remove.\n if (resultLength > 0 && lastCharacterWasPrintable) {\n if (codeSet === Code128Reader.CODE_CODE_C) {\n result = result.substring(0, resultLength - 2);\n }\n else {\n result = result.substring(0, resultLength - 1);\n }\n }\n const left = (startPatternInfo[1] + startPatternInfo[0]) / 2.0;\n const right = lastStart + lastPatternSize / 2.0;\n const rawCodesSize = rawCodes.length;\n const rawBytes = new Uint8Array(rawCodesSize);\n for (let i = 0; i < rawCodesSize; i++) {\n rawBytes[i] = rawCodes[i];\n }\n const points = [new ResultPoint(left, rowNumber), new ResultPoint(right, rowNumber)];\n return new Result(result, rawBytes, 0, points, BarcodeFormat$1.CODE_128, new Date().getTime());\n }\n }\n Code128Reader.CODE_PATTERNS = [\n Int32Array.from([2, 1, 2, 2, 2, 2]),\n Int32Array.from([2, 2, 2, 1, 2, 2]),\n Int32Array.from([2, 2, 2, 2, 2, 1]),\n Int32Array.from([1, 2, 1, 2, 2, 3]),\n Int32Array.from([1, 2, 1, 3, 2, 2]),\n Int32Array.from([1, 3, 1, 2, 2, 2]),\n Int32Array.from([1, 2, 2, 2, 1, 3]),\n Int32Array.from([1, 2, 2, 3, 1, 2]),\n Int32Array.from([1, 3, 2, 2, 1, 2]),\n Int32Array.from([2, 2, 1, 2, 1, 3]),\n Int32Array.from([2, 2, 1, 3, 1, 2]),\n Int32Array.from([2, 3, 1, 2, 1, 2]),\n Int32Array.from([1, 1, 2, 2, 3, 2]),\n Int32Array.from([1, 2, 2, 1, 3, 2]),\n Int32Array.from([1, 2, 2, 2, 3, 1]),\n Int32Array.from([1, 1, 3, 2, 2, 2]),\n Int32Array.from([1, 2, 3, 1, 2, 2]),\n Int32Array.from([1, 2, 3, 2, 2, 1]),\n Int32Array.from([2, 2, 3, 2, 1, 1]),\n Int32Array.from([2, 2, 1, 1, 3, 2]),\n Int32Array.from([2, 2, 1, 2, 3, 1]),\n Int32Array.from([2, 1, 3, 2, 1, 2]),\n Int32Array.from([2, 2, 3, 1, 1, 2]),\n Int32Array.from([3, 1, 2, 1, 3, 1]),\n Int32Array.from([3, 1, 1, 2, 2, 2]),\n Int32Array.from([3, 2, 1, 1, 2, 2]),\n Int32Array.from([3, 2, 1, 2, 2, 1]),\n Int32Array.from([3, 1, 2, 2, 1, 2]),\n Int32Array.from([3, 2, 2, 1, 1, 2]),\n Int32Array.from([3, 2, 2, 2, 1, 1]),\n Int32Array.from([2, 1, 2, 1, 2, 3]),\n Int32Array.from([2, 1, 2, 3, 2, 1]),\n Int32Array.from([2, 3, 2, 1, 2, 1]),\n Int32Array.from([1, 1, 1, 3, 2, 3]),\n Int32Array.from([1, 3, 1, 1, 2, 3]),\n Int32Array.from([1, 3, 1, 3, 2, 1]),\n Int32Array.from([1, 1, 2, 3, 1, 3]),\n Int32Array.from([1, 3, 2, 1, 1, 3]),\n Int32Array.from([1, 3, 2, 3, 1, 1]),\n Int32Array.from([2, 1, 1, 3, 1, 3]),\n Int32Array.from([2, 3, 1, 1, 1, 3]),\n Int32Array.from([2, 3, 1, 3, 1, 1]),\n Int32Array.from([1, 1, 2, 1, 3, 3]),\n Int32Array.from([1, 1, 2, 3, 3, 1]),\n Int32Array.from([1, 3, 2, 1, 3, 1]),\n Int32Array.from([1, 1, 3, 1, 2, 3]),\n Int32Array.from([1, 1, 3, 3, 2, 1]),\n Int32Array.from([1, 3, 3, 1, 2, 1]),\n Int32Array.from([3, 1, 3, 1, 2, 1]),\n Int32Array.from([2, 1, 1, 3, 3, 1]),\n Int32Array.from([2, 3, 1, 1, 3, 1]),\n Int32Array.from([2, 1, 3, 1, 1, 3]),\n Int32Array.from([2, 1, 3, 3, 1, 1]),\n Int32Array.from([2, 1, 3, 1, 3, 1]),\n Int32Array.from([3, 1, 1, 1, 2, 3]),\n Int32Array.from([3, 1, 1, 3, 2, 1]),\n Int32Array.from([3, 3, 1, 1, 2, 1]),\n Int32Array.from([3, 1, 2, 1, 1, 3]),\n Int32Array.from([3, 1, 2, 3, 1, 1]),\n Int32Array.from([3, 3, 2, 1, 1, 1]),\n Int32Array.from([3, 1, 4, 1, 1, 1]),\n Int32Array.from([2, 2, 1, 4, 1, 1]),\n Int32Array.from([4, 3, 1, 1, 1, 1]),\n Int32Array.from([1, 1, 1, 2, 2, 4]),\n Int32Array.from([1, 1, 1, 4, 2, 2]),\n Int32Array.from([1, 2, 1, 1, 2, 4]),\n Int32Array.from([1, 2, 1, 4, 2, 1]),\n Int32Array.from([1, 4, 1, 1, 2, 2]),\n Int32Array.from([1, 4, 1, 2, 2, 1]),\n Int32Array.from([1, 1, 2, 2, 1, 4]),\n Int32Array.from([1, 1, 2, 4, 1, 2]),\n Int32Array.from([1, 2, 2, 1, 1, 4]),\n Int32Array.from([1, 2, 2, 4, 1, 1]),\n Int32Array.from([1, 4, 2, 1, 1, 2]),\n Int32Array.from([1, 4, 2, 2, 1, 1]),\n Int32Array.from([2, 4, 1, 2, 1, 1]),\n Int32Array.from([2, 2, 1, 1, 1, 4]),\n Int32Array.from([4, 1, 3, 1, 1, 1]),\n Int32Array.from([2, 4, 1, 1, 1, 2]),\n Int32Array.from([1, 3, 4, 1, 1, 1]),\n Int32Array.from([1, 1, 1, 2, 4, 2]),\n Int32Array.from([1, 2, 1, 1, 4, 2]),\n Int32Array.from([1, 2, 1, 2, 4, 1]),\n Int32Array.from([1, 1, 4, 2, 1, 2]),\n Int32Array.from([1, 2, 4, 1, 1, 2]),\n Int32Array.from([1, 2, 4, 2, 1, 1]),\n Int32Array.from([4, 1, 1, 2, 1, 2]),\n Int32Array.from([4, 2, 1, 1, 1, 2]),\n Int32Array.from([4, 2, 1, 2, 1, 1]),\n Int32Array.from([2, 1, 2, 1, 4, 1]),\n Int32Array.from([2, 1, 4, 1, 2, 1]),\n Int32Array.from([4, 1, 2, 1, 2, 1]),\n Int32Array.from([1, 1, 1, 1, 4, 3]),\n Int32Array.from([1, 1, 1, 3, 4, 1]),\n Int32Array.from([1, 3, 1, 1, 4, 1]),\n Int32Array.from([1, 1, 4, 1, 1, 3]),\n Int32Array.from([1, 1, 4, 3, 1, 1]),\n Int32Array.from([4, 1, 1, 1, 1, 3]),\n Int32Array.from([4, 1, 1, 3, 1, 1]),\n Int32Array.from([1, 1, 3, 1, 4, 1]),\n Int32Array.from([1, 1, 4, 1, 3, 1]),\n Int32Array.from([3, 1, 1, 1, 4, 1]),\n Int32Array.from([4, 1, 1, 1, 3, 1]),\n Int32Array.from([2, 1, 1, 4, 1, 2]),\n Int32Array.from([2, 1, 1, 2, 1, 4]),\n Int32Array.from([2, 1, 1, 2, 3, 2]),\n Int32Array.from([2, 3, 3, 1, 1, 1, 2]),\n ];\n Code128Reader.MAX_AVG_VARIANCE = 0.25;\n Code128Reader.MAX_INDIVIDUAL_VARIANCE = 0.7;\n Code128Reader.CODE_SHIFT = 98;\n Code128Reader.CODE_CODE_C = 99;\n Code128Reader.CODE_CODE_B = 100;\n Code128Reader.CODE_CODE_A = 101;\n Code128Reader.CODE_FNC_1 = 102;\n Code128Reader.CODE_FNC_2 = 97;\n Code128Reader.CODE_FNC_3 = 96;\n Code128Reader.CODE_FNC_4_A = 101;\n Code128Reader.CODE_FNC_4_B = 100;\n Code128Reader.CODE_START_A = 103;\n Code128Reader.CODE_START_B = 104;\n Code128Reader.CODE_START_C = 105;\n Code128Reader.CODE_STOP = 106;\n\n /**\n *

Decodes Code 39 barcodes. Supports \"Full ASCII Code 39\" if USE_CODE_39_EXTENDED_MODE is set.

\n *\n * @author Sean Owen\n * @see Code93Reader\n */\n class Code39Reader extends OneDReader {\n /**\n * Creates a reader that assumes all encoded data is data, and does not treat the final\n * character as a check digit. It will not decoded \"extended Code 39\" sequences.\n */\n // public Code39Reader() {\n // this(false);\n // }\n /**\n * Creates a reader that can be configured to check the last character as a check digit.\n * It will not decoded \"extended Code 39\" sequences.\n *\n * @param usingCheckDigit if true, treat the last data character as a check digit, not\n * data, and verify that the checksum passes.\n */\n // public Code39Reader(boolean usingCheckDigit) {\n // this(usingCheckDigit, false);\n // }\n /**\n * Creates a reader that can be configured to check the last character as a check digit,\n * or optionally attempt to decode \"extended Code 39\" sequences that are used to encode\n * the full ASCII character set.\n *\n * @param usingCheckDigit if true, treat the last data character as a check digit, not\n * data, and verify that the checksum passes.\n * @param extendedMode if true, will attempt to decode extended Code 39 sequences in the\n * text.\n */\n constructor(usingCheckDigit = false, extendedMode = false) {\n super();\n this.usingCheckDigit = usingCheckDigit;\n this.extendedMode = extendedMode;\n this.decodeRowResult = '';\n this.counters = new Int32Array(9);\n }\n decodeRow(rowNumber, row, hints) {\n let theCounters = this.counters;\n theCounters.fill(0);\n this.decodeRowResult = '';\n let start = Code39Reader.findAsteriskPattern(row, theCounters);\n // Read off white space\n let nextStart = row.getNextSet(start[1]);\n let end = row.getSize();\n let decodedChar;\n let lastStart;\n do {\n Code39Reader.recordPattern(row, nextStart, theCounters);\n let pattern = Code39Reader.toNarrowWidePattern(theCounters);\n if (pattern < 0) {\n throw new NotFoundException();\n }\n decodedChar = Code39Reader.patternToChar(pattern);\n this.decodeRowResult += decodedChar;\n lastStart = nextStart;\n for (let counter of theCounters) {\n nextStart += counter;\n }\n // Read off white space\n nextStart = row.getNextSet(nextStart);\n } while (decodedChar !== '*');\n this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1); // remove asterisk\n // Look for whitespace after pattern:\n let lastPatternSize = 0;\n for (let counter of theCounters) {\n lastPatternSize += counter;\n }\n let whiteSpaceAfterEnd = nextStart - lastStart - lastPatternSize;\n // If 50% of last pattern size, following last pattern, is not whitespace, fail\n // (but if it's whitespace to the very end of the image, that's OK)\n if (nextStart !== end && (whiteSpaceAfterEnd * 2) < lastPatternSize) {\n throw new NotFoundException();\n }\n if (this.usingCheckDigit) {\n let max = this.decodeRowResult.length - 1;\n let total = 0;\n for (let i = 0; i < max; i++) {\n total += Code39Reader.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(i));\n }\n if (this.decodeRowResult.charAt(max) !== Code39Reader.ALPHABET_STRING.charAt(total % 43)) {\n throw new ChecksumException();\n }\n this.decodeRowResult = this.decodeRowResult.substring(0, max);\n }\n if (this.decodeRowResult.length === 0) {\n // false positive\n throw new NotFoundException();\n }\n let resultString;\n if (this.extendedMode) {\n resultString = Code39Reader.decodeExtended(this.decodeRowResult);\n }\n else {\n resultString = this.decodeRowResult;\n }\n let left = (start[1] + start[0]) / 2.0;\n let right = lastStart + lastPatternSize / 2.0;\n return new Result(resultString, null, 0, [new ResultPoint(left, rowNumber), new ResultPoint(right, rowNumber)], BarcodeFormat$1.CODE_39, new Date().getTime());\n }\n static findAsteriskPattern(row, counters) {\n let width = row.getSize();\n let rowOffset = row.getNextSet(0);\n let counterPosition = 0;\n let patternStart = rowOffset;\n let isWhite = false;\n let patternLength = counters.length;\n for (let i = rowOffset; i < width; i++) {\n if (row.get(i) !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition === patternLength - 1) {\n // Look for whitespace before start pattern, >= 50% of width of start pattern\n if (this.toNarrowWidePattern(counters) === Code39Reader.ASTERISK_ENCODING &&\n row.isRange(Math.max(0, patternStart - Math.floor((i - patternStart) / 2)), patternStart, false)) {\n return [patternStart, i];\n }\n patternStart += counters[0] + counters[1];\n counters.copyWithin(0, 2, 2 + counterPosition - 1);\n counters[counterPosition - 1] = 0;\n counters[counterPosition] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n throw new NotFoundException();\n }\n // For efficiency, returns -1 on failure. Not throwing here saved as many as 700 exceptions\n // per image when using some of our blackbox images.\n static toNarrowWidePattern(counters) {\n let numCounters = counters.length;\n let maxNarrowCounter = 0;\n let wideCounters;\n do {\n let minCounter = 0x7fffffff;\n for (let counter of counters) {\n if (counter < minCounter && counter > maxNarrowCounter) {\n minCounter = counter;\n }\n }\n maxNarrowCounter = minCounter;\n wideCounters = 0;\n let totalWideCountersWidth = 0;\n let pattern = 0;\n for (let i = 0; i < numCounters; i++) {\n let counter = counters[i];\n if (counter > maxNarrowCounter) {\n pattern |= 1 << (numCounters - 1 - i);\n wideCounters++;\n totalWideCountersWidth += counter;\n }\n }\n if (wideCounters === 3) {\n // Found 3 wide counters, but are they close enough in width?\n // We can perform a cheap, conservative check to see if any individual\n // counter is more than 1.5 times the average:\n for (let i = 0; i < numCounters && wideCounters > 0; i++) {\n let counter = counters[i];\n if (counter > maxNarrowCounter) {\n wideCounters--;\n // totalWideCountersWidth = 3 * average, so this checks if counter >= 3/2 * average\n if ((counter * 2) >= totalWideCountersWidth) {\n return -1;\n }\n }\n }\n return pattern;\n }\n } while (wideCounters > 3);\n return -1;\n }\n static patternToChar(pattern) {\n for (let i = 0; i < Code39Reader.CHARACTER_ENCODINGS.length; i++) {\n if (Code39Reader.CHARACTER_ENCODINGS[i] === pattern) {\n return Code39Reader.ALPHABET_STRING.charAt(i);\n }\n }\n if (pattern === Code39Reader.ASTERISK_ENCODING) {\n return '*';\n }\n throw new NotFoundException();\n }\n static decodeExtended(encoded) {\n let length = encoded.length;\n let decoded = '';\n for (let i = 0; i < length; i++) {\n let c = encoded.charAt(i);\n if (c === '+' || c === '$' || c === '%' || c === '/') {\n let next = encoded.charAt(i + 1);\n let decodedChar = '\\0';\n switch (c) {\n case '+':\n // +A to +Z map to a to z\n if (next >= 'A' && next <= 'Z') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) + 32);\n }\n else {\n throw new FormatException();\n }\n break;\n case '$':\n // $A to $Z map to control codes SH to SB\n if (next >= 'A' && next <= 'Z') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) - 64);\n }\n else {\n throw new FormatException();\n }\n break;\n case '%':\n // %A to %E map to control codes ESC to US\n if (next >= 'A' && next <= 'E') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) - 38);\n }\n else if (next >= 'F' && next <= 'J') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) - 11);\n }\n else if (next >= 'K' && next <= 'O') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) + 16);\n }\n else if (next >= 'P' && next <= 'T') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) + 43);\n }\n else if (next === 'U') {\n decodedChar = '\\0';\n }\n else if (next === 'V') {\n decodedChar = '@';\n }\n else if (next === 'W') {\n decodedChar = '`';\n }\n else if (next === 'X' || next === 'Y' || next === 'Z') {\n decodedChar = '\\x7f';\n }\n else {\n throw new FormatException();\n }\n break;\n case '/':\n // /A to /O map to ! to , and /Z maps to :\n if (next >= 'A' && next <= 'O') {\n decodedChar = String.fromCharCode(next.charCodeAt(0) - 32);\n }\n else if (next === 'Z') {\n decodedChar = ':';\n }\n else {\n throw new FormatException();\n }\n break;\n }\n decoded += decodedChar;\n // bump up i again since we read two characters\n i++;\n }\n else {\n decoded += c;\n }\n }\n return decoded;\n }\n }\n Code39Reader.ALPHABET_STRING = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%';\n /**\n * These represent the encodings of characters, as patterns of wide and narrow bars.\n * The 9 least-significant bits of each int correspond to the pattern of wide and narrow,\n * with 1s representing \"wide\" and 0s representing narrow.\n */\n Code39Reader.CHARACTER_ENCODINGS = [\n 0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064,\n 0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C,\n 0x103, 0x043, 0x142, 0x013, 0x112, 0x052, 0x007, 0x106, 0x046, 0x016,\n 0x181, 0x0C1, 0x1C0, 0x091, 0x190, 0x0D0, 0x085, 0x184, 0x0C4, 0x0A8,\n 0x0A2, 0x08A, 0x02A // /-%\n ];\n Code39Reader.ASTERISK_ENCODING = 0x094;\n\n /**\n *

Decodes ITF barcodes.

\n *\n * @author Tjieco\n */\n class ITFReader extends OneDReader {\n constructor() {\n // private static W = 3; // Pixel width of a 3x wide line\n // private static w = 2; // Pixel width of a 2x wide line\n // private static N = 1; // Pixed width of a narrow line\n super(...arguments);\n // Stores the actual narrow line width of the image being decoded.\n this.narrowLineWidth = -1;\n }\n // See ITFWriter.PATTERNS\n /*\n \n /!**\n * Patterns of Wide / Narrow lines to indicate each digit\n *!/\n */\n decodeRow(rowNumber, row, hints) {\n // Find out where the Middle section (payload) starts & ends\n let startRange = this.decodeStart(row);\n let endRange = this.decodeEnd(row);\n let result = new StringBuilder();\n ITFReader.decodeMiddle(row, startRange[1], endRange[0], result);\n let resultString = result.toString();\n let allowedLengths = null;\n if (hints != null) {\n allowedLengths = hints.get(DecodeHintType$1.ALLOWED_LENGTHS);\n }\n if (allowedLengths == null) {\n allowedLengths = ITFReader.DEFAULT_ALLOWED_LENGTHS;\n }\n // To avoid false positives with 2D barcodes (and other patterns), make\n // an assumption that the decoded string must be a 'standard' length if it's short\n let length = resultString.length;\n let lengthOK = false;\n let maxAllowedLength = 0;\n for (let value of allowedLengths) {\n if (length === value) {\n lengthOK = true;\n break;\n }\n if (value > maxAllowedLength) {\n maxAllowedLength = value;\n }\n }\n if (!lengthOK && length > maxAllowedLength) {\n lengthOK = true;\n }\n if (!lengthOK) {\n throw new FormatException();\n }\n const points = [new ResultPoint(startRange[1], rowNumber), new ResultPoint(endRange[0], rowNumber)];\n let resultReturn = new Result(resultString, null, // no natural byte representation for these barcodes\n 0, points, BarcodeFormat$1.ITF, new Date().getTime());\n return resultReturn;\n }\n /*\n /!**\n * @param row row of black/white values to search\n * @param payloadStart offset of start pattern\n * @param resultString {@link StringBuilder} to append decoded chars to\n * @throws NotFoundException if decoding could not complete successfully\n *!/*/\n static decodeMiddle(row, payloadStart, payloadEnd, resultString) {\n // Digits are interleaved in pairs - 5 black lines for one digit, and the\n // 5\n // interleaved white lines for the second digit.\n // Therefore, need to scan 10 lines and then\n // split these into two arrays\n let counterDigitPair = new Int32Array(10); // 10\n let counterBlack = new Int32Array(5); // 5\n let counterWhite = new Int32Array(5); // 5\n counterDigitPair.fill(0);\n counterBlack.fill(0);\n counterWhite.fill(0);\n while (payloadStart < payloadEnd) {\n // Get 10 runs of black/white.\n OneDReader.recordPattern(row, payloadStart, counterDigitPair);\n // Split them into each array\n for (let k = 0; k < 5; k++) {\n let twoK = 2 * k;\n counterBlack[k] = counterDigitPair[twoK];\n counterWhite[k] = counterDigitPair[twoK + 1];\n }\n let bestMatch = ITFReader.decodeDigit(counterBlack);\n resultString.append(bestMatch.toString());\n bestMatch = this.decodeDigit(counterWhite);\n resultString.append(bestMatch.toString());\n counterDigitPair.forEach(function (counterDigit) {\n payloadStart += counterDigit;\n });\n }\n }\n /*/!**\n * Identify where the start of the middle / payload section starts.\n *\n * @param row row of black/white values to search\n * @return Array, containing index of start of 'start block' and end of\n * 'start block'\n *!/*/\n decodeStart(row) {\n let endStart = ITFReader.skipWhiteSpace(row);\n let startPattern = ITFReader.findGuardPattern(row, endStart, ITFReader.START_PATTERN);\n // Determine the width of a narrow line in pixels. We can do this by\n // getting the width of the start pattern and dividing by 4 because its\n // made up of 4 narrow lines.\n this.narrowLineWidth = (startPattern[1] - startPattern[0]) / 4;\n this.validateQuietZone(row, startPattern[0]);\n return startPattern;\n }\n /*/!**\n * The start & end patterns must be pre/post fixed by a quiet zone. This\n * zone must be at least 10 times the width of a narrow line. Scan back until\n * we either get to the start of the barcode or match the necessary number of\n * quiet zone pixels.\n *\n * Note: Its assumed the row is reversed when using this method to find\n * quiet zone after the end pattern.\n *\n * ref: http://www.barcode-1.net/i25code.html\n *\n * @param row bit array representing the scanned barcode.\n * @param startPattern index into row of the start or end pattern.\n * @throws NotFoundException if the quiet zone cannot be found\n *!/*/\n validateQuietZone(row, startPattern) {\n let quietCount = this.narrowLineWidth * 10; // expect to find this many pixels of quiet zone\n // if there are not so many pixel at all let's try as many as possible\n quietCount = quietCount < startPattern ? quietCount : startPattern;\n for (let i = startPattern - 1; quietCount > 0 && i >= 0; i--) {\n if (row.get(i)) {\n break;\n }\n quietCount--;\n }\n if (quietCount !== 0) {\n // Unable to find the necessary number of quiet zone pixels.\n throw new NotFoundException();\n }\n }\n /*\n /!**\n * Skip all whitespace until we get to the first black line.\n *\n * @param row row of black/white values to search\n * @return index of the first black line.\n * @throws NotFoundException Throws exception if no black lines are found in the row\n *!/*/\n static skipWhiteSpace(row) {\n const width = row.getSize();\n const endStart = row.getNextSet(0);\n if (endStart === width) {\n throw new NotFoundException();\n }\n return endStart;\n }\n /*/!**\n * Identify where the end of the middle / payload section ends.\n *\n * @param row row of black/white values to search\n * @return Array, containing index of start of 'end block' and end of 'end\n * block'\n *!/*/\n decodeEnd(row) {\n // For convenience, reverse the row and then\n // search from 'the start' for the end block\n row.reverse();\n try {\n let endStart = ITFReader.skipWhiteSpace(row);\n let endPattern;\n try {\n endPattern = ITFReader.findGuardPattern(row, endStart, ITFReader.END_PATTERN_REVERSED[0]);\n }\n catch (error) {\n if (error instanceof NotFoundException) {\n endPattern = ITFReader.findGuardPattern(row, endStart, ITFReader.END_PATTERN_REVERSED[1]);\n }\n }\n // The start & end patterns must be pre/post fixed by a quiet zone. This\n // zone must be at least 10 times the width of a narrow line.\n // ref: http://www.barcode-1.net/i25code.html\n this.validateQuietZone(row, endPattern[0]);\n // Now recalculate the indices of where the 'endblock' starts & stops to\n // accommodate\n // the reversed nature of the search\n let temp = endPattern[0];\n endPattern[0] = row.getSize() - endPattern[1];\n endPattern[1] = row.getSize() - temp;\n return endPattern;\n }\n finally {\n // Put the row back the right way.\n row.reverse();\n }\n }\n /*\n /!**\n * @param row row of black/white values to search\n * @param rowOffset position to start search\n * @param pattern pattern of counts of number of black and white pixels that are\n * being searched for as a pattern\n * @return start/end horizontal offset of guard pattern, as an array of two\n * ints\n * @throws NotFoundException if pattern is not found\n *!/*/\n static findGuardPattern(row, rowOffset, pattern) {\n let patternLength = pattern.length;\n let counters = new Int32Array(patternLength);\n let width = row.getSize();\n let isWhite = false;\n let counterPosition = 0;\n let patternStart = rowOffset;\n counters.fill(0);\n for (let x = rowOffset; x < width; x++) {\n if (row.get(x) !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition === patternLength - 1) {\n if (OneDReader.patternMatchVariance(counters, pattern, ITFReader.MAX_INDIVIDUAL_VARIANCE) < ITFReader.MAX_AVG_VARIANCE) {\n return [patternStart, x];\n }\n patternStart += counters[0] + counters[1];\n System.arraycopy(counters, 2, counters, 0, counterPosition - 1);\n counters[counterPosition - 1] = 0;\n counters[counterPosition] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n throw new NotFoundException();\n }\n /*/!**\n * Attempts to decode a sequence of ITF black/white lines into single\n * digit.\n *\n * @param counters the counts of runs of observed black/white/black/... values\n * @return The decoded digit\n * @throws NotFoundException if digit cannot be decoded\n *!/*/\n static decodeDigit(counters) {\n let bestVariance = ITFReader.MAX_AVG_VARIANCE; // worst variance we'll accept\n let bestMatch = -1;\n let max = ITFReader.PATTERNS.length;\n for (let i = 0; i < max; i++) {\n let pattern = ITFReader.PATTERNS[i];\n let variance = OneDReader.patternMatchVariance(counters, pattern, ITFReader.MAX_INDIVIDUAL_VARIANCE);\n if (variance < bestVariance) {\n bestVariance = variance;\n bestMatch = i;\n }\n else if (variance === bestVariance) {\n // if we find a second 'best match' with the same variance, we can not reliably report to have a suitable match\n bestMatch = -1;\n }\n }\n if (bestMatch >= 0) {\n return bestMatch % 10;\n }\n else {\n throw new NotFoundException();\n }\n }\n }\n ITFReader.PATTERNS = [\n Int32Array.from([1, 1, 2, 2, 1]),\n Int32Array.from([2, 1, 1, 1, 2]),\n Int32Array.from([1, 2, 1, 1, 2]),\n Int32Array.from([2, 2, 1, 1, 1]),\n Int32Array.from([1, 1, 2, 1, 2]),\n Int32Array.from([2, 1, 2, 1, 1]),\n Int32Array.from([1, 2, 2, 1, 1]),\n Int32Array.from([1, 1, 1, 2, 2]),\n Int32Array.from([2, 1, 1, 2, 1]),\n Int32Array.from([1, 2, 1, 2, 1]),\n Int32Array.from([1, 1, 3, 3, 1]),\n Int32Array.from([3, 1, 1, 1, 3]),\n Int32Array.from([1, 3, 1, 1, 3]),\n Int32Array.from([3, 3, 1, 1, 1]),\n Int32Array.from([1, 1, 3, 1, 3]),\n Int32Array.from([3, 1, 3, 1, 1]),\n Int32Array.from([1, 3, 3, 1, 1]),\n Int32Array.from([1, 1, 1, 3, 3]),\n Int32Array.from([3, 1, 1, 3, 1]),\n Int32Array.from([1, 3, 1, 3, 1]) // 9\n ];\n ITFReader.MAX_AVG_VARIANCE = 0.38;\n ITFReader.MAX_INDIVIDUAL_VARIANCE = 0.5;\n /* /!** Valid ITF lengths. Anything longer than the largest value is also allowed. *!/*/\n ITFReader.DEFAULT_ALLOWED_LENGTHS = [6, 8, 10, 12, 14];\n /*/!**\n * Start/end guard pattern.\n *\n * Note: The end pattern is reversed because the row is reversed before\n * searching for the END_PATTERN\n *!/*/\n ITFReader.START_PATTERN = Int32Array.from([1, 1, 1, 1]);\n ITFReader.END_PATTERN_REVERSED = [\n Int32Array.from([1, 1, 2]),\n Int32Array.from([1, 1, 3]) // 3x\n ];\n\n /**\n *

Encapsulates functionality and implementation that is common to UPC and EAN families\n * of one-dimensional barcodes.

\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Sean Owen\n * @author alasdair@google.com (Alasdair Mackintosh)\n */\n class AbstractUPCEANReader extends OneDReader {\n constructor() {\n super(...arguments);\n this.decodeRowStringBuffer = '';\n }\n\n static findStartGuardPattern(row) {\n let foundStart = false;\n let startRange;\n let nextStart = 0;\n let counters = Int32Array.from([0, 0, 0]);\n while (!foundStart) {\n counters = Int32Array.from([0, 0, 0]);\n startRange = AbstractUPCEANReader.findGuardPattern(row, nextStart, false, this.START_END_PATTERN, counters);\n let start = startRange[0];\n nextStart = startRange[1];\n let quietStart = start - (nextStart - start);\n if (quietStart >= 0) {\n foundStart = row.isRange(quietStart, start, false);\n }\n }\n return startRange;\n }\n static checkChecksum(s) {\n return AbstractUPCEANReader.checkStandardUPCEANChecksum(s);\n }\n static checkStandardUPCEANChecksum(s) {\n let length = s.length;\n if (length === 0)\n return false;\n let check = parseInt(s.charAt(length - 1), 10);\n return AbstractUPCEANReader.getStandardUPCEANChecksum(s.substring(0, length - 1)) === check;\n }\n static getStandardUPCEANChecksum(s) {\n let length = s.length;\n let sum = 0;\n for (let i = length - 1; i >= 0; i -= 2) {\n let digit = s.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n if (digit < 0 || digit > 9) {\n throw new FormatException();\n }\n sum += digit;\n }\n sum *= 3;\n for (let i = length - 2; i >= 0; i -= 2) {\n let digit = s.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n if (digit < 0 || digit > 9) {\n throw new FormatException();\n }\n sum += digit;\n }\n return (1000 - sum) % 10;\n }\n static decodeEnd(row, endStart) {\n return AbstractUPCEANReader.findGuardPattern(row, endStart, false, AbstractUPCEANReader.START_END_PATTERN, new Int32Array(AbstractUPCEANReader.START_END_PATTERN.length).fill(0));\n }\n /**\n * @throws NotFoundException\n */\n static findGuardPatternWithoutCounters(row, rowOffset, whiteFirst, pattern) {\n return this.findGuardPattern(row, rowOffset, whiteFirst, pattern, new Int32Array(pattern.length));\n }\n /**\n * @param row row of black/white values to search\n * @param rowOffset position to start search\n * @param whiteFirst if true, indicates that the pattern specifies white/black/white/...\n * pixel counts, otherwise, it is interpreted as black/white/black/...\n * @param pattern pattern of counts of number of black and white pixels that are being\n * searched for as a pattern\n * @param counters array of counters, as long as pattern, to re-use\n * @return start/end horizontal offset of guard pattern, as an array of two ints\n * @throws NotFoundException if pattern is not found\n */\n static findGuardPattern(row, rowOffset, whiteFirst, pattern, counters) {\n let width = row.getSize();\n rowOffset = whiteFirst ? row.getNextUnset(rowOffset) : row.getNextSet(rowOffset);\n let counterPosition = 0;\n let patternStart = rowOffset;\n let patternLength = pattern.length;\n let isWhite = whiteFirst;\n for (let x = rowOffset; x < width; x++) {\n if (row.get(x) !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition === patternLength - 1) {\n if (OneDReader.patternMatchVariance(counters, pattern, AbstractUPCEANReader.MAX_INDIVIDUAL_VARIANCE) < AbstractUPCEANReader.MAX_AVG_VARIANCE) {\n return Int32Array.from([patternStart, x]);\n }\n patternStart += counters[0] + counters[1];\n let slice = counters.slice(2, counters.length - 1);\n for (let i = 0; i < counterPosition - 1; i++) {\n counters[i] = slice[i];\n }\n counters[counterPosition - 1] = 0;\n counters[counterPosition] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n throw new NotFoundException();\n }\n static decodeDigit(row, counters, rowOffset, patterns) {\n this.recordPattern(row, rowOffset, counters);\n let bestVariance = this.MAX_AVG_VARIANCE;\n let bestMatch = -1;\n let max = patterns.length;\n for (let i = 0; i < max; i++) {\n let pattern = patterns[i];\n let variance = OneDReader.patternMatchVariance(counters, pattern, AbstractUPCEANReader.MAX_INDIVIDUAL_VARIANCE);\n if (variance < bestVariance) {\n bestVariance = variance;\n bestMatch = i;\n }\n }\n if (bestMatch >= 0) {\n return bestMatch;\n }\n else {\n throw new NotFoundException();\n }\n }\n }\n // These two values are critical for determining how permissive the decoding will be.\n // We've arrived at these values through a lot of trial and error. Setting them any higher\n // lets false positives creep in quickly.\n AbstractUPCEANReader.MAX_AVG_VARIANCE = 0.48;\n AbstractUPCEANReader.MAX_INDIVIDUAL_VARIANCE = 0.7;\n /**\n * Start/end guard pattern.\n */\n AbstractUPCEANReader.START_END_PATTERN = Int32Array.from([1, 1, 1]);\n /**\n * Pattern marking the middle of a UPC/EAN pattern, separating the two halves.\n */\n AbstractUPCEANReader.MIDDLE_PATTERN = Int32Array.from([1, 1, 1, 1, 1]);\n /**\n * end guard pattern.\n */\n AbstractUPCEANReader.END_PATTERN = Int32Array.from([1, 1, 1, 1, 1, 1]);\n /**\n * \"Odd\", or \"L\" patterns used to encode UPC/EAN digits.\n */\n AbstractUPCEANReader.L_PATTERNS = [\n Int32Array.from([3, 2, 1, 1]),\n Int32Array.from([2, 2, 2, 1]),\n Int32Array.from([2, 1, 2, 2]),\n Int32Array.from([1, 4, 1, 1]),\n Int32Array.from([1, 1, 3, 2]),\n Int32Array.from([1, 2, 3, 1]),\n Int32Array.from([1, 1, 1, 4]),\n Int32Array.from([1, 3, 1, 2]),\n Int32Array.from([1, 2, 1, 3]),\n Int32Array.from([3, 1, 1, 2]),\n ];\n\n /**\n * @see UPCEANExtension2Support\n */\n class UPCEANExtension5Support {\n constructor() {\n this.CHECK_DIGIT_ENCODINGS = [0x18, 0x14, 0x12, 0x11, 0x0C, 0x06, 0x03, 0x0A, 0x09, 0x05];\n this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]);\n this.decodeRowStringBuffer = '';\n }\n decodeRow(rowNumber, row, extensionStartRange) {\n let result = this.decodeRowStringBuffer;\n let end = this.decodeMiddle(row, extensionStartRange, result);\n let resultString = result.toString();\n let extensionData = UPCEANExtension5Support.parseExtensionString(resultString);\n let resultPoints = [\n new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0, rowNumber),\n new ResultPoint(end, rowNumber)\n ];\n let extensionResult = new Result(resultString, null, 0, resultPoints, BarcodeFormat$1.UPC_EAN_EXTENSION, new Date().getTime());\n if (extensionData != null) {\n extensionResult.putAllMetadata(extensionData);\n }\n return extensionResult;\n }\n decodeMiddle(row, startRange, resultString) {\n let counters = this.decodeMiddleCounters;\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n let end = row.getSize();\n let rowOffset = startRange[1];\n let lgPatternFound = 0;\n for (let x = 0; x < 5 && rowOffset < end; x++) {\n let bestMatch = AbstractUPCEANReader.decodeDigit(\n row,\n counters,\n rowOffset,\n AbstractUPCEANReader.L_AND_G_PATTERNS);\n resultString += String.fromCharCode(('0'.charCodeAt(0) + bestMatch % 10));\n for (let counter of counters) {\n rowOffset += counter;\n }\n if (bestMatch >= 10) {\n lgPatternFound |= 1 << (4 - x);\n }\n if (x !== 4) {\n // Read off separator if not last\n rowOffset = row.getNextSet(rowOffset);\n rowOffset = row.getNextUnset(rowOffset);\n }\n }\n if (resultString.length !== 5) {\n throw new NotFoundException();\n }\n let checkDigit = this.determineCheckDigit(lgPatternFound);\n if (UPCEANExtension5Support.extensionChecksum(resultString.toString()) !== checkDigit) {\n throw new NotFoundException();\n }\n return rowOffset;\n }\n static extensionChecksum(s) {\n let length = s.length;\n let sum = 0;\n for (let i = length - 2; i >= 0; i -= 2) {\n sum += s.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n }\n sum *= 3;\n for (let i = length - 1; i >= 0; i -= 2) {\n sum += s.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n }\n sum *= 3;\n return sum % 10;\n }\n determineCheckDigit(lgPatternFound) {\n for (let d = 0; d < 10; d++) {\n if (lgPatternFound === this.CHECK_DIGIT_ENCODINGS[d]) {\n return d;\n }\n }\n throw new NotFoundException();\n }\n static parseExtensionString(raw) {\n if (raw.length !== 5) {\n return null;\n }\n let value = UPCEANExtension5Support.parseExtension5String(raw);\n if (value == null) {\n return null;\n }\n return new Map([[ResultMetadataType$1.SUGGESTED_PRICE, value]]);\n }\n static parseExtension5String(raw) {\n let currency;\n switch (raw.charAt(0)) {\n case '0':\n currency = '£';\n break;\n case '5':\n currency = '$';\n break;\n case '9':\n // Reference: http://www.jollytech.com\n switch (raw) {\n case '90000':\n // No suggested retail price\n return null;\n case '99991':\n // Complementary\n return '0.00';\n case '99990':\n return 'Used';\n }\n // Otherwise... unknown currency?\n currency = '';\n break;\n default:\n currency = '';\n break;\n }\n let rawAmount = parseInt(raw.substring(1));\n let unitsString = (rawAmount / 100).toString();\n let hundredths = rawAmount % 100;\n let hundredthsString = hundredths < 10 ? '0' + hundredths : hundredths.toString(); // fixme\n return currency + unitsString + '.' + hundredthsString;\n }\n }\n\n /**\n * @see UPCEANExtension5Support\n */\n class UPCEANExtension2Support {\n constructor() {\n this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]);\n this.decodeRowStringBuffer = '';\n }\n decodeRow(rowNumber, row, extensionStartRange) {\n let result = this.decodeRowStringBuffer;\n let end = this.decodeMiddle(row, extensionStartRange, result);\n let resultString = result.toString();\n let extensionData = UPCEANExtension2Support.parseExtensionString(resultString);\n let resultPoints = [\n new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0, rowNumber),\n new ResultPoint(end, rowNumber)\n ];\n let extensionResult = new Result(resultString, null, 0, resultPoints, BarcodeFormat$1.UPC_EAN_EXTENSION, new Date().getTime());\n if (extensionData != null) {\n extensionResult.putAllMetadata(extensionData);\n }\n return extensionResult;\n }\n decodeMiddle(row, startRange, resultString) {\n let counters = this.decodeMiddleCounters;\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n let end = row.getSize();\n let rowOffset = startRange[1];\n let checkParity = 0;\n for (let x = 0; x < 2 && rowOffset < end; x++) {\n let bestMatch = AbstractUPCEANReader.decodeDigit(row, counters, rowOffset, AbstractUPCEANReader.L_AND_G_PATTERNS);\n resultString += String.fromCharCode(('0'.charCodeAt(0) + bestMatch % 10));\n for (let counter of counters) {\n rowOffset += counter;\n }\n if (bestMatch >= 10) {\n checkParity |= 1 << (1 - x);\n }\n if (x !== 1) {\n // Read off separator if not last\n rowOffset = row.getNextSet(rowOffset);\n rowOffset = row.getNextUnset(rowOffset);\n }\n }\n if (resultString.length !== 2) {\n throw new NotFoundException();\n }\n if (parseInt(resultString.toString()) % 4 !== checkParity) {\n throw new NotFoundException();\n }\n return rowOffset;\n }\n static parseExtensionString(raw) {\n if (raw.length !== 2) {\n return null;\n }\n return new Map([[ResultMetadataType$1.ISSUE_NUMBER, parseInt(raw)]]);\n }\n }\n\n class UPCEANExtensionSupport {\n static decodeRow(rowNumber, row, rowOffset) {\n let extensionStartRange = AbstractUPCEANReader.findGuardPattern(\n row,\n rowOffset,\n false,\n this.EXTENSION_START_PATTERN,\n new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));\n try {\n // return null;\n let fiveSupport = new UPCEANExtension5Support();\n return fiveSupport.decodeRow(rowNumber, row, extensionStartRange);\n }\n catch (err) {\n // return null;\n let twoSupport = new UPCEANExtension2Support();\n return twoSupport.decodeRow(rowNumber, row, extensionStartRange);\n }\n }\n }\n UPCEANExtensionSupport.EXTENSION_START_PATTERN = Int32Array.from([1, 1, 2]);\n\n /**\n *

Encapsulates functionality and implementation that is common to UPC and EAN families\n * of one-dimensional barcodes.

\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Sean Owen\n * @author alasdair@google.com (Alasdair Mackintosh)\n */\n class UPCEANReader extends AbstractUPCEANReader {\n constructor() {\n super();\n this.decodeRowStringBuffer = '';\n UPCEANReader.L_AND_G_PATTERNS = UPCEANReader.L_PATTERNS.map(arr => Int32Array.from(arr));\n for (let i = 10; i < 20; i++) {\n let widths = UPCEANReader.L_PATTERNS[i - 10];\n let reversedWidths = new Int32Array(widths.length);\n for (let j = 0; j < widths.length; j++) {\n reversedWidths[j] = widths[widths.length - j - 1];\n }\n UPCEANReader.L_AND_G_PATTERNS[i] = reversedWidths;\n }\n }\n decodeRow(rowNumber, row, hints) {\n let startGuardRange = UPCEANReader.findStartGuardPattern(row);\n let resultPointCallback = hints == null ? null : hints.get(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK);\n if (resultPointCallback != null) {\n const resultPoint = new ResultPoint((startGuardRange[0] + startGuardRange[1]) / 2.0, rowNumber);\n resultPointCallback.foundPossibleResultPoint(resultPoint);\n }\n let budello = this.decodeMiddle(row, startGuardRange, this.decodeRowStringBuffer);\n let endStart = budello.rowOffset;\n let result = budello.resultString;\n if (resultPointCallback != null) {\n const resultPoint = new ResultPoint(endStart, rowNumber);\n resultPointCallback.foundPossibleResultPoint(resultPoint);\n }\n let endRange = this.decodeEnd(row, endStart);\n if (resultPointCallback != null) {\n const resultPoint = new ResultPoint((endRange[0] + endRange[1]) / 2.0, rowNumber);\n resultPointCallback.foundPossibleResultPoint(resultPoint);\n }\n // Make sure there is a quiet zone at least as big as the end pattern after the barcode. The\n // spec might want more whitespace, but in practice this is the maximum we can count on.\n let end = endRange[1];\n let quietEnd = end + (end - endRange[0]);\n if (quietEnd >= row.getSize() || !row.isRange(end, quietEnd, false)) {\n throw new NotFoundException();\n }\n let resultString = result.toString();\n // UPC/EAN should never be less than 8 chars anyway\n if (resultString.length < 8) {\n throw new FormatException();\n }\n if (!UPCEANReader.checkChecksum(resultString)) {\n throw new ChecksumException();\n }\n let left = (startGuardRange[1] + startGuardRange[0]) / 2.0;\n let right = (endRange[1] + endRange[0]) / 2.0;\n let format = this.getBarcodeFormat();\n let resultPoint = [new ResultPoint(left, rowNumber), new ResultPoint(right, rowNumber)];\n let decodeResult = new Result(resultString, null, 0, resultPoint, format, new Date().getTime());\n let extensionLength = 0;\n try {\n let extensionResult = UPCEANExtensionSupport.decodeRow(rowNumber, row, endRange[1]);\n decodeResult.putMetadata(ResultMetadataType$1.UPC_EAN_EXTENSION, extensionResult.getText());\n decodeResult.putAllMetadata(extensionResult.getResultMetadata());\n decodeResult.addResultPoints(extensionResult.getResultPoints());\n extensionLength = extensionResult.getText().length;\n }\n catch (ignoreError) {}\n let allowedExtensions = hints == null ? null : hints.get(DecodeHintType$1.ALLOWED_EAN_EXTENSIONS);\n if (allowedExtensions != null) {\n let valid = false;\n for (let length in allowedExtensions) {\n if (extensionLength.toString() === length) { // check me\n valid = true;\n break;\n }\n }\n if (!valid) {\n throw new NotFoundException();\n }\n }\n return decodeResult;\n }\n decodeEnd(row, endStart) {\n return UPCEANReader.findGuardPattern(\n row, endStart, false, UPCEANReader.START_END_PATTERN,\n new Int32Array(UPCEANReader.START_END_PATTERN.length).fill(0));\n }\n static checkChecksum(s) {\n return UPCEANReader.checkStandardUPCEANChecksum(s);\n }\n static checkStandardUPCEANChecksum(s) {\n let length = s.length;\n if (length === 0)\n return false;\n let check = parseInt(s.charAt(length - 1), 10);\n return UPCEANReader.getStandardUPCEANChecksum(s.substring(0, length - 1)) === check;\n }\n static getStandardUPCEANChecksum(s) {\n let length = s.length;\n let sum = 0;\n for (let i = length - 1; i >= 0; i -= 2) {\n let digit = s.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n if (digit < 0 || digit > 9) {\n throw new FormatException();\n }\n sum += digit;\n }\n sum *= 3;\n for (let i = length - 2; i >= 0; i -= 2) {\n let digit = s.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n if (digit < 0 || digit > 9) {\n throw new FormatException();\n }\n sum += digit;\n }\n return (1000 - sum) % 10;\n }\n }\n\n /**\n *

Implements decoding of the EAN-13 format.

\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Sean Owen\n * @author alasdair@google.com (Alasdair Mackintosh)\n */\n class EAN13Reader extends UPCEANReader {\n constructor() {\n super();\n this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]);\n }\n decodeMiddle(row, startRange, resultString) {\n let counters = this.decodeMiddleCounters;\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n let end = row.getSize();\n let rowOffset = startRange[1];\n let lgPatternFound = 0;\n for (let x = 0; x < 6 && rowOffset < end; x++) {\n let bestMatch = UPCEANReader.decodeDigit(row, counters, rowOffset, UPCEANReader.L_AND_G_PATTERNS);\n resultString += String.fromCharCode(('0'.charCodeAt(0) + bestMatch % 10));\n for (let counter of counters) {\n rowOffset += counter;\n }\n if (bestMatch >= 10) {\n lgPatternFound |= 1 << (5 - x);\n }\n }\n resultString = EAN13Reader.determineFirstDigit(resultString, lgPatternFound);\n let middleRange = UPCEANReader.findGuardPattern(\n row,\n rowOffset,\n true,\n UPCEANReader.MIDDLE_PATTERN,\n new Int32Array(UPCEANReader.MIDDLE_PATTERN.length).fill(0));\n rowOffset = middleRange[1];\n for (let x = 0; x < 6 && rowOffset < end; x++) {\n let bestMatch = UPCEANReader.decodeDigit(row, counters, rowOffset, UPCEANReader.L_PATTERNS);\n resultString += String.fromCharCode(('0'.charCodeAt(0) + bestMatch));\n for (let counter of counters) {\n rowOffset += counter;\n }\n }\n return { rowOffset, resultString };\n }\n getBarcodeFormat() {\n return BarcodeFormat$1.EAN_13;\n }\n static determineFirstDigit(resultString, lgPatternFound) {\n for (let d = 0; d < 10; d++) {\n if (lgPatternFound === this.FIRST_DIGIT_ENCODINGS[d]) {\n resultString = String.fromCharCode(('0'.charCodeAt(0) + d)) + resultString;\n return resultString;\n }\n }\n throw new NotFoundException();\n }\n }\n EAN13Reader.FIRST_DIGIT_ENCODINGS = [0x00, 0x0B, 0x0D, 0xE, 0x13, 0x19, 0x1C, 0x15, 0x16, 0x1A];\n\n /**\n *

Implements decoding of the EAN-8 format.

\n *\n * @author Sean Owen\n */\n class EAN8Reader extends UPCEANReader {\n constructor() {\n super();\n this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]);\n }\n decodeMiddle(row, startRange, resultString) {\n const counters = this.decodeMiddleCounters;\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n let end = row.getSize();\n let rowOffset = startRange[1];\n for (let x = 0; x < 4 && rowOffset < end; x++) {\n let bestMatch = UPCEANReader.decodeDigit(row, counters, rowOffset, UPCEANReader.L_PATTERNS);\n resultString += String.fromCharCode(('0'.charCodeAt(0) + bestMatch));\n for (let counter of counters) {\n rowOffset += counter;\n }\n }\n let middleRange = UPCEANReader.findGuardPattern(row, rowOffset, true, UPCEANReader.MIDDLE_PATTERN, new Int32Array(UPCEANReader.MIDDLE_PATTERN.length).fill(0));\n rowOffset = middleRange[1];\n for (let x = 0; x < 4 && rowOffset < end; x++) {\n let bestMatch = UPCEANReader.decodeDigit(row, counters, rowOffset, UPCEANReader.L_PATTERNS);\n resultString += String.fromCharCode(('0'.charCodeAt(0) + bestMatch));\n for (let counter of counters) {\n rowOffset += counter;\n }\n }\n return { rowOffset, resultString };\n }\n getBarcodeFormat() {\n return BarcodeFormat$1.EAN_8;\n }\n }\n\n /**\n * Encapsulates functionality and implementation that is common to all families\n * of one-dimensional barcodes.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Sean Owen\n * @author sam2332 (Sam Rudloff)\n *\n * @source https://github.com/zxing/zxing/blob/3c96923276dd5785d58eb970b6ba3f80d36a9505/core/src/main/java/com/google/zxing/oned/UPCAReader.java\n *\n * @experimental\n */\n class UPCAReader extends UPCEANReader {\n constructor() {\n super(...arguments);\n this.ean13Reader = new EAN13Reader();\n }\n // @Override\n getBarcodeFormat() {\n return BarcodeFormat$1.UPC_A;\n }\n // Note that we don't try rotation without the try harder flag, even if rotation was supported.\n // @Override\n decode(image, hints) {\n return this.maybeReturnResult(this.ean13Reader.decode(image));\n }\n // @Override\n decodeRow(rowNumber, row, hints) {\n return this.maybeReturnResult(this.ean13Reader.decodeRow(rowNumber, row, hints));\n }\n // @Override\n decodeMiddle(row, startRange, resultString) {\n return this.ean13Reader.decodeMiddle(row, startRange, resultString);\n }\n maybeReturnResult(result) {\n let text = result.getText();\n if (text.charAt(0) === '0') {\n let upcaResult = new Result(text.substring(1), null, null, result.getResultPoints(), BarcodeFormat$1.UPC_A);\n if (result.getResultMetadata() != null) {\n upcaResult.putAllMetadata(result.getResultMetadata());\n }\n return upcaResult;\n }\n else {\n throw new NotFoundException();\n }\n }\n reset() {\n this.ean13Reader.reset();\n }\n }\n\n /**\n *

Implements decoding of the UPC-E format.

\n *

This is a great reference for\n * UPC-E information.

\n *\n * @author Sean Owen\n *\n * @source https://github.com/zxing/zxing/blob/3c96923276dd5785d58eb970b6ba3f80d36a9505/core/src/main/java/com/google/zxing/oned/UPCEReader.java\n *\n * @experimental\n */\n /* final */ class UPCEReader extends UPCEANReader {\n constructor() {\n super();\n this.decodeMiddleCounters = new Int32Array(4);\n }\n /**\n * @throws NotFoundException\n */\n // @Override\n decodeMiddle(row, startRange, result) {\n const counters = this.decodeMiddleCounters.map(x => x);\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n const end = row.getSize();\n let rowOffset = startRange[1];\n let lgPatternFound = 0;\n for (let x = 0; x < 6 && rowOffset < end; x++) {\n const bestMatch = UPCEReader.decodeDigit(\n row, counters, rowOffset, UPCEReader.L_AND_G_PATTERNS);\n result += String.fromCharCode(('0'.charCodeAt(0) + (bestMatch % 10)));\n for (let counter of counters) {\n rowOffset += counter;\n }\n if (bestMatch >= 10) {\n lgPatternFound |= (1 << (5 - x));\n }\n }\n let resultString = UPCEReader.determineNumSysAndCheckDigit(\n result, lgPatternFound);\n return {rowOffset, resultString};\n }\n /**\n * @throws NotFoundException\n */\n // @Override\n decodeEnd(row, endStart) {\n return UPCEReader.findGuardPatternWithoutCounters(\n row, endStart, true, UPCEReader.MIDDLE_END_PATTERN);\n }\n /**\n * @throws FormatException\n */\n // @Override\n checkChecksum(s) {\n return UPCEANReader.checkChecksum(UPCEReader.convertUPCEtoUPCA(s));\n }\n /**\n * @throws NotFoundException\n */\n static determineNumSysAndCheckDigit(resultString, lgPatternFound) {\n for (let numSys = 0; numSys <= 1; numSys++) {\n for (let d = 0; d < 10; d++) {\n if (lgPatternFound === this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[numSys][d]) {\n let prefix = String.fromCharCode('0'.charCodeAt(0) + numSys);\n let suffix = String.fromCharCode('0'.charCodeAt(0) + d);\n return prefix + resultString + suffix;\n }\n }\n }\n throw NotFoundException.getNotFoundInstance();\n }\n // @Override\n getBarcodeFormat() {\n return BarcodeFormat$1.UPC_E;\n }\n /**\n * Expands a UPC-E value back into its full, equivalent UPC-A code value.\n *\n * @param upce UPC-E code as string of digits\n * @return equivalent UPC-A code as string of digits\n */\n static convertUPCEtoUPCA(upce) {\n // the following line is equivalent to upce.getChars(1, 7, upceChars, 0);\n const upceChars = upce.slice(1, 7).split('').map(x => x.charCodeAt(0));\n const result = new StringBuilder( /*12*/);\n result.append(upce.charAt(0));\n let lastChar = upceChars[5];\n switch (lastChar) {\n case 0:\n case 1:\n case 2:\n result.appendChars(upceChars, 0, 2);\n result.append(lastChar);\n result.append('0000');\n result.appendChars(upceChars, 2, 3);\n break;\n case 3:\n result.appendChars(upceChars, 0, 3);\n result.append('00000');\n result.appendChars(upceChars, 3, 2);\n break;\n case 4:\n result.appendChars(upceChars, 0, 4);\n result.append('00000');\n result.append(upceChars[4]);\n break;\n default:\n result.appendChars(upceChars, 0, 5);\n result.append('0000');\n result.append(lastChar);\n break;\n }\n // Only append check digit in conversion if supplied\n if (upce.length >= 8) {\n result.append(upce.charAt(7));\n }\n return result.toString();\n }\n }\n /**\n * The pattern that marks the middle, and end, of a UPC-E pattern.\n * There is no \"second half\" to a UPC-E barcode.\n */\n UPCEReader.MIDDLE_END_PATTERN = Int32Array.from([1, 1, 1, 1, 1, 1]);\n // For an UPC-E barcode, the final digit is represented by the parities used\n // to encode the middle six digits, according to the table below.\n //\n // Parity of next 6 digits\n // Digit 0 1 2 3 4 5\n // 0 Even Even Even Odd Odd Odd\n // 1 Even Even Odd Even Odd Odd\n // 2 Even Even Odd Odd Even Odd\n // 3 Even Even Odd Odd Odd Even\n // 4 Even Odd Even Even Odd Odd\n // 5 Even Odd Odd Even Even Odd\n // 6 Even Odd Odd Odd Even Even\n // 7 Even Odd Even Odd Even Odd\n // 8 Even Odd Even Odd Odd Even\n // 9 Even Odd Odd Even Odd Even\n //\n // The encoding is represented by the following array, which is a bit pattern\n // using Odd = 0 and Even = 1. For example, 5 is represented by:\n //\n // Odd Even Even Odd Odd Even\n // in binary:\n // 0 1 1 0 0 1 == 0x19\n //\n /**\n * See {@link #L_AND_G_PATTERNS}; these values similarly represent patterns of\n * even-odd parity encodings of digits that imply both the number system (0 or 1)\n * used, and the check digit.\n */\n UPCEReader.NUMSYS_AND_CHECK_DIGIT_PATTERNS = [\n Int32Array.from([0x38, 0x34, 0x32, 0x31, 0x2C, 0x26, 0x23, 0x2A, 0x29, 0x25]),\n Int32Array.from([0x07, 0x0B, 0x0D, 0x0E, 0x13, 0x19, 0x1C, 0x15, 0x16, 0x1A]),\n ];\n\n /**\n *

A reader that can read all available UPC/EAN formats. If a caller wants to try to\n * read all such formats, it is most efficient to use this implementation rather than invoke\n * individual readers.

\n *\n * @author Sean Owen\n */\n class MultiFormatUPCEANReader extends OneDReader {\n constructor(hints) {\n super();\n let possibleFormats = hints == null ? null : hints.get(DecodeHintType$1.POSSIBLE_FORMATS);\n let readers = [];\n if (!isNullOrUndefined(possibleFormats)) {\n if (possibleFormats.indexOf(BarcodeFormat$1.EAN_13) > -1) {\n readers.push(new EAN13Reader());\n }\n if (possibleFormats.indexOf(BarcodeFormat$1.UPC_A) > -1) {\n readers.push(new UPCAReader());\n }\n if (possibleFormats.indexOf(BarcodeFormat$1.EAN_8) > -1) {\n readers.push(new EAN8Reader());\n }\n if (possibleFormats.indexOf(BarcodeFormat$1.UPC_E) > -1) {\n readers.push(new UPCEReader());\n }\n } else {\n // No hints provided.\n readers.push(new EAN13Reader());\n readers.push(new UPCAReader());\n readers.push(new EAN8Reader());\n readers.push(new UPCEReader());\n }\n this.readers = readers;\n }\n decodeRow(rowNumber, row, hints) {\n for (let reader of this.readers) {\n try {\n // const result: Result = reader.decodeRow(rowNumber, row, startGuardPattern, hints);\n const result = reader.decodeRow(rowNumber, row, hints);\n // Special case: a 12-digit code encoded in UPC-A is identical to a \"0\"\n // followed by those 12 digits encoded as EAN-13. Each will recognize such a code,\n // UPC-A as a 12-digit string and EAN-13 as a 13-digit string starting with \"0\".\n // Individually these are correct and their readers will both read such a code\n // and correctly call it EAN-13, or UPC-A, respectively.\n //\n // In this case, if we've been looking for both types, we'd like to call it\n // a UPC-A code. But for efficiency we only run the EAN-13 decoder to also read\n // UPC-A. So we special case it here, and convert an EAN-13 result to a UPC-A\n // result if appropriate.\n //\n // But, don't return UPC-A if UPC-A was not a requested format!\n const ean13MayBeUPCA = result.getBarcodeFormat() === BarcodeFormat$1.EAN_13 &&\n result.getText().charAt(0) === '0';\n // @SuppressWarnings(\"unchecked\")\n const possibleFormats = hints == null ? null : hints.get(DecodeHintType$1.POSSIBLE_FORMATS);\n const canReturnUPCA = possibleFormats == null || possibleFormats.includes(BarcodeFormat$1.UPC_A);\n if (ean13MayBeUPCA && canReturnUPCA) {\n const rawBytes = result.getRawBytes();\n // Transfer the metadata across\n const resultUPCA = new Result(\n result.getText().substring(1),\n rawBytes,\n (rawBytes ? rawBytes.length : null),\n result.getResultPoints(),\n BarcodeFormat$1.UPC_A);\n resultUPCA.putAllMetadata(result.getResultMetadata());\n return resultUPCA;\n }\n return result;\n }\n catch (err) {\n // continue;\n }\n }\n throw new NotFoundException();\n }\n reset() {\n for (let reader of this.readers) {\n reader.reset();\n }\n }\n }\n\n // import Integer from '../../util/Integer';\n // import Float from '../../util/Float';\n class AbstractRSSReader extends OneDReader {\n constructor() {\n super();\n this.decodeFinderCounters = new Int32Array(4);\n this.dataCharacterCounters = new Int32Array(8);\n this.oddRoundingErrors = new Array(4);\n this.evenRoundingErrors = new Array(4);\n this.oddCounts = new Array(this.dataCharacterCounters.length / 2);\n this.evenCounts = new Array(this.dataCharacterCounters.length / 2);\n }\n getDecodeFinderCounters() {\n return this.decodeFinderCounters;\n }\n getDataCharacterCounters() {\n return this.dataCharacterCounters;\n }\n getOddRoundingErrors() {\n return this.oddRoundingErrors;\n }\n getEvenRoundingErrors() {\n return this.evenRoundingErrors;\n }\n getOddCounts() {\n return this.oddCounts;\n }\n getEvenCounts() {\n return this.evenCounts;\n }\n parseFinderValue(counters, finderPatterns) {\n for (let value = 0; value < finderPatterns.length; value++) {\n if (OneDReader.patternMatchVariance(counters, finderPatterns[value], AbstractRSSReader.MAX_INDIVIDUAL_VARIANCE) < AbstractRSSReader.MAX_AVG_VARIANCE) {\n return value;\n }\n }\n throw new NotFoundException();\n }\n /**\n * @param array values to sum\n * @return sum of values\n * @deprecated call {@link MathUtils#sum(int[])}\n */\n static count(array) {\n return MathUtils.sum(new Int32Array(array));\n }\n static increment(array, errors) {\n let index = 0;\n let biggestError = errors[0];\n for (let i = 1; i < array.length; i++) {\n if (errors[i] > biggestError) {\n biggestError = errors[i];\n index = i;\n }\n }\n array[index]++;\n }\n static decrement(array, errors) {\n let index = 0;\n let biggestError = errors[0];\n for (let i = 1; i < array.length; i++) {\n if (errors[i] < biggestError) {\n biggestError = errors[i];\n index = i;\n }\n }\n array[index]--;\n }\n static isFinderPattern(counters) {\n let firstTwoSum = counters[0] + counters[1];\n let sum = firstTwoSum + counters[2] + counters[3];\n let ratio = firstTwoSum / sum;\n if (ratio >= AbstractRSSReader.MIN_FINDER_PATTERN_RATIO && ratio <= AbstractRSSReader.MAX_FINDER_PATTERN_RATIO) {\n // passes ratio test in spec, but see if the counts are unreasonable\n let minCounter = Number.MAX_SAFE_INTEGER;\n let maxCounter = Number.MIN_SAFE_INTEGER;\n for (let counter of counters) {\n if (counter > maxCounter) {\n maxCounter = counter;\n }\n if (counter < minCounter) {\n minCounter = counter;\n }\n }\n return maxCounter < 10 * minCounter;\n }\n return false;\n }\n }\n AbstractRSSReader.MAX_AVG_VARIANCE = 0.2;\n AbstractRSSReader.MAX_INDIVIDUAL_VARIANCE = 0.45;\n AbstractRSSReader.MIN_FINDER_PATTERN_RATIO = 9.5 / 12.0;\n AbstractRSSReader.MAX_FINDER_PATTERN_RATIO = 12.5 / 14.0;\n\n class DataCharacter {\n constructor(value, checksumPortion) {\n this.value = value;\n this.checksumPortion = checksumPortion;\n }\n getValue() {\n return this.value;\n }\n getChecksumPortion() {\n return this.checksumPortion;\n }\n toString() {\n return this.value + '(' + this.checksumPortion + ')';\n }\n equals(o) {\n if (!(o instanceof DataCharacter)) {\n return false;\n }\n const that = o;\n return this.value === that.value && this.checksumPortion === that.checksumPortion;\n }\n hashCode() {\n return this.value ^ this.checksumPortion;\n }\n }\n\n class FinderPattern {\n constructor(value, startEnd, start, end, rowNumber) {\n this.value = value;\n this.startEnd = startEnd;\n this.value = value;\n this.startEnd = startEnd;\n this.resultPoints = new Array();\n this.resultPoints.push(new ResultPoint(start, rowNumber));\n this.resultPoints.push(new ResultPoint(end, rowNumber));\n }\n getValue() {\n return this.value;\n }\n getStartEnd() {\n return this.startEnd;\n }\n getResultPoints() {\n return this.resultPoints;\n }\n equals(o) {\n if (!(o instanceof FinderPattern)) {\n return false;\n }\n const that = o;\n return this.value === that.value;\n }\n hashCode() {\n return this.value;\n }\n }\n\n /**\n * RSS util functions.\n */\n class RSSUtils {\n constructor() { }\n static getRSSvalue(widths, maxWidth, noNarrow) {\n let n = 0;\n for (let width of widths) {\n n += width;\n }\n let val = 0;\n let narrowMask = 0;\n let elements = widths.length;\n for (let bar = 0; bar < elements - 1; bar++) {\n let elmWidth;\n for (elmWidth = 1, narrowMask |= 1 << bar; elmWidth < widths[bar]; elmWidth++, narrowMask &= ~(1 << bar)) {\n let subVal = RSSUtils.combins(n - elmWidth - 1, elements - bar - 2);\n if (noNarrow && (narrowMask === 0) && (n - elmWidth - (elements - bar - 1) >= elements - bar - 1)) {\n subVal -= RSSUtils.combins(n - elmWidth - (elements - bar), elements - bar - 2);\n }\n if (elements - bar - 1 > 1) {\n let lessVal = 0;\n for (let mxwElement = n - elmWidth - (elements - bar - 2); mxwElement > maxWidth; mxwElement--) {\n lessVal += RSSUtils.combins(n - elmWidth - mxwElement - 1, elements - bar - 3);\n }\n subVal -= lessVal * (elements - 1 - bar);\n }\n else if (n - elmWidth > maxWidth) {\n subVal--;\n }\n val += subVal;\n }\n n -= elmWidth;\n }\n return val;\n }\n static combins(n, r) {\n let maxDenom;\n let minDenom;\n if (n - r > r) {\n minDenom = r;\n maxDenom = n - r;\n }\n else {\n minDenom = n - r;\n maxDenom = r;\n }\n let val = 1;\n let j = 1;\n for (let i = n; i > maxDenom; i--) {\n val *= i;\n if (j <= minDenom) {\n val /= j;\n j++;\n }\n }\n while ((j <= minDenom)) {\n val /= j;\n j++;\n }\n return val;\n }\n }\n\n class BitArrayBuilder {\n static buildBitArray(pairs) {\n let charNumber = (pairs.length * 2) - 1;\n if (pairs[pairs.length - 1].getRightChar() == null) {\n charNumber -= 1;\n }\n let size = 12 * charNumber;\n let binary = new BitArray(size);\n let accPos = 0;\n let firstPair = pairs[0];\n let firstValue = firstPair.getRightChar().getValue();\n for (let i = 11; i >= 0; --i) {\n if ((firstValue & (1 << i)) != 0) {\n binary.set(accPos);\n }\n accPos++;\n }\n for (let i = 1; i < pairs.length; ++i) {\n let currentPair = pairs[i];\n let leftValue = currentPair.getLeftChar().getValue();\n for (let j = 11; j >= 0; --j) {\n if ((leftValue & (1 << j)) != 0) {\n binary.set(accPos);\n }\n accPos++;\n }\n if (currentPair.getRightChar() != null) {\n let rightValue = currentPair.getRightChar().getValue();\n for (let j = 11; j >= 0; --j) {\n if ((rightValue & (1 << j)) != 0) {\n binary.set(accPos);\n }\n accPos++;\n }\n }\n }\n return binary;\n }\n }\n\n class BlockParsedResult {\n constructor(finished, decodedInformation) {\n if (decodedInformation) {\n this.decodedInformation = null;\n }\n else {\n this.finished = finished;\n this.decodedInformation = decodedInformation;\n }\n }\n getDecodedInformation() {\n return this.decodedInformation;\n }\n isFinished() {\n return this.finished;\n }\n }\n\n class DecodedObject {\n constructor(newPosition) {\n this.newPosition = newPosition;\n }\n getNewPosition() {\n return this.newPosition;\n }\n }\n\n class DecodedChar extends DecodedObject {\n constructor(newPosition, value) {\n super(newPosition);\n this.value = value;\n }\n getValue() {\n return this.value;\n }\n isFNC1() {\n return this.value === DecodedChar.FNC1;\n }\n }\n DecodedChar.FNC1 = '$';\n\n class DecodedInformation extends DecodedObject {\n constructor(newPosition, newString, remainingValue) {\n super(newPosition);\n if (remainingValue) {\n this.remaining = true;\n this.remainingValue = this.remainingValue;\n }\n else {\n this.remaining = false;\n this.remainingValue = 0;\n }\n this.newString = newString;\n }\n getNewString() {\n return this.newString;\n }\n isRemaining() {\n return this.remaining;\n }\n getRemainingValue() {\n return this.remainingValue;\n }\n }\n\n class DecodedNumeric extends DecodedObject {\n constructor(newPosition, firstDigit, secondDigit) {\n super(newPosition);\n if (firstDigit < 0 || firstDigit > 10 || secondDigit < 0 || secondDigit > 10) {\n throw new FormatException();\n }\n this.firstDigit = firstDigit;\n this.secondDigit = secondDigit;\n }\n getFirstDigit() {\n return this.firstDigit;\n }\n getSecondDigit() {\n return this.secondDigit;\n }\n getValue() {\n return this.firstDigit * 10 + this.secondDigit;\n }\n isFirstDigitFNC1() {\n return this.firstDigit === DecodedNumeric.FNC1;\n }\n isSecondDigitFNC1() {\n return this.secondDigit === DecodedNumeric.FNC1;\n }\n isAnyFNC1() {\n return this.firstDigit === DecodedNumeric.FNC1 || this.secondDigit === DecodedNumeric.FNC1;\n }\n }\n DecodedNumeric.FNC1 = 10;\n\n class FieldParser {\n constructor() {\n }\n static parseFieldsInGeneralPurpose(rawInformation) {\n if (!rawInformation) {\n return null;\n }\n // Processing 2-digit AIs\n if (rawInformation.length < 2) {\n throw new NotFoundException();\n }\n let firstTwoDigits = rawInformation.substring(0, 2);\n for (let dataLength of FieldParser.TWO_DIGIT_DATA_LENGTH) {\n if (dataLength[0] === firstTwoDigits) {\n if (dataLength[1] === FieldParser.VARIABLE_LENGTH) {\n return FieldParser.processVariableAI(2, dataLength[2], rawInformation);\n }\n return FieldParser.processFixedAI(2, dataLength[1], rawInformation);\n }\n }\n if (rawInformation.length < 3) {\n throw new NotFoundException();\n }\n let firstThreeDigits = rawInformation.substring(0, 3);\n for (let dataLength of FieldParser.THREE_DIGIT_DATA_LENGTH) {\n if (dataLength[0] === firstThreeDigits) {\n if (dataLength[1] === FieldParser.VARIABLE_LENGTH) {\n return FieldParser.processVariableAI(3, dataLength[2], rawInformation);\n }\n return FieldParser.processFixedAI(3, dataLength[1], rawInformation);\n }\n }\n for (let dataLength of FieldParser.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH) {\n if (dataLength[0] === firstThreeDigits) {\n if (dataLength[1] === FieldParser.VARIABLE_LENGTH) {\n return FieldParser.processVariableAI(4, dataLength[2], rawInformation);\n }\n return FieldParser.processFixedAI(4, dataLength[1], rawInformation);\n }\n }\n if (rawInformation.length < 4) {\n throw new NotFoundException();\n }\n let firstFourDigits = rawInformation.substring(0, 4);\n for (let dataLength of FieldParser.FOUR_DIGIT_DATA_LENGTH) {\n if (dataLength[0] === firstFourDigits) {\n if (dataLength[1] === FieldParser.VARIABLE_LENGTH) {\n return FieldParser.processVariableAI(4, dataLength[2], rawInformation);\n }\n return FieldParser.processFixedAI(4, dataLength[1], rawInformation);\n }\n }\n throw new NotFoundException();\n }\n static processFixedAI(aiSize, fieldSize, rawInformation) {\n if (rawInformation.length < aiSize) {\n throw new NotFoundException();\n }\n let ai = rawInformation.substring(0, aiSize);\n if (rawInformation.length < aiSize + fieldSize) {\n throw new NotFoundException();\n }\n let field = rawInformation.substring(aiSize, aiSize + fieldSize);\n let remaining = rawInformation.substring(aiSize + fieldSize);\n let result = '(' + ai + ')' + field;\n let parsedAI = FieldParser.parseFieldsInGeneralPurpose(remaining);\n return parsedAI == null ? result : result + parsedAI;\n }\n static processVariableAI(aiSize, variableFieldSize, rawInformation) {\n let ai = rawInformation.substring(0, aiSize);\n let maxSize;\n if (rawInformation.length < aiSize + variableFieldSize) {\n maxSize = rawInformation.length;\n }\n else {\n maxSize = aiSize + variableFieldSize;\n }\n let field = rawInformation.substring(aiSize, maxSize);\n let remaining = rawInformation.substring(maxSize);\n let result = '(' + ai + ')' + field;\n let parsedAI = FieldParser.parseFieldsInGeneralPurpose(remaining);\n return parsedAI == null ? result : result + parsedAI;\n }\n }\n FieldParser.VARIABLE_LENGTH = [];\n FieldParser.TWO_DIGIT_DATA_LENGTH = [\n ['00', 18],\n ['01', 14],\n ['02', 14],\n ['10', FieldParser.VARIABLE_LENGTH, 20],\n ['11', 6],\n ['12', 6],\n ['13', 6],\n ['15', 6],\n ['17', 6],\n ['20', 2],\n ['21', FieldParser.VARIABLE_LENGTH, 20],\n ['22', FieldParser.VARIABLE_LENGTH, 29],\n ['30', FieldParser.VARIABLE_LENGTH, 8],\n ['37', FieldParser.VARIABLE_LENGTH, 8],\n // internal company codes\n ['90', FieldParser.VARIABLE_LENGTH, 30],\n ['91', FieldParser.VARIABLE_LENGTH, 30],\n ['92', FieldParser.VARIABLE_LENGTH, 30],\n ['93', FieldParser.VARIABLE_LENGTH, 30],\n ['94', FieldParser.VARIABLE_LENGTH, 30],\n ['95', FieldParser.VARIABLE_LENGTH, 30],\n ['96', FieldParser.VARIABLE_LENGTH, 30],\n ['97', FieldParser.VARIABLE_LENGTH, 3],\n ['98', FieldParser.VARIABLE_LENGTH, 30],\n ['99', FieldParser.VARIABLE_LENGTH, 30],\n ];\n FieldParser.THREE_DIGIT_DATA_LENGTH = [\n // Same format as above\n ['240', FieldParser.VARIABLE_LENGTH, 30],\n ['241', FieldParser.VARIABLE_LENGTH, 30],\n ['242', FieldParser.VARIABLE_LENGTH, 6],\n ['250', FieldParser.VARIABLE_LENGTH, 30],\n ['251', FieldParser.VARIABLE_LENGTH, 30],\n ['253', FieldParser.VARIABLE_LENGTH, 17],\n ['254', FieldParser.VARIABLE_LENGTH, 20],\n ['400', FieldParser.VARIABLE_LENGTH, 30],\n ['401', FieldParser.VARIABLE_LENGTH, 30],\n ['402', 17],\n ['403', FieldParser.VARIABLE_LENGTH, 30],\n ['410', 13],\n ['411', 13],\n ['412', 13],\n ['413', 13],\n ['414', 13],\n ['420', FieldParser.VARIABLE_LENGTH, 20],\n ['421', FieldParser.VARIABLE_LENGTH, 15],\n ['422', 3],\n ['423', FieldParser.VARIABLE_LENGTH, 15],\n ['424', 3],\n ['425', 3],\n ['426', 3],\n ];\n FieldParser.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH = [\n // Same format as above\n ['310', 6],\n ['311', 6],\n ['312', 6],\n ['313', 6],\n ['314', 6],\n ['315', 6],\n ['316', 6],\n ['320', 6],\n ['321', 6],\n ['322', 6],\n ['323', 6],\n ['324', 6],\n ['325', 6],\n ['326', 6],\n ['327', 6],\n ['328', 6],\n ['329', 6],\n ['330', 6],\n ['331', 6],\n ['332', 6],\n ['333', 6],\n ['334', 6],\n ['335', 6],\n ['336', 6],\n ['340', 6],\n ['341', 6],\n ['342', 6],\n ['343', 6],\n ['344', 6],\n ['345', 6],\n ['346', 6],\n ['347', 6],\n ['348', 6],\n ['349', 6],\n ['350', 6],\n ['351', 6],\n ['352', 6],\n ['353', 6],\n ['354', 6],\n ['355', 6],\n ['356', 6],\n ['357', 6],\n ['360', 6],\n ['361', 6],\n ['362', 6],\n ['363', 6],\n ['364', 6],\n ['365', 6],\n ['366', 6],\n ['367', 6],\n ['368', 6],\n ['369', 6],\n ['390', FieldParser.VARIABLE_LENGTH, 15],\n ['391', FieldParser.VARIABLE_LENGTH, 18],\n ['392', FieldParser.VARIABLE_LENGTH, 15],\n ['393', FieldParser.VARIABLE_LENGTH, 18],\n ['703', FieldParser.VARIABLE_LENGTH, 30],\n ];\n FieldParser.FOUR_DIGIT_DATA_LENGTH = [\n // Same format as above\n ['7001', 13],\n ['7002', FieldParser.VARIABLE_LENGTH, 30],\n ['7003', 10],\n ['8001', 14],\n ['8002', FieldParser.VARIABLE_LENGTH, 20],\n ['8003', FieldParser.VARIABLE_LENGTH, 30],\n ['8004', FieldParser.VARIABLE_LENGTH, 30],\n ['8005', 6],\n ['8006', 18],\n ['8007', FieldParser.VARIABLE_LENGTH, 30],\n ['8008', FieldParser.VARIABLE_LENGTH, 12],\n ['8018', 18],\n ['8020', FieldParser.VARIABLE_LENGTH, 25],\n ['8100', 6],\n ['8101', 10],\n ['8102', 2],\n ['8110', FieldParser.VARIABLE_LENGTH, 70],\n ['8200', FieldParser.VARIABLE_LENGTH, 70],\n ];\n\n class GeneralAppIdDecoder {\n constructor(information) {\n this.buffer = new StringBuilder();\n this.information = information;\n }\n decodeAllCodes(buff, initialPosition) {\n let currentPosition = initialPosition;\n let remaining = null;\n do {\n let info = this.decodeGeneralPurposeField(currentPosition, remaining);\n let parsedFields = FieldParser.parseFieldsInGeneralPurpose(info.getNewString());\n if (parsedFields != null) {\n buff.append(parsedFields);\n }\n if (info.isRemaining()) {\n remaining = '' + info.getRemainingValue();\n }\n else {\n remaining = null;\n }\n if (currentPosition === info.getNewPosition()) { // No step forward!\n break;\n }\n currentPosition = info.getNewPosition();\n } while (true);\n return buff.toString();\n }\n isStillNumeric(pos) {\n // It's numeric if it still has 7 positions\n // and one of the first 4 bits is \"1\".\n if (pos + 7 > this.information.getSize()) {\n return pos + 4 <= this.information.getSize();\n }\n for (let i = pos; i < pos + 3; ++i) {\n if (this.information.get(i)) {\n return true;\n }\n }\n return this.information.get(pos + 3);\n }\n decodeNumeric(pos) {\n if (pos + 7 > this.information.getSize()) {\n let numeric = this.extractNumericValueFromBitArray(pos, 4);\n if (numeric === 0) {\n return new DecodedNumeric(this.information.getSize(), DecodedNumeric.FNC1, DecodedNumeric.FNC1);\n }\n return new DecodedNumeric(this.information.getSize(), numeric - 1, DecodedNumeric.FNC1);\n }\n let numeric = this.extractNumericValueFromBitArray(pos, 7);\n let digit1 = (numeric - 8) / 11;\n let digit2 = (numeric - 8) % 11;\n return new DecodedNumeric(pos + 7, digit1, digit2);\n }\n extractNumericValueFromBitArray(pos, bits) {\n return GeneralAppIdDecoder.extractNumericValueFromBitArray(this.information, pos, bits);\n }\n static extractNumericValueFromBitArray(information, pos, bits) {\n let value = 0;\n for (let i = 0; i < bits; ++i) {\n if (information.get(pos + i)) {\n value |= 1 << (bits - i - 1);\n }\n }\n return value;\n }\n decodeGeneralPurposeField(pos, remaining) {\n // this.buffer.setLength(0);\n this.buffer.setLengthToZero();\n if (remaining != null) {\n this.buffer.append(remaining);\n }\n this.current.setPosition(pos);\n let lastDecoded = this.parseBlocks();\n if (lastDecoded != null && lastDecoded.isRemaining()) {\n return new DecodedInformation(this.current.getPosition(), this.buffer.toString(), lastDecoded.getRemainingValue());\n }\n return new DecodedInformation(this.current.getPosition(), this.buffer.toString());\n }\n parseBlocks() {\n let isFinished;\n let result;\n do {\n let initialPosition = this.current.getPosition();\n if (this.current.isAlpha()) {\n result = this.parseAlphaBlock();\n isFinished = result.isFinished();\n }\n else if (this.current.isIsoIec646()) {\n result = this.parseIsoIec646Block();\n isFinished = result.isFinished();\n }\n else { // it must be numeric\n result = this.parseNumericBlock();\n isFinished = result.isFinished();\n }\n let positionChanged = initialPosition !== this.current.getPosition();\n if (!positionChanged && !isFinished) {\n break;\n }\n } while (!isFinished);\n return result.getDecodedInformation();\n }\n parseNumericBlock() {\n while (this.isStillNumeric(this.current.getPosition())) {\n let numeric = this.decodeNumeric(this.current.getPosition());\n this.current.setPosition(numeric.getNewPosition());\n if (numeric.isFirstDigitFNC1()) {\n let information;\n if (numeric.isSecondDigitFNC1()) {\n information = new DecodedInformation(this.current.getPosition(), this.buffer.toString());\n }\n else {\n information = new DecodedInformation(this.current.getPosition(), this.buffer.toString(), numeric.getSecondDigit());\n }\n return new BlockParsedResult(true, information);\n }\n this.buffer.append(numeric.getFirstDigit());\n if (numeric.isSecondDigitFNC1()) {\n let information = new DecodedInformation(this.current.getPosition(), this.buffer.toString());\n return new BlockParsedResult(true, information);\n }\n this.buffer.append(numeric.getSecondDigit());\n }\n if (this.isNumericToAlphaNumericLatch(this.current.getPosition())) {\n this.current.setAlpha();\n this.current.incrementPosition(4);\n }\n return new BlockParsedResult(false);\n }\n parseIsoIec646Block() {\n while (this.isStillIsoIec646(this.current.getPosition())) {\n let iso = this.decodeIsoIec646(this.current.getPosition());\n this.current.setPosition(iso.getNewPosition());\n if (iso.isFNC1()) {\n let information = new DecodedInformation(this.current.getPosition(), this.buffer.toString());\n return new BlockParsedResult(true, information);\n }\n this.buffer.append(iso.getValue());\n }\n if (this.isAlphaOr646ToNumericLatch(this.current.getPosition())) {\n this.current.incrementPosition(3);\n this.current.setNumeric();\n }\n else if (this.isAlphaTo646ToAlphaLatch(this.current.getPosition())) {\n if (this.current.getPosition() + 5 < this.information.getSize()) {\n this.current.incrementPosition(5);\n }\n else {\n this.current.setPosition(this.information.getSize());\n }\n this.current.setAlpha();\n }\n return new BlockParsedResult(false);\n }\n parseAlphaBlock() {\n while (this.isStillAlpha(this.current.getPosition())) {\n let alpha = this.decodeAlphanumeric(this.current.getPosition());\n this.current.setPosition(alpha.getNewPosition());\n if (alpha.isFNC1()) {\n let information = new DecodedInformation(this.current.getPosition(), this.buffer.toString());\n return new BlockParsedResult(true, information); // end of the char block\n }\n this.buffer.append(alpha.getValue());\n }\n if (this.isAlphaOr646ToNumericLatch(this.current.getPosition())) {\n this.current.incrementPosition(3);\n this.current.setNumeric();\n }\n else if (this.isAlphaTo646ToAlphaLatch(this.current.getPosition())) {\n if (this.current.getPosition() + 5 < this.information.getSize()) {\n this.current.incrementPosition(5);\n }\n else {\n this.current.setPosition(this.information.getSize());\n }\n this.current.setIsoIec646();\n }\n return new BlockParsedResult(false);\n }\n isStillIsoIec646(pos) {\n if (pos + 5 > this.information.getSize()) {\n return false;\n }\n let fiveBitValue = this.extractNumericValueFromBitArray(pos, 5);\n if (fiveBitValue >= 5 && fiveBitValue < 16) {\n return true;\n }\n if (pos + 7 > this.information.getSize()) {\n return false;\n }\n let sevenBitValue = this.extractNumericValueFromBitArray(pos, 7);\n if (sevenBitValue >= 64 && sevenBitValue < 116) {\n return true;\n }\n if (pos + 8 > this.information.getSize()) {\n return false;\n }\n let eightBitValue = this.extractNumericValueFromBitArray(pos, 8);\n return eightBitValue >= 232 && eightBitValue < 253;\n }\n decodeIsoIec646(pos) {\n let fiveBitValue = this.extractNumericValueFromBitArray(pos, 5);\n if (fiveBitValue === 15) {\n return new DecodedChar(pos + 5, DecodedChar.FNC1);\n }\n if (fiveBitValue >= 5 && fiveBitValue < 15) {\n return new DecodedChar(pos + 5, ('0' + (fiveBitValue - 5)));\n }\n let sevenBitValue = this.extractNumericValueFromBitArray(pos, 7);\n if (sevenBitValue >= 64 && sevenBitValue < 90) {\n return new DecodedChar(pos + 7, ('' + (sevenBitValue + 1)));\n }\n if (sevenBitValue >= 90 && sevenBitValue < 116) {\n return new DecodedChar(pos + 7, ('' + (sevenBitValue + 7)));\n }\n let eightBitValue = this.extractNumericValueFromBitArray(pos, 8);\n let c;\n switch (eightBitValue) {\n case 232:\n c = '!';\n break;\n case 233:\n c = '\"';\n break;\n case 234:\n c = '%';\n break;\n case 235:\n c = '&';\n break;\n case 236:\n c = '\\'';\n break;\n case 237:\n c = '(';\n break;\n case 238:\n c = ')';\n break;\n case 239:\n c = '*';\n break;\n case 240:\n c = '+';\n break;\n case 241:\n c = ',';\n break;\n case 242:\n c = '-';\n break;\n case 243:\n c = '.';\n break;\n case 244:\n c = '/';\n break;\n case 245:\n c = ':';\n break;\n case 246:\n c = ';';\n break;\n case 247:\n c = '<';\n break;\n case 248:\n c = '=';\n break;\n case 249:\n c = '>';\n break;\n case 250:\n c = '?';\n break;\n case 251:\n c = '_';\n break;\n case 252:\n c = ' ';\n break;\n default:\n throw new FormatException();\n }\n return new DecodedChar(pos + 8, c);\n }\n isStillAlpha(pos) {\n if (pos + 5 > this.information.getSize()) {\n return false;\n }\n // We now check if it's a valid 5-bit value (0..9 and FNC1)\n let fiveBitValue = this.extractNumericValueFromBitArray(pos, 5);\n if (fiveBitValue >= 5 && fiveBitValue < 16) {\n return true;\n }\n if (pos + 6 > this.information.getSize()) {\n return false;\n }\n let sixBitValue = this.extractNumericValueFromBitArray(pos, 6);\n return sixBitValue >= 16 && sixBitValue < 63; // 63 not included\n }\n decodeAlphanumeric(pos) {\n let fiveBitValue = this.extractNumericValueFromBitArray(pos, 5);\n if (fiveBitValue === 15) {\n return new DecodedChar(pos + 5, DecodedChar.FNC1);\n }\n if (fiveBitValue >= 5 && fiveBitValue < 15) {\n return new DecodedChar(pos + 5, ('0' + (fiveBitValue - 5)));\n }\n let sixBitValue = this.extractNumericValueFromBitArray(pos, 6);\n if (sixBitValue >= 32 && sixBitValue < 58) {\n return new DecodedChar(pos + 6, ('' + (sixBitValue + 33)));\n }\n let c;\n switch (sixBitValue) {\n case 58:\n c = '*';\n break;\n case 59:\n c = ',';\n break;\n case 60:\n c = '-';\n break;\n case 61:\n c = '.';\n break;\n case 62:\n c = '/';\n break;\n default:\n throw new IllegalStateException('Decoding invalid alphanumeric value: ' + sixBitValue);\n }\n return new DecodedChar(pos + 6, c);\n }\n isAlphaTo646ToAlphaLatch(pos) {\n if (pos + 1 > this.information.getSize()) {\n return false;\n }\n for (let i = 0; i < 5 && i + pos < this.information.getSize(); ++i) {\n if (i === 2) {\n if (!this.information.get(pos + 2)) {\n return false;\n }\n }\n else if (this.information.get(pos + i)) {\n return false;\n }\n }\n return true;\n }\n isAlphaOr646ToNumericLatch(pos) {\n // Next is alphanumeric if there are 3 positions and they are all zeros\n if (pos + 3 > this.information.getSize()) {\n return false;\n }\n for (let i = pos; i < pos + 3; ++i) {\n if (this.information.get(i)) {\n return false;\n }\n }\n return true;\n }\n isNumericToAlphaNumericLatch(pos) {\n // Next is alphanumeric if there are 4 positions and they are all zeros, or\n // if there is a subset of this just before the end of the symbol\n if (pos + 1 > this.information.getSize()) {\n return false;\n }\n for (let i = 0; i < 4 && i + pos < this.information.getSize(); ++i) {\n if (this.information.get(pos + i)) {\n return false;\n }\n }\n return true;\n }\n }\n\n class AbstractExpandedDecoder {\n constructor(information) {\n this.information = information;\n this.generalDecoder = new GeneralAppIdDecoder(information);\n }\n getInformation() {\n return this.information;\n }\n getGeneralDecoder() {\n return this.generalDecoder;\n }\n }\n\n class AI01decoder extends AbstractExpandedDecoder {\n constructor(information) {\n super(information);\n }\n encodeCompressedGtin(buf, currentPos) {\n buf.append('(01)');\n let initialPosition = buf.length();\n buf.append('9');\n this.encodeCompressedGtinWithoutAI(buf, currentPos, initialPosition);\n }\n encodeCompressedGtinWithoutAI(buf, currentPos, initialBufferPosition) {\n for (let i = 0; i < 4; ++i) {\n let currentBlock = this.getGeneralDecoder().extractNumericValueFromBitArray(currentPos + 10 * i, 10);\n if (currentBlock / 100 === 0) {\n buf.append('0');\n }\n if (currentBlock / 10 === 0) {\n buf.append('0');\n }\n buf.append(currentBlock);\n }\n AI01decoder.appendCheckDigit(buf, initialBufferPosition);\n }\n static appendCheckDigit(buf, currentPos) {\n let checkDigit = 0;\n for (let i = 0; i < 13; i++) {\n // let digit = buf.charAt(i + currentPos) - '0';\n // To be checked\n let digit = buf.charAt(i + currentPos).charCodeAt(0) - '0'.charCodeAt(0);\n checkDigit += (i & 0x01) === 0 ? 3 * digit : digit;\n }\n checkDigit = 10 - (checkDigit % 10);\n if (checkDigit === 10) {\n checkDigit = 0;\n }\n buf.append(checkDigit);\n }\n }\n AI01decoder.GTIN_SIZE = 40;\n\n class AI01AndOtherAIs extends AI01decoder {\n // the second one is the encodation method, and the other two are for the variable length\n constructor(information) {\n super(information);\n }\n parseInformation() {\n let buff = new StringBuilder();\n buff.append('(01)');\n let initialGtinPosition = buff.length();\n let firstGtinDigit = this.getGeneralDecoder().extractNumericValueFromBitArray(AI01AndOtherAIs.HEADER_SIZE, 4);\n buff.append(firstGtinDigit);\n this.encodeCompressedGtinWithoutAI(buff, AI01AndOtherAIs.HEADER_SIZE + 4, initialGtinPosition);\n return this.getGeneralDecoder().decodeAllCodes(buff, AI01AndOtherAIs.HEADER_SIZE + 44);\n }\n }\n AI01AndOtherAIs.HEADER_SIZE = 1 + 1 + 2; // first bit encodes the linkage flag,\n\n class AnyAIDecoder extends AbstractExpandedDecoder {\n constructor(information) {\n super(information);\n }\n parseInformation() {\n let buf = new StringBuilder();\n return this.getGeneralDecoder().decodeAllCodes(buf, AnyAIDecoder.HEADER_SIZE);\n }\n }\n AnyAIDecoder.HEADER_SIZE = 2 + 1 + 2;\n\n class AI01weightDecoder extends AI01decoder {\n constructor(information) {\n super(information);\n }\n encodeCompressedWeight(buf, currentPos, weightSize) {\n let originalWeightNumeric = this.getGeneralDecoder().extractNumericValueFromBitArray(currentPos, weightSize);\n this.addWeightCode(buf, originalWeightNumeric);\n let weightNumeric = this.checkWeight(originalWeightNumeric);\n let currentDivisor = 100000;\n for (let i = 0; i < 5; ++i) {\n if (weightNumeric / currentDivisor === 0) {\n buf.append('0');\n }\n currentDivisor /= 10;\n }\n buf.append(weightNumeric);\n }\n }\n\n class AI013x0xDecoder extends AI01weightDecoder {\n constructor(information) {\n super(information);\n }\n parseInformation() {\n if (this.getInformation().getSize() != AI013x0xDecoder.HEADER_SIZE + AI01weightDecoder.GTIN_SIZE + AI013x0xDecoder.WEIGHT_SIZE) {\n throw new NotFoundException();\n }\n let buf = new StringBuilder();\n this.encodeCompressedGtin(buf, AI013x0xDecoder.HEADER_SIZE);\n this.encodeCompressedWeight(buf, AI013x0xDecoder.HEADER_SIZE + AI01weightDecoder.GTIN_SIZE, AI013x0xDecoder.WEIGHT_SIZE);\n return buf.toString();\n }\n }\n AI013x0xDecoder.HEADER_SIZE = 4 + 1;\n AI013x0xDecoder.WEIGHT_SIZE = 15;\n\n class AI013103decoder extends AI013x0xDecoder {\n constructor(information) {\n super(information);\n }\n addWeightCode(buf, weight) {\n buf.append('(3103)');\n }\n checkWeight(weight) {\n return weight;\n }\n }\n\n class AI01320xDecoder extends AI013x0xDecoder {\n constructor(information) {\n super(information);\n }\n addWeightCode(buf, weight) {\n if (weight < 10000) {\n buf.append('(3202)');\n }\n else {\n buf.append('(3203)');\n }\n }\n checkWeight(weight) {\n if (weight < 10000) {\n return weight;\n }\n return weight - 10000;\n }\n }\n\n class AI01392xDecoder extends AI01decoder {\n constructor(information) {\n super(information);\n }\n parseInformation() {\n if (this.getInformation().getSize() < AI01392xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE) {\n throw new NotFoundException();\n }\n let buf = new StringBuilder();\n this.encodeCompressedGtin(buf, AI01392xDecoder.HEADER_SIZE);\n let lastAIdigit = this.getGeneralDecoder().extractNumericValueFromBitArray(AI01392xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE, AI01392xDecoder.LAST_DIGIT_SIZE);\n buf.append('(392');\n buf.append(lastAIdigit);\n buf.append(')');\n let decodedInformation = this.getGeneralDecoder().decodeGeneralPurposeField(AI01392xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE + AI01392xDecoder.LAST_DIGIT_SIZE, null);\n buf.append(decodedInformation.getNewString());\n return buf.toString();\n }\n }\n AI01392xDecoder.HEADER_SIZE = 5 + 1 + 2;\n AI01392xDecoder.LAST_DIGIT_SIZE = 2;\n\n class AI01393xDecoder extends AI01decoder {\n constructor(information) {\n super(information);\n }\n parseInformation() {\n if (this.getInformation().getSize() < AI01393xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE) {\n throw new NotFoundException();\n }\n let buf = new StringBuilder();\n this.encodeCompressedGtin(buf, AI01393xDecoder.HEADER_SIZE);\n let lastAIdigit = this.getGeneralDecoder().extractNumericValueFromBitArray(AI01393xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE, AI01393xDecoder.LAST_DIGIT_SIZE);\n buf.append('(393');\n buf.append(lastAIdigit);\n buf.append(')');\n let firstThreeDigits = this.getGeneralDecoder().extractNumericValueFromBitArray(AI01393xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE + AI01393xDecoder.LAST_DIGIT_SIZE, AI01393xDecoder.FIRST_THREE_DIGITS_SIZE);\n if (firstThreeDigits / 100 == 0) {\n buf.append('0');\n }\n if (firstThreeDigits / 10 == 0) {\n buf.append('0');\n }\n buf.append(firstThreeDigits);\n let generalInformation = this.getGeneralDecoder().decodeGeneralPurposeField(AI01393xDecoder.HEADER_SIZE + AI01decoder.GTIN_SIZE + AI01393xDecoder.LAST_DIGIT_SIZE + AI01393xDecoder.FIRST_THREE_DIGITS_SIZE, null);\n buf.append(generalInformation.getNewString());\n return buf.toString();\n }\n }\n AI01393xDecoder.HEADER_SIZE = 5 + 1 + 2;\n AI01393xDecoder.LAST_DIGIT_SIZE = 2;\n AI01393xDecoder.FIRST_THREE_DIGITS_SIZE = 10;\n\n class AI013x0x1xDecoder extends AI01weightDecoder {\n constructor(information, firstAIdigits, dateCode) {\n super(information);\n this.dateCode = dateCode;\n this.firstAIdigits = firstAIdigits;\n }\n parseInformation() {\n if (this.getInformation().getSize() != AI013x0x1xDecoder.HEADER_SIZE + AI013x0x1xDecoder.GTIN_SIZE + AI013x0x1xDecoder.WEIGHT_SIZE + AI013x0x1xDecoder.DATE_SIZE) {\n throw new NotFoundException();\n }\n let buf = new StringBuilder();\n this.encodeCompressedGtin(buf, AI013x0x1xDecoder.HEADER_SIZE);\n this.encodeCompressedWeight(buf, AI013x0x1xDecoder.HEADER_SIZE + AI013x0x1xDecoder.GTIN_SIZE, AI013x0x1xDecoder.WEIGHT_SIZE);\n this.encodeCompressedDate(buf, AI013x0x1xDecoder.HEADER_SIZE + AI013x0x1xDecoder.GTIN_SIZE + AI013x0x1xDecoder.WEIGHT_SIZE);\n return buf.toString();\n }\n encodeCompressedDate(buf, currentPos) {\n let numericDate = this.getGeneralDecoder().extractNumericValueFromBitArray(currentPos, AI013x0x1xDecoder.DATE_SIZE);\n if (numericDate == 38400) {\n return;\n }\n buf.append('(');\n buf.append(this.dateCode);\n buf.append(')');\n let day = numericDate % 32;\n numericDate /= 32;\n let month = numericDate % 12 + 1;\n numericDate /= 12;\n let year = numericDate;\n if (year / 10 == 0) {\n buf.append('0');\n }\n buf.append(year);\n if (month / 10 == 0) {\n buf.append('0');\n }\n buf.append(month);\n if (day / 10 == 0) {\n buf.append('0');\n }\n buf.append(day);\n }\n addWeightCode(buf, weight) {\n buf.append('(');\n buf.append(this.firstAIdigits);\n buf.append(weight / 100000);\n buf.append(')');\n }\n checkWeight(weight) {\n return weight % 100000;\n }\n }\n AI013x0x1xDecoder.HEADER_SIZE = 7 + 1;\n AI013x0x1xDecoder.WEIGHT_SIZE = 20;\n AI013x0x1xDecoder.DATE_SIZE = 16;\n\n function createDecoder(information) {\n try {\n if (information.get(1)) {\n return new AI01AndOtherAIs(information);\n }\n if (!information.get(2)) {\n return new AnyAIDecoder(information);\n }\n let fourBitEncodationMethod = GeneralAppIdDecoder.extractNumericValueFromBitArray(information, 1, 4);\n switch (fourBitEncodationMethod) {\n case 4: return new AI013103decoder(information);\n case 5: return new AI01320xDecoder(information);\n }\n let fiveBitEncodationMethod = GeneralAppIdDecoder.extractNumericValueFromBitArray(information, 1, 5);\n switch (fiveBitEncodationMethod) {\n case 12: return new AI01392xDecoder(information);\n case 13: return new AI01393xDecoder(information);\n }\n let sevenBitEncodationMethod = GeneralAppIdDecoder.extractNumericValueFromBitArray(information, 1, 7);\n switch (sevenBitEncodationMethod) {\n case 56: return new AI013x0x1xDecoder(information, '310', '11');\n case 57: return new AI013x0x1xDecoder(information, '320', '11');\n case 58: return new AI013x0x1xDecoder(information, '310', '13');\n case 59: return new AI013x0x1xDecoder(information, '320', '13');\n case 60: return new AI013x0x1xDecoder(information, '310', '15');\n case 61: return new AI013x0x1xDecoder(information, '320', '15');\n case 62: return new AI013x0x1xDecoder(information, '310', '17');\n case 63: return new AI013x0x1xDecoder(information, '320', '17');\n }\n }\n catch (e) {\n console.log(e);\n throw new IllegalStateException('unknown decoder: ' + information);\n }\n }\n\n class ExpandedPair {\n constructor(leftChar, rightChar, finderPatter, mayBeLast) {\n this.leftchar = leftChar;\n this.rightchar = rightChar;\n this.finderpattern = finderPatter;\n this.maybeLast = mayBeLast;\n }\n mayBeLast() {\n return this.maybeLast;\n }\n getLeftChar() {\n return this.leftchar;\n }\n getRightChar() {\n return this.rightchar;\n }\n getFinderPattern() {\n return this.finderpattern;\n }\n mustBeLast() {\n return this.rightchar == null;\n }\n toString() {\n return '[ ' + this.leftchar + ', ' + this.rightchar + ' : ' + (this.finderpattern == null ? 'null' : this.finderpattern.getValue()) + ' ]';\n }\n static equals(o1, o2) {\n if (!(o1 instanceof ExpandedPair)) {\n return false;\n }\n return ExpandedPair.equalsOrNull(o1.leftchar, o2.leftchar) &&\n ExpandedPair.equalsOrNull(o1.rightchar, o2.rightchar) &&\n ExpandedPair.equalsOrNull(o1.finderpattern, o2.finderpattern);\n }\n static equalsOrNull(o1, o2) {\n return o1 === null ? o2 === null : ExpandedPair.equals(o1, o2);\n }\n hashCode() {\n // return ExpandedPair.hashNotNull(leftChar) ^ hashNotNull(rightChar) ^ hashNotNull(finderPattern);\n let value = this.leftchar.getValue() ^ this.rightchar.getValue() ^ this.finderpattern.getValue();\n return value;\n }\n }\n\n class ExpandedRow {\n constructor(pairs, rowNumber, wasReversed) {\n this.pairs = pairs;\n this.rowNumber = rowNumber;\n this.wasReversed = wasReversed;\n }\n getPairs() {\n return this.pairs;\n }\n getRowNumber() {\n return this.rowNumber;\n }\n isReversed() {\n return this.wasReversed;\n }\n // check implementation\n isEquivalent(otherPairs) {\n return this.checkEqualitity(this, otherPairs);\n }\n // @Override\n toString() {\n return '{ ' + this.pairs + ' }';\n }\n /**\n * Two rows are equal if they contain the same pairs in the same order.\n */\n // @Override\n // check implementation\n equals(o1, o2) {\n if (!(o1 instanceof ExpandedRow)) {\n return false;\n }\n return this.checkEqualitity(o1, o2) && o1.wasReversed === o2.wasReversed;\n }\n checkEqualitity(pair1, pair2) {\n if (!pair1 || !pair2)\n return;\n let result;\n pair1.forEach((e1, i) => {\n pair2.forEach(e2 => {\n if (e1.getLeftChar().getValue() === e2.getLeftChar().getValue() && e1.getRightChar().getValue() === e2.getRightChar().getValue() && e1.getFinderPatter().getValue() === e2.getFinderPatter().getValue()) {\n result = true;\n }\n });\n });\n return result;\n }\n }\n\n // import java.util.ArrayList;\n // import java.util.Iterator;\n // import java.util.List;\n // import java.util.Map;\n // import java.util.Collections;\n class RSSExpandedReader extends AbstractRSSReader {\n constructor(verbose) {\n super(...arguments);\n this.pairs = new Array(RSSExpandedReader.MAX_PAIRS);\n this.rows = new Array();\n this.startEnd = [2];\n this.verbose = (verbose === true);\n }\n decodeRow(rowNumber, row, hints) {\n // Rows can start with even pattern in case in prev rows there where odd number of patters.\n // So lets try twice\n // this.pairs.clear();\n this.pairs.length = 0;\n this.startFromEven = false;\n try {\n return RSSExpandedReader.constructResult(this.decodeRow2pairs(rowNumber, row));\n }\n catch (e) {\n // OK\n if (this.verbose) {\n console.log(e);\n }\n }\n this.pairs.length = 0;\n this.startFromEven = true;\n return RSSExpandedReader.constructResult(this.decodeRow2pairs(rowNumber, row));\n }\n reset() {\n this.pairs.length = 0;\n this.rows.length = 0;\n }\n // Not private for testing\n decodeRow2pairs(rowNumber, row) {\n let done = false;\n while (!done) {\n try {\n this.pairs.push(this.retrieveNextPair(row, this.pairs, rowNumber));\n }\n catch (error) {\n if (error instanceof NotFoundException) {\n if (!this.pairs.length) {\n throw new NotFoundException();\n }\n // exit this loop when retrieveNextPair() fails and throws\n done = true;\n }\n }\n }\n // TODO: verify sequence of finder patterns as in checkPairSequence()\n if (this.checkChecksum()) {\n return this.pairs;\n }\n let tryStackedDecode;\n if (this.rows.length) {\n tryStackedDecode = true;\n }\n else {\n tryStackedDecode = false;\n }\n // let tryStackedDecode = !this.rows.isEmpty();\n this.storeRow(rowNumber, false); // TODO: deal with reversed rows\n if (tryStackedDecode) {\n // When the image is 180-rotated, then rows are sorted in wrong direction.\n // Try twice with both the directions.\n let ps = this.checkRowsBoolean(false);\n if (ps != null) {\n return ps;\n }\n ps = this.checkRowsBoolean(true);\n if (ps != null) {\n return ps;\n }\n }\n throw new NotFoundException();\n }\n // Need to Verify\n checkRowsBoolean(reverse) {\n // Limit number of rows we are checking\n // We use recursive algorithm with pure complexity and don't want it to take forever\n // Stacked barcode can have up to 11 rows, so 25 seems reasonable enough\n if (this.rows.length > 25) {\n this.rows.length = 0; // We will never have a chance to get result, so clear it\n return null;\n }\n this.pairs.length = 0;\n if (reverse) {\n this.rows = this.rows.reverse();\n // Collections.reverse(this.rows);\n }\n let ps = null;\n try {\n ps = this.checkRows(new Array(), 0);\n }\n catch (e) {\n // OK\n if (this.verbose) {\n console.log(e);\n }\n }\n if (reverse) {\n this.rows = this.rows.reverse();\n // Collections.reverse(this.rows);\n }\n return ps;\n }\n // Try to construct a valid rows sequence\n // Recursion is used to implement backtracking\n checkRows(collectedRows, currentRow) {\n for (let i = currentRow; i < this.rows.length; i++) {\n let row = this.rows[i];\n this.pairs.length = 0;\n for (let collectedRow of collectedRows) {\n this.pairs.push(collectedRow.getPairs());\n }\n this.pairs.push(row.getPairs());\n if (!RSSExpandedReader.isValidSequence(this.pairs)) {\n continue;\n }\n if (this.checkChecksum()) {\n return this.pairs;\n }\n let rs = new Array(collectedRows);\n rs.push(row);\n try {\n // Recursion: try to add more rows\n return this.checkRows(rs, i + 1);\n }\n catch (e) {\n // We failed, try the next candidate\n if (this.verbose) {\n console.log(e);\n }\n }\n }\n throw new NotFoundException();\n }\n // Whether the pairs form a valid find pattern sequence,\n // either complete or a prefix\n static isValidSequence(pairs) {\n for (let sequence of RSSExpandedReader.FINDER_PATTERN_SEQUENCES) {\n if (pairs.length > sequence.length) {\n continue;\n }\n let stop = true;\n for (let j = 0; j < pairs.length; j++) {\n if (pairs[j].getFinderPattern().getValue() != sequence[j]) {\n stop = false;\n break;\n }\n }\n if (stop) {\n return true;\n }\n }\n return false;\n }\n storeRow(rowNumber, wasReversed) {\n // Discard if duplicate above or below; otherwise insert in order by row number.\n let insertPos = 0;\n let prevIsSame = false;\n let nextIsSame = false;\n while (insertPos < this.rows.length) {\n let erow = this.rows[insertPos];\n if (erow.getRowNumber() > rowNumber) {\n nextIsSame = erow.isEquivalent(this.pairs);\n break;\n }\n prevIsSame = erow.isEquivalent(this.pairs);\n insertPos++;\n }\n if (nextIsSame || prevIsSame) {\n return;\n }\n // When the row was partially decoded (e.g. 2 pairs found instead of 3),\n // it will prevent us from detecting the barcode.\n // Try to merge partial rows\n // Check whether the row is part of an allready detected row\n if (RSSExpandedReader.isPartialRow(this.pairs, this.rows)) {\n return;\n }\n this.rows.push(insertPos, new ExpandedRow(this.pairs, rowNumber, wasReversed));\n this.removePartialRows(this.pairs, this.rows);\n }\n // Remove all the rows that contains only specified pairs\n removePartialRows(pairs, rows) {\n // for (Iterator iterator = rows.iterator(); iterator.hasNext();) {\n // ExpandedRow r = iterator.next();\n // if (r.getPairs().size() == pairs.size()) {\n // continue;\n // }\n // boolean allFound = true;\n // for (ExpandedPair p : r.getPairs()) {\n // boolean found = false;\n // for (ExpandedPair pp : pairs) {\n // if (p.equals(pp)) {\n // found = true;\n // break;\n // }\n // }\n // if (!found) {\n // allFound = false;\n // break;\n // }\n // }\n // if (allFound) {\n // // 'pairs' contains all the pairs from the row 'r'\n // iterator.remove();\n // }\n // }\n for (let row of rows) {\n if (row.getPairs().length === pairs.length) {\n continue;\n }\n for (let p of row.getPairs()) {\n for (let pp of pairs) {\n if (ExpandedPair.equals(p, pp)) {\n break;\n }\n }\n }\n }\n }\n // Returns true when one of the rows already contains all the pairs\n static isPartialRow(pairs, rows) {\n for (let r of rows) {\n let allFound = true;\n for (let p of pairs) {\n let found = false;\n for (let pp of r.getPairs()) {\n if (p.equals(pp)) {\n found = true;\n break;\n }\n }\n if (!found) {\n allFound = false;\n break;\n }\n }\n if (allFound) {\n // the row 'r' contain all the pairs from 'pairs'\n return true;\n }\n }\n return false;\n }\n // Only used for unit testing\n getRows() {\n return this.rows;\n }\n // Not private for unit testing\n static constructResult(pairs) {\n let binary = BitArrayBuilder.buildBitArray(pairs);\n let decoder = createDecoder(binary);\n let resultingString = decoder.parseInformation();\n let firstPoints = pairs[0].getFinderPattern().getResultPoints();\n let lastPoints = pairs[pairs.length - 1].getFinderPattern().getResultPoints();\n let points = [firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]];\n return new Result(resultingString, null, null, points, BarcodeFormat$1.RSS_EXPANDED, null);\n }\n checkChecksum() {\n let firstPair = this.pairs.get(0);\n let checkCharacter = firstPair.getLeftChar();\n let firstCharacter = firstPair.getRightChar();\n if (firstCharacter == null) {\n return false;\n }\n let checksum = firstCharacter.getChecksumPortion();\n let s = 2;\n for (let i = 1; i < this.pairs.size(); ++i) {\n let currentPair = this.pairs.get(i);\n checksum += currentPair.getLeftChar().getChecksumPortion();\n s++;\n let currentRightChar = currentPair.getRightChar();\n if (currentRightChar != null) {\n checksum += currentRightChar.getChecksumPortion();\n s++;\n }\n }\n checksum %= 211;\n let checkCharacterValue = 211 * (s - 4) + checksum;\n return checkCharacterValue == checkCharacter.getValue();\n }\n static getNextSecondBar(row, initialPos) {\n let currentPos;\n if (row.get(initialPos)) {\n currentPos = row.getNextUnset(initialPos);\n currentPos = row.getNextSet(currentPos);\n }\n else {\n currentPos = row.getNextSet(initialPos);\n currentPos = row.getNextUnset(currentPos);\n }\n return currentPos;\n }\n // not private for testing\n retrieveNextPair(row, previousPairs, rowNumber) {\n let isOddPattern = previousPairs.length % 2 == 0;\n if (this.startFromEven) {\n isOddPattern = !isOddPattern;\n }\n let pattern;\n let keepFinding = true;\n let forcedOffset = -1;\n do {\n this.findNextPair(row, previousPairs, forcedOffset);\n pattern = this.parseFoundFinderPattern(row, rowNumber, isOddPattern);\n if (pattern == null) {\n forcedOffset = RSSExpandedReader.getNextSecondBar(row, this.startEnd[0]);\n }\n else {\n keepFinding = false;\n }\n } while (keepFinding);\n // When stacked symbol is split over multiple rows, there's no way to guess if this pair can be last or not.\n // boolean mayBeLast = checkPairSequence(previousPairs, pattern);\n let leftChar = this.decodeDataCharacter(row, pattern, isOddPattern, true);\n if (!this.isEmptyPair(previousPairs) && previousPairs[previousPairs.length - 1].mustBeLast()) {\n throw new NotFoundException();\n }\n let rightChar;\n try {\n rightChar = this.decodeDataCharacter(row, pattern, isOddPattern, false);\n }\n catch (e) {\n rightChar = null;\n if (this.verbose) {\n console.log(e);\n }\n }\n return new ExpandedPair(leftChar, rightChar, pattern, true);\n }\n isEmptyPair(pairs) {\n if (pairs.length === 0) {\n return true;\n }\n return false;\n }\n findNextPair(row, previousPairs, forcedOffset) {\n let counters = this.getDecodeFinderCounters();\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n let width = row.getSize();\n let rowOffset;\n if (forcedOffset >= 0) {\n rowOffset = forcedOffset;\n }\n else if (this.isEmptyPair(previousPairs)) {\n rowOffset = 0;\n }\n else {\n let lastPair = previousPairs[previousPairs.length - 1];\n rowOffset = lastPair.getFinderPattern().getStartEnd()[1];\n }\n let searchingEvenPair = previousPairs.length % 2 != 0;\n if (this.startFromEven) {\n searchingEvenPair = !searchingEvenPair;\n }\n let isWhite = false;\n while (rowOffset < width) {\n isWhite = !row.get(rowOffset);\n if (!isWhite) {\n break;\n }\n rowOffset++;\n }\n let counterPosition = 0;\n let patternStart = rowOffset;\n for (let x = rowOffset; x < width; x++) {\n if (row.get(x) != isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition == 3) {\n if (searchingEvenPair) {\n RSSExpandedReader.reverseCounters(counters);\n }\n if (RSSExpandedReader.isFinderPattern(counters)) {\n this.startEnd[0] = patternStart;\n this.startEnd[1] = x;\n return;\n }\n if (searchingEvenPair) {\n RSSExpandedReader.reverseCounters(counters);\n }\n patternStart += counters[0] + counters[1];\n counters[0] = counters[2];\n counters[1] = counters[3];\n counters[2] = 0;\n counters[3] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n throw new NotFoundException();\n }\n static reverseCounters(counters) {\n let length = counters.length;\n for (let i = 0; i < length / 2; ++i) {\n let tmp = counters[i];\n counters[i] = counters[length - i - 1];\n counters[length - i - 1] = tmp;\n }\n }\n parseFoundFinderPattern(row, rowNumber, oddPattern) {\n // Actually we found elements 2-5.\n let firstCounter;\n let start;\n let end;\n if (oddPattern) {\n // If pattern number is odd, we need to locate element 1 *before* the current block.\n let firstElementStart = this.startEnd[0] - 1;\n // Locate element 1\n while (firstElementStart >= 0 && !row.get(firstElementStart)) {\n firstElementStart--;\n }\n firstElementStart++;\n firstCounter = this.startEnd[0] - firstElementStart;\n start = firstElementStart;\n end = this.startEnd[1];\n }\n else {\n // If pattern number is even, the pattern is reversed, so we need to locate element 1 *after* the current block.\n start = this.startEnd[0];\n end = row.getNextUnset(this.startEnd[1] + 1);\n firstCounter = end - this.startEnd[1];\n }\n // Make 'counters' hold 1-4\n let counters = this.getDecodeFinderCounters();\n System.arraycopy(counters, 0, counters, 1, counters.length - 1);\n counters[0] = firstCounter;\n let value;\n try {\n value = this.parseFinderValue(counters, RSSExpandedReader.FINDER_PATTERNS);\n }\n catch (e) {\n return null;\n }\n // return new FinderPattern(value, new int[] { start, end }, start, end, rowNumber});\n return new FinderPattern(value, [start, end], start, end, rowNumber);\n }\n decodeDataCharacter(row, pattern, isOddPattern, leftChar) {\n let counters = this.getDataCharacterCounters();\n for (let x = 0; x < counters.length; x++) {\n counters[x] = 0;\n }\n if (leftChar) {\n RSSExpandedReader.recordPatternInReverse(row, pattern.getStartEnd()[0], counters);\n }\n else {\n RSSExpandedReader.recordPattern(row, pattern.getStartEnd()[1], counters);\n // reverse it\n for (let i = 0, j = counters.length - 1; i < j; i++, j--) {\n let temp = counters[i];\n counters[i] = counters[j];\n counters[j] = temp;\n }\n } // counters[] has the pixels of the module\n let numModules = 17; // left and right data characters have all the same length\n let elementWidth = MathUtils.sum(new Int32Array(counters)) / numModules;\n // Sanity check: element width for pattern and the character should match\n let expectedElementWidth = (pattern.getStartEnd()[1] - pattern.getStartEnd()[0]) / 15.0;\n if (Math.abs(elementWidth - expectedElementWidth) / expectedElementWidth > 0.3) {\n throw new NotFoundException();\n }\n let oddCounts = this.getOddCounts();\n let evenCounts = this.getEvenCounts();\n let oddRoundingErrors = this.getOddRoundingErrors();\n let evenRoundingErrors = this.getEvenRoundingErrors();\n for (let i = 0; i < counters.length; i++) {\n let value = 1.0 * counters[i] / elementWidth;\n let count = value + 0.5; // Round\n if (count < 1) {\n if (value < 0.3) {\n throw new NotFoundException();\n }\n count = 1;\n }\n else if (count > 8) {\n if (value > 8.7) {\n throw new NotFoundException();\n }\n count = 8;\n }\n let offset = i / 2;\n if ((i & 0x01) == 0) {\n oddCounts[offset] = count;\n oddRoundingErrors[offset] = value - count;\n }\n else {\n evenCounts[offset] = count;\n evenRoundingErrors[offset] = value - count;\n }\n }\n this.adjustOddEvenCounts(numModules);\n let weightRowNumber = 4 * pattern.getValue() + (isOddPattern ? 0 : 2) + (leftChar ? 0 : 1) - 1;\n let oddSum = 0;\n let oddChecksumPortion = 0;\n for (let i = oddCounts.length - 1; i >= 0; i--) {\n if (RSSExpandedReader.isNotA1left(pattern, isOddPattern, leftChar)) {\n let weight = RSSExpandedReader.WEIGHTS[weightRowNumber][2 * i];\n oddChecksumPortion += oddCounts[i] * weight;\n }\n oddSum += oddCounts[i];\n }\n let evenChecksumPortion = 0;\n // int evenSum = 0;\n for (let i = evenCounts.length - 1; i >= 0; i--) {\n if (RSSExpandedReader.isNotA1left(pattern, isOddPattern, leftChar)) {\n let weight = RSSExpandedReader.WEIGHTS[weightRowNumber][2 * i + 1];\n evenChecksumPortion += evenCounts[i] * weight;\n }\n // evenSum += evenCounts[i];\n }\n let checksumPortion = oddChecksumPortion + evenChecksumPortion;\n if ((oddSum & 0x01) != 0 || oddSum > 13 || oddSum < 4) {\n throw new NotFoundException();\n }\n let group = (13 - oddSum) / 2;\n let oddWidest = RSSExpandedReader.SYMBOL_WIDEST[group];\n let evenWidest = 9 - oddWidest;\n let vOdd = RSSUtils.getRSSvalue(oddCounts, oddWidest, true);\n let vEven = RSSUtils.getRSSvalue(evenCounts, evenWidest, false);\n let tEven = RSSExpandedReader.EVEN_TOTAL_SUBSET[group];\n let gSum = RSSExpandedReader.GSUM[group];\n let value = vOdd * tEven + vEven + gSum;\n return new DataCharacter(value, checksumPortion);\n }\n static isNotA1left(pattern, isOddPattern, leftChar) {\n // A1: pattern.getValue is 0 (A), and it's an oddPattern, and it is a left char\n return !(pattern.getValue() == 0 && isOddPattern && leftChar);\n }\n adjustOddEvenCounts(numModules) {\n let oddSum = MathUtils.sum(new Int32Array(this.getOddCounts()));\n let evenSum = MathUtils.sum(new Int32Array(this.getEvenCounts()));\n let incrementOdd = false;\n let decrementOdd = false;\n if (oddSum > 13) {\n decrementOdd = true;\n }\n else if (oddSum < 4) {\n incrementOdd = true;\n }\n let incrementEven = false;\n let decrementEven = false;\n if (evenSum > 13) {\n decrementEven = true;\n }\n else if (evenSum < 4) {\n incrementEven = true;\n }\n let mismatch = oddSum + evenSum - numModules;\n let oddParityBad = (oddSum & 0x01) == 1;\n let evenParityBad = (evenSum & 0x01) == 0;\n if (mismatch == 1) {\n if (oddParityBad) {\n if (evenParityBad) {\n throw new NotFoundException();\n }\n decrementOdd = true;\n }\n else {\n if (!evenParityBad) {\n throw new NotFoundException();\n }\n decrementEven = true;\n }\n }\n else if (mismatch == -1) {\n if (oddParityBad) {\n if (evenParityBad) {\n throw new NotFoundException();\n }\n incrementOdd = true;\n }\n else {\n if (!evenParityBad) {\n throw new NotFoundException();\n }\n incrementEven = true;\n }\n }\n else if (mismatch == 0) {\n if (oddParityBad) {\n if (!evenParityBad) {\n throw new NotFoundException();\n }\n // Both bad\n if (oddSum < evenSum) {\n incrementOdd = true;\n decrementEven = true;\n }\n else {\n decrementOdd = true;\n incrementEven = true;\n }\n }\n else {\n if (evenParityBad) {\n throw new NotFoundException();\n }\n // Nothing to do!\n }\n }\n else {\n throw new NotFoundException();\n }\n if (incrementOdd) {\n if (decrementOdd) {\n throw new NotFoundException();\n }\n RSSExpandedReader.increment(this.getOddCounts(), this.getOddRoundingErrors());\n }\n if (decrementOdd) {\n RSSExpandedReader.decrement(this.getOddCounts(), this.getOddRoundingErrors());\n }\n if (incrementEven) {\n if (decrementEven) {\n throw new NotFoundException();\n }\n RSSExpandedReader.increment(this.getEvenCounts(), this.getOddRoundingErrors());\n }\n if (decrementEven) {\n RSSExpandedReader.decrement(this.getEvenCounts(), this.getEvenRoundingErrors());\n }\n }\n }\n RSSExpandedReader.SYMBOL_WIDEST = [7, 5, 4, 3, 1];\n RSSExpandedReader.EVEN_TOTAL_SUBSET = [4, 20, 52, 104, 204];\n RSSExpandedReader.GSUM = [0, 348, 1388, 2948, 3988];\n RSSExpandedReader.FINDER_PATTERNS = [\n Int32Array.from([1, 8, 4, 1]),\n Int32Array.from([3, 6, 4, 1]),\n Int32Array.from([3, 4, 6, 1]),\n Int32Array.from([3, 2, 8, 1]),\n Int32Array.from([2, 6, 5, 1]),\n Int32Array.from([2, 2, 9, 1]) // F\n ];\n RSSExpandedReader.WEIGHTS = [\n [1, 3, 9, 27, 81, 32, 96, 77],\n [20, 60, 180, 118, 143, 7, 21, 63],\n [189, 145, 13, 39, 117, 140, 209, 205],\n [193, 157, 49, 147, 19, 57, 171, 91],\n [62, 186, 136, 197, 169, 85, 44, 132],\n [185, 133, 188, 142, 4, 12, 36, 108],\n [113, 128, 173, 97, 80, 29, 87, 50],\n [150, 28, 84, 41, 123, 158, 52, 156],\n [46, 138, 203, 187, 139, 206, 196, 166],\n [76, 17, 51, 153, 37, 111, 122, 155],\n [43, 129, 176, 106, 107, 110, 119, 146],\n [16, 48, 144, 10, 30, 90, 59, 177],\n [109, 116, 137, 200, 178, 112, 125, 164],\n [70, 210, 208, 202, 184, 130, 179, 115],\n [134, 191, 151, 31, 93, 68, 204, 190],\n [148, 22, 66, 198, 172, 94, 71, 2],\n [6, 18, 54, 162, 64, 192, 154, 40],\n [120, 149, 25, 75, 14, 42, 126, 167],\n [79, 26, 78, 23, 69, 207, 199, 175],\n [103, 98, 83, 38, 114, 131, 182, 124],\n [161, 61, 183, 127, 170, 88, 53, 159],\n [55, 165, 73, 8, 24, 72, 5, 15],\n [45, 135, 194, 160, 58, 174, 100, 89]\n ];\n RSSExpandedReader.FINDER_PAT_A = 0;\n RSSExpandedReader.FINDER_PAT_B = 1;\n RSSExpandedReader.FINDER_PAT_C = 2;\n RSSExpandedReader.FINDER_PAT_D = 3;\n RSSExpandedReader.FINDER_PAT_E = 4;\n RSSExpandedReader.FINDER_PAT_F = 5;\n RSSExpandedReader.FINDER_PATTERN_SEQUENCES = [\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_A],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_B],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_D],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_C],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_F],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_F, RSSExpandedReader.FINDER_PAT_F],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_D],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_E],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_F, RSSExpandedReader.FINDER_PAT_F],\n [RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_A, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_B, RSSExpandedReader.FINDER_PAT_C, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_D, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_E, RSSExpandedReader.FINDER_PAT_F, RSSExpandedReader.FINDER_PAT_F],\n ];\n RSSExpandedReader.MAX_PAIRS = 11;\n\n class Pair extends DataCharacter {\n constructor(value, checksumPortion, finderPattern) {\n super(value, checksumPortion);\n this.count = 0;\n this.finderPattern = finderPattern;\n }\n getFinderPattern() {\n return this.finderPattern;\n }\n getCount() {\n return this.count;\n }\n incrementCount() {\n this.count++;\n }\n }\n\n class RSS14Reader extends AbstractRSSReader {\n constructor() {\n super(...arguments);\n this.possibleLeftPairs = [];\n this.possibleRightPairs = [];\n }\n decodeRow(rowNumber, row, hints) {\n const leftPair = this.decodePair(row, false, rowNumber, hints);\n RSS14Reader.addOrTally(this.possibleLeftPairs, leftPair);\n row.reverse();\n let rightPair = this.decodePair(row, true, rowNumber, hints);\n RSS14Reader.addOrTally(this.possibleRightPairs, rightPair);\n row.reverse();\n for (let left of this.possibleLeftPairs) {\n if (left.getCount() > 1) {\n for (let right of this.possibleRightPairs) {\n if (right.getCount() > 1 && RSS14Reader.checkChecksum(left, right)) {\n return RSS14Reader.constructResult(left, right);\n }\n }\n }\n }\n throw new NotFoundException();\n }\n static addOrTally(possiblePairs, pair) {\n if (pair == null) {\n return;\n }\n let found = false;\n for (let other of possiblePairs) {\n if (other.getValue() === pair.getValue()) {\n other.incrementCount();\n found = true;\n break;\n }\n }\n if (!found) {\n possiblePairs.push(pair);\n }\n }\n reset() {\n this.possibleLeftPairs.length = 0;\n this.possibleRightPairs.length = 0;\n }\n static constructResult(leftPair, rightPair) {\n let symbolValue = 4537077 * leftPair.getValue() + rightPair.getValue();\n let text = new String(symbolValue).toString();\n let buffer = new StringBuilder();\n for (let i = 13 - text.length; i > 0; i--) {\n buffer.append('0');\n }\n buffer.append(text);\n let checkDigit = 0;\n for (let i = 0; i < 13; i++) {\n let digit = buffer.charAt(i).charCodeAt(0) - '0'.charCodeAt(0);\n checkDigit += ((i & 0x01) === 0) ? 3 * digit : digit;\n }\n checkDigit = 10 - (checkDigit % 10);\n if (checkDigit === 10) {\n checkDigit = 0;\n }\n buffer.append(checkDigit.toString());\n let leftPoints = leftPair.getFinderPattern().getResultPoints();\n let rightPoints = rightPair.getFinderPattern().getResultPoints();\n return new Result(buffer.toString(), null, 0, [leftPoints[0], leftPoints[1], rightPoints[0], rightPoints[1]], BarcodeFormat$1.RSS_14, new Date().getTime());\n }\n static checkChecksum(leftPair, rightPair) {\n let checkValue = (leftPair.getChecksumPortion() + 16 * rightPair.getChecksumPortion()) % 79;\n let targetCheckValue = 9 * leftPair.getFinderPattern().getValue() + rightPair.getFinderPattern().getValue();\n if (targetCheckValue > 72) {\n targetCheckValue--;\n }\n if (targetCheckValue > 8) {\n targetCheckValue--;\n }\n return checkValue === targetCheckValue;\n }\n decodePair(row, right, rowNumber, hints) {\n try {\n let startEnd = this.findFinderPattern(row, right);\n let pattern = this.parseFoundFinderPattern(row, rowNumber, right, startEnd);\n let resultPointCallback = hints == null ? null : hints.get(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK);\n if (resultPointCallback != null) {\n let center = (startEnd[0] + startEnd[1]) / 2.0;\n if (right) {\n // row is actually reversed\n center = row.getSize() - 1 - center;\n }\n resultPointCallback.foundPossibleResultPoint(new ResultPoint(center, rowNumber));\n }\n let outside = this.decodeDataCharacter(row, pattern, true);\n let inside = this.decodeDataCharacter(row, pattern, false);\n return new Pair(1597 * outside.getValue() + inside.getValue(), outside.getChecksumPortion() + 4 * inside.getChecksumPortion(), pattern);\n }\n catch (err) {\n return null;\n }\n }\n decodeDataCharacter(row, pattern, outsideChar) {\n let counters = this.getDataCharacterCounters();\n for (let x = 0; x < counters.length; x++) {\n counters[x] = 0;\n }\n if (outsideChar) {\n OneDReader.recordPatternInReverse(row, pattern.getStartEnd()[0], counters);\n }\n else {\n OneDReader.recordPattern(row, pattern.getStartEnd()[1] + 1, counters);\n // reverse it\n for (let i = 0, j = counters.length - 1; i < j; i++, j--) {\n let temp = counters[i];\n counters[i] = counters[j];\n counters[j] = temp;\n }\n }\n let numModules = outsideChar ? 16 : 15;\n let elementWidth = MathUtils.sum(new Int32Array(counters)) / numModules;\n let oddCounts = this.getOddCounts();\n let evenCounts = this.getEvenCounts();\n let oddRoundingErrors = this.getOddRoundingErrors();\n let evenRoundingErrors = this.getEvenRoundingErrors();\n for (let i = 0; i < counters.length; i++) {\n let value = counters[i] / elementWidth;\n let count = Math.floor(value + 0.5);\n if (count < 1) {\n count = 1;\n }\n else if (count > 8) {\n count = 8;\n }\n let offset = Math.floor(i / 2);\n if ((i & 0x01) === 0) {\n oddCounts[offset] = count;\n oddRoundingErrors[offset] = value - count;\n }\n else {\n evenCounts[offset] = count;\n evenRoundingErrors[offset] = value - count;\n }\n }\n this.adjustOddEvenCounts(outsideChar, numModules);\n let oddSum = 0;\n let oddChecksumPortion = 0;\n for (let i = oddCounts.length - 1; i >= 0; i--) {\n oddChecksumPortion *= 9;\n oddChecksumPortion += oddCounts[i];\n oddSum += oddCounts[i];\n }\n let evenChecksumPortion = 0;\n let evenSum = 0;\n for (let i = evenCounts.length - 1; i >= 0; i--) {\n evenChecksumPortion *= 9;\n evenChecksumPortion += evenCounts[i];\n evenSum += evenCounts[i];\n }\n let checksumPortion = oddChecksumPortion + 3 * evenChecksumPortion;\n if (outsideChar) {\n if ((oddSum & 0x01) !== 0 || oddSum > 12 || oddSum < 4) {\n throw new NotFoundException();\n }\n let group = (12 - oddSum) / 2;\n let oddWidest = RSS14Reader.OUTSIDE_ODD_WIDEST[group];\n let evenWidest = 9 - oddWidest;\n let vOdd = RSSUtils.getRSSvalue(oddCounts, oddWidest, false);\n let vEven = RSSUtils.getRSSvalue(evenCounts, evenWidest, true);\n let tEven = RSS14Reader.OUTSIDE_EVEN_TOTAL_SUBSET[group];\n let gSum = RSS14Reader.OUTSIDE_GSUM[group];\n return new DataCharacter(vOdd * tEven + vEven + gSum, checksumPortion);\n }\n else {\n if ((evenSum & 0x01) !== 0 || evenSum > 10 || evenSum < 4) {\n throw new NotFoundException();\n }\n let group = (10 - evenSum) / 2;\n let oddWidest = RSS14Reader.INSIDE_ODD_WIDEST[group];\n let evenWidest = 9 - oddWidest;\n let vOdd = RSSUtils.getRSSvalue(oddCounts, oddWidest, true);\n let vEven = RSSUtils.getRSSvalue(evenCounts, evenWidest, false);\n let tOdd = RSS14Reader.INSIDE_ODD_TOTAL_SUBSET[group];\n let gSum = RSS14Reader.INSIDE_GSUM[group];\n return new DataCharacter(vEven * tOdd + vOdd + gSum, checksumPortion);\n }\n }\n findFinderPattern(row, rightFinderPattern) {\n let counters = this.getDecodeFinderCounters();\n counters[0] = 0;\n counters[1] = 0;\n counters[2] = 0;\n counters[3] = 0;\n let width = row.getSize();\n let isWhite = false;\n let rowOffset = 0;\n while (rowOffset < width) {\n isWhite = !row.get(rowOffset);\n if (rightFinderPattern === isWhite) {\n // Will encounter white first when searching for right finder pattern\n break;\n }\n rowOffset++;\n }\n let counterPosition = 0;\n let patternStart = rowOffset;\n for (let x = rowOffset; x < width; x++) {\n if (row.get(x) !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition === 3) {\n if (AbstractRSSReader.isFinderPattern(counters)) {\n return [patternStart, x];\n }\n patternStart += counters[0] + counters[1];\n counters[0] = counters[2];\n counters[1] = counters[3];\n counters[2] = 0;\n counters[3] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n throw new NotFoundException();\n }\n parseFoundFinderPattern(row, rowNumber, right, startEnd) {\n // Actually we found elements 2-5\n let firstIsBlack = row.get(startEnd[0]);\n let firstElementStart = startEnd[0] - 1;\n // Locate element 1\n while (firstElementStart >= 0 && firstIsBlack !== row.get(firstElementStart)) {\n firstElementStart--;\n }\n firstElementStart++;\n const firstCounter = startEnd[0] - firstElementStart;\n // Make 'counters' hold 1-4\n const counters = this.getDecodeFinderCounters();\n const copy = new Int32Array(counters.length);\n System.arraycopy(counters, 0, copy, 1, counters.length - 1);\n copy[0] = firstCounter;\n const value = this.parseFinderValue(copy, RSS14Reader.FINDER_PATTERNS);\n let start = firstElementStart;\n let end = startEnd[1];\n if (right) {\n // row is actually reversed\n start = row.getSize() - 1 - start;\n end = row.getSize() - 1 - end;\n }\n return new FinderPattern(value, [firstElementStart, startEnd[1]], start, end, rowNumber);\n }\n adjustOddEvenCounts(outsideChar, numModules) {\n let oddSum = MathUtils.sum(new Int32Array(this.getOddCounts()));\n let evenSum = MathUtils.sum(new Int32Array(this.getEvenCounts()));\n let incrementOdd = false;\n let decrementOdd = false;\n let incrementEven = false;\n let decrementEven = false;\n if (outsideChar) {\n if (oddSum > 12) {\n decrementOdd = true;\n }\n else if (oddSum < 4) {\n incrementOdd = true;\n }\n if (evenSum > 12) {\n decrementEven = true;\n }\n else if (evenSum < 4) {\n incrementEven = true;\n }\n }\n else {\n if (oddSum > 11) {\n decrementOdd = true;\n }\n else if (oddSum < 5) {\n incrementOdd = true;\n }\n if (evenSum > 10) {\n decrementEven = true;\n }\n else if (evenSum < 4) {\n incrementEven = true;\n }\n }\n let mismatch = oddSum + evenSum - numModules;\n let oddParityBad = (oddSum & 0x01) === (outsideChar ? 1 : 0);\n let evenParityBad = (evenSum & 0x01) === 1;\n if (mismatch === 1) {\n if (oddParityBad) {\n if (evenParityBad) {\n throw new NotFoundException();\n }\n decrementOdd = true;\n }\n else {\n if (!evenParityBad) {\n throw new NotFoundException();\n }\n decrementEven = true;\n }\n }\n else if (mismatch === -1) {\n if (oddParityBad) {\n if (evenParityBad) {\n throw new NotFoundException();\n }\n incrementOdd = true;\n }\n else {\n if (!evenParityBad) {\n throw new NotFoundException();\n }\n incrementEven = true;\n }\n }\n else if (mismatch === 0) {\n if (oddParityBad) {\n if (!evenParityBad) {\n throw new NotFoundException();\n }\n // Both bad\n if (oddSum < evenSum) {\n incrementOdd = true;\n decrementEven = true;\n }\n else {\n decrementOdd = true;\n incrementEven = true;\n }\n }\n else {\n if (evenParityBad) {\n throw new NotFoundException();\n }\n // Nothing to do!\n }\n }\n else {\n throw new NotFoundException();\n }\n if (incrementOdd) {\n if (decrementOdd) {\n throw new NotFoundException();\n }\n AbstractRSSReader.increment(this.getOddCounts(), this.getOddRoundingErrors());\n }\n if (decrementOdd) {\n AbstractRSSReader.decrement(this.getOddCounts(), this.getOddRoundingErrors());\n }\n if (incrementEven) {\n if (decrementEven) {\n throw new NotFoundException();\n }\n AbstractRSSReader.increment(this.getEvenCounts(), this.getOddRoundingErrors());\n }\n if (decrementEven) {\n AbstractRSSReader.decrement(this.getEvenCounts(), this.getEvenRoundingErrors());\n }\n }\n }\n RSS14Reader.OUTSIDE_EVEN_TOTAL_SUBSET = [1, 10, 34, 70, 126];\n RSS14Reader.INSIDE_ODD_TOTAL_SUBSET = [4, 20, 48, 81];\n RSS14Reader.OUTSIDE_GSUM = [0, 161, 961, 2015, 2715];\n RSS14Reader.INSIDE_GSUM = [0, 336, 1036, 1516];\n RSS14Reader.OUTSIDE_ODD_WIDEST = [8, 6, 4, 3, 1];\n RSS14Reader.INSIDE_ODD_WIDEST = [2, 4, 6, 8];\n RSS14Reader.FINDER_PATTERNS = [\n Int32Array.from([3, 8, 2, 1]),\n Int32Array.from([3, 5, 5, 1]),\n Int32Array.from([3, 3, 7, 1]),\n Int32Array.from([3, 1, 9, 1]),\n Int32Array.from([2, 7, 4, 1]),\n Int32Array.from([2, 5, 6, 1]),\n Int32Array.from([2, 3, 8, 1]),\n Int32Array.from([1, 5, 7, 1]),\n Int32Array.from([1, 3, 9, 1]),\n ];\n\n /**\n * @author Daniel Switkin \n * @author Sean Owen\n */\n class MultiFormatOneDReader extends OneDReader {\n constructor(hints, verbose) {\n super();\n this.readers = [];\n this.verbose = (verbose === true);\n const possibleFormats = !hints ? null : hints.get(DecodeHintType$1.POSSIBLE_FORMATS);\n const useCode39CheckDigit = hints && hints.get(DecodeHintType$1.ASSUME_CODE_39_CHECK_DIGIT) !== undefined;\n if (possibleFormats) {\n if (possibleFormats.includes(BarcodeFormat$1.EAN_13) ||\n possibleFormats.includes(BarcodeFormat$1.UPC_A) ||\n possibleFormats.includes(BarcodeFormat$1.EAN_8) ||\n possibleFormats.includes(BarcodeFormat$1.UPC_E)) {\n this.readers.push(new MultiFormatUPCEANReader(hints));\n }\n if (possibleFormats.includes(BarcodeFormat$1.CODE_39)) {\n this.readers.push(new Code39Reader(useCode39CheckDigit));\n }\n // if (possibleFormats.includes(BarcodeFormat.CODE_93)) {\n // this.readers.push(new Code93Reader());\n // }\n if (possibleFormats.includes(BarcodeFormat$1.CODE_128)) {\n this.readers.push(new Code128Reader());\n }\n if (possibleFormats.includes(BarcodeFormat$1.ITF)) {\n this.readers.push(new ITFReader());\n }\n // if (possibleFormats.includes(BarcodeFormat.CODABAR)) {\n // this.readers.push(new CodaBarReader());\n // }\n if (possibleFormats.includes(BarcodeFormat$1.RSS_14)) {\n this.readers.push(new RSS14Reader());\n }\n if (possibleFormats.includes(BarcodeFormat$1.RSS_EXPANDED)) {\n this.readers.push(new RSSExpandedReader(this.verbose));\n }\n } else {\n // Case when no hints were provided -> add all.\n this.readers.push(new MultiFormatUPCEANReader(hints));\n this.readers.push(new Code39Reader());\n // this.readers.push(new CodaBarReader());\n // this.readers.push(new Code93Reader());\n this.readers.push(new MultiFormatUPCEANReader(hints));\n this.readers.push(new Code128Reader());\n this.readers.push(new ITFReader());\n this.readers.push(new RSS14Reader());\n this.readers.push(new RSSExpandedReader(this.verbose));\n }\n }\n // @Override\n decodeRow(rowNumber, row, hints) {\n for (let i = 0; i < this.readers.length; i++) {\n try {\n return this.readers[i].decodeRow(rowNumber, row, hints);\n }\n catch (re) {\n // continue\n }\n }\n throw new NotFoundException();\n }\n // @Override\n reset() {\n this.readers.forEach(reader => reader.reset());\n }\n }\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * Barcode reader reader to use from browser.\n */\n class BrowserBarcodeReader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserBarcodeReader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n * @param {Map} hints\n */\n constructor(timeBetweenScansMillis = 500, hints) {\n super(new MultiFormatOneDReader(hints), timeBetweenScansMillis, hints);\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will\n * use blocks of differing sizes within one version, so, this encapsulates the parameters for\n * each set of blocks. It also holds the number of error-correction codewords per block since it\n * will be the same across all blocks within one version.

\n */\n class ECBlocks {\n constructor(ecCodewords, ecBlocks1, ecBlocks2) {\n this.ecCodewords = ecCodewords;\n this.ecBlocks = [ecBlocks1];\n ecBlocks2 && this.ecBlocks.push(ecBlocks2);\n }\n getECCodewords() {\n return this.ecCodewords;\n }\n getECBlocks() {\n return this.ecBlocks;\n }\n }\n /**\n *

Encapsulates the parameters for one error-correction block in one symbol version.\n * This includes the number of data codewords, and the number of times a block with these\n * parameters is used consecutively in the Data Matrix code version's format.

\n */\n class ECB {\n constructor(count, dataCodewords) {\n this.count = count;\n this.dataCodewords = dataCodewords;\n }\n getCount() {\n return this.count;\n }\n getDataCodewords() {\n return this.dataCodewords;\n }\n }\n /**\n * The Version object encapsulates attributes about a particular\n * size Data Matrix Code.\n *\n * @author bbrown@google.com (Brian Brown)\n */\n class Version {\n constructor(versionNumber, symbolSizeRows, symbolSizeColumns, dataRegionSizeRows, dataRegionSizeColumns, ecBlocks) {\n this.versionNumber = versionNumber;\n this.symbolSizeRows = symbolSizeRows;\n this.symbolSizeColumns = symbolSizeColumns;\n this.dataRegionSizeRows = dataRegionSizeRows;\n this.dataRegionSizeColumns = dataRegionSizeColumns;\n this.ecBlocks = ecBlocks;\n // Calculate the total number of codewords\n let total = 0;\n const ecCodewords = ecBlocks.getECCodewords();\n const ecbArray = ecBlocks.getECBlocks();\n for (let ecBlock of ecbArray) {\n total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords);\n }\n this.totalCodewords = total;\n }\n getVersionNumber() {\n return this.versionNumber;\n }\n getSymbolSizeRows() {\n return this.symbolSizeRows;\n }\n getSymbolSizeColumns() {\n return this.symbolSizeColumns;\n }\n getDataRegionSizeRows() {\n return this.dataRegionSizeRows;\n }\n getDataRegionSizeColumns() {\n return this.dataRegionSizeColumns;\n }\n getTotalCodewords() {\n return this.totalCodewords;\n }\n getECBlocks() {\n return this.ecBlocks;\n }\n /**\n *

Deduces version information from Data Matrix dimensions.

\n *\n * @param numRows Number of rows in modules\n * @param numColumns Number of columns in modules\n * @return Version for a Data Matrix Code of those dimensions\n * @throws FormatException if dimensions do correspond to a valid Data Matrix size\n */\n static getVersionForDimensions(numRows, numColumns) {\n if ((numRows & 0x01) !== 0 || (numColumns & 0x01) !== 0) {\n throw new FormatException();\n }\n for (let version of Version.VERSIONS) {\n if (version.symbolSizeRows === numRows && version.symbolSizeColumns === numColumns) {\n return version;\n }\n }\n throw new FormatException();\n }\n // @Override\n toString() {\n return '' + this.versionNumber;\n }\n /**\n * See ISO 16022:2006 5.5.1 Table 7\n */\n static buildVersions() {\n return [\n new Version(1, 10, 10, 8, 8, new ECBlocks(5, new ECB(1, 3))),\n new Version(2, 12, 12, 10, 10, new ECBlocks(7, new ECB(1, 5))),\n new Version(3, 14, 14, 12, 12, new ECBlocks(10, new ECB(1, 8))),\n new Version(4, 16, 16, 14, 14, new ECBlocks(12, new ECB(1, 12))),\n new Version(5, 18, 18, 16, 16, new ECBlocks(14, new ECB(1, 18))),\n new Version(6, 20, 20, 18, 18, new ECBlocks(18, new ECB(1, 22))),\n new Version(7, 22, 22, 20, 20, new ECBlocks(20, new ECB(1, 30))),\n new Version(8, 24, 24, 22, 22, new ECBlocks(24, new ECB(1, 36))),\n new Version(9, 26, 26, 24, 24, new ECBlocks(28, new ECB(1, 44))),\n new Version(10, 32, 32, 14, 14, new ECBlocks(36, new ECB(1, 62))),\n new Version(11, 36, 36, 16, 16, new ECBlocks(42, new ECB(1, 86))),\n new Version(12, 40, 40, 18, 18, new ECBlocks(48, new ECB(1, 114))),\n new Version(13, 44, 44, 20, 20, new ECBlocks(56, new ECB(1, 144))),\n new Version(14, 48, 48, 22, 22, new ECBlocks(68, new ECB(1, 174))),\n new Version(15, 52, 52, 24, 24, new ECBlocks(42, new ECB(2, 102))),\n new Version(16, 64, 64, 14, 14, new ECBlocks(56, new ECB(2, 140))),\n new Version(17, 72, 72, 16, 16, new ECBlocks(36, new ECB(4, 92))),\n new Version(18, 80, 80, 18, 18, new ECBlocks(48, new ECB(4, 114))),\n new Version(19, 88, 88, 20, 20, new ECBlocks(56, new ECB(4, 144))),\n new Version(20, 96, 96, 22, 22, new ECBlocks(68, new ECB(4, 174))),\n new Version(21, 104, 104, 24, 24, new ECBlocks(56, new ECB(6, 136))),\n new Version(22, 120, 120, 18, 18, new ECBlocks(68, new ECB(6, 175))),\n new Version(23, 132, 132, 20, 20, new ECBlocks(62, new ECB(8, 163))),\n new Version(24, 144, 144, 22, 22, new ECBlocks(62, new ECB(8, 156), new ECB(2, 155))),\n new Version(25, 8, 18, 6, 16, new ECBlocks(7, new ECB(1, 5))),\n new Version(26, 8, 32, 6, 14, new ECBlocks(11, new ECB(1, 10))),\n new Version(27, 12, 26, 10, 24, new ECBlocks(14, new ECB(1, 16))),\n new Version(28, 12, 36, 10, 16, new ECBlocks(18, new ECB(1, 22))),\n new Version(29, 16, 36, 14, 16, new ECBlocks(24, new ECB(1, 32))),\n new Version(30, 16, 48, 14, 22, new ECBlocks(28, new ECB(1, 49)))\n ];\n }\n }\n Version.VERSIONS = Version.buildVersions();\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author bbrown@google.com (Brian Brown)\n */\n class BitMatrixParser {\n /**\n * @param bitMatrix {@link BitMatrix} to parse\n * @throws FormatException if dimension is < 8 or > 144 or not 0 mod 2\n */\n constructor(bitMatrix) {\n const dimension = bitMatrix.getHeight();\n if (dimension < 8 || dimension > 144 || (dimension & 0x01) !== 0) {\n throw new FormatException();\n }\n this.version = BitMatrixParser.readVersion(bitMatrix);\n this.mappingBitMatrix = this.extractDataRegion(bitMatrix);\n this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getWidth(), this.mappingBitMatrix.getHeight());\n }\n getVersion() {\n return this.version;\n }\n /**\n *

Creates the version object based on the dimension of the original bit matrix from\n * the datamatrix code.

\n *\n *

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

\n *\n * @param bitMatrix Original {@link BitMatrix} including alignment patterns\n * @return {@link Version} encapsulating the Data Matrix Code's \"version\"\n * @throws FormatException if the dimensions of the mapping matrix are not valid\n * Data Matrix dimensions.\n */\n static readVersion(bitMatrix) {\n const numRows = bitMatrix.getHeight();\n const numColumns = bitMatrix.getWidth();\n return Version.getVersionForDimensions(numRows, numColumns);\n }\n /**\n *

Reads the bits in the {@link BitMatrix} representing the mapping matrix (No alignment patterns)\n * in the correct order in order to reconstitute the codewords bytes contained within the\n * Data Matrix Code.

\n *\n * @return bytes encoded within the Data Matrix Code\n * @throws FormatException if the exact number of bytes expected is not read\n */\n readCodewords() {\n const result = new Int8Array(this.version.getTotalCodewords());\n let resultOffset = 0;\n let row = 4;\n let column = 0;\n const numRows = this.mappingBitMatrix.getHeight();\n const numColumns = this.mappingBitMatrix.getWidth();\n let corner1Read = false;\n let corner2Read = false;\n let corner3Read = false;\n let corner4Read = false;\n // Read all of the codewords\n do {\n // Check the four corner cases\n if ((row === numRows) && (column === 0) && !corner1Read) {\n result[resultOffset++] = this.readCorner1(numRows, numColumns) & 0xff;\n row -= 2;\n column += 2;\n corner1Read = true;\n }\n else if ((row === numRows - 2) && (column === 0) && ((numColumns & 0x03) !== 0) && !corner2Read) {\n result[resultOffset++] = this.readCorner2(numRows, numColumns) & 0xff;\n row -= 2;\n column += 2;\n corner2Read = true;\n }\n else if ((row === numRows + 4) && (column === 2) && ((numColumns & 0x07) === 0) && !corner3Read) {\n result[resultOffset++] = this.readCorner3(numRows, numColumns) & 0xff;\n row -= 2;\n column += 2;\n corner3Read = true;\n }\n else if ((row === numRows - 2) && (column === 0) && ((numColumns & 0x07) === 4) && !corner4Read) {\n result[resultOffset++] = this.readCorner4(numRows, numColumns) & 0xff;\n row -= 2;\n column += 2;\n corner4Read = true;\n }\n else {\n // Sweep upward diagonally to the right\n do {\n if ((row < numRows) && (column >= 0) && !this.readMappingMatrix.get(column, row)) {\n result[resultOffset++] = this.readUtah(row, column, numRows, numColumns) & 0xff;\n }\n row -= 2;\n column += 2;\n } while ((row >= 0) && (column < numColumns));\n row += 1;\n column += 3;\n // Sweep downward diagonally to the left\n do {\n if ((row >= 0) && (column < numColumns) && !this.readMappingMatrix.get(column, row)) {\n result[resultOffset++] = this.readUtah(row, column, numRows, numColumns) & 0xff;\n }\n row += 2;\n column -= 2;\n } while ((row < numRows) && (column >= 0));\n row += 3;\n column += 1;\n }\n } while ((row < numRows) || (column < numColumns));\n if (resultOffset !== this.version.getTotalCodewords()) {\n throw new FormatException();\n }\n return result;\n }\n /**\n *

Reads a bit of the mapping matrix accounting for boundary wrapping.

\n *\n * @param row Row to read in the mapping matrix\n * @param column Column to read in the mapping matrix\n * @param numRows Number of rows in the mapping matrix\n * @param numColumns Number of columns in the mapping matrix\n * @return value of the given bit in the mapping matrix\n */\n readModule(row, column, numRows, numColumns) {\n // Adjust the row and column indices based on boundary wrapping\n if (row < 0) {\n row += numRows;\n column += 4 - ((numRows + 4) & 0x07);\n }\n if (column < 0) {\n column += numColumns;\n row += 4 - ((numColumns + 4) & 0x07);\n }\n this.readMappingMatrix.set(column, row);\n return this.mappingBitMatrix.get(column, row);\n }\n /**\n *

Reads the 8 bits of the standard Utah-shaped pattern.

\n *\n *

See ISO 16022:2006, 5.8.1 Figure 6

\n *\n * @param row Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern\n * @param column Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern\n * @param numRows Number of rows in the mapping matrix\n * @param numColumns Number of columns in the mapping matrix\n * @return byte from the utah shape\n */\n readUtah(row, column, numRows, numColumns) {\n let currentByte = 0;\n if (this.readModule(row - 2, column - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row - 2, column - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row - 1, column - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row - 1, column - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row - 1, column, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row, column - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row, column - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(row, column, numRows, numColumns)) {\n currentByte |= 1;\n }\n return currentByte;\n }\n /**\n *

Reads the 8 bits of the special corner condition 1.

\n *\n *

See ISO 16022:2006, Figure F.3

\n *\n * @param numRows Number of rows in the mapping matrix\n * @param numColumns Number of columns in the mapping matrix\n * @return byte from the Corner condition 1\n */\n readCorner1(numRows, numColumns) {\n let currentByte = 0;\n if (this.readModule(numRows - 1, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 1, 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 1, 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(1, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(2, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(3, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n return currentByte;\n }\n /**\n *

Reads the 8 bits of the special corner condition 2.

\n *\n *

See ISO 16022:2006, Figure F.4

\n *\n * @param numRows Number of rows in the mapping matrix\n * @param numColumns Number of columns in the mapping matrix\n * @return byte from the Corner condition 2\n */\n readCorner2(numRows, numColumns) {\n let currentByte = 0;\n if (this.readModule(numRows - 3, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 2, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 1, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 4, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 3, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(1, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n return currentByte;\n }\n /**\n *

Reads the 8 bits of the special corner condition 3.

\n *\n *

See ISO 16022:2006, Figure F.5

\n *\n * @param numRows Number of rows in the mapping matrix\n * @param numColumns Number of columns in the mapping matrix\n * @return byte from the Corner condition 3\n */\n readCorner3(numRows, numColumns) {\n let currentByte = 0;\n if (this.readModule(numRows - 1, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 1, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 3, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(1, numColumns - 3, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(1, numColumns - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(1, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n return currentByte;\n }\n /**\n *

Reads the 8 bits of the special corner condition 4.

\n *\n *

See ISO 16022:2006, Figure F.6

\n *\n * @param numRows Number of rows in the mapping matrix\n * @param numColumns Number of columns in the mapping matrix\n * @return byte from the Corner condition 4\n */\n readCorner4(numRows, numColumns) {\n let currentByte = 0;\n if (this.readModule(numRows - 3, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 2, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(numRows - 1, 0, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 2, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(0, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(1, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(2, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n currentByte <<= 1;\n if (this.readModule(3, numColumns - 1, numRows, numColumns)) {\n currentByte |= 1;\n }\n return currentByte;\n }\n /**\n *

Extracts the data region from a {@link BitMatrix} that contains\n * alignment patterns.

\n *\n * @param bitMatrix Original {@link BitMatrix} with alignment patterns\n * @return BitMatrix that has the alignment patterns removed\n */\n extractDataRegion(bitMatrix) {\n const symbolSizeRows = this.version.getSymbolSizeRows();\n const symbolSizeColumns = this.version.getSymbolSizeColumns();\n if (bitMatrix.getHeight() !== symbolSizeRows) {\n throw new IllegalArgumentException('Dimension of bitMatrix must match the version size');\n }\n const dataRegionSizeRows = this.version.getDataRegionSizeRows();\n const dataRegionSizeColumns = this.version.getDataRegionSizeColumns();\n const numDataRegionsRow = symbolSizeRows / dataRegionSizeRows | 0;\n const numDataRegionsColumn = symbolSizeColumns / dataRegionSizeColumns | 0;\n const sizeDataRegionRow = numDataRegionsRow * dataRegionSizeRows;\n const sizeDataRegionColumn = numDataRegionsColumn * dataRegionSizeColumns;\n const bitMatrixWithoutAlignment = new BitMatrix(sizeDataRegionColumn, sizeDataRegionRow);\n for (let dataRegionRow = 0; dataRegionRow < numDataRegionsRow; ++dataRegionRow) {\n const dataRegionRowOffset = dataRegionRow * dataRegionSizeRows;\n for (let dataRegionColumn = 0; dataRegionColumn < numDataRegionsColumn; ++dataRegionColumn) {\n const dataRegionColumnOffset = dataRegionColumn * dataRegionSizeColumns;\n for (let i = 0; i < dataRegionSizeRows; ++i) {\n const readRowOffset = dataRegionRow * (dataRegionSizeRows + 2) + 1 + i;\n const writeRowOffset = dataRegionRowOffset + i;\n for (let j = 0; j < dataRegionSizeColumns; ++j) {\n const readColumnOffset = dataRegionColumn * (dataRegionSizeColumns + 2) + 1 + j;\n if (bitMatrix.get(readColumnOffset, readRowOffset)) {\n const writeColumnOffset = dataRegionColumnOffset + j;\n bitMatrixWithoutAlignment.set(writeColumnOffset, writeRowOffset);\n }\n }\n }\n }\n }\n return bitMatrixWithoutAlignment;\n }\n }\n\n /**\n *

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into\n * multiple blocks, each of which is a unit of data and error-correction codewords. Each\n * is represented by an instance of this class.

\n *\n * @author bbrown@google.com (Brian Brown)\n */\n class DataBlock {\n constructor(numDataCodewords, codewords) {\n this.numDataCodewords = numDataCodewords;\n this.codewords = codewords;\n }\n /**\n *

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them.\n * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This\n * method will separate the data into original blocks.

\n *\n * @param rawCodewords bytes as read directly from the Data Matrix Code\n * @param version version of the Data Matrix Code\n * @return DataBlocks containing original bytes, \"de-interleaved\" from representation in the\n * Data Matrix Code\n */\n static getDataBlocks(rawCodewords, version) {\n // Figure out the number and size of data blocks used by this version\n const ecBlocks = version.getECBlocks();\n // First count the total number of data blocks\n let totalBlocks = 0;\n const ecBlockArray = ecBlocks.getECBlocks();\n for (let ecBlock of ecBlockArray) {\n totalBlocks += ecBlock.getCount();\n }\n // Now establish DataBlocks of the appropriate size and number of data codewords\n const result = new Array(totalBlocks);\n let numResultBlocks = 0;\n for (let ecBlock of ecBlockArray) {\n for (let i = 0; i < ecBlock.getCount(); i++) {\n const numDataCodewords = ecBlock.getDataCodewords();\n const numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords;\n result[numResultBlocks++] = new DataBlock(numDataCodewords, new Uint8Array(numBlockCodewords));\n }\n }\n // All blocks have the same amount of data, except that the last n\n // (where n may be 0) have 1 less byte. Figure out where these start.\n // TODO(bbrown): There is only one case where there is a difference for Data Matrix for size 144\n const longerBlocksTotalCodewords = result[0].codewords.length;\n // int shorterBlocksTotalCodewords = longerBlocksTotalCodewords - 1;\n const longerBlocksNumDataCodewords = longerBlocksTotalCodewords - ecBlocks.getECCodewords();\n const shorterBlocksNumDataCodewords = longerBlocksNumDataCodewords - 1;\n // The last elements of result may be 1 element shorter for 144 matrix\n // first fill out as many elements as all of them have minus 1\n let rawCodewordsOffset = 0;\n for (let i = 0; i < shorterBlocksNumDataCodewords; i++) {\n for (let j = 0; j < numResultBlocks; j++) {\n result[j].codewords[i] = rawCodewords[rawCodewordsOffset++];\n }\n }\n // Fill out the last data block in the longer ones\n const specialVersion = version.getVersionNumber() === 24;\n const numLongerBlocks = specialVersion ? 8 : numResultBlocks;\n for (let j = 0; j < numLongerBlocks; j++) {\n result[j].codewords[longerBlocksNumDataCodewords - 1] = rawCodewords[rawCodewordsOffset++];\n }\n // Now add in error correction blocks\n const max = result[0].codewords.length;\n for (let i = longerBlocksNumDataCodewords; i < max; i++) {\n for (let j = 0; j < numResultBlocks; j++) {\n const jOffset = specialVersion ? (j + 8) % numResultBlocks : j;\n const iOffset = specialVersion && jOffset > 7 ? i - 1 : i;\n result[jOffset].codewords[iOffset] = rawCodewords[rawCodewordsOffset++];\n }\n }\n if (rawCodewordsOffset !== rawCodewords.length) {\n throw new IllegalArgumentException();\n }\n return result;\n }\n getNumDataCodewords() {\n return this.numDataCodewords;\n }\n getCodewords() {\n return this.codewords;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the\n * number of bits read is not often a multiple of 8.

\n *\n *

This class is thread-safe but not reentrant -- unless the caller modifies the bytes array\n * it passed in, in which case all bets are off.

\n *\n * @author Sean Owen\n */\n class BitSource {\n /**\n * @param bytes bytes from which this will read bits. Bits will be read from the first byte first.\n * Bits are read within a byte from most-significant to least-significant bit.\n */\n constructor(bytes) {\n this.bytes = bytes;\n this.byteOffset = 0;\n this.bitOffset = 0;\n }\n /**\n * @return index of next bit in current byte which would be read by the next call to {@link #readBits(int)}.\n */\n getBitOffset() {\n return this.bitOffset;\n }\n /**\n * @return index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}.\n */\n getByteOffset() {\n return this.byteOffset;\n }\n /**\n * @param numBits number of bits to read\n * @return int representing the bits read. The bits will appear as the least-significant\n * bits of the int\n * @throws IllegalArgumentException if numBits isn't in [1,32] or more than is available\n */\n readBits(numBits /*int*/) {\n if (numBits < 1 || numBits > 32 || numBits > this.available()) {\n throw new IllegalArgumentException('' + numBits);\n }\n let result = 0;\n let bitOffset = this.bitOffset;\n let byteOffset = this.byteOffset;\n const bytes = this.bytes;\n // First, read remainder from current byte\n if (bitOffset > 0) {\n const bitsLeft = 8 - bitOffset;\n const toRead = numBits < bitsLeft ? numBits : bitsLeft;\n const bitsToNotRead = bitsLeft - toRead;\n const mask = (0xFF >> (8 - toRead)) << bitsToNotRead;\n result = (bytes[byteOffset] & mask) >> bitsToNotRead;\n numBits -= toRead;\n bitOffset += toRead;\n if (bitOffset === 8) {\n bitOffset = 0;\n byteOffset++;\n }\n }\n // Next read whole bytes\n if (numBits > 0) {\n while (numBits >= 8) {\n result = (result << 8) | (bytes[byteOffset] & 0xFF);\n byteOffset++;\n numBits -= 8;\n }\n // Finally read a partial byte\n if (numBits > 0) {\n const bitsToNotRead = 8 - numBits;\n const mask = (0xFF >> bitsToNotRead) << bitsToNotRead;\n result = (result << numBits) | ((bytes[byteOffset] & mask) >> bitsToNotRead);\n bitOffset += numBits;\n }\n }\n this.bitOffset = bitOffset;\n this.byteOffset = byteOffset;\n return result;\n }\n /**\n * @return number of bits that can be read successfully\n */\n available() {\n return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset;\n }\n }\n\n var Mode;\n (function (Mode) {\n Mode[Mode[\"PAD_ENCODE\"] = 0] = \"PAD_ENCODE\";\n Mode[Mode[\"ASCII_ENCODE\"] = 1] = \"ASCII_ENCODE\";\n Mode[Mode[\"C40_ENCODE\"] = 2] = \"C40_ENCODE\";\n Mode[Mode[\"TEXT_ENCODE\"] = 3] = \"TEXT_ENCODE\";\n Mode[Mode[\"ANSIX12_ENCODE\"] = 4] = \"ANSIX12_ENCODE\";\n Mode[Mode[\"EDIFACT_ENCODE\"] = 5] = \"EDIFACT_ENCODE\";\n Mode[Mode[\"BASE256_ENCODE\"] = 6] = \"BASE256_ENCODE\";\n })(Mode || (Mode = {}));\n /**\n *

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes\n * in one Data Matrix Code. This class decodes the bits back into text.

\n *\n *

See ISO 16022:2006, 5.2.1 - 5.2.9.2

\n *\n * @author bbrown@google.com (Brian Brown)\n * @author Sean Owen\n */\n class DecodedBitStreamParser {\n static decode(bytes) {\n const bits = new BitSource(bytes);\n const result = new StringBuilder();\n const resultTrailer = new StringBuilder();\n const byteSegments = new Array();\n let mode = Mode.ASCII_ENCODE;\n do {\n if (mode === Mode.ASCII_ENCODE) {\n mode = this.decodeAsciiSegment(bits, result, resultTrailer);\n }\n else {\n switch (mode) {\n case Mode.C40_ENCODE:\n this.decodeC40Segment(bits, result);\n break;\n case Mode.TEXT_ENCODE:\n this.decodeTextSegment(bits, result);\n break;\n case Mode.ANSIX12_ENCODE:\n this.decodeAnsiX12Segment(bits, result);\n break;\n case Mode.EDIFACT_ENCODE:\n this.decodeEdifactSegment(bits, result);\n break;\n case Mode.BASE256_ENCODE:\n this.decodeBase256Segment(bits, result, byteSegments);\n break;\n default:\n throw new FormatException();\n }\n mode = Mode.ASCII_ENCODE;\n }\n } while (mode !== Mode.PAD_ENCODE && bits.available() > 0);\n if (resultTrailer.length() > 0) {\n result.append(resultTrailer.toString());\n }\n return new DecoderResult(bytes, result.toString(), byteSegments.length === 0 ? null : byteSegments, null);\n }\n /**\n * See ISO 16022:2006, 5.2.3 and Annex C, Table C.2\n */\n static decodeAsciiSegment(bits, result, resultTrailer) {\n let upperShift = false;\n do {\n let oneByte = bits.readBits(8);\n if (oneByte === 0) {\n throw new FormatException();\n }\n else if (oneByte <= 128) { // ASCII data (ASCII value + 1)\n if (upperShift) {\n oneByte += 128;\n // upperShift = false;\n }\n result.append(String.fromCharCode(oneByte - 1));\n return Mode.ASCII_ENCODE;\n }\n else if (oneByte === 129) { // Pad\n return Mode.PAD_ENCODE;\n }\n else if (oneByte <= 229) { // 2-digit data 00-99 (Numeric Value + 130)\n const value = oneByte - 130;\n if (value < 10) { // pad with '0' for single digit values\n result.append('0');\n }\n result.append('' + value);\n }\n else {\n switch (oneByte) {\n case 230: // Latch to C40 encodation\n return Mode.C40_ENCODE;\n case 231: // Latch to Base 256 encodation\n return Mode.BASE256_ENCODE;\n case 232: // FNC1\n result.append(String.fromCharCode(29)); // translate as ASCII 29\n break;\n case 233: // Structured Append\n case 234: // Reader Programming\n // Ignore these symbols for now\n // throw ReaderException.getInstance();\n break;\n case 235: // Upper Shift (shift to Extended ASCII)\n upperShift = true;\n break;\n case 236: // 05 Macro\n result.append('[)>\\u001E05\\u001D');\n resultTrailer.insert(0, '\\u001E\\u0004');\n break;\n case 237: // 06 Macro\n result.append('[)>\\u001E06\\u001D');\n resultTrailer.insert(0, '\\u001E\\u0004');\n break;\n case 238: // Latch to ANSI X12 encodation\n return Mode.ANSIX12_ENCODE;\n case 239: // Latch to Text encodation\n return Mode.TEXT_ENCODE;\n case 240: // Latch to EDIFACT encodation\n return Mode.EDIFACT_ENCODE;\n case 241: // ECI Character\n // TODO(bbrown): I think we need to support ECI\n // throw ReaderException.getInstance();\n // Ignore this symbol for now\n break;\n default:\n // Not to be used in ASCII encodation\n // but work around encoders that end with 254, latch back to ASCII\n if (oneByte !== 254 || bits.available() !== 0) {\n throw new FormatException();\n }\n break;\n }\n }\n } while (bits.available() > 0);\n return Mode.ASCII_ENCODE;\n }\n /**\n * See ISO 16022:2006, 5.2.5 and Annex C, Table C.1\n */\n static decodeC40Segment(bits, result) {\n // Three C40 values are encoded in a 16-bit value as\n // (1600 * C1) + (40 * C2) + C3 + 1\n // TODO(bbrown): The Upper Shift with C40 doesn't work in the 4 value scenario all the time\n let upperShift = false;\n const cValues = [];\n let shift = 0;\n do {\n // If there is only one byte left then it will be encoded as ASCII\n if (bits.available() === 8) {\n return;\n }\n const firstByte = bits.readBits(8);\n if (firstByte === 254) { // Unlatch codeword\n return;\n }\n this.parseTwoBytes(firstByte, bits.readBits(8), cValues);\n for (let i = 0; i < 3; i++) {\n const cValue = cValues[i];\n switch (shift) {\n case 0:\n if (cValue < 3) {\n shift = cValue + 1;\n }\n else if (cValue < this.C40_BASIC_SET_CHARS.length) {\n const c40char = this.C40_BASIC_SET_CHARS[cValue];\n if (upperShift) {\n result.append(String.fromCharCode(c40char.charCodeAt(0) + 128));\n upperShift = false;\n }\n else {\n result.append(c40char);\n }\n }\n else {\n throw new FormatException();\n }\n break;\n case 1:\n if (upperShift) {\n result.append(String.fromCharCode(cValue + 128));\n upperShift = false;\n }\n else {\n result.append(String.fromCharCode(cValue));\n }\n shift = 0;\n break;\n case 2:\n if (cValue < this.C40_SHIFT2_SET_CHARS.length) {\n const c40char = this.C40_SHIFT2_SET_CHARS[cValue];\n if (upperShift) {\n result.append(String.fromCharCode(c40char.charCodeAt(0) + 128));\n upperShift = false;\n }\n else {\n result.append(c40char);\n }\n }\n else {\n switch (cValue) {\n case 27: // FNC1\n result.append(String.fromCharCode(29)); // translate as ASCII 29\n break;\n case 30: // Upper Shift\n upperShift = true;\n break;\n default:\n throw new FormatException();\n }\n }\n shift = 0;\n break;\n case 3:\n if (upperShift) {\n result.append(String.fromCharCode(cValue + 224));\n upperShift = false;\n }\n else {\n result.append(String.fromCharCode(cValue + 96));\n }\n shift = 0;\n break;\n default:\n throw new FormatException();\n }\n }\n } while (bits.available() > 0);\n }\n /**\n * See ISO 16022:2006, 5.2.6 and Annex C, Table C.2\n */\n static decodeTextSegment(bits, result) {\n // Three Text values are encoded in a 16-bit value as\n // (1600 * C1) + (40 * C2) + C3 + 1\n // TODO(bbrown): The Upper Shift with Text doesn't work in the 4 value scenario all the time\n let upperShift = false;\n let cValues = [];\n let shift = 0;\n do {\n // If there is only one byte left then it will be encoded as ASCII\n if (bits.available() === 8) {\n return;\n }\n const firstByte = bits.readBits(8);\n if (firstByte === 254) { // Unlatch codeword\n return;\n }\n this.parseTwoBytes(firstByte, bits.readBits(8), cValues);\n for (let i = 0; i < 3; i++) {\n const cValue = cValues[i];\n switch (shift) {\n case 0:\n if (cValue < 3) {\n shift = cValue + 1;\n }\n else if (cValue < this.TEXT_BASIC_SET_CHARS.length) {\n const textChar = this.TEXT_BASIC_SET_CHARS[cValue];\n if (upperShift) {\n result.append(String.fromCharCode(textChar.charCodeAt(0) + 128));\n upperShift = false;\n }\n else {\n result.append(textChar);\n }\n }\n else {\n throw new FormatException();\n }\n break;\n case 1:\n if (upperShift) {\n result.append(String.fromCharCode(cValue + 128));\n upperShift = false;\n }\n else {\n result.append(String.fromCharCode(cValue));\n }\n shift = 0;\n break;\n case 2:\n // Shift 2 for Text is the same encoding as C40\n if (cValue < this.TEXT_SHIFT2_SET_CHARS.length) {\n const textChar = this.TEXT_SHIFT2_SET_CHARS[cValue];\n if (upperShift) {\n result.append(String.fromCharCode(textChar.charCodeAt(0) + 128));\n upperShift = false;\n }\n else {\n result.append(textChar);\n }\n }\n else {\n switch (cValue) {\n case 27: // FNC1\n result.append(String.fromCharCode(29)); // translate as ASCII 29\n break;\n case 30: // Upper Shift\n upperShift = true;\n break;\n default:\n throw new FormatException();\n }\n }\n shift = 0;\n break;\n case 3:\n if (cValue < this.TEXT_SHIFT3_SET_CHARS.length) {\n const textChar = this.TEXT_SHIFT3_SET_CHARS[cValue];\n if (upperShift) {\n result.append(String.fromCharCode(textChar.charCodeAt(0) + 128));\n upperShift = false;\n }\n else {\n result.append(textChar);\n }\n shift = 0;\n }\n else {\n throw new FormatException();\n }\n break;\n default:\n throw new FormatException();\n }\n }\n } while (bits.available() > 0);\n }\n /**\n * See ISO 16022:2006, 5.2.7\n */\n static decodeAnsiX12Segment(bits, result) {\n // Three ANSI X12 values are encoded in a 16-bit value as\n // (1600 * C1) + (40 * C2) + C3 + 1\n const cValues = [];\n do {\n // If there is only one byte left then it will be encoded as ASCII\n if (bits.available() === 8) {\n return;\n }\n const firstByte = bits.readBits(8);\n if (firstByte === 254) { // Unlatch codeword\n return;\n }\n this.parseTwoBytes(firstByte, bits.readBits(8), cValues);\n for (let i = 0; i < 3; i++) {\n const cValue = cValues[i];\n switch (cValue) {\n case 0: // X12 segment terminator \n result.append('\\r');\n break;\n case 1: // X12 segment separator *\n result.append('*');\n break;\n case 2: // X12 sub-element separator >\n result.append('>');\n break;\n case 3: // space\n result.append(' ');\n break;\n default:\n if (cValue < 14) { // 0 - 9\n result.append(String.fromCharCode(cValue + 44));\n }\n else if (cValue < 40) { // A - Z\n result.append(String.fromCharCode(cValue + 51));\n }\n else {\n throw new FormatException();\n }\n break;\n }\n }\n } while (bits.available() > 0);\n }\n static parseTwoBytes(firstByte, secondByte, result) {\n let fullBitValue = (firstByte << 8) + secondByte - 1;\n let temp = Math.floor(fullBitValue / 1600);\n result[0] = temp;\n fullBitValue -= temp * 1600;\n temp = Math.floor(fullBitValue / 40);\n result[1] = temp;\n result[2] = fullBitValue - temp * 40;\n }\n /**\n * See ISO 16022:2006, 5.2.8 and Annex C Table C.3\n */\n static decodeEdifactSegment(bits, result) {\n do {\n // If there is only two or less bytes left then it will be encoded as ASCII\n if (bits.available() <= 16) {\n return;\n }\n for (let i = 0; i < 4; i++) {\n let edifactValue = bits.readBits(6);\n // Check for the unlatch character\n if (edifactValue === 0x1F) { // 011111\n // Read rest of byte, which should be 0, and stop\n const bitsLeft = 8 - bits.getBitOffset();\n if (bitsLeft !== 8) {\n bits.readBits(bitsLeft);\n }\n return;\n }\n if ((edifactValue & 0x20) === 0) { // no 1 in the leading (6th) bit\n edifactValue |= 0x40; // Add a leading 01 to the 6 bit binary value\n }\n result.append(String.fromCharCode(edifactValue));\n }\n } while (bits.available() > 0);\n }\n /**\n * See ISO 16022:2006, 5.2.9 and Annex B, B.2\n */\n static decodeBase256Segment(bits, result, byteSegments) {\n // Figure out how long the Base 256 Segment is.\n let codewordPosition = 1 + bits.getByteOffset(); // position is 1-indexed\n const d1 = this.unrandomize255State(bits.readBits(8), codewordPosition++);\n let count;\n if (d1 === 0) { // Read the remainder of the symbol\n count = bits.available() / 8 | 0;\n }\n else if (d1 < 250) {\n count = d1;\n }\n else {\n count = 250 * (d1 - 249) + this.unrandomize255State(bits.readBits(8), codewordPosition++);\n }\n // We're seeing NegativeArraySizeException errors from users.\n if (count < 0) {\n throw new FormatException();\n }\n const bytes = new Uint8Array(count);\n for (let i = 0; i < count; i++) {\n // Have seen this particular error in the wild, such as at\n // http://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?MODE=3&D=Fred&PFMT=3&PT=F&X=0.3&O=0&LM=0.2\n if (bits.available() < 8) {\n throw new FormatException();\n }\n bytes[i] = this.unrandomize255State(bits.readBits(8), codewordPosition++);\n }\n byteSegments.push(bytes);\n try {\n result.append(StringEncoding.decode(bytes, StringUtils.ISO88591));\n }\n catch (uee) {\n throw new IllegalStateException('Platform does not support required encoding: ' + uee.message);\n }\n }\n /**\n * See ISO 16022:2006, Annex B, B.2\n */\n static unrandomize255State(randomizedBase256Codeword, base256CodewordPosition) {\n const pseudoRandomNumber = ((149 * base256CodewordPosition) % 255) + 1;\n const tempVariable = randomizedBase256Codeword - pseudoRandomNumber;\n return tempVariable >= 0 ? tempVariable : tempVariable + 256;\n }\n }\n /**\n * See ISO 16022:2006, Annex C Table C.1\n * The C40 Basic Character Set (*'s used for placeholders for the shift values)\n */\n DecodedBitStreamParser.C40_BASIC_SET_CHARS = [\n '*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',\n 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'\n ];\n DecodedBitStreamParser.C40_SHIFT2_SET_CHARS = [\n '!', '\"', '#', '$', '%', '&', '\\'', '(', ')', '*', '+', ',', '-', '.',\n '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\\\', ']', '^', '_'\n ];\n /**\n * See ISO 16022:2006, Annex C Table C.2\n * The Text Basic Character Set (*'s used for placeholders for the shift values)\n */\n DecodedBitStreamParser.TEXT_BASIC_SET_CHARS = [\n '*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',\n 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'\n ];\n // Shift 2 for Text is the same encoding as C40\n DecodedBitStreamParser.TEXT_SHIFT2_SET_CHARS = DecodedBitStreamParser.C40_SHIFT2_SET_CHARS;\n DecodedBitStreamParser.TEXT_SHIFT3_SET_CHARS = [\n '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',\n 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', String.fromCharCode(127)\n ];\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting\n * the Data Matrix Code from an image.

\n *\n * @author bbrown@google.com (Brian Brown)\n */\n class Decoder$1 {\n constructor() {\n this.rsDecoder = new ReedSolomonDecoder(GenericGF.DATA_MATRIX_FIELD_256);\n }\n /**\n *

Decodes a Data Matrix Code represented as a {@link BitMatrix}. A 1 or \"true\" is taken\n * to mean a black module.

\n *\n * @param bits booleans representing white/black Data Matrix Code modules\n * @return text and bytes encoded within the Data Matrix Code\n * @throws FormatException if the Data Matrix Code cannot be decoded\n * @throws ChecksumException if error correction fails\n */\n decode(bits) {\n // Construct a parser and read version, error-correction level\n const parser = new BitMatrixParser(bits);\n const version = parser.getVersion();\n // Read codewords\n const codewords = parser.readCodewords();\n // Separate into data blocks\n const dataBlocks = DataBlock.getDataBlocks(codewords, version);\n // Count total number of data bytes\n let totalBytes = 0;\n for (let db of dataBlocks) {\n totalBytes += db.getNumDataCodewords();\n }\n const resultBytes = new Uint8Array(totalBytes);\n const dataBlocksCount = dataBlocks.length;\n // Error-correct and copy data blocks together into a stream of bytes\n for (let j = 0; j < dataBlocksCount; j++) {\n const dataBlock = dataBlocks[j];\n const codewordBytes = dataBlock.getCodewords();\n const numDataCodewords = dataBlock.getNumDataCodewords();\n this.correctErrors(codewordBytes, numDataCodewords);\n for (let i = 0; i < numDataCodewords; i++) {\n // De-interlace data blocks.\n resultBytes[i * dataBlocksCount + j] = codewordBytes[i];\n }\n }\n // Decode the contents of that stream of bytes\n return DecodedBitStreamParser.decode(resultBytes);\n }\n /**\n *

Given data and error-correction codewords received, possibly corrupted by errors, attempts to\n * correct the errors in-place using Reed-Solomon error correction.

\n *\n * @param codewordBytes data and error correction codewords\n * @param numDataCodewords number of codewords that are data bytes\n * @throws ChecksumException if error correction fails\n */\n correctErrors(codewordBytes, numDataCodewords) {\n // const numCodewords = codewordBytes.length;\n // First read into an array of ints\n const codewordsInts = new Int32Array(codewordBytes);\n // for (let i = 0; i < numCodewords; i++) {\n // codewordsInts[i] = codewordBytes[i] & 0xFF;\n // }\n try {\n this.rsDecoder.decode(codewordsInts, codewordBytes.length - numDataCodewords);\n }\n catch (ignored /* ReedSolomonException */) {\n throw new ChecksumException();\n }\n // Copy back into array of bytes -- only need to worry about the bytes that were data\n // We don't care about errors in the error-correction codewords\n for (let i = 0; i < numDataCodewords; i++) {\n codewordBytes[i] = codewordsInts[i];\n }\n }\n }\n\n /**\n *

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code\n * is rotated or skewed, or partially obscured.

\n *\n * @author Sean Owen\n */\n class Detector$1 {\n constructor(image) {\n this.image = image;\n this.rectangleDetector = new WhiteRectangleDetector(this.image);\n }\n /**\n *

Detects a Data Matrix Code in an image.

\n *\n * @return {@link DetectorResult} encapsulating results of detecting a Data Matrix Code\n * @throws NotFoundException if no Data Matrix Code can be found\n */\n detect() {\n const cornerPoints = this.rectangleDetector.detect();\n let points = this.detectSolid1(cornerPoints);\n points = this.detectSolid2(points);\n points[3] = this.correctTopRight(points);\n if (!points[3]) {\n throw new NotFoundException();\n }\n points = this.shiftToModuleCenter(points);\n const topLeft = points[0];\n const bottomLeft = points[1];\n const bottomRight = points[2];\n const topRight = points[3];\n let dimensionTop = this.transitionsBetween(topLeft, topRight) + 1;\n let dimensionRight = this.transitionsBetween(bottomRight, topRight) + 1;\n if ((dimensionTop & 0x01) === 1) {\n dimensionTop += 1;\n }\n if ((dimensionRight & 0x01) === 1) {\n dimensionRight += 1;\n }\n if (4 * dimensionTop < 7 * dimensionRight && 4 * dimensionRight < 7 * dimensionTop) {\n // The matrix is square\n dimensionTop = dimensionRight = Math.max(dimensionTop, dimensionRight);\n }\n let bits = Detector$1.sampleGrid(this.image, topLeft, bottomLeft, bottomRight, topRight, dimensionTop, dimensionRight);\n return new DetectorResult(bits, [topLeft, bottomLeft, bottomRight, topRight]);\n }\n static shiftPoint(point, to, div) {\n let x = (to.getX() - point.getX()) / (div + 1);\n let y = (to.getY() - point.getY()) / (div + 1);\n return new ResultPoint(point.getX() + x, point.getY() + y);\n }\n static moveAway(point, fromX, fromY) {\n let x = point.getX();\n let y = point.getY();\n if (x < fromX) {\n x -= 1;\n }\n else {\n x += 1;\n }\n if (y < fromY) {\n y -= 1;\n }\n else {\n y += 1;\n }\n return new ResultPoint(x, y);\n }\n /**\n * Detect a solid side which has minimum transition.\n */\n detectSolid1(cornerPoints) {\n // 0 2\n // 1 3\n let pointA = cornerPoints[0];\n let pointB = cornerPoints[1];\n let pointC = cornerPoints[3];\n let pointD = cornerPoints[2];\n let trAB = this.transitionsBetween(pointA, pointB);\n let trBC = this.transitionsBetween(pointB, pointC);\n let trCD = this.transitionsBetween(pointC, pointD);\n let trDA = this.transitionsBetween(pointD, pointA);\n // 0..3\n // : :\n // 1--2\n let min = trAB;\n let points = [pointD, pointA, pointB, pointC];\n if (min > trBC) {\n min = trBC;\n points[0] = pointA;\n points[1] = pointB;\n points[2] = pointC;\n points[3] = pointD;\n }\n if (min > trCD) {\n min = trCD;\n points[0] = pointB;\n points[1] = pointC;\n points[2] = pointD;\n points[3] = pointA;\n }\n if (min > trDA) {\n points[0] = pointC;\n points[1] = pointD;\n points[2] = pointA;\n points[3] = pointB;\n }\n return points;\n }\n /**\n * Detect a second solid side next to first solid side.\n */\n detectSolid2(points) {\n // A..D\n // : :\n // B--C\n let pointA = points[0];\n let pointB = points[1];\n let pointC = points[2];\n let pointD = points[3];\n // Transition detection on the edge is not stable.\n // To safely detect, shift the points to the module center.\n let tr = this.transitionsBetween(pointA, pointD);\n let pointBs = Detector$1.shiftPoint(pointB, pointC, (tr + 1) * 4);\n let pointCs = Detector$1.shiftPoint(pointC, pointB, (tr + 1) * 4);\n let trBA = this.transitionsBetween(pointBs, pointA);\n let trCD = this.transitionsBetween(pointCs, pointD);\n // 0..3\n // | :\n // 1--2\n if (trBA < trCD) {\n // solid sides: A-B-C\n points[0] = pointA;\n points[1] = pointB;\n points[2] = pointC;\n points[3] = pointD;\n }\n else {\n // solid sides: B-C-D\n points[0] = pointB;\n points[1] = pointC;\n points[2] = pointD;\n points[3] = pointA;\n }\n return points;\n }\n /**\n * Calculates the corner position of the white top right module.\n */\n correctTopRight(points) {\n // A..D\n // | :\n // B--C\n let pointA = points[0];\n let pointB = points[1];\n let pointC = points[2];\n let pointD = points[3];\n // shift points for safe transition detection.\n let trTop = this.transitionsBetween(pointA, pointD);\n let trRight = this.transitionsBetween(pointB, pointD);\n let pointAs = Detector$1.shiftPoint(pointA, pointB, (trRight + 1) * 4);\n let pointCs = Detector$1.shiftPoint(pointC, pointB, (trTop + 1) * 4);\n trTop = this.transitionsBetween(pointAs, pointD);\n trRight = this.transitionsBetween(pointCs, pointD);\n let candidate1 = new ResultPoint(pointD.getX() + (pointC.getX() - pointB.getX()) / (trTop + 1), pointD.getY() + (pointC.getY() - pointB.getY()) / (trTop + 1));\n let candidate2 = new ResultPoint(pointD.getX() + (pointA.getX() - pointB.getX()) / (trRight + 1), pointD.getY() + (pointA.getY() - pointB.getY()) / (trRight + 1));\n if (!this.isValid(candidate1)) {\n if (this.isValid(candidate2)) {\n return candidate2;\n }\n return null;\n }\n if (!this.isValid(candidate2)) {\n return candidate1;\n }\n let sumc1 = this.transitionsBetween(pointAs, candidate1) + this.transitionsBetween(pointCs, candidate1);\n let sumc2 = this.transitionsBetween(pointAs, candidate2) + this.transitionsBetween(pointCs, candidate2);\n if (sumc1 > sumc2) {\n return candidate1;\n }\n else {\n return candidate2;\n }\n }\n /**\n * Shift the edge points to the module center.\n */\n shiftToModuleCenter(points) {\n // A..D\n // | :\n // B--C\n let pointA = points[0];\n let pointB = points[1];\n let pointC = points[2];\n let pointD = points[3];\n // calculate pseudo dimensions\n let dimH = this.transitionsBetween(pointA, pointD) + 1;\n let dimV = this.transitionsBetween(pointC, pointD) + 1;\n // shift points for safe dimension detection\n let pointAs = Detector$1.shiftPoint(pointA, pointB, dimV * 4);\n let pointCs = Detector$1.shiftPoint(pointC, pointB, dimH * 4);\n // calculate more precise dimensions\n dimH = this.transitionsBetween(pointAs, pointD) + 1;\n dimV = this.transitionsBetween(pointCs, pointD) + 1;\n if ((dimH & 0x01) === 1) {\n dimH += 1;\n }\n if ((dimV & 0x01) === 1) {\n dimV += 1;\n }\n // WhiteRectangleDetector returns points inside of the rectangle.\n // I want points on the edges.\n let centerX = (pointA.getX() + pointB.getX() + pointC.getX() + pointD.getX()) / 4;\n let centerY = (pointA.getY() + pointB.getY() + pointC.getY() + pointD.getY()) / 4;\n pointA = Detector$1.moveAway(pointA, centerX, centerY);\n pointB = Detector$1.moveAway(pointB, centerX, centerY);\n pointC = Detector$1.moveAway(pointC, centerX, centerY);\n pointD = Detector$1.moveAway(pointD, centerX, centerY);\n let pointBs;\n let pointDs;\n // shift points to the center of each modules\n pointAs = Detector$1.shiftPoint(pointA, pointB, dimV * 4);\n pointAs = Detector$1.shiftPoint(pointAs, pointD, dimH * 4);\n pointBs = Detector$1.shiftPoint(pointB, pointA, dimV * 4);\n pointBs = Detector$1.shiftPoint(pointBs, pointC, dimH * 4);\n pointCs = Detector$1.shiftPoint(pointC, pointD, dimV * 4);\n pointCs = Detector$1.shiftPoint(pointCs, pointB, dimH * 4);\n pointDs = Detector$1.shiftPoint(pointD, pointC, dimV * 4);\n pointDs = Detector$1.shiftPoint(pointDs, pointA, dimH * 4);\n return [pointAs, pointBs, pointCs, pointDs];\n }\n isValid(p) {\n return p.getX() >= 0 && p.getX() < this.image.getWidth() && p.getY() > 0 && p.getY() < this.image.getHeight();\n }\n static sampleGrid(image, topLeft, bottomLeft, bottomRight, topRight, dimensionX, dimensionY) {\n const sampler = GridSamplerInstance.getInstance();\n return sampler.sampleGrid(image, dimensionX, dimensionY, 0.5, 0.5, dimensionX - 0.5, 0.5, dimensionX - 0.5, dimensionY - 0.5, 0.5, dimensionY - 0.5, topLeft.getX(), topLeft.getY(), topRight.getX(), topRight.getY(), bottomRight.getX(), bottomRight.getY(), bottomLeft.getX(), bottomLeft.getY());\n }\n /**\n * Counts the number of black/white transitions between two points, using something like Bresenham's algorithm.\n */\n transitionsBetween(from, to) {\n // See QR Code Detector, sizeOfBlackWhiteBlackRun()\n let fromX = Math.trunc(from.getX());\n let fromY = Math.trunc(from.getY());\n let toX = Math.trunc(to.getX());\n let toY = Math.trunc(to.getY());\n let steep = Math.abs(toY - fromY) > Math.abs(toX - fromX);\n if (steep) {\n let temp = fromX;\n fromX = fromY;\n fromY = temp;\n temp = toX;\n toX = toY;\n toY = temp;\n }\n let dx = Math.abs(toX - fromX);\n let dy = Math.abs(toY - fromY);\n let error = -dx / 2;\n let ystep = fromY < toY ? 1 : -1;\n let xstep = fromX < toX ? 1 : -1;\n let transitions = 0;\n let inBlack = this.image.get(steep ? fromY : fromX, steep ? fromX : fromY);\n for (let x = fromX, y = fromY; x !== toX; x += xstep) {\n let isBlack = this.image.get(steep ? y : x, steep ? x : y);\n if (isBlack !== inBlack) {\n transitions++;\n inBlack = isBlack;\n }\n error += dy;\n if (error > 0) {\n if (y === toY) {\n break;\n }\n y += ystep;\n error -= dx;\n }\n }\n return transitions;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This implementation can detect and decode Data Matrix codes in an image.\n *\n * @author bbrown@google.com (Brian Brown)\n */\n class DataMatrixReader {\n constructor() {\n this.decoder = new Decoder$1();\n }\n /**\n * Locates and decodes a Data Matrix code in an image.\n *\n * @return a String representing the content encoded by the Data Matrix code\n * @throws NotFoundException if a Data Matrix code cannot be found\n * @throws FormatException if a Data Matrix code cannot be decoded\n * @throws ChecksumException if error correction fails\n */\n // @Override\n // public Result decode(BinaryBitmap image) throws NotFoundException, ChecksumException, FormatException {\n // return decode(image, null);\n // }\n // @Override\n decode(image, hints = null) {\n let decoderResult;\n let points;\n if (hints != null && hints.has(DecodeHintType$1.PURE_BARCODE)) {\n const bits = DataMatrixReader.extractPureBits(image.getBlackMatrix());\n decoderResult = this.decoder.decode(bits);\n points = DataMatrixReader.NO_POINTS;\n }\n else {\n const detectorResult = new Detector$1(image.getBlackMatrix()).detect();\n decoderResult = this.decoder.decode(detectorResult.getBits());\n points = detectorResult.getPoints();\n }\n const rawBytes = decoderResult.getRawBytes();\n const result = new Result(decoderResult.getText(), rawBytes, 8 * rawBytes.length, points, BarcodeFormat$1.DATA_MATRIX, System.currentTimeMillis());\n const byteSegments = decoderResult.getByteSegments();\n if (byteSegments != null) {\n result.putMetadata(ResultMetadataType$1.BYTE_SEGMENTS, byteSegments);\n }\n const ecLevel = decoderResult.getECLevel();\n if (ecLevel != null) {\n result.putMetadata(ResultMetadataType$1.ERROR_CORRECTION_LEVEL, ecLevel);\n }\n return result;\n }\n // @Override\n reset() {\n // do nothing\n }\n /**\n * This method detects a code in a \"pure\" image -- that is, pure monochrome image\n * which contains only an unrotated, unskewed, image of a code, with some white border\n * around it. This is a specialized method that works exceptionally fast in this special\n * case.\n *\n * @see com.google.zxing.qrcode.QRCodeReader#extractPureBits(BitMatrix)\n */\n static extractPureBits(image) {\n const leftTopBlack = image.getTopLeftOnBit();\n const rightBottomBlack = image.getBottomRightOnBit();\n if (leftTopBlack == null || rightBottomBlack == null) {\n throw new NotFoundException();\n }\n const moduleSize = this.moduleSize(leftTopBlack, image);\n let top = leftTopBlack[1];\n const bottom = rightBottomBlack[1];\n let left = leftTopBlack[0];\n const right = rightBottomBlack[0];\n const matrixWidth = (right - left + 1) / moduleSize;\n const matrixHeight = (bottom - top + 1) / moduleSize;\n if (matrixWidth <= 0 || matrixHeight <= 0) {\n throw new NotFoundException();\n }\n // Push in the \"border\" by half the module width so that we start\n // sampling in the middle of the module. Just in case the image is a\n // little off, this will help recover.\n const nudge = moduleSize / 2;\n top += nudge;\n left += nudge;\n // Now just read off the bits\n const bits = new BitMatrix(matrixWidth, matrixHeight);\n for (let y = 0; y < matrixHeight; y++) {\n const iOffset = top + y * moduleSize;\n for (let x = 0; x < matrixWidth; x++) {\n if (image.get(left + x * moduleSize, iOffset)) {\n bits.set(x, y);\n }\n }\n }\n return bits;\n }\n static moduleSize(leftTopBlack, image) {\n const width = image.getWidth();\n let x = leftTopBlack[0];\n const y = leftTopBlack[1];\n while (x < width && image.get(x, y)) {\n x++;\n }\n if (x === width) {\n throw new NotFoundException();\n }\n const moduleSize = x - leftTopBlack[0];\n if (moduleSize === 0) {\n throw new NotFoundException();\n }\n return moduleSize;\n }\n }\n DataMatrixReader.NO_POINTS = [];\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * QR Code reader to use from browser.\n */\n class BrowserDatamatrixCodeReader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserQRCodeReader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n */\n constructor(timeBetweenScansMillis = 500) {\n super(new DataMatrixReader(), timeBetweenScansMillis);\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n var ErrorCorrectionLevelValues;\n (function (ErrorCorrectionLevelValues) {\n ErrorCorrectionLevelValues[ErrorCorrectionLevelValues[\"L\"] = 0] = \"L\";\n ErrorCorrectionLevelValues[ErrorCorrectionLevelValues[\"M\"] = 1] = \"M\";\n ErrorCorrectionLevelValues[ErrorCorrectionLevelValues[\"Q\"] = 2] = \"Q\";\n ErrorCorrectionLevelValues[ErrorCorrectionLevelValues[\"H\"] = 3] = \"H\";\n })(ErrorCorrectionLevelValues || (ErrorCorrectionLevelValues = {}));\n /**\n *

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels\n * defined by the QR code standard.

\n *\n * @author Sean Owen\n */\n class ErrorCorrectionLevel {\n constructor(value, stringValue, bits /*int*/) {\n this.value = value;\n this.stringValue = stringValue;\n this.bits = bits;\n ErrorCorrectionLevel.FOR_BITS.set(bits, this);\n ErrorCorrectionLevel.FOR_VALUE.set(value, this);\n }\n getValue() {\n return this.value;\n }\n getBits() {\n return this.bits;\n }\n static fromString(s) {\n switch (s) {\n case 'L': return ErrorCorrectionLevel.L;\n case 'M': return ErrorCorrectionLevel.M;\n case 'Q': return ErrorCorrectionLevel.Q;\n case 'H': return ErrorCorrectionLevel.H;\n default: throw new ArgumentException(s + 'not available');\n }\n }\n toString() {\n return this.stringValue;\n }\n equals(o) {\n if (!(o instanceof ErrorCorrectionLevel)) {\n return false;\n }\n const other = o;\n return this.value === other.value;\n }\n /**\n * @param bits int containing the two bits encoding a QR Code's error correction level\n * @return ErrorCorrectionLevel representing the encoded error correction level\n */\n static forBits(bits /*int*/) {\n if (bits < 0 || bits >= ErrorCorrectionLevel.FOR_BITS.size) {\n throw new IllegalArgumentException();\n }\n return ErrorCorrectionLevel.FOR_BITS.get(bits);\n }\n }\n ErrorCorrectionLevel.FOR_BITS = new Map();\n ErrorCorrectionLevel.FOR_VALUE = new Map();\n /** L = ~7% correction */\n ErrorCorrectionLevel.L = new ErrorCorrectionLevel(ErrorCorrectionLevelValues.L, 'L', 0x01);\n /** M = ~15% correction */\n ErrorCorrectionLevel.M = new ErrorCorrectionLevel(ErrorCorrectionLevelValues.M, 'M', 0x00);\n /** Q = ~25% correction */\n ErrorCorrectionLevel.Q = new ErrorCorrectionLevel(ErrorCorrectionLevelValues.Q, 'Q', 0x03);\n /** H = ~30% correction */\n ErrorCorrectionLevel.H = new ErrorCorrectionLevel(ErrorCorrectionLevelValues.H, 'H', 0x02);\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates a QR Code's format information, including the data mask used and\n * error correction level.

\n *\n * @author Sean Owen\n * @see DataMask\n * @see ErrorCorrectionLevel\n */\n class FormatInformation {\n constructor(formatInfo /*int*/) {\n // Bits 3,4\n this.errorCorrectionLevel = ErrorCorrectionLevel.forBits((formatInfo >> 3) & 0x03);\n // Bottom 3 bits\n this.dataMask = /*(byte) */ (formatInfo & 0x07);\n }\n static numBitsDiffering(a /*int*/, b /*int*/) {\n return Integer.bitCount(a ^ b);\n }\n /**\n * @param maskedFormatInfo1 format info indicator, with mask still applied\n * @param maskedFormatInfo2 second copy of same info; both are checked at the same time\n * to establish best match\n * @return information about the format it specifies, or {@code null}\n * if doesn't seem to match any known pattern\n */\n static decodeFormatInformation(maskedFormatInfo1 /*int*/, maskedFormatInfo2 /*int*/) {\n const formatInfo = FormatInformation.doDecodeFormatInformation(maskedFormatInfo1, maskedFormatInfo2);\n if (formatInfo !== null) {\n return formatInfo;\n }\n // Should return null, but, some QR codes apparently\n // do not mask this info. Try again by actually masking the pattern\n // first\n return FormatInformation.doDecodeFormatInformation(maskedFormatInfo1 ^ FormatInformation.FORMAT_INFO_MASK_QR, maskedFormatInfo2 ^ FormatInformation.FORMAT_INFO_MASK_QR);\n }\n static doDecodeFormatInformation(maskedFormatInfo1 /*int*/, maskedFormatInfo2 /*int*/) {\n // Find the int in FORMAT_INFO_DECODE_LOOKUP with fewest bits differing\n let bestDifference = Number.MAX_SAFE_INTEGER;\n let bestFormatInfo = 0;\n for (const decodeInfo of FormatInformation.FORMAT_INFO_DECODE_LOOKUP) {\n const targetInfo = decodeInfo[0];\n if (targetInfo === maskedFormatInfo1 || targetInfo === maskedFormatInfo2) {\n // Found an exact match\n return new FormatInformation(decodeInfo[1]);\n }\n let bitsDifference = FormatInformation.numBitsDiffering(maskedFormatInfo1, targetInfo);\n if (bitsDifference < bestDifference) {\n bestFormatInfo = decodeInfo[1];\n bestDifference = bitsDifference;\n }\n if (maskedFormatInfo1 !== maskedFormatInfo2) {\n // also try the other option\n bitsDifference = FormatInformation.numBitsDiffering(maskedFormatInfo2, targetInfo);\n if (bitsDifference < bestDifference) {\n bestFormatInfo = decodeInfo[1];\n bestDifference = bitsDifference;\n }\n }\n }\n // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits\n // differing means we found a match\n if (bestDifference <= 3) {\n return new FormatInformation(bestFormatInfo);\n }\n return null;\n }\n getErrorCorrectionLevel() {\n return this.errorCorrectionLevel;\n }\n getDataMask() {\n return this.dataMask;\n }\n /*@Override*/\n hashCode() {\n return (this.errorCorrectionLevel.getBits() << 3) | this.dataMask;\n }\n /*@Override*/\n equals(o) {\n if (!(o instanceof FormatInformation)) {\n return false;\n }\n const other = o;\n return this.errorCorrectionLevel === other.errorCorrectionLevel &&\n this.dataMask === other.dataMask;\n }\n }\n FormatInformation.FORMAT_INFO_MASK_QR = 0x5412;\n /**\n * See ISO 18004:2006, Annex C, Table C.1\n */\n FormatInformation.FORMAT_INFO_DECODE_LOOKUP = [\n Int32Array.from([0x5412, 0x00]),\n Int32Array.from([0x5125, 0x01]),\n Int32Array.from([0x5E7C, 0x02]),\n Int32Array.from([0x5B4B, 0x03]),\n Int32Array.from([0x45F9, 0x04]),\n Int32Array.from([0x40CE, 0x05]),\n Int32Array.from([0x4F97, 0x06]),\n Int32Array.from([0x4AA0, 0x07]),\n Int32Array.from([0x77C4, 0x08]),\n Int32Array.from([0x72F3, 0x09]),\n Int32Array.from([0x7DAA, 0x0A]),\n Int32Array.from([0x789D, 0x0B]),\n Int32Array.from([0x662F, 0x0C]),\n Int32Array.from([0x6318, 0x0D]),\n Int32Array.from([0x6C41, 0x0E]),\n Int32Array.from([0x6976, 0x0F]),\n Int32Array.from([0x1689, 0x10]),\n Int32Array.from([0x13BE, 0x11]),\n Int32Array.from([0x1CE7, 0x12]),\n Int32Array.from([0x19D0, 0x13]),\n Int32Array.from([0x0762, 0x14]),\n Int32Array.from([0x0255, 0x15]),\n Int32Array.from([0x0D0C, 0x16]),\n Int32Array.from([0x083B, 0x17]),\n Int32Array.from([0x355F, 0x18]),\n Int32Array.from([0x3068, 0x19]),\n Int32Array.from([0x3F31, 0x1A]),\n Int32Array.from([0x3A06, 0x1B]),\n Int32Array.from([0x24B4, 0x1C]),\n Int32Array.from([0x2183, 0x1D]),\n Int32Array.from([0x2EDA, 0x1E]),\n Int32Array.from([0x2BED, 0x1F]),\n ];\n\n /**\n *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will\n * use blocks of differing sizes within one version, so, this encapsulates the parameters for\n * each set of blocks. It also holds the number of error-correction codewords per block since it\n * will be the same across all blocks within one version.

\n */\n class ECBlocks$1 {\n constructor(ecCodewordsPerBlock /*int*/, ...ecBlocks) {\n this.ecCodewordsPerBlock = ecCodewordsPerBlock;\n this.ecBlocks = ecBlocks;\n }\n getECCodewordsPerBlock() {\n return this.ecCodewordsPerBlock;\n }\n getNumBlocks() {\n let total = 0;\n const ecBlocks = this.ecBlocks;\n for (const ecBlock of ecBlocks) {\n total += ecBlock.getCount();\n }\n return total;\n }\n getTotalECCodewords() {\n return this.ecCodewordsPerBlock * this.getNumBlocks();\n }\n getECBlocks() {\n return this.ecBlocks;\n }\n }\n\n /**\n *

Encapsulates the parameters for one error-correction block in one symbol version.\n * This includes the number of data codewords, and the number of times a block with these\n * parameters is used consecutively in the QR code version's format.

\n */\n class ECB$1 {\n constructor(count /*int*/, dataCodewords /*int*/) {\n this.count = count;\n this.dataCodewords = dataCodewords;\n }\n getCount() {\n return this.count;\n }\n getDataCodewords() {\n return this.dataCodewords;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * See ISO 18004:2006 Annex D\n *\n * @author Sean Owen\n */\n class Version$1 {\n constructor(versionNumber /*int*/, alignmentPatternCenters, ...ecBlocks) {\n this.versionNumber = versionNumber;\n this.alignmentPatternCenters = alignmentPatternCenters;\n this.ecBlocks = ecBlocks;\n let total = 0;\n const ecCodewords = ecBlocks[0].getECCodewordsPerBlock();\n const ecbArray = ecBlocks[0].getECBlocks();\n for (const ecBlock of ecbArray) {\n total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords);\n }\n this.totalCodewords = total;\n }\n getVersionNumber() {\n return this.versionNumber;\n }\n getAlignmentPatternCenters() {\n return this.alignmentPatternCenters;\n }\n getTotalCodewords() {\n return this.totalCodewords;\n }\n getDimensionForVersion() {\n return 17 + 4 * this.versionNumber;\n }\n getECBlocksForLevel(ecLevel) {\n return this.ecBlocks[ecLevel.getValue()];\n // TYPESCRIPTPORT: original was using ordinal, and using the order of levels as defined in ErrorCorrectionLevel enum (LMQH)\n // I will use the direct value from ErrorCorrectionLevelValues enum which in typescript goes to a number\n }\n /**\n *

Deduces version information purely from QR Code dimensions.

\n *\n * @param dimension dimension in modules\n * @return Version for a QR Code of that dimension\n * @throws FormatException if dimension is not 1 mod 4\n */\n static getProvisionalVersionForDimension(dimension /*int*/) {\n if (dimension % 4 !== 1) {\n throw new FormatException();\n }\n try {\n return this.getVersionForNumber((dimension - 17) / 4);\n }\n catch (ignored /*: IllegalArgumentException*/) {\n throw new FormatException();\n }\n }\n static getVersionForNumber(versionNumber /*int*/) {\n if (versionNumber < 1 || versionNumber > 40) {\n throw new IllegalArgumentException();\n }\n return Version$1.VERSIONS[versionNumber - 1];\n }\n static decodeVersionInformation(versionBits /*int*/) {\n let bestDifference = Number.MAX_SAFE_INTEGER;\n let bestVersion = 0;\n for (let i = 0; i < Version$1.VERSION_DECODE_INFO.length; i++) {\n const targetVersion = Version$1.VERSION_DECODE_INFO[i];\n // Do the version info bits match exactly? done.\n if (targetVersion === versionBits) {\n return Version$1.getVersionForNumber(i + 7);\n }\n // Otherwise see if this is the closest to a real version info bit string\n // we have seen so far\n const bitsDifference = FormatInformation.numBitsDiffering(versionBits, targetVersion);\n if (bitsDifference < bestDifference) {\n bestVersion = i + 7;\n bestDifference = bitsDifference;\n }\n }\n // We can tolerate up to 3 bits of error since no two version info codewords will\n // differ in less than 8 bits.\n if (bestDifference <= 3) {\n return Version$1.getVersionForNumber(bestVersion);\n }\n // If we didn't find a close enough match, fail\n return null;\n }\n /**\n * See ISO 18004:2006 Annex E\n */\n buildFunctionPattern() {\n const dimension = this.getDimensionForVersion();\n const bitMatrix = new BitMatrix(dimension);\n // Top left finder pattern + separator + format\n bitMatrix.setRegion(0, 0, 9, 9);\n // Top right finder pattern + separator + format\n bitMatrix.setRegion(dimension - 8, 0, 8, 9);\n // Bottom left finder pattern + separator + format\n bitMatrix.setRegion(0, dimension - 8, 9, 8);\n // Alignment patterns\n const max = this.alignmentPatternCenters.length;\n for (let x = 0; x < max; x++) {\n const i = this.alignmentPatternCenters[x] - 2;\n for (let y = 0; y < max; y++) {\n if ((x === 0 && (y === 0 || y === max - 1)) || (x === max - 1 && y === 0)) {\n // No alignment patterns near the three finder patterns\n continue;\n }\n bitMatrix.setRegion(this.alignmentPatternCenters[y] - 2, i, 5, 5);\n }\n }\n // Vertical timing pattern\n bitMatrix.setRegion(6, 9, 1, dimension - 17);\n // Horizontal timing pattern\n bitMatrix.setRegion(9, 6, dimension - 17, 1);\n if (this.versionNumber > 6) {\n // Version info, top right\n bitMatrix.setRegion(dimension - 11, 0, 3, 6);\n // Version info, bottom left\n bitMatrix.setRegion(0, dimension - 11, 6, 3);\n }\n return bitMatrix;\n }\n /*@Override*/\n toString() {\n return '' + this.versionNumber;\n }\n }\n /**\n * See ISO 18004:2006 Annex D.\n * Element i represents the raw version bits that specify version i + 7\n */\n Version$1.VERSION_DECODE_INFO = Int32Array.from([\n 0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6,\n 0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78,\n 0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683,\n 0x168C9, 0x177EC, 0x18EC4, 0x191E1, 0x1AFAB,\n 0x1B08E, 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250,\n 0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B,\n 0x2542E, 0x26A64, 0x27541, 0x28C69\n ]);\n /**\n * See ISO 18004:2006 6.5.1 Table 9\n */\n Version$1.VERSIONS = [\n new Version$1(1, new Int32Array(0), new ECBlocks$1(7, new ECB$1(1, 19)), new ECBlocks$1(10, new ECB$1(1, 16)), new ECBlocks$1(13, new ECB$1(1, 13)), new ECBlocks$1(17, new ECB$1(1, 9))),\n new Version$1(2, Int32Array.from([6, 18]), new ECBlocks$1(10, new ECB$1(1, 34)), new ECBlocks$1(16, new ECB$1(1, 28)), new ECBlocks$1(22, new ECB$1(1, 22)), new ECBlocks$1(28, new ECB$1(1, 16))),\n new Version$1(3, Int32Array.from([6, 22]), new ECBlocks$1(15, new ECB$1(1, 55)), new ECBlocks$1(26, new ECB$1(1, 44)), new ECBlocks$1(18, new ECB$1(2, 17)), new ECBlocks$1(22, new ECB$1(2, 13))),\n new Version$1(4, Int32Array.from([6, 26]), new ECBlocks$1(20, new ECB$1(1, 80)), new ECBlocks$1(18, new ECB$1(2, 32)), new ECBlocks$1(26, new ECB$1(2, 24)), new ECBlocks$1(16, new ECB$1(4, 9))),\n new Version$1(5, Int32Array.from([6, 30]), new ECBlocks$1(26, new ECB$1(1, 108)), new ECBlocks$1(24, new ECB$1(2, 43)), new ECBlocks$1(18, new ECB$1(2, 15), new ECB$1(2, 16)), new ECBlocks$1(22, new ECB$1(2, 11), new ECB$1(2, 12))),\n new Version$1(6, Int32Array.from([6, 34]), new ECBlocks$1(18, new ECB$1(2, 68)), new ECBlocks$1(16, new ECB$1(4, 27)), new ECBlocks$1(24, new ECB$1(4, 19)), new ECBlocks$1(28, new ECB$1(4, 15))),\n new Version$1(7, Int32Array.from([6, 22, 38]), new ECBlocks$1(20, new ECB$1(2, 78)), new ECBlocks$1(18, new ECB$1(4, 31)), new ECBlocks$1(18, new ECB$1(2, 14), new ECB$1(4, 15)), new ECBlocks$1(26, new ECB$1(4, 13), new ECB$1(1, 14))),\n new Version$1(8, Int32Array.from([6, 24, 42]), new ECBlocks$1(24, new ECB$1(2, 97)), new ECBlocks$1(22, new ECB$1(2, 38), new ECB$1(2, 39)), new ECBlocks$1(22, new ECB$1(4, 18), new ECB$1(2, 19)), new ECBlocks$1(26, new ECB$1(4, 14), new ECB$1(2, 15))),\n new Version$1(9, Int32Array.from([6, 26, 46]), new ECBlocks$1(30, new ECB$1(2, 116)), new ECBlocks$1(22, new ECB$1(3, 36), new ECB$1(2, 37)), new ECBlocks$1(20, new ECB$1(4, 16), new ECB$1(4, 17)), new ECBlocks$1(24, new ECB$1(4, 12), new ECB$1(4, 13))),\n new Version$1(10, Int32Array.from([6, 28, 50]), new ECBlocks$1(18, new ECB$1(2, 68), new ECB$1(2, 69)), new ECBlocks$1(26, new ECB$1(4, 43), new ECB$1(1, 44)), new ECBlocks$1(24, new ECB$1(6, 19), new ECB$1(2, 20)), new ECBlocks$1(28, new ECB$1(6, 15), new ECB$1(2, 16))),\n new Version$1(11, Int32Array.from([6, 30, 54]), new ECBlocks$1(20, new ECB$1(4, 81)), new ECBlocks$1(30, new ECB$1(1, 50), new ECB$1(4, 51)), new ECBlocks$1(28, new ECB$1(4, 22), new ECB$1(4, 23)), new ECBlocks$1(24, new ECB$1(3, 12), new ECB$1(8, 13))),\n new Version$1(12, Int32Array.from([6, 32, 58]), new ECBlocks$1(24, new ECB$1(2, 92), new ECB$1(2, 93)), new ECBlocks$1(22, new ECB$1(6, 36), new ECB$1(2, 37)), new ECBlocks$1(26, new ECB$1(4, 20), new ECB$1(6, 21)), new ECBlocks$1(28, new ECB$1(7, 14), new ECB$1(4, 15))),\n new Version$1(13, Int32Array.from([6, 34, 62]), new ECBlocks$1(26, new ECB$1(4, 107)), new ECBlocks$1(22, new ECB$1(8, 37), new ECB$1(1, 38)), new ECBlocks$1(24, new ECB$1(8, 20), new ECB$1(4, 21)), new ECBlocks$1(22, new ECB$1(12, 11), new ECB$1(4, 12))),\n new Version$1(14, Int32Array.from([6, 26, 46, 66]), new ECBlocks$1(30, new ECB$1(3, 115), new ECB$1(1, 116)), new ECBlocks$1(24, new ECB$1(4, 40), new ECB$1(5, 41)), new ECBlocks$1(20, new ECB$1(11, 16), new ECB$1(5, 17)), new ECBlocks$1(24, new ECB$1(11, 12), new ECB$1(5, 13))),\n new Version$1(15, Int32Array.from([6, 26, 48, 70]), new ECBlocks$1(22, new ECB$1(5, 87), new ECB$1(1, 88)), new ECBlocks$1(24, new ECB$1(5, 41), new ECB$1(5, 42)), new ECBlocks$1(30, new ECB$1(5, 24), new ECB$1(7, 25)), new ECBlocks$1(24, new ECB$1(11, 12), new ECB$1(7, 13))),\n new Version$1(16, Int32Array.from([6, 26, 50, 74]), new ECBlocks$1(24, new ECB$1(5, 98), new ECB$1(1, 99)), new ECBlocks$1(28, new ECB$1(7, 45), new ECB$1(3, 46)), new ECBlocks$1(24, new ECB$1(15, 19), new ECB$1(2, 20)), new ECBlocks$1(30, new ECB$1(3, 15), new ECB$1(13, 16))),\n new Version$1(17, Int32Array.from([6, 30, 54, 78]), new ECBlocks$1(28, new ECB$1(1, 107), new ECB$1(5, 108)), new ECBlocks$1(28, new ECB$1(10, 46), new ECB$1(1, 47)), new ECBlocks$1(28, new ECB$1(1, 22), new ECB$1(15, 23)), new ECBlocks$1(28, new ECB$1(2, 14), new ECB$1(17, 15))),\n new Version$1(18, Int32Array.from([6, 30, 56, 82]), new ECBlocks$1(30, new ECB$1(5, 120), new ECB$1(1, 121)), new ECBlocks$1(26, new ECB$1(9, 43), new ECB$1(4, 44)), new ECBlocks$1(28, new ECB$1(17, 22), new ECB$1(1, 23)), new ECBlocks$1(28, new ECB$1(2, 14), new ECB$1(19, 15))),\n new Version$1(19, Int32Array.from([6, 30, 58, 86]), new ECBlocks$1(28, new ECB$1(3, 113), new ECB$1(4, 114)), new ECBlocks$1(26, new ECB$1(3, 44), new ECB$1(11, 45)), new ECBlocks$1(26, new ECB$1(17, 21), new ECB$1(4, 22)), new ECBlocks$1(26, new ECB$1(9, 13), new ECB$1(16, 14))),\n new Version$1(20, Int32Array.from([6, 34, 62, 90]), new ECBlocks$1(28, new ECB$1(3, 107), new ECB$1(5, 108)), new ECBlocks$1(26, new ECB$1(3, 41), new ECB$1(13, 42)), new ECBlocks$1(30, new ECB$1(15, 24), new ECB$1(5, 25)), new ECBlocks$1(28, new ECB$1(15, 15), new ECB$1(10, 16))),\n new Version$1(21, Int32Array.from([6, 28, 50, 72, 94]), new ECBlocks$1(28, new ECB$1(4, 116), new ECB$1(4, 117)), new ECBlocks$1(26, new ECB$1(17, 42)), new ECBlocks$1(28, new ECB$1(17, 22), new ECB$1(6, 23)), new ECBlocks$1(30, new ECB$1(19, 16), new ECB$1(6, 17))),\n new Version$1(22, Int32Array.from([6, 26, 50, 74, 98]), new ECBlocks$1(28, new ECB$1(2, 111), new ECB$1(7, 112)), new ECBlocks$1(28, new ECB$1(17, 46)), new ECBlocks$1(30, new ECB$1(7, 24), new ECB$1(16, 25)), new ECBlocks$1(24, new ECB$1(34, 13))),\n new Version$1(23, Int32Array.from([6, 30, 54, 78, 102]), new ECBlocks$1(30, new ECB$1(4, 121), new ECB$1(5, 122)), new ECBlocks$1(28, new ECB$1(4, 47), new ECB$1(14, 48)), new ECBlocks$1(30, new ECB$1(11, 24), new ECB$1(14, 25)), new ECBlocks$1(30, new ECB$1(16, 15), new ECB$1(14, 16))),\n new Version$1(24, Int32Array.from([6, 28, 54, 80, 106]), new ECBlocks$1(30, new ECB$1(6, 117), new ECB$1(4, 118)), new ECBlocks$1(28, new ECB$1(6, 45), new ECB$1(14, 46)), new ECBlocks$1(30, new ECB$1(11, 24), new ECB$1(16, 25)), new ECBlocks$1(30, new ECB$1(30, 16), new ECB$1(2, 17))),\n new Version$1(25, Int32Array.from([6, 32, 58, 84, 110]), new ECBlocks$1(26, new ECB$1(8, 106), new ECB$1(4, 107)), new ECBlocks$1(28, new ECB$1(8, 47), new ECB$1(13, 48)), new ECBlocks$1(30, new ECB$1(7, 24), new ECB$1(22, 25)), new ECBlocks$1(30, new ECB$1(22, 15), new ECB$1(13, 16))),\n new Version$1(26, Int32Array.from([6, 30, 58, 86, 114]), new ECBlocks$1(28, new ECB$1(10, 114), new ECB$1(2, 115)), new ECBlocks$1(28, new ECB$1(19, 46), new ECB$1(4, 47)), new ECBlocks$1(28, new ECB$1(28, 22), new ECB$1(6, 23)), new ECBlocks$1(30, new ECB$1(33, 16), new ECB$1(4, 17))),\n new Version$1(27, Int32Array.from([6, 34, 62, 90, 118]), new ECBlocks$1(30, new ECB$1(8, 122), new ECB$1(4, 123)), new ECBlocks$1(28, new ECB$1(22, 45), new ECB$1(3, 46)), new ECBlocks$1(30, new ECB$1(8, 23), new ECB$1(26, 24)), new ECBlocks$1(30, new ECB$1(12, 15), new ECB$1(28, 16))),\n new Version$1(28, Int32Array.from([6, 26, 50, 74, 98, 122]), new ECBlocks$1(30, new ECB$1(3, 117), new ECB$1(10, 118)), new ECBlocks$1(28, new ECB$1(3, 45), new ECB$1(23, 46)), new ECBlocks$1(30, new ECB$1(4, 24), new ECB$1(31, 25)), new ECBlocks$1(30, new ECB$1(11, 15), new ECB$1(31, 16))),\n new Version$1(29, Int32Array.from([6, 30, 54, 78, 102, 126]), new ECBlocks$1(30, new ECB$1(7, 116), new ECB$1(7, 117)), new ECBlocks$1(28, new ECB$1(21, 45), new ECB$1(7, 46)), new ECBlocks$1(30, new ECB$1(1, 23), new ECB$1(37, 24)), new ECBlocks$1(30, new ECB$1(19, 15), new ECB$1(26, 16))),\n new Version$1(30, Int32Array.from([6, 26, 52, 78, 104, 130]), new ECBlocks$1(30, new ECB$1(5, 115), new ECB$1(10, 116)), new ECBlocks$1(28, new ECB$1(19, 47), new ECB$1(10, 48)), new ECBlocks$1(30, new ECB$1(15, 24), new ECB$1(25, 25)), new ECBlocks$1(30, new ECB$1(23, 15), new ECB$1(25, 16))),\n new Version$1(31, Int32Array.from([6, 30, 56, 82, 108, 134]), new ECBlocks$1(30, new ECB$1(13, 115), new ECB$1(3, 116)), new ECBlocks$1(28, new ECB$1(2, 46), new ECB$1(29, 47)), new ECBlocks$1(30, new ECB$1(42, 24), new ECB$1(1, 25)), new ECBlocks$1(30, new ECB$1(23, 15), new ECB$1(28, 16))),\n new Version$1(32, Int32Array.from([6, 34, 60, 86, 112, 138]), new ECBlocks$1(30, new ECB$1(17, 115)), new ECBlocks$1(28, new ECB$1(10, 46), new ECB$1(23, 47)), new ECBlocks$1(30, new ECB$1(10, 24), new ECB$1(35, 25)), new ECBlocks$1(30, new ECB$1(19, 15), new ECB$1(35, 16))),\n new Version$1(33, Int32Array.from([6, 30, 58, 86, 114, 142]), new ECBlocks$1(30, new ECB$1(17, 115), new ECB$1(1, 116)), new ECBlocks$1(28, new ECB$1(14, 46), new ECB$1(21, 47)), new ECBlocks$1(30, new ECB$1(29, 24), new ECB$1(19, 25)), new ECBlocks$1(30, new ECB$1(11, 15), new ECB$1(46, 16))),\n new Version$1(34, Int32Array.from([6, 34, 62, 90, 118, 146]), new ECBlocks$1(30, new ECB$1(13, 115), new ECB$1(6, 116)), new ECBlocks$1(28, new ECB$1(14, 46), new ECB$1(23, 47)), new ECBlocks$1(30, new ECB$1(44, 24), new ECB$1(7, 25)), new ECBlocks$1(30, new ECB$1(59, 16), new ECB$1(1, 17))),\n new Version$1(35, Int32Array.from([6, 30, 54, 78, 102, 126, 150]), new ECBlocks$1(30, new ECB$1(12, 121), new ECB$1(7, 122)), new ECBlocks$1(28, new ECB$1(12, 47), new ECB$1(26, 48)), new ECBlocks$1(30, new ECB$1(39, 24), new ECB$1(14, 25)), new ECBlocks$1(30, new ECB$1(22, 15), new ECB$1(41, 16))),\n new Version$1(36, Int32Array.from([6, 24, 50, 76, 102, 128, 154]), new ECBlocks$1(30, new ECB$1(6, 121), new ECB$1(14, 122)), new ECBlocks$1(28, new ECB$1(6, 47), new ECB$1(34, 48)), new ECBlocks$1(30, new ECB$1(46, 24), new ECB$1(10, 25)), new ECBlocks$1(30, new ECB$1(2, 15), new ECB$1(64, 16))),\n new Version$1(37, Int32Array.from([6, 28, 54, 80, 106, 132, 158]), new ECBlocks$1(30, new ECB$1(17, 122), new ECB$1(4, 123)), new ECBlocks$1(28, new ECB$1(29, 46), new ECB$1(14, 47)), new ECBlocks$1(30, new ECB$1(49, 24), new ECB$1(10, 25)), new ECBlocks$1(30, new ECB$1(24, 15), new ECB$1(46, 16))),\n new Version$1(38, Int32Array.from([6, 32, 58, 84, 110, 136, 162]), new ECBlocks$1(30, new ECB$1(4, 122), new ECB$1(18, 123)), new ECBlocks$1(28, new ECB$1(13, 46), new ECB$1(32, 47)), new ECBlocks$1(30, new ECB$1(48, 24), new ECB$1(14, 25)), new ECBlocks$1(30, new ECB$1(42, 15), new ECB$1(32, 16))),\n new Version$1(39, Int32Array.from([6, 26, 54, 82, 110, 138, 166]), new ECBlocks$1(30, new ECB$1(20, 117), new ECB$1(4, 118)), new ECBlocks$1(28, new ECB$1(40, 47), new ECB$1(7, 48)), new ECBlocks$1(30, new ECB$1(43, 24), new ECB$1(22, 25)), new ECBlocks$1(30, new ECB$1(10, 15), new ECB$1(67, 16))),\n new Version$1(40, Int32Array.from([6, 30, 58, 86, 114, 142, 170]), new ECBlocks$1(30, new ECB$1(19, 118), new ECB$1(6, 119)), new ECBlocks$1(28, new ECB$1(18, 47), new ECB$1(31, 48)), new ECBlocks$1(30, new ECB$1(34, 24), new ECB$1(34, 25)), new ECBlocks$1(30, new ECB$1(20, 15), new ECB$1(61, 16)))\n ];\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n var DataMaskValues;\n (function (DataMaskValues) {\n DataMaskValues[DataMaskValues[\"DATA_MASK_000\"] = 0] = \"DATA_MASK_000\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_001\"] = 1] = \"DATA_MASK_001\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_010\"] = 2] = \"DATA_MASK_010\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_011\"] = 3] = \"DATA_MASK_011\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_100\"] = 4] = \"DATA_MASK_100\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_101\"] = 5] = \"DATA_MASK_101\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_110\"] = 6] = \"DATA_MASK_110\";\n DataMaskValues[DataMaskValues[\"DATA_MASK_111\"] = 7] = \"DATA_MASK_111\";\n })(DataMaskValues || (DataMaskValues = {}));\n /**\n *

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations\n * of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix,\n * including areas used for finder patterns, timing patterns, etc. These areas should be unused\n * after the point they are unmasked anyway.

\n *\n *

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position\n * and j is row position. In fact, as the text says, i is row position and j is column position.

\n *\n * @author Sean Owen\n */\n class DataMask {\n // See ISO 18004:2006 6.8.1\n constructor(value, isMasked) {\n this.value = value;\n this.isMasked = isMasked;\n }\n // End of enum constants.\n /**\n *

Implementations of this method reverse the data masking process applied to a QR Code and\n * make its bits ready to read.

\n *\n * @param bits representation of QR Code bits\n * @param dimension dimension of QR Code, represented by bits, being unmasked\n */\n unmaskBitMatrix(bits, dimension /*int*/) {\n for (let i = 0; i < dimension; i++) {\n for (let j = 0; j < dimension; j++) {\n if (this.isMasked(i, j)) {\n bits.flip(j, i);\n }\n }\n }\n }\n }\n DataMask.values = new Map([\n /**\n * 000: mask bits for which (x + y) mod 2 == 0\n */\n [DataMaskValues.DATA_MASK_000, new DataMask(DataMaskValues.DATA_MASK_000, (i /*int*/, j /*int*/) => { return ((i + j) & 0x01) === 0; })],\n /**\n * 001: mask bits for which x mod 2 == 0\n */\n [DataMaskValues.DATA_MASK_001, new DataMask(DataMaskValues.DATA_MASK_001, (i /*int*/, j /*int*/) => { return (i & 0x01) === 0; })],\n /**\n * 010: mask bits for which y mod 3 == 0\n */\n [DataMaskValues.DATA_MASK_010, new DataMask(DataMaskValues.DATA_MASK_010, (i /*int*/, j /*int*/) => { return j % 3 === 0; })],\n /**\n * 011: mask bits for which (x + y) mod 3 == 0\n */\n [DataMaskValues.DATA_MASK_011, new DataMask(DataMaskValues.DATA_MASK_011, (i /*int*/, j /*int*/) => { return (i + j) % 3 === 0; })],\n /**\n * 100: mask bits for which (x/2 + y/3) mod 2 == 0\n */\n [DataMaskValues.DATA_MASK_100, new DataMask(DataMaskValues.DATA_MASK_100, (i /*int*/, j /*int*/) => { return ((Math.floor(i / 2) + Math.floor(j / 3)) & 0x01) === 0; })],\n /**\n * 101: mask bits for which xy mod 2 + xy mod 3 == 0\n * equivalently, such that xy mod 6 == 0\n */\n [DataMaskValues.DATA_MASK_101, new DataMask(DataMaskValues.DATA_MASK_101, (i /*int*/, j /*int*/) => { return (i * j) % 6 === 0; })],\n /**\n * 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0\n * equivalently, such that xy mod 6 < 3\n */\n [DataMaskValues.DATA_MASK_110, new DataMask(DataMaskValues.DATA_MASK_110, (i /*int*/, j /*int*/) => { return ((i * j) % 6) < 3; })],\n /**\n * 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0\n * equivalently, such that (x + y + xy mod 3) mod 2 == 0\n */\n [DataMaskValues.DATA_MASK_111, new DataMask(DataMaskValues.DATA_MASK_111, (i /*int*/, j /*int*/) => { return ((i + j + ((i * j) % 3)) & 0x01) === 0; })],\n ]);\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Sean Owen\n */\n class BitMatrixParser$1 {\n /**\n * @param bitMatrix {@link BitMatrix} to parse\n * @throws FormatException if dimension is not >= 21 and 1 mod 4\n */\n constructor(bitMatrix) {\n const dimension = bitMatrix.getHeight();\n if (dimension < 21 || (dimension & 0x03) !== 1) {\n throw new FormatException();\n }\n this.bitMatrix = bitMatrix;\n }\n /**\n *

Reads format information from one of its two locations within the QR Code.

\n *\n * @return {@link FormatInformation} encapsulating the QR Code's format info\n * @throws FormatException if both format information locations cannot be parsed as\n * the valid encoding of format information\n */\n readFormatInformation() {\n if (this.parsedFormatInfo !== null && this.parsedFormatInfo !== undefined) {\n return this.parsedFormatInfo;\n }\n // Read top-left format info bits\n let formatInfoBits1 = 0;\n for (let i = 0; i < 6; i++) {\n formatInfoBits1 = this.copyBit(i, 8, formatInfoBits1);\n }\n // .. and skip a bit in the timing pattern ...\n formatInfoBits1 = this.copyBit(7, 8, formatInfoBits1);\n formatInfoBits1 = this.copyBit(8, 8, formatInfoBits1);\n formatInfoBits1 = this.copyBit(8, 7, formatInfoBits1);\n // .. and skip a bit in the timing pattern ...\n for (let j = 5; j >= 0; j--) {\n formatInfoBits1 = this.copyBit(8, j, formatInfoBits1);\n }\n // Read the top-right/bottom-left pattern too\n const dimension = this.bitMatrix.getHeight();\n let formatInfoBits2 = 0;\n const jMin = dimension - 7;\n for (let j = dimension - 1; j >= jMin; j--) {\n formatInfoBits2 = this.copyBit(8, j, formatInfoBits2);\n }\n for (let i = dimension - 8; i < dimension; i++) {\n formatInfoBits2 = this.copyBit(i, 8, formatInfoBits2);\n }\n this.parsedFormatInfo = FormatInformation.decodeFormatInformation(formatInfoBits1, formatInfoBits2);\n if (this.parsedFormatInfo !== null) {\n return this.parsedFormatInfo;\n }\n throw new FormatException();\n }\n /**\n *

Reads version information from one of its two locations within the QR Code.

\n *\n * @return {@link Version} encapsulating the QR Code's version\n * @throws FormatException if both version information locations cannot be parsed as\n * the valid encoding of version information\n */\n readVersion() {\n if (this.parsedVersion !== null && this.parsedVersion !== undefined) {\n return this.parsedVersion;\n }\n const dimension = this.bitMatrix.getHeight();\n const provisionalVersion = Math.floor((dimension - 17) / 4);\n if (provisionalVersion <= 6) {\n return Version$1.getVersionForNumber(provisionalVersion);\n }\n // Read top-right version info: 3 wide by 6 tall\n let versionBits = 0;\n const ijMin = dimension - 11;\n for (let j = 5; j >= 0; j--) {\n for (let i = dimension - 9; i >= ijMin; i--) {\n versionBits = this.copyBit(i, j, versionBits);\n }\n }\n let theParsedVersion = Version$1.decodeVersionInformation(versionBits);\n if (theParsedVersion !== null && theParsedVersion.getDimensionForVersion() === dimension) {\n this.parsedVersion = theParsedVersion;\n return theParsedVersion;\n }\n // Hmm, failed. Try bottom left: 6 wide by 3 tall\n versionBits = 0;\n for (let i = 5; i >= 0; i--) {\n for (let j = dimension - 9; j >= ijMin; j--) {\n versionBits = this.copyBit(i, j, versionBits);\n }\n }\n theParsedVersion = Version$1.decodeVersionInformation(versionBits);\n if (theParsedVersion !== null && theParsedVersion.getDimensionForVersion() === dimension) {\n this.parsedVersion = theParsedVersion;\n return theParsedVersion;\n }\n throw new FormatException();\n }\n copyBit(i /*int*/, j /*int*/, versionBits /*int*/) {\n const bit = this.isMirror ? this.bitMatrix.get(j, i) : this.bitMatrix.get(i, j);\n return bit ? (versionBits << 1) | 0x1 : versionBits << 1;\n }\n /**\n *

Reads the bits in the {@link BitMatrix} representing the finder pattern in the\n * correct order in order to reconstruct the codewords bytes contained within the\n * QR Code.

\n *\n * @return bytes encoded within the QR Code\n * @throws FormatException if the exact number of bytes expected is not read\n */\n readCodewords() {\n const formatInfo = this.readFormatInformation();\n const version = this.readVersion();\n // Get the data mask for the format used in this QR Code. This will exclude\n // some bits from reading as we wind through the bit matrix.\n const dataMask = DataMask.values.get(formatInfo.getDataMask());\n const dimension = this.bitMatrix.getHeight();\n dataMask.unmaskBitMatrix(this.bitMatrix, dimension);\n const functionPattern = version.buildFunctionPattern();\n let readingUp = true;\n const result = new Uint8Array(version.getTotalCodewords());\n let resultOffset = 0;\n let currentByte = 0;\n let bitsRead = 0;\n // Read columns in pairs, from right to left\n for (let j = dimension - 1; j > 0; j -= 2) {\n if (j === 6) {\n // Skip whole column with vertical alignment pattern\n // saves time and makes the other code proceed more cleanly\n j--;\n }\n // Read alternatingly from bottom to top then top to bottom\n for (let count = 0; count < dimension; count++) {\n const i = readingUp ? dimension - 1 - count : count;\n for (let col = 0; col < 2; col++) {\n // Ignore bits covered by the function pattern\n if (!functionPattern.get(j - col, i)) {\n // Read a bit\n bitsRead++;\n currentByte <<= 1;\n if (this.bitMatrix.get(j - col, i)) {\n currentByte |= 1;\n }\n // If we've made a whole byte, save it off\n if (bitsRead === 8) {\n result[resultOffset++] = /*(byte) */ currentByte;\n bitsRead = 0;\n currentByte = 0;\n }\n }\n }\n }\n readingUp = !readingUp; // readingUp ^= true; // readingUp = !readingUp; // switch directions\n }\n if (resultOffset !== version.getTotalCodewords()) {\n throw new FormatException();\n }\n return result;\n }\n /**\n * Revert the mask removal done while reading the code words. The bit matrix should revert to its original state.\n */\n remask() {\n if (this.parsedFormatInfo === null) {\n return; // We have no format information, and have no data mask\n }\n const dataMask = DataMask.values[this.parsedFormatInfo.getDataMask()];\n const dimension = this.bitMatrix.getHeight();\n dataMask.unmaskBitMatrix(this.bitMatrix, dimension);\n }\n /**\n * Prepare the parser for a mirrored operation.\n * This flag has effect only on the {@link #readFormatInformation()} and the\n * {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the\n * {@link #mirror()} method should be called.\n *\n * @param mirror Whether to read version and format information mirrored.\n */\n setMirror(isMirror) {\n this.parsedVersion = null;\n this.parsedFormatInfo = null;\n this.isMirror = isMirror;\n }\n /** Mirror the bit matrix in order to attempt a second reading. */\n mirror() {\n const bitMatrix = this.bitMatrix;\n for (let x = 0, width = bitMatrix.getWidth(); x < width; x++) {\n for (let y = x + 1, height = bitMatrix.getHeight(); y < height; y++) {\n if (bitMatrix.get(x, y) !== bitMatrix.get(y, x)) {\n bitMatrix.flip(y, x);\n bitMatrix.flip(x, y);\n }\n }\n }\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates a block of data within a QR Code. QR Codes may split their data into\n * multiple blocks, each of which is a unit of data and error-correction codewords. Each\n * is represented by an instance of this class.

\n *\n * @author Sean Owen\n */\n class DataBlock$1 {\n constructor(numDataCodewords /*int*/, codewords) {\n this.numDataCodewords = numDataCodewords;\n this.codewords = codewords;\n }\n /**\n *

When QR Codes use multiple data blocks, they are actually interleaved.\n * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This\n * method will separate the data into original blocks.

\n *\n * @param rawCodewords bytes as read directly from the QR Code\n * @param version version of the QR Code\n * @param ecLevel error-correction level of the QR Code\n * @return DataBlocks containing original bytes, \"de-interleaved\" from representation in the\n * QR Code\n */\n static getDataBlocks(rawCodewords, version, ecLevel) {\n if (rawCodewords.length !== version.getTotalCodewords()) {\n throw new IllegalArgumentException();\n }\n // Figure out the number and size of data blocks used by this version and\n // error correction level\n const ecBlocks = version.getECBlocksForLevel(ecLevel);\n // First count the total number of data blocks\n let totalBlocks = 0;\n const ecBlockArray = ecBlocks.getECBlocks();\n for (const ecBlock of ecBlockArray) {\n totalBlocks += ecBlock.getCount();\n }\n // Now establish DataBlocks of the appropriate size and number of data codewords\n const result = new Array(totalBlocks);\n let numResultBlocks = 0;\n for (const ecBlock of ecBlockArray) {\n for (let i = 0; i < ecBlock.getCount(); i++) {\n const numDataCodewords = ecBlock.getDataCodewords();\n const numBlockCodewords = ecBlocks.getECCodewordsPerBlock() + numDataCodewords;\n result[numResultBlocks++] = new DataBlock$1(numDataCodewords, new Uint8Array(numBlockCodewords));\n }\n }\n // All blocks have the same amount of data, except that the last n\n // (where n may be 0) have 1 more byte. Figure out where these start.\n const shorterBlocksTotalCodewords = result[0].codewords.length;\n let longerBlocksStartAt = result.length - 1;\n // TYPESCRIPTPORT: check length is correct here\n while (longerBlocksStartAt >= 0) {\n const numCodewords = result[longerBlocksStartAt].codewords.length;\n if (numCodewords === shorterBlocksTotalCodewords) {\n break;\n }\n longerBlocksStartAt--;\n }\n longerBlocksStartAt++;\n const shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewordsPerBlock();\n // The last elements of result may be 1 element longer\n // first fill out as many elements as all of them have\n let rawCodewordsOffset = 0;\n for (let i = 0; i < shorterBlocksNumDataCodewords; i++) {\n for (let j = 0; j < numResultBlocks; j++) {\n result[j].codewords[i] = rawCodewords[rawCodewordsOffset++];\n }\n }\n // Fill out the last data block in the longer ones\n for (let j = longerBlocksStartAt; j < numResultBlocks; j++) {\n result[j].codewords[shorterBlocksNumDataCodewords] = rawCodewords[rawCodewordsOffset++];\n }\n // Now add in error correction blocks\n const max = result[0].codewords.length;\n for (let i = shorterBlocksNumDataCodewords; i < max; i++) {\n for (let j = 0; j < numResultBlocks; j++) {\n const iOffset = j < longerBlocksStartAt ? i : i + 1;\n result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++];\n }\n }\n return result;\n }\n getNumDataCodewords() {\n return this.numDataCodewords;\n }\n getCodewords() {\n return this.codewords;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n var ModeValues;\n (function (ModeValues) {\n ModeValues[ModeValues[\"TERMINATOR\"] = 0] = \"TERMINATOR\";\n ModeValues[ModeValues[\"NUMERIC\"] = 1] = \"NUMERIC\";\n ModeValues[ModeValues[\"ALPHANUMERIC\"] = 2] = \"ALPHANUMERIC\";\n ModeValues[ModeValues[\"STRUCTURED_APPEND\"] = 3] = \"STRUCTURED_APPEND\";\n ModeValues[ModeValues[\"BYTE\"] = 4] = \"BYTE\";\n ModeValues[ModeValues[\"ECI\"] = 5] = \"ECI\";\n ModeValues[ModeValues[\"KANJI\"] = 6] = \"KANJI\";\n ModeValues[ModeValues[\"FNC1_FIRST_POSITION\"] = 7] = \"FNC1_FIRST_POSITION\";\n ModeValues[ModeValues[\"FNC1_SECOND_POSITION\"] = 8] = \"FNC1_SECOND_POSITION\";\n /** See GBT 18284-2000; \"Hanzi\" is a transliteration of this mode name. */\n ModeValues[ModeValues[\"HANZI\"] = 9] = \"HANZI\";\n })(ModeValues || (ModeValues = {}));\n /**\n *

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which\n * data can be encoded to bits in the QR code standard.

\n *\n * @author Sean Owen\n */\n class Mode$1 {\n constructor(value, stringValue, characterCountBitsForVersions, bits /*int*/) {\n this.value = value;\n this.stringValue = stringValue;\n this.characterCountBitsForVersions = characterCountBitsForVersions;\n this.bits = bits;\n Mode$1.FOR_BITS.set(bits, this);\n Mode$1.FOR_VALUE.set(value, this);\n }\n /**\n * @param bits four bits encoding a QR Code data mode\n * @return Mode encoded by these bits\n * @throws IllegalArgumentException if bits do not correspond to a known mode\n */\n static forBits(bits /*int*/) {\n const mode = Mode$1.FOR_BITS.get(bits);\n if (undefined === mode) {\n throw new IllegalArgumentException();\n }\n return mode;\n }\n /**\n * @param version version in question\n * @return number of bits used, in this QR Code symbol {@link Version}, to encode the\n * count of characters that will follow encoded in this Mode\n */\n getCharacterCountBits(version) {\n const versionNumber = version.getVersionNumber();\n let offset;\n if (versionNumber <= 9) {\n offset = 0;\n }\n else if (versionNumber <= 26) {\n offset = 1;\n }\n else {\n offset = 2;\n }\n return this.characterCountBitsForVersions[offset];\n }\n getValue() {\n return this.value;\n }\n getBits() {\n return this.bits;\n }\n equals(o) {\n if (!(o instanceof Mode$1)) {\n return false;\n }\n const other = o;\n return this.value === other.value;\n }\n toString() {\n return this.stringValue;\n }\n }\n Mode$1.FOR_BITS = new Map();\n Mode$1.FOR_VALUE = new Map();\n Mode$1.TERMINATOR = new Mode$1(ModeValues.TERMINATOR, 'TERMINATOR', Int32Array.from([0, 0, 0]), 0x00); // Not really a mode...\n Mode$1.NUMERIC = new Mode$1(ModeValues.NUMERIC, 'NUMERIC', Int32Array.from([10, 12, 14]), 0x01);\n Mode$1.ALPHANUMERIC = new Mode$1(ModeValues.ALPHANUMERIC, 'ALPHANUMERIC', Int32Array.from([9, 11, 13]), 0x02);\n Mode$1.STRUCTURED_APPEND = new Mode$1(ModeValues.STRUCTURED_APPEND, 'STRUCTURED_APPEND', Int32Array.from([0, 0, 0]), 0x03); // Not supported\n Mode$1.BYTE = new Mode$1(ModeValues.BYTE, 'BYTE', Int32Array.from([8, 16, 16]), 0x04);\n Mode$1.ECI = new Mode$1(ModeValues.ECI, 'ECI', Int32Array.from([0, 0, 0]), 0x07); // character counts don't apply\n Mode$1.KANJI = new Mode$1(ModeValues.KANJI, 'KANJI', Int32Array.from([8, 10, 12]), 0x08);\n Mode$1.FNC1_FIRST_POSITION = new Mode$1(ModeValues.FNC1_FIRST_POSITION, 'FNC1_FIRST_POSITION', Int32Array.from([0, 0, 0]), 0x05);\n Mode$1.FNC1_SECOND_POSITION = new Mode$1(ModeValues.FNC1_SECOND_POSITION, 'FNC1_SECOND_POSITION', Int32Array.from([0, 0, 0]), 0x09);\n /** See GBT 18284-2000; \"Hanzi\" is a transliteration of this mode name. */\n Mode$1.HANZI = new Mode$1(ModeValues.HANZI, 'HANZI', Int32Array.from([8, 10, 12]), 0x0D);\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*import java.io.UnsupportedEncodingException;*/\n /*import java.util.ArrayList;*/\n /*import java.util.Collection;*/\n /*import java.util.List;*/\n /*import java.util.Map;*/\n /**\n *

QR Codes can encode text as bits in one of several modes, and can use multiple modes\n * in one QR Code. This class decodes the bits back into text.

\n *\n *

See ISO 18004:2006, 6.4.3 - 6.4.7

\n *\n * @author Sean Owen\n */\n class DecodedBitStreamParser$1 {\n static decode(bytes, version, ecLevel, hints) {\n const bits = new BitSource(bytes);\n let result = new StringBuilder();\n const byteSegments = new Array(); // 1\n // TYPESCRIPTPORT: I do not use constructor with size 1 as in original Java means capacity and the array length is checked below\n let symbolSequence = -1;\n let parityData = -1;\n try {\n let currentCharacterSetECI = null;\n let fc1InEffect = false;\n let mode;\n do {\n // While still another segment to read...\n if (bits.available() < 4) {\n // OK, assume we're done. Really, a TERMINATOR mode should have been recorded here\n mode = Mode$1.TERMINATOR;\n }\n else {\n const modeBits = bits.readBits(4);\n mode = Mode$1.forBits(modeBits); // mode is encoded by 4 bits\n }\n switch (mode) {\n case Mode$1.TERMINATOR:\n break;\n case Mode$1.FNC1_FIRST_POSITION:\n case Mode$1.FNC1_SECOND_POSITION:\n // We do little with FNC1 except alter the parsed result a bit according to the spec\n fc1InEffect = true;\n break;\n case Mode$1.STRUCTURED_APPEND:\n if (bits.available() < 16) {\n throw new FormatException();\n }\n // sequence number and parity is added later to the result metadata\n // Read next 8 bits (symbol sequence #) and 8 bits (data: parity), then continue\n symbolSequence = bits.readBits(8);\n parityData = bits.readBits(8);\n break;\n case Mode$1.ECI:\n // Count doesn't apply to ECI\n const value = DecodedBitStreamParser$1.parseECIValue(bits);\n currentCharacterSetECI = CharacterSetECI.getCharacterSetECIByValue(value);\n if (currentCharacterSetECI === null) {\n throw new FormatException();\n }\n break;\n case Mode$1.HANZI:\n // First handle Hanzi mode which does not start with character count\n // Chinese mode contains a sub set indicator right after mode indicator\n const subset = bits.readBits(4);\n const countHanzi = bits.readBits(mode.getCharacterCountBits(version));\n if (subset === DecodedBitStreamParser$1.GB2312_SUBSET) {\n DecodedBitStreamParser$1.decodeHanziSegment(bits, result, countHanzi);\n }\n break;\n default:\n // \"Normal\" QR code modes:\n // How many characters will follow, encoded in this mode?\n const count = bits.readBits(mode.getCharacterCountBits(version));\n switch (mode) {\n case Mode$1.NUMERIC:\n DecodedBitStreamParser$1.decodeNumericSegment(bits, result, count);\n break;\n case Mode$1.ALPHANUMERIC:\n DecodedBitStreamParser$1.decodeAlphanumericSegment(bits, result, count, fc1InEffect);\n break;\n case Mode$1.BYTE:\n DecodedBitStreamParser$1.decodeByteSegment(bits, result, count, currentCharacterSetECI, byteSegments, hints);\n break;\n case Mode$1.KANJI:\n DecodedBitStreamParser$1.decodeKanjiSegment(bits, result, count);\n break;\n default:\n throw new FormatException();\n }\n break;\n }\n } while (mode !== Mode$1.TERMINATOR);\n }\n catch (iae /*: IllegalArgumentException*/) {\n // from readBits() calls\n throw new FormatException();\n }\n return new DecoderResult(bytes, result.toString(), byteSegments.length === 0 ? null : byteSegments, ecLevel === null ? null : ecLevel.toString(), symbolSequence, parityData);\n }\n /**\n * See specification GBT 18284-2000\n */\n static decodeHanziSegment(bits, result, count /*int*/) {\n // Don't crash trying to read more bits than we have available.\n if (count * 13 > bits.available()) {\n throw new FormatException();\n }\n // Each character will require 2 bytes. Read the characters as 2-byte pairs\n // and decode as GB2312 afterwards\n const buffer = new Uint8Array(2 * count);\n let offset = 0;\n while (count > 0) {\n // Each 13 bits encodes a 2-byte character\n const twoBytes = bits.readBits(13);\n let assembledTwoBytes = (((twoBytes / 0x060) << 8) & 0xFFFFFFFF) | (twoBytes % 0x060);\n if (assembledTwoBytes < 0x003BF) {\n // In the 0xA1A1 to 0xAAFE range\n assembledTwoBytes += 0x0A1A1;\n }\n else {\n // In the 0xB0A1 to 0xFAFE range\n assembledTwoBytes += 0x0A6A1;\n }\n buffer[offset] = /*(byte) */ ((assembledTwoBytes >> 8) & 0xFF);\n buffer[offset + 1] = /*(byte) */ (assembledTwoBytes & 0xFF);\n offset += 2;\n count--;\n }\n try {\n result.append(StringEncoding.decode(buffer, StringUtils.GB2312));\n // TYPESCRIPTPORT: TODO: implement GB2312 decode. StringView from MDN could be a starting point\n }\n catch (ignored /*: UnsupportedEncodingException*/) {\n throw new FormatException(ignored);\n }\n }\n static decodeKanjiSegment(bits, result, count /*int*/) {\n // Don't crash trying to read more bits than we have available.\n if (count * 13 > bits.available()) {\n throw new FormatException();\n }\n // Each character will require 2 bytes. Read the characters as 2-byte pairs\n // and decode as Shift_JIS afterwards\n const buffer = new Uint8Array(2 * count);\n let offset = 0;\n while (count > 0) {\n // Each 13 bits encodes a 2-byte character\n const twoBytes = bits.readBits(13);\n let assembledTwoBytes = (((twoBytes / 0x0C0) << 8) & 0xFFFFFFFF) | (twoBytes % 0x0C0);\n if (assembledTwoBytes < 0x01F00) {\n // In the 0x8140 to 0x9FFC range\n assembledTwoBytes += 0x08140;\n }\n else {\n // In the 0xE040 to 0xEBBF range\n assembledTwoBytes += 0x0C140;\n }\n buffer[offset] = /*(byte) */ (assembledTwoBytes >> 8);\n buffer[offset + 1] = /*(byte) */ assembledTwoBytes;\n offset += 2;\n count--;\n }\n // Shift_JIS may not be supported in some environments:\n try {\n result.append(StringEncoding.decode(buffer, StringUtils.SHIFT_JIS));\n // TYPESCRIPTPORT: TODO: implement SHIFT_JIS decode. StringView from MDN could be a starting point\n }\n catch (ignored /*: UnsupportedEncodingException*/) {\n throw new FormatException(ignored);\n }\n }\n static decodeByteSegment(bits, result, count /*int*/, currentCharacterSetECI, byteSegments, hints) {\n // Don't crash trying to read more bits than we have available.\n if (8 * count > bits.available()) {\n throw new FormatException();\n }\n const readBytes = new Uint8Array(count);\n for (let i = 0; i < count; i++) {\n readBytes[i] = /*(byte) */ bits.readBits(8);\n }\n let encoding;\n if (currentCharacterSetECI === null) {\n // The spec isn't clear on this mode; see\n // section 6.4.5: t does not say which encoding to assuming\n // upon decoding. I have seen ISO-8859-1 used as well as\n // Shift_JIS -- without anything like an ECI designator to\n // give a hint.\n encoding = StringUtils.guessEncoding(readBytes, hints);\n }\n else {\n encoding = currentCharacterSetECI.getName();\n }\n try {\n result.append(StringEncoding.decode(readBytes, encoding));\n }\n catch (ignored /*: UnsupportedEncodingException*/) {\n throw new FormatException(ignored);\n }\n byteSegments.push(readBytes);\n }\n static toAlphaNumericChar(value /*int*/) {\n if (value >= DecodedBitStreamParser$1.ALPHANUMERIC_CHARS.length) {\n throw new FormatException();\n }\n return DecodedBitStreamParser$1.ALPHANUMERIC_CHARS[value];\n }\n static decodeAlphanumericSegment(bits, result, count /*int*/, fc1InEffect) {\n // Read two characters at a time\n const start = result.length();\n while (count > 1) {\n if (bits.available() < 11) {\n throw new FormatException();\n }\n const nextTwoCharsBits = bits.readBits(11);\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(Math.floor(nextTwoCharsBits / 45)));\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(nextTwoCharsBits % 45));\n count -= 2;\n }\n if (count === 1) {\n // special case: one character left\n if (bits.available() < 6) {\n throw new FormatException();\n }\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(bits.readBits(6)));\n }\n // See section 6.4.8.1, 6.4.8.2\n if (fc1InEffect) {\n // We need to massage the result a bit if in an FNC1 mode:\n for (let i = start; i < result.length(); i++) {\n if (result.charAt(i) === '%') {\n if (i < result.length() - 1 && result.charAt(i + 1) === '%') {\n // %% is rendered as %\n result.deleteCharAt(i + 1);\n }\n else {\n // In alpha mode, % should be converted to FNC1 separator 0x1D\n result.setCharAt(i, String.fromCharCode(0x1D));\n }\n }\n }\n }\n }\n static decodeNumericSegment(bits, result, count /*int*/) {\n // Read three digits at a time\n while (count >= 3) {\n // Each 10 bits encodes three digits\n if (bits.available() < 10) {\n throw new FormatException();\n }\n const threeDigitsBits = bits.readBits(10);\n if (threeDigitsBits >= 1000) {\n throw new FormatException();\n }\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(Math.floor(threeDigitsBits / 100)));\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(Math.floor(threeDigitsBits / 10) % 10));\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(threeDigitsBits % 10));\n count -= 3;\n }\n if (count === 2) {\n // Two digits left over to read, encoded in 7 bits\n if (bits.available() < 7) {\n throw new FormatException();\n }\n const twoDigitsBits = bits.readBits(7);\n if (twoDigitsBits >= 100) {\n throw new FormatException();\n }\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(Math.floor(twoDigitsBits / 10)));\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(twoDigitsBits % 10));\n }\n else if (count === 1) {\n // One digit left over to read\n if (bits.available() < 4) {\n throw new FormatException();\n }\n const digitBits = bits.readBits(4);\n if (digitBits >= 10) {\n throw new FormatException();\n }\n result.append(DecodedBitStreamParser$1.toAlphaNumericChar(digitBits));\n }\n }\n static parseECIValue(bits) {\n const firstByte = bits.readBits(8);\n if ((firstByte & 0x80) === 0) {\n // just one byte\n return firstByte & 0x7F;\n }\n if ((firstByte & 0xC0) === 0x80) {\n // two bytes\n const secondByte = bits.readBits(8);\n return (((firstByte & 0x3F) << 8) & 0xFFFFFFFF) | secondByte;\n }\n if ((firstByte & 0xE0) === 0xC0) {\n // three bytes\n const secondThirdBytes = bits.readBits(16);\n return (((firstByte & 0x1F) << 16) & 0xFFFFFFFF) | secondThirdBytes;\n }\n throw new FormatException();\n }\n }\n /**\n * See ISO 18004:2006, 6.4.4 Table 5\n */\n DecodedBitStreamParser$1.ALPHANUMERIC_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';\n DecodedBitStreamParser$1.GB2312_SUBSET = 1;\n // function Uint8ArrayToString(a: Uint8Array): string {\n // const CHUNK_SZ = 0x8000;\n // const c = new StringBuilder();\n // for (let i = 0, length = a.length; i < length; i += CHUNK_SZ) {\n // c.append(String.fromCharCode.apply(null, a.subarray(i, i + CHUNK_SZ)));\n // }\n // return c.toString();\n // }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the\n * decoding caller. Callers are expected to process this.\n *\n * @see com.google.zxing.common.DecoderResult#getOther()\n */\n class QRCodeDecoderMetaData {\n constructor(mirrored) {\n this.mirrored = mirrored;\n }\n /**\n * @return true if the QR Code was mirrored.\n */\n isMirrored() {\n return this.mirrored;\n }\n /**\n * Apply the result points' order correction due to mirroring.\n *\n * @param points Array of points to apply mirror correction to.\n */\n applyMirroredCorrection(points) {\n if (!this.mirrored || points === null || points.length < 3) {\n return;\n }\n const bottomLeft = points[0];\n points[0] = points[2];\n points[2] = bottomLeft;\n // No need to 'fix' top-left and alignment pattern.\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*import java.util.Map;*/\n /**\n *

The main class which implements QR Code decoding -- as opposed to locating and extracting\n * the QR Code from an image.

\n *\n * @author Sean Owen\n */\n class Decoder$2 {\n constructor() {\n this.rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);\n }\n // public decode(image: boolean[][]): DecoderResult /*throws ChecksumException, FormatException*/ {\n // return decode(image, null)\n // }\n /**\n *

Convenience method that can decode a QR Code represented as a 2D array of booleans.\n * \"true\" is taken to mean a black module.

\n *\n * @param image booleans representing white/black QR Code modules\n * @param hints decoding hints that should be used to influence decoding\n * @return text and bytes encoded within the QR Code\n * @throws FormatException if the QR Code cannot be decoded\n * @throws ChecksumException if error correction fails\n */\n decodeBooleanArray(image, hints) {\n return this.decodeBitMatrix(BitMatrix.parseFromBooleanArray(image), hints);\n }\n // public decodeBitMatrix(bits: BitMatrix): DecoderResult /*throws ChecksumException, FormatException*/ {\n // return decode(bits, null)\n // }\n /**\n *

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or \"true\" is taken to mean a black module.

\n *\n * @param bits booleans representing white/black QR Code modules\n * @param hints decoding hints that should be used to influence decoding\n * @return text and bytes encoded within the QR Code\n * @throws FormatException if the QR Code cannot be decoded\n * @throws ChecksumException if error correction fails\n */\n decodeBitMatrix(bits, hints) {\n // Construct a parser and read version, error-correction level\n const parser = new BitMatrixParser$1(bits);\n let ex = null;\n try {\n return this.decodeBitMatrixParser(parser, hints);\n }\n catch (e /*: FormatException, ChecksumException*/) {\n ex = e;\n }\n try {\n // Revert the bit matrix\n parser.remask();\n // Will be attempting a mirrored reading of the version and format info.\n parser.setMirror(true);\n // Preemptively read the version.\n parser.readVersion();\n // Preemptively read the format information.\n parser.readFormatInformation();\n /*\n * Since we're here, this means we have successfully detected some kind\n * of version and format information when mirrored. This is a good sign,\n * that the QR code may be mirrored, and we should try once more with a\n * mirrored content.\n */\n // Prepare for a mirrored reading.\n parser.mirror();\n const result = this.decodeBitMatrixParser(parser, hints);\n // Success! Notify the caller that the code was mirrored.\n result.setOther(new QRCodeDecoderMetaData(true));\n return result;\n }\n catch (e /*FormatException | ChecksumException*/) {\n // Throw the exception from the original reading\n if (ex !== null) {\n throw ex;\n }\n throw e;\n }\n }\n decodeBitMatrixParser(parser, hints) {\n const version = parser.readVersion();\n const ecLevel = parser.readFormatInformation().getErrorCorrectionLevel();\n // Read codewords\n const codewords = parser.readCodewords();\n // Separate into data blocks\n const dataBlocks = DataBlock$1.getDataBlocks(codewords, version, ecLevel);\n // Count total number of data bytes\n let totalBytes = 0;\n for (const dataBlock of dataBlocks) {\n totalBytes += dataBlock.getNumDataCodewords();\n }\n const resultBytes = new Uint8Array(totalBytes);\n let resultOffset = 0;\n // Error-correct and copy data blocks together into a stream of bytes\n for (const dataBlock of dataBlocks) {\n const codewordBytes = dataBlock.getCodewords();\n const numDataCodewords = dataBlock.getNumDataCodewords();\n this.correctErrors(codewordBytes, numDataCodewords);\n for (let i = 0; i < numDataCodewords; i++) {\n resultBytes[resultOffset++] = codewordBytes[i];\n }\n }\n // Decode the contents of that stream of bytes\n return DecodedBitStreamParser$1.decode(resultBytes, version, ecLevel, hints);\n }\n /**\n *

Given data and error-correction codewords received, possibly corrupted by errors, attempts to\n * correct the errors in-place using Reed-Solomon error correction.

\n *\n * @param codewordBytes data and error correction codewords\n * @param numDataCodewords number of codewords that are data bytes\n * @throws ChecksumException if error correction fails\n */\n correctErrors(codewordBytes, numDataCodewords /*int*/) {\n // const numCodewords = codewordBytes.length;\n // First read into an array of ints\n const codewordsInts = new Int32Array(codewordBytes);\n // TYPESCRIPTPORT: not realy necessary to transform to ints? could redesign everything to work with unsigned bytes?\n // const codewordsInts = new Int32Array(numCodewords)\n // for (let i = 0; i < numCodewords; i++) {\n // codewordsInts[i] = codewordBytes[i] & 0xFF\n // }\n try {\n this.rsDecoder.decode(codewordsInts, codewordBytes.length - numDataCodewords);\n }\n catch (ignored /*: ReedSolomonException*/) {\n throw new ChecksumException();\n }\n // Copy back into array of bytes -- only need to worry about the bytes that were data\n // We don't care about errors in the error-correction codewords\n for (let i = 0; i < numDataCodewords; i++) {\n codewordBytes[i] = /*(byte) */ codewordsInts[i];\n }\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates an alignment pattern, which are the smaller square patterns found in\n * all but the simplest QR Codes.

\n *\n * @author Sean Owen\n */\n class AlignmentPattern extends ResultPoint {\n constructor(posX /*float*/, posY /*float*/, estimatedModuleSize /*float*/) {\n super(posX, posY);\n this.estimatedModuleSize = estimatedModuleSize;\n }\n /**\n *

Determines if this alignment pattern \"about equals\" an alignment pattern at the stated\n * position and size -- meaning, it is at nearly the same center with nearly the same size.

\n */\n aboutEquals(moduleSize /*float*/, i /*float*/, j /*float*/) {\n if (Math.abs(i - this.getY()) <= moduleSize && Math.abs(j - this.getX()) <= moduleSize) {\n const moduleSizeDiff = Math.abs(moduleSize - this.estimatedModuleSize);\n return moduleSizeDiff <= 1.0 || moduleSizeDiff <= this.estimatedModuleSize;\n }\n return false;\n }\n /**\n * Combines this object's current estimate of a finder pattern position and module size\n * with a new estimate. It returns a new {@code FinderPattern} containing an average of the two.\n */\n combineEstimate(i /*float*/, j /*float*/, newModuleSize /*float*/) {\n const combinedX = (this.getX() + j) / 2.0;\n const combinedY = (this.getY() + i) / 2.0;\n const combinedModuleSize = (this.estimatedModuleSize + newModuleSize) / 2.0;\n return new AlignmentPattern(combinedX, combinedY, combinedModuleSize);\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*import java.util.ArrayList;*/\n /*import java.util.List;*/\n /**\n *

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder\n * patterns but are smaller and appear at regular intervals throughout the image.

\n *\n *

At the moment this only looks for the bottom-right alignment pattern.

\n *\n *

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied,\n * pasted and stripped down here for maximum performance but does unfortunately duplicate\n * some code.

\n *\n *

This class is thread-safe but not reentrant. Each thread must allocate its own object.

\n *\n * @author Sean Owen\n */\n class AlignmentPatternFinder {\n /**\n *

Creates a finder that will look in a portion of the whole image.

\n *\n * @param image image to search\n * @param startX left column from which to start searching\n * @param startY top row from which to start searching\n * @param width width of region to search\n * @param height height of region to search\n * @param moduleSize estimated module size so far\n */\n constructor(image, startX /*int*/, startY /*int*/, width /*int*/, height /*int*/, moduleSize /*float*/, resultPointCallback) {\n this.image = image;\n this.startX = startX;\n this.startY = startY;\n this.width = width;\n this.height = height;\n this.moduleSize = moduleSize;\n this.resultPointCallback = resultPointCallback;\n this.possibleCenters = []; // new Array(5))\n // TYPESCRIPTPORT: array initialization without size as the length is checked below\n this.crossCheckStateCount = new Int32Array(3);\n }\n /**\n *

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since\n * it's pretty performance-critical and so is written to be fast foremost.

\n *\n * @return {@link AlignmentPattern} if found\n * @throws NotFoundException if not found\n */\n find() {\n const startX = this.startX;\n const height = this.height;\n const width = this.width;\n const maxJ = startX + width;\n const middleI = this.startY + (height / 2);\n // We are looking for black/white/black modules in 1:1:1 ratio\n // this tracks the number of black/white/black modules seen so far\n const stateCount = new Int32Array(3);\n const image = this.image;\n for (let iGen = 0; iGen < height; iGen++) {\n // Search from middle outwards\n const i = middleI + ((iGen & 0x01) === 0 ? Math.floor((iGen + 1) / 2) : -Math.floor((iGen + 1) / 2));\n stateCount[0] = 0;\n stateCount[1] = 0;\n stateCount[2] = 0;\n let j = startX;\n // Burn off leading white pixels before anything else; if we start in the middle of\n // a white run, it doesn't make sense to count its length, since we don't know if the\n // white run continued to the left of the start point\n while (j < maxJ && !image.get(j, i)) {\n j++;\n }\n let currentState = 0;\n while (j < maxJ) {\n if (image.get(j, i)) {\n // Black pixel\n if (currentState === 1) { // Counting black pixels\n stateCount[1]++;\n }\n else { // Counting white pixels\n if (currentState === 2) { // A winner?\n if (this.foundPatternCross(stateCount)) { // Yes\n const confirmed = this.handlePossibleCenter(stateCount, i, j);\n if (confirmed !== null) {\n return confirmed;\n }\n }\n stateCount[0] = stateCount[2];\n stateCount[1] = 1;\n stateCount[2] = 0;\n currentState = 1;\n }\n else {\n stateCount[++currentState]++;\n }\n }\n }\n else { // White pixel\n if (currentState === 1) { // Counting black pixels\n currentState++;\n }\n stateCount[currentState]++;\n }\n j++;\n }\n if (this.foundPatternCross(stateCount)) {\n const confirmed = this.handlePossibleCenter(stateCount, i, maxJ);\n if (confirmed !== null) {\n return confirmed;\n }\n }\n }\n // Hmm, nothing we saw was observed and confirmed twice. If we had\n // any guess at all, return it.\n if (this.possibleCenters.length !== 0) {\n return this.possibleCenters[0];\n }\n throw new NotFoundException();\n }\n /**\n * Given a count of black/white/black pixels just seen and an end position,\n * figures the location of the center of this black/white/black run.\n */\n static centerFromEnd(stateCount, end /*int*/) {\n return (end - stateCount[2]) - stateCount[1] / 2.0;\n }\n /**\n * @param stateCount count of black/white/black pixels just read\n * @return true iff the proportions of the counts is close enough to the 1/1/1 ratios\n * used by alignment patterns to be considered a match\n */\n foundPatternCross(stateCount) {\n const moduleSize = this.moduleSize;\n const maxVariance = moduleSize / 2.0;\n for (let i = 0; i < 3; i++) {\n if (Math.abs(moduleSize - stateCount[i]) >= maxVariance) {\n return false;\n }\n }\n return true;\n }\n /**\n *

After a horizontal scan finds a potential alignment pattern, this method\n * \"cross-checks\" by scanning down vertically through the center of the possible\n * alignment pattern to see if the same proportion is detected.

\n *\n * @param startI row where an alignment pattern was detected\n * @param centerJ center of the section that appears to cross an alignment pattern\n * @param maxCount maximum reasonable number of modules that should be\n * observed in any reading state, based on the results of the horizontal scan\n * @return vertical center of alignment pattern, or {@link Float#NaN} if not found\n */\n crossCheckVertical(startI /*int*/, centerJ /*int*/, maxCount /*int*/, originalStateCountTotal /*int*/) {\n const image = this.image;\n const maxI = image.getHeight();\n const stateCount = this.crossCheckStateCount;\n stateCount[0] = 0;\n stateCount[1] = 0;\n stateCount[2] = 0;\n // Start counting up from center\n let i = startI;\n while (i >= 0 && image.get(centerJ, i) && stateCount[1] <= maxCount) {\n stateCount[1]++;\n i--;\n }\n // If already too many modules in this state or ran off the edge:\n if (i < 0 || stateCount[1] > maxCount) {\n return NaN;\n }\n while (i >= 0 && !image.get(centerJ, i) && stateCount[0] <= maxCount) {\n stateCount[0]++;\n i--;\n }\n if (stateCount[0] > maxCount) {\n return NaN;\n }\n // Now also count down from center\n i = startI + 1;\n while (i < maxI && image.get(centerJ, i) && stateCount[1] <= maxCount) {\n stateCount[1]++;\n i++;\n }\n if (i === maxI || stateCount[1] > maxCount) {\n return NaN;\n }\n while (i < maxI && !image.get(centerJ, i) && stateCount[2] <= maxCount) {\n stateCount[2]++;\n i++;\n }\n if (stateCount[2] > maxCount) {\n return NaN;\n }\n const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];\n if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {\n return NaN;\n }\n return this.foundPatternCross(stateCount) ? AlignmentPatternFinder.centerFromEnd(stateCount, i) : NaN;\n }\n /**\n *

This is called when a horizontal scan finds a possible alignment pattern. It will\n * cross check with a vertical scan, and if successful, will see if this pattern had been\n * found on a previous horizontal scan. If so, we consider it confirmed and conclude we have\n * found the alignment pattern.

\n *\n * @param stateCount reading state module counts from horizontal scan\n * @param i row where alignment pattern may be found\n * @param j end of possible alignment pattern in row\n * @return {@link AlignmentPattern} if we have found the same pattern twice, or null if not\n */\n handlePossibleCenter(stateCount, i /*int*/, j /*int*/) {\n const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];\n const centerJ = AlignmentPatternFinder.centerFromEnd(stateCount, j);\n const centerI = this.crossCheckVertical(i, /*(int) */ centerJ, 2 * stateCount[1], stateCountTotal);\n if (!isNaN(centerI)) {\n const estimatedModuleSize = (stateCount[0] + stateCount[1] + stateCount[2]) / 3.0;\n for (const center of this.possibleCenters) {\n // Look for about the same center and module size:\n if (center.aboutEquals(estimatedModuleSize, centerI, centerJ)) {\n return center.combineEstimate(centerI, centerJ, estimatedModuleSize);\n }\n }\n // Hadn't found this before; save it\n const point = new AlignmentPattern(centerJ, centerI, estimatedModuleSize);\n this.possibleCenters.push(point);\n if (this.resultPointCallback !== null && this.resultPointCallback !== undefined) {\n this.resultPointCallback.foundPossibleResultPoint(point);\n }\n }\n return null;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates a finder pattern, which are the three square patterns found in\n * the corners of QR Codes. It also encapsulates a count of similar finder patterns,\n * as a convenience to the finder's bookkeeping.

\n *\n * @author Sean Owen\n */\n class FinderPattern$1 extends ResultPoint {\n // FinderPattern(posX: number/*float*/, posY: number/*float*/, estimatedModuleSize: number/*float*/) {\n // this(posX, posY, estimatedModuleSize, 1)\n // }\n constructor(posX /*float*/, posY /*float*/, estimatedModuleSize /*float*/, count /*int*/) {\n super(posX, posY);\n this.estimatedModuleSize = estimatedModuleSize;\n this.count = count;\n if (undefined === count) {\n this.count = 1;\n }\n }\n getEstimatedModuleSize() {\n return this.estimatedModuleSize;\n }\n getCount() {\n return this.count;\n }\n /*\n void incrementCount() {\n this.count++\n }\n */\n /**\n *

Determines if this finder pattern \"about equals\" a finder pattern at the stated\n * position and size -- meaning, it is at nearly the same center with nearly the same size.

\n */\n aboutEquals(moduleSize /*float*/, i /*float*/, j /*float*/) {\n if (Math.abs(i - this.getY()) <= moduleSize && Math.abs(j - this.getX()) <= moduleSize) {\n const moduleSizeDiff = Math.abs(moduleSize - this.estimatedModuleSize);\n return moduleSizeDiff <= 1.0 || moduleSizeDiff <= this.estimatedModuleSize;\n }\n return false;\n }\n /**\n * Combines this object's current estimate of a finder pattern position and module size\n * with a new estimate. It returns a new {@code FinderPattern} containing a weighted average\n * based on count.\n */\n combineEstimate(i /*float*/, j /*float*/, newModuleSize /*float*/) {\n const combinedCount = this.count + 1;\n const combinedX = (this.count * this.getX() + j) / combinedCount;\n const combinedY = (this.count * this.getY() + i) / combinedCount;\n const combinedModuleSize = (this.count * this.estimatedModuleSize + newModuleSize) / combinedCount;\n return new FinderPattern$1(combinedX, combinedY, combinedModuleSize, combinedCount);\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

Encapsulates information about finder patterns in an image, including the location of\n * the three finder patterns, and their estimated module size.

\n *\n * @author Sean Owen\n */\n class FinderPatternInfo {\n constructor(patternCenters) {\n this.bottomLeft = patternCenters[0];\n this.topLeft = patternCenters[1];\n this.topRight = patternCenters[2];\n }\n getBottomLeft() {\n return this.bottomLeft;\n }\n getTopLeft() {\n return this.topLeft;\n }\n getTopRight() {\n return this.topRight;\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*import java.io.Serializable;*/\n /*import java.util.ArrayList;*/\n /*import java.util.Collections;*/\n /*import java.util.Comparator;*/\n /*import java.util.List;*/\n /*import java.util.Map;*/\n /**\n *

This class attempts to find finder patterns in a QR Code. Finder patterns are the square\n * markers at three corners of a QR Code.

\n *\n *

This class is thread-safe but not reentrant. Each thread must allocate its own object.\n *\n * @author Sean Owen\n */\n class FinderPatternFinder {\n /**\n *

Creates a finder that will search the image for three finder patterns.

\n *\n * @param image image to search\n */\n // public constructor(image: BitMatrix) {\n // this(image, null)\n // }\n constructor(image, resultPointCallback) {\n this.image = image;\n this.resultPointCallback = resultPointCallback;\n this.possibleCenters = [];\n this.crossCheckStateCount = new Int32Array(5);\n this.resultPointCallback = resultPointCallback;\n }\n getImage() {\n return this.image;\n }\n getPossibleCenters() {\n return this.possibleCenters;\n }\n find(hints) {\n const tryHarder = (hints !== null && hints !== undefined) && undefined !== hints.get(DecodeHintType$1.TRY_HARDER);\n const pureBarcode = (hints !== null && hints !== undefined) && undefined !== hints.get(DecodeHintType$1.PURE_BARCODE);\n const image = this.image;\n const maxI = image.getHeight();\n const maxJ = image.getWidth();\n // We are looking for black/white/black/white/black modules in\n // 1:1:3:1:1 ratio; this tracks the number of such modules seen so far\n // Let's assume that the maximum version QR Code we support takes up 1/4 the height of the\n // image, and then account for the center being 3 modules in size. This gives the smallest\n // number of pixels the center could be, so skip this often. When trying harder, look for all\n // QR versions regardless of how dense they are.\n let iSkip = Math.floor((3 * maxI) / (4 * FinderPatternFinder.MAX_MODULES));\n if (iSkip < FinderPatternFinder.MIN_SKIP || tryHarder) {\n iSkip = FinderPatternFinder.MIN_SKIP;\n }\n let done = false;\n const stateCount = new Int32Array(5);\n for (let i = iSkip - 1; i < maxI && !done; i += iSkip) {\n // Get a row of black/white values\n stateCount[0] = 0;\n stateCount[1] = 0;\n stateCount[2] = 0;\n stateCount[3] = 0;\n stateCount[4] = 0;\n let currentState = 0;\n for (let j = 0; j < maxJ; j++) {\n if (image.get(j, i)) {\n // Black pixel\n if ((currentState & 1) === 1) { // Counting white pixels\n currentState++;\n }\n stateCount[currentState]++;\n }\n else { // White pixel\n if ((currentState & 1) === 0) { // Counting black pixels\n if (currentState === 4) { // A winner?\n if (FinderPatternFinder.foundPatternCross(stateCount)) { // Yes\n const confirmed = this.handlePossibleCenter(stateCount, i, j, pureBarcode);\n if (confirmed === true) {\n // Start examining every other line. Checking each line turned out to be too\n // expensive and didn't improve performance.\n iSkip = 2;\n if (this.hasSkipped === true) {\n done = this.haveMultiplyConfirmedCenters();\n }\n else {\n const rowSkip = this.findRowSkip();\n if (rowSkip > stateCount[2]) {\n // Skip rows between row of lower confirmed center\n // and top of presumed third confirmed center\n // but back up a bit to get a full chance of detecting\n // it, entire width of center of finder pattern\n // Skip by rowSkip, but back off by stateCount[2] (size of last center\n // of pattern we saw) to be conservative, and also back off by iSkip which\n // is about to be re-added\n i += rowSkip - stateCount[2] - iSkip;\n j = maxJ - 1;\n }\n }\n }\n else {\n stateCount[0] = stateCount[2];\n stateCount[1] = stateCount[3];\n stateCount[2] = stateCount[4];\n stateCount[3] = 1;\n stateCount[4] = 0;\n currentState = 3;\n continue;\n }\n // Clear state to start looking again\n currentState = 0;\n stateCount[0] = 0;\n stateCount[1] = 0;\n stateCount[2] = 0;\n stateCount[3] = 0;\n stateCount[4] = 0;\n }\n else { // No, shift counts back by two\n stateCount[0] = stateCount[2];\n stateCount[1] = stateCount[3];\n stateCount[2] = stateCount[4];\n stateCount[3] = 1;\n stateCount[4] = 0;\n currentState = 3;\n }\n }\n else {\n stateCount[++currentState]++;\n }\n }\n else { // Counting white pixels\n stateCount[currentState]++;\n }\n }\n }\n if (FinderPatternFinder.foundPatternCross(stateCount)) {\n const confirmed = this.handlePossibleCenter(stateCount, i, maxJ, pureBarcode);\n if (confirmed === true) {\n iSkip = stateCount[0];\n if (this.hasSkipped) {\n // Found a third one\n done = this.haveMultiplyConfirmedCenters();\n }\n }\n }\n }\n const patternInfo = this.selectBestPatterns();\n ResultPoint.orderBestPatterns(patternInfo);\n return new FinderPatternInfo(patternInfo);\n }\n /**\n * Given a count of black/white/black/white/black pixels just seen and an end position,\n * figures the location of the center of this run.\n */\n static centerFromEnd(stateCount, end /*int*/) {\n return (end - stateCount[4] - stateCount[3]) - stateCount[2] / 2.0;\n }\n /**\n * @param stateCount count of black/white/black/white/black pixels just read\n * @return true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios\n * used by finder patterns to be considered a match\n */\n static foundPatternCross(stateCount) {\n let totalModuleSize = 0;\n for (let i = 0; i < 5; i++) {\n const count = stateCount[i];\n if (count === 0) {\n return false;\n }\n totalModuleSize += count;\n }\n if (totalModuleSize < 7) {\n return false;\n }\n const moduleSize = totalModuleSize / 7.0;\n const maxVariance = moduleSize / 2.0;\n // Allow less than 50% variance from 1-1-3-1-1 proportions\n return Math.abs(moduleSize - stateCount[0]) < maxVariance &&\n Math.abs(moduleSize - stateCount[1]) < maxVariance &&\n Math.abs(3.0 * moduleSize - stateCount[2]) < 3 * maxVariance &&\n Math.abs(moduleSize - stateCount[3]) < maxVariance &&\n Math.abs(moduleSize - stateCount[4]) < maxVariance;\n }\n getCrossCheckStateCount() {\n const crossCheckStateCount = this.crossCheckStateCount;\n crossCheckStateCount[0] = 0;\n crossCheckStateCount[1] = 0;\n crossCheckStateCount[2] = 0;\n crossCheckStateCount[3] = 0;\n crossCheckStateCount[4] = 0;\n return crossCheckStateCount;\n }\n /**\n * After a vertical and horizontal scan finds a potential finder pattern, this method\n * \"cross-cross-cross-checks\" by scanning down diagonally through the center of the possible\n * finder pattern to see if the same proportion is detected.\n *\n * @param startI row where a finder pattern was detected\n * @param centerJ center of the section that appears to cross a finder pattern\n * @param maxCount maximum reasonable number of modules that should be\n * observed in any reading state, based on the results of the horizontal scan\n * @param originalStateCountTotal The original state count total.\n * @return true if proportions are withing expected limits\n */\n crossCheckDiagonal(startI /*int*/, centerJ /*int*/, maxCount /*int*/, originalStateCountTotal /*int*/) {\n const stateCount = this.getCrossCheckStateCount();\n // Start counting up, left from center finding black center mass\n let i = 0;\n const image = this.image;\n while (startI >= i && centerJ >= i && image.get(centerJ - i, startI - i)) {\n stateCount[2]++;\n i++;\n }\n if (startI < i || centerJ < i) {\n return false;\n }\n // Continue up, left finding white space\n while (startI >= i && centerJ >= i && !image.get(centerJ - i, startI - i) &&\n stateCount[1] <= maxCount) {\n stateCount[1]++;\n i++;\n }\n // If already too many modules in this state or ran off the edge:\n if (startI < i || centerJ < i || stateCount[1] > maxCount) {\n return false;\n }\n // Continue up, left finding black border\n while (startI >= i && centerJ >= i && image.get(centerJ - i, startI - i) &&\n stateCount[0] <= maxCount) {\n stateCount[0]++;\n i++;\n }\n if (stateCount[0] > maxCount) {\n return false;\n }\n const maxI = image.getHeight();\n const maxJ = image.getWidth();\n // Now also count down, right from center\n i = 1;\n while (startI + i < maxI && centerJ + i < maxJ && image.get(centerJ + i, startI + i)) {\n stateCount[2]++;\n i++;\n }\n // Ran off the edge?\n if (startI + i >= maxI || centerJ + i >= maxJ) {\n return false;\n }\n while (startI + i < maxI && centerJ + i < maxJ && !image.get(centerJ + i, startI + i) &&\n stateCount[3] < maxCount) {\n stateCount[3]++;\n i++;\n }\n if (startI + i >= maxI || centerJ + i >= maxJ || stateCount[3] >= maxCount) {\n return false;\n }\n while (startI + i < maxI && centerJ + i < maxJ && image.get(centerJ + i, startI + i) &&\n stateCount[4] < maxCount) {\n stateCount[4]++;\n i++;\n }\n if (stateCount[4] >= maxCount) {\n return false;\n }\n // If we found a finder-pattern-like section, but its size is more than 100% different than\n // the original, assume it's a false positive\n const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] + stateCount[4];\n return Math.abs(stateCountTotal - originalStateCountTotal) < 2 * originalStateCountTotal &&\n FinderPatternFinder.foundPatternCross(stateCount);\n }\n /**\n *

After a horizontal scan finds a potential finder pattern, this method\n * \"cross-checks\" by scanning down vertically through the center of the possible\n * finder pattern to see if the same proportion is detected.

\n *\n * @param startI row where a finder pattern was detected\n * @param centerJ center of the section that appears to cross a finder pattern\n * @param maxCount maximum reasonable number of modules that should be\n * observed in any reading state, based on the results of the horizontal scan\n * @return vertical center of finder pattern, or {@link Float#NaN} if not found\n */\n crossCheckVertical(startI /*int*/, centerJ /*int*/, maxCount /*int*/, originalStateCountTotal /*int*/) {\n const image = this.image;\n const maxI = image.getHeight();\n const stateCount = this.getCrossCheckStateCount();\n // Start counting up from center\n let i = startI;\n while (i >= 0 && image.get(centerJ, i)) {\n stateCount[2]++;\n i--;\n }\n if (i < 0) {\n return NaN;\n }\n while (i >= 0 && !image.get(centerJ, i) && stateCount[1] <= maxCount) {\n stateCount[1]++;\n i--;\n }\n // If already too many modules in this state or ran off the edge:\n if (i < 0 || stateCount[1] > maxCount) {\n return NaN;\n }\n while (i >= 0 && image.get(centerJ, i) && stateCount[0] <= maxCount) {\n stateCount[0]++;\n i--;\n }\n if (stateCount[0] > maxCount) {\n return NaN;\n }\n // Now also count down from center\n i = startI + 1;\n while (i < maxI && image.get(centerJ, i)) {\n stateCount[2]++;\n i++;\n }\n if (i === maxI) {\n return NaN;\n }\n while (i < maxI && !image.get(centerJ, i) && stateCount[3] < maxCount) {\n stateCount[3]++;\n i++;\n }\n if (i === maxI || stateCount[3] >= maxCount) {\n return NaN;\n }\n while (i < maxI && image.get(centerJ, i) && stateCount[4] < maxCount) {\n stateCount[4]++;\n i++;\n }\n if (stateCount[4] >= maxCount) {\n return NaN;\n }\n // If we found a finder-pattern-like section, but its size is more than 40% different than\n // the original, assume it's a false positive\n const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] +\n stateCount[4];\n if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {\n return NaN;\n }\n return FinderPatternFinder.foundPatternCross(stateCount) ? FinderPatternFinder.centerFromEnd(stateCount, i) : NaN;\n }\n /**\n *

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical,\n * except it reads horizontally instead of vertically. This is used to cross-cross\n * check a vertical cross check and locate the real center of the alignment pattern.

\n */\n crossCheckHorizontal(startJ /*int*/, centerI /*int*/, maxCount /*int*/, originalStateCountTotal /*int*/) {\n const image = this.image;\n const maxJ = image.getWidth();\n const stateCount = this.getCrossCheckStateCount();\n let j = startJ;\n while (j >= 0 && image.get(j, centerI)) {\n stateCount[2]++;\n j--;\n }\n if (j < 0) {\n return NaN;\n }\n while (j >= 0 && !image.get(j, centerI) && stateCount[1] <= maxCount) {\n stateCount[1]++;\n j--;\n }\n if (j < 0 || stateCount[1] > maxCount) {\n return NaN;\n }\n while (j >= 0 && image.get(j, centerI) && stateCount[0] <= maxCount) {\n stateCount[0]++;\n j--;\n }\n if (stateCount[0] > maxCount) {\n return NaN;\n }\n j = startJ + 1;\n while (j < maxJ && image.get(j, centerI)) {\n stateCount[2]++;\n j++;\n }\n if (j === maxJ) {\n return NaN;\n }\n while (j < maxJ && !image.get(j, centerI) && stateCount[3] < maxCount) {\n stateCount[3]++;\n j++;\n }\n if (j === maxJ || stateCount[3] >= maxCount) {\n return NaN;\n }\n while (j < maxJ && image.get(j, centerI) && stateCount[4] < maxCount) {\n stateCount[4]++;\n j++;\n }\n if (stateCount[4] >= maxCount) {\n return NaN;\n }\n // If we found a finder-pattern-like section, but its size is significantly different than\n // the original, assume it's a false positive\n const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] +\n stateCount[4];\n if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) {\n return NaN;\n }\n return FinderPatternFinder.foundPatternCross(stateCount) ? FinderPatternFinder.centerFromEnd(stateCount, j) : NaN;\n }\n /**\n *

This is called when a horizontal scan finds a possible alignment pattern. It will\n * cross check with a vertical scan, and if successful, will, ah, cross-cross-check\n * with another horizontal scan. This is needed primarily to locate the real horizontal\n * center of the pattern in cases of extreme skew.\n * And then we cross-cross-cross check with another diagonal scan.

\n *\n *

If that succeeds the finder pattern location is added to a list that tracks\n * the number of times each location has been nearly-matched as a finder pattern.\n * Each additional find is more evidence that the location is in fact a finder\n * pattern center\n *\n * @param stateCount reading state module counts from horizontal scan\n * @param i row where finder pattern may be found\n * @param j end of possible finder pattern in row\n * @param pureBarcode true if in \"pure barcode\" mode\n * @return true if a finder pattern candidate was found this time\n */\n handlePossibleCenter(stateCount, i /*int*/, j /*int*/, pureBarcode) {\n const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] +\n stateCount[4];\n let centerJ = FinderPatternFinder.centerFromEnd(stateCount, j);\n let centerI = this.crossCheckVertical(i, /*(int) */ Math.floor(centerJ), stateCount[2], stateCountTotal);\n if (!isNaN(centerI)) {\n // Re-cross check\n centerJ = this.crossCheckHorizontal(/*(int) */ Math.floor(centerJ), /*(int) */ Math.floor(centerI), stateCount[2], stateCountTotal);\n if (!isNaN(centerJ) &&\n (!pureBarcode || this.crossCheckDiagonal(/*(int) */ Math.floor(centerI), /*(int) */ Math.floor(centerJ), stateCount[2], stateCountTotal))) {\n const estimatedModuleSize = stateCountTotal / 7.0;\n let found = false;\n const possibleCenters = this.possibleCenters;\n for (let index = 0, length = possibleCenters.length; index < length; index++) {\n const center = possibleCenters[index];\n // Look for about the same center and module size:\n if (center.aboutEquals(estimatedModuleSize, centerI, centerJ)) {\n possibleCenters[index] = center.combineEstimate(centerI, centerJ, estimatedModuleSize);\n found = true;\n break;\n }\n }\n if (!found) {\n const point = new FinderPattern$1(centerJ, centerI, estimatedModuleSize);\n possibleCenters.push(point);\n if (this.resultPointCallback !== null && this.resultPointCallback !== undefined) {\n this.resultPointCallback.foundPossibleResultPoint(point);\n }\n }\n return true;\n }\n }\n return false;\n }\n /**\n * @return number of rows we could safely skip during scanning, based on the first\n * two finder patterns that have been located. In some cases their position will\n * allow us to infer that the third pattern must lie below a certain point farther\n * down in the image.\n */\n findRowSkip() {\n const max = this.possibleCenters.length;\n if (max <= 1) {\n return 0;\n }\n let firstConfirmedCenter = null;\n for (const center of this.possibleCenters) {\n if (center.getCount() >= FinderPatternFinder.CENTER_QUORUM) {\n if (firstConfirmedCenter == null) {\n firstConfirmedCenter = center;\n }\n else {\n // We have two confirmed centers\n // How far down can we skip before resuming looking for the next\n // pattern? In the worst case, only the difference between the\n // difference in the x / y coordinates of the two centers.\n // This is the case where you find top left last.\n this.hasSkipped = true;\n return /*(int) */ Math.floor((Math.abs(firstConfirmedCenter.getX() - center.getX()) -\n Math.abs(firstConfirmedCenter.getY() - center.getY())) / 2);\n }\n }\n }\n return 0;\n }\n /**\n * @return true iff we have found at least 3 finder patterns that have been detected\n * at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the\n * candidates is \"pretty similar\"\n */\n haveMultiplyConfirmedCenters() {\n let confirmedCount = 0;\n let totalModuleSize = 0.0;\n const max = this.possibleCenters.length;\n for (const pattern of this.possibleCenters) {\n if (pattern.getCount() >= FinderPatternFinder.CENTER_QUORUM) {\n confirmedCount++;\n totalModuleSize += pattern.getEstimatedModuleSize();\n }\n }\n if (confirmedCount < 3) {\n return false;\n }\n // OK, we have at least 3 confirmed centers, but, it's possible that one is a \"false positive\"\n // and that we need to keep looking. We detect this by asking if the estimated module sizes\n // vary too much. We arbitrarily say that when the total deviation from average exceeds\n // 5% of the total module size estimates, it's too much.\n const average = totalModuleSize / max;\n let totalDeviation = 0.0;\n for (const pattern of this.possibleCenters) {\n totalDeviation += Math.abs(pattern.getEstimatedModuleSize() - average);\n }\n return totalDeviation <= 0.05 * totalModuleSize;\n }\n /**\n * @return the 3 best {@link FinderPattern}s from our list of candidates. The \"best\" are\n * those that have been detected at least {@link #CENTER_QUORUM} times, and whose module\n * size differs from the average among those patterns the least\n * @throws NotFoundException if 3 such finder patterns do not exist\n */\n selectBestPatterns() {\n const startSize = this.possibleCenters.length;\n if (startSize < 3) {\n // Couldn't find enough finder patterns\n throw new NotFoundException();\n }\n const possibleCenters = this.possibleCenters;\n let average;\n // Filter outlier possibilities whose module size is too different\n if (startSize > 3) {\n // But we can only afford to do so if we have at least 4 possibilities to choose from\n let totalModuleSize = 0.0;\n let square = 0.0;\n for (const center of this.possibleCenters) {\n const size = center.getEstimatedModuleSize();\n totalModuleSize += size;\n square += size * size;\n }\n average = totalModuleSize / startSize;\n let stdDev = Math.sqrt(square / startSize - average * average);\n possibleCenters.sort(\n /**\n *

Orders by furthest from average

\n */\n // FurthestFromAverageComparator implements Comparator\n (center1, center2) => {\n const dA = Math.abs(center2.getEstimatedModuleSize() - average);\n const dB = Math.abs(center1.getEstimatedModuleSize() - average);\n return dA < dB ? -1 : dA > dB ? 1 : 0;\n });\n const limit = Math.max(0.2 * average, stdDev);\n for (let i = 0; i < possibleCenters.length && possibleCenters.length > 3; i++) {\n const pattern = possibleCenters[i];\n if (Math.abs(pattern.getEstimatedModuleSize() - average) > limit) {\n possibleCenters.splice(i, 1);\n i--;\n }\n }\n }\n if (possibleCenters.length > 3) {\n // Throw away all but those first size candidate points we found.\n let totalModuleSize = 0.0;\n for (const possibleCenter of possibleCenters) {\n totalModuleSize += possibleCenter.getEstimatedModuleSize();\n }\n average = totalModuleSize / possibleCenters.length;\n possibleCenters.sort(\n /**\n *

Orders by {@link FinderPattern#getCount()}, descending.

\n */\n // CenterComparator implements Comparator\n (center1, center2) => {\n if (center2.getCount() === center1.getCount()) {\n const dA = Math.abs(center2.getEstimatedModuleSize() - average);\n const dB = Math.abs(center1.getEstimatedModuleSize() - average);\n return dA < dB ? 1 : dA > dB ? -1 : 0;\n }\n else {\n return center2.getCount() - center1.getCount();\n }\n });\n possibleCenters.splice(3); // this is not realy necessary as we only return first 3 anyway\n }\n return [\n possibleCenters[0],\n possibleCenters[1],\n possibleCenters[2]\n ];\n }\n }\n FinderPatternFinder.CENTER_QUORUM = 2;\n FinderPatternFinder.MIN_SKIP = 3; // 1 pixel/module times 3 modules/center\n FinderPatternFinder.MAX_MODULES = 57; // support up to version 10 for mobile clients\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*import java.util.Map;*/\n /**\n *

Encapsulates logic that can detect a QR Code in an image, even if the QR Code\n * is rotated or skewed, or partially obscured.

\n *\n * @author Sean Owen\n */\n class Detector$2 {\n constructor(image) {\n this.image = image;\n }\n getImage() {\n return this.image;\n }\n getResultPointCallback() {\n return this.resultPointCallback;\n }\n /**\n *

Detects a QR Code in an image.

\n *\n * @return {@link DetectorResult} encapsulating results of detecting a QR Code\n * @throws NotFoundException if QR Code cannot be found\n * @throws FormatException if a QR Code cannot be decoded\n */\n // public detect(): DetectorResult /*throws NotFoundException, FormatException*/ {\n // return detect(null)\n // }\n /**\n *

Detects a QR Code in an image.

\n *\n * @param hints optional hints to detector\n * @return {@link DetectorResult} encapsulating results of detecting a QR Code\n * @throws NotFoundException if QR Code cannot be found\n * @throws FormatException if a QR Code cannot be decoded\n */\n detect(hints) {\n this.resultPointCallback = (hints === null || hints === undefined) ? null :\n /*(ResultPointCallback) */ hints.get(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK);\n const finder = new FinderPatternFinder(this.image, this.resultPointCallback);\n const info = finder.find(hints);\n return this.processFinderPatternInfo(info);\n }\n processFinderPatternInfo(info) {\n const topLeft = info.getTopLeft();\n const topRight = info.getTopRight();\n const bottomLeft = info.getBottomLeft();\n const moduleSize = this.calculateModuleSize(topLeft, topRight, bottomLeft);\n if (moduleSize < 1.0) {\n throw new NotFoundException('No pattern found in proccess finder.');\n }\n const dimension = Detector$2.computeDimension(topLeft, topRight, bottomLeft, moduleSize);\n const provisionalVersion = Version$1.getProvisionalVersionForDimension(dimension);\n const modulesBetweenFPCenters = provisionalVersion.getDimensionForVersion() - 7;\n let alignmentPattern = null;\n // Anything above version 1 has an alignment pattern\n if (provisionalVersion.getAlignmentPatternCenters().length > 0) {\n // Guess where a \"bottom right\" finder pattern would have been\n const bottomRightX = topRight.getX() - topLeft.getX() + bottomLeft.getX();\n const bottomRightY = topRight.getY() - topLeft.getY() + bottomLeft.getY();\n // Estimate that alignment pattern is closer by 3 modules\n // from \"bottom right\" to known top left location\n const correctionToTopLeft = 1.0 - 3.0 / modulesBetweenFPCenters;\n const estAlignmentX = /*(int) */ Math.floor(topLeft.getX() + correctionToTopLeft * (bottomRightX - topLeft.getX()));\n const estAlignmentY = /*(int) */ Math.floor(topLeft.getY() + correctionToTopLeft * (bottomRightY - topLeft.getY()));\n // Kind of arbitrary -- expand search radius before giving up\n for (let i = 4; i <= 16; i <<= 1) {\n try {\n alignmentPattern = this.findAlignmentInRegion(moduleSize, estAlignmentX, estAlignmentY, i);\n break;\n }\n catch (re /*NotFoundException*/) {\n if (!(re instanceof NotFoundException)) {\n throw re;\n }\n // try next round\n }\n }\n // If we didn't find alignment pattern... well try anyway without it\n }\n const transform = Detector$2.createTransform(topLeft, topRight, bottomLeft, alignmentPattern, dimension);\n const bits = Detector$2.sampleGrid(this.image, transform, dimension);\n let points;\n if (alignmentPattern === null) {\n points = [bottomLeft, topLeft, topRight];\n }\n else {\n points = [bottomLeft, topLeft, topRight, alignmentPattern];\n }\n return new DetectorResult(bits, points);\n }\n static createTransform(topLeft, topRight, bottomLeft, alignmentPattern, dimension /*int*/) {\n const dimMinusThree = dimension - 3.5;\n let bottomRightX; /*float*/\n let bottomRightY; /*float*/\n let sourceBottomRightX; /*float*/\n let sourceBottomRightY; /*float*/\n if (alignmentPattern !== null) {\n bottomRightX = alignmentPattern.getX();\n bottomRightY = alignmentPattern.getY();\n sourceBottomRightX = dimMinusThree - 3.0;\n sourceBottomRightY = sourceBottomRightX;\n }\n else {\n // Don't have an alignment pattern, just make up the bottom-right point\n bottomRightX = (topRight.getX() - topLeft.getX()) + bottomLeft.getX();\n bottomRightY = (topRight.getY() - topLeft.getY()) + bottomLeft.getY();\n sourceBottomRightX = dimMinusThree;\n sourceBottomRightY = dimMinusThree;\n }\n return PerspectiveTransform.quadrilateralToQuadrilateral(3.5, 3.5, dimMinusThree, 3.5, sourceBottomRightX, sourceBottomRightY, 3.5, dimMinusThree, topLeft.getX(), topLeft.getY(), topRight.getX(), topRight.getY(), bottomRightX, bottomRightY, bottomLeft.getX(), bottomLeft.getY());\n }\n static sampleGrid(image, transform, dimension /*int*/) {\n const sampler = GridSamplerInstance.getInstance();\n return sampler.sampleGridWithTransform(image, dimension, dimension, transform);\n }\n /**\n *

Computes the dimension (number of modules on a size) of the QR Code based on the position\n * of the finder patterns and estimated module size.

\n */\n static computeDimension(topLeft, topRight, bottomLeft, moduleSize /*float*/) {\n const tltrCentersDimension = MathUtils.round(ResultPoint.distance(topLeft, topRight) / moduleSize);\n const tlblCentersDimension = MathUtils.round(ResultPoint.distance(topLeft, bottomLeft) / moduleSize);\n let dimension = Math.floor((tltrCentersDimension + tlblCentersDimension) / 2) + 7;\n switch (dimension & 0x03) { // mod 4\n case 0:\n dimension++;\n break;\n // 1? do nothing\n case 2:\n dimension--;\n break;\n case 3:\n throw new NotFoundException('Dimensions could be not found.');\n }\n return dimension;\n }\n /**\n *

Computes an average estimated module size based on estimated derived from the positions\n * of the three finder patterns.

\n *\n * @param topLeft detected top-left finder pattern center\n * @param topRight detected top-right finder pattern center\n * @param bottomLeft detected bottom-left finder pattern center\n * @return estimated module size\n */\n calculateModuleSize(topLeft, topRight, bottomLeft) {\n // Take the average\n return (this.calculateModuleSizeOneWay(topLeft, topRight) +\n this.calculateModuleSizeOneWay(topLeft, bottomLeft)) / 2.0;\n }\n /**\n *

Estimates module size based on two finder patterns -- it uses\n * {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the\n * width of each, measuring along the axis between their centers.

\n */\n calculateModuleSizeOneWay(pattern, otherPattern) {\n const moduleSizeEst1 = this.sizeOfBlackWhiteBlackRunBothWays(/*(int) */ Math.floor(pattern.getX()), \n /*(int) */ Math.floor(pattern.getY()), \n /*(int) */ Math.floor(otherPattern.getX()), \n /*(int) */ Math.floor(otherPattern.getY()));\n const moduleSizeEst2 = this.sizeOfBlackWhiteBlackRunBothWays(/*(int) */ Math.floor(otherPattern.getX()), \n /*(int) */ Math.floor(otherPattern.getY()), \n /*(int) */ Math.floor(pattern.getX()), \n /*(int) */ Math.floor(pattern.getY()));\n if (isNaN(moduleSizeEst1)) {\n return moduleSizeEst2 / 7.0;\n }\n if (isNaN(moduleSizeEst2)) {\n return moduleSizeEst1 / 7.0;\n }\n // Average them, and divide by 7 since we've counted the width of 3 black modules,\n // and 1 white and 1 black module on either side. Ergo, divide sum by 14.\n return (moduleSizeEst1 + moduleSizeEst2) / 14.0;\n }\n /**\n * See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of\n * a finder pattern by looking for a black-white-black run from the center in the direction\n * of another point (another finder pattern center), and in the opposite direction too.\n */\n sizeOfBlackWhiteBlackRunBothWays(fromX /*int*/, fromY /*int*/, toX /*int*/, toY /*int*/) {\n let result = this.sizeOfBlackWhiteBlackRun(fromX, fromY, toX, toY);\n // Now count other way -- don't run off image though of course\n let scale = 1.0;\n let otherToX = fromX - (toX - fromX);\n if (otherToX < 0) {\n scale = fromX / /*(float) */ (fromX - otherToX);\n otherToX = 0;\n }\n else if (otherToX >= this.image.getWidth()) {\n scale = (this.image.getWidth() - 1 - fromX) / /*(float) */ (otherToX - fromX);\n otherToX = this.image.getWidth() - 1;\n }\n let otherToY = /*(int) */ Math.floor(fromY - (toY - fromY) * scale);\n scale = 1.0;\n if (otherToY < 0) {\n scale = fromY / /*(float) */ (fromY - otherToY);\n otherToY = 0;\n }\n else if (otherToY >= this.image.getHeight()) {\n scale = (this.image.getHeight() - 1 - fromY) / /*(float) */ (otherToY - fromY);\n otherToY = this.image.getHeight() - 1;\n }\n otherToX = /*(int) */ Math.floor(fromX + (otherToX - fromX) * scale);\n result += this.sizeOfBlackWhiteBlackRun(fromX, fromY, otherToX, otherToY);\n // Middle pixel is double-counted this way; subtract 1\n return result - 1.0;\n }\n /**\n *

This method traces a line from a point in the image, in the direction towards another point.\n * It begins in a black region, and keeps going until it finds white, then black, then white again.\n * It reports the distance from the start to this point.

\n *\n *

This is used when figuring out how wide a finder pattern is, when the finder pattern\n * may be skewed or rotated.

\n */\n sizeOfBlackWhiteBlackRun(fromX /*int*/, fromY /*int*/, toX /*int*/, toY /*int*/) {\n // Mild variant of Bresenham's algorithm\n // see http://en.wikipedia.org/wiki/Bresenham's_line_algorithm\n const steep = Math.abs(toY - fromY) > Math.abs(toX - fromX);\n if (steep) {\n let temp = fromX;\n fromX = fromY;\n fromY = temp;\n temp = toX;\n toX = toY;\n toY = temp;\n }\n const dx = Math.abs(toX - fromX);\n const dy = Math.abs(toY - fromY);\n let error = -dx / 2;\n const xstep = fromX < toX ? 1 : -1;\n const ystep = fromY < toY ? 1 : -1;\n // In black pixels, looking for white, first or second time.\n let state = 0;\n // Loop up until x == toX, but not beyond\n const xLimit = toX + xstep;\n for (let x = fromX, y = fromY; x !== xLimit; x += xstep) {\n const realX = steep ? y : x;\n const realY = steep ? x : y;\n // Does current pixel mean we have moved white to black or vice versa?\n // Scanning black in state 0,2 and white in state 1, so if we find the wrong\n // color, advance to next state or end if we are in state 2 already\n if ((state === 1) === this.image.get(realX, realY)) {\n if (state === 2) {\n return MathUtils.distance(x, y, fromX, fromY);\n }\n state++;\n }\n error += dy;\n if (error > 0) {\n if (y === toY) {\n break;\n }\n y += ystep;\n error -= dx;\n }\n }\n // Found black-white-black; give the benefit of the doubt that the next pixel outside the image\n // is \"white\" so this last point at (toX+xStep,toY) is the right ending. This is really a\n // small approximation; (toX+xStep,toY+yStep) might be really correct. Ignore this.\n if (state === 2) {\n return MathUtils.distance(toX + xstep, toY, fromX, fromY);\n }\n // else we didn't find even black-white-black; no estimate is really possible\n return NaN;\n }\n /**\n *

Attempts to locate an alignment pattern in a limited region of the image, which is\n * guessed to contain it. This method uses {@link AlignmentPattern}.

\n *\n * @param overallEstModuleSize estimated module size so far\n * @param estAlignmentX x coordinate of center of area probably containing alignment pattern\n * @param estAlignmentY y coordinate of above\n * @param allowanceFactor number of pixels in all directions to search from the center\n * @return {@link AlignmentPattern} if found, or null otherwise\n * @throws NotFoundException if an unexpected error occurs during detection\n */\n findAlignmentInRegion(overallEstModuleSize /*float*/, estAlignmentX /*int*/, estAlignmentY /*int*/, allowanceFactor /*float*/) {\n // Look for an alignment pattern (3 modules in size) around where it\n // should be\n const allowance = /*(int) */ Math.floor(allowanceFactor * overallEstModuleSize);\n const alignmentAreaLeftX = Math.max(0, estAlignmentX - allowance);\n const alignmentAreaRightX = Math.min(this.image.getWidth() - 1, estAlignmentX + allowance);\n if (alignmentAreaRightX - alignmentAreaLeftX < overallEstModuleSize * 3) {\n throw new NotFoundException('Alignment top exceeds estimated module size.');\n }\n const alignmentAreaTopY = Math.max(0, estAlignmentY - allowance);\n const alignmentAreaBottomY = Math.min(this.image.getHeight() - 1, estAlignmentY + allowance);\n if (alignmentAreaBottomY - alignmentAreaTopY < overallEstModuleSize * 3) {\n throw new NotFoundException('Alignment bottom exceeds estimated module size.');\n }\n const alignmentFinder = new AlignmentPatternFinder(this.image, alignmentAreaLeftX, alignmentAreaTopY, alignmentAreaRightX - alignmentAreaLeftX, alignmentAreaBottomY - alignmentAreaTopY, overallEstModuleSize, this.resultPointCallback);\n return alignmentFinder.find();\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*import java.util.List;*/\n /*import java.util.Map;*/\n /**\n * This implementation can detect and decode QR Codes in an image.\n *\n * @author Sean Owen\n */\n class QRCodeReader {\n constructor() {\n this.decoder = new Decoder$2();\n }\n getDecoder() {\n return this.decoder;\n }\n /**\n * Locates and decodes a QR code in an image.\n *\n * @return a representing: string the content encoded by the QR code\n * @throws NotFoundException if a QR code cannot be found\n * @throws FormatException if a QR code cannot be decoded\n * @throws ChecksumException if error correction fails\n */\n /*@Override*/\n // public decode(image: BinaryBitmap): Result /*throws NotFoundException, ChecksumException, FormatException */ {\n // return this.decode(image, null)\n // }\n /*@Override*/\n decode(image, hints) {\n let decoderResult;\n let points;\n if (hints !== undefined && hints !== null && undefined !== hints.get(DecodeHintType$1.PURE_BARCODE)) {\n const bits = QRCodeReader.extractPureBits(image.getBlackMatrix());\n decoderResult = this.decoder.decodeBitMatrix(bits, hints);\n points = QRCodeReader.NO_POINTS;\n }\n else {\n const detectorResult = new Detector$2(image.getBlackMatrix()).detect(hints);\n decoderResult = this.decoder.decodeBitMatrix(detectorResult.getBits(), hints);\n points = detectorResult.getPoints();\n }\n // If the code was mirrored: swap the bottom-left and the top-right points.\n if (decoderResult.getOther() instanceof QRCodeDecoderMetaData) {\n decoderResult.getOther().applyMirroredCorrection(points);\n }\n const result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), undefined, points, BarcodeFormat$1.QR_CODE, undefined);\n const byteSegments = decoderResult.getByteSegments();\n if (byteSegments !== null) {\n result.putMetadata(ResultMetadataType$1.BYTE_SEGMENTS, byteSegments);\n }\n const ecLevel = decoderResult.getECLevel();\n if (ecLevel !== null) {\n result.putMetadata(ResultMetadataType$1.ERROR_CORRECTION_LEVEL, ecLevel);\n }\n if (decoderResult.hasStructuredAppend()) {\n result.putMetadata(ResultMetadataType$1.STRUCTURED_APPEND_SEQUENCE, decoderResult.getStructuredAppendSequenceNumber());\n result.putMetadata(ResultMetadataType$1.STRUCTURED_APPEND_PARITY, decoderResult.getStructuredAppendParity());\n }\n return result;\n }\n /*@Override*/\n reset() {\n // do nothing\n }\n /**\n * This method detects a code in a \"pure\" image -- that is, pure monochrome image\n * which contains only an unrotated, unskewed, image of a code, with some white border\n * around it. This is a specialized method that works exceptionally fast in this special\n * case.\n *\n * @see com.google.zxing.datamatrix.DataMatrixReader#extractPureBits(BitMatrix)\n */\n static extractPureBits(image) {\n const leftTopBlack = image.getTopLeftOnBit();\n const rightBottomBlack = image.getBottomRightOnBit();\n if (leftTopBlack === null || rightBottomBlack === null) {\n throw new NotFoundException();\n }\n const moduleSize = this.moduleSize(leftTopBlack, image);\n let top = leftTopBlack[1];\n let bottom = rightBottomBlack[1];\n let left = leftTopBlack[0];\n let right = rightBottomBlack[0];\n // Sanity check!\n if (left >= right || top >= bottom) {\n throw new NotFoundException();\n }\n if (bottom - top !== right - left) {\n // Special case, where bottom-right module wasn't black so we found something else in the last row\n // Assume it's a square, so use height as the width\n right = left + (bottom - top);\n if (right >= image.getWidth()) {\n // Abort if that would not make sense -- off image\n throw new NotFoundException();\n }\n }\n const matrixWidth = Math.round((right - left + 1) / moduleSize);\n const matrixHeight = Math.round((bottom - top + 1) / moduleSize);\n if (matrixWidth <= 0 || matrixHeight <= 0) {\n throw new NotFoundException();\n }\n if (matrixHeight !== matrixWidth) {\n // Only possibly decode square regions\n throw new NotFoundException();\n }\n // Push in the \"border\" by half the module width so that we start\n // sampling in the middle of the module. Just in case the image is a\n // little off, this will help recover.\n const nudge = /*(int) */ Math.floor(moduleSize / 2.0);\n top += nudge;\n left += nudge;\n // But careful that this does not sample off the edge\n // \"right\" is the farthest-right valid pixel location -- right+1 is not necessarily\n // This is positive by how much the inner x loop below would be too large\n const nudgedTooFarRight = left + /*(int) */ Math.floor((matrixWidth - 1) * moduleSize) - right;\n if (nudgedTooFarRight > 0) {\n if (nudgedTooFarRight > nudge) {\n // Neither way fits; abort\n throw new NotFoundException();\n }\n left -= nudgedTooFarRight;\n }\n // See logic above\n const nudgedTooFarDown = top + /*(int) */ Math.floor((matrixHeight - 1) * moduleSize) - bottom;\n if (nudgedTooFarDown > 0) {\n if (nudgedTooFarDown > nudge) {\n // Neither way fits; abort\n throw new NotFoundException();\n }\n top -= nudgedTooFarDown;\n }\n // Now just read off the bits\n const bits = new BitMatrix(matrixWidth, matrixHeight);\n for (let y = 0; y < matrixHeight; y++) {\n const iOffset = top + /*(int) */ Math.floor(y * moduleSize);\n for (let x = 0; x < matrixWidth; x++) {\n if (image.get(left + /*(int) */ Math.floor(x * moduleSize), iOffset)) {\n bits.set(x, y);\n }\n }\n }\n return bits;\n }\n static moduleSize(leftTopBlack, image) {\n const height = image.getHeight();\n const width = image.getWidth();\n let x = leftTopBlack[0];\n let y = leftTopBlack[1];\n let inBlack = true;\n let transitions = 0;\n while (x < width && y < height) {\n if (inBlack !== image.get(x, y)) {\n if (++transitions === 5) {\n break;\n }\n inBlack = !inBlack;\n }\n x++;\n y++;\n }\n if (x === width || y === height) {\n throw new NotFoundException();\n }\n return (x - leftTopBlack[0]) / 7.0;\n }\n }\n QRCodeReader.NO_POINTS = new Array();\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author SITA Lab (kevin.osullivan@sita.aero)\n * @author Guenther Grau\n */\n /*public final*/ class PDF417Common {\n PDF417Common() {\n }\n /**\n * @param moduleBitCount values to sum\n * @return sum of values\n * @deprecated call {@link MathUtils#sum(int[])}\n */\n // @Deprecated\n static getBitCountSum(moduleBitCount) {\n return MathUtils.sum(moduleBitCount);\n }\n static toIntArray(list) {\n if (list == null || !list.length) {\n return PDF417Common.EMPTY_INT_ARRAY;\n }\n const result = new Int32Array(list.length);\n let i = 0;\n for (const integer of list) {\n result[i++] = integer;\n }\n return result;\n }\n /**\n * @param symbol encoded symbol to translate to a codeword\n * @return the codeword corresponding to the symbol.\n */\n static getCodeword(symbol /*int*/) {\n const i = Arrays.binarySearch(PDF417Common.SYMBOL_TABLE, symbol & 0x3FFFF);\n if (i < 0) {\n return -1;\n }\n return (PDF417Common.CODEWORD_TABLE[i] - 1) % PDF417Common.NUMBER_OF_CODEWORDS;\n }\n }\n PDF417Common.NUMBER_OF_CODEWORDS = 929;\n // Maximum Codewords (Data + Error).\n PDF417Common.MAX_CODEWORDS_IN_BARCODE = PDF417Common.NUMBER_OF_CODEWORDS - 1;\n PDF417Common.MIN_ROWS_IN_BARCODE = 3;\n PDF417Common.MAX_ROWS_IN_BARCODE = 90;\n // One left row indication column + max 30 data columns + one right row indicator column\n // public static /*final*/ MAX_CODEWORDS_IN_ROW: /*int*/ number = 32;\n PDF417Common.MODULES_IN_CODEWORD = 17;\n PDF417Common.MODULES_IN_STOP_PATTERN = 18;\n PDF417Common.BARS_IN_MODULE = 8;\n PDF417Common.EMPTY_INT_ARRAY = new Int32Array([]);\n /**\n * The sorted table of all possible symbols. Extracted from the PDF417\n * specification. The index of a symbol in this table corresponds to the\n * index into the codeword table.\n */\n PDF417Common.SYMBOL_TABLE = Int32Array.from([\n 0x1025e, 0x1027a, 0x1029e, 0x102bc, 0x102f2, 0x102f4, 0x1032e, 0x1034e, 0x1035c, 0x10396, 0x103a6, 0x103ac,\n 0x10422, 0x10428, 0x10436, 0x10442, 0x10444, 0x10448, 0x10450, 0x1045e, 0x10466, 0x1046c, 0x1047a, 0x10482,\n 0x1049e, 0x104a0, 0x104bc, 0x104c6, 0x104d8, 0x104ee, 0x104f2, 0x104f4, 0x10504, 0x10508, 0x10510, 0x1051e,\n 0x10520, 0x1053c, 0x10540, 0x10578, 0x10586, 0x1058c, 0x10598, 0x105b0, 0x105be, 0x105ce, 0x105dc, 0x105e2,\n 0x105e4, 0x105e8, 0x105f6, 0x1062e, 0x1064e, 0x1065c, 0x1068e, 0x1069c, 0x106b8, 0x106de, 0x106fa, 0x10716,\n 0x10726, 0x1072c, 0x10746, 0x1074c, 0x10758, 0x1076e, 0x10792, 0x10794, 0x107a2, 0x107a4, 0x107a8, 0x107b6,\n 0x10822, 0x10828, 0x10842, 0x10848, 0x10850, 0x1085e, 0x10866, 0x1086c, 0x1087a, 0x10882, 0x10884, 0x10890,\n 0x1089e, 0x108a0, 0x108bc, 0x108c6, 0x108cc, 0x108d8, 0x108ee, 0x108f2, 0x108f4, 0x10902, 0x10908, 0x1091e,\n 0x10920, 0x1093c, 0x10940, 0x10978, 0x10986, 0x10998, 0x109b0, 0x109be, 0x109ce, 0x109dc, 0x109e2, 0x109e4,\n 0x109e8, 0x109f6, 0x10a08, 0x10a10, 0x10a1e, 0x10a20, 0x10a3c, 0x10a40, 0x10a78, 0x10af0, 0x10b06, 0x10b0c,\n 0x10b18, 0x10b30, 0x10b3e, 0x10b60, 0x10b7c, 0x10b8e, 0x10b9c, 0x10bb8, 0x10bc2, 0x10bc4, 0x10bc8, 0x10bd0,\n 0x10bde, 0x10be6, 0x10bec, 0x10c2e, 0x10c4e, 0x10c5c, 0x10c62, 0x10c64, 0x10c68, 0x10c76, 0x10c8e, 0x10c9c,\n 0x10cb8, 0x10cc2, 0x10cc4, 0x10cc8, 0x10cd0, 0x10cde, 0x10ce6, 0x10cec, 0x10cfa, 0x10d0e, 0x10d1c, 0x10d38,\n 0x10d70, 0x10d7e, 0x10d82, 0x10d84, 0x10d88, 0x10d90, 0x10d9e, 0x10da0, 0x10dbc, 0x10dc6, 0x10dcc, 0x10dd8,\n 0x10dee, 0x10df2, 0x10df4, 0x10e16, 0x10e26, 0x10e2c, 0x10e46, 0x10e58, 0x10e6e, 0x10e86, 0x10e8c, 0x10e98,\n 0x10eb0, 0x10ebe, 0x10ece, 0x10edc, 0x10f0a, 0x10f12, 0x10f14, 0x10f22, 0x10f28, 0x10f36, 0x10f42, 0x10f44,\n 0x10f48, 0x10f50, 0x10f5e, 0x10f66, 0x10f6c, 0x10fb2, 0x10fb4, 0x11022, 0x11028, 0x11042, 0x11048, 0x11050,\n 0x1105e, 0x1107a, 0x11082, 0x11084, 0x11090, 0x1109e, 0x110a0, 0x110bc, 0x110c6, 0x110cc, 0x110d8, 0x110ee,\n 0x110f2, 0x110f4, 0x11102, 0x1111e, 0x11120, 0x1113c, 0x11140, 0x11178, 0x11186, 0x11198, 0x111b0, 0x111be,\n 0x111ce, 0x111dc, 0x111e2, 0x111e4, 0x111e8, 0x111f6, 0x11208, 0x1121e, 0x11220, 0x11278, 0x112f0, 0x1130c,\n 0x11330, 0x1133e, 0x11360, 0x1137c, 0x1138e, 0x1139c, 0x113b8, 0x113c2, 0x113c8, 0x113d0, 0x113de, 0x113e6,\n 0x113ec, 0x11408, 0x11410, 0x1141e, 0x11420, 0x1143c, 0x11440, 0x11478, 0x114f0, 0x115e0, 0x1160c, 0x11618,\n 0x11630, 0x1163e, 0x11660, 0x1167c, 0x116c0, 0x116f8, 0x1171c, 0x11738, 0x11770, 0x1177e, 0x11782, 0x11784,\n 0x11788, 0x11790, 0x1179e, 0x117a0, 0x117bc, 0x117c6, 0x117cc, 0x117d8, 0x117ee, 0x1182e, 0x11834, 0x1184e,\n 0x1185c, 0x11862, 0x11864, 0x11868, 0x11876, 0x1188e, 0x1189c, 0x118b8, 0x118c2, 0x118c8, 0x118d0, 0x118de,\n 0x118e6, 0x118ec, 0x118fa, 0x1190e, 0x1191c, 0x11938, 0x11970, 0x1197e, 0x11982, 0x11984, 0x11990, 0x1199e,\n 0x119a0, 0x119bc, 0x119c6, 0x119cc, 0x119d8, 0x119ee, 0x119f2, 0x119f4, 0x11a0e, 0x11a1c, 0x11a38, 0x11a70,\n 0x11a7e, 0x11ae0, 0x11afc, 0x11b08, 0x11b10, 0x11b1e, 0x11b20, 0x11b3c, 0x11b40, 0x11b78, 0x11b8c, 0x11b98,\n 0x11bb0, 0x11bbe, 0x11bce, 0x11bdc, 0x11be2, 0x11be4, 0x11be8, 0x11bf6, 0x11c16, 0x11c26, 0x11c2c, 0x11c46,\n 0x11c4c, 0x11c58, 0x11c6e, 0x11c86, 0x11c98, 0x11cb0, 0x11cbe, 0x11cce, 0x11cdc, 0x11ce2, 0x11ce4, 0x11ce8,\n 0x11cf6, 0x11d06, 0x11d0c, 0x11d18, 0x11d30, 0x11d3e, 0x11d60, 0x11d7c, 0x11d8e, 0x11d9c, 0x11db8, 0x11dc4,\n 0x11dc8, 0x11dd0, 0x11dde, 0x11de6, 0x11dec, 0x11dfa, 0x11e0a, 0x11e12, 0x11e14, 0x11e22, 0x11e24, 0x11e28,\n 0x11e36, 0x11e42, 0x11e44, 0x11e50, 0x11e5e, 0x11e66, 0x11e6c, 0x11e82, 0x11e84, 0x11e88, 0x11e90, 0x11e9e,\n 0x11ea0, 0x11ebc, 0x11ec6, 0x11ecc, 0x11ed8, 0x11eee, 0x11f1a, 0x11f2e, 0x11f32, 0x11f34, 0x11f4e, 0x11f5c,\n 0x11f62, 0x11f64, 0x11f68, 0x11f76, 0x12048, 0x1205e, 0x12082, 0x12084, 0x12090, 0x1209e, 0x120a0, 0x120bc,\n 0x120d8, 0x120f2, 0x120f4, 0x12108, 0x1211e, 0x12120, 0x1213c, 0x12140, 0x12178, 0x12186, 0x12198, 0x121b0,\n 0x121be, 0x121e2, 0x121e4, 0x121e8, 0x121f6, 0x12204, 0x12210, 0x1221e, 0x12220, 0x12278, 0x122f0, 0x12306,\n 0x1230c, 0x12330, 0x1233e, 0x12360, 0x1237c, 0x1238e, 0x1239c, 0x123b8, 0x123c2, 0x123c8, 0x123d0, 0x123e6,\n 0x123ec, 0x1241e, 0x12420, 0x1243c, 0x124f0, 0x125e0, 0x12618, 0x1263e, 0x12660, 0x1267c, 0x126c0, 0x126f8,\n 0x12738, 0x12770, 0x1277e, 0x12782, 0x12784, 0x12790, 0x1279e, 0x127a0, 0x127bc, 0x127c6, 0x127cc, 0x127d8,\n 0x127ee, 0x12820, 0x1283c, 0x12840, 0x12878, 0x128f0, 0x129e0, 0x12bc0, 0x12c18, 0x12c30, 0x12c3e, 0x12c60,\n 0x12c7c, 0x12cc0, 0x12cf8, 0x12df0, 0x12e1c, 0x12e38, 0x12e70, 0x12e7e, 0x12ee0, 0x12efc, 0x12f04, 0x12f08,\n 0x12f10, 0x12f20, 0x12f3c, 0x12f40, 0x12f78, 0x12f86, 0x12f8c, 0x12f98, 0x12fb0, 0x12fbe, 0x12fce, 0x12fdc,\n 0x1302e, 0x1304e, 0x1305c, 0x13062, 0x13068, 0x1308e, 0x1309c, 0x130b8, 0x130c2, 0x130c8, 0x130d0, 0x130de,\n 0x130ec, 0x130fa, 0x1310e, 0x13138, 0x13170, 0x1317e, 0x13182, 0x13184, 0x13190, 0x1319e, 0x131a0, 0x131bc,\n 0x131c6, 0x131cc, 0x131d8, 0x131f2, 0x131f4, 0x1320e, 0x1321c, 0x13270, 0x1327e, 0x132e0, 0x132fc, 0x13308,\n 0x1331e, 0x13320, 0x1333c, 0x13340, 0x13378, 0x13386, 0x13398, 0x133b0, 0x133be, 0x133ce, 0x133dc, 0x133e2,\n 0x133e4, 0x133e8, 0x133f6, 0x1340e, 0x1341c, 0x13438, 0x13470, 0x1347e, 0x134e0, 0x134fc, 0x135c0, 0x135f8,\n 0x13608, 0x13610, 0x1361e, 0x13620, 0x1363c, 0x13640, 0x13678, 0x136f0, 0x1370c, 0x13718, 0x13730, 0x1373e,\n 0x13760, 0x1377c, 0x1379c, 0x137b8, 0x137c2, 0x137c4, 0x137c8, 0x137d0, 0x137de, 0x137e6, 0x137ec, 0x13816,\n 0x13826, 0x1382c, 0x13846, 0x1384c, 0x13858, 0x1386e, 0x13874, 0x13886, 0x13898, 0x138b0, 0x138be, 0x138ce,\n 0x138dc, 0x138e2, 0x138e4, 0x138e8, 0x13906, 0x1390c, 0x13930, 0x1393e, 0x13960, 0x1397c, 0x1398e, 0x1399c,\n 0x139b8, 0x139c8, 0x139d0, 0x139de, 0x139e6, 0x139ec, 0x139fa, 0x13a06, 0x13a0c, 0x13a18, 0x13a30, 0x13a3e,\n 0x13a60, 0x13a7c, 0x13ac0, 0x13af8, 0x13b0e, 0x13b1c, 0x13b38, 0x13b70, 0x13b7e, 0x13b88, 0x13b90, 0x13b9e,\n 0x13ba0, 0x13bbc, 0x13bcc, 0x13bd8, 0x13bee, 0x13bf2, 0x13bf4, 0x13c12, 0x13c14, 0x13c22, 0x13c24, 0x13c28,\n 0x13c36, 0x13c42, 0x13c48, 0x13c50, 0x13c5e, 0x13c66, 0x13c6c, 0x13c82, 0x13c84, 0x13c90, 0x13c9e, 0x13ca0,\n 0x13cbc, 0x13cc6, 0x13ccc, 0x13cd8, 0x13cee, 0x13d02, 0x13d04, 0x13d08, 0x13d10, 0x13d1e, 0x13d20, 0x13d3c,\n 0x13d40, 0x13d78, 0x13d86, 0x13d8c, 0x13d98, 0x13db0, 0x13dbe, 0x13dce, 0x13ddc, 0x13de4, 0x13de8, 0x13df6,\n 0x13e1a, 0x13e2e, 0x13e32, 0x13e34, 0x13e4e, 0x13e5c, 0x13e62, 0x13e64, 0x13e68, 0x13e76, 0x13e8e, 0x13e9c,\n 0x13eb8, 0x13ec2, 0x13ec4, 0x13ec8, 0x13ed0, 0x13ede, 0x13ee6, 0x13eec, 0x13f26, 0x13f2c, 0x13f3a, 0x13f46,\n 0x13f4c, 0x13f58, 0x13f6e, 0x13f72, 0x13f74, 0x14082, 0x1409e, 0x140a0, 0x140bc, 0x14104, 0x14108, 0x14110,\n 0x1411e, 0x14120, 0x1413c, 0x14140, 0x14178, 0x1418c, 0x14198, 0x141b0, 0x141be, 0x141e2, 0x141e4, 0x141e8,\n 0x14208, 0x14210, 0x1421e, 0x14220, 0x1423c, 0x14240, 0x14278, 0x142f0, 0x14306, 0x1430c, 0x14318, 0x14330,\n 0x1433e, 0x14360, 0x1437c, 0x1438e, 0x143c2, 0x143c4, 0x143c8, 0x143d0, 0x143e6, 0x143ec, 0x14408, 0x14410,\n 0x1441e, 0x14420, 0x1443c, 0x14440, 0x14478, 0x144f0, 0x145e0, 0x1460c, 0x14618, 0x14630, 0x1463e, 0x14660,\n 0x1467c, 0x146c0, 0x146f8, 0x1471c, 0x14738, 0x14770, 0x1477e, 0x14782, 0x14784, 0x14788, 0x14790, 0x147a0,\n 0x147bc, 0x147c6, 0x147cc, 0x147d8, 0x147ee, 0x14810, 0x14820, 0x1483c, 0x14840, 0x14878, 0x148f0, 0x149e0,\n 0x14bc0, 0x14c30, 0x14c3e, 0x14c60, 0x14c7c, 0x14cc0, 0x14cf8, 0x14df0, 0x14e38, 0x14e70, 0x14e7e, 0x14ee0,\n 0x14efc, 0x14f04, 0x14f08, 0x14f10, 0x14f1e, 0x14f20, 0x14f3c, 0x14f40, 0x14f78, 0x14f86, 0x14f8c, 0x14f98,\n 0x14fb0, 0x14fce, 0x14fdc, 0x15020, 0x15040, 0x15078, 0x150f0, 0x151e0, 0x153c0, 0x15860, 0x1587c, 0x158c0,\n 0x158f8, 0x159f0, 0x15be0, 0x15c70, 0x15c7e, 0x15ce0, 0x15cfc, 0x15dc0, 0x15df8, 0x15e08, 0x15e10, 0x15e20,\n 0x15e40, 0x15e78, 0x15ef0, 0x15f0c, 0x15f18, 0x15f30, 0x15f60, 0x15f7c, 0x15f8e, 0x15f9c, 0x15fb8, 0x1604e,\n 0x1605c, 0x1608e, 0x1609c, 0x160b8, 0x160c2, 0x160c4, 0x160c8, 0x160de, 0x1610e, 0x1611c, 0x16138, 0x16170,\n 0x1617e, 0x16184, 0x16188, 0x16190, 0x1619e, 0x161a0, 0x161bc, 0x161c6, 0x161cc, 0x161d8, 0x161f2, 0x161f4,\n 0x1620e, 0x1621c, 0x16238, 0x16270, 0x1627e, 0x162e0, 0x162fc, 0x16304, 0x16308, 0x16310, 0x1631e, 0x16320,\n 0x1633c, 0x16340, 0x16378, 0x16386, 0x1638c, 0x16398, 0x163b0, 0x163be, 0x163ce, 0x163dc, 0x163e2, 0x163e4,\n 0x163e8, 0x163f6, 0x1640e, 0x1641c, 0x16438, 0x16470, 0x1647e, 0x164e0, 0x164fc, 0x165c0, 0x165f8, 0x16610,\n 0x1661e, 0x16620, 0x1663c, 0x16640, 0x16678, 0x166f0, 0x16718, 0x16730, 0x1673e, 0x16760, 0x1677c, 0x1678e,\n 0x1679c, 0x167b8, 0x167c2, 0x167c4, 0x167c8, 0x167d0, 0x167de, 0x167e6, 0x167ec, 0x1681c, 0x16838, 0x16870,\n 0x168e0, 0x168fc, 0x169c0, 0x169f8, 0x16bf0, 0x16c10, 0x16c1e, 0x16c20, 0x16c3c, 0x16c40, 0x16c78, 0x16cf0,\n 0x16de0, 0x16e18, 0x16e30, 0x16e3e, 0x16e60, 0x16e7c, 0x16ec0, 0x16ef8, 0x16f1c, 0x16f38, 0x16f70, 0x16f7e,\n 0x16f84, 0x16f88, 0x16f90, 0x16f9e, 0x16fa0, 0x16fbc, 0x16fc6, 0x16fcc, 0x16fd8, 0x17026, 0x1702c, 0x17046,\n 0x1704c, 0x17058, 0x1706e, 0x17086, 0x1708c, 0x17098, 0x170b0, 0x170be, 0x170ce, 0x170dc, 0x170e8, 0x17106,\n 0x1710c, 0x17118, 0x17130, 0x1713e, 0x17160, 0x1717c, 0x1718e, 0x1719c, 0x171b8, 0x171c2, 0x171c4, 0x171c8,\n 0x171d0, 0x171de, 0x171e6, 0x171ec, 0x171fa, 0x17206, 0x1720c, 0x17218, 0x17230, 0x1723e, 0x17260, 0x1727c,\n 0x172c0, 0x172f8, 0x1730e, 0x1731c, 0x17338, 0x17370, 0x1737e, 0x17388, 0x17390, 0x1739e, 0x173a0, 0x173bc,\n 0x173cc, 0x173d8, 0x173ee, 0x173f2, 0x173f4, 0x1740c, 0x17418, 0x17430, 0x1743e, 0x17460, 0x1747c, 0x174c0,\n 0x174f8, 0x175f0, 0x1760e, 0x1761c, 0x17638, 0x17670, 0x1767e, 0x176e0, 0x176fc, 0x17708, 0x17710, 0x1771e,\n 0x17720, 0x1773c, 0x17740, 0x17778, 0x17798, 0x177b0, 0x177be, 0x177dc, 0x177e2, 0x177e4, 0x177e8, 0x17822,\n 0x17824, 0x17828, 0x17836, 0x17842, 0x17844, 0x17848, 0x17850, 0x1785e, 0x17866, 0x1786c, 0x17882, 0x17884,\n 0x17888, 0x17890, 0x1789e, 0x178a0, 0x178bc, 0x178c6, 0x178cc, 0x178d8, 0x178ee, 0x178f2, 0x178f4, 0x17902,\n 0x17904, 0x17908, 0x17910, 0x1791e, 0x17920, 0x1793c, 0x17940, 0x17978, 0x17986, 0x1798c, 0x17998, 0x179b0,\n 0x179be, 0x179ce, 0x179dc, 0x179e2, 0x179e4, 0x179e8, 0x179f6, 0x17a04, 0x17a08, 0x17a10, 0x17a1e, 0x17a20,\n 0x17a3c, 0x17a40, 0x17a78, 0x17af0, 0x17b06, 0x17b0c, 0x17b18, 0x17b30, 0x17b3e, 0x17b60, 0x17b7c, 0x17b8e,\n 0x17b9c, 0x17bb8, 0x17bc4, 0x17bc8, 0x17bd0, 0x17bde, 0x17be6, 0x17bec, 0x17c2e, 0x17c32, 0x17c34, 0x17c4e,\n 0x17c5c, 0x17c62, 0x17c64, 0x17c68, 0x17c76, 0x17c8e, 0x17c9c, 0x17cb8, 0x17cc2, 0x17cc4, 0x17cc8, 0x17cd0,\n 0x17cde, 0x17ce6, 0x17cec, 0x17d0e, 0x17d1c, 0x17d38, 0x17d70, 0x17d82, 0x17d84, 0x17d88, 0x17d90, 0x17d9e,\n 0x17da0, 0x17dbc, 0x17dc6, 0x17dcc, 0x17dd8, 0x17dee, 0x17e26, 0x17e2c, 0x17e3a, 0x17e46, 0x17e4c, 0x17e58,\n 0x17e6e, 0x17e72, 0x17e74, 0x17e86, 0x17e8c, 0x17e98, 0x17eb0, 0x17ece, 0x17edc, 0x17ee2, 0x17ee4, 0x17ee8,\n 0x17ef6, 0x1813a, 0x18172, 0x18174, 0x18216, 0x18226, 0x1823a, 0x1824c, 0x18258, 0x1826e, 0x18272, 0x18274,\n 0x18298, 0x182be, 0x182e2, 0x182e4, 0x182e8, 0x182f6, 0x1835e, 0x1837a, 0x183ae, 0x183d6, 0x18416, 0x18426,\n 0x1842c, 0x1843a, 0x18446, 0x18458, 0x1846e, 0x18472, 0x18474, 0x18486, 0x184b0, 0x184be, 0x184ce, 0x184dc,\n 0x184e2, 0x184e4, 0x184e8, 0x184f6, 0x18506, 0x1850c, 0x18518, 0x18530, 0x1853e, 0x18560, 0x1857c, 0x1858e,\n 0x1859c, 0x185b8, 0x185c2, 0x185c4, 0x185c8, 0x185d0, 0x185de, 0x185e6, 0x185ec, 0x185fa, 0x18612, 0x18614,\n 0x18622, 0x18628, 0x18636, 0x18642, 0x18650, 0x1865e, 0x1867a, 0x18682, 0x18684, 0x18688, 0x18690, 0x1869e,\n 0x186a0, 0x186bc, 0x186c6, 0x186cc, 0x186d8, 0x186ee, 0x186f2, 0x186f4, 0x1872e, 0x1874e, 0x1875c, 0x18796,\n 0x187a6, 0x187ac, 0x187d2, 0x187d4, 0x18826, 0x1882c, 0x1883a, 0x18846, 0x1884c, 0x18858, 0x1886e, 0x18872,\n 0x18874, 0x18886, 0x18898, 0x188b0, 0x188be, 0x188ce, 0x188dc, 0x188e2, 0x188e4, 0x188e8, 0x188f6, 0x1890c,\n 0x18930, 0x1893e, 0x18960, 0x1897c, 0x1898e, 0x189b8, 0x189c2, 0x189c8, 0x189d0, 0x189de, 0x189e6, 0x189ec,\n 0x189fa, 0x18a18, 0x18a30, 0x18a3e, 0x18a60, 0x18a7c, 0x18ac0, 0x18af8, 0x18b1c, 0x18b38, 0x18b70, 0x18b7e,\n 0x18b82, 0x18b84, 0x18b88, 0x18b90, 0x18b9e, 0x18ba0, 0x18bbc, 0x18bc6, 0x18bcc, 0x18bd8, 0x18bee, 0x18bf2,\n 0x18bf4, 0x18c22, 0x18c24, 0x18c28, 0x18c36, 0x18c42, 0x18c48, 0x18c50, 0x18c5e, 0x18c66, 0x18c7a, 0x18c82,\n 0x18c84, 0x18c90, 0x18c9e, 0x18ca0, 0x18cbc, 0x18ccc, 0x18cf2, 0x18cf4, 0x18d04, 0x18d08, 0x18d10, 0x18d1e,\n 0x18d20, 0x18d3c, 0x18d40, 0x18d78, 0x18d86, 0x18d98, 0x18dce, 0x18de2, 0x18de4, 0x18de8, 0x18e2e, 0x18e32,\n 0x18e34, 0x18e4e, 0x18e5c, 0x18e62, 0x18e64, 0x18e68, 0x18e8e, 0x18e9c, 0x18eb8, 0x18ec2, 0x18ec4, 0x18ec8,\n 0x18ed0, 0x18efa, 0x18f16, 0x18f26, 0x18f2c, 0x18f46, 0x18f4c, 0x18f58, 0x18f6e, 0x18f8a, 0x18f92, 0x18f94,\n 0x18fa2, 0x18fa4, 0x18fa8, 0x18fb6, 0x1902c, 0x1903a, 0x19046, 0x1904c, 0x19058, 0x19072, 0x19074, 0x19086,\n 0x19098, 0x190b0, 0x190be, 0x190ce, 0x190dc, 0x190e2, 0x190e8, 0x190f6, 0x19106, 0x1910c, 0x19130, 0x1913e,\n 0x19160, 0x1917c, 0x1918e, 0x1919c, 0x191b8, 0x191c2, 0x191c8, 0x191d0, 0x191de, 0x191e6, 0x191ec, 0x191fa,\n 0x19218, 0x1923e, 0x19260, 0x1927c, 0x192c0, 0x192f8, 0x19338, 0x19370, 0x1937e, 0x19382, 0x19384, 0x19390,\n 0x1939e, 0x193a0, 0x193bc, 0x193c6, 0x193cc, 0x193d8, 0x193ee, 0x193f2, 0x193f4, 0x19430, 0x1943e, 0x19460,\n 0x1947c, 0x194c0, 0x194f8, 0x195f0, 0x19638, 0x19670, 0x1967e, 0x196e0, 0x196fc, 0x19702, 0x19704, 0x19708,\n 0x19710, 0x19720, 0x1973c, 0x19740, 0x19778, 0x19786, 0x1978c, 0x19798, 0x197b0, 0x197be, 0x197ce, 0x197dc,\n 0x197e2, 0x197e4, 0x197e8, 0x19822, 0x19824, 0x19842, 0x19848, 0x19850, 0x1985e, 0x19866, 0x1987a, 0x19882,\n 0x19884, 0x19890, 0x1989e, 0x198a0, 0x198bc, 0x198cc, 0x198f2, 0x198f4, 0x19902, 0x19908, 0x1991e, 0x19920,\n 0x1993c, 0x19940, 0x19978, 0x19986, 0x19998, 0x199ce, 0x199e2, 0x199e4, 0x199e8, 0x19a08, 0x19a10, 0x19a1e,\n 0x19a20, 0x19a3c, 0x19a40, 0x19a78, 0x19af0, 0x19b18, 0x19b3e, 0x19b60, 0x19b9c, 0x19bc2, 0x19bc4, 0x19bc8,\n 0x19bd0, 0x19be6, 0x19c2e, 0x19c34, 0x19c4e, 0x19c5c, 0x19c62, 0x19c64, 0x19c68, 0x19c8e, 0x19c9c, 0x19cb8,\n 0x19cc2, 0x19cc8, 0x19cd0, 0x19ce6, 0x19cfa, 0x19d0e, 0x19d1c, 0x19d38, 0x19d70, 0x19d7e, 0x19d82, 0x19d84,\n 0x19d88, 0x19d90, 0x19da0, 0x19dcc, 0x19df2, 0x19df4, 0x19e16, 0x19e26, 0x19e2c, 0x19e46, 0x19e4c, 0x19e58,\n 0x19e74, 0x19e86, 0x19e8c, 0x19e98, 0x19eb0, 0x19ebe, 0x19ece, 0x19ee2, 0x19ee4, 0x19ee8, 0x19f0a, 0x19f12,\n 0x19f14, 0x19f22, 0x19f24, 0x19f28, 0x19f42, 0x19f44, 0x19f48, 0x19f50, 0x19f5e, 0x19f6c, 0x19f9a, 0x19fae,\n 0x19fb2, 0x19fb4, 0x1a046, 0x1a04c, 0x1a072, 0x1a074, 0x1a086, 0x1a08c, 0x1a098, 0x1a0b0, 0x1a0be, 0x1a0e2,\n 0x1a0e4, 0x1a0e8, 0x1a0f6, 0x1a106, 0x1a10c, 0x1a118, 0x1a130, 0x1a13e, 0x1a160, 0x1a17c, 0x1a18e, 0x1a19c,\n 0x1a1b8, 0x1a1c2, 0x1a1c4, 0x1a1c8, 0x1a1d0, 0x1a1de, 0x1a1e6, 0x1a1ec, 0x1a218, 0x1a230, 0x1a23e, 0x1a260,\n 0x1a27c, 0x1a2c0, 0x1a2f8, 0x1a31c, 0x1a338, 0x1a370, 0x1a37e, 0x1a382, 0x1a384, 0x1a388, 0x1a390, 0x1a39e,\n 0x1a3a0, 0x1a3bc, 0x1a3c6, 0x1a3cc, 0x1a3d8, 0x1a3ee, 0x1a3f2, 0x1a3f4, 0x1a418, 0x1a430, 0x1a43e, 0x1a460,\n 0x1a47c, 0x1a4c0, 0x1a4f8, 0x1a5f0, 0x1a61c, 0x1a638, 0x1a670, 0x1a67e, 0x1a6e0, 0x1a6fc, 0x1a702, 0x1a704,\n 0x1a708, 0x1a710, 0x1a71e, 0x1a720, 0x1a73c, 0x1a740, 0x1a778, 0x1a786, 0x1a78c, 0x1a798, 0x1a7b0, 0x1a7be,\n 0x1a7ce, 0x1a7dc, 0x1a7e2, 0x1a7e4, 0x1a7e8, 0x1a830, 0x1a860, 0x1a87c, 0x1a8c0, 0x1a8f8, 0x1a9f0, 0x1abe0,\n 0x1ac70, 0x1ac7e, 0x1ace0, 0x1acfc, 0x1adc0, 0x1adf8, 0x1ae04, 0x1ae08, 0x1ae10, 0x1ae20, 0x1ae3c, 0x1ae40,\n 0x1ae78, 0x1aef0, 0x1af06, 0x1af0c, 0x1af18, 0x1af30, 0x1af3e, 0x1af60, 0x1af7c, 0x1af8e, 0x1af9c, 0x1afb8,\n 0x1afc4, 0x1afc8, 0x1afd0, 0x1afde, 0x1b042, 0x1b05e, 0x1b07a, 0x1b082, 0x1b084, 0x1b088, 0x1b090, 0x1b09e,\n 0x1b0a0, 0x1b0bc, 0x1b0cc, 0x1b0f2, 0x1b0f4, 0x1b102, 0x1b104, 0x1b108, 0x1b110, 0x1b11e, 0x1b120, 0x1b13c,\n 0x1b140, 0x1b178, 0x1b186, 0x1b198, 0x1b1ce, 0x1b1e2, 0x1b1e4, 0x1b1e8, 0x1b204, 0x1b208, 0x1b210, 0x1b21e,\n 0x1b220, 0x1b23c, 0x1b240, 0x1b278, 0x1b2f0, 0x1b30c, 0x1b33e, 0x1b360, 0x1b39c, 0x1b3c2, 0x1b3c4, 0x1b3c8,\n 0x1b3d0, 0x1b3e6, 0x1b410, 0x1b41e, 0x1b420, 0x1b43c, 0x1b440, 0x1b478, 0x1b4f0, 0x1b5e0, 0x1b618, 0x1b660,\n 0x1b67c, 0x1b6c0, 0x1b738, 0x1b782, 0x1b784, 0x1b788, 0x1b790, 0x1b79e, 0x1b7a0, 0x1b7cc, 0x1b82e, 0x1b84e,\n 0x1b85c, 0x1b88e, 0x1b89c, 0x1b8b8, 0x1b8c2, 0x1b8c4, 0x1b8c8, 0x1b8d0, 0x1b8e6, 0x1b8fa, 0x1b90e, 0x1b91c,\n 0x1b938, 0x1b970, 0x1b97e, 0x1b982, 0x1b984, 0x1b988, 0x1b990, 0x1b99e, 0x1b9a0, 0x1b9cc, 0x1b9f2, 0x1b9f4,\n 0x1ba0e, 0x1ba1c, 0x1ba38, 0x1ba70, 0x1ba7e, 0x1bae0, 0x1bafc, 0x1bb08, 0x1bb10, 0x1bb20, 0x1bb3c, 0x1bb40,\n 0x1bb98, 0x1bbce, 0x1bbe2, 0x1bbe4, 0x1bbe8, 0x1bc16, 0x1bc26, 0x1bc2c, 0x1bc46, 0x1bc4c, 0x1bc58, 0x1bc72,\n 0x1bc74, 0x1bc86, 0x1bc8c, 0x1bc98, 0x1bcb0, 0x1bcbe, 0x1bcce, 0x1bce2, 0x1bce4, 0x1bce8, 0x1bd06, 0x1bd0c,\n 0x1bd18, 0x1bd30, 0x1bd3e, 0x1bd60, 0x1bd7c, 0x1bd9c, 0x1bdc2, 0x1bdc4, 0x1bdc8, 0x1bdd0, 0x1bde6, 0x1bdfa,\n 0x1be12, 0x1be14, 0x1be22, 0x1be24, 0x1be28, 0x1be42, 0x1be44, 0x1be48, 0x1be50, 0x1be5e, 0x1be66, 0x1be82,\n 0x1be84, 0x1be88, 0x1be90, 0x1be9e, 0x1bea0, 0x1bebc, 0x1becc, 0x1bef4, 0x1bf1a, 0x1bf2e, 0x1bf32, 0x1bf34,\n 0x1bf4e, 0x1bf5c, 0x1bf62, 0x1bf64, 0x1bf68, 0x1c09a, 0x1c0b2, 0x1c0b4, 0x1c11a, 0x1c132, 0x1c134, 0x1c162,\n 0x1c164, 0x1c168, 0x1c176, 0x1c1ba, 0x1c21a, 0x1c232, 0x1c234, 0x1c24e, 0x1c25c, 0x1c262, 0x1c264, 0x1c268,\n 0x1c276, 0x1c28e, 0x1c2c2, 0x1c2c4, 0x1c2c8, 0x1c2d0, 0x1c2de, 0x1c2e6, 0x1c2ec, 0x1c2fa, 0x1c316, 0x1c326,\n 0x1c33a, 0x1c346, 0x1c34c, 0x1c372, 0x1c374, 0x1c41a, 0x1c42e, 0x1c432, 0x1c434, 0x1c44e, 0x1c45c, 0x1c462,\n 0x1c464, 0x1c468, 0x1c476, 0x1c48e, 0x1c49c, 0x1c4b8, 0x1c4c2, 0x1c4c8, 0x1c4d0, 0x1c4de, 0x1c4e6, 0x1c4ec,\n 0x1c4fa, 0x1c51c, 0x1c538, 0x1c570, 0x1c57e, 0x1c582, 0x1c584, 0x1c588, 0x1c590, 0x1c59e, 0x1c5a0, 0x1c5bc,\n 0x1c5c6, 0x1c5cc, 0x1c5d8, 0x1c5ee, 0x1c5f2, 0x1c5f4, 0x1c616, 0x1c626, 0x1c62c, 0x1c63a, 0x1c646, 0x1c64c,\n 0x1c658, 0x1c66e, 0x1c672, 0x1c674, 0x1c686, 0x1c68c, 0x1c698, 0x1c6b0, 0x1c6be, 0x1c6ce, 0x1c6dc, 0x1c6e2,\n 0x1c6e4, 0x1c6e8, 0x1c712, 0x1c714, 0x1c722, 0x1c728, 0x1c736, 0x1c742, 0x1c744, 0x1c748, 0x1c750, 0x1c75e,\n 0x1c766, 0x1c76c, 0x1c77a, 0x1c7ae, 0x1c7d6, 0x1c7ea, 0x1c81a, 0x1c82e, 0x1c832, 0x1c834, 0x1c84e, 0x1c85c,\n 0x1c862, 0x1c864, 0x1c868, 0x1c876, 0x1c88e, 0x1c89c, 0x1c8b8, 0x1c8c2, 0x1c8c8, 0x1c8d0, 0x1c8de, 0x1c8e6,\n 0x1c8ec, 0x1c8fa, 0x1c90e, 0x1c938, 0x1c970, 0x1c97e, 0x1c982, 0x1c984, 0x1c990, 0x1c99e, 0x1c9a0, 0x1c9bc,\n 0x1c9c6, 0x1c9cc, 0x1c9d8, 0x1c9ee, 0x1c9f2, 0x1c9f4, 0x1ca38, 0x1ca70, 0x1ca7e, 0x1cae0, 0x1cafc, 0x1cb02,\n 0x1cb04, 0x1cb08, 0x1cb10, 0x1cb20, 0x1cb3c, 0x1cb40, 0x1cb78, 0x1cb86, 0x1cb8c, 0x1cb98, 0x1cbb0, 0x1cbbe,\n 0x1cbce, 0x1cbdc, 0x1cbe2, 0x1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0x1d3e2, 0x1d3e4, 0x1d3e8, 0x1d3f6, 0x1d470, 0x1d47e,\n 0x1d4e0, 0x1d4fc, 0x1d5c0, 0x1d5f8, 0x1d604, 0x1d608, 0x1d610, 0x1d620, 0x1d640, 0x1d678, 0x1d6f0, 0x1d706,\n 0x1d70c, 0x1d718, 0x1d730, 0x1d73e, 0x1d760, 0x1d77c, 0x1d78e, 0x1d79c, 0x1d7b8, 0x1d7c2, 0x1d7c4, 0x1d7c8,\n 0x1d7d0, 0x1d7de, 0x1d7e6, 0x1d7ec, 0x1d826, 0x1d82c, 0x1d83a, 0x1d846, 0x1d84c, 0x1d858, 0x1d872, 0x1d874,\n 0x1d886, 0x1d88c, 0x1d898, 0x1d8b0, 0x1d8be, 0x1d8ce, 0x1d8e2, 0x1d8e4, 0x1d8e8, 0x1d8f6, 0x1d90c, 0x1d918,\n 0x1d930, 0x1d93e, 0x1d960, 0x1d97c, 0x1d99c, 0x1d9c2, 0x1d9c4, 0x1d9c8, 0x1d9d0, 0x1d9e6, 0x1d9fa, 0x1da0c,\n 0x1da18, 0x1da30, 0x1da3e, 0x1da60, 0x1da7c, 0x1dac0, 0x1daf8, 0x1db38, 0x1db82, 0x1db84, 0x1db88, 0x1db90,\n 0x1db9e, 0x1dba0, 0x1dbcc, 0x1dbf2, 0x1dbf4, 0x1dc22, 0x1dc42, 0x1dc44, 0x1dc48, 0x1dc50, 0x1dc5e, 0x1dc66,\n 0x1dc7a, 0x1dc82, 0x1dc84, 0x1dc88, 0x1dc90, 0x1dc9e, 0x1dca0, 0x1dcbc, 0x1dccc, 0x1dcf2, 0x1dcf4, 0x1dd04,\n 0x1dd08, 0x1dd10, 0x1dd1e, 0x1dd20, 0x1dd3c, 0x1dd40, 0x1dd78, 0x1dd86, 0x1dd98, 0x1ddce, 0x1dde2, 0x1dde4,\n 0x1dde8, 0x1de2e, 0x1de32, 0x1de34, 0x1de4e, 0x1de5c, 0x1de62, 0x1de64, 0x1de68, 0x1de8e, 0x1de9c, 0x1deb8,\n 0x1dec2, 0x1dec4, 0x1dec8, 0x1ded0, 0x1dee6, 0x1defa, 0x1df16, 0x1df26, 0x1df2c, 0x1df46, 0x1df4c, 0x1df58,\n 0x1df72, 0x1df74, 0x1df8a, 0x1df92, 0x1df94, 0x1dfa2, 0x1dfa4, 0x1dfa8, 0x1e08a, 0x1e092, 0x1e094, 0x1e0a2,\n 0x1e0a4, 0x1e0a8, 0x1e0b6, 0x1e0da, 0x1e10a, 0x1e112, 0x1e114, 0x1e122, 0x1e124, 0x1e128, 0x1e136, 0x1e142,\n 0x1e144, 0x1e148, 0x1e150, 0x1e166, 0x1e16c, 0x1e17a, 0x1e19a, 0x1e1b2, 0x1e1b4, 0x1e20a, 0x1e212, 0x1e214,\n 0x1e222, 0x1e224, 0x1e228, 0x1e236, 0x1e242, 0x1e248, 0x1e250, 0x1e25e, 0x1e266, 0x1e26c, 0x1e27a, 0x1e282,\n 0x1e284, 0x1e288, 0x1e290, 0x1e2a0, 0x1e2bc, 0x1e2c6, 0x1e2cc, 0x1e2d8, 0x1e2ee, 0x1e2f2, 0x1e2f4, 0x1e31a,\n 0x1e332, 0x1e334, 0x1e35c, 0x1e362, 0x1e364, 0x1e368, 0x1e3ba, 0x1e40a, 0x1e412, 0x1e414, 0x1e422, 0x1e428,\n 0x1e436, 0x1e442, 0x1e448, 0x1e450, 0x1e45e, 0x1e466, 0x1e46c, 0x1e47a, 0x1e482, 0x1e484, 0x1e490, 0x1e49e,\n 0x1e4a0, 0x1e4bc, 0x1e4c6, 0x1e4cc, 0x1e4d8, 0x1e4ee, 0x1e4f2, 0x1e4f4, 0x1e502, 0x1e504, 0x1e508, 0x1e510,\n 0x1e51e, 0x1e520, 0x1e53c, 0x1e540, 0x1e578, 0x1e586, 0x1e58c, 0x1e598, 0x1e5b0, 0x1e5be, 0x1e5ce, 0x1e5dc,\n 0x1e5e2, 0x1e5e4, 0x1e5e8, 0x1e5f6, 0x1e61a, 0x1e62e, 0x1e632, 0x1e634, 0x1e64e, 0x1e65c, 0x1e662, 0x1e668,\n 0x1e68e, 0x1e69c, 0x1e6b8, 0x1e6c2, 0x1e6c4, 0x1e6c8, 0x1e6d0, 0x1e6e6, 0x1e6fa, 0x1e716, 0x1e726, 0x1e72c,\n 0x1e73a, 0x1e746, 0x1e74c, 0x1e758, 0x1e772, 0x1e774, 0x1e792, 0x1e794, 0x1e7a2, 0x1e7a4, 0x1e7a8, 0x1e7b6,\n 0x1e812, 0x1e814, 0x1e822, 0x1e824, 0x1e828, 0x1e836, 0x1e842, 0x1e844, 0x1e848, 0x1e850, 0x1e85e, 0x1e866,\n 0x1e86c, 0x1e87a, 0x1e882, 0x1e884, 0x1e888, 0x1e890, 0x1e89e, 0x1e8a0, 0x1e8bc, 0x1e8c6, 0x1e8cc, 0x1e8d8,\n 0x1e8ee, 0x1e8f2, 0x1e8f4, 0x1e902, 0x1e904, 0x1e908, 0x1e910, 0x1e920, 0x1e93c, 0x1e940, 0x1e978, 0x1e986,\n 0x1e98c, 0x1e998, 0x1e9b0, 0x1e9be, 0x1e9ce, 0x1e9dc, 0x1e9e2, 0x1e9e4, 0x1e9e8, 0x1e9f6, 0x1ea04, 0x1ea08,\n 0x1ea10, 0x1ea20, 0x1ea40, 0x1ea78, 0x1eaf0, 0x1eb06, 0x1eb0c, 0x1eb18, 0x1eb30, 0x1eb3e, 0x1eb60, 0x1eb7c,\n 0x1eb8e, 0x1eb9c, 0x1ebb8, 0x1ebc2, 0x1ebc4, 0x1ebc8, 0x1ebd0, 0x1ebde, 0x1ebe6, 0x1ebec, 0x1ec1a, 0x1ec2e,\n 0x1ec32, 0x1ec34, 0x1ec4e, 0x1ec5c, 0x1ec62, 0x1ec64, 0x1ec68, 0x1ec8e, 0x1ec9c, 0x1ecb8, 0x1ecc2, 0x1ecc4,\n 0x1ecc8, 0x1ecd0, 0x1ece6, 0x1ecfa, 0x1ed0e, 0x1ed1c, 0x1ed38, 0x1ed70, 0x1ed7e, 0x1ed82, 0x1ed84, 0x1ed88,\n 0x1ed90, 0x1ed9e, 0x1eda0, 0x1edcc, 0x1edf2, 0x1edf4, 0x1ee16, 0x1ee26, 0x1ee2c, 0x1ee3a, 0x1ee46, 0x1ee4c,\n 0x1ee58, 0x1ee6e, 0x1ee72, 0x1ee74, 0x1ee86, 0x1ee8c, 0x1ee98, 0x1eeb0, 0x1eebe, 0x1eece, 0x1eedc, 0x1eee2,\n 0x1eee4, 0x1eee8, 0x1ef12, 0x1ef22, 0x1ef24, 0x1ef28, 0x1ef36, 0x1ef42, 0x1ef44, 0x1ef48, 0x1ef50, 0x1ef5e,\n 0x1ef66, 0x1ef6c, 0x1ef7a, 0x1efae, 0x1efb2, 0x1efb4, 0x1efd6, 0x1f096, 0x1f0a6, 0x1f0ac, 0x1f0ba, 0x1f0ca,\n 0x1f0d2, 0x1f0d4, 0x1f116, 0x1f126, 0x1f12c, 0x1f13a, 0x1f146, 0x1f14c, 0x1f158, 0x1f16e, 0x1f172, 0x1f174,\n 0x1f18a, 0x1f192, 0x1f194, 0x1f1a2, 0x1f1a4, 0x1f1a8, 0x1f1da, 0x1f216, 0x1f226, 0x1f22c, 0x1f23a, 0x1f246,\n 0x1f258, 0x1f26e, 0x1f272, 0x1f274, 0x1f286, 0x1f28c, 0x1f298, 0x1f2b0, 0x1f2be, 0x1f2ce, 0x1f2dc, 0x1f2e2,\n 0x1f2e4, 0x1f2e8, 0x1f2f6, 0x1f30a, 0x1f312, 0x1f314, 0x1f322, 0x1f328, 0x1f342, 0x1f344, 0x1f348, 0x1f350,\n 0x1f35e, 0x1f366, 0x1f37a, 0x1f39a, 0x1f3ae, 0x1f3b2, 0x1f3b4, 0x1f416, 0x1f426, 0x1f42c, 0x1f43a, 0x1f446,\n 0x1f44c, 0x1f458, 0x1f46e, 0x1f472, 0x1f474, 0x1f486, 0x1f48c, 0x1f498, 0x1f4b0, 0x1f4be, 0x1f4ce, 0x1f4dc,\n 0x1f4e2, 0x1f4e4, 0x1f4e8, 0x1f4f6, 0x1f506, 0x1f50c, 0x1f518, 0x1f530, 0x1f53e, 0x1f560, 0x1f57c, 0x1f58e,\n 0x1f59c, 0x1f5b8, 0x1f5c2, 0x1f5c4, 0x1f5c8, 0x1f5d0, 0x1f5de, 0x1f5e6, 0x1f5ec, 0x1f5fa, 0x1f60a, 0x1f612,\n 0x1f614, 0x1f622, 0x1f624, 0x1f628, 0x1f636, 0x1f642, 0x1f644, 0x1f648, 0x1f650, 0x1f65e, 0x1f666, 0x1f67a,\n 0x1f682, 0x1f684, 0x1f688, 0x1f690, 0x1f69e, 0x1f6a0, 0x1f6bc, 0x1f6cc, 0x1f6f2, 0x1f6f4, 0x1f71a, 0x1f72e,\n 0x1f732, 0x1f734, 0x1f74e, 0x1f75c, 0x1f762, 0x1f764, 0x1f768, 0x1f776, 0x1f796, 0x1f7a6, 0x1f7ac, 0x1f7ba,\n 0x1f7d2, 0x1f7d4, 0x1f89a, 0x1f8ae, 0x1f8b2, 0x1f8b4, 0x1f8d6, 0x1f8ea, 0x1f91a, 0x1f92e, 0x1f932, 0x1f934,\n 0x1f94e, 0x1f95c, 0x1f962, 0x1f964, 0x1f968, 0x1f976, 0x1f996, 0x1f9a6, 0x1f9ac, 0x1f9ba, 0x1f9ca, 0x1f9d2,\n 0x1f9d4, 0x1fa1a, 0x1fa2e, 0x1fa32, 0x1fa34, 0x1fa4e, 0x1fa5c, 0x1fa62, 0x1fa64, 0x1fa68, 0x1fa76, 0x1fa8e,\n 0x1fa9c, 0x1fab8, 0x1fac2, 0x1fac4, 0x1fac8, 0x1fad0, 0x1fade, 0x1fae6, 0x1faec, 0x1fb16, 0x1fb26, 0x1fb2c,\n 0x1fb3a, 0x1fb46, 0x1fb4c, 0x1fb58, 0x1fb6e, 0x1fb72, 0x1fb74, 0x1fb8a, 0x1fb92, 0x1fb94, 0x1fba2, 0x1fba4,\n 0x1fba8, 0x1fbb6, 0x1fbda\n ]);\n /**\n * This table contains to codewords for all symbols.\n */\n PDF417Common.CODEWORD_TABLE = Int32Array.from([\n 2627, 1819, 2622, 2621, 1813, 1812, 2729, 2724, 2723, 2779, 2774, 2773, 902, 896, 908, 868, 865, 861, 859, 2511,\n 873, 871, 1780, 835, 2493, 825, 2491, 842, 837, 844, 1764, 1762, 811, 810, 809, 2483, 807, 2482, 806, 2480, 815,\n 814, 813, 812, 2484, 817, 816, 1745, 1744, 1742, 1746, 2655, 2637, 2635, 2626, 2625, 2623, 2628, 1820, 2752,\n 2739, 2737, 2728, 2727, 2725, 2730, 2785, 2783, 2778, 2777, 2775, 2780, 787, 781, 747, 739, 736, 2413, 754, 752,\n 1719, 692, 689, 681, 2371, 678, 2369, 700, 697, 694, 703, 1688, 1686, 642, 638, 2343, 631, 2341, 627, 2338, 651,\n 646, 643, 2345, 654, 652, 1652, 1650, 1647, 1654, 601, 599, 2322, 596, 2321, 594, 2319, 2317, 611, 610, 608, 606,\n 2324, 603, 2323, 615, 614, 612, 1617, 1616, 1614, 1612, 616, 1619, 1618, 2575, 2538, 2536, 905, 901, 898, 909,\n 2509, 2507, 2504, 870, 867, 864, 860, 2512, 875, 872, 1781, 2490, 2489, 2487, 2485, 1748, 836, 834, 832, 830,\n 2494, 827, 2492, 843, 841, 839, 845, 1765, 1763, 2701, 2676, 2674, 2653, 2648, 2656, 2634, 2633, 2631, 2629,\n 1821, 2638, 2636, 2770, 2763, 2761, 2750, 2745, 2753, 2736, 2735, 2733, 2731, 1848, 2740, 2738, 2786, 2784, 591,\n 588, 576, 569, 566, 2296, 1590, 537, 534, 526, 2276, 522, 2274, 545, 542, 539, 548, 1572, 1570, 481, 2245, 466,\n 2242, 462, 2239, 492, 485, 482, 2249, 496, 494, 1534, 1531, 1528, 1538, 413, 2196, 406, 2191, 2188, 425, 419,\n 2202, 415, 2199, 432, 430, 427, 1472, 1467, 1464, 433, 1476, 1474, 368, 367, 2160, 365, 2159, 362, 2157, 2155,\n 2152, 378, 377, 375, 2166, 372, 2165, 369, 2162, 383, 381, 379, 2168, 1419, 1418, 1416, 1414, 385, 1411, 384,\n 1423, 1422, 1420, 1424, 2461, 802, 2441, 2439, 790, 786, 783, 794, 2409, 2406, 2403, 750, 742, 738, 2414, 756,\n 753, 1720, 2367, 2365, 2362, 2359, 1663, 693, 691, 684, 2373, 680, 2370, 702, 699, 696, 704, 1690, 1687, 2337,\n 2336, 2334, 2332, 1624, 2329, 1622, 640, 637, 2344, 634, 2342, 630, 2340, 650, 648, 645, 2346, 655, 653, 1653,\n 1651, 1649, 1655, 2612, 2597, 2595, 2571, 2568, 2565, 2576, 2534, 2529, 2526, 1787, 2540, 2537, 907, 904, 900,\n 910, 2503, 2502, 2500, 2498, 1768, 2495, 1767, 2510, 2508, 2506, 869, 866, 863, 2513, 876, 874, 1782, 2720, 2713,\n 2711, 2697, 2694, 2691, 2702, 2672, 2670, 2664, 1828, 2678, 2675, 2647, 2646, 2644, 2642, 1823, 2639, 1822, 2654,\n 2652, 2650, 2657, 2771, 1855, 2765, 2762, 1850, 1849, 2751, 2749, 2747, 2754, 353, 2148, 344, 342, 336, 2142,\n 332, 2140, 345, 1375, 1373, 306, 2130, 299, 2128, 295, 2125, 319, 314, 311, 2132, 1354, 1352, 1349, 1356, 262,\n 257, 2101, 253, 2096, 2093, 274, 273, 267, 2107, 263, 2104, 280, 278, 275, 1316, 1311, 1308, 1320, 1318, 2052,\n 202, 2050, 2044, 2040, 219, 2063, 212, 2060, 208, 2055, 224, 221, 2066, 1260, 1258, 1252, 231, 1248, 229, 1266,\n 1264, 1261, 1268, 155, 1998, 153, 1996, 1994, 1991, 1988, 165, 164, 2007, 162, 2006, 159, 2003, 2000, 172, 171,\n 169, 2012, 166, 2010, 1186, 1184, 1182, 1179, 175, 1176, 173, 1192, 1191, 1189, 1187, 176, 1194, 1193, 2313,\n 2307, 2305, 592, 589, 2294, 2292, 2289, 578, 572, 568, 2297, 580, 1591, 2272, 2267, 2264, 1547, 538, 536, 529,\n 2278, 525, 2275, 547, 544, 541, 1574, 1571, 2237, 2235, 2229, 1493, 2225, 1489, 478, 2247, 470, 2244, 465, 2241,\n 493, 488, 484, 2250, 498, 495, 1536, 1533, 1530, 1539, 2187, 2186, 2184, 2182, 1432, 2179, 1430, 2176, 1427, 414,\n 412, 2197, 409, 2195, 405, 2193, 2190, 426, 424, 421, 2203, 418, 2201, 431, 429, 1473, 1471, 1469, 1466, 434,\n 1477, 1475, 2478, 2472, 2470, 2459, 2457, 2454, 2462, 803, 2437, 2432, 2429, 1726, 2443, 2440, 792, 789, 785,\n 2401, 2399, 2393, 1702, 2389, 1699, 2411, 2408, 2405, 745, 741, 2415, 758, 755, 1721, 2358, 2357, 2355, 2353,\n 1661, 2350, 1660, 2347, 1657, 2368, 2366, 2364, 2361, 1666, 690, 687, 2374, 683, 2372, 701, 698, 705, 1691, 1689,\n 2619, 2617, 2610, 2608, 2605, 2613, 2593, 2588, 2585, 1803, 2599, 2596, 2563, 2561, 2555, 1797, 2551, 1795, 2573,\n 2570, 2567, 2577, 2525, 2524, 2522, 2520, 1786, 2517, 1785, 2514, 1783, 2535, 2533, 2531, 2528, 1788, 2541, 2539,\n 906, 903, 911, 2721, 1844, 2715, 2712, 1838, 1836, 2699, 2696, 2693, 2703, 1827, 1826, 1824, 2673, 2671, 2669,\n 2666, 1829, 2679, 2677, 1858, 1857, 2772, 1854, 1853, 1851, 1856, 2766, 2764, 143, 1987, 139, 1986, 135, 133,\n 131, 1984, 128, 1983, 125, 1981, 138, 137, 136, 1985, 1133, 1132, 1130, 112, 110, 1974, 107, 1973, 104, 1971,\n 1969, 122, 121, 119, 117, 1977, 114, 1976, 124, 1115, 1114, 1112, 1110, 1117, 1116, 84, 83, 1953, 81, 1952, 78,\n 1950, 1948, 1945, 94, 93, 91, 1959, 88, 1958, 85, 1955, 99, 97, 95, 1961, 1086, 1085, 1083, 1081, 1078, 100,\n 1090, 1089, 1087, 1091, 49, 47, 1917, 44, 1915, 1913, 1910, 1907, 59, 1926, 56, 1925, 53, 1922, 1919, 66, 64,\n 1931, 61, 1929, 1042, 1040, 1038, 71, 1035, 70, 1032, 68, 1048, 1047, 1045, 1043, 1050, 1049, 12, 10, 1869, 1867,\n 1864, 1861, 21, 1880, 19, 1877, 1874, 1871, 28, 1888, 25, 1886, 22, 1883, 982, 980, 977, 974, 32, 30, 991, 989,\n 987, 984, 34, 995, 994, 992, 2151, 2150, 2147, 2146, 2144, 356, 355, 354, 2149, 2139, 2138, 2136, 2134, 1359,\n 343, 341, 338, 2143, 335, 2141, 348, 347, 346, 1376, 1374, 2124, 2123, 2121, 2119, 1326, 2116, 1324, 310, 308,\n 305, 2131, 302, 2129, 298, 2127, 320, 318, 316, 313, 2133, 322, 321, 1355, 1353, 1351, 1357, 2092, 2091, 2089,\n 2087, 1276, 2084, 1274, 2081, 1271, 259, 2102, 256, 2100, 252, 2098, 2095, 272, 269, 2108, 266, 2106, 281, 279,\n 277, 1317, 1315, 1313, 1310, 282, 1321, 1319, 2039, 2037, 2035, 2032, 1203, 2029, 1200, 1197, 207, 2053, 205,\n 2051, 201, 2049, 2046, 2043, 220, 218, 2064, 215, 2062, 211, 2059, 228, 226, 223, 2069, 1259, 1257, 1254, 232,\n 1251, 230, 1267, 1265, 1263, 2316, 2315, 2312, 2311, 2309, 2314, 2304, 2303, 2301, 2299, 1593, 2308, 2306, 590,\n 2288, 2287, 2285, 2283, 1578, 2280, 1577, 2295, 2293, 2291, 579, 577, 574, 571, 2298, 582, 581, 1592, 2263, 2262,\n 2260, 2258, 1545, 2255, 1544, 2252, 1541, 2273, 2271, 2269, 2266, 1550, 535, 532, 2279, 528, 2277, 546, 543, 549,\n 1575, 1573, 2224, 2222, 2220, 1486, 2217, 1485, 2214, 1482, 1479, 2238, 2236, 2234, 2231, 1496, 2228, 1492, 480,\n 477, 2248, 473, 2246, 469, 2243, 490, 487, 2251, 497, 1537, 1535, 1532, 2477, 2476, 2474, 2479, 2469, 2468, 2466,\n 2464, 1730, 2473, 2471, 2453, 2452, 2450, 2448, 1729, 2445, 1728, 2460, 2458, 2456, 2463, 805, 804, 2428, 2427,\n 2425, 2423, 1725, 2420, 1724, 2417, 1722, 2438, 2436, 2434, 2431, 1727, 2444, 2442, 793, 791, 788, 795, 2388,\n 2386, 2384, 1697, 2381, 1696, 2378, 1694, 1692, 2402, 2400, 2398, 2395, 1703, 2392, 1701, 2412, 2410, 2407, 751,\n 748, 744, 2416, 759, 757, 1807, 2620, 2618, 1806, 1805, 2611, 2609, 2607, 2614, 1802, 1801, 1799, 2594, 2592,\n 2590, 2587, 1804, 2600, 2598, 1794, 1793, 1791, 1789, 2564, 2562, 2560, 2557, 1798, 2554, 1796, 2574, 2572, 2569,\n 2578, 1847, 1846, 2722, 1843, 1842, 1840, 1845, 2716, 2714, 1835, 1834, 1832, 1830, 1839, 1837, 2700, 2698, 2695,\n 2704, 1817, 1811, 1810, 897, 862, 1777, 829, 826, 838, 1760, 1758, 808, 2481, 1741, 1740, 1738, 1743, 2624, 1818,\n 2726, 2776, 782, 740, 737, 1715, 686, 679, 695, 1682, 1680, 639, 628, 2339, 647, 644, 1645, 1643, 1640, 1648,\n 602, 600, 597, 595, 2320, 593, 2318, 609, 607, 604, 1611, 1610, 1608, 1606, 613, 1615, 1613, 2328, 926, 924, 892,\n 886, 899, 857, 850, 2505, 1778, 824, 823, 821, 819, 2488, 818, 2486, 833, 831, 828, 840, 1761, 1759, 2649, 2632,\n 2630, 2746, 2734, 2732, 2782, 2781, 570, 567, 1587, 531, 527, 523, 540, 1566, 1564, 476, 467, 463, 2240, 486,\n 483, 1524, 1521, 1518, 1529, 411, 403, 2192, 399, 2189, 423, 416, 1462, 1457, 1454, 428, 1468, 1465, 2210, 366,\n 363, 2158, 360, 2156, 357, 2153, 376, 373, 370, 2163, 1410, 1409, 1407, 1405, 382, 1402, 380, 1417, 1415, 1412,\n 1421, 2175, 2174, 777, 774, 771, 784, 732, 725, 722, 2404, 743, 1716, 676, 674, 668, 2363, 665, 2360, 685, 1684,\n 1681, 626, 624, 622, 2335, 620, 2333, 617, 2330, 641, 635, 649, 1646, 1644, 1642, 2566, 928, 925, 2530, 2527,\n 894, 891, 888, 2501, 2499, 2496, 858, 856, 854, 851, 1779, 2692, 2668, 2665, 2645, 2643, 2640, 2651, 2768, 2759,\n 2757, 2744, 2743, 2741, 2748, 352, 1382, 340, 337, 333, 1371, 1369, 307, 300, 296, 2126, 315, 312, 1347, 1342,\n 1350, 261, 258, 250, 2097, 246, 2094, 271, 268, 264, 1306, 1301, 1298, 276, 1312, 1309, 2115, 203, 2048, 195,\n 2045, 191, 2041, 213, 209, 2056, 1246, 1244, 1238, 225, 1234, 222, 1256, 1253, 1249, 1262, 2080, 2079, 154, 1997,\n 150, 1995, 147, 1992, 1989, 163, 160, 2004, 156, 2001, 1175, 1174, 1172, 1170, 1167, 170, 1164, 167, 1185, 1183,\n 1180, 1177, 174, 1190, 1188, 2025, 2024, 2022, 587, 586, 564, 559, 556, 2290, 573, 1588, 520, 518, 512, 2268,\n 508, 2265, 530, 1568, 1565, 461, 457, 2233, 450, 2230, 446, 2226, 479, 471, 489, 1526, 1523, 1520, 397, 395,\n 2185, 392, 2183, 389, 2180, 2177, 410, 2194, 402, 422, 1463, 1461, 1459, 1456, 1470, 2455, 799, 2433, 2430, 779,\n 776, 773, 2397, 2394, 2390, 734, 728, 724, 746, 1717, 2356, 2354, 2351, 2348, 1658, 677, 675, 673, 670, 667, 688,\n 1685, 1683, 2606, 2589, 2586, 2559, 2556, 2552, 927, 2523, 2521, 2518, 2515, 1784, 2532, 895, 893, 890, 2718,\n 2709, 2707, 2689, 2687, 2684, 2663, 2662, 2660, 2658, 1825, 2667, 2769, 1852, 2760, 2758, 142, 141, 1139, 1138,\n 134, 132, 129, 126, 1982, 1129, 1128, 1126, 1131, 113, 111, 108, 105, 1972, 101, 1970, 120, 118, 115, 1109, 1108,\n 1106, 1104, 123, 1113, 1111, 82, 79, 1951, 75, 1949, 72, 1946, 92, 89, 86, 1956, 1077, 1076, 1074, 1072, 98,\n 1069, 96, 1084, 1082, 1079, 1088, 1968, 1967, 48, 45, 1916, 42, 1914, 39, 1911, 1908, 60, 57, 54, 1923, 50, 1920,\n 1031, 1030, 1028, 1026, 67, 1023, 65, 1020, 62, 1041, 1039, 1036, 1033, 69, 1046, 1044, 1944, 1943, 1941, 11, 9,\n 1868, 7, 1865, 1862, 1859, 20, 1878, 16, 1875, 13, 1872, 970, 968, 966, 963, 29, 960, 26, 23, 983, 981, 978, 975,\n 33, 971, 31, 990, 988, 985, 1906, 1904, 1902, 993, 351, 2145, 1383, 331, 330, 328, 326, 2137, 323, 2135, 339,\n 1372, 1370, 294, 293, 291, 289, 2122, 286, 2120, 283, 2117, 309, 303, 317, 1348, 1346, 1344, 245, 244, 242, 2090,\n 239, 2088, 236, 2085, 2082, 260, 2099, 249, 270, 1307, 1305, 1303, 1300, 1314, 189, 2038, 186, 2036, 183, 2033,\n 2030, 2026, 206, 198, 2047, 194, 216, 1247, 1245, 1243, 1240, 227, 1237, 1255, 2310, 2302, 2300, 2286, 2284,\n 2281, 565, 563, 561, 558, 575, 1589, 2261, 2259, 2256, 2253, 1542, 521, 519, 517, 514, 2270, 511, 533, 1569,\n 1567, 2223, 2221, 2218, 2215, 1483, 2211, 1480, 459, 456, 453, 2232, 449, 474, 491, 1527, 1525, 1522, 2475, 2467,\n 2465, 2451, 2449, 2446, 801, 800, 2426, 2424, 2421, 2418, 1723, 2435, 780, 778, 775, 2387, 2385, 2382, 2379,\n 1695, 2375, 1693, 2396, 735, 733, 730, 727, 749, 1718, 2616, 2615, 2604, 2603, 2601, 2584, 2583, 2581, 2579,\n 1800, 2591, 2550, 2549, 2547, 2545, 1792, 2542, 1790, 2558, 929, 2719, 1841, 2710, 2708, 1833, 1831, 2690, 2688,\n 2686, 1815, 1809, 1808, 1774, 1756, 1754, 1737, 1736, 1734, 1739, 1816, 1711, 1676, 1674, 633, 629, 1638, 1636,\n 1633, 1641, 598, 1605, 1604, 1602, 1600, 605, 1609, 1607, 2327, 887, 853, 1775, 822, 820, 1757, 1755, 1584, 524,\n 1560, 1558, 468, 464, 1514, 1511, 1508, 1519, 408, 404, 400, 1452, 1447, 1444, 417, 1458, 1455, 2208, 364, 361,\n 358, 2154, 1401, 1400, 1398, 1396, 374, 1393, 371, 1408, 1406, 1403, 1413, 2173, 2172, 772, 726, 723, 1712, 672,\n 669, 666, 682, 1678, 1675, 625, 623, 621, 618, 2331, 636, 632, 1639, 1637, 1635, 920, 918, 884, 880, 889, 849,\n 848, 847, 846, 2497, 855, 852, 1776, 2641, 2742, 2787, 1380, 334, 1367, 1365, 301, 297, 1340, 1338, 1335, 1343,\n 255, 251, 247, 1296, 1291, 1288, 265, 1302, 1299, 2113, 204, 196, 192, 2042, 1232, 1230, 1224, 214, 1220, 210,\n 1242, 1239, 1235, 1250, 2077, 2075, 151, 148, 1993, 144, 1990, 1163, 1162, 1160, 1158, 1155, 161, 1152, 157,\n 1173, 1171, 1168, 1165, 168, 1181, 1178, 2021, 2020, 2018, 2023, 585, 560, 557, 1585, 516, 509, 1562, 1559, 458,\n 447, 2227, 472, 1516, 1513, 1510, 398, 396, 393, 390, 2181, 386, 2178, 407, 1453, 1451, 1449, 1446, 420, 1460,\n 2209, 769, 764, 720, 712, 2391, 729, 1713, 664, 663, 661, 659, 2352, 656, 2349, 671, 1679, 1677, 2553, 922, 919,\n 2519, 2516, 885, 883, 881, 2685, 2661, 2659, 2767, 2756, 2755, 140, 1137, 1136, 130, 127, 1125, 1124, 1122, 1127,\n 109, 106, 102, 1103, 1102, 1100, 1098, 116, 1107, 1105, 1980, 80, 76, 73, 1947, 1068, 1067, 1065, 1063, 90, 1060,\n 87, 1075, 1073, 1070, 1080, 1966, 1965, 46, 43, 40, 1912, 36, 1909, 1019, 1018, 1016, 1014, 58, 1011, 55, 1008,\n 51, 1029, 1027, 1024, 1021, 63, 1037, 1034, 1940, 1939, 1937, 1942, 8, 1866, 4, 1863, 1, 1860, 956, 954, 952,\n 949, 946, 17, 14, 969, 967, 964, 961, 27, 957, 24, 979, 976, 972, 1901, 1900, 1898, 1896, 986, 1905, 1903, 350,\n 349, 1381, 329, 327, 324, 1368, 1366, 292, 290, 287, 284, 2118, 304, 1341, 1339, 1337, 1345, 243, 240, 237, 2086,\n 233, 2083, 254, 1297, 1295, 1293, 1290, 1304, 2114, 190, 187, 184, 2034, 180, 2031, 177, 2027, 199, 1233, 1231,\n 1229, 1226, 217, 1223, 1241, 2078, 2076, 584, 555, 554, 552, 550, 2282, 562, 1586, 507, 506, 504, 502, 2257, 499,\n 2254, 515, 1563, 1561, 445, 443, 441, 2219, 438, 2216, 435, 2212, 460, 454, 475, 1517, 1515, 1512, 2447, 798,\n 797, 2422, 2419, 770, 768, 766, 2383, 2380, 2376, 721, 719, 717, 714, 731, 1714, 2602, 2582, 2580, 2548, 2546,\n 2543, 923, 921, 2717, 2706, 2705, 2683, 2682, 2680, 1771, 1752, 1750, 1733, 1732, 1731, 1735, 1814, 1707, 1670,\n 1668, 1631, 1629, 1626, 1634, 1599, 1598, 1596, 1594, 1603, 1601, 2326, 1772, 1753, 1751, 1581, 1554, 1552, 1504,\n 1501, 1498, 1509, 1442, 1437, 1434, 401, 1448, 1445, 2206, 1392, 1391, 1389, 1387, 1384, 359, 1399, 1397, 1394,\n 1404, 2171, 2170, 1708, 1672, 1669, 619, 1632, 1630, 1628, 1773, 1378, 1363, 1361, 1333, 1328, 1336, 1286, 1281,\n 1278, 248, 1292, 1289, 2111, 1218, 1216, 1210, 197, 1206, 193, 1228, 1225, 1221, 1236, 2073, 2071, 1151, 1150,\n 1148, 1146, 152, 1143, 149, 1140, 145, 1161, 1159, 1156, 1153, 158, 1169, 1166, 2017, 2016, 2014, 2019, 1582,\n 510, 1556, 1553, 452, 448, 1506, 1500, 394, 391, 387, 1443, 1441, 1439, 1436, 1450, 2207, 765, 716, 713, 1709,\n 662, 660, 657, 1673, 1671, 916, 914, 879, 878, 877, 882, 1135, 1134, 1121, 1120, 1118, 1123, 1097, 1096, 1094,\n 1092, 103, 1101, 1099, 1979, 1059, 1058, 1056, 1054, 77, 1051, 74, 1066, 1064, 1061, 1071, 1964, 1963, 1007,\n 1006, 1004, 1002, 999, 41, 996, 37, 1017, 1015, 1012, 1009, 52, 1025, 1022, 1936, 1935, 1933, 1938, 942, 940,\n 938, 935, 932, 5, 2, 955, 953, 950, 947, 18, 943, 15, 965, 962, 958, 1895, 1894, 1892, 1890, 973, 1899, 1897,\n 1379, 325, 1364, 1362, 288, 285, 1334, 1332, 1330, 241, 238, 234, 1287, 1285, 1283, 1280, 1294, 2112, 188, 185,\n 181, 178, 2028, 1219, 1217, 1215, 1212, 200, 1209, 1227, 2074, 2072, 583, 553, 551, 1583, 505, 503, 500, 513,\n 1557, 1555, 444, 442, 439, 436, 2213, 455, 451, 1507, 1505, 1502, 796, 763, 762, 760, 767, 711, 710, 708, 706,\n 2377, 718, 715, 1710, 2544, 917, 915, 2681, 1627, 1597, 1595, 2325, 1769, 1749, 1747, 1499, 1438, 1435, 2204,\n 1390, 1388, 1385, 1395, 2169, 2167, 1704, 1665, 1662, 1625, 1623, 1620, 1770, 1329, 1282, 1279, 2109, 1214, 1207,\n 1222, 2068, 2065, 1149, 1147, 1144, 1141, 146, 1157, 1154, 2013, 2011, 2008, 2015, 1579, 1549, 1546, 1495, 1487,\n 1433, 1431, 1428, 1425, 388, 1440, 2205, 1705, 658, 1667, 1664, 1119, 1095, 1093, 1978, 1057, 1055, 1052, 1062,\n 1962, 1960, 1005, 1003, 1000, 997, 38, 1013, 1010, 1932, 1930, 1927, 1934, 941, 939, 936, 933, 6, 930, 3, 951,\n 948, 944, 1889, 1887, 1884, 1881, 959, 1893, 1891, 35, 1377, 1360, 1358, 1327, 1325, 1322, 1331, 1277, 1275,\n 1272, 1269, 235, 1284, 2110, 1205, 1204, 1201, 1198, 182, 1195, 179, 1213, 2070, 2067, 1580, 501, 1551, 1548,\n 440, 437, 1497, 1494, 1490, 1503, 761, 709, 707, 1706, 913, 912, 2198, 1386, 2164, 2161, 1621, 1766, 2103, 1208,\n 2058, 2054, 1145, 1142, 2005, 2002, 1999, 2009, 1488, 1429, 1426, 2200, 1698, 1659, 1656, 1975, 1053, 1957, 1954,\n 1001, 998, 1924, 1921, 1918, 1928, 937, 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270,\n 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700\n ]);\n\n /*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.List;\n /**\n * @author Guenther Grau\n */\n /*public final*/ class PDF417DetectorResult {\n constructor(bits, points) {\n this.bits = bits;\n this.points = points;\n }\n getBits() {\n return this.bits;\n }\n getPoints() {\n return this.points;\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.ArrayList;\n // import java.util.Arrays;\n // import java.util.List;\n // import java.util.Map;\n /**\n *

Encapsulates logic that can detect a PDF417 Code in an image, even if the\n * PDF417 Code is rotated or skewed, or partially obscured.

\n *\n * @author SITA Lab (kevin.osullivan@sita.aero)\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Guenther Grau\n */\n /*public*/ /*final*/ class Detector$3 {\n /**\n *

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

\n *\n * @param image barcode image to decode\n * @param hints optional hints to detector\n * @param multiple if true, then the image is searched for multiple codes. If false, then at most one code will\n * be found and returned\n * @return {@link PDF417DetectorResult} encapsulating results of detecting a PDF417 code\n * @throws NotFoundException if no PDF417 Code can be found\n */\n static detectMultiple(image, hints, multiple) {\n // TODO detection improvement, tryHarder could try several different luminance thresholds/blackpoints or even\n // different binarizers\n // boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);\n let bitMatrix = image.getBlackMatrix();\n let barcodeCoordinates = Detector$3.detect(multiple, bitMatrix);\n if (!barcodeCoordinates.length) {\n bitMatrix = bitMatrix.clone();\n bitMatrix.rotate180();\n barcodeCoordinates = Detector$3.detect(multiple, bitMatrix);\n }\n return new PDF417DetectorResult(bitMatrix, barcodeCoordinates);\n }\n /**\n * Detects PDF417 codes in an image. Only checks 0 degree rotation\n * @param multiple if true, then the image is searched for multiple codes. If false, then at most one code will\n * be found and returned\n * @param bitMatrix bit matrix to detect barcodes in\n * @return List of ResultPoint arrays containing the coordinates of found barcodes\n */\n static detect(multiple, bitMatrix) {\n const barcodeCoordinates = new Array();\n let row = 0;\n let column = 0;\n let foundBarcodeInRow = false;\n while (row < bitMatrix.getHeight()) {\n const vertices = Detector$3.findVertices(bitMatrix, row, column);\n if (vertices[0] == null && vertices[3] == null) {\n if (!foundBarcodeInRow) {\n // we didn't find any barcode so that's the end of searching\n break;\n }\n // we didn't find a barcode starting at the given column and row. Try again from the first column and slightly\n // below the lowest barcode we found so far.\n foundBarcodeInRow = false;\n column = 0;\n for (const barcodeCoordinate of barcodeCoordinates) {\n if (barcodeCoordinate[1] != null) {\n row = Math.trunc(Math.max(row, barcodeCoordinate[1].getY()));\n }\n if (barcodeCoordinate[3] != null) {\n row = Math.max(row, Math.trunc(barcodeCoordinate[3].getY()));\n }\n }\n row += Detector$3.ROW_STEP;\n continue;\n }\n foundBarcodeInRow = true;\n barcodeCoordinates.push(vertices);\n if (!multiple) {\n break;\n }\n // if we didn't find a right row indicator column, then continue the search for the next barcode after the\n // start pattern of the barcode just found.\n if (vertices[2] != null) {\n column = Math.trunc(vertices[2].getX());\n row = Math.trunc(vertices[2].getY());\n }\n else {\n column = Math.trunc(vertices[4].getX());\n row = Math.trunc(vertices[4].getY());\n }\n }\n return barcodeCoordinates;\n }\n /**\n * Locate the vertices and the codewords area of a black blob using the Start\n * and Stop patterns as locators.\n *\n * @param matrix the scanned barcode image.\n * @return an array containing the vertices:\n * vertices[0] x, y top left barcode\n * vertices[1] x, y bottom left barcode\n * vertices[2] x, y top right barcode\n * vertices[3] x, y bottom right barcode\n * vertices[4] x, y top left codeword area\n * vertices[5] x, y bottom left codeword area\n * vertices[6] x, y top right codeword area\n * vertices[7] x, y bottom right codeword area\n */\n static findVertices(matrix, startRow, startColumn) {\n const height = matrix.getHeight();\n const width = matrix.getWidth();\n // const result = new ResultPoint[8];\n const result = new Array(8);\n Detector$3.copyToResult(result, Detector$3.findRowsWithPattern(matrix, height, width, startRow, startColumn, Detector$3.START_PATTERN), Detector$3.INDEXES_START_PATTERN);\n if (result[4] != null) {\n startColumn = Math.trunc(result[4].getX());\n startRow = Math.trunc(result[4].getY());\n }\n Detector$3.copyToResult(result, Detector$3.findRowsWithPattern(matrix, height, width, startRow, startColumn, Detector$3.STOP_PATTERN), Detector$3.INDEXES_STOP_PATTERN);\n return result;\n }\n static copyToResult(result, tmpResult, destinationIndexes) {\n for (let i = 0; i < destinationIndexes.length; i++) {\n result[destinationIndexes[i]] = tmpResult[i];\n }\n }\n static findRowsWithPattern(matrix, height, width, startRow, startColumn, pattern) {\n // const result = new ResultPoint[4];\n const result = new Array(4);\n let found = false;\n const counters = new Int32Array(pattern.length);\n for (; startRow < height; startRow += Detector$3.ROW_STEP) {\n let loc = Detector$3.findGuardPattern(matrix, startColumn, startRow, width, false, pattern, counters);\n if (loc != null) {\n while (startRow > 0) {\n const previousRowLoc = Detector$3.findGuardPattern(matrix, startColumn, --startRow, width, false, pattern, counters);\n if (previousRowLoc != null) {\n loc = previousRowLoc;\n }\n else {\n startRow++;\n break;\n }\n }\n result[0] = new ResultPoint(loc[0], startRow);\n result[1] = new ResultPoint(loc[1], startRow);\n found = true;\n break;\n }\n }\n let stopRow = startRow + 1;\n // Last row of the current symbol that contains pattern\n if (found) {\n let skippedRowCount = 0;\n let previousRowLoc = Int32Array.from([Math.trunc(result[0].getX()), Math.trunc(result[1].getX())]);\n for (; stopRow < height; stopRow++) {\n const loc = Detector$3.findGuardPattern(matrix, previousRowLoc[0], stopRow, width, false, pattern, counters);\n // a found pattern is only considered to belong to the same barcode if the start and end positions\n // don't differ too much. Pattern drift should be not bigger than two for consecutive rows. With\n // a higher number of skipped rows drift could be larger. To keep it simple for now, we allow a slightly\n // larger drift and don't check for skipped rows.\n if (loc != null &&\n Math.abs(previousRowLoc[0] - loc[0]) < Detector$3.MAX_PATTERN_DRIFT &&\n Math.abs(previousRowLoc[1] - loc[1]) < Detector$3.MAX_PATTERN_DRIFT) {\n previousRowLoc = loc;\n skippedRowCount = 0;\n }\n else {\n if (skippedRowCount > Detector$3.SKIPPED_ROW_COUNT_MAX) {\n break;\n }\n else {\n skippedRowCount++;\n }\n }\n }\n stopRow -= skippedRowCount + 1;\n result[2] = new ResultPoint(previousRowLoc[0], stopRow);\n result[3] = new ResultPoint(previousRowLoc[1], stopRow);\n }\n if (stopRow - startRow < Detector$3.BARCODE_MIN_HEIGHT) {\n Arrays.fill(result, null);\n }\n return result;\n }\n /**\n * @param matrix row of black/white values to search\n * @param column x position to start search\n * @param row y position to start search\n * @param width the number of pixels to search on this row\n * @param pattern pattern of counts of number of black and white pixels that are\n * being searched for as a pattern\n * @param counters array of counters, as long as pattern, to re-use\n * @return start/end horizontal offset of guard pattern, as an array of two ints.\n */\n static findGuardPattern(matrix, column, row, width, whiteFirst, pattern, counters) {\n Arrays.fillWithin(counters, 0, counters.length, 0);\n let patternStart = column;\n let pixelDrift = 0;\n // if there are black pixels left of the current pixel shift to the left, but only for MAX_PIXEL_DRIFT pixels\n while (matrix.get(patternStart, row) && patternStart > 0 && pixelDrift++ < Detector$3.MAX_PIXEL_DRIFT) {\n patternStart--;\n }\n let x = patternStart;\n let counterPosition = 0;\n let patternLength = pattern.length;\n for (let isWhite = whiteFirst; x < width; x++) {\n let pixel = matrix.get(x, row);\n if (pixel !== isWhite) {\n counters[counterPosition]++;\n }\n else {\n if (counterPosition === patternLength - 1) {\n if (Detector$3.patternMatchVariance(counters, pattern, Detector$3.MAX_INDIVIDUAL_VARIANCE) < Detector$3.MAX_AVG_VARIANCE) {\n return new Int32Array([patternStart, x]);\n }\n patternStart += counters[0] + counters[1];\n System.arraycopy(counters, 2, counters, 0, counterPosition - 1);\n counters[counterPosition - 1] = 0;\n counters[counterPosition] = 0;\n counterPosition--;\n }\n else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n if (counterPosition === patternLength - 1 &&\n Detector$3.patternMatchVariance(counters, pattern, Detector$3.MAX_INDIVIDUAL_VARIANCE) < Detector$3.MAX_AVG_VARIANCE) {\n return new Int32Array([patternStart, x - 1]);\n }\n return null;\n }\n /**\n * Determines how closely a set of observed counts of runs of black/white\n * values matches a given target pattern. This is reported as the ratio of\n * the total variance from the expected pattern proportions across all\n * pattern elements, to the length of the pattern.\n *\n * @param counters observed counters\n * @param pattern expected pattern\n * @param maxIndividualVariance The most any counter can differ before we give up\n * @return ratio of total variance between counters and pattern compared to total pattern size\n */\n static patternMatchVariance(counters, pattern, maxIndividualVariance) {\n let numCounters = counters.length;\n let total = 0;\n let patternLength = 0;\n for (let i = 0; i < numCounters; i++) {\n total += counters[i];\n patternLength += pattern[i];\n }\n if (total < patternLength) {\n // If we don't even have one pixel per unit of bar width, assume this\n // is too small to reliably match, so fail:\n return /*Float.POSITIVE_INFINITY*/ Infinity;\n }\n // We're going to fake floating-point math in integers. We just need to use more bits.\n // Scale up patternLength so that intermediate values below like scaledCounter will have\n // more \"significant digits\".\n let unitBarWidth = total / patternLength;\n maxIndividualVariance *= unitBarWidth;\n let totalVariance = 0.0;\n for (let x = 0; x < numCounters; x++) {\n let counter = counters[x];\n let scaledPattern = pattern[x] * unitBarWidth;\n let variance = counter > scaledPattern ? counter - scaledPattern : scaledPattern - counter;\n if (variance > maxIndividualVariance) {\n return /*Float.POSITIVE_INFINITY*/ Infinity;\n }\n totalVariance += variance;\n }\n return totalVariance / total;\n }\n }\n Detector$3.INDEXES_START_PATTERN = Int32Array.from([0, 4, 1, 5]);\n Detector$3.INDEXES_STOP_PATTERN = Int32Array.from([6, 2, 7, 3]);\n Detector$3.MAX_AVG_VARIANCE = 0.42;\n Detector$3.MAX_INDIVIDUAL_VARIANCE = 0.8;\n // B S B S B S B S Bar/Space pattern\n // 11111111 0 1 0 1 0 1 000\n Detector$3.START_PATTERN = Int32Array.from([8, 1, 1, 1, 1, 1, 1, 3]);\n // 1111111 0 1 000 1 0 1 00 1\n Detector$3.STOP_PATTERN = Int32Array.from([7, 1, 1, 3, 1, 1, 1, 2, 1]);\n Detector$3.MAX_PIXEL_DRIFT = 3;\n Detector$3.MAX_PATTERN_DRIFT = 5;\n // if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged.\n // if we set the value too high, then we might detect the start pattern from a neighbor barcode.\n Detector$3.SKIPPED_ROW_COUNT_MAX = 25;\n // A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least\n // 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it.\n Detector$3.ROW_STEP = 5;\n Detector$3.BARCODE_MIN_HEIGHT = 10;\n\n /*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Sean Owen\n * @see com.google.zxing.common.reedsolomon.GenericGFPoly\n */\n /*final*/ class ModulusPoly {\n constructor(field, coefficients) {\n if (coefficients.length === 0) {\n throw new IllegalArgumentException();\n }\n this.field = field;\n let coefficientsLength = /*int*/ coefficients.length;\n if (coefficientsLength > 1 && coefficients[0] === 0) {\n // Leading term must be non-zero for anything except the constant polynomial \"0\"\n let firstNonZero = /*int*/ 1;\n while (firstNonZero < coefficientsLength && coefficients[firstNonZero] === 0) {\n firstNonZero++;\n }\n if (firstNonZero === coefficientsLength) {\n this.coefficients = new Int32Array([0]);\n }\n else {\n this.coefficients = new Int32Array(coefficientsLength - firstNonZero);\n System.arraycopy(coefficients, firstNonZero, this.coefficients, 0, this.coefficients.length);\n }\n }\n else {\n this.coefficients = coefficients;\n }\n }\n getCoefficients() {\n return this.coefficients;\n }\n /**\n * @return degree of this polynomial\n */\n getDegree() {\n return this.coefficients.length - 1;\n }\n /**\n * @return true iff this polynomial is the monomial \"0\"\n */\n isZero() {\n return this.coefficients[0] === 0;\n }\n /**\n * @return coefficient of x^degree term in this polynomial\n */\n getCoefficient(degree) {\n return this.coefficients[this.coefficients.length - 1 - degree];\n }\n /**\n * @return evaluation of this polynomial at a given point\n */\n evaluateAt(a) {\n if (a === 0) {\n // Just return the x^0 coefficient\n return this.getCoefficient(0);\n }\n if (a === 1) {\n // Just the sum of the coefficients\n let sum = /*int*/ 0;\n for (let coefficient /*int*/ of this.coefficients) {\n sum = this.field.add(sum, coefficient);\n }\n return sum;\n }\n let result = /*int*/ this.coefficients[0];\n let size = /*int*/ this.coefficients.length;\n for (let i /*int*/ = 1; i < size; i++) {\n result = this.field.add(this.field.multiply(a, result), this.coefficients[i]);\n }\n return result;\n }\n add(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('ModulusPolys do not have same ModulusGF field');\n }\n if (this.isZero()) {\n return other;\n }\n if (other.isZero()) {\n return this;\n }\n let smallerCoefficients = this.coefficients;\n let largerCoefficients = other.coefficients;\n if (smallerCoefficients.length > largerCoefficients.length) {\n let temp = smallerCoefficients;\n smallerCoefficients = largerCoefficients;\n largerCoefficients = temp;\n }\n let sumDiff = new Int32Array(largerCoefficients.length);\n let lengthDiff = /*int*/ largerCoefficients.length - smallerCoefficients.length;\n // Copy high-order terms only found in higher-degree polynomial's coefficients\n System.arraycopy(largerCoefficients, 0, sumDiff, 0, lengthDiff);\n for (let i /*int*/ = lengthDiff; i < largerCoefficients.length; i++) {\n sumDiff[i] = this.field.add(smallerCoefficients[i - lengthDiff], largerCoefficients[i]);\n }\n return new ModulusPoly(this.field, sumDiff);\n }\n subtract(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('ModulusPolys do not have same ModulusGF field');\n }\n if (other.isZero()) {\n return this;\n }\n return this.add(other.negative());\n }\n multiply(other) {\n if (other instanceof ModulusPoly) {\n return this.multiplyOther(other);\n }\n return this.multiplyScalar(other);\n }\n multiplyOther(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('ModulusPolys do not have same ModulusGF field');\n }\n if (this.isZero() || other.isZero()) {\n // return this.field.getZero();\n return new ModulusPoly(this.field, new Int32Array([0]));\n }\n let aCoefficients = this.coefficients;\n let aLength = /*int*/ aCoefficients.length;\n let bCoefficients = other.coefficients;\n let bLength = /*int*/ bCoefficients.length;\n let product = new Int32Array(aLength + bLength - 1);\n for (let i /*int*/ = 0; i < aLength; i++) {\n let aCoeff = /*int*/ aCoefficients[i];\n for (let j /*int*/ = 0; j < bLength; j++) {\n product[i + j] = this.field.add(product[i + j], this.field.multiply(aCoeff, bCoefficients[j]));\n }\n }\n return new ModulusPoly(this.field, product);\n }\n negative() {\n let size = /*int*/ this.coefficients.length;\n let negativeCoefficients = new Int32Array(size);\n for (let i /*int*/ = 0; i < size; i++) {\n negativeCoefficients[i] = this.field.subtract(0, this.coefficients[i]);\n }\n return new ModulusPoly(this.field, negativeCoefficients);\n }\n multiplyScalar(scalar) {\n if (scalar === 0) {\n return new ModulusPoly(this.field, new Int32Array([0]));\n }\n if (scalar === 1) {\n return this;\n }\n let size = /*int*/ this.coefficients.length;\n let product = new Int32Array(size);\n for (let i /*int*/ = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], scalar);\n }\n return new ModulusPoly(this.field, product);\n }\n multiplyByMonomial(degree, coefficient) {\n if (degree < 0) {\n throw new IllegalArgumentException();\n }\n if (coefficient === 0) {\n return new ModulusPoly(this.field, new Int32Array([0]));\n }\n let size = /*int*/ this.coefficients.length;\n let product = new Int32Array(size + degree);\n for (let i /*int*/ = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], coefficient);\n }\n return new ModulusPoly(this.field, product);\n }\n /*\n ModulusPoly[] divide(other: ModulusPoly) {\n if (!field.equals(other.field)) {\n throw new IllegalArgumentException(\"ModulusPolys do not have same ModulusGF field\");\n }\n if (other.isZero()) {\n throw new IllegalArgumentException(\"Divide by 0\");\n }\n \n let quotient: ModulusPoly = field.getZero();\n let remainder: ModulusPoly = this;\n \n let denominatorLeadingTerm: /*int/ number = other.getCoefficient(other.getDegree());\n let inverseDenominatorLeadingTerm: /*int/ number = field.inverse(denominatorLeadingTerm);\n \n while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) {\n let degreeDifference: /*int/ number = remainder.getDegree() - other.getDegree();\n let scale: /*int/ number = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm);\n let term: ModulusPoly = other.multiplyByMonomial(degreeDifference, scale);\n let iterationQuotient: ModulusPoly = field.buildMonomial(degreeDifference, scale);\n quotient = quotient.add(iterationQuotient);\n remainder = remainder.subtract(term);\n }\n \n return new ModulusPoly[] { quotient, remainder };\n }\n */\n // @Override\n toString() {\n let result = new StringBuilder( /*8 * this.getDegree()*/); // dynamic string size in JS\n for (let degree /*int*/ = this.getDegree(); degree >= 0; degree--) {\n let coefficient = /*int*/ this.getCoefficient(degree);\n if (coefficient !== 0) {\n if (coefficient < 0) {\n result.append(' - ');\n coefficient = -coefficient;\n }\n else {\n if (result.length() > 0) {\n result.append(' + ');\n }\n }\n if (degree === 0 || coefficient !== 1) {\n result.append(coefficient);\n }\n if (degree !== 0) {\n if (degree === 1) {\n result.append('x');\n }\n else {\n result.append('x^');\n result.append(degree);\n }\n }\n }\n }\n return result.toString();\n }\n }\n\n class ModulusBase {\n add(a, b) {\n return (a + b) % this.modulus;\n }\n subtract(a, b) {\n return (this.modulus + a - b) % this.modulus;\n }\n exp(a) {\n return this.expTable[a];\n }\n log(a) {\n if (a === 0) {\n throw new IllegalArgumentException();\n }\n return this.logTable[a];\n }\n inverse(a) {\n if (a === 0) {\n throw new ArithmeticException();\n }\n return this.expTable[this.modulus - this.logTable[a] - 1];\n }\n multiply(a, b) {\n if (a === 0 || b === 0) {\n return 0;\n }\n return this.expTable[(this.logTable[a] + this.logTable[b]) % (this.modulus - 1)];\n }\n getSize() {\n return this.modulus;\n }\n equals(o) {\n return o === this;\n }\n }\n\n /*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

A field based on powers of a generator integer, modulo some modulus.

\n *\n * @author Sean Owen\n * @see com.google.zxing.common.reedsolomon.GenericGF\n */\n /*public final*/ class ModulusGF extends ModulusBase {\n // private /*final*/ modulus: /*int*/ number;\n constructor(modulus, generator) {\n super();\n this.modulus = modulus;\n this.expTable = new Int32Array(modulus);\n this.logTable = new Int32Array(modulus);\n let x = /*int*/ 1;\n for (let i /*int*/ = 0; i < modulus; i++) {\n this.expTable[i] = x;\n x = (x * generator) % modulus;\n }\n for (let i /*int*/ = 0; i < modulus - 1; i++) {\n this.logTable[this.expTable[i]] = i;\n }\n // logTable[0] == 0 but this should never be used\n this.zero = new ModulusPoly(this, new Int32Array([0]));\n this.one = new ModulusPoly(this, new Int32Array([1]));\n }\n getZero() {\n return this.zero;\n }\n getOne() {\n return this.one;\n }\n buildMonomial(degree, coefficient) {\n if (degree < 0) {\n throw new IllegalArgumentException();\n }\n if (coefficient === 0) {\n return this.zero;\n }\n let coefficients = new Int32Array(degree + 1);\n coefficients[0] = coefficient;\n return new ModulusPoly(this, coefficients);\n }\n }\n ModulusGF.PDF417_GF = new ModulusGF(PDF417Common.NUMBER_OF_CODEWORDS, 3);\n\n /*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n *

PDF417 error correction implementation.

\n *\n *

This example\n * is quite useful in understanding the algorithm.

\n *\n * @author Sean Owen\n * @see com.google.zxing.common.reedsolomon.ReedSolomonDecoder\n */\n /*public final*/ class ErrorCorrection {\n constructor() {\n this.field = ModulusGF.PDF417_GF;\n }\n /**\n * @param received received codewords\n * @param numECCodewords number of those codewords used for EC\n * @param erasures location of erasures\n * @return number of errors\n * @throws ChecksumException if errors cannot be corrected, maybe because of too many errors\n */\n decode(received, numECCodewords, erasures) {\n let poly = new ModulusPoly(this.field, received);\n let S = new Int32Array(numECCodewords);\n let error = false;\n for (let i /*int*/ = numECCodewords; i > 0; i--) {\n let evaluation = poly.evaluateAt(this.field.exp(i));\n S[numECCodewords - i] = evaluation;\n if (evaluation !== 0) {\n error = true;\n }\n }\n if (!error) {\n return 0;\n }\n let knownErrors = this.field.getOne();\n if (erasures != null) {\n for (const erasure of erasures) {\n let b = this.field.exp(received.length - 1 - erasure);\n // Add (1 - bx) term:\n let term = new ModulusPoly(this.field, new Int32Array([this.field.subtract(0, b), 1]));\n knownErrors = knownErrors.multiply(term);\n }\n }\n let syndrome = new ModulusPoly(this.field, S);\n // syndrome = syndrome.multiply(knownErrors);\n let sigmaOmega = this.runEuclideanAlgorithm(this.field.buildMonomial(numECCodewords, 1), syndrome, numECCodewords);\n let sigma = sigmaOmega[0];\n let omega = sigmaOmega[1];\n // sigma = sigma.multiply(knownErrors);\n let errorLocations = this.findErrorLocations(sigma);\n let errorMagnitudes = this.findErrorMagnitudes(omega, sigma, errorLocations);\n for (let i /*int*/ = 0; i < errorLocations.length; i++) {\n let position = received.length - 1 - this.field.log(errorLocations[i]);\n if (position < 0) {\n throw ChecksumException.getChecksumInstance();\n }\n received[position] = this.field.subtract(received[position], errorMagnitudes[i]);\n }\n return errorLocations.length;\n }\n /**\n *\n * @param ModulusPoly\n * @param a\n * @param ModulusPoly\n * @param b\n * @param int\n * @param R\n * @throws ChecksumException\n */\n runEuclideanAlgorithm(a, b, R) {\n // Assume a's degree is >= b's\n if (a.getDegree() < b.getDegree()) {\n let temp = a;\n a = b;\n b = temp;\n }\n let rLast = a;\n let r = b;\n let tLast = this.field.getZero();\n let t = this.field.getOne();\n // Run Euclidean algorithm until r's degree is less than R/2\n while (r.getDegree() >= Math.round(R / 2)) {\n let rLastLast = rLast;\n let tLastLast = tLast;\n rLast = r;\n tLast = t;\n // Divide rLastLast by rLast, with quotient in q and remainder in r\n if (rLast.isZero()) {\n // Oops, Euclidean algorithm already terminated?\n throw ChecksumException.getChecksumInstance();\n }\n r = rLastLast;\n let q = this.field.getZero();\n let denominatorLeadingTerm = rLast.getCoefficient(rLast.getDegree());\n let dltInverse = this.field.inverse(denominatorLeadingTerm);\n while (r.getDegree() >= rLast.getDegree() && !r.isZero()) {\n let degreeDiff = r.getDegree() - rLast.getDegree();\n let scale = this.field.multiply(r.getCoefficient(r.getDegree()), dltInverse);\n q = q.add(this.field.buildMonomial(degreeDiff, scale));\n r = r.subtract(rLast.multiplyByMonomial(degreeDiff, scale));\n }\n t = q.multiply(tLast).subtract(tLastLast).negative();\n }\n let sigmaTildeAtZero = t.getCoefficient(0);\n if (sigmaTildeAtZero === 0) {\n throw ChecksumException.getChecksumInstance();\n }\n let inverse = this.field.inverse(sigmaTildeAtZero);\n let sigma = t.multiply(inverse);\n let omega = r.multiply(inverse);\n return [sigma, omega];\n }\n /**\n *\n * @param errorLocator\n * @throws ChecksumException\n */\n findErrorLocations(errorLocator) {\n // This is a direct application of Chien's search\n let numErrors = errorLocator.getDegree();\n let result = new Int32Array(numErrors);\n let e = 0;\n for (let i /*int*/ = 1; i < this.field.getSize() && e < numErrors; i++) {\n if (errorLocator.evaluateAt(i) === 0) {\n result[e] = this.field.inverse(i);\n e++;\n }\n }\n if (e !== numErrors) {\n throw ChecksumException.getChecksumInstance();\n }\n return result;\n }\n findErrorMagnitudes(errorEvaluator, errorLocator, errorLocations) {\n let errorLocatorDegree = errorLocator.getDegree();\n let formalDerivativeCoefficients = new Int32Array(errorLocatorDegree);\n for (let i /*int*/ = 1; i <= errorLocatorDegree; i++) {\n formalDerivativeCoefficients[errorLocatorDegree - i] =\n this.field.multiply(i, errorLocator.getCoefficient(i));\n }\n let formalDerivative = new ModulusPoly(this.field, formalDerivativeCoefficients);\n // This is directly applying Forney's Formula\n let s = errorLocations.length;\n let result = new Int32Array(s);\n for (let i /*int*/ = 0; i < s; i++) {\n let xiInverse = this.field.inverse(errorLocations[i]);\n let numerator = this.field.subtract(0, errorEvaluator.evaluateAt(xiInverse));\n let denominator = this.field.inverse(formalDerivative.evaluateAt(xiInverse));\n result[i] = this.field.multiply(numerator, denominator);\n }\n return result;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Guenther Grau\n */\n /*final*/ class BoundingBox {\n constructor(image, topLeft, bottomLeft, topRight, bottomRight) {\n if (image instanceof BoundingBox) {\n this.constructor_2(image);\n }\n else {\n this.constructor_1(image, topLeft, bottomLeft, topRight, bottomRight);\n }\n }\n /**\n *\n * @param image\n * @param topLeft\n * @param bottomLeft\n * @param topRight\n * @param bottomRight\n *\n * @throws NotFoundException\n */\n constructor_1(image, topLeft, bottomLeft, topRight, bottomRight) {\n const leftUnspecified = topLeft == null || bottomLeft == null;\n const rightUnspecified = topRight == null || bottomRight == null;\n if (leftUnspecified && rightUnspecified) {\n throw new NotFoundException();\n }\n if (leftUnspecified) {\n topLeft = new ResultPoint(0, topRight.getY());\n bottomLeft = new ResultPoint(0, bottomRight.getY());\n }\n else if (rightUnspecified) {\n topRight = new ResultPoint(image.getWidth() - 1, topLeft.getY());\n bottomRight = new ResultPoint(image.getWidth() - 1, bottomLeft.getY());\n }\n this.image = image;\n this.topLeft = topLeft;\n this.bottomLeft = bottomLeft;\n this.topRight = topRight;\n this.bottomRight = bottomRight;\n this.minX = Math.trunc(Math.min(topLeft.getX(), bottomLeft.getX()));\n this.maxX = Math.trunc(Math.max(topRight.getX(), bottomRight.getX()));\n this.minY = Math.trunc(Math.min(topLeft.getY(), topRight.getY()));\n this.maxY = Math.trunc(Math.max(bottomLeft.getY(), bottomRight.getY()));\n }\n constructor_2(boundingBox) {\n this.image = boundingBox.image;\n this.topLeft = boundingBox.getTopLeft();\n this.bottomLeft = boundingBox.getBottomLeft();\n this.topRight = boundingBox.getTopRight();\n this.bottomRight = boundingBox.getBottomRight();\n this.minX = boundingBox.getMinX();\n this.maxX = boundingBox.getMaxX();\n this.minY = boundingBox.getMinY();\n this.maxY = boundingBox.getMaxY();\n }\n /**\n * @throws NotFoundException\n */\n static merge(leftBox, rightBox) {\n if (leftBox == null) {\n return rightBox;\n }\n if (rightBox == null) {\n return leftBox;\n }\n return new BoundingBox(leftBox.image, leftBox.topLeft, leftBox.bottomLeft, rightBox.topRight, rightBox.bottomRight);\n }\n /**\n * @throws NotFoundException\n */\n addMissingRows(missingStartRows, missingEndRows, isLeft) {\n let newTopLeft = this.topLeft;\n let newBottomLeft = this.bottomLeft;\n let newTopRight = this.topRight;\n let newBottomRight = this.bottomRight;\n if (missingStartRows > 0) {\n let top = isLeft ? this.topLeft : this.topRight;\n let newMinY = Math.trunc(top.getY() - missingStartRows);\n if (newMinY < 0) {\n newMinY = 0;\n }\n let newTop = new ResultPoint(top.getX(), newMinY);\n if (isLeft) {\n newTopLeft = newTop;\n }\n else {\n newTopRight = newTop;\n }\n }\n if (missingEndRows > 0) {\n let bottom = isLeft ? this.bottomLeft : this.bottomRight;\n let newMaxY = Math.trunc(bottom.getY() + missingEndRows);\n if (newMaxY >= this.image.getHeight()) {\n newMaxY = this.image.getHeight() - 1;\n }\n let newBottom = new ResultPoint(bottom.getX(), newMaxY);\n if (isLeft) {\n newBottomLeft = newBottom;\n }\n else {\n newBottomRight = newBottom;\n }\n }\n return new BoundingBox(this.image, newTopLeft, newBottomLeft, newTopRight, newBottomRight);\n }\n getMinX() {\n return this.minX;\n }\n getMaxX() {\n return this.maxX;\n }\n getMinY() {\n return this.minY;\n }\n getMaxY() {\n return this.maxY;\n }\n getTopLeft() {\n return this.topLeft;\n }\n getTopRight() {\n return this.topRight;\n }\n getBottomLeft() {\n return this.bottomLeft;\n }\n getBottomRight() {\n return this.bottomRight;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // package com.google.zxing.pdf417.decoder;\n /**\n * @author Guenther Grau\n */\n /*final*/ class BarcodeMetadata {\n constructor(columnCount, rowCountUpperPart, rowCountLowerPart, errorCorrectionLevel) {\n this.columnCount = columnCount;\n this.errorCorrectionLevel = errorCorrectionLevel;\n this.rowCountUpperPart = rowCountUpperPart;\n this.rowCountLowerPart = rowCountLowerPart;\n this.rowCount = rowCountUpperPart + rowCountLowerPart;\n }\n getColumnCount() {\n return this.columnCount;\n }\n getErrorCorrectionLevel() {\n return this.errorCorrectionLevel;\n }\n getRowCount() {\n return this.rowCount;\n }\n getRowCountUpperPart() {\n return this.rowCountUpperPart;\n }\n getRowCountLowerPart() {\n return this.rowCountLowerPart;\n }\n }\n\n /**\n * Java Formatter class polyfill that works in the JS way.\n */\n class Formatter {\n constructor() {\n this.buffer = '';\n }\n /**\n *\n * @see https://stackoverflow.com/a/13439711/4367683\n *\n * @param str\n * @param arr\n */\n static form(str, arr) {\n let i = -1;\n function callback(exp, p0, p1, p2, p3, p4) {\n if (exp === '%%')\n return '%';\n if (arr[++i] === undefined)\n return undefined;\n exp = p2 ? parseInt(p2.substr(1)) : undefined;\n let base = p3 ? parseInt(p3.substr(1)) : undefined;\n let val;\n switch (p4) {\n case 's':\n val = arr[i];\n break;\n case 'c':\n val = arr[i][0];\n break;\n case 'f':\n val = parseFloat(arr[i]).toFixed(exp);\n break;\n case 'p':\n val = parseFloat(arr[i]).toPrecision(exp);\n break;\n case 'e':\n val = parseFloat(arr[i]).toExponential(exp);\n break;\n case 'x':\n val = parseInt(arr[i]).toString(base ? base : 16);\n break;\n case 'd':\n val = parseFloat(parseInt(arr[i], base ? base : 10).toPrecision(exp)).toFixed(0);\n break;\n }\n val = typeof val === 'object' ? JSON.stringify(val) : (+val).toString(base);\n let size = parseInt(p1); /* padding size */\n let ch = p1 && (p1[0] + '') === '0' ? '0' : ' '; /* isnull? */\n while (val.length < size)\n val = p0 !== undefined ? val + ch : ch + val; /* isminus? */\n return val;\n }\n let regex = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;\n return str.replace(regex, callback);\n }\n /**\n *\n * @param append The new string to append.\n * @param args Argumets values to be formated.\n */\n format(append, ...args) {\n this.buffer += Formatter.form(append, args);\n }\n /**\n * Returns the Formatter string value.\n */\n toString() {\n return this.buffer;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Guenther Grau\n */\n class DetectionResultColumn {\n constructor(boundingBox) {\n this.boundingBox = new BoundingBox(boundingBox);\n // this.codewords = new Codeword[boundingBox.getMaxY() - boundingBox.getMinY() + 1];\n this.codewords = new Array(boundingBox.getMaxY() - boundingBox.getMinY() + 1);\n }\n /*final*/ getCodewordNearby(imageRow) {\n let codeword = this.getCodeword(imageRow);\n if (codeword != null) {\n return codeword;\n }\n for (let i = 1; i < DetectionResultColumn.MAX_NEARBY_DISTANCE; i++) {\n let nearImageRow = this.imageRowToCodewordIndex(imageRow) - i;\n if (nearImageRow >= 0) {\n codeword = this.codewords[nearImageRow];\n if (codeword != null) {\n return codeword;\n }\n }\n nearImageRow = this.imageRowToCodewordIndex(imageRow) + i;\n if (nearImageRow < this.codewords.length) {\n codeword = this.codewords[nearImageRow];\n if (codeword != null) {\n return codeword;\n }\n }\n }\n return null;\n }\n /*final int*/ imageRowToCodewordIndex(imageRow) {\n return imageRow - this.boundingBox.getMinY();\n }\n /*final void*/ setCodeword(imageRow, codeword) {\n this.codewords[this.imageRowToCodewordIndex(imageRow)] = codeword;\n }\n /*final*/ getCodeword(imageRow) {\n return this.codewords[this.imageRowToCodewordIndex(imageRow)];\n }\n /*final*/ getBoundingBox() {\n return this.boundingBox;\n }\n /*final*/ getCodewords() {\n return this.codewords;\n }\n // @Override\n toString() {\n const formatter = new Formatter();\n let row = 0;\n for (const codeword of this.codewords) {\n if (codeword == null) {\n formatter.format('%3d: | %n', row++);\n continue;\n }\n formatter.format('%3d: %3d|%3d%n', row++, codeword.getRowNumber(), codeword.getValue());\n }\n return formatter.toString();\n }\n }\n DetectionResultColumn.MAX_NEARBY_DISTANCE = 5;\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.ArrayList;\n // import java.util.Collection;\n // import java.util.HashMap;\n // import java.util.Map;\n // import java.util.Map.Entry;\n /**\n * @author Guenther Grau\n */\n /*final*/ class BarcodeValue {\n constructor() {\n this.values = new Map();\n }\n /**\n * Add an occurrence of a value\n */\n setValue(value) {\n value = Math.trunc(value);\n let confidence = this.values.get(value);\n if (confidence == null) {\n confidence = 0;\n }\n confidence++;\n this.values.set(value, confidence);\n }\n /**\n * Determines the maximum occurrence of a set value and returns all values which were set with this occurrence.\n * @return an array of int, containing the values with the highest occurrence, or null, if no value was set\n */\n getValue() {\n let maxConfidence = -1;\n let result = new Array();\n for (const [key, value] of this.values.entries()) {\n const entry = {\n getKey: () => key,\n getValue: () => value,\n };\n if (entry.getValue() > maxConfidence) {\n maxConfidence = entry.getValue();\n result = [];\n result.push(entry.getKey());\n }\n else if (entry.getValue() === maxConfidence) {\n result.push(entry.getKey());\n }\n }\n return PDF417Common.toIntArray(result);\n }\n getConfidence(value) {\n return this.values.get(value);\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Guenther Grau\n */\n /*final*/ class DetectionResultRowIndicatorColumn extends DetectionResultColumn {\n constructor(boundingBox, isLeft) {\n super(boundingBox);\n this._isLeft = isLeft;\n }\n setRowNumbers() {\n for (let codeword /*Codeword*/ of this.getCodewords()) {\n if (codeword != null) {\n codeword.setRowNumberAsRowIndicatorColumn();\n }\n }\n }\n // TODO implement properly\n // TODO maybe we should add missing codewords to store the correct row number to make\n // finding row numbers for other columns easier\n // use row height count to make detection of invalid row numbers more reliable\n adjustCompleteIndicatorColumnRowNumbers(barcodeMetadata) {\n let codewords = this.getCodewords();\n this.setRowNumbers();\n this.removeIncorrectCodewords(codewords, barcodeMetadata);\n let boundingBox = this.getBoundingBox();\n let top = this._isLeft ? boundingBox.getTopLeft() : boundingBox.getTopRight();\n let bottom = this._isLeft ? boundingBox.getBottomLeft() : boundingBox.getBottomRight();\n let firstRow = this.imageRowToCodewordIndex(Math.trunc(top.getY()));\n let lastRow = this.imageRowToCodewordIndex(Math.trunc(bottom.getY()));\n // We need to be careful using the average row height. Barcode could be skewed so that we have smaller and\n // taller rows\n // float averageRowHeight = (lastRow - firstRow) / /*(float)*/ barcodeMetadata.getRowCount();\n let barcodeRow = -1;\n let maxRowHeight = 1;\n let currentRowHeight = 0;\n for (let codewordsRow /*int*/ = firstRow; codewordsRow < lastRow; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let codeword = codewords[codewordsRow];\n // float expectedRowNumber = (codewordsRow - firstRow) / averageRowHeight;\n // if (Math.abs(codeword.getRowNumber() - expectedRowNumber) > 2) {\n // SimpleLog.log(LEVEL.WARNING,\n // \"Removing codeword, rowNumberSkew too high, codeword[\" + codewordsRow + \"]: Expected Row: \" +\n // expectedRowNumber + \", RealRow: \" + codeword.getRowNumber() + \", value: \" + codeword.getValue());\n // codewords[codewordsRow] = null;\n // }\n let rowDifference = codeword.getRowNumber() - barcodeRow;\n // TODO improve handling with case where first row indicator doesn't start with 0\n if (rowDifference === 0) {\n currentRowHeight++;\n }\n else if (rowDifference === 1) {\n maxRowHeight = Math.max(maxRowHeight, currentRowHeight);\n currentRowHeight = 1;\n barcodeRow = codeword.getRowNumber();\n }\n else if (rowDifference < 0 ||\n codeword.getRowNumber() >= barcodeMetadata.getRowCount() ||\n rowDifference > codewordsRow) {\n codewords[codewordsRow] = null;\n }\n else {\n let checkedRows;\n if (maxRowHeight > 2) {\n checkedRows = (maxRowHeight - 2) * rowDifference;\n }\n else {\n checkedRows = rowDifference;\n }\n let closePreviousCodewordFound = checkedRows >= codewordsRow;\n for (let i /*int*/ = 1; i <= checkedRows && !closePreviousCodewordFound; i++) {\n // there must be (height * rowDifference) number of codewords missing. For now we assume height = 1.\n // This should hopefully get rid of most problems already.\n closePreviousCodewordFound = codewords[codewordsRow - i] != null;\n }\n if (closePreviousCodewordFound) {\n codewords[codewordsRow] = null;\n }\n else {\n barcodeRow = codeword.getRowNumber();\n currentRowHeight = 1;\n }\n }\n }\n // return (int) (averageRowHeight + 0.5);\n }\n getRowHeights() {\n let barcodeMetadata = this.getBarcodeMetadata();\n if (barcodeMetadata == null) {\n return null;\n }\n this.adjustIncompleteIndicatorColumnRowNumbers(barcodeMetadata);\n let result = new Int32Array(barcodeMetadata.getRowCount());\n for (let codeword /*Codeword*/ of this.getCodewords()) {\n if (codeword != null) {\n let rowNumber = codeword.getRowNumber();\n if (rowNumber >= result.length) {\n // We have more rows than the barcode metadata allows for, ignore them.\n continue;\n }\n result[rowNumber]++;\n } // else throw exception?\n }\n return result;\n }\n // TODO maybe we should add missing codewords to store the correct row number to make\n // finding row numbers for other columns easier\n // use row height count to make detection of invalid row numbers more reliable\n adjustIncompleteIndicatorColumnRowNumbers(barcodeMetadata) {\n let boundingBox = this.getBoundingBox();\n let top = this._isLeft ? boundingBox.getTopLeft() : boundingBox.getTopRight();\n let bottom = this._isLeft ? boundingBox.getBottomLeft() : boundingBox.getBottomRight();\n let firstRow = this.imageRowToCodewordIndex(Math.trunc(top.getY()));\n let lastRow = this.imageRowToCodewordIndex(Math.trunc(bottom.getY()));\n // float averageRowHeight = (lastRow - firstRow) / /*(float)*/ barcodeMetadata.getRowCount();\n let codewords = this.getCodewords();\n let barcodeRow = -1;\n for (let codewordsRow /*int*/ = firstRow; codewordsRow < lastRow; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let codeword = codewords[codewordsRow];\n codeword.setRowNumberAsRowIndicatorColumn();\n let rowDifference = codeword.getRowNumber() - barcodeRow;\n // TODO improve handling with case where first row indicator doesn't start with 0\n if (rowDifference === 0) ;\n else if (rowDifference === 1) {\n barcodeRow = codeword.getRowNumber();\n }\n else if (codeword.getRowNumber() >= barcodeMetadata.getRowCount()) {\n codewords[codewordsRow] = null;\n }\n else {\n barcodeRow = codeword.getRowNumber();\n }\n }\n // return (int) (averageRowHeight + 0.5);\n }\n getBarcodeMetadata() {\n let codewords = this.getCodewords();\n let barcodeColumnCount = new BarcodeValue();\n let barcodeRowCountUpperPart = new BarcodeValue();\n let barcodeRowCountLowerPart = new BarcodeValue();\n let barcodeECLevel = new BarcodeValue();\n for (let codeword /*Codeword*/ of codewords) {\n if (codeword == null) {\n continue;\n }\n codeword.setRowNumberAsRowIndicatorColumn();\n let rowIndicatorValue = codeword.getValue() % 30;\n let codewordRowNumber = codeword.getRowNumber();\n if (!this._isLeft) {\n codewordRowNumber += 2;\n }\n switch (codewordRowNumber % 3) {\n case 0:\n barcodeRowCountUpperPart.setValue(rowIndicatorValue * 3 + 1);\n break;\n case 1:\n barcodeECLevel.setValue(rowIndicatorValue / 3);\n barcodeRowCountLowerPart.setValue(rowIndicatorValue % 3);\n break;\n case 2:\n barcodeColumnCount.setValue(rowIndicatorValue + 1);\n break;\n }\n }\n // Maybe we should check if we have ambiguous values?\n if ((barcodeColumnCount.getValue().length === 0) ||\n (barcodeRowCountUpperPart.getValue().length === 0) ||\n (barcodeRowCountLowerPart.getValue().length === 0) ||\n (barcodeECLevel.getValue().length === 0) ||\n barcodeColumnCount.getValue()[0] < 1 ||\n barcodeRowCountUpperPart.getValue()[0] + barcodeRowCountLowerPart.getValue()[0] < PDF417Common.MIN_ROWS_IN_BARCODE ||\n barcodeRowCountUpperPart.getValue()[0] + barcodeRowCountLowerPart.getValue()[0] > PDF417Common.MAX_ROWS_IN_BARCODE) {\n return null;\n }\n let barcodeMetadata = new BarcodeMetadata(barcodeColumnCount.getValue()[0], barcodeRowCountUpperPart.getValue()[0], barcodeRowCountLowerPart.getValue()[0], barcodeECLevel.getValue()[0]);\n this.removeIncorrectCodewords(codewords, barcodeMetadata);\n return barcodeMetadata;\n }\n removeIncorrectCodewords(codewords, barcodeMetadata) {\n // Remove codewords which do not match the metadata\n // TODO Maybe we should keep the incorrect codewords for the start and end positions?\n for (let codewordRow /*int*/ = 0; codewordRow < codewords.length; codewordRow++) {\n let codeword = codewords[codewordRow];\n if (codewords[codewordRow] == null) {\n continue;\n }\n let rowIndicatorValue = codeword.getValue() % 30;\n let codewordRowNumber = codeword.getRowNumber();\n if (codewordRowNumber > barcodeMetadata.getRowCount()) {\n codewords[codewordRow] = null;\n continue;\n }\n if (!this._isLeft) {\n codewordRowNumber += 2;\n }\n switch (codewordRowNumber % 3) {\n case 0:\n if (rowIndicatorValue * 3 + 1 !== barcodeMetadata.getRowCountUpperPart()) {\n codewords[codewordRow] = null;\n }\n break;\n case 1:\n if (Math.trunc(rowIndicatorValue / 3) !== barcodeMetadata.getErrorCorrectionLevel() ||\n rowIndicatorValue % 3 !== barcodeMetadata.getRowCountLowerPart()) {\n codewords[codewordRow] = null;\n }\n break;\n case 2:\n if (rowIndicatorValue + 1 !== barcodeMetadata.getColumnCount()) {\n codewords[codewordRow] = null;\n }\n break;\n }\n }\n }\n isLeft() {\n return this._isLeft;\n }\n // @Override\n toString() {\n return 'IsLeft: ' + this._isLeft + '\\n' + super.toString();\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Guenther Grau\n */\n /*final*/ class DetectionResult {\n constructor(barcodeMetadata, boundingBox) {\n /*final*/ this.ADJUST_ROW_NUMBER_SKIP = 2;\n this.barcodeMetadata = barcodeMetadata;\n this.barcodeColumnCount = barcodeMetadata.getColumnCount();\n this.boundingBox = boundingBox;\n // this.detectionResultColumns = new DetectionResultColumn[this.barcodeColumnCount + 2];\n this.detectionResultColumns = new Array(this.barcodeColumnCount + 2);\n }\n getDetectionResultColumns() {\n this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]);\n this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount + 1]);\n let unadjustedCodewordCount = PDF417Common.MAX_CODEWORDS_IN_BARCODE;\n let previousUnadjustedCount;\n do {\n previousUnadjustedCount = unadjustedCodewordCount;\n unadjustedCodewordCount = this.adjustRowNumbersAndGetCount();\n } while (unadjustedCodewordCount > 0 && unadjustedCodewordCount < previousUnadjustedCount);\n return this.detectionResultColumns;\n }\n adjustIndicatorColumnRowNumbers(detectionResultColumn) {\n if (detectionResultColumn != null) {\n detectionResultColumn\n .adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata);\n }\n }\n // TODO ensure that no detected codewords with unknown row number are left\n // we should be able to estimate the row height and use it as a hint for the row number\n // we should also fill the rows top to bottom and bottom to top\n /**\n * @return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords\n * will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers\n */\n adjustRowNumbersAndGetCount() {\n let unadjustedCount = this.adjustRowNumbersByRow();\n if (unadjustedCount === 0) {\n return 0;\n }\n for (let barcodeColumn /*int*/ = 1; barcodeColumn < this.barcodeColumnCount + 1; barcodeColumn++) {\n let codewords = this.detectionResultColumns[barcodeColumn].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < codewords.length; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n if (!codewords[codewordsRow].hasValidRowNumber()) {\n this.adjustRowNumbers(barcodeColumn, codewordsRow, codewords);\n }\n }\n }\n return unadjustedCount;\n }\n adjustRowNumbersByRow() {\n this.adjustRowNumbersFromBothRI();\n // TODO we should only do full row adjustments if row numbers of left and right row indicator column match.\n // Maybe it's even better to calculated the height (rows: d) and divide it by the number of barcode\n // rows. This, together with the LRI and RRI row numbers should allow us to get a good estimate where a row\n // number starts and ends.\n let unadjustedCount = this.adjustRowNumbersFromLRI();\n return unadjustedCount + this.adjustRowNumbersFromRRI();\n }\n adjustRowNumbersFromBothRI() {\n if (this.detectionResultColumns[0] == null || this.detectionResultColumns[this.barcodeColumnCount + 1] == null) {\n return;\n }\n let LRIcodewords = this.detectionResultColumns[0].getCodewords();\n let RRIcodewords = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < LRIcodewords.length; codewordsRow++) {\n if (LRIcodewords[codewordsRow] != null &&\n RRIcodewords[codewordsRow] != null &&\n LRIcodewords[codewordsRow].getRowNumber() === RRIcodewords[codewordsRow].getRowNumber()) {\n for (let barcodeColumn /*int*/ = 1; barcodeColumn <= this.barcodeColumnCount; barcodeColumn++) {\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword == null) {\n continue;\n }\n codeword.setRowNumber(LRIcodewords[codewordsRow].getRowNumber());\n if (!codeword.hasValidRowNumber()) {\n this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow] = null;\n }\n }\n }\n }\n }\n adjustRowNumbersFromRRI() {\n if (this.detectionResultColumns[this.barcodeColumnCount + 1] == null) {\n return 0;\n }\n let unadjustedCount = 0;\n let codewords = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < codewords.length; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let rowIndicatorRowNumber = codewords[codewordsRow].getRowNumber();\n let invalidRowCounts = 0;\n for (let barcodeColumn /*int*/ = this.barcodeColumnCount + 1; barcodeColumn > 0 && invalidRowCounts < this.ADJUST_ROW_NUMBER_SKIP; barcodeColumn--) {\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword != null) {\n invalidRowCounts = DetectionResult.adjustRowNumberIfValid(rowIndicatorRowNumber, invalidRowCounts, codeword);\n if (!codeword.hasValidRowNumber()) {\n unadjustedCount++;\n }\n }\n }\n }\n return unadjustedCount;\n }\n adjustRowNumbersFromLRI() {\n if (this.detectionResultColumns[0] == null) {\n return 0;\n }\n let unadjustedCount = 0;\n let codewords = this.detectionResultColumns[0].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < codewords.length; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let rowIndicatorRowNumber = codewords[codewordsRow].getRowNumber();\n let invalidRowCounts = 0;\n for (let barcodeColumn /*int*/ = 1; barcodeColumn < this.barcodeColumnCount + 1 && invalidRowCounts < this.ADJUST_ROW_NUMBER_SKIP; barcodeColumn++) {\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword != null) {\n invalidRowCounts = DetectionResult.adjustRowNumberIfValid(rowIndicatorRowNumber, invalidRowCounts, codeword);\n if (!codeword.hasValidRowNumber()) {\n unadjustedCount++;\n }\n }\n }\n }\n return unadjustedCount;\n }\n static adjustRowNumberIfValid(rowIndicatorRowNumber, invalidRowCounts, codeword) {\n if (codeword == null) {\n return invalidRowCounts;\n }\n if (!codeword.hasValidRowNumber()) {\n if (codeword.isValidRowNumber(rowIndicatorRowNumber)) {\n codeword.setRowNumber(rowIndicatorRowNumber);\n invalidRowCounts = 0;\n }\n else {\n ++invalidRowCounts;\n }\n }\n return invalidRowCounts;\n }\n adjustRowNumbers(barcodeColumn, codewordsRow, codewords) {\n if (!this.detectionResultColumns[barcodeColumn - 1]) {\n return;\n }\n let codeword = codewords[codewordsRow];\n let previousColumnCodewords = this.detectionResultColumns[barcodeColumn - 1].getCodewords();\n let nextColumnCodewords = previousColumnCodewords;\n if (this.detectionResultColumns[barcodeColumn + 1] != null) {\n nextColumnCodewords = this.detectionResultColumns[barcodeColumn + 1].getCodewords();\n }\n // let otherCodewords: Codeword[] = new Codeword[14];\n let otherCodewords = new Array(14);\n otherCodewords[2] = previousColumnCodewords[codewordsRow];\n otherCodewords[3] = nextColumnCodewords[codewordsRow];\n if (codewordsRow > 0) {\n otherCodewords[0] = codewords[codewordsRow - 1];\n otherCodewords[4] = previousColumnCodewords[codewordsRow - 1];\n otherCodewords[5] = nextColumnCodewords[codewordsRow - 1];\n }\n if (codewordsRow > 1) {\n otherCodewords[8] = codewords[codewordsRow - 2];\n otherCodewords[10] = previousColumnCodewords[codewordsRow - 2];\n otherCodewords[11] = nextColumnCodewords[codewordsRow - 2];\n }\n if (codewordsRow < codewords.length - 1) {\n otherCodewords[1] = codewords[codewordsRow + 1];\n otherCodewords[6] = previousColumnCodewords[codewordsRow + 1];\n otherCodewords[7] = nextColumnCodewords[codewordsRow + 1];\n }\n if (codewordsRow < codewords.length - 2) {\n otherCodewords[9] = codewords[codewordsRow + 2];\n otherCodewords[12] = previousColumnCodewords[codewordsRow + 2];\n otherCodewords[13] = nextColumnCodewords[codewordsRow + 2];\n }\n for (let otherCodeword of otherCodewords) {\n if (DetectionResult.adjustRowNumber(codeword, otherCodeword)) {\n return;\n }\n }\n }\n /**\n * @return true, if row number was adjusted, false otherwise\n */\n static adjustRowNumber(codeword, otherCodeword) {\n if (otherCodeword == null) {\n return false;\n }\n if (otherCodeword.hasValidRowNumber() && otherCodeword.getBucket() === codeword.getBucket()) {\n codeword.setRowNumber(otherCodeword.getRowNumber());\n return true;\n }\n return false;\n }\n getBarcodeColumnCount() {\n return this.barcodeColumnCount;\n }\n getBarcodeRowCount() {\n return this.barcodeMetadata.getRowCount();\n }\n getBarcodeECLevel() {\n return this.barcodeMetadata.getErrorCorrectionLevel();\n }\n setBoundingBox(boundingBox) {\n this.boundingBox = boundingBox;\n }\n getBoundingBox() {\n return this.boundingBox;\n }\n setDetectionResultColumn(barcodeColumn, detectionResultColumn) {\n this.detectionResultColumns[barcodeColumn] = detectionResultColumn;\n }\n getDetectionResultColumn(barcodeColumn) {\n return this.detectionResultColumns[barcodeColumn];\n }\n // @Override\n toString() {\n let rowIndicatorColumn = this.detectionResultColumns[0];\n if (rowIndicatorColumn == null) {\n rowIndicatorColumn = this.detectionResultColumns[this.barcodeColumnCount + 1];\n }\n // try (\n let formatter = new Formatter();\n // ) {\n for (let codewordsRow /*int*/ = 0; codewordsRow < rowIndicatorColumn.getCodewords().length; codewordsRow++) {\n formatter.format('CW %3d:', codewordsRow);\n for (let barcodeColumn /*int*/ = 0; barcodeColumn < this.barcodeColumnCount + 2; barcodeColumn++) {\n if (this.detectionResultColumns[barcodeColumn] == null) {\n formatter.format(' | ');\n continue;\n }\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword == null) {\n formatter.format(' | ');\n continue;\n }\n formatter.format(' %3d|%3d', codeword.getRowNumber(), codeword.getValue());\n }\n formatter.format('%n');\n }\n return formatter.toString();\n // }\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // package com.google.zxing.pdf417.decoder;\n /**\n * @author Guenther Grau\n */\n /*final*/ class Codeword {\n constructor(startX, endX, bucket, value) {\n this.rowNumber = Codeword.BARCODE_ROW_UNKNOWN;\n this.startX = Math.trunc(startX);\n this.endX = Math.trunc(endX);\n this.bucket = Math.trunc(bucket);\n this.value = Math.trunc(value);\n }\n hasValidRowNumber() {\n return this.isValidRowNumber(this.rowNumber);\n }\n isValidRowNumber(rowNumber) {\n return rowNumber !== Codeword.BARCODE_ROW_UNKNOWN && this.bucket === (rowNumber % 3) * 3;\n }\n setRowNumberAsRowIndicatorColumn() {\n this.rowNumber = Math.trunc((Math.trunc(this.value / 30)) * 3 + Math.trunc(this.bucket / 3));\n }\n getWidth() {\n return this.endX - this.startX;\n }\n getStartX() {\n return this.startX;\n }\n getEndX() {\n return this.endX;\n }\n getBucket() {\n return this.bucket;\n }\n getValue() {\n return this.value;\n }\n getRowNumber() {\n return this.rowNumber;\n }\n setRowNumber(rowNumber) {\n this.rowNumber = rowNumber;\n }\n // @Override\n toString() {\n return this.rowNumber + '|' + this.value;\n }\n }\n Codeword.BARCODE_ROW_UNKNOWN = -1;\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * @author Guenther Grau\n * @author creatale GmbH (christoph.schulz@creatale.de)\n */\n /*final*/ class PDF417CodewordDecoder {\n /* @note\n * this action have to be performed before first use of class\n * - static constructor\n * working with 32bit float (based from Java logic)\n */\n static initialize() {\n // Pre-computes the symbol ratio table.\n for ( /*int*/let i = 0; i < PDF417Common.SYMBOL_TABLE.length; i++) {\n let currentSymbol = PDF417Common.SYMBOL_TABLE[i];\n let currentBit = currentSymbol & 0x1;\n for ( /*int*/let j = 0; j < PDF417Common.BARS_IN_MODULE; j++) {\n let size = 0.0;\n while ((currentSymbol & 0x1) === currentBit) {\n size += 1.0;\n currentSymbol >>= 1;\n }\n currentBit = currentSymbol & 0x1;\n if (!PDF417CodewordDecoder.RATIOS_TABLE[i]) {\n PDF417CodewordDecoder.RATIOS_TABLE[i] = new Array(PDF417Common.BARS_IN_MODULE);\n }\n PDF417CodewordDecoder.RATIOS_TABLE[i][PDF417Common.BARS_IN_MODULE - j - 1] = Math.fround(size / PDF417Common.MODULES_IN_CODEWORD);\n }\n }\n this.bSymbolTableReady = true;\n }\n static getDecodedValue(moduleBitCount) {\n let decodedValue = PDF417CodewordDecoder.getDecodedCodewordValue(PDF417CodewordDecoder.sampleBitCounts(moduleBitCount));\n if (decodedValue !== -1) {\n return decodedValue;\n }\n return PDF417CodewordDecoder.getClosestDecodedValue(moduleBitCount);\n }\n static sampleBitCounts(moduleBitCount) {\n let bitCountSum = MathUtils.sum(moduleBitCount);\n let result = new Int32Array(PDF417Common.BARS_IN_MODULE);\n let bitCountIndex = 0;\n let sumPreviousBits = 0;\n for ( /*int*/let i = 0; i < PDF417Common.MODULES_IN_CODEWORD; i++) {\n let sampleIndex = bitCountSum / (2 * PDF417Common.MODULES_IN_CODEWORD) +\n (i * bitCountSum) / PDF417Common.MODULES_IN_CODEWORD;\n if (sumPreviousBits + moduleBitCount[bitCountIndex] <= sampleIndex) {\n sumPreviousBits += moduleBitCount[bitCountIndex];\n bitCountIndex++;\n }\n result[bitCountIndex]++;\n }\n return result;\n }\n static getDecodedCodewordValue(moduleBitCount) {\n let decodedValue = PDF417CodewordDecoder.getBitValue(moduleBitCount);\n return PDF417Common.getCodeword(decodedValue) === -1 ? -1 : decodedValue;\n }\n static getBitValue(moduleBitCount) {\n let result = /*long*/ 0;\n for (let /*int*/ i = 0; i < moduleBitCount.length; i++) {\n for ( /*int*/let bit = 0; bit < moduleBitCount[i]; bit++) {\n result = (result << 1) | (i % 2 === 0 ? 1 : 0);\n }\n }\n return Math.trunc(result);\n }\n // working with 32bit float (as in Java)\n static getClosestDecodedValue(moduleBitCount) {\n let bitCountSum = MathUtils.sum(moduleBitCount);\n let bitCountRatios = new Array(PDF417Common.BARS_IN_MODULE);\n if (bitCountSum > 1) {\n for (let /*int*/ i = 0; i < bitCountRatios.length; i++) {\n bitCountRatios[i] = Math.fround(moduleBitCount[i] / bitCountSum);\n }\n }\n let bestMatchError = Float.MAX_VALUE;\n let bestMatch = -1;\n if (!this.bSymbolTableReady) {\n PDF417CodewordDecoder.initialize();\n }\n for ( /*int*/let j = 0; j < PDF417CodewordDecoder.RATIOS_TABLE.length; j++) {\n let error = 0.0;\n let ratioTableRow = PDF417CodewordDecoder.RATIOS_TABLE[j];\n for ( /*int*/let k = 0; k < PDF417Common.BARS_IN_MODULE; k++) {\n let diff = Math.fround(ratioTableRow[k] - bitCountRatios[k]);\n error += Math.fround(diff * diff);\n if (error >= bestMatchError) {\n break;\n }\n }\n if (error < bestMatchError) {\n bestMatchError = error;\n bestMatch = PDF417Common.SYMBOL_TABLE[j];\n }\n }\n return bestMatch;\n }\n }\n // flag that the table is ready for use\n PDF417CodewordDecoder.bSymbolTableReady = false;\n PDF417CodewordDecoder.RATIOS_TABLE = new Array(PDF417Common.SYMBOL_TABLE.length).map(x => x = new Array(PDF417Common.BARS_IN_MODULE));\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // package com.google.zxing.pdf417;\n /**\n * @author Guenther Grau\n */\n /*public final*/ class PDF417ResultMetadata {\n constructor() {\n this.segmentCount = -1;\n this.fileSize = -1;\n this.timestamp = -1;\n this.checksum = -1;\n }\n /**\n * The Segment ID represents the segment of the whole file distributed over different symbols.\n *\n * @return File segment index\n */\n getSegmentIndex() {\n return this.segmentIndex;\n }\n setSegmentIndex(segmentIndex) {\n this.segmentIndex = segmentIndex;\n }\n /**\n * Is the same for each related PDF417 symbol\n *\n * @return File ID\n */\n getFileId() {\n return this.fileId;\n }\n setFileId(fileId) {\n this.fileId = fileId;\n }\n /**\n * @return always null\n * @deprecated use dedicated already parsed fields\n */\n // @Deprecated\n getOptionalData() {\n return this.optionalData;\n }\n /**\n * @param optionalData old optional data format as int array\n * @deprecated parse and use new fields\n */\n // @Deprecated\n setOptionalData(optionalData) {\n this.optionalData = optionalData;\n }\n /**\n * @return true if it is the last segment\n */\n isLastSegment() {\n return this.lastSegment;\n }\n setLastSegment(lastSegment) {\n this.lastSegment = lastSegment;\n }\n /**\n * @return count of segments, -1 if not set\n */\n getSegmentCount() {\n return this.segmentCount;\n }\n setSegmentCount(segmentCount /*int*/) {\n this.segmentCount = segmentCount;\n }\n getSender() {\n return this.sender || null;\n }\n setSender(sender) {\n this.sender = sender;\n }\n getAddressee() {\n return this.addressee || null;\n }\n setAddressee(addressee) {\n this.addressee = addressee;\n }\n /**\n * Filename of the encoded file\n *\n * @return filename\n */\n getFileName() {\n return this.fileName;\n }\n setFileName(fileName) {\n this.fileName = fileName;\n }\n /**\n * filesize in bytes of the encoded file\n *\n * @return filesize in bytes, -1 if not set\n */\n getFileSize() {\n return this.fileSize;\n }\n setFileSize(fileSize /*long*/) {\n this.fileSize = fileSize;\n }\n /**\n * 16-bit CRC checksum using CCITT-16\n *\n * @return crc checksum, -1 if not set\n */\n getChecksum() {\n return this.checksum;\n }\n setChecksum(checksum /*int*/) {\n this.checksum = checksum;\n }\n /**\n * unix epock timestamp, elapsed seconds since 1970-01-01\n *\n * @return elapsed seconds, -1 if not set\n */\n getTimestamp() {\n return this.timestamp;\n }\n setTimestamp(timestamp /*long*/) {\n this.timestamp = timestamp;\n }\n }\n\n /**\n * Ponyfill for Java's Long class.\n */\n class Long {\n /**\n * Parses a string to a number, since JS has no really Int64.\n *\n * @param num Numeric string.\n * @param radix Destination radix.\n */\n static parseLong(num, radix = undefined) {\n return parseInt(num, radix);\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class NullPointerException extends Exception {\n }\n NullPointerException.kind = 'NullPointerException';\n\n /*\n * Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n // package java.io;\n /**\n * This abstract class is the superclass of all classes representing\n * an output stream of bytes. An output stream accepts output bytes\n * and sends them to some sink.\n *

\n * Applications that need to define a subclass of\n * OutputStream must always provide at least a method\n * that writes one byte of output.\n *\n * @author Arthur van Hoff\n * @see java.io.BufferedOutputStream\n * @see java.io.ByteArrayOutputStream\n * @see java.io.DataOutputStream\n * @see java.io.FilterOutputStream\n * @see java.io.InputStream\n * @see java.io.OutputStream#write(int)\n * @since JDK1.0\n */\n /*public*/ class OutputStream /*implements Closeable, Flushable*/ {\n /**\n * Writes b.length bytes from the specified byte array\n * to this output stream. The general contract for write(b)\n * is that it should have exactly the same effect as the call\n * write(b, 0, b.length).\n *\n * @param b the data.\n * @exception IOException if an I/O error occurs.\n * @see java.io.OutputStream#write(byte[], int, int)\n */\n writeBytes(b) {\n this.writeBytesOffset(b, 0, b.length);\n }\n /**\n * Writes len bytes from the specified byte array\n * starting at offset off to this output stream.\n * The general contract for write(b, off, len) is that\n * some of the bytes in the array b are written to the\n * output stream in order; element b[off] is the first\n * byte written and b[off+len-1] is the last byte written\n * by this operation.\n *

\n * The write method of OutputStream calls\n * the write method of one argument on each of the bytes to be\n * written out. Subclasses are encouraged to override this method and\n * provide a more efficient implementation.\n *

\n * If b is null, a\n * NullPointerException is thrown.\n *

\n * If off is negative, or len is negative, or\n * off+len is greater than the length of the array\n * b, then an IndexOutOfBoundsException is thrown.\n *\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n * @exception IOException if an I/O error occurs. In particular,\n * an IOException is thrown if the output\n * stream is closed.\n */\n writeBytesOffset(b, off, len) {\n if (b == null) {\n throw new NullPointerException();\n }\n else if ((off < 0) || (off > b.length) || (len < 0) ||\n ((off + len) > b.length) || ((off + len) < 0)) {\n throw new IndexOutOfBoundsException();\n }\n else if (len === 0) {\n return;\n }\n for (let i = 0; i < len; i++) {\n this.write(b[off + i]);\n }\n }\n /**\n * Flushes this output stream and forces any buffered output bytes\n * to be written out. The general contract of flush is\n * that calling it is an indication that, if any bytes previously\n * written have been buffered by the implementation of the output\n * stream, such bytes should immediately be written to their\n * intended destination.\n *

\n * If the intended destination of this stream is an abstraction provided by\n * the underlying operating system, for example a file, then flushing the\n * stream guarantees only that bytes previously written to the stream are\n * passed to the operating system for writing; it does not guarantee that\n * they are actually written to a physical device such as a disk drive.\n *

\n * The flush method of OutputStream does nothing.\n *\n * @exception IOException if an I/O error occurs.\n */\n flush() {\n }\n /**\n * Closes this output stream and releases any system resources\n * associated with this stream. The general contract of close\n * is that it closes the output stream. A closed stream cannot perform\n * output operations and cannot be reopened.\n *

\n * The close method of OutputStream does nothing.\n *\n * @exception IOException if an I/O error occurs.\n */\n close() {\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class OutOfMemoryError extends Exception {\n }\n\n /*\n * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n /**\n * This class implements an output stream in which the data is\n * written into a byte array. The buffer automatically grows as data\n * is written to it.\n * The data can be retrieved using toByteArray() and\n * toString().\n *

\n * Closing a ByteArrayOutputStream has no effect. The methods in\n * this class can be called after the stream has been closed without\n * generating an IOException.\n *\n * @author Arthur van Hoff\n * @since JDK1.0\n */\n /*public*/ class ByteArrayOutputStream extends OutputStream {\n /**\n * Creates a new byte array output stream. The buffer capacity is\n * initially 32 bytes, though its size increases if necessary.\n */\n // public constructor() {\n // this(32);\n // }\n /**\n * Creates a new byte array output stream, with a buffer capacity of\n * the specified size, in bytes.\n *\n * @param size the initial size.\n * @exception IllegalArgumentException if size is negative.\n */\n constructor(size = 32) {\n super();\n /**\n * The number of valid bytes in the buffer.\n */\n this.count = 0;\n if (size < 0) {\n throw new IllegalArgumentException('Negative initial size: '\n + size);\n }\n this.buf = new Uint8Array(size);\n }\n /**\n * Increases the capacity if necessary to ensure that it can hold\n * at least the number of elements specified by the minimum\n * capacity argument.\n *\n * @param minCapacity the desired minimum capacity\n * @throws OutOfMemoryError if {@code minCapacity < 0}. This is\n * interpreted as a request for the unsatisfiably large capacity\n * {@code (long) Integer.MAX_VALUE + (minCapacity - Integer.MAX_VALUE)}.\n */\n ensureCapacity(minCapacity) {\n // overflow-conscious code\n if (minCapacity - this.buf.length > 0)\n this.grow(minCapacity);\n }\n /**\n * Increases the capacity to ensure that it can hold at least the\n * number of elements specified by the minimum capacity argument.\n *\n * @param minCapacity the desired minimum capacity\n */\n grow(minCapacity) {\n // overflow-conscious code\n let oldCapacity = this.buf.length;\n let newCapacity = oldCapacity << 1;\n if (newCapacity - minCapacity < 0)\n newCapacity = minCapacity;\n if (newCapacity < 0) {\n if (minCapacity < 0) // overflow\n throw new OutOfMemoryError();\n newCapacity = Integer.MAX_VALUE;\n }\n this.buf = Arrays.copyOfUint8Array(this.buf, newCapacity);\n }\n /**\n * Writes the specified byte to this byte array output stream.\n *\n * @param b the byte to be written.\n */\n write(b) {\n this.ensureCapacity(this.count + 1);\n this.buf[this.count] = /*(byte)*/ b;\n this.count += 1;\n }\n /**\n * Writes len bytes from the specified byte array\n * starting at offset off to this byte array output stream.\n *\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n */\n writeBytesOffset(b, off, len) {\n if ((off < 0) || (off > b.length) || (len < 0) ||\n ((off + len) - b.length > 0)) {\n throw new IndexOutOfBoundsException();\n }\n this.ensureCapacity(this.count + len);\n System.arraycopy(b, off, this.buf, this.count, len);\n this.count += len;\n }\n /**\n * Writes the complete contents of this byte array output stream to\n * the specified output stream argument, as if by calling the output\n * stream's write method using out.write(buf, 0, count).\n *\n * @param out the output stream to which to write the data.\n * @exception IOException if an I/O error occurs.\n */\n writeTo(out) {\n out.writeBytesOffset(this.buf, 0, this.count);\n }\n /**\n * Resets the count field of this byte array output\n * stream to zero, so that all currently accumulated output in the\n * output stream is discarded. The output stream can be used again,\n * reusing the already allocated buffer space.\n *\n * @see java.io.ByteArrayInputStream#count\n */\n reset() {\n this.count = 0;\n }\n /**\n * Creates a newly allocated byte array. Its size is the current\n * size of this output stream and the valid contents of the buffer\n * have been copied into it.\n *\n * @return the current contents of this output stream, as a byte array.\n * @see java.io.ByteArrayOutputStream#size()\n */\n toByteArray() {\n return Arrays.copyOfUint8Array(this.buf, this.count);\n }\n /**\n * Returns the current size of the buffer.\n *\n * @return the value of the count field, which is the number\n * of valid bytes in this output stream.\n * @see java.io.ByteArrayOutputStream#count\n */\n size() {\n return this.count;\n }\n toString(param) {\n if (!param) {\n return this.toString_void();\n }\n if (typeof param === 'string') {\n return this.toString_string(param);\n }\n return this.toString_number(param);\n }\n /**\n * Converts the buffer's contents into a string decoding bytes using the\n * platform's default character set. The length of the new String\n * is a function of the character set, and hence may not be equal to the\n * size of the buffer.\n *\n *

This method always replaces malformed-input and unmappable-character\n * sequences with the default replacement string for the platform's\n * default character set. The {@linkplain java.nio.charset.CharsetDecoder}\n * class should be used when more control over the decoding process is\n * required.\n *\n * @return String decoded from the buffer's contents.\n * @since JDK1.1\n */\n toString_void() {\n return new String(this.buf /*, 0, this.count*/).toString();\n }\n /**\n * Converts the buffer's contents into a string by decoding the bytes using\n * the specified {@link java.nio.charset.Charset charsetName}. The length of\n * the new String is a function of the charset, and hence may not be\n * equal to the length of the byte array.\n *\n *

This method always replaces malformed-input and unmappable-character\n * sequences with this charset's default replacement string. The {@link\n * java.nio.charset.CharsetDecoder} class should be used when more control\n * over the decoding process is required.\n *\n * @param charsetName the name of a supported\n * {@linkplain java.nio.charset.Charset charset}\n * @return String decoded from the buffer's contents.\n * @exception UnsupportedEncodingException\n * If the named charset is not supported\n * @since JDK1.1\n */\n toString_string(charsetName) {\n return new String(this.buf /*, 0, this.count, charsetName*/).toString();\n }\n /**\n * Creates a newly allocated string. Its size is the current size of\n * the output stream and the valid contents of the buffer have been\n * copied into it. Each character c in the resulting string is\n * constructed from the corresponding element b in the byte\n * array such that:\n *

\n         *     c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))\n         * 
\n *\n * @deprecated This method does not properly convert bytes into characters.\n * As of JDK 1.1, the preferred way to do this is via the\n * toString(String enc) method, which takes an encoding-name\n * argument, or the toString() method, which uses the\n * platform's default character encoding.\n *\n * @param hibyte the high byte of each resulting Unicode character.\n * @return the current contents of the output stream, as a string.\n * @see java.io.ByteArrayOutputStream#size()\n * @see java.io.ByteArrayOutputStream#toString(String)\n * @see java.io.ByteArrayOutputStream#toString()\n */\n // @Deprecated\n toString_number(hibyte) {\n return new String(this.buf /*, hibyte, 0, this.count*/).toString();\n }\n /**\n * Closing a ByteArrayOutputStream has no effect. The methods in\n * this class can be called after the stream has been closed without\n * generating an IOException.\n *

\n *\n * @throws IOException\n */\n close() {\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*private*/ var Mode$2;\n (function (Mode) {\n Mode[Mode[\"ALPHA\"] = 0] = \"ALPHA\";\n Mode[Mode[\"LOWER\"] = 1] = \"LOWER\";\n Mode[Mode[\"MIXED\"] = 2] = \"MIXED\";\n Mode[Mode[\"PUNCT\"] = 3] = \"PUNCT\";\n Mode[Mode[\"ALPHA_SHIFT\"] = 4] = \"ALPHA_SHIFT\";\n Mode[Mode[\"PUNCT_SHIFT\"] = 5] = \"PUNCT_SHIFT\";\n })(Mode$2 || (Mode$2 = {}));\n /**\n * Indirectly access the global BigInt constructor, it\n * allows browsers that doesn't support BigInt to run\n * the library without breaking due to \"undefined BigInt\"\n * errors.\n */\n function getBigIntConstructor() {\n if (typeof window !== 'undefined') {\n return window['BigInt'] || null;\n }\n if (typeof global !== 'undefined') {\n return global['BigInt'] || null;\n }\n if (typeof self !== 'undefined') {\n return self['BigInt'] || null;\n }\n throw new Error('Can\\'t search globals for BigInt!');\n }\n /**\n * Used to store the BigInt constructor.\n */\n let BigInteger;\n /**\n * This function creates a bigint value. It allows browsers\n * that doesn't support BigInt to run the rest of the library\n * by not directly accessing the BigInt constructor.\n */\n function createBigInt(num) {\n if (typeof BigInteger === 'undefined') {\n BigInteger = getBigIntConstructor();\n }\n if (BigInteger === null) {\n throw new Error('BigInt is not supported!');\n }\n return BigInteger(num);\n }\n function getEXP900() {\n // in Java - array with length = 16\n let EXP900 = [];\n EXP900[0] = createBigInt(1);\n let nineHundred = createBigInt(900);\n EXP900[1] = nineHundred;\n // in Java - array with length = 16\n for (let i /*int*/ = 2; i < 16; i++) {\n EXP900[i] = EXP900[i - 1] * nineHundred;\n }\n return EXP900;\n }\n /**\n *

This class contains the methods for decoding the PDF417 codewords.

\n *\n * @author SITA Lab (kevin.osullivan@sita.aero)\n * @author Guenther Grau\n */\n /*final*/ class DecodedBitStreamParser$2 {\n // private DecodedBitStreamParser() {\n // }\n /**\n *\n * @param codewords\n * @param ecLevel\n *\n * @throws FormatException\n */\n static decode(codewords, ecLevel) {\n // pass encoding to result (will be used for decode symbols in byte mode)\n let result = new StringBuilder('');\n // let encoding: Charset = StandardCharsets.ISO_8859_1;\n let encoding = CharacterSetECI.ISO8859_1;\n /**\n * @note the next command is specific from this TypeScript library\n * because TS can't properly cast some values to char and\n * convert it to string later correctly due to encoding\n * differences from Java version. As reported here:\n * https://github.com/zxing-js/library/pull/264/files#r382831593\n */\n result.enableDecoding(encoding);\n // Get compaction mode\n let codeIndex = 1;\n let code = codewords[codeIndex++];\n let resultMetadata = new PDF417ResultMetadata();\n while (codeIndex < codewords[0]) {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, result);\n break;\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n codeIndex = DecodedBitStreamParser$2.byteCompaction(code, codewords, encoding, codeIndex, result);\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append(/*(char)*/ codewords[codeIndex++]);\n break;\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex, result);\n break;\n case DecodedBitStreamParser$2.ECI_CHARSET:\n let charsetECI = CharacterSetECI.getCharacterSetECIByValue(codewords[codeIndex++]);\n // encoding = Charset.forName(charsetECI.getName());\n break;\n case DecodedBitStreamParser$2.ECI_GENERAL_PURPOSE:\n // Can't do anything with generic ECI; skip its 2 characters\n codeIndex += 2;\n break;\n case DecodedBitStreamParser$2.ECI_USER_DEFINED:\n // Can't do anything with user ECI; skip its 1 character\n codeIndex++;\n break;\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n codeIndex = DecodedBitStreamParser$2.decodeMacroBlock(codewords, codeIndex, resultMetadata);\n break;\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n // Should not see these outside a macro block\n throw new FormatException();\n default:\n // Default to text compaction. During testing numerous barcodes\n // appeared to be missing the starting mode. In these cases defaulting\n // to text compaction seems to work.\n codeIndex--;\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, result);\n break;\n }\n if (codeIndex < codewords.length) {\n code = codewords[codeIndex++];\n }\n else {\n throw FormatException.getFormatInstance();\n }\n }\n if (result.length() === 0) {\n throw FormatException.getFormatInstance();\n }\n let decoderResult = new DecoderResult(null, result.toString(), null, ecLevel);\n decoderResult.setOther(resultMetadata);\n return decoderResult;\n }\n /**\n *\n * @param int\n * @param param1\n * @param codewords\n * @param int\n * @param codeIndex\n * @param PDF417ResultMetadata\n * @param resultMetadata\n *\n * @throws FormatException\n */\n // @SuppressWarnings(\"deprecation\")\n static decodeMacroBlock(codewords, codeIndex, resultMetadata) {\n if (codeIndex + DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS > codewords[0]) {\n // we must have at least two bytes left for the segment index\n throw FormatException.getFormatInstance();\n }\n let segmentIndexArray = new Int32Array(DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS);\n for (let i /*int*/ = 0; i < DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS; i++, codeIndex++) {\n segmentIndexArray[i] = codewords[codeIndex];\n }\n resultMetadata.setSegmentIndex(Integer.parseInt(DecodedBitStreamParser$2.decodeBase900toBase10(segmentIndexArray, DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS)));\n let fileId = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, fileId);\n resultMetadata.setFileId(fileId.toString());\n let optionalFieldsStart = -1;\n if (codewords[codeIndex] === DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD) {\n optionalFieldsStart = codeIndex + 1;\n }\n while (codeIndex < codewords[0]) {\n switch (codewords[codeIndex]) {\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n codeIndex++;\n switch (codewords[codeIndex]) {\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:\n let fileName = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, fileName);\n resultMetadata.setFileName(fileName.toString());\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SENDER:\n let sender = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, sender);\n resultMetadata.setSender(sender.toString());\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:\n let addressee = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, addressee);\n resultMetadata.setAddressee(addressee.toString());\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:\n let segmentCount = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, segmentCount);\n resultMetadata.setSegmentCount(Integer.parseInt(segmentCount.toString()));\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:\n let timestamp = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, timestamp);\n resultMetadata.setTimestamp(Long.parseLong(timestamp.toString()));\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:\n let checksum = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, checksum);\n resultMetadata.setChecksum(Integer.parseInt(checksum.toString()));\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:\n let fileSize = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, fileSize);\n resultMetadata.setFileSize(Long.parseLong(fileSize.toString()));\n break;\n default:\n throw FormatException.getFormatInstance();\n }\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex++;\n resultMetadata.setLastSegment(true);\n break;\n default:\n throw FormatException.getFormatInstance();\n }\n }\n // copy optional fields to additional options\n if (optionalFieldsStart !== -1) {\n let optionalFieldsLength = codeIndex - optionalFieldsStart;\n if (resultMetadata.isLastSegment()) {\n // do not include terminator\n optionalFieldsLength--;\n }\n resultMetadata.setOptionalData(Arrays.copyOfRange(codewords, optionalFieldsStart, optionalFieldsStart + optionalFieldsLength));\n }\n return codeIndex;\n }\n /**\n * Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be\n * encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as\n * well as selected control characters.\n *\n * @param codewords The array of codewords (data + error)\n * @param codeIndex The current index into the codeword array.\n * @param result The decoded data is appended to the result.\n * @return The next index into the codeword array.\n */\n static textCompaction(codewords, codeIndex, result) {\n // 2 character per codeword\n let textCompactionData = new Int32Array((codewords[0] - codeIndex) * 2);\n // Used to hold the byte compaction value if there is a mode shift\n let byteCompactionData = new Int32Array((codewords[0] - codeIndex) * 2);\n let index = 0;\n let end = false;\n while ((codeIndex < codewords[0]) && !end) {\n let code = codewords[codeIndex++];\n if (code < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n textCompactionData[index] = code / 30;\n textCompactionData[index + 1] = code % 30;\n index += 2;\n }\n else {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n // reinitialize text compaction mode to alpha sub mode\n textCompactionData[index++] = DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH;\n break;\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n // The Mode Shift codeword 913 shall cause a temporary\n // switch from Text Compaction mode to Byte Compaction mode.\n // This switch shall be in effect for only the next codeword,\n // after which the mode shall revert to the prevailing sub-mode\n // of the Text Compaction mode. Codeword 913 is only available\n // in Text Compaction mode; its use is described in 5.4.2.4.\n textCompactionData[index] = DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE;\n code = codewords[codeIndex++];\n byteCompactionData[index] = code;\n index++;\n break;\n }\n }\n }\n DecodedBitStreamParser$2.decodeTextCompaction(textCompactionData, byteCompactionData, index, result);\n return codeIndex;\n }\n /**\n * The Text Compaction mode includes all the printable ASCII characters\n * (i.e. values from 32 to 126) and three ASCII control characters: HT or tab\n * (9: e), LF or line feed (10: e), and CR or carriage\n * return (13: e). The Text Compaction mode also includes various latch\n * and shift characters which are used exclusively within the mode. The Text\n * Compaction mode encodes up to 2 characters per codeword. The compaction rules\n * for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode\n * switches are defined in 5.4.2.3.\n *\n * @param textCompactionData The text compaction data.\n * @param byteCompactionData The byte compaction data if there\n * was a mode shift.\n * @param length The size of the text compaction and byte compaction data.\n * @param result The decoded data is appended to the result.\n */\n static decodeTextCompaction(textCompactionData, byteCompactionData, length, result) {\n // Beginning from an initial state of the Alpha sub-mode\n // The default compaction mode for PDF417 in effect at the start of each symbol shall always be Text\n // Compaction mode Alpha sub-mode (alphabetic: uppercase). A latch codeword from another mode to the Text\n // Compaction mode shall always switch to the Text Compaction Alpha sub-mode.\n let subMode = Mode$2.ALPHA;\n let priorToShiftMode = Mode$2.ALPHA;\n let i = 0;\n while (i < length) {\n let subModeCh = textCompactionData[i];\n let ch = /*char*/ '';\n switch (subMode) {\n case Mode$2.ALPHA:\n // Alpha (alphabetic: uppercase)\n if (subModeCh < 26) {\n // Upper case Alpha Character\n // Note: 65 = 'A' ASCII -> there is byte code of symbol\n ch = /*(char)('A' + subModeCh) */ String.fromCharCode(65 + subModeCh);\n }\n else {\n switch (subModeCh) {\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.LL:\n subMode = Mode$2.LOWER;\n break;\n case DecodedBitStreamParser$2.ML:\n subMode = Mode$2.MIXED;\n break;\n case DecodedBitStreamParser$2.PS:\n // Shift to punctuation\n priorToShiftMode = subMode;\n subMode = Mode$2.PUNCT_SHIFT;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append(/*(char)*/ byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.LOWER:\n // Lower (alphabetic: lowercase)\n if (subModeCh < 26) {\n ch = /*(char)('a' + subModeCh)*/ String.fromCharCode(97 + subModeCh);\n }\n else {\n switch (subModeCh) {\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.AS:\n // Shift to alpha\n priorToShiftMode = subMode;\n subMode = Mode$2.ALPHA_SHIFT;\n break;\n case DecodedBitStreamParser$2.ML:\n subMode = Mode$2.MIXED;\n break;\n case DecodedBitStreamParser$2.PS:\n // Shift to punctuation\n priorToShiftMode = subMode;\n subMode = Mode$2.PUNCT_SHIFT;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n // TODO Does this need to use the current character encoding? See other occurrences below\n result.append(/*(char)*/ byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.MIXED:\n // Mixed (punctuation: e)\n if (subModeCh < DecodedBitStreamParser$2.PL) {\n ch = DecodedBitStreamParser$2.MIXED_CHARS[subModeCh];\n }\n else {\n switch (subModeCh) {\n case DecodedBitStreamParser$2.PL:\n subMode = Mode$2.PUNCT;\n break;\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.LL:\n subMode = Mode$2.LOWER;\n break;\n case DecodedBitStreamParser$2.AL:\n subMode = Mode$2.ALPHA;\n break;\n case DecodedBitStreamParser$2.PS:\n // Shift to punctuation\n priorToShiftMode = subMode;\n subMode = Mode$2.PUNCT_SHIFT;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append(/*(char)*/ byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.PUNCT:\n // Punctuation\n if (subModeCh < DecodedBitStreamParser$2.PAL) {\n ch = DecodedBitStreamParser$2.PUNCT_CHARS[subModeCh];\n }\n else {\n switch (subModeCh) {\n case DecodedBitStreamParser$2.PAL:\n subMode = Mode$2.ALPHA;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append(/*(char)*/ byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.ALPHA_SHIFT:\n // Restore sub-mode\n subMode = priorToShiftMode;\n if (subModeCh < 26) {\n ch = /*(char)('A' + subModeCh)*/ String.fromCharCode(65 + subModeCh);\n }\n else {\n switch (subModeCh) {\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.PUNCT_SHIFT:\n // Restore sub-mode\n subMode = priorToShiftMode;\n if (subModeCh < DecodedBitStreamParser$2.PAL) {\n ch = DecodedBitStreamParser$2.PUNCT_CHARS[subModeCh];\n }\n else {\n switch (subModeCh) {\n case DecodedBitStreamParser$2.PAL:\n subMode = Mode$2.ALPHA;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n // PS before Shift-to-Byte is used as a padding character,\n // see 5.4.2.4 of the specification\n result.append(/*(char)*/ byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n }\n // if (ch !== 0) {\n if (ch !== '') {\n // Append decoded character to result\n result.append(ch);\n }\n i++;\n }\n }\n /**\n * Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded.\n * This includes all ASCII characters value 0 to 127 inclusive and provides for international\n * character set support.\n *\n * @param mode The byte compaction mode i.e. 901 or 924\n * @param codewords The array of codewords (data + error)\n * @param encoding Currently active character encoding\n * @param codeIndex The current index into the codeword array.\n * @param result The decoded data is appended to the result.\n * @return The next index into the codeword array.\n */\n static /*int*/ byteCompaction(mode, codewords, encoding, codeIndex, result) {\n let decodedBytes = new ByteArrayOutputStream();\n let count = 0;\n let value = /*long*/ 0;\n let end = false;\n switch (mode) {\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n // Total number of Byte Compaction characters to be encoded\n // is not a multiple of 6\n let byteCompactedCodewords = new Int32Array(6);\n let nextCode = codewords[codeIndex++];\n while ((codeIndex < codewords[0]) && !end) {\n byteCompactedCodewords[count++] = nextCode;\n // Base 900\n value = 900 * value + nextCode;\n nextCode = codewords[codeIndex++];\n // perhaps it should be ok to check only nextCode >= TEXT_COMPACTION_MODE_LATCH\n switch (nextCode) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n default:\n if ((count % 5 === 0) && (count > 0)) {\n // Decode every 5 codewords\n // Convert to Base 256\n for (let j /*int*/ = 0; j < 6; ++j) {\n /* @note\n * JavaScript stores numbers as 64 bits floating point numbers, but all bitwise operations are performed on 32 bits binary numbers.\n * So the next bitwise operation could not be done with simple numbers\n */\n decodedBytes.write(/*(byte)*/ Number(createBigInt(value) >> createBigInt(8 * (5 - j))));\n }\n value = 0;\n count = 0;\n }\n break;\n }\n }\n // if the end of all codewords is reached the last codeword needs to be added\n if (codeIndex === codewords[0] && nextCode < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n byteCompactedCodewords[count++] = nextCode;\n }\n // If Byte Compaction mode is invoked with codeword 901,\n // the last group of codewords is interpreted directly\n // as one byte per codeword, without compaction.\n for (let i /*int*/ = 0; i < count; i++) {\n decodedBytes.write(/*(byte)*/ byteCompactedCodewords[i]);\n }\n break;\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n // Total number of Byte Compaction characters to be encoded\n // is an integer multiple of 6\n while (codeIndex < codewords[0] && !end) {\n let code = codewords[codeIndex++];\n if (code < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n count++;\n // Base 900\n value = 900 * value + code;\n }\n else {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n }\n }\n if ((count % 5 === 0) && (count > 0)) {\n // Decode every 5 codewords\n // Convert to Base 256\n /* @note\n * JavaScript stores numbers as 64 bits floating point numbers, but all bitwise operations are performed on 32 bits binary numbers.\n * So the next bitwise operation could not be done with simple numbers\n */\n for (let j /*int*/ = 0; j < 6; ++j) {\n decodedBytes.write(/*(byte)*/ Number(createBigInt(value) >> createBigInt(8 * (5 - j))));\n }\n value = 0;\n count = 0;\n }\n }\n break;\n }\n result.append(StringEncoding.decode(decodedBytes.toByteArray(), encoding));\n return codeIndex;\n }\n /**\n * Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings.\n *\n * @param codewords The array of codewords (data + error)\n * @param codeIndex The current index into the codeword array.\n * @param result The decoded data is appended to the result.\n * @return The next index into the codeword array.\n *\n * @throws FormatException\n */\n static numericCompaction(codewords, codeIndex /*int*/, result) {\n let count = 0;\n let end = false;\n let numericCodewords = new Int32Array(DecodedBitStreamParser$2.MAX_NUMERIC_CODEWORDS);\n while (codeIndex < codewords[0] && !end) {\n let code = codewords[codeIndex++];\n if (codeIndex === codewords[0]) {\n end = true;\n }\n if (code < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n numericCodewords[count] = code;\n count++;\n }\n else {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n }\n }\n if ((count % DecodedBitStreamParser$2.MAX_NUMERIC_CODEWORDS === 0 || code === DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH || end) && count > 0) {\n // Re-invoking Numeric Compaction mode (by using codeword 902\n // while in Numeric Compaction mode) serves to terminate the\n // current Numeric Compaction mode grouping as described in 5.4.4.2,\n // and then to start a new one grouping.\n result.append(DecodedBitStreamParser$2.decodeBase900toBase10(numericCodewords, count));\n count = 0;\n }\n }\n return codeIndex;\n }\n /**\n * Convert a list of Numeric Compacted codewords from Base 900 to Base 10.\n *\n * @param codewords The array of codewords\n * @param count The number of codewords\n * @return The decoded string representing the Numeric data.\n *\n * EXAMPLE\n * Encode the fifteen digit numeric string 000213298174000\n * Prefix the numeric string with a 1 and set the initial value of\n * t = 1 000 213 298 174 000\n * Calculate codeword 0\n * d0 = 1 000 213 298 174 000 mod 900 = 200\n *\n * t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082\n * Calculate codeword 1\n * d1 = 1 111 348 109 082 mod 900 = 282\n *\n * t = 1 111 348 109 082 div 900 = 1 234 831 232\n * Calculate codeword 2\n * d2 = 1 234 831 232 mod 900 = 632\n *\n * t = 1 234 831 232 div 900 = 1 372 034\n * Calculate codeword 3\n * d3 = 1 372 034 mod 900 = 434\n *\n * t = 1 372 034 div 900 = 1 524\n * Calculate codeword 4\n * d4 = 1 524 mod 900 = 624\n *\n * t = 1 524 div 900 = 1\n * Calculate codeword 5\n * d5 = 1 mod 900 = 1\n * t = 1 div 900 = 0\n * Codeword sequence is: 1, 624, 434, 632, 282, 200\n *\n * Decode the above codewords involves\n * 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 +\n * 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000\n *\n * Remove leading 1 => Result is 000213298174000\n *\n * @throws FormatException\n */\n static decodeBase900toBase10(codewords, count) {\n let result = createBigInt(0);\n for (let i /*int*/ = 0; i < count; i++) {\n result += DecodedBitStreamParser$2.EXP900[count - i - 1] * createBigInt(codewords[i]);\n }\n let resultString = result.toString();\n if (resultString.charAt(0) !== '1') {\n throw new FormatException();\n }\n return resultString.substring(1);\n }\n }\n DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH = 900;\n DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH = 901;\n DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH = 902;\n DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6 = 924;\n DecodedBitStreamParser$2.ECI_USER_DEFINED = 925;\n DecodedBitStreamParser$2.ECI_GENERAL_PURPOSE = 926;\n DecodedBitStreamParser$2.ECI_CHARSET = 927;\n DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK = 928;\n DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD = 923;\n DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR = 922;\n DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE = 913;\n DecodedBitStreamParser$2.MAX_NUMERIC_CODEWORDS = 15;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME = 0;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT = 1;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP = 2;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SENDER = 3;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE = 4;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE = 5;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM = 6;\n DecodedBitStreamParser$2.PL = 25;\n DecodedBitStreamParser$2.LL = 27;\n DecodedBitStreamParser$2.AS = 27;\n DecodedBitStreamParser$2.ML = 28;\n DecodedBitStreamParser$2.AL = 28;\n DecodedBitStreamParser$2.PS = 29;\n DecodedBitStreamParser$2.PAL = 29;\n DecodedBitStreamParser$2.PUNCT_CHARS = ';<>@[\\\\]_`~!\\r\\t,:\\n-.$/\"|*()?{}\\'';\n DecodedBitStreamParser$2.MIXED_CHARS = '0123456789&\\r\\t,:#-.$/+%*=^';\n /**\n * Table containing values for the exponent of 900.\n * This is used in the numeric compaction decode algorithm.\n */\n DecodedBitStreamParser$2.EXP900 = getBigIntConstructor() ? getEXP900() : [];\n DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS = 2;\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.ArrayList;\n // import java.util.Collection;\n // import java.util.Formatter;\n // import java.util.List;\n /**\n * @author Guenther Grau\n */\n /*public final*/ class PDF417ScanningDecoder {\n constructor() { }\n /**\n * @TODO don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern\n *\n * columns. That way width can be deducted from the pattern column.\n * This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider\n * than it should be. This can happen if the scanner used a bad blackpoint.\n *\n * @param BitMatrix\n * @param image\n * @param ResultPoint\n * @param imageTopLeft\n * @param ResultPoint\n * @param imageBottomLeft\n * @param ResultPoint\n * @param imageTopRight\n * @param ResultPoint\n * @param imageBottomRight\n * @param int\n * @param minCodewordWidth\n * @param int\n * @param maxCodewordWidth\n *\n * @throws NotFoundException\n * @throws FormatException\n * @throws ChecksumException\n */\n static decode(image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth, maxCodewordWidth) {\n let boundingBox = new BoundingBox(image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight);\n let leftRowIndicatorColumn = null;\n let rightRowIndicatorColumn = null;\n let detectionResult;\n for (let firstPass /*boolean*/ = true;; firstPass = false) {\n if (imageTopLeft != null) {\n leftRowIndicatorColumn = PDF417ScanningDecoder.getRowIndicatorColumn(image, boundingBox, imageTopLeft, true, minCodewordWidth, maxCodewordWidth);\n }\n if (imageTopRight != null) {\n rightRowIndicatorColumn = PDF417ScanningDecoder.getRowIndicatorColumn(image, boundingBox, imageTopRight, false, minCodewordWidth, maxCodewordWidth);\n }\n detectionResult = PDF417ScanningDecoder.merge(leftRowIndicatorColumn, rightRowIndicatorColumn);\n if (detectionResult == null) {\n throw NotFoundException.getNotFoundInstance();\n }\n let resultBox = detectionResult.getBoundingBox();\n if (firstPass && resultBox != null &&\n (resultBox.getMinY() < boundingBox.getMinY() || resultBox.getMaxY() > boundingBox.getMaxY())) {\n boundingBox = resultBox;\n }\n else {\n break;\n }\n }\n detectionResult.setBoundingBox(boundingBox);\n let maxBarcodeColumn = detectionResult.getBarcodeColumnCount() + 1;\n detectionResult.setDetectionResultColumn(0, leftRowIndicatorColumn);\n detectionResult.setDetectionResultColumn(maxBarcodeColumn, rightRowIndicatorColumn);\n let leftToRight = leftRowIndicatorColumn != null;\n for (let barcodeColumnCount /*int*/ = 1; barcodeColumnCount <= maxBarcodeColumn; barcodeColumnCount++) {\n let barcodeColumn = leftToRight ? barcodeColumnCount : maxBarcodeColumn - barcodeColumnCount;\n if (detectionResult.getDetectionResultColumn(barcodeColumn) !== /* null */ undefined) {\n // This will be the case for the opposite row indicator column, which doesn't need to be decoded again.\n continue;\n }\n let detectionResultColumn;\n if (barcodeColumn === 0 || barcodeColumn === maxBarcodeColumn) {\n detectionResultColumn = new DetectionResultRowIndicatorColumn(boundingBox, barcodeColumn === 0);\n }\n else {\n detectionResultColumn = new DetectionResultColumn(boundingBox);\n }\n detectionResult.setDetectionResultColumn(barcodeColumn, detectionResultColumn);\n let startColumn = -1;\n let previousStartColumn = startColumn;\n // TODO start at a row for which we know the start position, then detect upwards and downwards from there.\n for (let imageRow /*int*/ = boundingBox.getMinY(); imageRow <= boundingBox.getMaxY(); imageRow++) {\n startColumn = PDF417ScanningDecoder.getStartColumn(detectionResult, barcodeColumn, imageRow, leftToRight);\n if (startColumn < 0 || startColumn > boundingBox.getMaxX()) {\n if (previousStartColumn === -1) {\n continue;\n }\n startColumn = previousStartColumn;\n }\n let codeword = PDF417ScanningDecoder.detectCodeword(image, boundingBox.getMinX(), boundingBox.getMaxX(), leftToRight, startColumn, imageRow, minCodewordWidth, maxCodewordWidth);\n if (codeword != null) {\n detectionResultColumn.setCodeword(imageRow, codeword);\n previousStartColumn = startColumn;\n minCodewordWidth = Math.min(minCodewordWidth, codeword.getWidth());\n maxCodewordWidth = Math.max(maxCodewordWidth, codeword.getWidth());\n }\n }\n }\n return PDF417ScanningDecoder.createDecoderResult(detectionResult);\n }\n /**\n *\n * @param leftRowIndicatorColumn\n * @param rightRowIndicatorColumn\n *\n * @throws NotFoundException\n */\n static merge(leftRowIndicatorColumn, rightRowIndicatorColumn) {\n if (leftRowIndicatorColumn == null && rightRowIndicatorColumn == null) {\n return null;\n }\n let barcodeMetadata = PDF417ScanningDecoder.getBarcodeMetadata(leftRowIndicatorColumn, rightRowIndicatorColumn);\n if (barcodeMetadata == null) {\n return null;\n }\n let boundingBox = BoundingBox.merge(PDF417ScanningDecoder.adjustBoundingBox(leftRowIndicatorColumn), PDF417ScanningDecoder.adjustBoundingBox(rightRowIndicatorColumn));\n return new DetectionResult(barcodeMetadata, boundingBox);\n }\n /**\n *\n * @param rowIndicatorColumn\n *\n * @throws NotFoundException\n */\n static adjustBoundingBox(rowIndicatorColumn) {\n if (rowIndicatorColumn == null) {\n return null;\n }\n let rowHeights = rowIndicatorColumn.getRowHeights();\n if (rowHeights == null) {\n return null;\n }\n let maxRowHeight = PDF417ScanningDecoder.getMax(rowHeights);\n let missingStartRows = 0;\n for (let rowHeight /*int*/ of rowHeights) {\n missingStartRows += maxRowHeight - rowHeight;\n if (rowHeight > 0) {\n break;\n }\n }\n let codewords = rowIndicatorColumn.getCodewords();\n for (let row /*int*/ = 0; missingStartRows > 0 && codewords[row] == null; row++) {\n missingStartRows--;\n }\n let missingEndRows = 0;\n for (let row /*int*/ = rowHeights.length - 1; row >= 0; row--) {\n missingEndRows += maxRowHeight - rowHeights[row];\n if (rowHeights[row] > 0) {\n break;\n }\n }\n for (let row /*int*/ = codewords.length - 1; missingEndRows > 0 && codewords[row] == null; row--) {\n missingEndRows--;\n }\n return rowIndicatorColumn.getBoundingBox().addMissingRows(missingStartRows, missingEndRows, rowIndicatorColumn.isLeft());\n }\n static getMax(values) {\n let maxValue = -1;\n for (let value /*int*/ of values) {\n maxValue = Math.max(maxValue, value);\n }\n return maxValue;\n }\n static getBarcodeMetadata(leftRowIndicatorColumn, rightRowIndicatorColumn) {\n let leftBarcodeMetadata;\n if (leftRowIndicatorColumn == null ||\n (leftBarcodeMetadata = leftRowIndicatorColumn.getBarcodeMetadata()) == null) {\n return rightRowIndicatorColumn == null ? null : rightRowIndicatorColumn.getBarcodeMetadata();\n }\n let rightBarcodeMetadata;\n if (rightRowIndicatorColumn == null ||\n (rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata()) == null) {\n return leftBarcodeMetadata;\n }\n if (leftBarcodeMetadata.getColumnCount() !== rightBarcodeMetadata.getColumnCount() &&\n leftBarcodeMetadata.getErrorCorrectionLevel() !== rightBarcodeMetadata.getErrorCorrectionLevel() &&\n leftBarcodeMetadata.getRowCount() !== rightBarcodeMetadata.getRowCount()) {\n return null;\n }\n return leftBarcodeMetadata;\n }\n static getRowIndicatorColumn(image, boundingBox, startPoint, leftToRight, minCodewordWidth, maxCodewordWidth) {\n let rowIndicatorColumn = new DetectionResultRowIndicatorColumn(boundingBox, leftToRight);\n for (let i /*int*/ = 0; i < 2; i++) {\n let increment = i === 0 ? 1 : -1;\n let startColumn = Math.trunc(Math.trunc(startPoint.getX()));\n for (let imageRow /*int*/ = Math.trunc(Math.trunc(startPoint.getY())); imageRow <= boundingBox.getMaxY() &&\n imageRow >= boundingBox.getMinY(); imageRow += increment) {\n let codeword = PDF417ScanningDecoder.detectCodeword(image, 0, image.getWidth(), leftToRight, startColumn, imageRow, minCodewordWidth, maxCodewordWidth);\n if (codeword != null) {\n rowIndicatorColumn.setCodeword(imageRow, codeword);\n if (leftToRight) {\n startColumn = codeword.getStartX();\n }\n else {\n startColumn = codeword.getEndX();\n }\n }\n }\n }\n return rowIndicatorColumn;\n }\n /**\n *\n * @param detectionResult\n * @param BarcodeValue\n * @param param2\n * @param param3\n * @param barcodeMatrix\n *\n * @throws NotFoundException\n */\n static adjustCodewordCount(detectionResult, barcodeMatrix) {\n let barcodeMatrix01 = barcodeMatrix[0][1];\n let numberOfCodewords = barcodeMatrix01.getValue();\n let calculatedNumberOfCodewords = detectionResult.getBarcodeColumnCount() *\n detectionResult.getBarcodeRowCount() -\n PDF417ScanningDecoder.getNumberOfECCodeWords(detectionResult.getBarcodeECLevel());\n if (numberOfCodewords.length === 0) {\n if (calculatedNumberOfCodewords < 1 || calculatedNumberOfCodewords > PDF417Common.MAX_CODEWORDS_IN_BARCODE) {\n throw NotFoundException.getNotFoundInstance();\n }\n barcodeMatrix01.setValue(calculatedNumberOfCodewords);\n }\n else if (numberOfCodewords[0] !== calculatedNumberOfCodewords) {\n // The calculated one is more reliable as it is derived from the row indicator columns\n barcodeMatrix01.setValue(calculatedNumberOfCodewords);\n }\n }\n /**\n *\n * @param detectionResult\n *\n * @throws FormatException\n * @throws ChecksumException\n * @throws NotFoundException\n */\n static createDecoderResult(detectionResult) {\n let barcodeMatrix = PDF417ScanningDecoder.createBarcodeMatrix(detectionResult);\n PDF417ScanningDecoder.adjustCodewordCount(detectionResult, barcodeMatrix);\n let erasures /*Collection*/ = new Array();\n let codewords = new Int32Array(detectionResult.getBarcodeRowCount() * detectionResult.getBarcodeColumnCount());\n let ambiguousIndexValuesList = /*List*/ [];\n let ambiguousIndexesList = /*Collection*/ new Array();\n for (let row /*int*/ = 0; row < detectionResult.getBarcodeRowCount(); row++) {\n for (let column /*int*/ = 0; column < detectionResult.getBarcodeColumnCount(); column++) {\n let values = barcodeMatrix[row][column + 1].getValue();\n let codewordIndex = row * detectionResult.getBarcodeColumnCount() + column;\n if (values.length === 0) {\n erasures.push(codewordIndex);\n }\n else if (values.length === 1) {\n codewords[codewordIndex] = values[0];\n }\n else {\n ambiguousIndexesList.push(codewordIndex);\n ambiguousIndexValuesList.push(values);\n }\n }\n }\n let ambiguousIndexValues = new Array(ambiguousIndexValuesList.length);\n for (let i /*int*/ = 0; i < ambiguousIndexValues.length; i++) {\n ambiguousIndexValues[i] = ambiguousIndexValuesList[i];\n }\n return PDF417ScanningDecoder.createDecoderResultFromAmbiguousValues(detectionResult.getBarcodeECLevel(), codewords, PDF417Common.toIntArray(erasures), PDF417Common.toIntArray(ambiguousIndexesList), ambiguousIndexValues);\n }\n /**\n * This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The\n * current error correction implementation doesn't deal with erasures very well, so it's better to provide a value\n * for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of\n * the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the\n * ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes,\n * so decoding the normal barcodes is not affected by this.\n *\n * @param erasureArray contains the indexes of erasures\n * @param ambiguousIndexes array with the indexes that have more than one most likely value\n * @param ambiguousIndexValues two dimensional array that contains the ambiguous values. The first dimension must\n * be the same length as the ambiguousIndexes array\n *\n * @throws FormatException\n * @throws ChecksumException\n */\n static createDecoderResultFromAmbiguousValues(ecLevel, codewords, erasureArray, ambiguousIndexes, ambiguousIndexValues) {\n let ambiguousIndexCount = new Int32Array(ambiguousIndexes.length);\n let tries = 100;\n while (tries-- > 0) {\n for (let i /*int*/ = 0; i < ambiguousIndexCount.length; i++) {\n codewords[ambiguousIndexes[i]] = ambiguousIndexValues[i][ambiguousIndexCount[i]];\n }\n try {\n return PDF417ScanningDecoder.decodeCodewords(codewords, ecLevel, erasureArray);\n }\n catch (err) {\n let ignored = err instanceof ChecksumException;\n if (!ignored) {\n throw err;\n }\n }\n if (ambiguousIndexCount.length === 0) {\n throw ChecksumException.getChecksumInstance();\n }\n for (let i /*int*/ = 0; i < ambiguousIndexCount.length; i++) {\n if (ambiguousIndexCount[i] < ambiguousIndexValues[i].length - 1) {\n ambiguousIndexCount[i]++;\n break;\n }\n else {\n ambiguousIndexCount[i] = 0;\n if (i === ambiguousIndexCount.length - 1) {\n throw ChecksumException.getChecksumInstance();\n }\n }\n }\n }\n throw ChecksumException.getChecksumInstance();\n }\n static createBarcodeMatrix(detectionResult) {\n // let barcodeMatrix: BarcodeValue[][] =\n // new BarcodeValue[detectionResult.getBarcodeRowCount()][detectionResult.getBarcodeColumnCount() + 2];\n let barcodeMatrix = Array.from({ length: detectionResult.getBarcodeRowCount() }, () => new Array(detectionResult.getBarcodeColumnCount() + 2));\n for (let row /*int*/ = 0; row < barcodeMatrix.length; row++) {\n for (let column /*int*/ = 0; column < barcodeMatrix[row].length; column++) {\n barcodeMatrix[row][column] = new BarcodeValue();\n }\n }\n let column = 0;\n for (let detectionResultColumn /*DetectionResultColumn*/ of detectionResult.getDetectionResultColumns()) {\n if (detectionResultColumn != null) {\n for (let codeword /*Codeword*/ of detectionResultColumn.getCodewords()) {\n if (codeword != null) {\n let rowNumber = codeword.getRowNumber();\n if (rowNumber >= 0) {\n if (rowNumber >= barcodeMatrix.length) {\n // We have more rows than the barcode metadata allows for, ignore them.\n continue;\n }\n barcodeMatrix[rowNumber][column].setValue(codeword.getValue());\n }\n }\n }\n }\n column++;\n }\n return barcodeMatrix;\n }\n static isValidBarcodeColumn(detectionResult, barcodeColumn) {\n return barcodeColumn >= 0 && barcodeColumn <= detectionResult.getBarcodeColumnCount() + 1;\n }\n static getStartColumn(detectionResult, barcodeColumn, imageRow, leftToRight) {\n let offset = leftToRight ? 1 : -1;\n let codeword = null;\n if (PDF417ScanningDecoder.isValidBarcodeColumn(detectionResult, barcodeColumn - offset)) {\n codeword = detectionResult.getDetectionResultColumn(barcodeColumn - offset).getCodeword(imageRow);\n }\n if (codeword != null) {\n return leftToRight ? codeword.getEndX() : codeword.getStartX();\n }\n codeword = detectionResult.getDetectionResultColumn(barcodeColumn).getCodewordNearby(imageRow);\n if (codeword != null) {\n return leftToRight ? codeword.getStartX() : codeword.getEndX();\n }\n if (PDF417ScanningDecoder.isValidBarcodeColumn(detectionResult, barcodeColumn - offset)) {\n codeword = detectionResult.getDetectionResultColumn(barcodeColumn - offset).getCodewordNearby(imageRow);\n }\n if (codeword != null) {\n return leftToRight ? codeword.getEndX() : codeword.getStartX();\n }\n let skippedColumns = 0;\n while (PDF417ScanningDecoder.isValidBarcodeColumn(detectionResult, barcodeColumn - offset)) {\n barcodeColumn -= offset;\n for (let previousRowCodeword /*Codeword*/ of detectionResult.getDetectionResultColumn(barcodeColumn).getCodewords()) {\n if (previousRowCodeword != null) {\n return (leftToRight ? previousRowCodeword.getEndX() : previousRowCodeword.getStartX()) +\n offset *\n skippedColumns *\n (previousRowCodeword.getEndX() - previousRowCodeword.getStartX());\n }\n }\n skippedColumns++;\n }\n return leftToRight ? detectionResult.getBoundingBox().getMinX() : detectionResult.getBoundingBox().getMaxX();\n }\n static detectCodeword(image, minColumn, maxColumn, leftToRight, startColumn, imageRow, minCodewordWidth, maxCodewordWidth) {\n startColumn = PDF417ScanningDecoder.adjustCodewordStartColumn(image, minColumn, maxColumn, leftToRight, startColumn, imageRow);\n // we usually know fairly exact now how long a codeword is. We should provide minimum and maximum expected length\n // and try to adjust the read pixels, e.g. remove single pixel errors or try to cut off exceeding pixels.\n // min and maxCodewordWidth should not be used as they are calculated for the whole barcode an can be inaccurate\n // for the current position\n let moduleBitCount = PDF417ScanningDecoder.getModuleBitCount(image, minColumn, maxColumn, leftToRight, startColumn, imageRow);\n if (moduleBitCount == null) {\n return null;\n }\n let endColumn;\n let codewordBitCount = MathUtils.sum(moduleBitCount);\n if (leftToRight) {\n endColumn = startColumn + codewordBitCount;\n }\n else {\n for (let i /*int*/ = 0; i < moduleBitCount.length / 2; i++) {\n let tmpCount = moduleBitCount[i];\n moduleBitCount[i] = moduleBitCount[moduleBitCount.length - 1 - i];\n moduleBitCount[moduleBitCount.length - 1 - i] = tmpCount;\n }\n endColumn = startColumn;\n startColumn = endColumn - codewordBitCount;\n }\n // TODO implement check for width and correction of black and white bars\n // use start (and maybe stop pattern) to determine if black bars are wider than white bars. If so, adjust.\n // should probably done only for codewords with a lot more than 17 bits.\n // The following fixes 10-1.png, which has wide black bars and small white bars\n // for (let i /*int*/ = 0; i < moduleBitCount.length; i++) {\n // if (i % 2 === 0) {\n // moduleBitCount[i]--;\n // } else {\n // moduleBitCount[i]++;\n // }\n // }\n // We could also use the width of surrounding codewords for more accurate results, but this seems\n // sufficient for now\n if (!PDF417ScanningDecoder.checkCodewordSkew(codewordBitCount, minCodewordWidth, maxCodewordWidth)) {\n // We could try to use the startX and endX position of the codeword in the same column in the previous row,\n // create the bit count from it and normalize it to 8. This would help with single pixel errors.\n return null;\n }\n let decodedValue = PDF417CodewordDecoder.getDecodedValue(moduleBitCount);\n let codeword = PDF417Common.getCodeword(decodedValue);\n if (codeword === -1) {\n return null;\n }\n return new Codeword(startColumn, endColumn, PDF417ScanningDecoder.getCodewordBucketNumber(decodedValue), codeword);\n }\n static getModuleBitCount(image, minColumn, maxColumn, leftToRight, startColumn, imageRow) {\n let imageColumn = startColumn;\n let moduleBitCount = new Int32Array(8);\n let moduleNumber = 0;\n let increment = leftToRight ? 1 : -1;\n let previousPixelValue = leftToRight;\n while ((leftToRight ? imageColumn < maxColumn : imageColumn >= minColumn) &&\n moduleNumber < moduleBitCount.length) {\n if (image.get(imageColumn, imageRow) === previousPixelValue) {\n moduleBitCount[moduleNumber]++;\n imageColumn += increment;\n }\n else {\n moduleNumber++;\n previousPixelValue = !previousPixelValue;\n }\n }\n if (moduleNumber === moduleBitCount.length ||\n ((imageColumn === (leftToRight ? maxColumn : minColumn)) &&\n moduleNumber === moduleBitCount.length - 1)) {\n return moduleBitCount;\n }\n return null;\n }\n static getNumberOfECCodeWords(barcodeECLevel) {\n return 2 << barcodeECLevel;\n }\n static adjustCodewordStartColumn(image, minColumn, maxColumn, leftToRight, codewordStartColumn, imageRow) {\n let correctedStartColumn = codewordStartColumn;\n let increment = leftToRight ? -1 : 1;\n // there should be no black pixels before the start column. If there are, then we need to start earlier.\n for (let i /*int*/ = 0; i < 2; i++) {\n while ((leftToRight ? correctedStartColumn >= minColumn : correctedStartColumn < maxColumn) &&\n leftToRight === image.get(correctedStartColumn, imageRow)) {\n if (Math.abs(codewordStartColumn - correctedStartColumn) > PDF417ScanningDecoder.CODEWORD_SKEW_SIZE) {\n return codewordStartColumn;\n }\n correctedStartColumn += increment;\n }\n increment = -increment;\n leftToRight = !leftToRight;\n }\n return correctedStartColumn;\n }\n static checkCodewordSkew(codewordSize, minCodewordWidth, maxCodewordWidth) {\n return minCodewordWidth - PDF417ScanningDecoder.CODEWORD_SKEW_SIZE <= codewordSize &&\n codewordSize <= maxCodewordWidth + PDF417ScanningDecoder.CODEWORD_SKEW_SIZE;\n }\n /**\n * @throws FormatException,\n * @throws ChecksumException\n */\n static decodeCodewords(codewords, ecLevel, erasures) {\n if (codewords.length === 0) {\n throw FormatException.getFormatInstance();\n }\n let numECCodewords = 1 << (ecLevel + 1);\n let correctedErrorsCount = PDF417ScanningDecoder.correctErrors(codewords, erasures, numECCodewords);\n PDF417ScanningDecoder.verifyCodewordCount(codewords, numECCodewords);\n // Decode the codewords\n let decoderResult = DecodedBitStreamParser$2.decode(codewords, '' + ecLevel);\n decoderResult.setErrorsCorrected(correctedErrorsCount);\n decoderResult.setErasures(erasures.length);\n return decoderResult;\n }\n /**\n *

Given data and error-correction codewords received, possibly corrupted by errors, attempts to\n * correct the errors in-place.

\n *\n * @param codewords data and error correction codewords\n * @param erasures positions of any known erasures\n * @param numECCodewords number of error correction codewords that are available in codewords\n * @throws ChecksumException if error correction fails\n */\n static correctErrors(codewords, erasures, numECCodewords) {\n if (erasures != null &&\n erasures.length > numECCodewords / 2 + PDF417ScanningDecoder.MAX_ERRORS ||\n numECCodewords < 0 ||\n numECCodewords > PDF417ScanningDecoder.MAX_EC_CODEWORDS) {\n // Too many errors or EC Codewords is corrupted\n throw ChecksumException.getChecksumInstance();\n }\n return PDF417ScanningDecoder.errorCorrection.decode(codewords, numECCodewords, erasures);\n }\n /**\n * Verify that all is OK with the codeword array.\n * @throws FormatException\n */\n static verifyCodewordCount(codewords, numECCodewords) {\n if (codewords.length < 4) {\n // Codeword array size should be at least 4 allowing for\n // Count CW, At least one Data CW, Error Correction CW, Error Correction CW\n throw FormatException.getFormatInstance();\n }\n // The first codeword, the Symbol Length Descriptor, shall always encode the total number of data\n // codewords in the symbol, including the Symbol Length Descriptor itself, data codewords and pad\n // codewords, but excluding the number of error correction codewords.\n let numberOfCodewords = codewords[0];\n if (numberOfCodewords > codewords.length) {\n throw FormatException.getFormatInstance();\n }\n if (numberOfCodewords === 0) {\n // Reset to the length of the array - 8 (Allow for at least level 3 Error Correction (8 Error Codewords)\n if (numECCodewords < codewords.length) {\n codewords[0] = codewords.length - numECCodewords;\n }\n else {\n throw FormatException.getFormatInstance();\n }\n }\n }\n static getBitCountForCodeword(codeword) {\n let result = new Int32Array(8);\n let previousValue = 0;\n let i = result.length - 1;\n while (true) {\n if ((codeword & 0x1) !== previousValue) {\n previousValue = codeword & 0x1;\n i--;\n if (i < 0) {\n break;\n }\n }\n result[i]++;\n codeword >>= 1;\n }\n return result;\n }\n static getCodewordBucketNumber(codeword) {\n if (codeword instanceof Int32Array) {\n return this.getCodewordBucketNumber_Int32Array(codeword);\n }\n return this.getCodewordBucketNumber_number(codeword);\n }\n static getCodewordBucketNumber_number(codeword) {\n return PDF417ScanningDecoder.getCodewordBucketNumber(PDF417ScanningDecoder.getBitCountForCodeword(codeword));\n }\n static getCodewordBucketNumber_Int32Array(moduleBitCount) {\n return (moduleBitCount[0] - moduleBitCount[2] + moduleBitCount[4] - moduleBitCount[6] + 9) % 9;\n }\n static toString(barcodeMatrix) {\n let formatter = new Formatter();\n // try (let formatter = new Formatter()) {\n for (let row /*int*/ = 0; row < barcodeMatrix.length; row++) {\n formatter.format('Row %2d: ', row);\n for (let column /*int*/ = 0; column < barcodeMatrix[row].length; column++) {\n let barcodeValue = barcodeMatrix[row][column];\n if (barcodeValue.getValue().length === 0) {\n formatter.format(' ', null);\n }\n else {\n formatter.format('%4d(%2d)', barcodeValue.getValue()[0], barcodeValue.getConfidence(barcodeValue.getValue()[0]));\n }\n }\n formatter.format('%n');\n }\n return formatter.toString();\n // }\n }\n }\n /*final*/ PDF417ScanningDecoder.CODEWORD_SKEW_SIZE = 2;\n /*final*/ PDF417ScanningDecoder.MAX_ERRORS = 3;\n /*final*/ PDF417ScanningDecoder.MAX_EC_CODEWORDS = 512;\n /*final*/ PDF417ScanningDecoder.errorCorrection = new ErrorCorrection();\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // import java.util.ArrayList;\n // import java.util.List;\n // import java.util.Map;\n /**\n * This implementation can detect and decode PDF417 codes in an image.\n *\n * @author Guenther Grau\n */\n /*public final*/ class PDF417Reader {\n // private static /*final Result[]*/ EMPTY_RESULT_ARRAY: Result[] = new Result([0]);\n /**\n * Locates and decodes a PDF417 code in an image.\n *\n * @return a String representing the content encoded by the PDF417 code\n * @throws NotFoundException if a PDF417 code cannot be found,\n * @throws FormatException if a PDF417 cannot be decoded\n * @throws ChecksumException\n */\n // @Override\n decode(image, hints = null) {\n let result = PDF417Reader.decode(image, hints, false);\n if (result == null || result.length === 0 || result[0] == null) {\n throw NotFoundException.getNotFoundInstance();\n }\n return result[0];\n }\n /**\n *\n * @param BinaryBitmap\n * @param image\n * @throws NotFoundException\n */\n // @Override\n decodeMultiple(image, hints = null) {\n try {\n return PDF417Reader.decode(image, hints, true);\n }\n catch (ignored) {\n if (ignored instanceof FormatException || ignored instanceof ChecksumException) {\n throw NotFoundException.getNotFoundInstance();\n }\n throw ignored;\n }\n }\n /**\n *\n * @param image\n * @param hints\n * @param multiple\n *\n * @throws NotFoundException\n * @throws FormatExceptionß\n * @throws ChecksumException\n */\n static decode(image, hints, multiple) {\n const results = new Array();\n const detectorResult = Detector$3.detectMultiple(image, hints, multiple);\n for (const points of detectorResult.getPoints()) {\n const decoderResult = PDF417ScanningDecoder.decode(detectorResult.getBits(), points[4], points[5], points[6], points[7], PDF417Reader.getMinCodewordWidth(points), PDF417Reader.getMaxCodewordWidth(points));\n const result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), undefined, points, BarcodeFormat$1.PDF_417);\n result.putMetadata(ResultMetadataType$1.ERROR_CORRECTION_LEVEL, decoderResult.getECLevel());\n const pdf417ResultMetadata = decoderResult.getOther();\n if (pdf417ResultMetadata != null) {\n result.putMetadata(ResultMetadataType$1.PDF417_EXTRA_METADATA, pdf417ResultMetadata);\n }\n results.push(result);\n }\n return results.map(x => x);\n }\n static getMaxWidth(p1, p2) {\n if (p1 == null || p2 == null) {\n return 0;\n }\n return Math.trunc(Math.abs(p1.getX() - p2.getX()));\n }\n static getMinWidth(p1, p2) {\n if (p1 == null || p2 == null) {\n return Integer.MAX_VALUE;\n }\n return Math.trunc(Math.abs(p1.getX() - p2.getX()));\n }\n static getMaxCodewordWidth(p) {\n return Math.floor(Math.max(Math.max(PDF417Reader.getMaxWidth(p[0], p[4]), PDF417Reader.getMaxWidth(p[6], p[2]) * PDF417Common.MODULES_IN_CODEWORD /\n PDF417Common.MODULES_IN_STOP_PATTERN), Math.max(PDF417Reader.getMaxWidth(p[1], p[5]), PDF417Reader.getMaxWidth(p[7], p[3]) * PDF417Common.MODULES_IN_CODEWORD /\n PDF417Common.MODULES_IN_STOP_PATTERN)));\n }\n static getMinCodewordWidth(p) {\n return Math.floor(Math.min(Math.min(PDF417Reader.getMinWidth(p[0], p[4]), PDF417Reader.getMinWidth(p[6], p[2]) * PDF417Common.MODULES_IN_CODEWORD /\n PDF417Common.MODULES_IN_STOP_PATTERN), Math.min(PDF417Reader.getMinWidth(p[1], p[5]), PDF417Reader.getMinWidth(p[7], p[3]) * PDF417Common.MODULES_IN_CODEWORD /\n PDF417Common.MODULES_IN_STOP_PATTERN)));\n }\n // @Override\n reset() {\n // nothing needs to be reset\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class ReaderException extends Exception {\n }\n ReaderException.kind = 'ReaderException';\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing {*/\n /**\n * MultiFormatReader is a convenience class and the main entry point into the library for most uses.\n * By default it attempts to decode all barcode formats that the library supports. Optionally, you\n * can provide a hints object to request different behavior, for example only decoding QR codes.\n *\n * @author Sean Owen\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class MultiFormatReader {\n /**\n * Creates an instance of this class\n * \n * @param {Boolean} verbose if 'true' logs will be dumped to console, otherwise hidden.\n * @param hints The hints to use, clearing the previous state.\n */\n constructor(verbose, hints) {\n this.verbose = (verbose === true);\n if (hints) {\n this.setHints(hints);\n }\n }\n /**\n * This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it\n * passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly.\n * Use setHints() followed by decodeWithState() for continuous scan applications.\n *\n * @param image The pixel data to decode\n * @return The contents of the image\n *\n * @throws NotFoundException Any errors which occurred\n */\n /*@Override*/\n // public decode(image: BinaryBitmap): Result {\n // setHints(null)\n // return decodeInternal(image)\n // }\n /**\n * Decode an image using the hints provided. Does not honor existing state.\n *\n * @param image The pixel data to decode\n * @param hints The hints to use, clearing the previous state.\n * @return The contents of the image\n *\n * @throws NotFoundException Any errors which occurred\n */\n /*@Override*/\n decode(image, hints) {\n if (hints) {\n this.setHints(hints);\n }\n return this.decodeInternal(image);\n }\n /**\n * Decode an image using the state set up by calling setHints() previously. Continuous scan\n * clients will get a large speed increase by using this instead of decode().\n *\n * @param image The pixel data to decode\n * @return The contents of the image\n *\n * @throws NotFoundException Any errors which occurred\n */\n decodeWithState(image) {\n // Make sure to set up the default state so we don't crash\n if (this.readers === null || this.readers === undefined) {\n this.setHints(null);\n }\n return this.decodeInternal(image);\n }\n /**\n * This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls\n * to decodeWithState(image) can reuse the same set of readers without reallocating memory. This\n * is important for performance in continuous scan clients.\n *\n * @param hints The set of hints to use for subsequent calls to decode(image)\n */\n setHints(hints) {\n this.hints = hints;\n const tryHarder = !isNullOrUndefined(hints)\n && hints.get(DecodeHintType$1.TRY_HARDER) === true;\n const formats = isNullOrUndefined(hints) ? null : hints.get(DecodeHintType$1.POSSIBLE_FORMATS);\n const readers = new Array();\n if (!isNullOrUndefined(formats)) {\n const addOneDReader = formats.some(f => {\n return (\n f === BarcodeFormat$1.UPC_A ||\n f === BarcodeFormat$1.UPC_E ||\n f === BarcodeFormat$1.EAN_13 ||\n f === BarcodeFormat$1.EAN_8 ||\n f === BarcodeFormat$1.CODABAR ||\n f === BarcodeFormat$1.CODE_39 ||\n f === BarcodeFormat$1.CODE_93 ||\n f === BarcodeFormat$1.CODE_128 ||\n f === BarcodeFormat$1.ITF ||\n f === BarcodeFormat$1.RSS_14 ||\n f === BarcodeFormat$1.RSS_EXPANDED);\n });\n // Put 1D readers upfront in \"normal\" mode\n if (addOneDReader && !tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n if (formats.includes(BarcodeFormat$1.QR_CODE)) {\n readers.push(new QRCodeReader());\n }\n if (formats.includes(BarcodeFormat$1.DATA_MATRIX)) {\n readers.push(new DataMatrixReader());\n }\n if (formats.includes(BarcodeFormat$1.AZTEC)) {\n readers.push(new AztecReader());\n }\n if (formats.includes(BarcodeFormat$1.PDF_417)) {\n readers.push(new PDF417Reader());\n }\n // if (formats.includes(BarcodeFormat.MAXICODE)) {\n // readers.push(new MaxiCodeReader())\n // }\n // At end in \"try harder\" mode\n if (addOneDReader && tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n }\n if (readers.length === 0) {\n if (!tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n readers.push(new QRCodeReader());\n readers.push(new DataMatrixReader());\n readers.push(new AztecReader());\n readers.push(new PDF417Reader());\n // readers.push(new MaxiCodeReader())\n if (tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n }\n this.readers = readers; // .toArray(new Reader[readers.size()])\n }\n /*@Override*/\n reset() {\n if (this.readers !== null) {\n for (const reader of this.readers) {\n reader.reset();\n }\n }\n }\n /**\n * @throws NotFoundException\n */\n decodeInternal(image) {\n if (this.readers === null) {\n throw new ReaderException('No readers where selected, nothing can be read.');\n }\n for (const reader of this.readers) {\n // Trying to decode with ${reader} reader.\n try {\n return reader.decode(image, this.hints);\n }\n catch (ex) {\n if (ex instanceof ReaderException) {\n continue;\n }\n // Bad Exception.\n }\n }\n throw new NotFoundException('No MultiFormat Readers were able to detect the code.');\n }\n }\n\n class BrowserMultiFormatReader extends BrowserCodeReader {\n constructor(hints = null, timeBetweenScansMillis = 500) {\n const reader = new MultiFormatReader();\n reader.setHints(hints);\n super(reader, timeBetweenScansMillis);\n }\n /**\n * Overwrite decodeBitmap to call decodeWithState, which will pay\n * attention to the hints set in the constructor function\n */\n decodeBitmap(binaryBitmap) {\n return this.reader.decodeWithState(binaryBitmap);\n }\n }\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * QR Code reader to use from browser.\n */\n class BrowserPDF417Reader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserPDF417Reader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n */\n constructor(timeBetweenScansMillis = 500) {\n super(new PDF417Reader(), timeBetweenScansMillis);\n }\n }\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * QR Code reader to use from browser.\n */\n class BrowserQRCodeReader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserQRCodeReader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n */\n constructor(timeBetweenScansMillis = 500) {\n super(new QRCodeReader(), timeBetweenScansMillis);\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*namespace com.google.zxing {*/\n /**\n * These are a set of hints that you may pass to Writers to specify their behavior.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n var EncodeHintType;\n (function (EncodeHintType) {\n /**\n * Specifies what degree of error correction to use, for example in QR Codes.\n * Type depends on the encoder. For example for QR codes it's type\n * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.\n * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.\n * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.\n * In all cases, it can also be a {@link String} representation of the desired value as well.\n * Note: an Aztec symbol should have a minimum of 25% EC words.\n */\n EncodeHintType[EncodeHintType[\"ERROR_CORRECTION\"] = 0] = \"ERROR_CORRECTION\";\n /**\n * Specifies what character encoding to use where applicable (type {@link String})\n */\n EncodeHintType[EncodeHintType[\"CHARACTER_SET\"] = 1] = \"CHARACTER_SET\";\n /**\n * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})\n */\n EncodeHintType[EncodeHintType[\"DATA_MATRIX_SHAPE\"] = 2] = \"DATA_MATRIX_SHAPE\";\n /**\n * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.\n *\n * @deprecated use width/height params in\n * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}\n */\n /*@Deprecated*/\n EncodeHintType[EncodeHintType[\"MIN_SIZE\"] = 3] = \"MIN_SIZE\";\n /**\n * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.\n *\n * @deprecated without replacement\n */\n /*@Deprecated*/\n EncodeHintType[EncodeHintType[\"MAX_SIZE\"] = 4] = \"MAX_SIZE\";\n /**\n * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary\n * by format; for example it controls margin before and after the barcode horizontally for\n * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).\n */\n EncodeHintType[EncodeHintType[\"MARGIN\"] = 5] = \"MARGIN\";\n /**\n * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or \"true\" or \"false\"\n * {@link String} value).\n */\n EncodeHintType[EncodeHintType[\"PDF417_COMPACT\"] = 6] = \"PDF417_COMPACT\";\n /**\n * Specifies what compaction mode to use for PDF417 (type\n * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its\n * enum values).\n */\n EncodeHintType[EncodeHintType[\"PDF417_COMPACTION\"] = 7] = \"PDF417_COMPACTION\";\n /**\n * Specifies the minimum and maximum number of rows and columns for PDF417 (type\n * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).\n */\n EncodeHintType[EncodeHintType[\"PDF417_DIMENSIONS\"] = 8] = \"PDF417_DIMENSIONS\";\n /**\n * Specifies the required number of layers for an Aztec code.\n * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.\n * 0 indicates to use the minimum number of layers (the default).\n * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.\n * (Type {@link Integer}, or {@link String} representation of the integer value).\n */\n EncodeHintType[EncodeHintType[\"AZTEC_LAYERS\"] = 9] = \"AZTEC_LAYERS\";\n /**\n * Specifies the exact version of QR code to be encoded.\n * (Type {@link Integer}, or {@link String} representation of the integer value).\n */\n EncodeHintType[EncodeHintType[\"QR_VERSION\"] = 10] = \"QR_VERSION\";\n })(EncodeHintType || (EncodeHintType = {}));\n var EncodeHintType$1 = EncodeHintType;\n\n /**\n *

Implements Reed-Solomon encoding, as the name implies.

\n *\n * @author Sean Owen\n * @author William Rucklidge\n */\n class ReedSolomonEncoder {\n /**\n * A reed solomon error-correcting encoding constructor is created by\n * passing as Galois Field with of size equal to the number of code\n * words (symbols) in the alphabet (the number of values in each\n * element of arrays that are encoded/decoded).\n * @param field A galois field with a number of elements equal to the size\n * of the alphabet of symbols to encode.\n */\n constructor(field) {\n this.field = field;\n this.cachedGenerators = [];\n this.cachedGenerators.push(new GenericGFPoly(field, Int32Array.from([1])));\n }\n buildGenerator(degree /*int*/) {\n const cachedGenerators = this.cachedGenerators;\n if (degree >= cachedGenerators.length) {\n let lastGenerator = cachedGenerators[cachedGenerators.length - 1];\n const field = this.field;\n for (let d = cachedGenerators.length; d <= degree; d++) {\n const nextGenerator = lastGenerator.multiply(new GenericGFPoly(field, Int32Array.from([1, field.exp(d - 1 + field.getGeneratorBase())])));\n cachedGenerators.push(nextGenerator);\n lastGenerator = nextGenerator;\n }\n }\n return cachedGenerators[degree];\n }\n /**\n *

Encode a sequence of code words (symbols) using Reed-Solomon to allow decoders\n * to detect and correct errors that may have been introduced when the resulting\n * data is stored or transmitted.

\n *\n * @param toEncode array used for both and output. Caller initializes the array with\n * the code words (symbols) to be encoded followed by empty elements allocated to make\n * space for error-correction code words in the encoded output. The array contains\n * the encdoded output when encode returns. Code words are encoded as numbers from\n * 0 to n-1, where n is the number of possible code words (symbols), as determined\n * by the size of the Galois Field passed in the constructor of this object.\n * @param ecBytes the number of elements reserved in the array (first parameter)\n * to store error-correction code words. Thus, the number of code words (symbols)\n * to encode in the first parameter is thus toEncode.length - ecBytes.\n * Note, the use of \"bytes\" in the name of this parameter is misleading, as there may\n * be more or fewer than 256 symbols being encoded, as determined by the number of\n * elements in the Galois Field passed as a constructor to this object.\n * @throws IllegalArgumentException thrown in response to validation errros.\n */\n encode(toEncode, ecBytes /*int*/) {\n if (ecBytes === 0) {\n throw new IllegalArgumentException('No error correction bytes');\n }\n const dataBytes = toEncode.length - ecBytes;\n if (dataBytes <= 0) {\n throw new IllegalArgumentException('No data bytes provided');\n }\n const generator = this.buildGenerator(ecBytes);\n const infoCoefficients = new Int32Array(dataBytes);\n System.arraycopy(toEncode, 0, infoCoefficients, 0, dataBytes);\n let info = new GenericGFPoly(this.field, infoCoefficients);\n info = info.multiplyByMonomial(ecBytes, 1);\n const remainder = info.divide(generator)[1];\n const coefficients = remainder.getCoefficients();\n const numZeroCoefficients = ecBytes - coefficients.length;\n for (let i = 0; i < numZeroCoefficients; i++) {\n toEncode[dataBytes + i] = 0;\n }\n System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length);\n }\n }\n\n /**\n * @author Satoru Takabayashi\n * @author Daniel Switkin\n * @author Sean Owen\n */\n class MaskUtil {\n constructor() {\n // do nothing\n }\n /**\n * Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and\n * give penalty to them. Example: 00000 or 11111.\n */\n static applyMaskPenaltyRule1(matrix) {\n return MaskUtil.applyMaskPenaltyRule1Internal(matrix, true) + MaskUtil.applyMaskPenaltyRule1Internal(matrix, false);\n }\n /**\n * Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give\n * penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a\n * penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block.\n */\n static applyMaskPenaltyRule2(matrix) {\n let penalty = 0;\n const array = matrix.getArray();\n const width = matrix.getWidth();\n const height = matrix.getHeight();\n for (let y = 0; y < height - 1; y++) {\n const arrayY = array[y];\n for (let x = 0; x < width - 1; x++) {\n const value = arrayY[x];\n if (value === arrayY[x + 1] && value === array[y + 1][x] && value === array[y + 1][x + 1]) {\n penalty++;\n }\n }\n }\n return MaskUtil.N2 * penalty;\n }\n /**\n * Apply mask penalty rule 3 and return the penalty. Find consecutive runs of 1:1:3:1:1:4\n * starting with black, or 4:1:1:3:1:1 starting with white, and give penalty to them. If we\n * find patterns like 000010111010000, we give penalty once.\n */\n static applyMaskPenaltyRule3(matrix) {\n let numPenalties = 0;\n const array = matrix.getArray();\n const width = matrix.getWidth();\n const height = matrix.getHeight();\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const arrayY = array[y]; // We can at least optimize this access\n if (x + 6 < width &&\n arrayY[x] === 1 &&\n arrayY[x + 1] === 0 &&\n arrayY[x + 2] === 1 &&\n arrayY[x + 3] === 1 &&\n arrayY[x + 4] === 1 &&\n arrayY[x + 5] === 0 &&\n arrayY[x + 6] === 1 &&\n (MaskUtil.isWhiteHorizontal(arrayY, x - 4, x) || MaskUtil.isWhiteHorizontal(arrayY, x + 7, x + 11))) {\n numPenalties++;\n }\n if (y + 6 < height &&\n array[y][x] === 1 &&\n array[y + 1][x] === 0 &&\n array[y + 2][x] === 1 &&\n array[y + 3][x] === 1 &&\n array[y + 4][x] === 1 &&\n array[y + 5][x] === 0 &&\n array[y + 6][x] === 1 &&\n (MaskUtil.isWhiteVertical(array, x, y - 4, y) || MaskUtil.isWhiteVertical(array, x, y + 7, y + 11))) {\n numPenalties++;\n }\n }\n }\n return numPenalties * MaskUtil.N3;\n }\n static isWhiteHorizontal(rowArray, from /*int*/, to /*int*/) {\n from = Math.max(from, 0);\n to = Math.min(to, rowArray.length);\n for (let i = from; i < to; i++) {\n if (rowArray[i] === 1) {\n return false;\n }\n }\n return true;\n }\n static isWhiteVertical(array, col /*int*/, from /*int*/, to /*int*/) {\n from = Math.max(from, 0);\n to = Math.min(to, array.length);\n for (let i = from; i < to; i++) {\n if (array[i][col] === 1) {\n return false;\n }\n }\n return true;\n }\n /**\n * Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give\n * penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance.\n */\n static applyMaskPenaltyRule4(matrix) {\n let numDarkCells = 0;\n const array = matrix.getArray();\n const width = matrix.getWidth();\n const height = matrix.getHeight();\n for (let y = 0; y < height; y++) {\n const arrayY = array[y];\n for (let x = 0; x < width; x++) {\n if (arrayY[x] === 1) {\n numDarkCells++;\n }\n }\n }\n const numTotalCells = matrix.getHeight() * matrix.getWidth();\n const fivePercentVariances = Math.floor(Math.abs(numDarkCells * 2 - numTotalCells) * 10 / numTotalCells);\n return fivePercentVariances * MaskUtil.N4;\n }\n /**\n * Return the mask bit for \"getMaskPattern\" at \"x\" and \"y\". See 8.8 of JISX0510:2004 for mask\n * pattern conditions.\n */\n static getDataMaskBit(maskPattern /*int*/, x /*int*/, y /*int*/) {\n let intermediate; /*int*/\n let temp; /*int*/\n switch (maskPattern) {\n case 0:\n intermediate = (y + x) & 0x1;\n break;\n case 1:\n intermediate = y & 0x1;\n break;\n case 2:\n intermediate = x % 3;\n break;\n case 3:\n intermediate = (y + x) % 3;\n break;\n case 4:\n intermediate = (Math.floor(y / 2) + Math.floor(x / 3)) & 0x1;\n break;\n case 5:\n temp = y * x;\n intermediate = (temp & 0x1) + (temp % 3);\n break;\n case 6:\n temp = y * x;\n intermediate = ((temp & 0x1) + (temp % 3)) & 0x1;\n break;\n case 7:\n temp = y * x;\n intermediate = ((temp % 3) + ((y + x) & 0x1)) & 0x1;\n break;\n default:\n throw new IllegalArgumentException('Invalid mask pattern: ' + maskPattern);\n }\n return intermediate === 0;\n }\n /**\n * Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both\n * vertical and horizontal orders respectively.\n */\n static applyMaskPenaltyRule1Internal(matrix, isHorizontal) {\n let penalty = 0;\n const iLimit = isHorizontal ? matrix.getHeight() : matrix.getWidth();\n const jLimit = isHorizontal ? matrix.getWidth() : matrix.getHeight();\n const array = matrix.getArray();\n for (let i = 0; i < iLimit; i++) {\n let numSameBitCells = 0;\n let prevBit = -1;\n for (let j = 0; j < jLimit; j++) {\n const bit = isHorizontal ? array[i][j] : array[j][i];\n if (bit === prevBit) {\n numSameBitCells++;\n }\n else {\n if (numSameBitCells >= 5) {\n penalty += MaskUtil.N1 + (numSameBitCells - 5);\n }\n numSameBitCells = 1; // Include the cell itself.\n prevBit = bit;\n }\n }\n if (numSameBitCells >= 5) {\n penalty += MaskUtil.N1 + (numSameBitCells - 5);\n }\n }\n return penalty;\n }\n }\n // Penalty weights from section 6.8.2.1\n MaskUtil.N1 = 3;\n MaskUtil.N2 = 3;\n MaskUtil.N3 = 40;\n MaskUtil.N4 = 10;\n\n /**\n * JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned\n * -1, 0, and 1, I'm going to use less memory and go with bytes.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class ByteMatrix {\n constructor(width /*int*/, height /*int*/) {\n this.width = width;\n this.height = height;\n const bytes = new Array(height); // [height][width]\n for (let i = 0; i !== height; i++) {\n bytes[i] = new Uint8Array(width);\n }\n this.bytes = bytes;\n }\n getHeight() {\n return this.height;\n }\n getWidth() {\n return this.width;\n }\n get(x /*int*/, y /*int*/) {\n return this.bytes[y][x];\n }\n /**\n * @return an internal representation as bytes, in row-major order. array[y][x] represents point (x,y)\n */\n getArray() {\n return this.bytes;\n }\n // TYPESCRIPTPORT: preffer to let two methods instead of override to avoid type comparison inside\n setNumber(x /*int*/, y /*int*/, value /*byte|int*/) {\n this.bytes[y][x] = value;\n }\n // public set(x: number /*int*/, y: number /*int*/, value: number /*int*/): void {\n // bytes[y][x] = (byte) value\n // }\n setBoolean(x /*int*/, y /*int*/, value) {\n this.bytes[y][x] = /*(byte) */ (value ? 1 : 0);\n }\n clear(value /*byte*/) {\n for (const aByte of this.bytes) {\n Arrays.fill(aByte, value);\n }\n }\n equals(o) {\n if (!(o instanceof ByteMatrix)) {\n return false;\n }\n const other = o;\n if (this.width !== other.width) {\n return false;\n }\n if (this.height !== other.height) {\n return false;\n }\n for (let y = 0, height = this.height; y < height; ++y) {\n const bytesY = this.bytes[y];\n const otherBytesY = other.bytes[y];\n for (let x = 0, width = this.width; x < width; ++x) {\n if (bytesY[x] !== otherBytesY[x]) {\n return false;\n }\n }\n }\n return true;\n }\n /*@Override*/\n toString() {\n const result = new StringBuilder(); // (2 * width * height + 2)\n for (let y = 0, height = this.height; y < height; ++y) {\n const bytesY = this.bytes[y];\n for (let x = 0, width = this.width; x < width; ++x) {\n switch (bytesY[x]) {\n case 0:\n result.append(' 0');\n break;\n case 1:\n result.append(' 1');\n break;\n default:\n result.append(' ');\n break;\n }\n }\n result.append('\\n');\n }\n return result.toString();\n }\n }\n\n /**\n * @author satorux@google.com (Satoru Takabayashi) - creator\n * @author dswitkin@google.com (Daniel Switkin) - ported from C++\n */\n class QRCode {\n constructor() {\n this.maskPattern = -1;\n }\n getMode() {\n return this.mode;\n }\n getECLevel() {\n return this.ecLevel;\n }\n getVersion() {\n return this.version;\n }\n getMaskPattern() {\n return this.maskPattern;\n }\n getMatrix() {\n return this.matrix;\n }\n /*@Override*/\n toString() {\n const result = new StringBuilder(); // (200)\n result.append('<<\\n');\n result.append(' mode: ');\n result.append(this.mode ? this.mode.toString() : 'null');\n result.append('\\n ecLevel: ');\n result.append(this.ecLevel ? this.ecLevel.toString() : 'null');\n result.append('\\n version: ');\n result.append(this.version ? this.version.toString() : 'null');\n result.append('\\n maskPattern: ');\n result.append(this.maskPattern.toString());\n if (this.matrix) {\n result.append('\\n matrix:\\n');\n result.append(this.matrix.toString());\n }\n else {\n result.append('\\n matrix: null\\n');\n }\n result.append('>>\\n');\n return result.toString();\n }\n setMode(value) {\n this.mode = value;\n }\n setECLevel(value) {\n this.ecLevel = value;\n }\n setVersion(version) {\n this.version = version;\n }\n setMaskPattern(value /*int*/) {\n this.maskPattern = value;\n }\n setMatrix(value) {\n this.matrix = value;\n }\n // Check if \"mask_pattern\" is valid.\n static isValidMaskPattern(maskPattern /*int*/) {\n return maskPattern >= 0 && maskPattern < QRCode.NUM_MASK_PATTERNS;\n }\n }\n QRCode.NUM_MASK_PATTERNS = 8;\n\n /**\n * Custom Error class of type Exception.\n */\n class WriterException extends Exception {\n }\n WriterException.kind = 'WriterException';\n\n /**\n * @author satorux@google.com (Satoru Takabayashi) - creator\n * @author dswitkin@google.com (Daniel Switkin) - ported from C++\n */\n class MatrixUtil {\n constructor() {\n // do nothing\n }\n // Set all cells to -1 (TYPESCRIPTPORT: 255). -1 (TYPESCRIPTPORT: 255) means that the cell is empty (not set yet).\n //\n // JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding\n // with the ByteMatrix initialized all to zero.\n static clearMatrix(matrix) {\n // TYPESCRIPTPORT: we use UintArray se changed here from -1 to 255\n matrix.clear(/*(byte) */ /*-1*/ 255);\n }\n // Build 2D matrix of QR Code from \"dataBits\" with \"ecLevel\", \"version\" and \"getMaskPattern\". On\n // success, store the result in \"matrix\" and return true.\n static buildMatrix(dataBits, ecLevel, version, maskPattern /*int*/, matrix) {\n MatrixUtil.clearMatrix(matrix);\n MatrixUtil.embedBasicPatterns(version, matrix);\n // Type information appear with any version.\n MatrixUtil.embedTypeInfo(ecLevel, maskPattern, matrix);\n // Version info appear if version >= 7.\n MatrixUtil.maybeEmbedVersionInfo(version, matrix);\n // Data should be embedded at end.\n MatrixUtil.embedDataBits(dataBits, maskPattern, matrix);\n }\n // Embed basic patterns. On success, modify the matrix and return true.\n // The basic patterns are:\n // - Position detection patterns\n // - Timing patterns\n // - Dark dot at the left bottom corner\n // - Position adjustment patterns, if need be\n static embedBasicPatterns(version, matrix) {\n // Let's get started with embedding big squares at corners.\n MatrixUtil.embedPositionDetectionPatternsAndSeparators(matrix);\n // Then, embed the dark dot at the left bottom corner.\n MatrixUtil.embedDarkDotAtLeftBottomCorner(matrix);\n // Position adjustment patterns appear if version >= 2.\n MatrixUtil.maybeEmbedPositionAdjustmentPatterns(version, matrix);\n // Timing patterns should be embedded after position adj. patterns.\n MatrixUtil.embedTimingPatterns(matrix);\n }\n // Embed type information. On success, modify the matrix.\n static embedTypeInfo(ecLevel, maskPattern /*int*/, matrix) {\n const typeInfoBits = new BitArray();\n MatrixUtil.makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits);\n for (let i = 0, size = typeInfoBits.getSize(); i < size; ++i) {\n // Place bits in LSB to MSB order. LSB (least significant bit) is the last value in\n // \"typeInfoBits\".\n const bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i);\n // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46).\n const coordinates = MatrixUtil.TYPE_INFO_COORDINATES[i];\n const x1 = coordinates[0];\n const y1 = coordinates[1];\n matrix.setBoolean(x1, y1, bit);\n if (i < 8) {\n // Right top corner.\n const x2 = matrix.getWidth() - i - 1;\n const y2 = 8;\n matrix.setBoolean(x2, y2, bit);\n }\n else {\n // Left bottom corner.\n const x2 = 8;\n const y2 = matrix.getHeight() - 7 + (i - 8);\n matrix.setBoolean(x2, y2, bit);\n }\n }\n }\n // Embed version information if need be. On success, modify the matrix and return true.\n // See 8.10 of JISX0510:2004 (p.47) for how to embed version information.\n static maybeEmbedVersionInfo(version, matrix) {\n if (version.getVersionNumber() < 7) { // Version info is necessary if version >= 7.\n return; // Don't need version info.\n }\n const versionInfoBits = new BitArray();\n MatrixUtil.makeVersionInfoBits(version, versionInfoBits);\n let bitIndex = 6 * 3 - 1; // It will decrease from 17 to 0.\n for (let i = 0; i < 6; ++i) {\n for (let j = 0; j < 3; ++j) {\n // Place bits in LSB (least significant bit) to MSB order.\n const bit = versionInfoBits.get(bitIndex);\n bitIndex--;\n // Left bottom corner.\n matrix.setBoolean(i, matrix.getHeight() - 11 + j, bit);\n // Right bottom corner.\n matrix.setBoolean(matrix.getHeight() - 11 + j, i, bit);\n }\n }\n }\n // Embed \"dataBits\" using \"getMaskPattern\". On success, modify the matrix and return true.\n // For debugging purposes, it skips masking process if \"getMaskPattern\" is -1(TYPESCRIPTPORT: 255).\n // See 8.7 of JISX0510:2004 (p.38) for how to embed data bits.\n static embedDataBits(dataBits, maskPattern /*int*/, matrix) {\n let bitIndex = 0;\n let direction = -1;\n // Start from the right bottom cell.\n let x = matrix.getWidth() - 1;\n let y = matrix.getHeight() - 1;\n while (x > 0) {\n // Skip the vertical timing pattern.\n if (x === 6) {\n x -= 1;\n }\n while (y >= 0 && y < matrix.getHeight()) {\n for (let i = 0; i < 2; ++i) {\n const xx = x - i;\n // Skip the cell if it's not empty.\n if (!MatrixUtil.isEmpty(matrix.get(xx, y))) {\n continue;\n }\n let bit;\n if (bitIndex < dataBits.getSize()) {\n bit = dataBits.get(bitIndex);\n ++bitIndex;\n }\n else {\n // Padding bit. If there is no bit left, we'll fill the left cells with 0, as described\n // in 8.4.9 of JISX0510:2004 (p. 24).\n bit = false;\n }\n // Skip masking if mask_pattern is -1 (TYPESCRIPTPORT: 255).\n if (maskPattern !== 255 && MaskUtil.getDataMaskBit(maskPattern, xx, y)) {\n bit = !bit;\n }\n matrix.setBoolean(xx, y, bit);\n }\n y += direction;\n }\n direction = -direction; // Reverse the direction.\n y += direction;\n x -= 2; // Move to the left.\n }\n // All bits should be consumed.\n if (bitIndex !== dataBits.getSize()) {\n throw new WriterException('Not all bits consumed: ' + bitIndex + '/' + dataBits.getSize());\n }\n }\n // Return the position of the most significant bit set (one: to) in the \"value\". The most\n // significant bit is position 32. If there is no bit set, return 0. Examples:\n // - findMSBSet(0) => 0\n // - findMSBSet(1) => 1\n // - findMSBSet(255) => 8\n static findMSBSet(value /*int*/) {\n return 32 - Integer.numberOfLeadingZeros(value);\n }\n // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for \"value\" using polynomial \"poly\". The BCH\n // code is used for encoding type information and version information.\n // Example: Calculation of version information of 7.\n // f(x) is created from 7.\n // - 7 = 000111 in 6 bits\n // - f(x) = x^2 + x^1 + x^0\n // g(x) is given by the standard (p. 67)\n // - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1\n // Multiply f(x) by x^(18 - 6)\n // - f'(x) = f(x) * x^(18 - 6)\n // - f'(x) = x^14 + x^13 + x^12\n // Calculate the remainder of f'(x) / g(x)\n // x^2\n // __________________________________________________\n // g(x) )x^14 + x^13 + x^12\n // x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2\n // --------------------------------------------------\n // x^11 + x^10 + x^7 + x^4 + x^2\n //\n // The remainder is x^11 + x^10 + x^7 + x^4 + x^2\n // Encode it in binary: 110010010100\n // The return value is 0xc94 (1100 1001 0100)\n //\n // Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit\n // operations. We don't care if coefficients are positive or negative.\n static calculateBCHCode(value /*int*/, poly /*int*/) {\n if (poly === 0) {\n throw new IllegalArgumentException('0 polynomial');\n }\n // If poly is \"1 1111 0010 0101\" (version info poly), msbSetInPoly is 13. We'll subtract 1\n // from 13 to make it 12.\n const msbSetInPoly = MatrixUtil.findMSBSet(poly);\n value <<= msbSetInPoly - 1;\n // Do the division business using exclusive-or operations.\n while (MatrixUtil.findMSBSet(value) >= msbSetInPoly) {\n value ^= poly << (MatrixUtil.findMSBSet(value) - msbSetInPoly);\n }\n // Now the \"value\" is the remainder (i.e. the BCH code)\n return value;\n }\n // Make bit vector of type information. On success, store the result in \"bits\" and return true.\n // Encode error correction level and mask pattern. See 8.9 of\n // JISX0510:2004 (p.45) for details.\n static makeTypeInfoBits(ecLevel, maskPattern /*int*/, bits) {\n if (!QRCode.isValidMaskPattern(maskPattern)) {\n throw new WriterException('Invalid mask pattern');\n }\n const typeInfo = (ecLevel.getBits() << 3) | maskPattern;\n bits.appendBits(typeInfo, 5);\n const bchCode = MatrixUtil.calculateBCHCode(typeInfo, MatrixUtil.TYPE_INFO_POLY);\n bits.appendBits(bchCode, 10);\n const maskBits = new BitArray();\n maskBits.appendBits(MatrixUtil.TYPE_INFO_MASK_PATTERN, 15);\n bits.xor(maskBits);\n if (bits.getSize() !== 15) { // Just in case.\n throw new WriterException('should not happen but we got: ' + bits.getSize());\n }\n }\n // Make bit vector of version information. On success, store the result in \"bits\" and return true.\n // See 8.10 of JISX0510:2004 (p.45) for details.\n static makeVersionInfoBits(version, bits) {\n bits.appendBits(version.getVersionNumber(), 6);\n const bchCode = MatrixUtil.calculateBCHCode(version.getVersionNumber(), MatrixUtil.VERSION_INFO_POLY);\n bits.appendBits(bchCode, 12);\n if (bits.getSize() !== 18) { // Just in case.\n throw new WriterException('should not happen but we got: ' + bits.getSize());\n }\n }\n // Check if \"value\" is empty.\n static isEmpty(value /*int*/) {\n return value === 255; // -1\n }\n static embedTimingPatterns(matrix) {\n // -8 is for skipping position detection patterns (7: size), and two horizontal/vertical\n // separation patterns (1: size). Thus, 8 = 7 + 1.\n for (let i = 8; i < matrix.getWidth() - 8; ++i) {\n const bit = (i + 1) % 2;\n // Horizontal line.\n if (MatrixUtil.isEmpty(matrix.get(i, 6))) {\n matrix.setNumber(i, 6, bit);\n }\n // Vertical line.\n if (MatrixUtil.isEmpty(matrix.get(6, i))) {\n matrix.setNumber(6, i, bit);\n }\n }\n }\n // Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46)\n static embedDarkDotAtLeftBottomCorner(matrix) {\n if (matrix.get(8, matrix.getHeight() - 8) === 0) {\n throw new WriterException();\n }\n matrix.setNumber(8, matrix.getHeight() - 8, 1);\n }\n static embedHorizontalSeparationPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let x = 0; x < 8; ++x) {\n if (!MatrixUtil.isEmpty(matrix.get(xStart + x, yStart))) {\n throw new WriterException();\n }\n matrix.setNumber(xStart + x, yStart, 0);\n }\n }\n static embedVerticalSeparationPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let y = 0; y < 7; ++y) {\n if (!MatrixUtil.isEmpty(matrix.get(xStart, yStart + y))) {\n throw new WriterException();\n }\n matrix.setNumber(xStart, yStart + y, 0);\n }\n }\n static embedPositionAdjustmentPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let y = 0; y < 5; ++y) {\n const patternY = MatrixUtil.POSITION_ADJUSTMENT_PATTERN[y];\n for (let x = 0; x < 5; ++x) {\n matrix.setNumber(xStart + x, yStart + y, patternY[x]);\n }\n }\n }\n static embedPositionDetectionPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let y = 0; y < 7; ++y) {\n const patternY = MatrixUtil.POSITION_DETECTION_PATTERN[y];\n for (let x = 0; x < 7; ++x) {\n matrix.setNumber(xStart + x, yStart + y, patternY[x]);\n }\n }\n }\n // Embed position detection patterns and surrounding vertical/horizontal separators.\n static embedPositionDetectionPatternsAndSeparators(matrix) {\n // Embed three big squares at corners.\n const pdpWidth = MatrixUtil.POSITION_DETECTION_PATTERN[0].length;\n // Left top corner.\n MatrixUtil.embedPositionDetectionPattern(0, 0, matrix);\n // Right top corner.\n MatrixUtil.embedPositionDetectionPattern(matrix.getWidth() - pdpWidth, 0, matrix);\n // Left bottom corner.\n MatrixUtil.embedPositionDetectionPattern(0, matrix.getWidth() - pdpWidth, matrix);\n // Embed horizontal separation patterns around the squares.\n const hspWidth = 8;\n // Left top corner.\n MatrixUtil.embedHorizontalSeparationPattern(0, hspWidth - 1, matrix);\n // Right top corner.\n MatrixUtil.embedHorizontalSeparationPattern(matrix.getWidth() - hspWidth, hspWidth - 1, matrix);\n // Left bottom corner.\n MatrixUtil.embedHorizontalSeparationPattern(0, matrix.getWidth() - hspWidth, matrix);\n // Embed vertical separation patterns around the squares.\n const vspSize = 7;\n // Left top corner.\n MatrixUtil.embedVerticalSeparationPattern(vspSize, 0, matrix);\n // Right top corner.\n MatrixUtil.embedVerticalSeparationPattern(matrix.getHeight() - vspSize - 1, 0, matrix);\n // Left bottom corner.\n MatrixUtil.embedVerticalSeparationPattern(vspSize, matrix.getHeight() - vspSize, matrix);\n }\n // Embed position adjustment patterns if need be.\n static maybeEmbedPositionAdjustmentPatterns(version, matrix) {\n if (version.getVersionNumber() < 2) { // The patterns appear if version >= 2\n return;\n }\n const index = version.getVersionNumber() - 1;\n const coordinates = MatrixUtil.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index];\n for (let i = 0, length = coordinates.length; i !== length; i++) {\n const y = coordinates[i];\n if (y >= 0) {\n for (let j = 0; j !== length; j++) {\n const x = coordinates[j];\n if (x >= 0 && MatrixUtil.isEmpty(matrix.get(x, y))) {\n // If the cell is unset, we embed the position adjustment pattern here.\n // -2 is necessary since the x/y coordinates point to the center of the pattern, not the\n // left top corner.\n MatrixUtil.embedPositionAdjustmentPattern(x - 2, y - 2, matrix);\n }\n }\n }\n }\n }\n }\n MatrixUtil.POSITION_DETECTION_PATTERN = Array.from([\n Int32Array.from([1, 1, 1, 1, 1, 1, 1]),\n Int32Array.from([1, 0, 0, 0, 0, 0, 1]),\n Int32Array.from([1, 0, 1, 1, 1, 0, 1]),\n Int32Array.from([1, 0, 1, 1, 1, 0, 1]),\n Int32Array.from([1, 0, 1, 1, 1, 0, 1]),\n Int32Array.from([1, 0, 0, 0, 0, 0, 1]),\n Int32Array.from([1, 1, 1, 1, 1, 1, 1]),\n ]);\n MatrixUtil.POSITION_ADJUSTMENT_PATTERN = Array.from([\n Int32Array.from([1, 1, 1, 1, 1]),\n Int32Array.from([1, 0, 0, 0, 1]),\n Int32Array.from([1, 0, 1, 0, 1]),\n Int32Array.from([1, 0, 0, 0, 1]),\n Int32Array.from([1, 1, 1, 1, 1]),\n ]);\n // From Appendix E. Table 1, JIS0510X:2004 (71: p). The table was double-checked by komatsu.\n MatrixUtil.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = Array.from([\n Int32Array.from([-1, -1, -1, -1, -1, -1, -1]),\n Int32Array.from([6, 18, -1, -1, -1, -1, -1]),\n Int32Array.from([6, 22, -1, -1, -1, -1, -1]),\n Int32Array.from([6, 26, -1, -1, -1, -1, -1]),\n Int32Array.from([6, 30, -1, -1, -1, -1, -1]),\n Int32Array.from([6, 34, -1, -1, -1, -1, -1]),\n Int32Array.from([6, 22, 38, -1, -1, -1, -1]),\n Int32Array.from([6, 24, 42, -1, -1, -1, -1]),\n Int32Array.from([6, 26, 46, -1, -1, -1, -1]),\n Int32Array.from([6, 28, 50, -1, -1, -1, -1]),\n Int32Array.from([6, 30, 54, -1, -1, -1, -1]),\n Int32Array.from([6, 32, 58, -1, -1, -1, -1]),\n Int32Array.from([6, 34, 62, -1, -1, -1, -1]),\n Int32Array.from([6, 26, 46, 66, -1, -1, -1]),\n Int32Array.from([6, 26, 48, 70, -1, -1, -1]),\n Int32Array.from([6, 26, 50, 74, -1, -1, -1]),\n Int32Array.from([6, 30, 54, 78, -1, -1, -1]),\n Int32Array.from([6, 30, 56, 82, -1, -1, -1]),\n Int32Array.from([6, 30, 58, 86, -1, -1, -1]),\n Int32Array.from([6, 34, 62, 90, -1, -1, -1]),\n Int32Array.from([6, 28, 50, 72, 94, -1, -1]),\n Int32Array.from([6, 26, 50, 74, 98, -1, -1]),\n Int32Array.from([6, 30, 54, 78, 102, -1, -1]),\n Int32Array.from([6, 28, 54, 80, 106, -1, -1]),\n Int32Array.from([6, 32, 58, 84, 110, -1, -1]),\n Int32Array.from([6, 30, 58, 86, 114, -1, -1]),\n Int32Array.from([6, 34, 62, 90, 118, -1, -1]),\n Int32Array.from([6, 26, 50, 74, 98, 122, -1]),\n Int32Array.from([6, 30, 54, 78, 102, 126, -1]),\n Int32Array.from([6, 26, 52, 78, 104, 130, -1]),\n Int32Array.from([6, 30, 56, 82, 108, 134, -1]),\n Int32Array.from([6, 34, 60, 86, 112, 138, -1]),\n Int32Array.from([6, 30, 58, 86, 114, 142, -1]),\n Int32Array.from([6, 34, 62, 90, 118, 146, -1]),\n Int32Array.from([6, 30, 54, 78, 102, 126, 150]),\n Int32Array.from([6, 24, 50, 76, 102, 128, 154]),\n Int32Array.from([6, 28, 54, 80, 106, 132, 158]),\n Int32Array.from([6, 32, 58, 84, 110, 136, 162]),\n Int32Array.from([6, 26, 54, 82, 110, 138, 166]),\n Int32Array.from([6, 30, 58, 86, 114, 142, 170]),\n ]);\n // Type info cells at the left top corner.\n MatrixUtil.TYPE_INFO_COORDINATES = Array.from([\n Int32Array.from([8, 0]),\n Int32Array.from([8, 1]),\n Int32Array.from([8, 2]),\n Int32Array.from([8, 3]),\n Int32Array.from([8, 4]),\n Int32Array.from([8, 5]),\n Int32Array.from([8, 7]),\n Int32Array.from([8, 8]),\n Int32Array.from([7, 8]),\n Int32Array.from([5, 8]),\n Int32Array.from([4, 8]),\n Int32Array.from([3, 8]),\n Int32Array.from([2, 8]),\n Int32Array.from([1, 8]),\n Int32Array.from([0, 8]),\n ]);\n // From Appendix D in JISX0510:2004 (p. 67)\n MatrixUtil.VERSION_INFO_POLY = 0x1f25; // 1 1111 0010 0101\n // From Appendix C in JISX0510:2004 (p.65).\n MatrixUtil.TYPE_INFO_POLY = 0x537;\n MatrixUtil.TYPE_INFO_MASK_PATTERN = 0x5412;\n\n /*namespace com.google.zxing.qrcode.encoder {*/\n class BlockPair {\n constructor(dataBytes, errorCorrectionBytes) {\n this.dataBytes = dataBytes;\n this.errorCorrectionBytes = errorCorrectionBytes;\n }\n getDataBytes() {\n return this.dataBytes;\n }\n getErrorCorrectionBytes() {\n return this.errorCorrectionBytes;\n }\n }\n\n /*import java.io.UnsupportedEncodingException;*/\n /*import java.util.ArrayList;*/\n /*import java.util.Collection;*/\n /*import java.util.Map;*/\n /**\n * @author satorux@google.com (Satoru Takabayashi) - creator\n * @author dswitkin@google.com (Daniel Switkin) - ported from C++\n */\n class Encoder {\n // TYPESCRIPTPORT: changed to UTF8, the default for js\n constructor() { }\n // The mask penalty calculation is complicated. See Table 21 of JISX0510:2004 (p.45) for details.\n // Basically it applies four rules and summate all penalties.\n static calculateMaskPenalty(matrix) {\n return MaskUtil.applyMaskPenaltyRule1(matrix)\n + MaskUtil.applyMaskPenaltyRule2(matrix)\n + MaskUtil.applyMaskPenaltyRule3(matrix)\n + MaskUtil.applyMaskPenaltyRule4(matrix);\n }\n /**\n * @param content text to encode\n * @param ecLevel error correction level to use\n * @return {@link QRCode} representing the encoded QR code\n * @throws WriterException if encoding can't succeed, because of for example invalid content\n * or configuration\n */\n // public static encode(content: string, ecLevel: ErrorCorrectionLevel): QRCode /*throws WriterException*/ {\n // return encode(content, ecLevel, null)\n // }\n static encode(content, ecLevel, hints = null) {\n // Determine what character encoding has been specified by the caller, if any\n let encoding = Encoder.DEFAULT_BYTE_MODE_ENCODING;\n const hasEncodingHint = hints !== null && undefined !== hints.get(EncodeHintType$1.CHARACTER_SET);\n if (hasEncodingHint) {\n encoding = hints.get(EncodeHintType$1.CHARACTER_SET).toString();\n }\n // Pick an encoding mode appropriate for the content. Note that this will not attempt to use\n // multiple modes / segments even if that were more efficient. Twould be nice.\n const mode = this.chooseMode(content, encoding);\n // This will store the header information, like mode and\n // length, as well as \"header\" segments like an ECI segment.\n const headerBits = new BitArray();\n // Append ECI segment if applicable\n if (mode === Mode$1.BYTE && (hasEncodingHint || Encoder.DEFAULT_BYTE_MODE_ENCODING !== encoding)) {\n const eci = CharacterSetECI.getCharacterSetECIByName(encoding);\n if (eci !== undefined) {\n this.appendECI(eci, headerBits);\n }\n }\n // (With ECI in place,) Write the mode marker\n this.appendModeInfo(mode, headerBits);\n // Collect data within the main segment, separately, to count its size if needed. Don't add it to\n // main payload yet.\n const dataBits = new BitArray();\n this.appendBytes(content, mode, dataBits, encoding);\n let version;\n if (hints !== null && undefined !== hints.get(EncodeHintType$1.QR_VERSION)) {\n const versionNumber = Number.parseInt(hints.get(EncodeHintType$1.QR_VERSION).toString(), 10);\n version = Version$1.getVersionForNumber(versionNumber);\n const bitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, version);\n if (!this.willFit(bitsNeeded, version, ecLevel)) {\n throw new WriterException('Data too big for requested version');\n }\n }\n else {\n version = this.recommendVersion(ecLevel, mode, headerBits, dataBits);\n }\n const headerAndDataBits = new BitArray();\n headerAndDataBits.appendBitArray(headerBits);\n // Find \"length\" of main segment and write it\n const numLetters = mode === Mode$1.BYTE ? dataBits.getSizeInBytes() : content.length;\n this.appendLengthInfo(numLetters, version, mode, headerAndDataBits);\n // Put data together into the overall payload\n headerAndDataBits.appendBitArray(dataBits);\n const ecBlocks = version.getECBlocksForLevel(ecLevel);\n const numDataBytes = version.getTotalCodewords() - ecBlocks.getTotalECCodewords();\n // Terminate the bits properly.\n this.terminateBits(numDataBytes, headerAndDataBits);\n // Interleave data bits with error correction code.\n const finalBits = this.interleaveWithECBytes(headerAndDataBits, version.getTotalCodewords(), numDataBytes, ecBlocks.getNumBlocks());\n const qrCode = new QRCode();\n qrCode.setECLevel(ecLevel);\n qrCode.setMode(mode);\n qrCode.setVersion(version);\n // Choose the mask pattern and set to \"qrCode\".\n const dimension = version.getDimensionForVersion();\n const matrix = new ByteMatrix(dimension, dimension);\n const maskPattern = this.chooseMaskPattern(finalBits, ecLevel, version, matrix);\n qrCode.setMaskPattern(maskPattern);\n // Build the matrix and set it to \"qrCode\".\n MatrixUtil.buildMatrix(finalBits, ecLevel, version, maskPattern, matrix);\n qrCode.setMatrix(matrix);\n return qrCode;\n }\n /**\n * Decides the smallest version of QR code that will contain all of the provided data.\n *\n * @throws WriterException if the data cannot fit in any version\n */\n static recommendVersion(ecLevel, mode, headerBits, dataBits) {\n // Hard part: need to know version to know how many bits length takes. But need to know how many\n // bits it takes to know version. First we take a guess at version by assuming version will be\n // the minimum, 1:\n const provisionalBitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, Version$1.getVersionForNumber(1));\n const provisionalVersion = this.chooseVersion(provisionalBitsNeeded, ecLevel);\n // Use that guess to calculate the right version. I am still not sure this works in 100% of cases.\n const bitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, provisionalVersion);\n return this.chooseVersion(bitsNeeded, ecLevel);\n }\n static calculateBitsNeeded(mode, headerBits, dataBits, version) {\n return headerBits.getSize() + mode.getCharacterCountBits(version) + dataBits.getSize();\n }\n /**\n * @return the code point of the table used in alphanumeric mode or\n * -1 if there is no corresponding code in the table.\n */\n static getAlphanumericCode(code /*int*/) {\n if (code < Encoder.ALPHANUMERIC_TABLE.length) {\n return Encoder.ALPHANUMERIC_TABLE[code];\n }\n return -1;\n }\n // public static chooseMode(content: string): Mode {\n // return chooseMode(content, null);\n // }\n /**\n * Choose the best mode by examining the content. Note that 'encoding' is used as a hint;\n * if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}.\n */\n static chooseMode(content, encoding = null) {\n if (CharacterSetECI.SJIS.getName() === encoding && this.isOnlyDoubleByteKanji(content)) {\n // Choose Kanji mode if all input are double-byte characters\n return Mode$1.KANJI;\n }\n let hasNumeric = false;\n let hasAlphanumeric = false;\n for (let i = 0, length = content.length; i < length; ++i) {\n const c = content.charAt(i);\n if (Encoder.isDigit(c)) {\n hasNumeric = true;\n }\n else if (this.getAlphanumericCode(c.charCodeAt(0)) !== -1) {\n hasAlphanumeric = true;\n }\n else {\n return Mode$1.BYTE;\n }\n }\n if (hasAlphanumeric) {\n return Mode$1.ALPHANUMERIC;\n }\n if (hasNumeric) {\n return Mode$1.NUMERIC;\n }\n return Mode$1.BYTE;\n }\n static isOnlyDoubleByteKanji(content) {\n let bytes;\n try {\n bytes = StringEncoding.encode(content, CharacterSetECI.SJIS); // content.getBytes(\"Shift_JIS\"))\n }\n catch (ignored /*: UnsupportedEncodingException*/) {\n return false;\n }\n const length = bytes.length;\n if (length % 2 !== 0) {\n return false;\n }\n for (let i = 0; i < length; i += 2) {\n const byte1 = bytes[i] & 0xFF;\n if ((byte1 < 0x81 || byte1 > 0x9F) && (byte1 < 0xE0 || byte1 > 0xEB)) {\n return false;\n }\n }\n return true;\n }\n static chooseMaskPattern(bits, ecLevel, version, matrix) {\n let minPenalty = Number.MAX_SAFE_INTEGER; // Lower penalty is better.\n let bestMaskPattern = -1;\n // We try all mask patterns to choose the best one.\n for (let maskPattern = 0; maskPattern < QRCode.NUM_MASK_PATTERNS; maskPattern++) {\n MatrixUtil.buildMatrix(bits, ecLevel, version, maskPattern, matrix);\n let penalty = this.calculateMaskPenalty(matrix);\n if (penalty < minPenalty) {\n minPenalty = penalty;\n bestMaskPattern = maskPattern;\n }\n }\n return bestMaskPattern;\n }\n static chooseVersion(numInputBits /*int*/, ecLevel) {\n for (let versionNum = 1; versionNum <= 40; versionNum++) {\n const version = Version$1.getVersionForNumber(versionNum);\n if (Encoder.willFit(numInputBits, version, ecLevel)) {\n return version;\n }\n }\n throw new WriterException('Data too big');\n }\n /**\n * @return true if the number of input bits will fit in a code with the specified version and\n * error correction level.\n */\n static willFit(numInputBits /*int*/, version, ecLevel) {\n // In the following comments, we use numbers of Version 7-H.\n // numBytes = 196\n const numBytes = version.getTotalCodewords();\n // getNumECBytes = 130\n const ecBlocks = version.getECBlocksForLevel(ecLevel);\n const numEcBytes = ecBlocks.getTotalECCodewords();\n // getNumDataBytes = 196 - 130 = 66\n const numDataBytes = numBytes - numEcBytes;\n const totalInputBytes = (numInputBits + 7) / 8;\n return numDataBytes >= totalInputBytes;\n }\n /**\n * Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).\n */\n static terminateBits(numDataBytes /*int*/, bits) {\n const capacity = numDataBytes * 8;\n if (bits.getSize() > capacity) {\n throw new WriterException('data bits cannot fit in the QR Code' + bits.getSize() + ' > ' +\n capacity);\n }\n for (let i = 0; i < 4 && bits.getSize() < capacity; ++i) {\n bits.appendBit(false);\n }\n // Append termination bits. See 8.4.8 of JISX0510:2004 (p.24) for details.\n // If the last byte isn't 8-bit aligned, we'll add padding bits.\n const numBitsInLastByte = bits.getSize() & 0x07;\n if (numBitsInLastByte > 0) {\n for (let i = numBitsInLastByte; i < 8; i++) {\n bits.appendBit(false);\n }\n }\n // If we have more space, we'll fill the space with padding patterns defined in 8.4.9 (p.24).\n const numPaddingBytes = numDataBytes - bits.getSizeInBytes();\n for (let i = 0; i < numPaddingBytes; ++i) {\n bits.appendBits((i & 0x01) === 0 ? 0xEC : 0x11, 8);\n }\n if (bits.getSize() !== capacity) {\n throw new WriterException('Bits size does not equal capacity');\n }\n }\n /**\n * Get number of data bytes and number of error correction bytes for block id \"blockID\". Store\n * the result in \"numDataBytesInBlock\", and \"numECBytesInBlock\". See table 12 in 8.5.1 of\n * JISX0510:2004 (p.30)\n */\n static getNumDataBytesAndNumECBytesForBlockID(numTotalBytes /*int*/, numDataBytes /*int*/, numRSBlocks /*int*/, blockID /*int*/, numDataBytesInBlock, numECBytesInBlock) {\n if (blockID >= numRSBlocks) {\n throw new WriterException('Block ID too large');\n }\n // numRsBlocksInGroup2 = 196 % 5 = 1\n const numRsBlocksInGroup2 = numTotalBytes % numRSBlocks;\n // numRsBlocksInGroup1 = 5 - 1 = 4\n const numRsBlocksInGroup1 = numRSBlocks - numRsBlocksInGroup2;\n // numTotalBytesInGroup1 = 196 / 5 = 39\n const numTotalBytesInGroup1 = Math.floor(numTotalBytes / numRSBlocks);\n // numTotalBytesInGroup2 = 39 + 1 = 40\n const numTotalBytesInGroup2 = numTotalBytesInGroup1 + 1;\n // numDataBytesInGroup1 = 66 / 5 = 13\n const numDataBytesInGroup1 = Math.floor(numDataBytes / numRSBlocks);\n // numDataBytesInGroup2 = 13 + 1 = 14\n const numDataBytesInGroup2 = numDataBytesInGroup1 + 1;\n // numEcBytesInGroup1 = 39 - 13 = 26\n const numEcBytesInGroup1 = numTotalBytesInGroup1 - numDataBytesInGroup1;\n // numEcBytesInGroup2 = 40 - 14 = 26\n const numEcBytesInGroup2 = numTotalBytesInGroup2 - numDataBytesInGroup2;\n // Sanity checks.\n // 26 = 26\n if (numEcBytesInGroup1 !== numEcBytesInGroup2) {\n throw new WriterException('EC bytes mismatch');\n }\n // 5 = 4 + 1.\n if (numRSBlocks !== numRsBlocksInGroup1 + numRsBlocksInGroup2) {\n throw new WriterException('RS blocks mismatch');\n }\n // 196 = (13 + 26) * 4 + (14 + 26) * 1\n if (numTotalBytes !==\n ((numDataBytesInGroup1 + numEcBytesInGroup1) *\n numRsBlocksInGroup1) +\n ((numDataBytesInGroup2 + numEcBytesInGroup2) *\n numRsBlocksInGroup2)) {\n throw new WriterException('Total bytes mismatch');\n }\n if (blockID < numRsBlocksInGroup1) {\n numDataBytesInBlock[0] = numDataBytesInGroup1;\n numECBytesInBlock[0] = numEcBytesInGroup1;\n }\n else {\n numDataBytesInBlock[0] = numDataBytesInGroup2;\n numECBytesInBlock[0] = numEcBytesInGroup2;\n }\n }\n /**\n * Interleave \"bits\" with corresponding error correction bytes. On success, store the result in\n * \"result\". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details.\n */\n static interleaveWithECBytes(bits, numTotalBytes /*int*/, numDataBytes /*int*/, numRSBlocks /*int*/) {\n // \"bits\" must have \"getNumDataBytes\" bytes of data.\n if (bits.getSizeInBytes() !== numDataBytes) {\n throw new WriterException('Number of bits and data bytes does not match');\n }\n // Step 1. Divide data bytes into blocks and generate error correction bytes for them. We'll\n // store the divided data bytes blocks and error correction bytes blocks into \"blocks\".\n let dataBytesOffset = 0;\n let maxNumDataBytes = 0;\n let maxNumEcBytes = 0;\n // Since, we know the number of reedsolmon blocks, we can initialize the vector with the number.\n const blocks = new Array(); // new Array(numRSBlocks)\n for (let i = 0; i < numRSBlocks; ++i) {\n const numDataBytesInBlock = new Int32Array(1);\n const numEcBytesInBlock = new Int32Array(1);\n Encoder.getNumDataBytesAndNumECBytesForBlockID(numTotalBytes, numDataBytes, numRSBlocks, i, numDataBytesInBlock, numEcBytesInBlock);\n const size = numDataBytesInBlock[0];\n const dataBytes = new Uint8Array(size);\n bits.toBytes(8 * dataBytesOffset, dataBytes, 0, size);\n const ecBytes = Encoder.generateECBytes(dataBytes, numEcBytesInBlock[0]);\n blocks.push(new BlockPair(dataBytes, ecBytes));\n maxNumDataBytes = Math.max(maxNumDataBytes, size);\n maxNumEcBytes = Math.max(maxNumEcBytes, ecBytes.length);\n dataBytesOffset += numDataBytesInBlock[0];\n }\n if (numDataBytes !== dataBytesOffset) {\n throw new WriterException('Data bytes does not match offset');\n }\n const result = new BitArray();\n // First, place data blocks.\n for (let i = 0; i < maxNumDataBytes; ++i) {\n for (const block of blocks) {\n const dataBytes = block.getDataBytes();\n if (i < dataBytes.length) {\n result.appendBits(dataBytes[i], 8);\n }\n }\n }\n // Then, place error correction blocks.\n for (let i = 0; i < maxNumEcBytes; ++i) {\n for (const block of blocks) {\n const ecBytes = block.getErrorCorrectionBytes();\n if (i < ecBytes.length) {\n result.appendBits(ecBytes[i], 8);\n }\n }\n }\n if (numTotalBytes !== result.getSizeInBytes()) { // Should be same.\n throw new WriterException('Interleaving error: ' + numTotalBytes + ' and ' +\n result.getSizeInBytes() + ' differ.');\n }\n return result;\n }\n static generateECBytes(dataBytes, numEcBytesInBlock /*int*/) {\n const numDataBytes = dataBytes.length;\n const toEncode = new Int32Array(numDataBytes + numEcBytesInBlock); // int[numDataBytes + numEcBytesInBlock]\n for (let i = 0; i < numDataBytes; i++) {\n toEncode[i] = dataBytes[i] & 0xFF;\n }\n new ReedSolomonEncoder(GenericGF.QR_CODE_FIELD_256).encode(toEncode, numEcBytesInBlock);\n const ecBytes = new Uint8Array(numEcBytesInBlock);\n for (let i = 0; i < numEcBytesInBlock; i++) {\n ecBytes[i] = /*(byte) */ toEncode[numDataBytes + i];\n }\n return ecBytes;\n }\n /**\n * Append mode info. On success, store the result in \"bits\".\n */\n static appendModeInfo(mode, bits) {\n bits.appendBits(mode.getBits(), 4);\n }\n /**\n * Append length info. On success, store the result in \"bits\".\n */\n static appendLengthInfo(numLetters /*int*/, version, mode, bits) {\n const numBits = mode.getCharacterCountBits(version);\n if (numLetters >= (1 << numBits)) {\n throw new WriterException(numLetters + ' is bigger than ' + ((1 << numBits) - 1));\n }\n bits.appendBits(numLetters, numBits);\n }\n /**\n * Append \"bytes\" in \"mode\" mode (encoding) into \"bits\". On success, store the result in \"bits\".\n */\n static appendBytes(content, mode, bits, encoding) {\n switch (mode) {\n case Mode$1.NUMERIC:\n Encoder.appendNumericBytes(content, bits);\n break;\n case Mode$1.ALPHANUMERIC:\n Encoder.appendAlphanumericBytes(content, bits);\n break;\n case Mode$1.BYTE:\n Encoder.append8BitBytes(content, bits, encoding);\n break;\n case Mode$1.KANJI:\n Encoder.appendKanjiBytes(content, bits);\n break;\n default:\n throw new WriterException('Invalid mode: ' + mode);\n }\n }\n static getDigit(singleCharacter) {\n return singleCharacter.charCodeAt(0) - 48;\n }\n static isDigit(singleCharacter) {\n const cn = Encoder.getDigit(singleCharacter);\n return cn >= 0 && cn <= 9;\n }\n static appendNumericBytes(content, bits) {\n const length = content.length;\n let i = 0;\n while (i < length) {\n const num1 = Encoder.getDigit(content.charAt(i));\n if (i + 2 < length) {\n // Encode three numeric letters in ten bits.\n const num2 = Encoder.getDigit(content.charAt(i + 1));\n const num3 = Encoder.getDigit(content.charAt(i + 2));\n bits.appendBits(num1 * 100 + num2 * 10 + num3, 10);\n i += 3;\n }\n else if (i + 1 < length) {\n // Encode two numeric letters in seven bits.\n const num2 = Encoder.getDigit(content.charAt(i + 1));\n bits.appendBits(num1 * 10 + num2, 7);\n i += 2;\n }\n else {\n // Encode one numeric letter in four bits.\n bits.appendBits(num1, 4);\n i++;\n }\n }\n }\n static appendAlphanumericBytes(content, bits) {\n const length = content.length;\n let i = 0;\n while (i < length) {\n const code1 = Encoder.getAlphanumericCode(content.charCodeAt(i));\n if (code1 === -1) {\n throw new WriterException();\n }\n if (i + 1 < length) {\n const code2 = Encoder.getAlphanumericCode(content.charCodeAt(i + 1));\n if (code2 === -1) {\n throw new WriterException();\n }\n // Encode two alphanumeric letters in 11 bits.\n bits.appendBits(code1 * 45 + code2, 11);\n i += 2;\n }\n else {\n // Encode one alphanumeric letter in six bits.\n bits.appendBits(code1, 6);\n i++;\n }\n }\n }\n static append8BitBytes(content, bits, encoding) {\n let bytes;\n try {\n bytes = StringEncoding.encode(content, encoding);\n }\n catch (uee /*: UnsupportedEncodingException*/) {\n throw new WriterException(uee);\n }\n for (let i = 0, length = bytes.length; i !== length; i++) {\n const b = bytes[i];\n bits.appendBits(b, 8);\n }\n }\n /**\n * @throws WriterException\n */\n static appendKanjiBytes(content, bits) {\n let bytes;\n try {\n bytes = StringEncoding.encode(content, CharacterSetECI.SJIS);\n }\n catch (uee /*: UnsupportedEncodingException*/) {\n throw new WriterException(uee);\n }\n const length = bytes.length;\n for (let i = 0; i < length; i += 2) {\n const byte1 = bytes[i] & 0xFF;\n const byte2 = bytes[i + 1] & 0xFF;\n const code = ((byte1 << 8) & 0xFFFFFFFF) | byte2;\n let subtracted = -1;\n if (code >= 0x8140 && code <= 0x9ffc) {\n subtracted = code - 0x8140;\n }\n else if (code >= 0xe040 && code <= 0xebbf) {\n subtracted = code - 0xc140;\n }\n if (subtracted === -1) {\n throw new WriterException('Invalid byte sequence');\n }\n const encoded = ((subtracted >> 8) * 0xc0) + (subtracted & 0xff);\n bits.appendBits(encoded, 13);\n }\n }\n static appendECI(eci, bits) {\n bits.appendBits(Mode$1.ECI.getBits(), 4);\n // This is correct for values up to 127, which is all we need now.\n bits.appendBits(eci.getValue(), 8);\n }\n }\n // The original table is defined in the table 5 of JISX0510:2004 (p.19).\n Encoder.ALPHANUMERIC_TABLE = Int32Array.from([\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43,\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1,\n -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,\n ]);\n Encoder.DEFAULT_BYTE_MODE_ENCODING = CharacterSetECI.UTF8.getName(); // \"ISO-8859-1\"\n\n /**\n * @deprecated Moving to @zxing/browser\n */\n class BrowserQRCodeSvgWriter {\n /**\n * Writes and renders a QRCode SVG element.\n *\n * @param contents\n * @param width\n * @param height\n * @param hints\n */\n write(contents, width, height, hints = null) {\n if (contents.length === 0) {\n throw new IllegalArgumentException('Found empty contents');\n }\n // if (format != BarcodeFormat.QR_CODE) {\n // throw new IllegalArgumentException(\"Can only encode QR_CODE, but got \" + format)\n // }\n if (width < 0 || height < 0) {\n throw new IllegalArgumentException('Requested dimensions are too small: ' + width + 'x' + height);\n }\n let errorCorrectionLevel = ErrorCorrectionLevel.L;\n let quietZone = BrowserQRCodeSvgWriter.QUIET_ZONE_SIZE;\n if (hints !== null) {\n if (undefined !== hints.get(EncodeHintType$1.ERROR_CORRECTION)) {\n errorCorrectionLevel = ErrorCorrectionLevel.fromString(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());\n }\n if (undefined !== hints.get(EncodeHintType$1.MARGIN)) {\n quietZone = Number.parseInt(hints.get(EncodeHintType$1.MARGIN).toString(), 10);\n }\n }\n const code = Encoder.encode(contents, errorCorrectionLevel, hints);\n return this.renderResult(code, width, height, quietZone);\n }\n /**\n * Renders the result and then appends it to the DOM.\n */\n writeToDom(containerElement, contents, width, height, hints = null) {\n if (typeof containerElement === 'string') {\n containerElement = document.querySelector(containerElement);\n }\n const svgElement = this.write(contents, width, height, hints);\n if (containerElement)\n containerElement.appendChild(svgElement);\n }\n /**\n * Note that the input matrix uses 0 == white, 1 == black.\n * The output matrix uses 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).\n */\n renderResult(code, width /*int*/, height /*int*/, quietZone /*int*/) {\n const input = code.getMatrix();\n if (input === null) {\n throw new IllegalStateException();\n }\n const inputWidth = input.getWidth();\n const inputHeight = input.getHeight();\n const qrWidth = inputWidth + (quietZone * 2);\n const qrHeight = inputHeight + (quietZone * 2);\n const outputWidth = Math.max(width, qrWidth);\n const outputHeight = Math.max(height, qrHeight);\n const multiple = Math.min(Math.floor(outputWidth / qrWidth), Math.floor(outputHeight / qrHeight));\n // Padding includes both the quiet zone and the extra white pixels to accommodate the requested\n // dimensions. For example, if input is 25x25 the QR will be 33x33 including the quiet zone.\n // If the requested size is 200x160, the multiple will be 4, for a QR of 132x132. These will\n // handle all the padding from 100x100 (the actual QR) up to 200x160.\n const leftPadding = Math.floor((outputWidth - (inputWidth * multiple)) / 2);\n const topPadding = Math.floor((outputHeight - (inputHeight * multiple)) / 2);\n const svgElement = this.createSVGElement(outputWidth, outputHeight);\n for (let inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {\n // Write the contents of this row of the barcode\n for (let inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {\n if (input.get(inputX, inputY) === 1) {\n const svgRectElement = this.createSvgRectElement(outputX, outputY, multiple, multiple);\n svgElement.appendChild(svgRectElement);\n }\n }\n }\n return svgElement;\n }\n /**\n * Creates a SVG element.\n *\n * @param w SVG's width attribute\n * @param h SVG's height attribute\n */\n createSVGElement(w, h) {\n const svgElement = document.createElementNS(BrowserQRCodeSvgWriter.SVG_NS, 'svg');\n svgElement.setAttributeNS(null, 'height', w.toString());\n svgElement.setAttributeNS(null, 'width', h.toString());\n return svgElement;\n }\n /**\n * Creates a SVG rect element.\n *\n * @param x Element's x coordinate\n * @param y Element's y coordinate\n * @param w Element's width attribute\n * @param h Element's height attribute\n */\n createSvgRectElement(x, y, w, h) {\n const rect = document.createElementNS(BrowserQRCodeSvgWriter.SVG_NS, 'rect');\n rect.setAttributeNS(null, 'x', x.toString());\n rect.setAttributeNS(null, 'y', y.toString());\n rect.setAttributeNS(null, 'height', w.toString());\n rect.setAttributeNS(null, 'width', h.toString());\n rect.setAttributeNS(null, 'fill', '#000000');\n return rect;\n }\n }\n BrowserQRCodeSvgWriter.QUIET_ZONE_SIZE = 4;\n /**\n * SVG markup NameSpace\n */\n BrowserQRCodeSvgWriter.SVG_NS = 'http://www.w3.org/2000/svg';\n\n /*import java.util.Map;*/\n /**\n * This object renders a QR Code as a BitMatrix 2D array of greyscale values.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class QRCodeWriter {\n /*@Override*/\n // public encode(contents: string, format: BarcodeFormat, width: number /*int*/, height: number /*int*/): BitMatrix\n // /*throws WriterException */ {\n // return encode(contents, format, width, height, null)\n // }\n /*@Override*/\n encode(contents, format, width /*int*/, height /*int*/, hints) {\n if (contents.length === 0) {\n throw new IllegalArgumentException('Found empty contents');\n }\n if (format !== BarcodeFormat$1.QR_CODE) {\n throw new IllegalArgumentException('Can only encode QR_CODE, but got ' + format);\n }\n if (width < 0 || height < 0) {\n throw new IllegalArgumentException(`Requested dimensions are too small: ${width}x${height}`);\n }\n let errorCorrectionLevel = ErrorCorrectionLevel.L;\n let quietZone = QRCodeWriter.QUIET_ZONE_SIZE;\n if (hints !== null) {\n if (undefined !== hints.get(EncodeHintType$1.ERROR_CORRECTION)) {\n errorCorrectionLevel = ErrorCorrectionLevel.fromString(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());\n }\n if (undefined !== hints.get(EncodeHintType$1.MARGIN)) {\n quietZone = Number.parseInt(hints.get(EncodeHintType$1.MARGIN).toString(), 10);\n }\n }\n const code = Encoder.encode(contents, errorCorrectionLevel, hints);\n return QRCodeWriter.renderResult(code, width, height, quietZone);\n }\n // Note that the input matrix uses 0 == white, 1 == black, while the output matrix uses\n // 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).\n static renderResult(code, width /*int*/, height /*int*/, quietZone /*int*/) {\n const input = code.getMatrix();\n if (input === null) {\n throw new IllegalStateException();\n }\n const inputWidth = input.getWidth();\n const inputHeight = input.getHeight();\n const qrWidth = inputWidth + (quietZone * 2);\n const qrHeight = inputHeight + (quietZone * 2);\n const outputWidth = Math.max(width, qrWidth);\n const outputHeight = Math.max(height, qrHeight);\n const multiple = Math.min(Math.floor(outputWidth / qrWidth), Math.floor(outputHeight / qrHeight));\n // Padding includes both the quiet zone and the extra white pixels to accommodate the requested\n // dimensions. For example, if input is 25x25 the QR will be 33x33 including the quiet zone.\n // If the requested size is 200x160, the multiple will be 4, for a QR of 132x132. These will\n // handle all the padding from 100x100 (the actual QR) up to 200x160.\n const leftPadding = Math.floor((outputWidth - (inputWidth * multiple)) / 2);\n const topPadding = Math.floor((outputHeight - (inputHeight * multiple)) / 2);\n const output = new BitMatrix(outputWidth, outputHeight);\n for (let inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {\n // Write the contents of this row of the barcode\n for (let inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {\n if (input.get(inputX, inputY) === 1) {\n output.setRegion(outputX, outputY, multiple, multiple);\n }\n }\n }\n return output;\n }\n }\n QRCodeWriter.QUIET_ZONE_SIZE = 4;\n\n /*import java.util.Map;*/\n /**\n * This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat\n * requested and encodes the barcode with the supplied contents.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class MultiFormatWriter {\n /*@Override*/\n // public encode(contents: string,\n // format: BarcodeFormat,\n // width: number /*int*/,\n // height: number /*int*/): BitMatrix /*throws WriterException */ {\n // return encode(contents, format, width, height, null)\n // }\n /*@Override*/\n encode(contents, format, width /*int*/, height /*int*/, hints) {\n let writer;\n switch (format) {\n // case BarcodeFormat.EAN_8:\n // writer = new EAN8Writer()\n // break\n // case BarcodeFormat.UPC_E:\n // writer = new UPCEWriter()\n // break\n // case BarcodeFormat.EAN_13:\n // writer = new EAN13Writer()\n // break\n // case BarcodeFormat.UPC_A:\n // writer = new UPCAWriter()\n // break\n case BarcodeFormat$1.QR_CODE:\n writer = new QRCodeWriter();\n break;\n // case BarcodeFormat.CODE_39:\n // writer = new Code39Writer()\n // break\n // case BarcodeFormat.CODE_93:\n // writer = new Code93Writer()\n // break\n // case BarcodeFormat.CODE_128:\n // writer = new Code128Writer()\n // break\n // case BarcodeFormat.ITF:\n // writer = new ITFWriter()\n // break\n // case BarcodeFormat.PDF_417:\n // writer = new PDF417Writer()\n // break\n // case BarcodeFormat.CODABAR:\n // writer = new CodaBarWriter()\n // break\n // case BarcodeFormat.DATA_MATRIX:\n // writer = new DataMatrixWriter()\n // break\n // case BarcodeFormat.AZTEC:\n // writer = new AztecWriter()\n // break\n default:\n throw new IllegalArgumentException('No encoder available for format ' + format);\n }\n return writer.encode(contents, format, width, height, hints);\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This object extends LuminanceSource around an array of YUV data returned from the camera driver,\n * with the option to crop to a rectangle within the full data. This can be used to exclude\n * superfluous pixels around the perimeter and speed up decoding.\n *\n * It works for any pixel format where the Y channel is planar and appears first, including\n * YCbCr_420_SP and YCbCr_422_SP.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n class PlanarYUVLuminanceSource extends LuminanceSource {\n constructor(yuvData, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/, width /*int*/, height /*int*/, reverseHorizontal) {\n super(width, height);\n this.yuvData = yuvData;\n this.dataWidth = dataWidth;\n this.dataHeight = dataHeight;\n this.left = left;\n this.top = top;\n if (left + width > dataWidth || top + height > dataHeight) {\n throw new IllegalArgumentException('Crop rectangle does not fit within image data.');\n }\n if (reverseHorizontal) {\n this.reverseHorizontal(width, height);\n }\n }\n /*@Override*/\n getRow(y /*int*/, row) {\n if (y < 0 || y >= this.getHeight()) {\n throw new IllegalArgumentException('Requested row is outside the image: ' + y);\n }\n const width = this.getWidth();\n if (row === null || row === undefined || row.length < width) {\n row = new Uint8ClampedArray(width);\n }\n const offset = (y + this.top) * this.dataWidth + this.left;\n System.arraycopy(this.yuvData, offset, row, 0, width);\n return row;\n }\n /*@Override*/\n getMatrix() {\n const width = this.getWidth();\n const height = this.getHeight();\n // If the caller asks for the entire underlying image, save the copy and give them the\n // original data. The docs specifically warn that result.length must be ignored.\n if (width === this.dataWidth && height === this.dataHeight) {\n return this.yuvData;\n }\n const area = width * height;\n const matrix = new Uint8ClampedArray(area);\n let inputOffset = this.top * this.dataWidth + this.left;\n // If the width matches the full width of the underlying data, perform a single copy.\n if (width === this.dataWidth) {\n System.arraycopy(this.yuvData, inputOffset, matrix, 0, area);\n return matrix;\n }\n // Otherwise copy one cropped row at a time.\n for (let y = 0; y < height; y++) {\n const outputOffset = y * width;\n System.arraycopy(this.yuvData, inputOffset, matrix, outputOffset, width);\n inputOffset += this.dataWidth;\n }\n return matrix;\n }\n /*@Override*/\n isCropSupported() {\n return true;\n }\n /*@Override*/\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n return new PlanarYUVLuminanceSource(this.yuvData, this.dataWidth, this.dataHeight, this.left + left, this.top + top, width, height, false);\n }\n renderThumbnail() {\n const width = this.getWidth() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n const height = this.getHeight() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n const pixels = new Int32Array(width * height);\n const yuv = this.yuvData;\n let inputOffset = this.top * this.dataWidth + this.left;\n for (let y = 0; y < height; y++) {\n const outputOffset = y * width;\n for (let x = 0; x < width; x++) {\n const grey = yuv[inputOffset + x * PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR] & 0xff;\n pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);\n }\n inputOffset += this.dataWidth * PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n }\n return pixels;\n }\n /**\n * @return width of image from {@link #renderThumbnail()}\n */\n getThumbnailWidth() {\n return this.getWidth() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n }\n /**\n * @return height of image from {@link #renderThumbnail()}\n */\n getThumbnailHeight() {\n return this.getHeight() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n }\n reverseHorizontal(width /*int*/, height /*int*/) {\n const yuvData = this.yuvData;\n for (let y = 0, rowStart = this.top * this.dataWidth + this.left; y < height; y++, rowStart += this.dataWidth) {\n const middle = rowStart + width / 2;\n for (let x1 = rowStart, x2 = rowStart + width - 1; x1 < middle; x1++, x2--) {\n const temp = yuvData[x1];\n yuvData[x1] = yuvData[x2];\n yuvData[x2] = temp;\n }\n }\n }\n invert() {\n return new InvertedLuminanceSource(this);\n }\n }\n PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR = 2;\n\n /*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This class is used to help decode images from files which arrive as RGB data from\n * an ARGB pixel array. It does not support rotation.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Betaminos\n */\n class RGBLuminanceSource extends LuminanceSource {\n constructor(luminances, width /*int*/, height /*int*/, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/) {\n super(width, height);\n this.dataWidth = dataWidth;\n this.dataHeight = dataHeight;\n this.left = left;\n this.top = top;\n if (luminances.BYTES_PER_ELEMENT === 4) { // Int32Array\n const size = width * height;\n const luminancesUint8Array = new Uint8ClampedArray(size);\n for (let offset = 0; offset < size; offset++) {\n const pixel = luminances[offset];\n const r = (pixel >> 16) & 0xff; // red\n const g2 = (pixel >> 7) & 0x1fe; // 2 * green\n const b = pixel & 0xff; // blue\n // Calculate green-favouring average cheaply\n luminancesUint8Array[offset] = /*(byte) */ ((r + g2 + b) / 4) & 0xFF;\n }\n this.luminances = luminancesUint8Array;\n }\n else {\n this.luminances = luminances;\n }\n if (undefined === dataWidth) {\n this.dataWidth = width;\n }\n if (undefined === dataHeight) {\n this.dataHeight = height;\n }\n if (undefined === left) {\n this.left = 0;\n }\n if (undefined === top) {\n this.top = 0;\n }\n if (this.left + width > this.dataWidth || this.top + height > this.dataHeight) {\n throw new IllegalArgumentException('Crop rectangle does not fit within image data.');\n }\n }\n /*@Override*/\n getRow(y /*int*/, row) {\n if (y < 0 || y >= this.getHeight()) {\n throw new IllegalArgumentException('Requested row is outside the image: ' + y);\n }\n const width = this.getWidth();\n if (row === null || row === undefined || row.length < width) {\n row = new Uint8ClampedArray(width);\n }\n const offset = (y + this.top) * this.dataWidth + this.left;\n System.arraycopy(this.luminances, offset, row, 0, width);\n return row;\n }\n /*@Override*/\n getMatrix() {\n const width = this.getWidth();\n const height = this.getHeight();\n // If the caller asks for the entire underlying image, save the copy and give them the\n // original data. The docs specifically warn that result.length must be ignored.\n if (width === this.dataWidth && height === this.dataHeight) {\n return this.luminances;\n }\n const area = width * height;\n const matrix = new Uint8ClampedArray(area);\n let inputOffset = this.top * this.dataWidth + this.left;\n // If the width matches the full width of the underlying data, perform a single copy.\n if (width === this.dataWidth) {\n System.arraycopy(this.luminances, inputOffset, matrix, 0, area);\n return matrix;\n }\n // Otherwise copy one cropped row at a time.\n for (let y = 0; y < height; y++) {\n const outputOffset = y * width;\n System.arraycopy(this.luminances, inputOffset, matrix, outputOffset, width);\n inputOffset += this.dataWidth;\n }\n return matrix;\n }\n /*@Override*/\n isCropSupported() {\n return true;\n }\n /*@Override*/\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n return new RGBLuminanceSource(this.luminances, width, height, this.dataWidth, this.dataHeight, this.left + left, this.top + top);\n }\n invert() {\n return new InvertedLuminanceSource(this);\n }\n }\n\n /**\n * Just to make a shortcut between Java code and TS code.\n */\n class Charset extends CharacterSetECI {\n static forName(name) {\n return this.getCharacterSetECIByName(name);\n }\n }\n\n /**\n * Just to make a shortcut between Java code and TS code.\n */\n class StandardCharsets {\n }\n StandardCharsets.ISO_8859_1 = CharacterSetECI.ISO8859_1;\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Aztec 2D code representation\n *\n * @author Rustam Abdullaev\n */\n /*public final*/ class AztecCode {\n /**\n * @return {@code true} if compact instead of full mode\n */\n isCompact() {\n return this.compact;\n }\n setCompact(compact) {\n this.compact = compact;\n }\n /**\n * @return size in pixels (width and height)\n */\n getSize() {\n return this.size;\n }\n setSize(size) {\n this.size = size;\n }\n /**\n * @return number of levels\n */\n getLayers() {\n return this.layers;\n }\n setLayers(layers) {\n this.layers = layers;\n }\n /**\n * @return number of data codewords\n */\n getCodeWords() {\n return this.codeWords;\n }\n setCodeWords(codeWords) {\n this.codeWords = codeWords;\n }\n /**\n * @return the symbol image\n */\n getMatrix() {\n return this.matrix;\n }\n setMatrix(matrix) {\n this.matrix = matrix;\n }\n }\n\n class Collections {\n /**\n * The singletonList(T) method is used to return an immutable list containing only the specified object.\n */\n static singletonList(item) {\n return [item];\n }\n /**\n * The min(Collection, Comparator) method is used to return the minimum element of the given collection, according to the order induced by the specified comparator.\n */\n static min(collection, comparator) {\n return collection.sort(comparator)[0];\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n class Token {\n constructor(previous) {\n this.previous = previous;\n }\n getPrevious() {\n return this.previous;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*final*/ class SimpleToken extends Token {\n constructor(previous, value, bitCount) {\n super(previous);\n this.value = value;\n this.bitCount = bitCount;\n }\n /**\n * @Override\n */\n appendTo(bitArray, text) {\n bitArray.appendBits(this.value, this.bitCount);\n }\n add(value, bitCount) {\n return new SimpleToken(this, value, bitCount);\n }\n addBinaryShift(start, byteCount) {\n // no-op can't binary shift a simple token\n console.warn('addBinaryShift on SimpleToken, this simply returns a copy of this token');\n return new SimpleToken(this, start, byteCount);\n }\n /**\n * @Override\n */\n toString() {\n let value = this.value & ((1 << this.bitCount) - 1);\n value |= 1 << this.bitCount;\n return '<' + Integer.toBinaryString(value | (1 << this.bitCount)).substring(1) + '>';\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /*final*/ class BinaryShiftToken extends SimpleToken {\n constructor(previous, binaryShiftStart, binaryShiftByteCount) {\n super(previous, 0, 0);\n this.binaryShiftStart = binaryShiftStart;\n this.binaryShiftByteCount = binaryShiftByteCount;\n }\n /**\n * @Override\n */\n appendTo(bitArray, text) {\n for (let i = 0; i < this.binaryShiftByteCount; i++) {\n if (i === 0 || (i === 31 && this.binaryShiftByteCount <= 62)) {\n // We need a header before the first character, and before\n // character 31 when the total byte code is <= 62\n bitArray.appendBits(31, 5); // BINARY_SHIFT\n if (this.binaryShiftByteCount > 62) {\n bitArray.appendBits(this.binaryShiftByteCount - 31, 16);\n }\n else if (i === 0) {\n // 1 <= binaryShiftByteCode <= 62\n bitArray.appendBits(Math.min(this.binaryShiftByteCount, 31), 5);\n }\n else {\n // 32 <= binaryShiftCount <= 62 and i == 31\n bitArray.appendBits(this.binaryShiftByteCount - 31, 5);\n }\n }\n bitArray.appendBits(text[this.binaryShiftStart + i], 8);\n }\n }\n addBinaryShift(start, byteCount) {\n // int bitCount = (byteCount * 8) + (byteCount <= 31 ? 10 : byteCount <= 62 ? 20 : 21);\n return new BinaryShiftToken(this, start, byteCount);\n }\n /**\n * @Override\n */\n toString() {\n return '<' + this.binaryShiftStart + '::' + (this.binaryShiftStart + this.binaryShiftByteCount - 1) + '>';\n }\n }\n\n function addBinaryShift(token, start, byteCount) {\n // int bitCount = (byteCount * 8) + (byteCount <= 31 ? 10 : byteCount <= 62 ? 20 : 21);\n return new BinaryShiftToken(token, start, byteCount);\n }\n function add(token, value, bitCount) {\n return new SimpleToken(token, value, bitCount);\n }\n\n const /*final*/ MODE_NAMES = [\n 'UPPER',\n 'LOWER',\n 'DIGIT',\n 'MIXED',\n 'PUNCT'\n ];\n const /*final*/ MODE_UPPER = 0; // 5 bits\n const /*final*/ MODE_LOWER = 1; // 5 bits\n const /*final*/ MODE_DIGIT = 2; // 4 bits\n const /*final*/ MODE_MIXED = 3; // 5 bits\n const /*final*/ MODE_PUNCT = 4; // 5 bits\n const EMPTY_TOKEN = new SimpleToken(null, 0, 0);\n\n // The Latch Table shows, for each pair of Modes, the optimal method for\n // getting from one mode to another. In the worst possible case, this can\n // be up to 14 bits. In the best possible case, we are already there!\n // The high half-word of each entry gives the number of bits.\n // The low half-word of each entry are the actual bits necessary to change\n const LATCH_TABLE = [\n Int32Array.from([\n 0,\n (5 << 16) + 28,\n (5 << 16) + 30,\n (5 << 16) + 29,\n (10 << 16) + (29 << 5) + 30 // UPPER -> MIXED -> PUNCT\n ]),\n Int32Array.from([\n (9 << 16) + (30 << 4) + 14,\n 0,\n (5 << 16) + 30,\n (5 << 16) + 29,\n (10 << 16) + (29 << 5) + 30 // LOWER -> MIXED -> PUNCT\n ]),\n Int32Array.from([\n (4 << 16) + 14,\n (9 << 16) + (14 << 5) + 28,\n 0,\n (9 << 16) + (14 << 5) + 29,\n (14 << 16) + (14 << 10) + (29 << 5) + 30\n // DIGIT -> UPPER -> MIXED -> PUNCT\n ]),\n Int32Array.from([\n (5 << 16) + 29,\n (5 << 16) + 28,\n (10 << 16) + (29 << 5) + 30,\n 0,\n (5 << 16) + 30 // MIXED -> PUNCT\n ]),\n Int32Array.from([\n (5 << 16) + 31,\n (10 << 16) + (31 << 5) + 28,\n (10 << 16) + (31 << 5) + 30,\n (10 << 16) + (31 << 5) + 29,\n 0\n ])\n ];\n\n function static_SHIFT_TABLE(SHIFT_TABLE) {\n for (let table /*Int32Array*/ of SHIFT_TABLE) {\n Arrays.fill(table, -1);\n }\n SHIFT_TABLE[MODE_UPPER][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_LOWER][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_LOWER][MODE_UPPER] = 28;\n SHIFT_TABLE[MODE_MIXED][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_DIGIT][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_DIGIT][MODE_UPPER] = 15;\n return SHIFT_TABLE;\n }\n const /*final*/ SHIFT_TABLE = static_SHIFT_TABLE(Arrays.createInt32Array(6, 6)); // mode shift codes, per table\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * State represents all information about a sequence necessary to generate the current output.\n * Note that a state is immutable.\n */\n /*final*/ class State {\n constructor(token, mode, binaryBytes, bitCount) {\n this.token = token;\n this.mode = mode;\n this.binaryShiftByteCount = binaryBytes;\n this.bitCount = bitCount;\n // Make sure we match the token\n // int binaryShiftBitCount = (binaryShiftByteCount * 8) +\n // (binaryShiftByteCount === 0 ? 0 :\n // binaryShiftByteCount <= 31 ? 10 :\n // binaryShiftByteCount <= 62 ? 20 : 21);\n // assert this.bitCount === token.getTotalBitCount() + binaryShiftBitCount;\n }\n getMode() {\n return this.mode;\n }\n getToken() {\n return this.token;\n }\n getBinaryShiftByteCount() {\n return this.binaryShiftByteCount;\n }\n getBitCount() {\n return this.bitCount;\n }\n // Create a new state representing this state with a latch to a (not\n // necessary different) mode, and then a code.\n latchAndAppend(mode, value) {\n // assert binaryShiftByteCount === 0;\n let bitCount = this.bitCount;\n let token = this.token;\n if (mode !== this.mode) {\n let latch = LATCH_TABLE[this.mode][mode];\n token = add(token, latch & 0xffff, latch >> 16);\n bitCount += latch >> 16;\n }\n let latchModeBitCount = mode === MODE_DIGIT ? 4 : 5;\n token = add(token, value, latchModeBitCount);\n return new State(token, mode, 0, bitCount + latchModeBitCount);\n }\n // Create a new state representing this state, with a temporary shift\n // to a different mode to output a single value.\n shiftAndAppend(mode, value) {\n // assert binaryShiftByteCount === 0 && this.mode !== mode;\n let token = this.token;\n let thisModeBitCount = this.mode === MODE_DIGIT ? 4 : 5;\n // Shifts exist only to UPPER and PUNCT, both with tokens size 5.\n token = add(token, SHIFT_TABLE[this.mode][mode], thisModeBitCount);\n token = add(token, value, 5);\n return new State(token, this.mode, 0, this.bitCount + thisModeBitCount + 5);\n }\n // Create a new state representing this state, but an additional character\n // output in Binary Shift mode.\n addBinaryShiftChar(index) {\n let token = this.token;\n let mode = this.mode;\n let bitCount = this.bitCount;\n if (this.mode === MODE_PUNCT || this.mode === MODE_DIGIT) {\n // assert binaryShiftByteCount === 0;\n let latch = LATCH_TABLE[mode][MODE_UPPER];\n token = add(token, latch & 0xffff, latch >> 16);\n bitCount += latch >> 16;\n mode = MODE_UPPER;\n }\n let deltaBitCount = this.binaryShiftByteCount === 0 || this.binaryShiftByteCount === 31\n ? 18\n : this.binaryShiftByteCount === 62\n ? 9\n : 8;\n let result = new State(token, mode, this.binaryShiftByteCount + 1, bitCount + deltaBitCount);\n if (result.binaryShiftByteCount === 2047 + 31) {\n // The string is as long as it's allowed to be. We should end it.\n result = result.endBinaryShift(index + 1);\n }\n return result;\n }\n // Create the state identical to this one, but we are no longer in\n // Binary Shift mode.\n endBinaryShift(index) {\n if (this.binaryShiftByteCount === 0) {\n return this;\n }\n let token = this.token;\n token = addBinaryShift(token, index - this.binaryShiftByteCount, this.binaryShiftByteCount);\n // assert token.getTotalBitCount() === this.bitCount;\n return new State(token, this.mode, 0, this.bitCount);\n }\n // Returns true if \"this\" state is better (equal: or) to be in than \"that\"\n // state under all possible circumstances.\n isBetterThanOrEqualTo(other) {\n let newModeBitCount = this.bitCount + (LATCH_TABLE[this.mode][other.mode] >> 16);\n if (this.binaryShiftByteCount < other.binaryShiftByteCount) {\n // add additional B/S encoding cost of other, if any\n newModeBitCount +=\n State.calculateBinaryShiftCost(other) -\n State.calculateBinaryShiftCost(this);\n }\n else if (this.binaryShiftByteCount > other.binaryShiftByteCount &&\n other.binaryShiftByteCount > 0) {\n // maximum possible additional cost (it: h)\n newModeBitCount += 10;\n }\n return newModeBitCount <= other.bitCount;\n }\n toBitArray(text) {\n // Reverse the tokens, so that they are in the order that they should\n // be output\n let symbols = [];\n for (let token = this.endBinaryShift(text.length).token; token !== null; token = token.getPrevious()) {\n symbols.unshift(token);\n }\n let bitArray = new BitArray();\n // Add each token to the result.\n for (const symbol of symbols) {\n symbol.appendTo(bitArray, text);\n }\n // assert bitArray.getSize() === this.bitCount;\n return bitArray;\n }\n /**\n * @Override\n */\n toString() {\n return StringUtils.format('%s bits=%d bytes=%d', MODE_NAMES[this.mode], this.bitCount, this.binaryShiftByteCount);\n }\n static calculateBinaryShiftCost(state) {\n if (state.binaryShiftByteCount > 62) {\n return 21; // B/S with extended length\n }\n if (state.binaryShiftByteCount > 31) {\n return 20; // two B/S\n }\n if (state.binaryShiftByteCount > 0) {\n return 10; // one B/S\n }\n return 0;\n }\n }\n State.INITIAL_STATE = new State(EMPTY_TOKEN, MODE_UPPER, 0, 0);\n\n function static_CHAR_MAP(CHAR_MAP) {\n const spaceCharCode = StringUtils.getCharCode(' ');\n const pointCharCode = StringUtils.getCharCode('.');\n const commaCharCode = StringUtils.getCharCode(',');\n CHAR_MAP[MODE_UPPER][spaceCharCode] = 1;\n const zUpperCharCode = StringUtils.getCharCode('Z');\n const aUpperCharCode = StringUtils.getCharCode('A');\n for (let c = aUpperCharCode; c <= zUpperCharCode; c++) {\n CHAR_MAP[MODE_UPPER][c] = c - aUpperCharCode + 2;\n }\n CHAR_MAP[MODE_LOWER][spaceCharCode] = 1;\n const zLowerCharCode = StringUtils.getCharCode('z');\n const aLowerCharCode = StringUtils.getCharCode('a');\n for (let c = aLowerCharCode; c <= zLowerCharCode; c++) {\n CHAR_MAP[MODE_LOWER][c] = c - aLowerCharCode + 2;\n }\n CHAR_MAP[MODE_DIGIT][spaceCharCode] = 1;\n const nineCharCode = StringUtils.getCharCode('9');\n const zeroCharCode = StringUtils.getCharCode('0');\n for (let c = zeroCharCode; c <= nineCharCode; c++) {\n CHAR_MAP[MODE_DIGIT][c] = c - zeroCharCode + 2;\n }\n CHAR_MAP[MODE_DIGIT][commaCharCode] = 12;\n CHAR_MAP[MODE_DIGIT][pointCharCode] = 13;\n const mixedTable = [\n '\\x00',\n ' ',\n '\\x01',\n '\\x02',\n '\\x03',\n '\\x04',\n '\\x05',\n '\\x06',\n '\\x07',\n '\\b',\n '\\t',\n '\\n',\n '\\x0b',\n '\\f',\n '\\r',\n '\\x1b',\n '\\x1c',\n '\\x1d',\n '\\x1e',\n '\\x1f',\n '@',\n '\\\\',\n '^',\n '_',\n '`',\n '|',\n '~',\n '\\x7f'\n ];\n for (let i = 0; i < mixedTable.length; i++) {\n CHAR_MAP[MODE_MIXED][StringUtils.getCharCode(mixedTable[i])] = i;\n }\n const punctTable = [\n '\\x00',\n '\\r',\n '\\x00',\n '\\x00',\n '\\x00',\n '\\x00',\n '!',\n '\\'',\n '#',\n '$',\n '%',\n '&',\n '\\'',\n '(',\n ')',\n '*',\n '+',\n ',',\n '-',\n '.',\n '/',\n ':',\n ';',\n '<',\n '=',\n '>',\n '?',\n '[',\n ']',\n '{',\n '}'\n ];\n for (let i = 0; i < punctTable.length; i++) {\n if (StringUtils.getCharCode(punctTable[i]) > 0) {\n CHAR_MAP[MODE_PUNCT][StringUtils.getCharCode(punctTable[i])] = i;\n }\n }\n return CHAR_MAP;\n }\n const CHAR_MAP = static_CHAR_MAP(Arrays.createInt32Array(5, 256));\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * This produces nearly optimal encodings of text into the first-level of\n * encoding used by Aztec code.\n *\n * It uses a dynamic algorithm. For each prefix of the string, it determines\n * a set of encodings that could lead to this prefix. We repeatedly add a\n * character and generate a new set of optimal encodings until we have read\n * through the entire input.\n *\n * @author Frank Yellin\n * @author Rustam Abdullaev\n */\n /*public final*/ class HighLevelEncoder {\n constructor(text) {\n this.text = text;\n }\n /**\n * @return text represented by this encoder encoded as a {@link BitArray}\n */\n encode() {\n const spaceCharCode = StringUtils.getCharCode(' ');\n const lineBreakCharCode = StringUtils.getCharCode('\\n');\n let states = Collections.singletonList(State.INITIAL_STATE);\n for (let index = 0; index < this.text.length; index++) {\n let pairCode;\n let nextChar = index + 1 < this.text.length ? this.text[index + 1] : 0;\n switch (this.text[index]) {\n case StringUtils.getCharCode('\\r'):\n pairCode = nextChar === lineBreakCharCode ? 2 : 0;\n break;\n case StringUtils.getCharCode('.'):\n pairCode = nextChar === spaceCharCode ? 3 : 0;\n break;\n case StringUtils.getCharCode(','):\n pairCode = nextChar === spaceCharCode ? 4 : 0;\n break;\n case StringUtils.getCharCode(':'):\n pairCode = nextChar === spaceCharCode ? 5 : 0;\n break;\n default:\n pairCode = 0;\n }\n if (pairCode > 0) {\n // We have one of the four special PUNCT pairs. Treat them specially.\n // Get a new set of states for the two new characters.\n states = HighLevelEncoder.updateStateListForPair(states, index, pairCode);\n index++;\n }\n else {\n // Get a new set of states for the new character.\n states = this.updateStateListForChar(states, index);\n }\n }\n // We are left with a set of states. Find the shortest one.\n const minState = Collections.min(states, (a, b) => {\n return a.getBitCount() - b.getBitCount();\n });\n // Convert it to a bit array, and return.\n return minState.toBitArray(this.text);\n }\n // We update a set of states for a new character by updating each state\n // for the new character, merging the results, and then removing the\n // non-optimal states.\n updateStateListForChar(states, index) {\n const result = [];\n for (let state /*State*/ of states) {\n this.updateStateForChar(state, index, result);\n }\n return HighLevelEncoder.simplifyStates(result);\n }\n // Return a set of states that represent the possible ways of updating this\n // state for the next character. The resulting set of states are added to\n // the \"result\" list.\n updateStateForChar(state, index, result) {\n let ch = (this.text[index] & 0xff);\n let charInCurrentTable = CHAR_MAP[state.getMode()][ch] > 0;\n let stateNoBinary = null;\n for (let mode /*int*/ = 0; mode <= MODE_PUNCT; mode++) {\n let charInMode = CHAR_MAP[mode][ch];\n if (charInMode > 0) {\n if (stateNoBinary == null) {\n // Only create stateNoBinary the first time it's required.\n stateNoBinary = state.endBinaryShift(index);\n }\n // Try generating the character by latching to its mode\n if (!charInCurrentTable ||\n mode === state.getMode() ||\n mode === MODE_DIGIT) {\n // If the character is in the current table, we don't want to latch to\n // any other mode except possibly digit (which uses only 4 bits). Any\n // other latch would be equally successful *after* this character, and\n // so wouldn't save any bits.\n const latchState = stateNoBinary.latchAndAppend(mode, charInMode);\n result.push(latchState);\n }\n // Try generating the character by switching to its mode.\n if (!charInCurrentTable &&\n SHIFT_TABLE[state.getMode()][mode] >= 0) {\n // It never makes sense to temporarily shift to another mode if the\n // character exists in the current mode. That can never save bits.\n const shiftState = stateNoBinary.shiftAndAppend(mode, charInMode);\n result.push(shiftState);\n }\n }\n }\n if (state.getBinaryShiftByteCount() > 0 ||\n CHAR_MAP[state.getMode()][ch] === 0) {\n // It's never worthwhile to go into binary shift mode if you're not already\n // in binary shift mode, and the character exists in your current mode.\n // That can never save bits over just outputting the char in the current mode.\n let binaryState = state.addBinaryShiftChar(index);\n result.push(binaryState);\n }\n }\n static updateStateListForPair(states, index, pairCode) {\n const result = [];\n for (let state /*State*/ of states) {\n this.updateStateForPair(state, index, pairCode, result);\n }\n return this.simplifyStates(result);\n }\n static updateStateForPair(state, index, pairCode, result) {\n let stateNoBinary = state.endBinaryShift(index);\n // Possibility 1. Latch to C.MODE_PUNCT, and then append this code\n result.push(stateNoBinary.latchAndAppend(MODE_PUNCT, pairCode));\n if (state.getMode() !== MODE_PUNCT) {\n // Possibility 2. Shift to C.MODE_PUNCT, and then append this code.\n // Every state except C.MODE_PUNCT (handled above) can shift\n result.push(stateNoBinary.shiftAndAppend(MODE_PUNCT, pairCode));\n }\n if (pairCode === 3 || pairCode === 4) {\n // both characters are in DIGITS. Sometimes better to just add two digits\n let digitState = stateNoBinary\n .latchAndAppend(MODE_DIGIT, 16 - pairCode) // period or comma in DIGIT\n .latchAndAppend(MODE_DIGIT, 1); // space in DIGIT\n result.push(digitState);\n }\n if (state.getBinaryShiftByteCount() > 0) {\n // It only makes sense to do the characters as binary if we're already\n // in binary mode.\n let binaryState = state\n .addBinaryShiftChar(index)\n .addBinaryShiftChar(index + 1);\n result.push(binaryState);\n }\n }\n static simplifyStates(states) {\n let result = [];\n for (const newState of states) {\n let add = true;\n for (const oldState of result) {\n if (oldState.isBetterThanOrEqualTo(newState)) {\n add = false;\n break;\n }\n if (newState.isBetterThanOrEqualTo(oldState)) {\n // iterator.remove();\n result = result.filter(x => x !== oldState); // remove old state\n }\n }\n if (add) {\n result.push(newState);\n }\n }\n return result;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // package com.google.zxing.aztec.encoder;\n // import com.google.zxing.common.BitArray;\n // import com.google.zxing.common.BitMatrix;\n // import com.google.zxing.common.reedsolomon.GenericGF;\n // import com.google.zxing.common.reedsolomon.ReedSolomonEncoder;\n /**\n * Generates Aztec 2D barcodes.\n *\n * @author Rustam Abdullaev\n */\n /*public final*/ class Encoder$1 {\n constructor() {\n }\n /**\n * Encodes the given binary content as an Aztec symbol\n *\n * @param data input data string\n * @return Aztec symbol matrix with metadata\n */\n static encodeBytes(data) {\n return Encoder$1.encode(data, Encoder$1.DEFAULT_EC_PERCENT, Encoder$1.DEFAULT_AZTEC_LAYERS);\n }\n /**\n * Encodes the given binary content as an Aztec symbol\n *\n * @param data input data string\n * @param minECCPercent minimal percentage of error check words (According to ISO/IEC 24778:2008,\n * a minimum of 23% + 3 words is recommended)\n * @param userSpecifiedLayers if non-zero, a user-specified value for the number of layers\n * @return Aztec symbol matrix with metadata\n */\n static encode(data, minECCPercent, userSpecifiedLayers) {\n // High-level encode\n let bits = new HighLevelEncoder(data).encode();\n // stuff bits and choose symbol size\n let eccBits = Integer.truncDivision((bits.getSize() * minECCPercent), 100) + 11;\n let totalSizeBits = bits.getSize() + eccBits;\n let compact;\n let layers;\n let totalBitsInLayer;\n let wordSize;\n let stuffedBits;\n if (userSpecifiedLayers !== Encoder$1.DEFAULT_AZTEC_LAYERS) {\n compact = userSpecifiedLayers < 0;\n layers = Math.abs(userSpecifiedLayers);\n if (layers > (compact ? Encoder$1.MAX_NB_BITS_COMPACT : Encoder$1.MAX_NB_BITS)) {\n throw new IllegalArgumentException(StringUtils.format('Illegal value %s for layers', userSpecifiedLayers));\n }\n totalBitsInLayer = Encoder$1.totalBitsInLayer(layers, compact);\n wordSize = Encoder$1.WORD_SIZE[layers];\n let usableBitsInLayers = totalBitsInLayer - (totalBitsInLayer % wordSize);\n stuffedBits = Encoder$1.stuffBits(bits, wordSize);\n if (stuffedBits.getSize() + eccBits > usableBitsInLayers) {\n throw new IllegalArgumentException('Data to large for user specified layer');\n }\n if (compact && stuffedBits.getSize() > wordSize * 64) {\n // Compact format only allows 64 data words, though C4 can hold more words than that\n throw new IllegalArgumentException('Data to large for user specified layer');\n }\n }\n else {\n wordSize = 0;\n stuffedBits = null;\n // We look at the possible table sizes in the order Compact1, Compact2, Compact3,\n // Compact4, Normal4,... Normal(i) for i < 4 isn't typically used since Compact(i+1)\n // is the same size, but has more data.\n for (let i /*int*/ = 0;; i++) {\n if (i > Encoder$1.MAX_NB_BITS) {\n throw new IllegalArgumentException('Data too large for an Aztec code');\n }\n compact = i <= 3;\n layers = compact ? i + 1 : i;\n totalBitsInLayer = Encoder$1.totalBitsInLayer(layers, compact);\n if (totalSizeBits > totalBitsInLayer) {\n continue;\n }\n // [Re]stuff the bits if this is the first opportunity, or if the\n // wordSize has changed\n if (stuffedBits == null || wordSize !== Encoder$1.WORD_SIZE[layers]) {\n wordSize = Encoder$1.WORD_SIZE[layers];\n stuffedBits = Encoder$1.stuffBits(bits, wordSize);\n }\n let usableBitsInLayers = totalBitsInLayer - (totalBitsInLayer % wordSize);\n if (compact && stuffedBits.getSize() > wordSize * 64) {\n // Compact format only allows 64 data words, though C4 can hold more words than that\n continue;\n }\n if (stuffedBits.getSize() + eccBits <= usableBitsInLayers) {\n break;\n }\n }\n }\n let messageBits = Encoder$1.generateCheckWords(stuffedBits, totalBitsInLayer, wordSize);\n // generate mode message\n let messageSizeInWords = stuffedBits.getSize() / wordSize;\n let modeMessage = Encoder$1.generateModeMessage(compact, layers, messageSizeInWords);\n // allocate symbol\n let baseMatrixSize = (compact ? 11 : 14) + layers * 4; // not including alignment lines\n let alignmentMap = new Int32Array(baseMatrixSize);\n let matrixSize;\n if (compact) {\n // no alignment marks in compact mode, alignmentMap is a no-op\n matrixSize = baseMatrixSize;\n for (let i /*int*/ = 0; i < alignmentMap.length; i++) {\n alignmentMap[i] = i;\n }\n }\n else {\n matrixSize = baseMatrixSize + 1 + 2 * Integer.truncDivision((Integer.truncDivision(baseMatrixSize, 2) - 1), 15);\n let origCenter = Integer.truncDivision(baseMatrixSize, 2);\n let center = Integer.truncDivision(matrixSize, 2);\n for (let i /*int*/ = 0; i < origCenter; i++) {\n let newOffset = i + Integer.truncDivision(i, 15);\n alignmentMap[origCenter - i - 1] = center - newOffset - 1;\n alignmentMap[origCenter + i] = center + newOffset + 1;\n }\n }\n let matrix = new BitMatrix(matrixSize);\n // draw data bits\n for (let i /*int*/ = 0, rowOffset = 0; i < layers; i++) {\n let rowSize = (layers - i) * 4 + (compact ? 9 : 12);\n for (let j /*int*/ = 0; j < rowSize; j++) {\n let columnOffset = j * 2;\n for (let k /*int*/ = 0; k < 2; k++) {\n if (messageBits.get(rowOffset + columnOffset + k)) {\n matrix.set(alignmentMap[i * 2 + k], alignmentMap[i * 2 + j]);\n }\n if (messageBits.get(rowOffset + rowSize * 2 + columnOffset + k)) {\n matrix.set(alignmentMap[i * 2 + j], alignmentMap[baseMatrixSize - 1 - i * 2 - k]);\n }\n if (messageBits.get(rowOffset + rowSize * 4 + columnOffset + k)) {\n matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - k], alignmentMap[baseMatrixSize - 1 - i * 2 - j]);\n }\n if (messageBits.get(rowOffset + rowSize * 6 + columnOffset + k)) {\n matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - j], alignmentMap[i * 2 + k]);\n }\n }\n }\n rowOffset += rowSize * 8;\n }\n // draw mode message\n Encoder$1.drawModeMessage(matrix, compact, matrixSize, modeMessage);\n // draw alignment marks\n if (compact) {\n Encoder$1.drawBullsEye(matrix, Integer.truncDivision(matrixSize, 2), 5);\n }\n else {\n Encoder$1.drawBullsEye(matrix, Integer.truncDivision(matrixSize, 2), 7);\n for (let i /*int*/ = 0, j = 0; i < Integer.truncDivision(baseMatrixSize, 2) - 1; i += 15, j += 16) {\n for (let k /*int*/ = Integer.truncDivision(matrixSize, 2) & 1; k < matrixSize; k += 2) {\n matrix.set(Integer.truncDivision(matrixSize, 2) - j, k);\n matrix.set(Integer.truncDivision(matrixSize, 2) + j, k);\n matrix.set(k, Integer.truncDivision(matrixSize, 2) - j);\n matrix.set(k, Integer.truncDivision(matrixSize, 2) + j);\n }\n }\n }\n let aztec = new AztecCode();\n aztec.setCompact(compact);\n aztec.setSize(matrixSize);\n aztec.setLayers(layers);\n aztec.setCodeWords(messageSizeInWords);\n aztec.setMatrix(matrix);\n return aztec;\n }\n static drawBullsEye(matrix, center, size) {\n for (let i /*int*/ = 0; i < size; i += 2) {\n for (let j /*int*/ = center - i; j <= center + i; j++) {\n matrix.set(j, center - i);\n matrix.set(j, center + i);\n matrix.set(center - i, j);\n matrix.set(center + i, j);\n }\n }\n matrix.set(center - size, center - size);\n matrix.set(center - size + 1, center - size);\n matrix.set(center - size, center - size + 1);\n matrix.set(center + size, center - size);\n matrix.set(center + size, center - size + 1);\n matrix.set(center + size, center + size - 1);\n }\n static generateModeMessage(compact, layers, messageSizeInWords) {\n let modeMessage = new BitArray();\n if (compact) {\n modeMessage.appendBits(layers - 1, 2);\n modeMessage.appendBits(messageSizeInWords - 1, 6);\n modeMessage = Encoder$1.generateCheckWords(modeMessage, 28, 4);\n }\n else {\n modeMessage.appendBits(layers - 1, 5);\n modeMessage.appendBits(messageSizeInWords - 1, 11);\n modeMessage = Encoder$1.generateCheckWords(modeMessage, 40, 4);\n }\n return modeMessage;\n }\n static drawModeMessage(matrix, compact, matrixSize, modeMessage) {\n let center = Integer.truncDivision(matrixSize, 2);\n if (compact) {\n for (let i /*int*/ = 0; i < 7; i++) {\n let offset = center - 3 + i;\n if (modeMessage.get(i)) {\n matrix.set(offset, center - 5);\n }\n if (modeMessage.get(i + 7)) {\n matrix.set(center + 5, offset);\n }\n if (modeMessage.get(20 - i)) {\n matrix.set(offset, center + 5);\n }\n if (modeMessage.get(27 - i)) {\n matrix.set(center - 5, offset);\n }\n }\n }\n else {\n for (let i /*int*/ = 0; i < 10; i++) {\n let offset = center - 5 + i + Integer.truncDivision(i, 5);\n if (modeMessage.get(i)) {\n matrix.set(offset, center - 7);\n }\n if (modeMessage.get(i + 10)) {\n matrix.set(center + 7, offset);\n }\n if (modeMessage.get(29 - i)) {\n matrix.set(offset, center + 7);\n }\n if (modeMessage.get(39 - i)) {\n matrix.set(center - 7, offset);\n }\n }\n }\n }\n static generateCheckWords(bitArray, totalBits, wordSize) {\n // bitArray is guaranteed to be a multiple of the wordSize, so no padding needed\n let messageSizeInWords = bitArray.getSize() / wordSize;\n let rs = new ReedSolomonEncoder(Encoder$1.getGF(wordSize));\n let totalWords = Integer.truncDivision(totalBits, wordSize);\n let messageWords = Encoder$1.bitsToWords(bitArray, wordSize, totalWords);\n rs.encode(messageWords, totalWords - messageSizeInWords);\n let startPad = totalBits % wordSize;\n let messageBits = new BitArray();\n messageBits.appendBits(0, startPad);\n for (const messageWord /*: int*/ of Array.from(messageWords)) {\n messageBits.appendBits(messageWord, wordSize);\n }\n return messageBits;\n }\n static bitsToWords(stuffedBits, wordSize, totalWords) {\n let message = new Int32Array(totalWords);\n let i;\n let n;\n for (i = 0, n = stuffedBits.getSize() / wordSize; i < n; i++) {\n let value = 0;\n for (let j /*int*/ = 0; j < wordSize; j++) {\n value |= stuffedBits.get(i * wordSize + j) ? (1 << wordSize - j - 1) : 0;\n }\n message[i] = value;\n }\n return message;\n }\n static getGF(wordSize) {\n switch (wordSize) {\n case 4:\n return GenericGF.AZTEC_PARAM;\n case 6:\n return GenericGF.AZTEC_DATA_6;\n case 8:\n return GenericGF.AZTEC_DATA_8;\n case 10:\n return GenericGF.AZTEC_DATA_10;\n case 12:\n return GenericGF.AZTEC_DATA_12;\n default:\n throw new IllegalArgumentException('Unsupported word size ' + wordSize);\n }\n }\n static stuffBits(bits, wordSize) {\n let out = new BitArray();\n let n = bits.getSize();\n let mask = (1 << wordSize) - 2;\n for (let i /*int*/ = 0; i < n; i += wordSize) {\n let word = 0;\n for (let j /*int*/ = 0; j < wordSize; j++) {\n if (i + j >= n || bits.get(i + j)) {\n word |= 1 << (wordSize - 1 - j);\n }\n }\n if ((word & mask) === mask) {\n out.appendBits(word & mask, wordSize);\n i--;\n }\n else if ((word & mask) === 0) {\n out.appendBits(word | 1, wordSize);\n i--;\n }\n else {\n out.appendBits(word, wordSize);\n }\n }\n return out;\n }\n static totalBitsInLayer(layers, compact) {\n return ((compact ? 88 : 112) + 16 * layers) * layers;\n }\n }\n Encoder$1.DEFAULT_EC_PERCENT = 33; // default minimal percentage of error check words\n Encoder$1.DEFAULT_AZTEC_LAYERS = 0;\n Encoder$1.MAX_NB_BITS = 32;\n Encoder$1.MAX_NB_BITS_COMPACT = 4;\n Encoder$1.WORD_SIZE = Int32Array.from([\n 4, 6, 6, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 12, 12\n ]);\n\n /*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Renders an Aztec code as a {@link BitMatrix}.\n */\n /*public final*/ class AztecWriter {\n // @Override\n encode(contents, format, width, height) {\n return this.encodeWithHints(contents, format, width, height, null);\n }\n // @Override\n encodeWithHints(contents, format, width, height, hints) {\n let charset = StandardCharsets.ISO_8859_1;\n let eccPercent = Encoder$1.DEFAULT_EC_PERCENT;\n let layers = Encoder$1.DEFAULT_AZTEC_LAYERS;\n if (hints != null) {\n if (hints.has(EncodeHintType$1.CHARACTER_SET)) {\n charset = Charset.forName(hints.get(EncodeHintType$1.CHARACTER_SET).toString());\n }\n if (hints.has(EncodeHintType$1.ERROR_CORRECTION)) {\n eccPercent = Integer.parseInt(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());\n }\n if (hints.has(EncodeHintType$1.AZTEC_LAYERS)) {\n layers = Integer.parseInt(hints.get(EncodeHintType$1.AZTEC_LAYERS).toString());\n }\n }\n return AztecWriter.encodeLayers(contents, format, width, height, charset, eccPercent, layers);\n }\n static encodeLayers(contents, format, width, height, charset, eccPercent, layers) {\n if (format !== BarcodeFormat$1.AZTEC) {\n throw new IllegalArgumentException('Can only encode AZTEC, but got ' + format);\n }\n let aztec = Encoder$1.encode(StringUtils.getBytes(contents, charset), eccPercent, layers);\n return AztecWriter.renderResult(aztec, width, height);\n }\n static renderResult(code, width, height) {\n let input = code.getMatrix();\n if (input == null) {\n throw new IllegalStateException();\n }\n let inputWidth = input.getWidth();\n let inputHeight = input.getHeight();\n let outputWidth = Math.max(width, inputWidth);\n let outputHeight = Math.max(height, inputHeight);\n let multiple = Math.min(outputWidth / inputWidth, outputHeight / inputHeight);\n let leftPadding = (outputWidth - (inputWidth * multiple)) / 2;\n let topPadding = (outputHeight - (inputHeight * multiple)) / 2;\n let output = new BitMatrix(outputWidth, outputHeight);\n for (let inputY /*int*/ = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {\n // Write the contents of this row of the barcode\n for (let inputX /*int*/ = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {\n if (input.get(inputX, inputY)) {\n output.setRegion(outputX, outputY, multiple, multiple);\n }\n }\n }\n return output;\n }\n }\n\n exports.AbstractExpandedDecoder = AbstractExpandedDecoder;\n exports.ArgumentException = ArgumentException;\n exports.ArithmeticException = ArithmeticException;\n exports.AztecCode = AztecCode;\n exports.AztecCodeReader = AztecReader;\n exports.AztecCodeWriter = AztecWriter;\n exports.AztecDecoder = Decoder;\n exports.AztecDetector = Detector;\n exports.AztecDetectorResult = AztecDetectorResult;\n exports.AztecEncoder = Encoder$1;\n exports.AztecHighLevelEncoder = HighLevelEncoder;\n exports.AztecPoint = Point;\n exports.BarcodeFormat = BarcodeFormat$1;\n exports.Binarizer = Binarizer;\n exports.BinaryBitmap = BinaryBitmap;\n exports.BitArray = BitArray;\n exports.BitMatrix = BitMatrix;\n exports.BitSource = BitSource;\n exports.BrowserAztecCodeReader = BrowserAztecCodeReader;\n exports.BrowserBarcodeReader = BrowserBarcodeReader;\n exports.BrowserCodeReader = BrowserCodeReader;\n exports.BrowserDatamatrixCodeReader = BrowserDatamatrixCodeReader;\n exports.BrowserMultiFormatReader = BrowserMultiFormatReader;\n exports.BrowserPDF417Reader = BrowserPDF417Reader;\n exports.BrowserQRCodeReader = BrowserQRCodeReader;\n exports.BrowserQRCodeSvgWriter = BrowserQRCodeSvgWriter;\n exports.CharacterSetECI = CharacterSetECI;\n exports.ChecksumException = ChecksumException;\n exports.Code128Reader = Code128Reader;\n exports.Code39Reader = Code39Reader;\n exports.DataMatrixDecodedBitStreamParser = DecodedBitStreamParser;\n exports.DataMatrixReader = DataMatrixReader;\n exports.DecodeHintType = DecodeHintType$1;\n exports.DecoderResult = DecoderResult;\n exports.DefaultGridSampler = DefaultGridSampler;\n exports.DetectorResult = DetectorResult;\n exports.EAN13Reader = EAN13Reader;\n exports.EncodeHintType = EncodeHintType$1;\n exports.Exception = Exception;\n exports.FormatException = FormatException;\n exports.GenericGF = GenericGF;\n exports.GenericGFPoly = GenericGFPoly;\n exports.GlobalHistogramBinarizer = GlobalHistogramBinarizer;\n exports.GridSampler = GridSampler;\n exports.GridSamplerInstance = GridSamplerInstance;\n exports.HTMLCanvasElementLuminanceSource = HTMLCanvasElementLuminanceSource;\n exports.HybridBinarizer = HybridBinarizer;\n exports.ITFReader = ITFReader;\n exports.IllegalArgumentException = IllegalArgumentException;\n exports.IllegalStateException = IllegalStateException;\n exports.InvertedLuminanceSource = InvertedLuminanceSource;\n exports.LuminanceSource = LuminanceSource;\n exports.MathUtils = MathUtils;\n exports.MultiFormatOneDReader = MultiFormatOneDReader;\n exports.MultiFormatReader = MultiFormatReader;\n exports.MultiFormatWriter = MultiFormatWriter;\n exports.NotFoundException = NotFoundException;\n exports.OneDReader = OneDReader;\n exports.PDF417DecodedBitStreamParser = DecodedBitStreamParser$2;\n exports.PDF417DecoderErrorCorrection = ErrorCorrection;\n exports.PDF417Reader = PDF417Reader;\n exports.PDF417ResultMetadata = PDF417ResultMetadata;\n exports.PerspectiveTransform = PerspectiveTransform;\n exports.PlanarYUVLuminanceSource = PlanarYUVLuminanceSource;\n exports.QRCodeByteMatrix = ByteMatrix;\n exports.QRCodeDataMask = DataMask;\n exports.QRCodeDecodedBitStreamParser = DecodedBitStreamParser$1;\n exports.QRCodeDecoderErrorCorrectionLevel = ErrorCorrectionLevel;\n exports.QRCodeDecoderFormatInformation = FormatInformation;\n exports.QRCodeEncoder = Encoder;\n exports.QRCodeEncoderQRCode = QRCode;\n exports.QRCodeMaskUtil = MaskUtil;\n exports.QRCodeMatrixUtil = MatrixUtil;\n exports.QRCodeMode = Mode$1;\n exports.QRCodeReader = QRCodeReader;\n exports.QRCodeVersion = Version$1;\n exports.QRCodeWriter = QRCodeWriter;\n exports.RGBLuminanceSource = RGBLuminanceSource;\n exports.RSS14Reader = RSS14Reader;\n exports.RSSExpandedReader = RSSExpandedReader;\n exports.ReaderException = ReaderException;\n exports.ReedSolomonDecoder = ReedSolomonDecoder;\n exports.ReedSolomonEncoder = ReedSolomonEncoder;\n exports.ReedSolomonException = ReedSolomonException;\n exports.Result = Result;\n exports.ResultMetadataType = ResultMetadataType$1;\n exports.ResultPoint = ResultPoint;\n exports.StringUtils = StringUtils;\n exports.UnsupportedOperationException = UnsupportedOperationException;\n exports.VideoInputDevice = VideoInputDevice;\n exports.WhiteRectangleDetector = WhiteRectangleDetector;\n exports.WriterException = WriterException;\n exports.ZXingArrays = Arrays;\n exports.ZXingCharset = Charset;\n exports.ZXingInteger = Integer;\n exports.ZXingStandardCharsets = StandardCharsets;\n exports.ZXingStringBuilder = StringBuilder;\n exports.ZXingStringEncoding = StringEncoding;\n exports.ZXingSystem = System;\n exports.createAbstractExpandedDecoder = createDecoder;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","/*\n * File: iframeResizer.contentWindow.js\n * Desc: Include this file in any page being loaded into an iframe\n * to force the iframe to resize to the content size.\n * Requires: iframeResizer.js on host page.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n *\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var autoResize = true,\n base = 10,\n bodyBackground = '',\n bodyMargin = 0,\n bodyMarginStr = '',\n bodyObserver = null,\n bodyPadding = '',\n calculateWidth = false,\n doubleEventList = { resize: 1, click: 1 },\n eventCancelTimer = 128,\n firstRun = true,\n height = 1,\n heightCalcModeDefault = 'bodyOffset',\n heightCalcMode = heightCalcModeDefault,\n initLock = true,\n initMsg = '',\n inPageLinks = {},\n interval = 32,\n intervalTimer = null,\n logging = false,\n mouseEvents = false,\n msgID = '[iFrameSizer]', // Must match host page msg ID\n msgIdLen = msgID.length,\n myID = '',\n resetRequiredMethods = {\n max: 1,\n min: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n },\n resizeFrom = 'child',\n sendPermit = true,\n target = window.parent,\n targetOriginDefault = '*',\n tolerance = 0,\n triggerLocked = false,\n triggerLockedTimer = null,\n throttledTimer = 16,\n width = 1,\n widthCalcModeDefault = 'scroll',\n widthCalcMode = widthCalcModeDefault,\n win = window,\n onMessage = function () {\n warn('onMessage function not defined')\n },\n onReady = function () {},\n onPageInfo = function () {},\n customCalcMethods = {\n height: function () {\n warn('Custom height calculation function not defined')\n return document.documentElement.offsetHeight\n },\n width: function () {\n warn('Custom width calculation function not defined')\n return document.body.scrollWidth\n }\n },\n eventHandlersByName = {},\n passiveSupported = false\n\n function noop() {}\n\n try {\n var options = Object.create(\n {},\n {\n passive: {\n // eslint-disable-next-line getter-return\n get: function () {\n passiveSupported = true\n }\n }\n }\n )\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop, options)\n } catch (error) {\n /* */\n }\n\n function addEventListener(el, evt, func, options) {\n el.addEventListener(evt, func, passiveSupported ? options || {} : false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1)\n }\n\n // Based on underscore.js\n function throttle(func) {\n var context,\n args,\n result,\n timeout = null,\n previous = 0,\n later = function () {\n previous = Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) {\n // eslint-disable-next-line no-multi-assign\n context = args = null\n }\n }\n\n return function () {\n var now = Date.now()\n\n if (!previous) {\n previous = now\n }\n\n var remaining = throttledTimer - (now - previous)\n\n context = this\n args = arguments\n\n if (remaining <= 0 || remaining > throttledTimer) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n\n previous = now\n result = func.apply(context, args)\n\n if (!timeout) {\n // eslint-disable-next-line no-multi-assign\n context = args = null\n }\n } else if (!timeout) {\n timeout = setTimeout(later, remaining)\n }\n\n return result\n }\n }\n\n function formatLogMsg(msg) {\n return msgID + '[' + myID + '] ' + msg\n }\n\n function log(msg) {\n if (logging && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console.log(formatLogMsg(msg))\n }\n }\n\n function warn(msg) {\n if ('object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console.warn(formatLogMsg(msg))\n }\n }\n\n function init() {\n readDataFromParent()\n log('Initialising iFrame (' + window.location.href + ')')\n readDataFromPage()\n setMargin()\n setBodyStyle('background', bodyBackground)\n setBodyStyle('padding', bodyPadding)\n injectClearFixIntoBodyElement()\n checkHeightMode()\n checkWidthMode()\n stopInfiniteResizingOfIFrame()\n setupPublicMethods()\n setupMouseEvents()\n startEventListeners()\n inPageLinks = setupInPageLinks()\n sendSize('init', 'Init message from host page')\n onReady()\n }\n\n function readDataFromParent() {\n function strBool(str) {\n return 'true' === str\n }\n\n var data = initMsg.slice(msgIdLen).split(':')\n\n myID = data[0]\n bodyMargin = undefined === data[1] ? bodyMargin : Number(data[1]) // For V1 compatibility\n calculateWidth = undefined === data[2] ? calculateWidth : strBool(data[2])\n logging = undefined === data[3] ? logging : strBool(data[3])\n interval = undefined === data[4] ? interval : Number(data[4])\n autoResize = undefined === data[6] ? autoResize : strBool(data[6])\n bodyMarginStr = data[7]\n heightCalcMode = undefined === data[8] ? heightCalcMode : data[8]\n bodyBackground = data[9]\n bodyPadding = data[10]\n tolerance = undefined === data[11] ? tolerance : Number(data[11])\n inPageLinks.enable = undefined === data[12] ? false : strBool(data[12])\n resizeFrom = undefined === data[13] ? resizeFrom : data[13]\n widthCalcMode = undefined === data[14] ? widthCalcMode : data[14]\n mouseEvents = undefined === data[15] ? mouseEvents : strBool(data[15])\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function readDataFromPage() {\n function readData() {\n var data = window.iFrameResizer\n\n log('Reading data from page: ' + JSON.stringify(data))\n Object.keys(data).forEach(depricate, data)\n\n onMessage = 'onMessage' in data ? data.onMessage : onMessage\n onReady = 'onReady' in data ? data.onReady : onReady\n targetOriginDefault =\n 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault\n heightCalcMode =\n 'heightCalculationMethod' in data\n ? data.heightCalculationMethod\n : heightCalcMode\n widthCalcMode =\n 'widthCalculationMethod' in data\n ? data.widthCalculationMethod\n : widthCalcMode\n }\n\n function setupCustomCalcMethods(calcMode, calcFunc) {\n if ('function' === typeof calcMode) {\n log('Setup custom ' + calcFunc + 'CalcMethod')\n customCalcMethods[calcFunc] = calcMode\n calcMode = 'custom'\n }\n\n return calcMode\n }\n\n if (\n 'iFrameResizer' in window &&\n Object === window.iFrameResizer.constructor\n ) {\n readData()\n heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height')\n widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width')\n }\n\n log('TargetOrigin for parent set to: ' + targetOriginDefault)\n }\n\n function chkCSS(attr, value) {\n if (-1 !== value.indexOf('-')) {\n warn('Negative CSS value ignored for ' + attr)\n value = ''\n }\n return value\n }\n\n function setBodyStyle(attr, value) {\n if (undefined !== value && '' !== value && 'null' !== value) {\n document.body.style[attr] = value\n log('Body ' + attr + ' set to \"' + value + '\"')\n }\n }\n\n function setMargin() {\n // If called via V1 script, convert bodyMargin from int to str\n if (undefined === bodyMarginStr) {\n bodyMarginStr = bodyMargin + 'px'\n }\n\n setBodyStyle('margin', chkCSS('margin', bodyMarginStr))\n }\n\n function stopInfiniteResizingOfIFrame() {\n document.documentElement.style.height = ''\n document.body.style.height = ''\n log('HTML & body height set to \"auto\"')\n }\n\n function manageTriggerEvent(options) {\n var listener = {\n add: function (eventName) {\n function handleEvent() {\n sendSize(options.eventName, options.eventType)\n }\n\n eventHandlersByName[eventName] = handleEvent\n\n addEventListener(window, eventName, handleEvent, { passive: true })\n },\n remove: function (eventName) {\n var handleEvent = eventHandlersByName[eventName]\n delete eventHandlersByName[eventName]\n\n removeEventListener(window, eventName, handleEvent)\n }\n }\n\n if (options.eventNames && Array.prototype.map) {\n options.eventName = options.eventNames[0]\n options.eventNames.map(listener[options.method])\n } else {\n listener[options.method](options.eventName)\n }\n\n log(\n capitalizeFirstLetter(options.method) +\n ' event listener: ' +\n options.eventType\n )\n }\n\n function manageEventListeners(method) {\n manageTriggerEvent({\n method: method,\n eventType: 'Animation Start',\n eventNames: ['animationstart', 'webkitAnimationStart']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Animation Iteration',\n eventNames: ['animationiteration', 'webkitAnimationIteration']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Animation End',\n eventNames: ['animationend', 'webkitAnimationEnd']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Input',\n eventName: 'input'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Mouse Up',\n eventName: 'mouseup'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Mouse Down',\n eventName: 'mousedown'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Orientation Change',\n eventName: 'orientationchange'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Print',\n eventNames: ['afterprint', 'beforeprint']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Ready State Change',\n eventName: 'readystatechange'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch Start',\n eventName: 'touchstart'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch End',\n eventName: 'touchend'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch Cancel',\n eventName: 'touchcancel'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition Start',\n eventNames: [\n 'transitionstart',\n 'webkitTransitionStart',\n 'MSTransitionStart',\n 'oTransitionStart',\n 'otransitionstart'\n ]\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition Iteration',\n eventNames: [\n 'transitioniteration',\n 'webkitTransitionIteration',\n 'MSTransitionIteration',\n 'oTransitionIteration',\n 'otransitioniteration'\n ]\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition End',\n eventNames: [\n 'transitionend',\n 'webkitTransitionEnd',\n 'MSTransitionEnd',\n 'oTransitionEnd',\n 'otransitionend'\n ]\n })\n if ('child' === resizeFrom) {\n manageTriggerEvent({\n method: method,\n eventType: 'IFrame Resized',\n eventName: 'resize'\n })\n }\n }\n\n function checkCalcMode(calcMode, calcModeDefault, modes, type) {\n if (calcModeDefault !== calcMode) {\n if (!(calcMode in modes)) {\n warn(\n calcMode + ' is not a valid option for ' + type + 'CalculationMethod.'\n )\n calcMode = calcModeDefault\n }\n log(type + ' calculation method set to \"' + calcMode + '\"')\n }\n\n return calcMode\n }\n\n function checkHeightMode() {\n heightCalcMode = checkCalcMode(\n heightCalcMode,\n heightCalcModeDefault,\n getHeight,\n 'height'\n )\n }\n\n function checkWidthMode() {\n widthCalcMode = checkCalcMode(\n widthCalcMode,\n widthCalcModeDefault,\n getWidth,\n 'width'\n )\n }\n\n function startEventListeners() {\n if (true === autoResize) {\n manageEventListeners('add')\n setupMutationObserver()\n } else {\n log('Auto Resize disabled')\n }\n }\n\n // function stopMsgsToParent() {\n // log('Disable outgoing messages')\n // sendPermit = false\n // }\n\n // function removeMsgListener() {\n // log('Remove event listener: Message')\n // removeEventListener(window, 'message', receiver)\n // }\n\n function disconnectMutationObserver() {\n if (null !== bodyObserver) {\n /* istanbul ignore next */ // Not testable in PhantonJS\n bodyObserver.disconnect()\n }\n }\n\n function stopEventListeners() {\n manageEventListeners('remove')\n disconnectMutationObserver()\n clearInterval(intervalTimer)\n }\n\n // function teardown() {\n // stopMsgsToParent()\n // removeMsgListener()\n // if (true === autoResize) stopEventListeners()\n // }\n\n function injectClearFixIntoBodyElement() {\n var clearFix = document.createElement('div')\n clearFix.style.clear = 'both'\n // Guard against the following having been globally redefined in CSS.\n clearFix.style.display = 'block'\n clearFix.style.height = '0'\n document.body.appendChild(clearFix)\n }\n\n function setupInPageLinks() {\n function getPagePosition() {\n return {\n x:\n window.pageXOffset === undefined\n ? document.documentElement.scrollLeft\n : window.pageXOffset,\n y:\n window.pageYOffset === undefined\n ? document.documentElement.scrollTop\n : window.pageYOffset\n }\n }\n\n function getElementPosition(el) {\n var elPosition = el.getBoundingClientRect(),\n pagePosition = getPagePosition()\n\n return {\n x: parseInt(elPosition.left, 10) + parseInt(pagePosition.x, 10),\n y: parseInt(elPosition.top, 10) + parseInt(pagePosition.y, 10)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget(target) {\n var jumpPosition = getElementPosition(target)\n\n log(\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width\n }\n\n var hash = location.split('#')[1] || location, // Remove # if present\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (undefined === target) {\n log(\n 'In page link (#' +\n hash +\n ') not found in iFrame, so sending to parent'\n )\n sendMsg(0, 0, 'inPageLink', '#' + hash)\n } else {\n jumpToTarget(target)\n }\n }\n\n function checkLocationHash() {\n var hash = window.location.hash\n var href = window.location.href\n\n if ('' !== hash && '#' !== hash) {\n findTarget(href)\n }\n }\n\n function bindAnchors() {\n function setupLink(el) {\n function linkClicked(e) {\n e.preventDefault()\n\n /* jshint validthis:true */\n findTarget(this.getAttribute('href'))\n }\n\n if ('#' !== el.getAttribute('href')) {\n addEventListener(el, 'click', linkClicked)\n }\n }\n\n Array.prototype.forEach.call(\n document.querySelectorAll('a[href^=\"#\"]'),\n setupLink\n )\n }\n\n function bindLocationHash() {\n addEventListener(window, 'hashchange', checkLocationHash)\n }\n\n function initCheck() {\n // Check if page loaded with location hash after init resize\n setTimeout(checkLocationHash, eventCancelTimer)\n }\n\n function enableInPageLinks() {\n /* istanbul ignore else */ // Not testable in phantonJS\n if (Array.prototype.forEach && document.querySelectorAll) {\n log('Setting up location.hash handlers')\n bindAnchors()\n bindLocationHash()\n initCheck()\n } else {\n warn(\n 'In page linking not fully supported in this browser! (See README.md for IE8 workaround)'\n )\n }\n }\n\n if (inPageLinks.enable) {\n enableInPageLinks()\n } else {\n log('In page linking not enabled')\n }\n\n return {\n findTarget: findTarget\n }\n }\n\n function setupMouseEvents() {\n if (mouseEvents !== true) return\n\n function sendMouse(e) {\n sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX)\n }\n\n function addMouseListener(evt, name) {\n log('Add event listener: ' + name)\n addEventListener(window.document, evt, sendMouse)\n }\n\n addMouseListener('mouseenter', 'Mouse Enter')\n addMouseListener('mouseleave', 'Mouse Leave')\n }\n\n function setupPublicMethods() {\n log('Enable public methods')\n\n win.parentIFrame = {\n autoResize: function autoResizeF(resize) {\n if (true === resize && false === autoResize) {\n autoResize = true\n startEventListeners()\n } else if (false === resize && true === autoResize) {\n autoResize = false\n stopEventListeners()\n }\n sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize))\n return autoResize\n },\n\n close: function closeF() {\n sendMsg(0, 0, 'close')\n // teardown()\n },\n\n getId: function getIdF() {\n return myID\n },\n\n getPageInfo: function getPageInfoF(callback) {\n if ('function' === typeof callback) {\n onPageInfo = callback\n sendMsg(0, 0, 'pageInfo')\n } else {\n onPageInfo = function () {}\n sendMsg(0, 0, 'pageInfoStop')\n }\n },\n\n moveToAnchor: function moveToAnchorF(hash) {\n inPageLinks.findTarget(hash)\n },\n\n reset: function resetF() {\n resetIFrame('parentIFrame.reset')\n },\n\n scrollTo: function scrollToF(x, y) {\n sendMsg(y, x, 'scrollTo') // X&Y reversed at sendMsg uses height/width\n },\n\n scrollToOffset: function scrollToF(x, y) {\n sendMsg(y, x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width\n },\n\n sendMessage: function sendMessageF(msg, targetOrigin) {\n sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin)\n },\n\n setHeightCalculationMethod: function setHeightCalculationMethodF(\n heightCalculationMethod\n ) {\n heightCalcMode = heightCalculationMethod\n checkHeightMode()\n },\n\n setWidthCalculationMethod: function setWidthCalculationMethodF(\n widthCalculationMethod\n ) {\n widthCalcMode = widthCalculationMethod\n checkWidthMode()\n },\n\n setTargetOrigin: function setTargetOriginF(targetOrigin) {\n log('Set targetOrigin: ' + targetOrigin)\n targetOriginDefault = targetOrigin\n },\n\n size: function sizeF(customHeight, customWidth) {\n var valString =\n '' + (customHeight || '') + (customWidth ? ',' + customWidth : '')\n sendSize(\n 'size',\n 'parentIFrame.size(' + valString + ')',\n customHeight,\n customWidth\n )\n }\n }\n }\n\n function initInterval() {\n if (0 !== interval) {\n log('setInterval: ' + interval + 'ms')\n intervalTimer = setInterval(function () {\n sendSize('interval', 'setInterval: ' + interval)\n }, Math.abs(interval))\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function setupBodyMutationObserver() {\n function addImageLoadListners(mutation) {\n function addImageLoadListener(element) {\n if (false === element.complete) {\n log('Attach listeners to ' + element.src)\n element.addEventListener('load', imageLoaded, false)\n element.addEventListener('error', imageError, false)\n elements.push(element)\n }\n }\n\n if (mutation.type === 'attributes' && mutation.attributeName === 'src') {\n addImageLoadListener(mutation.target)\n } else if (mutation.type === 'childList') {\n Array.prototype.forEach.call(\n mutation.target.querySelectorAll('img'),\n addImageLoadListener\n )\n }\n }\n\n function removeFromArray(element) {\n elements.splice(elements.indexOf(element), 1)\n }\n\n function removeImageLoadListener(element) {\n log('Remove listeners from ' + element.src)\n element.removeEventListener('load', imageLoaded, false)\n element.removeEventListener('error', imageError, false)\n removeFromArray(element)\n }\n\n function imageEventTriggered(event, type, typeDesc) {\n removeImageLoadListener(event.target)\n sendSize(type, typeDesc + ': ' + event.target.src)\n }\n\n function imageLoaded(event) {\n imageEventTriggered(event, 'imageLoad', 'Image loaded')\n }\n\n function imageError(event) {\n imageEventTriggered(event, 'imageLoadFailed', 'Image load failed')\n }\n\n function mutationObserved(mutations) {\n sendSize(\n 'mutationObserver',\n 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type\n )\n\n // Deal with WebKit / Blink asyncing image loading when tags are injected into the page\n mutations.forEach(addImageLoadListners)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n }\n\n observer = new MutationObserver(mutationObserved)\n\n log('Create body MutationObserver')\n observer.observe(target, config)\n\n return observer\n }\n\n var elements = [],\n MutationObserver =\n window.MutationObserver || window.WebKitMutationObserver,\n observer = createMutationObserver()\n\n return {\n disconnect: function () {\n if ('disconnect' in observer) {\n log('Disconnect body MutationObserver')\n observer.disconnect()\n elements.forEach(removeImageLoadListener)\n }\n }\n }\n }\n\n function setupMutationObserver() {\n var forceIntervalTimer = 0 > interval\n\n // Not testable in PhantomJS\n /* istanbul ignore if */ if (\n window.MutationObserver ||\n window.WebKitMutationObserver\n ) {\n if (forceIntervalTimer) {\n initInterval()\n } else {\n bodyObserver = setupBodyMutationObserver()\n }\n } else {\n log('MutationObserver not supported in this browser!')\n initInterval()\n }\n }\n\n // document.documentElement.offsetHeight is not reliable, so\n // we have to jump through hoops to get a better value.\n function getComputedStyle(prop, el) {\n var retVal = 0\n el = el || document.body // Not testable in phantonJS\n\n retVal = document.defaultView.getComputedStyle(el, null)\n retVal = null === retVal ? 0 : retVal[prop]\n\n return parseInt(retVal, base)\n }\n\n function chkEventThottle(timer) {\n if (timer > throttledTimer / 2) {\n throttledTimer = 2 * timer\n log('Event throttle increased to ' + throttledTimer + 'ms')\n }\n }\n\n // Idea from https://github.com/guardian/iframe-messenger\n function getMaxElement(side, elements) {\n var elementsLength = elements.length,\n elVal = 0,\n maxVal = 0,\n Side = capitalizeFirstLetter(side),\n timer = Date.now()\n\n for (var i = 0; i < elementsLength; i++) {\n elVal =\n elements[i].getBoundingClientRect()[side] +\n getComputedStyle('margin' + Side, elements[i])\n if (elVal > maxVal) {\n maxVal = elVal\n }\n }\n\n timer = Date.now() - timer\n\n log('Parsed ' + elementsLength + ' HTML elements')\n log('Element position calculated in ' + timer + 'ms')\n\n chkEventThottle(timer)\n\n return maxVal\n }\n\n function getAllMeasurements(dimensions) {\n return [\n dimensions.bodyOffset(),\n dimensions.bodyScroll(),\n dimensions.documentElementOffset(),\n dimensions.documentElementScroll()\n ]\n }\n\n function getTaggedElements(side, tag) {\n function noTaggedElementsFound() {\n warn('No tagged elements (' + tag + ') found on page')\n return document.querySelectorAll('body *')\n }\n\n var elements = document.querySelectorAll('[' + tag + ']')\n\n if (elements.length === 0) noTaggedElementsFound()\n\n return getMaxElement(side, elements)\n }\n\n function getAllElements() {\n return document.querySelectorAll('body *')\n }\n\n var getHeight = {\n bodyOffset: function getBodyOffsetHeight() {\n return (\n document.body.offsetHeight +\n getComputedStyle('marginTop') +\n getComputedStyle('marginBottom')\n )\n },\n\n offset: function () {\n return getHeight.bodyOffset() // Backwards compatibility\n },\n\n bodyScroll: function getBodyScrollHeight() {\n return document.body.scrollHeight\n },\n\n custom: function getCustomWidth() {\n return customCalcMethods.height()\n },\n\n documentElementOffset: function getDEOffsetHeight() {\n return document.documentElement.offsetHeight\n },\n\n documentElementScroll: function getDEScrollHeight() {\n return document.documentElement.scrollHeight\n },\n\n max: function getMaxHeight() {\n return Math.max.apply(null, getAllMeasurements(getHeight))\n },\n\n min: function getMinHeight() {\n return Math.min.apply(null, getAllMeasurements(getHeight))\n },\n\n grow: function growHeight() {\n return getHeight.max() // Run max without the forced downsizing\n },\n\n lowestElement: function getBestHeight() {\n return Math.max(\n getHeight.bodyOffset() || getHeight.documentElementOffset(),\n getMaxElement('bottom', getAllElements())\n )\n },\n\n taggedElement: function getTaggedElementsHeight() {\n return getTaggedElements('bottom', 'data-iframe-height')\n }\n },\n getWidth = {\n bodyScroll: function getBodyScrollWidth() {\n return document.body.scrollWidth\n },\n\n bodyOffset: function getBodyOffsetWidth() {\n return document.body.offsetWidth\n },\n\n custom: function getCustomWidth() {\n return customCalcMethods.width()\n },\n\n documentElementScroll: function getDEScrollWidth() {\n return document.documentElement.scrollWidth\n },\n\n documentElementOffset: function getDEOffsetWidth() {\n return document.documentElement.offsetWidth\n },\n\n scroll: function getMaxWidth() {\n return Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll())\n },\n\n max: function getMaxWidth() {\n return Math.max.apply(null, getAllMeasurements(getWidth))\n },\n\n min: function getMinWidth() {\n return Math.min.apply(null, getAllMeasurements(getWidth))\n },\n\n rightMostElement: function rightMostElement() {\n return getMaxElement('right', getAllElements())\n },\n\n taggedElement: function getTaggedElementsWidth() {\n return getTaggedElements('right', 'data-iframe-width')\n }\n }\n\n function sizeIFrame(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth\n ) {\n function resizeIFrame() {\n height = currentHeight\n width = currentWidth\n\n sendMsg(height, width, triggerEvent)\n }\n\n function isSizeChangeDetected() {\n function checkTolarance(a, b) {\n var retVal = Math.abs(a - b) <= tolerance\n return !retVal\n }\n\n currentHeight =\n undefined === customHeight ? getHeight[heightCalcMode]() : customHeight\n currentWidth =\n undefined === customWidth ? getWidth[widthCalcMode]() : customWidth\n\n return (\n checkTolarance(height, currentHeight) ||\n (calculateWidth && checkTolarance(width, currentWidth))\n )\n }\n\n function isForceResizableEvent() {\n return !(triggerEvent in { init: 1, interval: 1, size: 1 })\n }\n\n function isForceResizableCalcMode() {\n return (\n heightCalcMode in resetRequiredMethods ||\n (calculateWidth && widthCalcMode in resetRequiredMethods)\n )\n }\n\n function logIgnored() {\n log('No change in size detected')\n }\n\n function checkDownSizing() {\n if (isForceResizableEvent() && isForceResizableCalcMode()) {\n resetIFrame(triggerEventDesc)\n } else if (!(triggerEvent in { interval: 1 })) {\n logIgnored()\n }\n }\n\n var currentHeight, currentWidth\n\n if (isSizeChangeDetected() || 'init' === triggerEvent) {\n lockTrigger()\n resizeIFrame()\n } else {\n checkDownSizing()\n }\n }\n\n var sizeIFrameThrottled = throttle(sizeIFrame)\n\n function sendSize(triggerEvent, triggerEventDesc, customHeight, customWidth) {\n function recordTrigger() {\n if (!(triggerEvent in { reset: 1, resetPage: 1, init: 1 })) {\n log('Trigger event: ' + triggerEventDesc)\n }\n }\n\n function isDoubleFiredEvent() {\n return triggerLocked && triggerEvent in doubleEventList\n }\n\n if (isDoubleFiredEvent()) {\n log('Trigger event cancelled: ' + triggerEvent)\n } else {\n recordTrigger()\n if (triggerEvent === 'init') {\n sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth)\n } else {\n sizeIFrameThrottled(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth\n )\n }\n }\n }\n\n function lockTrigger() {\n if (!triggerLocked) {\n triggerLocked = true\n log('Trigger event lock on')\n }\n clearTimeout(triggerLockedTimer)\n triggerLockedTimer = setTimeout(function () {\n triggerLocked = false\n log('Trigger event lock off')\n log('--')\n }, eventCancelTimer)\n }\n\n function triggerReset(triggerEvent) {\n height = getHeight[heightCalcMode]()\n width = getWidth[widthCalcMode]()\n\n sendMsg(height, width, triggerEvent)\n }\n\n function resetIFrame(triggerEventDesc) {\n var hcm = heightCalcMode\n heightCalcMode = heightCalcModeDefault\n\n log('Reset trigger event: ' + triggerEventDesc)\n lockTrigger()\n triggerReset('reset')\n\n heightCalcMode = hcm\n }\n\n function sendMsg(height, width, triggerEvent, msg, targetOrigin) {\n function setTargetOrigin() {\n if (undefined === targetOrigin) {\n targetOrigin = targetOriginDefault\n } else {\n log('Message targetOrigin: ' + targetOrigin)\n }\n }\n\n function sendToParent() {\n var size = height + ':' + width,\n message =\n myID +\n ':' +\n size +\n ':' +\n triggerEvent +\n (undefined === msg ? '' : ':' + msg)\n\n log('Sending message to host page (' + message + ')')\n target.postMessage(msgID + message, targetOrigin)\n }\n\n if (true === sendPermit) {\n setTargetOrigin()\n sendToParent()\n }\n }\n\n function receiver(event) {\n var processRequestFromParent = {\n init: function initFromParent() {\n initMsg = event.data\n target = event.source\n\n init()\n firstRun = false\n setTimeout(function () {\n initLock = false\n }, eventCancelTimer)\n },\n\n reset: function resetFromParent() {\n if (initLock) {\n log('Page reset ignored by init')\n } else {\n log('Page size reset by host page')\n triggerReset('resetPage')\n }\n },\n\n resize: function resizeFromParent() {\n sendSize('resizeParent', 'Parent window requested size check')\n },\n\n moveToAnchor: function moveToAnchorF() {\n inPageLinks.findTarget(getData())\n },\n inPageLink: function inPageLinkF() {\n this.moveToAnchor()\n }, // Backward compatibility\n\n pageInfo: function pageInfoFromParent() {\n var msgBody = getData()\n log('PageInfoFromParent called from parent: ' + msgBody)\n onPageInfo(JSON.parse(msgBody))\n log(' --')\n },\n\n message: function messageFromParent() {\n var msgBody = getData()\n\n log('onMessage called from parent: ' + msgBody)\n // eslint-disable-next-line sonarjs/no-extra-arguments\n onMessage(JSON.parse(msgBody))\n log(' --')\n }\n }\n\n function isMessageForUs() {\n return msgID === ('' + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages\n }\n\n function getMessageType() {\n return event.data.split(']')[1].split(':')[0]\n }\n\n function getData() {\n return event.data.slice(event.data.indexOf(':') + 1)\n }\n\n function isMiddleTier() {\n return (\n (!(typeof module !== 'undefined' && module.exports) &&\n 'iFrameResize' in window) ||\n (window.jQuery !== undefined &&\n 'iFrameResize' in window.jQuery.prototype)\n )\n }\n\n function isInitMsg() {\n // Test if this message is from a child below us. This is an ugly test, however, updating\n // the message format would break backwards compatibility.\n return event.data.split(':')[2] in { true: 1, false: 1 }\n }\n\n function callFromParent() {\n var messageType = getMessageType()\n\n if (messageType in processRequestFromParent) {\n processRequestFromParent[messageType]()\n } else if (!isMiddleTier() && !isInitMsg()) {\n warn('Unexpected message (' + event.data + ')')\n }\n }\n\n function processMessage() {\n if (false === firstRun) {\n callFromParent()\n } else if (isInitMsg()) {\n processRequestFromParent.init()\n } else {\n log(\n 'Ignored message of type \"' +\n getMessageType() +\n '\". Received before initialization.'\n )\n }\n }\n\n if (isMessageForUs()) {\n processMessage()\n }\n }\n\n // Normally the parent kicks things off when it detects the iFrame has loaded.\n // If this script is async-loaded, then tell parent page to retry init.\n function chkLateLoaded() {\n if ('loading' !== document.readyState) {\n window.parent.postMessage('[iFrameResizerChild]Ready', '*')\n }\n }\n\n addEventListener(window, 'message', receiver)\n addEventListener(window, 'readystatechange', chkLateLoaded)\n chkLateLoaded()\n\n \n})()\n","(function(window, factory) {\n\tvar globalInstall = function(){\n\t\tfactory(window.lazySizes);\n\t\twindow.removeEventListener('lazyunveilread', globalInstall, true);\n\t};\n\n\tfactory = factory.bind(null, window, window.document);\n\n\tif(typeof module == 'object' && module.exports){\n\t\tfactory(require('lazysizes'));\n\t} else if (typeof define == 'function' && define.amd) {\n\t\tdefine(['lazysizes'], factory);\n\t} else if(window.lazySizes) {\n\t\tglobalInstall();\n\t} else {\n\t\twindow.addEventListener('lazyunveilread', globalInstall, true);\n\t}\n}(window, function(window, document, lazySizes) {\n\t'use strict';\n\n\tvar imgSupport = 'loading' in HTMLImageElement.prototype;\n\tvar iframeSupport = 'loading' in HTMLIFrameElement.prototype;\n\tvar isConfigSet = false;\n\tvar oldPrematureUnveil = lazySizes.prematureUnveil;\n\tvar cfg = lazySizes.cfg;\n\tvar listenerMap = {\n\t\tfocus: 1,\n\t\tmouseover: 1,\n\t\tclick: 1,\n\t\tload: 1,\n\t\ttransitionend: 1,\n\t\tanimationend: 1,\n\t\tscroll: 1,\n\t\tresize: 1,\n\t};\n\n\tif (!cfg.nativeLoading) {\n\t\tcfg.nativeLoading = {};\n\t}\n\n\tif (!window.addEventListener || !window.MutationObserver || (!imgSupport && !iframeSupport)) {\n\t\treturn;\n\t}\n\n\tfunction disableEvents() {\n\t\tvar loader = lazySizes.loader;\n\t\tvar throttledCheckElements = loader.checkElems;\n\t\tvar removeALSL = function(){\n\t\t\tsetTimeout(function(){\n\t\t\t\twindow.removeEventListener('scroll', loader._aLSL, true);\n\t\t\t}, 1000);\n\t\t};\n\t\tvar currentListenerMap = typeof cfg.nativeLoading.disableListeners == 'object' ?\n\t\t\tcfg.nativeLoading.disableListeners :\n\t\t\tlistenerMap;\n\n\t\tif (currentListenerMap.scroll) {\n\t\t\twindow.addEventListener('load', removeALSL);\n\t\t\tremoveALSL();\n\n\t\t\twindow.removeEventListener('scroll', throttledCheckElements, true);\n\t\t}\n\n\t\tif (currentListenerMap.resize) {\n\t\t\twindow.removeEventListener('resize', throttledCheckElements, true);\n\t\t}\n\n\t\tObject.keys(currentListenerMap).forEach(function(name) {\n\t\t\tif (currentListenerMap[name]) {\n\t\t\t\tdocument.removeEventListener(name, throttledCheckElements, true);\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction runConfig() {\n\t\tif (isConfigSet) {return;}\n\t\tisConfigSet = true;\n\n\t\tif (imgSupport && iframeSupport && cfg.nativeLoading.disableListeners) {\n\t\t\tif (cfg.nativeLoading.disableListeners === true) {\n\t\t\t\tcfg.nativeLoading.setLoadingAttribute = true;\n\t\t\t}\n\n\t\t\tdisableEvents();\n\t\t}\n\n\t\tif (cfg.nativeLoading.setLoadingAttribute) {\n\t\t\twindow.addEventListener('lazybeforeunveil', function(e){\n\t\t\t\tvar element = e.target;\n\n\t\t\t\tif ('loading' in element && !element.getAttribute('loading')) {\n\t\t\t\t\telement.setAttribute('loading', 'lazy');\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}\n\t}\n\n\tlazySizes.prematureUnveil = function prematureUnveil(element) {\n\n\t\tif (!isConfigSet) {\n\t\t\trunConfig();\n\t\t}\n\n\t\tif ('loading' in element &&\n\t\t\t(cfg.nativeLoading.setLoadingAttribute || element.getAttribute('loading')) &&\n\t\t\t(element.getAttribute('data-sizes') != 'auto' || element.offsetWidth)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (oldPrematureUnveil) {\n\t\t\treturn oldPrematureUnveil(element);\n\t\t}\n\t};\n\n}));\n","/*!\n * lightgallery | 2.7.2 | September 20th 2023\n * http://www.lightgalleryjs.com/\n * Copyright (c) 2020 Sachin Neravath;\n * @license GPLv3\n */\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __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\nfunction __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\n\n/**\r\n * List of lightGallery events\r\n * All events should be documented here\r\n * Below interfaces are used to build the website documentations\r\n * */\r\nvar lGEvents = {\r\n afterAppendSlide: 'lgAfterAppendSlide',\r\n init: 'lgInit',\r\n hasVideo: 'lgHasVideo',\r\n containerResize: 'lgContainerResize',\r\n updateSlides: 'lgUpdateSlides',\r\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\r\n beforeOpen: 'lgBeforeOpen',\r\n afterOpen: 'lgAfterOpen',\r\n slideItemLoad: 'lgSlideItemLoad',\r\n beforeSlide: 'lgBeforeSlide',\r\n afterSlide: 'lgAfterSlide',\r\n posterClick: 'lgPosterClick',\r\n dragStart: 'lgDragStart',\r\n dragMove: 'lgDragMove',\r\n dragEnd: 'lgDragEnd',\r\n beforeNextSlide: 'lgBeforeNextSlide',\r\n beforePrevSlide: 'lgBeforePrevSlide',\r\n beforeClose: 'lgBeforeClose',\r\n afterClose: 'lgAfterClose',\r\n rotateLeft: 'lgRotateLeft',\r\n rotateRight: 'lgRotateRight',\r\n flipHorizontal: 'lgFlipHorizontal',\r\n flipVertical: 'lgFlipVertical',\r\n autoplay: 'lgAutoplay',\r\n autoplayStart: 'lgAutoplayStart',\r\n autoplayStop: 'lgAutoplayStop',\r\n};\n\nvar lightGalleryCoreSettings = {\r\n mode: 'lg-slide',\r\n easing: 'ease',\r\n speed: 400,\r\n licenseKey: '0000-0000-000-0000',\r\n height: '100%',\r\n width: '100%',\r\n addClass: '',\r\n startClass: 'lg-start-zoom',\r\n backdropDuration: 300,\r\n container: '',\r\n startAnimationDuration: 400,\r\n zoomFromOrigin: true,\r\n hideBarsDelay: 0,\r\n showBarsAfter: 10000,\r\n slideDelay: 0,\r\n supportLegacyBrowser: true,\r\n allowMediaOverlap: false,\r\n videoMaxSize: '1280-720',\r\n loadYouTubePoster: true,\r\n defaultCaptionHeight: 0,\r\n ariaLabelledby: '',\r\n ariaDescribedby: '',\r\n resetScrollPosition: true,\r\n hideScrollbar: false,\r\n closable: true,\r\n swipeToClose: true,\r\n closeOnTap: true,\r\n showCloseIcon: true,\r\n showMaximizeIcon: false,\r\n loop: true,\r\n escKey: true,\r\n keyPress: true,\r\n trapFocus: true,\r\n controls: true,\r\n slideEndAnimation: true,\r\n hideControlOnEnd: false,\r\n mousewheel: false,\r\n getCaptionFromTitleOrAlt: true,\r\n appendSubHtmlTo: '.lg-sub-html',\r\n subHtmlSelectorRelative: false,\r\n preload: 2,\r\n numberOfSlideItemsInDom: 10,\r\n selector: '',\r\n selectWithin: '',\r\n nextHtml: '',\r\n prevHtml: '',\r\n index: 0,\r\n iframeWidth: '100%',\r\n iframeHeight: '100%',\r\n iframeMaxWidth: '100%',\r\n iframeMaxHeight: '100%',\r\n download: true,\r\n counter: true,\r\n appendCounterTo: '.lg-toolbar',\r\n swipeThreshold: 50,\r\n enableSwipe: true,\r\n enableDrag: true,\r\n dynamic: false,\r\n dynamicEl: [],\r\n extraProps: [],\r\n exThumbImage: '',\r\n isMobile: undefined,\r\n mobileSettings: {\r\n controls: false,\r\n showCloseIcon: false,\r\n download: false,\r\n },\r\n plugins: [],\r\n strings: {\r\n closeGallery: 'Close gallery',\r\n toggleMaximize: 'Toggle maximize',\r\n previousSlide: 'Previous slide',\r\n nextSlide: 'Next slide',\r\n download: 'Download',\r\n playVideo: 'Play video',\r\n mediaLoadingFailed: 'Oops... Failed to load content...',\r\n },\r\n};\n\nfunction initLgPolyfills() {\r\n (function () {\r\n if (typeof window.CustomEvent === 'function')\r\n return false;\r\n function CustomEvent(event, params) {\r\n params = params || {\r\n bubbles: false,\r\n cancelable: false,\r\n detail: null,\r\n };\r\n var evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\r\n return evt;\r\n }\r\n window.CustomEvent = CustomEvent;\r\n })();\r\n (function () {\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches =\r\n Element.prototype.msMatchesSelector ||\r\n Element.prototype.webkitMatchesSelector;\r\n }\r\n })();\r\n}\r\nvar lgQuery = /** @class */ (function () {\r\n function lgQuery(selector) {\r\n this.cssVenderPrefixes = [\r\n 'TransitionDuration',\r\n 'TransitionTimingFunction',\r\n 'Transform',\r\n 'Transition',\r\n ];\r\n this.selector = this._getSelector(selector);\r\n this.firstElement = this._getFirstEl();\r\n return this;\r\n }\r\n lgQuery.generateUUID = function () {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n };\r\n lgQuery.prototype._getSelector = function (selector, context) {\r\n if (context === void 0) { context = document; }\r\n if (typeof selector !== 'string') {\r\n return selector;\r\n }\r\n context = context || document;\r\n var fl = selector.substring(0, 1);\r\n if (fl === '#') {\r\n return context.querySelector(selector);\r\n }\r\n else {\r\n return context.querySelectorAll(selector);\r\n }\r\n };\r\n lgQuery.prototype._each = function (func) {\r\n if (!this.selector) {\r\n return this;\r\n }\r\n if (this.selector.length !== undefined) {\r\n [].forEach.call(this.selector, func);\r\n }\r\n else {\r\n func(this.selector, 0);\r\n }\r\n return this;\r\n };\r\n lgQuery.prototype._setCssVendorPrefix = function (el, cssProperty, value) {\r\n // prettier-ignore\r\n var property = cssProperty.replace(/-([a-z])/gi, function (s, group1) {\r\n return group1.toUpperCase();\r\n });\r\n if (this.cssVenderPrefixes.indexOf(property) !== -1) {\r\n el.style[property.charAt(0).toLowerCase() + property.slice(1)] = value;\r\n el.style['webkit' + property] = value;\r\n el.style['moz' + property] = value;\r\n el.style['ms' + property] = value;\r\n el.style['o' + property] = value;\r\n }\r\n else {\r\n el.style[property] = value;\r\n }\r\n };\r\n lgQuery.prototype._getFirstEl = function () {\r\n if (this.selector && this.selector.length !== undefined) {\r\n return this.selector[0];\r\n }\r\n else {\r\n return this.selector;\r\n }\r\n };\r\n lgQuery.prototype.isEventMatched = function (event, eventName) {\r\n var eventNamespace = eventName.split('.');\r\n return event\r\n .split('.')\r\n .filter(function (e) { return e; })\r\n .every(function (e) {\r\n return eventNamespace.indexOf(e) !== -1;\r\n });\r\n };\r\n lgQuery.prototype.attr = function (attr, value) {\r\n if (value === undefined) {\r\n if (!this.firstElement) {\r\n return '';\r\n }\r\n return this.firstElement.getAttribute(attr);\r\n }\r\n this._each(function (el) {\r\n el.setAttribute(attr, value);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.find = function (selector) {\r\n return $LG(this._getSelector(selector, this.selector));\r\n };\r\n lgQuery.prototype.first = function () {\r\n if (this.selector && this.selector.length !== undefined) {\r\n return $LG(this.selector[0]);\r\n }\r\n else {\r\n return $LG(this.selector);\r\n }\r\n };\r\n lgQuery.prototype.eq = function (index) {\r\n return $LG(this.selector[index]);\r\n };\r\n lgQuery.prototype.parent = function () {\r\n return $LG(this.selector.parentElement);\r\n };\r\n lgQuery.prototype.get = function () {\r\n return this._getFirstEl();\r\n };\r\n lgQuery.prototype.removeAttr = function (attributes) {\r\n var attrs = attributes.split(' ');\r\n this._each(function (el) {\r\n attrs.forEach(function (attr) { return el.removeAttribute(attr); });\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.wrap = function (className) {\r\n if (!this.firstElement) {\r\n return this;\r\n }\r\n var wrapper = document.createElement('div');\r\n wrapper.className = className;\r\n this.firstElement.parentNode.insertBefore(wrapper, this.firstElement);\r\n this.firstElement.parentNode.removeChild(this.firstElement);\r\n wrapper.appendChild(this.firstElement);\r\n return this;\r\n };\r\n lgQuery.prototype.addClass = function (classNames) {\r\n if (classNames === void 0) { classNames = ''; }\r\n this._each(function (el) {\r\n // IE doesn't support multiple arguments\r\n classNames.split(' ').forEach(function (className) {\r\n if (className) {\r\n el.classList.add(className);\r\n }\r\n });\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.removeClass = function (classNames) {\r\n this._each(function (el) {\r\n // IE doesn't support multiple arguments\r\n classNames.split(' ').forEach(function (className) {\r\n if (className) {\r\n el.classList.remove(className);\r\n }\r\n });\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.hasClass = function (className) {\r\n if (!this.firstElement) {\r\n return false;\r\n }\r\n return this.firstElement.classList.contains(className);\r\n };\r\n lgQuery.prototype.hasAttribute = function (attribute) {\r\n if (!this.firstElement) {\r\n return false;\r\n }\r\n return this.firstElement.hasAttribute(attribute);\r\n };\r\n lgQuery.prototype.toggleClass = function (className) {\r\n if (!this.firstElement) {\r\n return this;\r\n }\r\n if (this.hasClass(className)) {\r\n this.removeClass(className);\r\n }\r\n else {\r\n this.addClass(className);\r\n }\r\n return this;\r\n };\r\n lgQuery.prototype.css = function (property, value) {\r\n var _this = this;\r\n this._each(function (el) {\r\n _this._setCssVendorPrefix(el, property, value);\r\n });\r\n return this;\r\n };\r\n // Need to pass separate namespaces for separate elements\r\n lgQuery.prototype.on = function (events, listener) {\r\n var _this = this;\r\n if (!this.selector) {\r\n return this;\r\n }\r\n events.split(' ').forEach(function (event) {\r\n if (!Array.isArray(lgQuery.eventListeners[event])) {\r\n lgQuery.eventListeners[event] = [];\r\n }\r\n lgQuery.eventListeners[event].push(listener);\r\n _this.selector.addEventListener(event.split('.')[0], listener);\r\n });\r\n return this;\r\n };\r\n // @todo - test this\r\n lgQuery.prototype.once = function (event, listener) {\r\n var _this = this;\r\n this.on(event, function () {\r\n _this.off(event);\r\n listener(event);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.off = function (event) {\r\n var _this = this;\r\n if (!this.selector) {\r\n return this;\r\n }\r\n Object.keys(lgQuery.eventListeners).forEach(function (eventName) {\r\n if (_this.isEventMatched(event, eventName)) {\r\n lgQuery.eventListeners[eventName].forEach(function (listener) {\r\n _this.selector.removeEventListener(eventName.split('.')[0], listener);\r\n });\r\n lgQuery.eventListeners[eventName] = [];\r\n }\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.trigger = function (event, detail) {\r\n if (!this.firstElement) {\r\n return this;\r\n }\r\n var customEvent = new CustomEvent(event.split('.')[0], {\r\n detail: detail || null,\r\n });\r\n this.firstElement.dispatchEvent(customEvent);\r\n return this;\r\n };\r\n // Does not support IE\r\n lgQuery.prototype.load = function (url) {\r\n var _this = this;\r\n fetch(url)\r\n .then(function (res) { return res.text(); })\r\n .then(function (html) {\r\n _this.selector.innerHTML = html;\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.html = function (html) {\r\n if (html === undefined) {\r\n if (!this.firstElement) {\r\n return '';\r\n }\r\n return this.firstElement.innerHTML;\r\n }\r\n this._each(function (el) {\r\n el.innerHTML = html;\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.append = function (html) {\r\n this._each(function (el) {\r\n if (typeof html === 'string') {\r\n el.insertAdjacentHTML('beforeend', html);\r\n }\r\n else {\r\n el.appendChild(html);\r\n }\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.prepend = function (html) {\r\n this._each(function (el) {\r\n el.insertAdjacentHTML('afterbegin', html);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.remove = function () {\r\n this._each(function (el) {\r\n el.parentNode.removeChild(el);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.empty = function () {\r\n this._each(function (el) {\r\n el.innerHTML = '';\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.scrollTop = function (scrollTop) {\r\n if (scrollTop !== undefined) {\r\n document.body.scrollTop = scrollTop;\r\n document.documentElement.scrollTop = scrollTop;\r\n return this;\r\n }\r\n else {\r\n return (window.pageYOffset ||\r\n document.documentElement.scrollTop ||\r\n document.body.scrollTop ||\r\n 0);\r\n }\r\n };\r\n lgQuery.prototype.scrollLeft = function (scrollLeft) {\r\n if (scrollLeft !== undefined) {\r\n document.body.scrollLeft = scrollLeft;\r\n document.documentElement.scrollLeft = scrollLeft;\r\n return this;\r\n }\r\n else {\r\n return (window.pageXOffset ||\r\n document.documentElement.scrollLeft ||\r\n document.body.scrollLeft ||\r\n 0);\r\n }\r\n };\r\n lgQuery.prototype.offset = function () {\r\n if (!this.firstElement) {\r\n return {\r\n left: 0,\r\n top: 0,\r\n };\r\n }\r\n var rect = this.firstElement.getBoundingClientRect();\r\n var bodyMarginLeft = $LG('body').style().marginLeft;\r\n // Minus body margin - https://stackoverflow.com/questions/30711548/is-getboundingclientrect-left-returning-a-wrong-value\r\n return {\r\n left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(),\r\n top: rect.top + this.scrollTop(),\r\n };\r\n };\r\n lgQuery.prototype.style = function () {\r\n if (!this.firstElement) {\r\n return {};\r\n }\r\n return (this.firstElement.currentStyle ||\r\n window.getComputedStyle(this.firstElement));\r\n };\r\n // Width without padding and border even if box-sizing is used.\r\n lgQuery.prototype.width = function () {\r\n var style = this.style();\r\n return (this.firstElement.clientWidth -\r\n parseFloat(style.paddingLeft) -\r\n parseFloat(style.paddingRight));\r\n };\r\n // Height without padding and border even if box-sizing is used.\r\n lgQuery.prototype.height = function () {\r\n var style = this.style();\r\n return (this.firstElement.clientHeight -\r\n parseFloat(style.paddingTop) -\r\n parseFloat(style.paddingBottom));\r\n };\r\n lgQuery.eventListeners = {};\r\n return lgQuery;\r\n}());\r\nfunction $LG(selector) {\r\n initLgPolyfills();\r\n return new lgQuery(selector);\r\n}\n\nvar defaultDynamicOptions = [\r\n 'src',\r\n 'sources',\r\n 'subHtml',\r\n 'subHtmlUrl',\r\n 'html',\r\n 'video',\r\n 'poster',\r\n 'slideName',\r\n 'responsive',\r\n 'srcset',\r\n 'sizes',\r\n 'iframe',\r\n 'downloadUrl',\r\n 'download',\r\n 'width',\r\n 'facebookShareUrl',\r\n 'tweetText',\r\n 'iframeTitle',\r\n 'twitterShareUrl',\r\n 'pinterestShareUrl',\r\n 'pinterestText',\r\n 'fbHtml',\r\n 'disqusIdentifier',\r\n 'disqusUrl',\r\n];\r\n// Convert html data-attribute to camalcase\r\nfunction convertToData(attr) {\r\n // FInd a way for lgsize\r\n if (attr === 'href') {\r\n return 'src';\r\n }\r\n attr = attr.replace('data-', '');\r\n attr = attr.charAt(0).toLowerCase() + attr.slice(1);\r\n attr = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\r\n return attr;\r\n}\r\nvar utils = {\r\n /**\r\n * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option\r\n */\r\n getSize: function (el, container, spacing, defaultLgSize) {\r\n if (spacing === void 0) { spacing = 0; }\r\n var LGel = $LG(el);\r\n var lgSize = LGel.attr('data-lg-size') || defaultLgSize;\r\n if (!lgSize) {\r\n return;\r\n }\r\n var isResponsiveSizes = lgSize.split(',');\r\n // if at-least two viewport sizes are available\r\n if (isResponsiveSizes[1]) {\r\n var wWidth = window.innerWidth;\r\n for (var i = 0; i < isResponsiveSizes.length; i++) {\r\n var size_1 = isResponsiveSizes[i];\r\n var responsiveWidth = parseInt(size_1.split('-')[2], 10);\r\n if (responsiveWidth > wWidth) {\r\n lgSize = size_1;\r\n break;\r\n }\r\n // take last item as last option\r\n if (i === isResponsiveSizes.length - 1) {\r\n lgSize = size_1;\r\n }\r\n }\r\n }\r\n var size = lgSize.split('-');\r\n var width = parseInt(size[0], 10);\r\n var height = parseInt(size[1], 10);\r\n var cWidth = container.width();\r\n var cHeight = container.height() - spacing;\r\n var maxWidth = Math.min(cWidth, width);\r\n var maxHeight = Math.min(cHeight, height);\r\n var ratio = Math.min(maxWidth / width, maxHeight / height);\r\n return { width: width * ratio, height: height * ratio };\r\n },\r\n /**\r\n * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option\r\n * @param {jQuery Element}\r\n * @returns {String} Transform CSS string\r\n */\r\n getTransform: function (el, container, top, bottom, imageSize) {\r\n if (!imageSize) {\r\n return;\r\n }\r\n var LGel = $LG(el).find('img').first();\r\n if (!LGel.get()) {\r\n return;\r\n }\r\n var containerRect = container.get().getBoundingClientRect();\r\n var wWidth = containerRect.width;\r\n // using innerWidth to include mobile safari bottom bar\r\n var wHeight = container.height() - (top + bottom);\r\n var elWidth = LGel.width();\r\n var elHeight = LGel.height();\r\n var elStyle = LGel.style();\r\n var x = (wWidth - elWidth) / 2 -\r\n LGel.offset().left +\r\n (parseFloat(elStyle.paddingLeft) || 0) +\r\n (parseFloat(elStyle.borderLeft) || 0) +\r\n $LG(window).scrollLeft() +\r\n containerRect.left;\r\n var y = (wHeight - elHeight) / 2 -\r\n LGel.offset().top +\r\n (parseFloat(elStyle.paddingTop) || 0) +\r\n (parseFloat(elStyle.borderTop) || 0) +\r\n $LG(window).scrollTop() +\r\n top;\r\n var scX = elWidth / imageSize.width;\r\n var scY = elHeight / imageSize.height;\r\n var transform = 'translate3d(' +\r\n (x *= -1) +\r\n 'px, ' +\r\n (y *= -1) +\r\n 'px, 0) scale3d(' +\r\n scX +\r\n ', ' +\r\n scY +\r\n ', 1)';\r\n return transform;\r\n },\r\n getIframeMarkup: function (iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) {\r\n var title = iframeTitle ? 'title=\"' + iframeTitle + '\"' : '';\r\n return \"
\\n \\n
\";\r\n },\r\n getImgMarkup: function (index, src, altAttr, srcset, sizes, sources) {\r\n var srcsetAttr = srcset ? \"srcset=\\\"\" + srcset + \"\\\"\" : '';\r\n var sizesAttr = sizes ? \"sizes=\\\"\" + sizes + \"\\\"\" : '';\r\n var imgMarkup = \"\";\r\n var sourceTag = '';\r\n if (sources) {\r\n var sourceObj = typeof sources === 'string' ? JSON.parse(sources) : sources;\r\n sourceTag = sourceObj.map(function (source) {\r\n var attrs = '';\r\n Object.keys(source).forEach(function (key) {\r\n // Do not remove the first space as it is required to separate the attributes\r\n attrs += \" \" + key + \"=\\\"\" + source[key] + \"\\\"\";\r\n });\r\n return \"\";\r\n });\r\n }\r\n return \"\" + sourceTag + imgMarkup;\r\n },\r\n // Get src from responsive src\r\n getResponsiveSrc: function (srcItms) {\r\n var rsWidth = [];\r\n var rsSrc = [];\r\n var src = '';\r\n for (var i = 0; i < srcItms.length; i++) {\r\n var _src = srcItms[i].split(' ');\r\n // Manage empty space\r\n if (_src[0] === '') {\r\n _src.splice(0, 1);\r\n }\r\n rsSrc.push(_src[0]);\r\n rsWidth.push(_src[1]);\r\n }\r\n var wWidth = window.innerWidth;\r\n for (var j = 0; j < rsWidth.length; j++) {\r\n if (parseInt(rsWidth[j], 10) > wWidth) {\r\n src = rsSrc[j];\r\n break;\r\n }\r\n }\r\n return src;\r\n },\r\n isImageLoaded: function (img) {\r\n if (!img)\r\n return false;\r\n // During the onload event, IE correctly identifies any images that\r\n // weren’t downloaded as not complete. Others should too. Gecko-based\r\n // browsers act like NS4 in that they report this incorrectly.\r\n if (!img.complete) {\r\n return false;\r\n }\r\n // However, they do have two very useful properties: naturalWidth and\r\n // naturalHeight. These give the true size of the image. If it failed\r\n // to load, either of these should be zero.\r\n if (img.naturalWidth === 0) {\r\n return false;\r\n }\r\n // No other way of checking: assume it’s ok.\r\n return true;\r\n },\r\n getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, playVideoString, _isVideo) {\r\n var videoClass = '';\r\n if (_isVideo && _isVideo.youtube) {\r\n videoClass = 'lg-has-youtube';\r\n }\r\n else if (_isVideo && _isVideo.vimeo) {\r\n videoClass = 'lg-has-vimeo';\r\n }\r\n else {\r\n videoClass = 'lg-has-html5';\r\n }\r\n return \"
\\n
\\n \\n \" + playVideoString + \"\\n \\n \\n \\n \\n \\n \\n \\n
\\n \" + (dummyImg || '') + \"\\n \\n
\";\r\n },\r\n getFocusableElements: function (container) {\r\n var elements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]), select:not([disabled])');\r\n var visibleElements = [].filter.call(elements, function (element) {\r\n var style = window.getComputedStyle(element);\r\n return style.display !== 'none' && style.visibility !== 'hidden';\r\n });\r\n return visibleElements;\r\n },\r\n /**\r\n * @desc Create dynamic elements array from gallery items when dynamic option is false\r\n * It helps to avoid frequent DOM interaction\r\n * and avoid multiple checks for dynamic elments\r\n *\r\n * @returns {Array} dynamicEl\r\n */\r\n getDynamicOptions: function (items, extraProps, getCaptionFromTitleOrAlt, exThumbImage) {\r\n var dynamicElements = [];\r\n var availableDynamicOptions = __spreadArrays(defaultDynamicOptions, extraProps);\r\n [].forEach.call(items, function (item) {\r\n var dynamicEl = {};\r\n for (var i = 0; i < item.attributes.length; i++) {\r\n var attr = item.attributes[i];\r\n if (attr.specified) {\r\n var dynamicAttr = convertToData(attr.name);\r\n var label = '';\r\n if (availableDynamicOptions.indexOf(dynamicAttr) > -1) {\r\n label = dynamicAttr;\r\n }\r\n if (label) {\r\n dynamicEl[label] = attr.value;\r\n }\r\n }\r\n }\r\n var currentItem = $LG(item);\r\n var alt = currentItem.find('img').first().attr('alt');\r\n var title = currentItem.attr('title');\r\n var thumb = exThumbImage\r\n ? currentItem.attr(exThumbImage)\r\n : currentItem.find('img').first().attr('src');\r\n dynamicEl.thumb = thumb;\r\n if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) {\r\n dynamicEl.subHtml = title || alt || '';\r\n }\r\n dynamicEl.alt = alt || title || '';\r\n dynamicElements.push(dynamicEl);\r\n });\r\n return dynamicElements;\r\n },\r\n isMobile: function () {\r\n return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n },\r\n /**\r\n * @desc Check the given src is video\r\n * @param {String} src\r\n * @return {Object} video type\r\n * Ex:{ youtube : [\"//www.youtube.com/watch?v=c0asJgSyxcY\", \"c0asJgSyxcY\"] }\r\n *\r\n * @todo - this information can be moved to dynamicEl to avoid frequent calls\r\n */\r\n isVideo: function (src, isHTML5VIdeo, index) {\r\n if (!src) {\r\n if (isHTML5VIdeo) {\r\n return {\r\n html5: true,\r\n };\r\n }\r\n else {\r\n console.error('lightGallery :- data-src is not provided on slide item ' +\r\n (index + 1) +\r\n '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/');\r\n return;\r\n }\r\n }\r\n var youtube = src.match(/\\/\\/(?:www\\.)?youtu(?:\\.be|be\\.com|be-nocookie\\.com)\\/(?:watch\\?v=|embed\\/)?([a-z0-9\\-\\_\\%]+)([\\&|?][\\S]*)*/i);\r\n var vimeo = src.match(/\\/\\/(?:www\\.)?(?:player\\.)?vimeo.com\\/(?:video\\/)?([0-9a-z\\-_]+)(.*)?/i);\r\n var wistia = src.match(/https?:\\/\\/(.+)?(wistia\\.com|wi\\.st)\\/(medias|embed)\\/([0-9a-z\\-_]+)(.*)/);\r\n if (youtube) {\r\n return {\r\n youtube: youtube,\r\n };\r\n }\r\n else if (vimeo) {\r\n return {\r\n vimeo: vimeo,\r\n };\r\n }\r\n else if (wistia) {\r\n return {\r\n wistia: wistia,\r\n };\r\n }\r\n },\r\n};\n\n// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio\r\n// @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html\r\n// Unique id for each gallery\r\nvar lgId = 0;\r\nvar LightGallery = /** @class */ (function () {\r\n function LightGallery(element, options) {\r\n this.lgOpened = false;\r\n this.index = 0;\r\n // lightGallery modules\r\n this.plugins = [];\r\n // false when lightGallery load first slide content;\r\n this.lGalleryOn = false;\r\n // True when a slide animation is in progress\r\n this.lgBusy = false;\r\n this.currentItemsInDom = [];\r\n // Scroll top value before lightGallery is opened\r\n this.prevScrollTop = 0;\r\n this.bodyPaddingRight = 0;\r\n this.isDummyImageRemoved = false;\r\n this.dragOrSwipeEnabled = false;\r\n this.mediaContainerPosition = {\r\n top: 0,\r\n bottom: 0,\r\n };\r\n if (!element) {\r\n return this;\r\n }\r\n lgId++;\r\n this.lgId = lgId;\r\n this.el = element;\r\n this.LGel = $LG(element);\r\n this.generateSettings(options);\r\n this.buildModules();\r\n // When using dynamic mode, ensure dynamicEl is an array\r\n if (this.settings.dynamic &&\r\n this.settings.dynamicEl !== undefined &&\r\n !Array.isArray(this.settings.dynamicEl)) {\r\n throw 'When using dynamic mode, you must also define dynamicEl as an Array.';\r\n }\r\n this.galleryItems = this.getItems();\r\n this.normalizeSettings();\r\n // Gallery items\r\n this.init();\r\n this.validateLicense();\r\n return this;\r\n }\r\n LightGallery.prototype.generateSettings = function (options) {\r\n // lightGallery settings\r\n this.settings = __assign(__assign({}, lightGalleryCoreSettings), options);\r\n if (this.settings.isMobile &&\r\n typeof this.settings.isMobile === 'function'\r\n ? this.settings.isMobile()\r\n : utils.isMobile()) {\r\n var mobileSettings = __assign(__assign({}, this.settings.mobileSettings), this.settings.mobileSettings);\r\n this.settings = __assign(__assign({}, this.settings), mobileSettings);\r\n }\r\n };\r\n LightGallery.prototype.normalizeSettings = function () {\r\n if (this.settings.slideEndAnimation) {\r\n this.settings.hideControlOnEnd = false;\r\n }\r\n if (!this.settings.closable) {\r\n this.settings.swipeToClose = false;\r\n }\r\n // And reset it on close to get the correct value next time\r\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\r\n // At the moment, Zoom from image doesn't support dynamic options\r\n // @todo add zoomFromOrigin support for dynamic images\r\n if (this.settings.dynamic) {\r\n this.zoomFromOrigin = false;\r\n }\r\n if (!this.settings.container) {\r\n this.settings.container = document.body;\r\n }\r\n // settings.preload should not be grater than $item.length\r\n this.settings.preload = Math.min(this.settings.preload, this.galleryItems.length);\r\n };\r\n LightGallery.prototype.init = function () {\r\n var _this = this;\r\n this.addSlideVideoInfo(this.galleryItems);\r\n this.buildStructure();\r\n this.LGel.trigger(lGEvents.init, {\r\n instance: this,\r\n });\r\n if (this.settings.keyPress) {\r\n this.keyPress();\r\n }\r\n setTimeout(function () {\r\n _this.enableDrag();\r\n _this.enableSwipe();\r\n _this.triggerPosterClick();\r\n }, 50);\r\n this.arrow();\r\n if (this.settings.mousewheel) {\r\n this.mousewheel();\r\n }\r\n if (!this.settings.dynamic) {\r\n this.openGalleryOnItemClick();\r\n }\r\n };\r\n LightGallery.prototype.openGalleryOnItemClick = function () {\r\n var _this = this;\r\n var _loop_1 = function (index) {\r\n var element = this_1.items[index];\r\n var $element = $LG(element);\r\n // Using different namespace for click because click event should not unbind if selector is same object('this')\r\n // @todo manage all event listners - should have namespace that represent element\r\n var uuid = lgQuery.generateUUID();\r\n $element\r\n .attr('data-lg-id', uuid)\r\n .on(\"click.lgcustom-item-\" + uuid, function (e) {\r\n e.preventDefault();\r\n var currentItemIndex = _this.settings.index || index;\r\n _this.openGallery(currentItemIndex, element);\r\n });\r\n };\r\n var this_1 = this;\r\n // Using for loop instead of using bubbling as the items can be any html element.\r\n for (var index = 0; index < this.items.length; index++) {\r\n _loop_1(index);\r\n }\r\n };\r\n /**\r\n * Module constructor\r\n * Modules are build incrementally.\r\n * Gallery should be opened only once all the modules are initialized.\r\n * use moduleBuildTimeout to make sure this\r\n */\r\n LightGallery.prototype.buildModules = function () {\r\n var _this = this;\r\n this.settings.plugins.forEach(function (plugin) {\r\n _this.plugins.push(new plugin(_this, $LG));\r\n });\r\n };\r\n LightGallery.prototype.validateLicense = function () {\r\n if (!this.settings.licenseKey) {\r\n console.error('Please provide a valid license key');\r\n }\r\n else if (this.settings.licenseKey === '0000-0000-000-0000') {\r\n console.warn(\"lightGallery: \" + this.settings.licenseKey + \" license key is not valid for production use\");\r\n }\r\n };\r\n LightGallery.prototype.getSlideItem = function (index) {\r\n return $LG(this.getSlideItemId(index));\r\n };\r\n LightGallery.prototype.getSlideItemId = function (index) {\r\n return \"#lg-item-\" + this.lgId + \"-\" + index;\r\n };\r\n LightGallery.prototype.getIdName = function (id) {\r\n return id + \"-\" + this.lgId;\r\n };\r\n LightGallery.prototype.getElementById = function (id) {\r\n return $LG(\"#\" + this.getIdName(id));\r\n };\r\n LightGallery.prototype.manageSingleSlideClassName = function () {\r\n if (this.galleryItems.length < 2) {\r\n this.outer.addClass('lg-single-item');\r\n }\r\n else {\r\n this.outer.removeClass('lg-single-item');\r\n }\r\n };\r\n LightGallery.prototype.buildStructure = function () {\r\n var _this = this;\r\n var container = this.$container && this.$container.get();\r\n if (container) {\r\n return;\r\n }\r\n var controls = '';\r\n var subHtmlCont = '';\r\n // Create controls\r\n if (this.settings.controls) {\r\n controls = \"\\n \";\r\n }\r\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\r\n subHtmlCont =\r\n '
';\r\n }\r\n var addClasses = '';\r\n if (this.settings.allowMediaOverlap) {\r\n // Do not remove space before last single quote\r\n addClasses += 'lg-media-overlap ';\r\n }\r\n var ariaLabelledby = this.settings.ariaLabelledby\r\n ? 'aria-labelledby=\"' + this.settings.ariaLabelledby + '\"'\r\n : '';\r\n var ariaDescribedby = this.settings.ariaDescribedby\r\n ? 'aria-describedby=\"' + this.settings.ariaDescribedby + '\"'\r\n : '';\r\n var containerClassName = \"lg-container \" + this.settings.addClass + \" \" + (document.body !== this.settings.container ? 'lg-inline' : '');\r\n var closeIcon = this.settings.closable && this.settings.showCloseIcon\r\n ? \"\"\r\n : '';\r\n var maximizeIcon = this.settings.showMaximizeIcon\r\n ? \"\"\r\n : '';\r\n var template = \"\\n
\\n
\\n\\n
\\n\\n
\\n
\\n
\\n \" + controls + \"\\n
\\n
\\n \" + maximizeIcon + \"\\n \" + closeIcon + \"\\n
\\n \" + (this.settings.appendSubHtmlTo === '.lg-outer'\r\n ? subHtmlCont\r\n : '') + \"\\n
\\n \" + (this.settings.appendSubHtmlTo === '.lg-sub-html'\r\n ? subHtmlCont\r\n : '') + \"\\n
\\n
\\n
\\n \";\r\n $LG(this.settings.container).append(template);\r\n if (document.body !== this.settings.container) {\r\n $LG(this.settings.container).css('position', 'relative');\r\n }\r\n this.outer = this.getElementById('lg-outer');\r\n this.$lgComponents = this.getElementById('lg-components');\r\n this.$backdrop = this.getElementById('lg-backdrop');\r\n this.$container = this.getElementById('lg-container');\r\n this.$inner = this.getElementById('lg-inner');\r\n this.$content = this.getElementById('lg-content');\r\n this.$toolbar = this.getElementById('lg-toolbar');\r\n this.$backdrop.css('transition-duration', this.settings.backdropDuration + 'ms');\r\n var outerClassNames = this.settings.mode + \" \";\r\n this.manageSingleSlideClassName();\r\n if (this.settings.enableDrag) {\r\n outerClassNames += 'lg-grab ';\r\n }\r\n this.outer.addClass(outerClassNames);\r\n this.$inner.css('transition-timing-function', this.settings.easing);\r\n this.$inner.css('transition-duration', this.settings.speed + 'ms');\r\n if (this.settings.download) {\r\n this.$toolbar.append(\"\");\r\n }\r\n this.counter();\r\n $LG(window).on(\"resize.lg.global\" + this.lgId + \" orientationchange.lg.global\" + this.lgId, function () {\r\n _this.refreshOnResize();\r\n });\r\n this.hideBars();\r\n this.manageCloseGallery();\r\n this.toggleMaximize();\r\n this.initModules();\r\n };\r\n LightGallery.prototype.refreshOnResize = function () {\r\n if (this.lgOpened) {\r\n var currentGalleryItem = this.galleryItems[this.index];\r\n var __slideVideoInfo = currentGalleryItem.__slideVideoInfo;\r\n this.mediaContainerPosition = this.getMediaContainerPosition();\r\n var _a = this.mediaContainerPosition, top_1 = _a.top, bottom = _a.bottom;\r\n this.currentImageSize = utils.getSize(this.items[this.index], this.outer, top_1 + bottom, __slideVideoInfo && this.settings.videoMaxSize);\r\n if (__slideVideoInfo) {\r\n this.resizeVideoSlide(this.index, this.currentImageSize);\r\n }\r\n if (this.zoomFromOrigin && !this.isDummyImageRemoved) {\r\n var imgStyle = this.getDummyImgStyles(this.currentImageSize);\r\n this.outer\r\n .find('.lg-current .lg-dummy-img')\r\n .first()\r\n .attr('style', imgStyle);\r\n }\r\n this.LGel.trigger(lGEvents.containerResize);\r\n }\r\n };\r\n LightGallery.prototype.resizeVideoSlide = function (index, imageSize) {\r\n var lgVideoStyle = this.getVideoContStyle(imageSize);\r\n var currentSlide = this.getSlideItem(index);\r\n currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle);\r\n };\r\n /**\r\n * Update slides dynamically.\r\n * Add, edit or delete slides dynamically when lightGallery is opened.\r\n * Modify the current gallery items and pass it via updateSlides method\r\n * @note\r\n * - Do not mutate existing lightGallery items directly.\r\n * - Always pass new list of gallery items\r\n * - You need to take care of thumbnails outside the gallery if any\r\n * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method.\r\n * @param items Gallery items\r\n * @param index After the update operation, which slide gallery should navigate to\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery();\r\n *\r\n * // Adding slides dynamically\r\n * let galleryItems = [\r\n * // Access existing lightGallery items\r\n * // galleryItems are automatically generated internally from the gallery HTML markup\r\n * // or directly from galleryItems when dynamic gallery is used\r\n * ...plugin.galleryItems,\r\n * ...[\r\n * {\r\n * src: 'img/img-1.png',\r\n * thumb: 'img/thumb1.png',\r\n * },\r\n * ],\r\n * ];\r\n * plugin.updateSlides(\r\n * galleryItems,\r\n * plugin.index,\r\n * );\r\n *\r\n *\r\n * // Remove slides dynamically\r\n * galleryItems = JSON.parse(\r\n * JSON.stringify(updateSlideInstance.galleryItems),\r\n * );\r\n * galleryItems.shift();\r\n * updateSlideInstance.updateSlides(galleryItems, 1);\r\n * @see Demo\r\n */\r\n LightGallery.prototype.updateSlides = function (items, index) {\r\n if (this.index > items.length - 1) {\r\n this.index = items.length - 1;\r\n }\r\n if (items.length === 1) {\r\n this.index = 0;\r\n }\r\n if (!items.length) {\r\n this.closeGallery();\r\n return;\r\n }\r\n var currentSrc = this.galleryItems[index].src;\r\n this.galleryItems = items;\r\n this.updateControls();\r\n this.$inner.empty();\r\n this.currentItemsInDom = [];\r\n var _index = 0;\r\n // Find the current index based on source value of the slide\r\n this.galleryItems.some(function (galleryItem, itemIndex) {\r\n if (galleryItem.src === currentSrc) {\r\n _index = itemIndex;\r\n return true;\r\n }\r\n return false;\r\n });\r\n this.currentItemsInDom = this.organizeSlideItems(_index, -1);\r\n this.loadContent(_index, true);\r\n this.getSlideItem(_index).addClass('lg-current');\r\n this.index = _index;\r\n this.updateCurrentCounter(_index);\r\n this.LGel.trigger(lGEvents.updateSlides);\r\n };\r\n // Get gallery items based on multiple conditions\r\n LightGallery.prototype.getItems = function () {\r\n // Gallery items\r\n this.items = [];\r\n if (!this.settings.dynamic) {\r\n if (this.settings.selector === 'this') {\r\n this.items.push(this.el);\r\n }\r\n else if (this.settings.selector) {\r\n if (typeof this.settings.selector === 'string') {\r\n if (this.settings.selectWithin) {\r\n var selectWithin = $LG(this.settings.selectWithin);\r\n this.items = selectWithin\r\n .find(this.settings.selector)\r\n .get();\r\n }\r\n else {\r\n this.items = this.el.querySelectorAll(this.settings.selector);\r\n }\r\n }\r\n else {\r\n this.items = this.settings.selector;\r\n }\r\n }\r\n else {\r\n this.items = this.el.children;\r\n }\r\n return utils.getDynamicOptions(this.items, this.settings.extraProps, this.settings.getCaptionFromTitleOrAlt, this.settings.exThumbImage);\r\n }\r\n else {\r\n return this.settings.dynamicEl || [];\r\n }\r\n };\r\n LightGallery.prototype.shouldHideScrollbar = function () {\r\n return (this.settings.hideScrollbar &&\r\n document.body === this.settings.container);\r\n };\r\n LightGallery.prototype.hideScrollbar = function () {\r\n if (!this.shouldHideScrollbar()) {\r\n return;\r\n }\r\n this.bodyPaddingRight = parseFloat($LG('body').style().paddingRight);\r\n var bodyRect = document.documentElement.getBoundingClientRect();\r\n var scrollbarWidth = window.innerWidth - bodyRect.width;\r\n $LG(document.body).css('padding-right', scrollbarWidth + this.bodyPaddingRight + 'px');\r\n $LG(document.body).addClass('lg-overlay-open');\r\n };\r\n LightGallery.prototype.resetScrollBar = function () {\r\n if (!this.shouldHideScrollbar()) {\r\n return;\r\n }\r\n $LG(document.body).css('padding-right', this.bodyPaddingRight + 'px');\r\n $LG(document.body).removeClass('lg-overlay-open');\r\n };\r\n /**\r\n * Open lightGallery.\r\n * Open gallery with specific slide by passing index of the slide as parameter.\r\n * @category lGPublicMethods\r\n * @param {Number} index - index of the slide\r\n * @param {HTMLElement} element - Which image lightGallery should zoom from\r\n *\r\n * @example\r\n * const $dynamicGallery = document.getElementById('dynamic-gallery-demo');\r\n * const dynamicGallery = lightGallery($dynamicGallery, {\r\n * dynamic: true,\r\n * dynamicEl: [\r\n * {\r\n * src: 'img/1.jpg',\r\n * thumb: 'img/thumb-1.jpg',\r\n * subHtml: '

Image 1 title

Image 1 descriptions.

',\r\n * },\r\n * ...\r\n * ],\r\n * });\r\n * $dynamicGallery.addEventListener('click', function () {\r\n * // Starts with third item.(Optional).\r\n * // This is useful if you want use dynamic mode with\r\n * // custom thumbnails (thumbnails outside gallery),\r\n * dynamicGallery.openGallery(2);\r\n * });\r\n *\r\n */\r\n LightGallery.prototype.openGallery = function (index, element) {\r\n var _this = this;\r\n if (index === void 0) { index = this.settings.index; }\r\n // prevent accidental double execution\r\n if (this.lgOpened)\r\n return;\r\n this.lgOpened = true;\r\n this.outer.removeClass('lg-hide-items');\r\n this.hideScrollbar();\r\n // Add display block, but still has opacity 0\r\n this.$container.addClass('lg-show');\r\n var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index);\r\n this.currentItemsInDom = itemsToBeInsertedToDom;\r\n var items = '';\r\n itemsToBeInsertedToDom.forEach(function (item) {\r\n items = items + (\"
\");\r\n });\r\n this.$inner.append(items);\r\n this.addHtml(index);\r\n var transform = '';\r\n this.mediaContainerPosition = this.getMediaContainerPosition();\r\n var _a = this.mediaContainerPosition, top = _a.top, bottom = _a.bottom;\r\n if (!this.settings.allowMediaOverlap) {\r\n this.setMediaContainerPosition(top, bottom);\r\n }\r\n var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo;\r\n if (this.zoomFromOrigin && element) {\r\n this.currentImageSize = utils.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize);\r\n transform = utils.getTransform(element, this.outer, top, bottom, this.currentImageSize);\r\n }\r\n if (!this.zoomFromOrigin || !transform) {\r\n this.outer.addClass(this.settings.startClass);\r\n this.getSlideItem(index).removeClass('lg-complete');\r\n }\r\n var timeout = this.settings.zoomFromOrigin\r\n ? 100\r\n : this.settings.backdropDuration;\r\n setTimeout(function () {\r\n _this.outer.addClass('lg-components-open');\r\n }, timeout);\r\n this.index = index;\r\n this.LGel.trigger(lGEvents.beforeOpen);\r\n // add class lg-current to remove initial transition\r\n this.getSlideItem(index).addClass('lg-current');\r\n this.lGalleryOn = false;\r\n // Store the current scroll top value to scroll back after closing the gallery..\r\n this.prevScrollTop = $LG(window).scrollTop();\r\n setTimeout(function () {\r\n // Need to check both zoomFromOrigin and transform values as we need to set set the\r\n // default opening animation if user missed to add the lg-size attribute\r\n if (_this.zoomFromOrigin && transform) {\r\n var currentSlide_1 = _this.getSlideItem(index);\r\n currentSlide_1.css('transform', transform);\r\n setTimeout(function () {\r\n currentSlide_1\r\n .addClass('lg-start-progress lg-start-end-progress')\r\n .css('transition-duration', _this.settings.startAnimationDuration + 'ms');\r\n _this.outer.addClass('lg-zoom-from-image');\r\n });\r\n setTimeout(function () {\r\n currentSlide_1.css('transform', 'translate3d(0, 0, 0)');\r\n }, 100);\r\n }\r\n setTimeout(function () {\r\n _this.$backdrop.addClass('in');\r\n _this.$container.addClass('lg-show-in');\r\n }, 10);\r\n setTimeout(function () {\r\n if (_this.settings.trapFocus &&\r\n document.body === _this.settings.container) {\r\n _this.trapFocus();\r\n }\r\n }, _this.settings.backdropDuration + 50);\r\n // lg-visible class resets gallery opacity to 1\r\n if (!_this.zoomFromOrigin || !transform) {\r\n setTimeout(function () {\r\n _this.outer.addClass('lg-visible');\r\n }, _this.settings.backdropDuration);\r\n }\r\n // initiate slide function\r\n _this.slide(index, false, false, false);\r\n _this.LGel.trigger(lGEvents.afterOpen);\r\n });\r\n if (document.body === this.settings.container) {\r\n $LG('html').addClass('lg-on');\r\n }\r\n };\r\n /**\r\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\r\n * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption.\r\n * if you have dynamic captions for each media,\r\n * you can provide an appropriate height for the captions via allowMediaOverlap option\r\n */\r\n LightGallery.prototype.getMediaContainerPosition = function () {\r\n if (this.settings.allowMediaOverlap) {\r\n return {\r\n top: 0,\r\n bottom: 0,\r\n };\r\n }\r\n var top = this.$toolbar.get().clientHeight || 0;\r\n var subHtml = this.outer.find('.lg-components .lg-sub-html').get();\r\n var captionHeight = this.settings.defaultCaptionHeight ||\r\n (subHtml && subHtml.clientHeight) ||\r\n 0;\r\n var thumbContainer = this.outer.find('.lg-thumb-outer').get();\r\n var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0;\r\n var bottom = thumbHeight + captionHeight;\r\n return {\r\n top: top,\r\n bottom: bottom,\r\n };\r\n };\r\n LightGallery.prototype.setMediaContainerPosition = function (top, bottom) {\r\n if (top === void 0) { top = 0; }\r\n if (bottom === void 0) { bottom = 0; }\r\n this.$content.css('top', top + 'px').css('bottom', bottom + 'px');\r\n };\r\n LightGallery.prototype.hideBars = function () {\r\n var _this = this;\r\n // Hide controllers if mouse doesn't move for some period\r\n setTimeout(function () {\r\n _this.outer.removeClass('lg-hide-items');\r\n if (_this.settings.hideBarsDelay > 0) {\r\n _this.outer.on('mousemove.lg click.lg touchstart.lg', function () {\r\n _this.outer.removeClass('lg-hide-items');\r\n clearTimeout(_this.hideBarTimeout);\r\n // Timeout will be cleared on each slide movement also\r\n _this.hideBarTimeout = setTimeout(function () {\r\n _this.outer.addClass('lg-hide-items');\r\n }, _this.settings.hideBarsDelay);\r\n });\r\n _this.outer.trigger('mousemove.lg');\r\n }\r\n }, this.settings.showBarsAfter);\r\n };\r\n LightGallery.prototype.initPictureFill = function ($img) {\r\n if (this.settings.supportLegacyBrowser) {\r\n try {\r\n picturefill({\r\n elements: [$img.get()],\r\n });\r\n }\r\n catch (e) {\r\n console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.');\r\n }\r\n }\r\n };\r\n /**\r\n * @desc Create image counter\r\n * Ex: 1/10\r\n */\r\n LightGallery.prototype.counter = function () {\r\n if (this.settings.counter) {\r\n var counterHtml = \"
\\n \" + (this.index + 1) + \" /\\n \" + this.galleryItems.length + \"
\";\r\n this.outer.find(this.settings.appendCounterTo).append(counterHtml);\r\n }\r\n };\r\n /**\r\n * @desc add sub-html into the slide\r\n * @param {Number} index - index of the slide\r\n */\r\n LightGallery.prototype.addHtml = function (index) {\r\n var subHtml;\r\n var subHtmlUrl;\r\n if (this.galleryItems[index].subHtmlUrl) {\r\n subHtmlUrl = this.galleryItems[index].subHtmlUrl;\r\n }\r\n else {\r\n subHtml = this.galleryItems[index].subHtml;\r\n }\r\n if (!subHtmlUrl) {\r\n if (subHtml) {\r\n // get first letter of sub-html\r\n // if first letter starts with . or # get the html form the jQuery object\r\n var fL = subHtml.substring(0, 1);\r\n if (fL === '.' || fL === '#') {\r\n if (this.settings.subHtmlSelectorRelative &&\r\n !this.settings.dynamic) {\r\n subHtml = $LG(this.items)\r\n .eq(index)\r\n .find(subHtml)\r\n .first()\r\n .html();\r\n }\r\n else {\r\n subHtml = $LG(subHtml).first().html();\r\n }\r\n }\r\n }\r\n else {\r\n subHtml = '';\r\n }\r\n }\r\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\r\n if (subHtmlUrl) {\r\n this.outer.find('.lg-sub-html').load(subHtmlUrl);\r\n }\r\n else {\r\n this.outer.find('.lg-sub-html').html(subHtml);\r\n }\r\n }\r\n else {\r\n var currentSlide = $LG(this.getSlideItemId(index));\r\n if (subHtmlUrl) {\r\n currentSlide.load(subHtmlUrl);\r\n }\r\n else {\r\n currentSlide.append(\"
\" + subHtml + \"
\");\r\n }\r\n }\r\n // Add lg-empty-html class if title doesn't exist\r\n if (typeof subHtml !== 'undefined' && subHtml !== null) {\r\n if (subHtml === '') {\r\n this.outer\r\n .find(this.settings.appendSubHtmlTo)\r\n .addClass('lg-empty-html');\r\n }\r\n else {\r\n this.outer\r\n .find(this.settings.appendSubHtmlTo)\r\n .removeClass('lg-empty-html');\r\n }\r\n }\r\n this.LGel.trigger(lGEvents.afterAppendSubHtml, {\r\n index: index,\r\n });\r\n };\r\n /**\r\n * @desc Preload slides\r\n * @param {Number} index - index of the slide\r\n * @todo preload not working for the first slide, Also, should work for the first and last slide as well\r\n */\r\n LightGallery.prototype.preload = function (index) {\r\n for (var i = 1; i <= this.settings.preload; i++) {\r\n if (i >= this.galleryItems.length - index) {\r\n break;\r\n }\r\n this.loadContent(index + i, false);\r\n }\r\n for (var j = 1; j <= this.settings.preload; j++) {\r\n if (index - j < 0) {\r\n break;\r\n }\r\n this.loadContent(index - j, false);\r\n }\r\n };\r\n LightGallery.prototype.getDummyImgStyles = function (imageSize) {\r\n if (!imageSize)\r\n return '';\r\n return \"width:\" + imageSize.width + \"px;\\n margin-left: -\" + imageSize.width / 2 + \"px;\\n margin-top: -\" + imageSize.height / 2 + \"px;\\n height:\" + imageSize.height + \"px\";\r\n };\r\n LightGallery.prototype.getVideoContStyle = function (imageSize) {\r\n if (!imageSize)\r\n return '';\r\n return \"width:\" + imageSize.width + \"px;\\n height:\" + imageSize.height + \"px\";\r\n };\r\n LightGallery.prototype.getDummyImageContent = function ($currentSlide, index, alt) {\r\n var $currentItem;\r\n if (!this.settings.dynamic) {\r\n $currentItem = $LG(this.items).eq(index);\r\n }\r\n if ($currentItem) {\r\n var _dummyImgSrc = void 0;\r\n if (!this.settings.exThumbImage) {\r\n _dummyImgSrc = $currentItem.find('img').first().attr('src');\r\n }\r\n else {\r\n _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage);\r\n }\r\n if (!_dummyImgSrc)\r\n return '';\r\n var imgStyle = this.getDummyImgStyles(this.currentImageSize);\r\n var dummyImgContent = \"\";\r\n $currentSlide.addClass('lg-first-slide');\r\n this.outer.addClass('lg-first-slide-loading');\r\n return dummyImgContent;\r\n }\r\n return '';\r\n };\r\n LightGallery.prototype.setImgMarkup = function (src, $currentSlide, index) {\r\n var currentGalleryItem = this.galleryItems[index];\r\n var alt = currentGalleryItem.alt, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources;\r\n // Use the thumbnail as dummy image which will be resized to actual image size and\r\n // displayed on top of actual image\r\n var imgContent = '';\r\n var altAttr = alt ? 'alt=\"' + alt + '\"' : '';\r\n if (this.isFirstSlideWithZoomAnimation()) {\r\n imgContent = this.getDummyImageContent($currentSlide, index, altAttr);\r\n }\r\n else {\r\n imgContent = utils.getImgMarkup(index, src, altAttr, srcset, sizes, sources);\r\n }\r\n var imgMarkup = \" \" + imgContent + \"\";\r\n $currentSlide.prepend(imgMarkup);\r\n };\r\n LightGallery.prototype.onSlideObjectLoad = function ($slide, isHTML5VideoWithoutPoster, onLoad, onError) {\r\n var mediaObject = $slide.find('.lg-object').first();\r\n if (utils.isImageLoaded(mediaObject.get()) ||\r\n isHTML5VideoWithoutPoster) {\r\n onLoad();\r\n }\r\n else {\r\n mediaObject.on('load.lg error.lg', function () {\r\n onLoad && onLoad();\r\n });\r\n mediaObject.on('error.lg', function () {\r\n onError && onError();\r\n });\r\n }\r\n };\r\n /**\r\n *\r\n * @param $el Current slide item\r\n * @param index\r\n * @param delay Delay is 0 except first time\r\n * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin\r\n * @param isFirstSlide\r\n */\r\n LightGallery.prototype.onLgObjectLoad = function (currentSlide, index, delay, speed, isFirstSlide, isHTML5VideoWithoutPoster) {\r\n var _this = this;\r\n this.onSlideObjectLoad(currentSlide, isHTML5VideoWithoutPoster, function () {\r\n _this.triggerSlideItemLoad(currentSlide, index, delay, speed, isFirstSlide);\r\n }, function () {\r\n currentSlide.addClass('lg-complete lg-complete_');\r\n currentSlide.html('' +\r\n _this.settings.strings['mediaLoadingFailed'] +\r\n '');\r\n });\r\n };\r\n LightGallery.prototype.triggerSlideItemLoad = function ($currentSlide, index, delay, speed, isFirstSlide) {\r\n var _this = this;\r\n var currentGalleryItem = this.galleryItems[index];\r\n // Adding delay for video slides without poster for better performance and user experience\r\n // Videos should start playing once once the gallery is completely loaded\r\n var _speed = isFirstSlide &&\r\n this.getSlideType(currentGalleryItem) === 'video' &&\r\n !currentGalleryItem.poster\r\n ? speed\r\n : 0;\r\n setTimeout(function () {\r\n $currentSlide.addClass('lg-complete lg-complete_');\r\n _this.LGel.trigger(lGEvents.slideItemLoad, {\r\n index: index,\r\n delay: delay || 0,\r\n isFirstSlide: isFirstSlide,\r\n });\r\n }, _speed);\r\n };\r\n LightGallery.prototype.isFirstSlideWithZoomAnimation = function () {\r\n return !!(!this.lGalleryOn &&\r\n this.zoomFromOrigin &&\r\n this.currentImageSize);\r\n };\r\n // Add video slideInfo\r\n LightGallery.prototype.addSlideVideoInfo = function (items) {\r\n var _this = this;\r\n items.forEach(function (element, index) {\r\n element.__slideVideoInfo = utils.isVideo(element.src, !!element.video, index);\r\n if (element.__slideVideoInfo &&\r\n _this.settings.loadYouTubePoster &&\r\n !element.poster &&\r\n element.__slideVideoInfo.youtube) {\r\n element.poster = \"//img.youtube.com/vi/\" + element.__slideVideoInfo.youtube[1] + \"/maxresdefault.jpg\";\r\n }\r\n });\r\n };\r\n /**\r\n * Load slide content into slide.\r\n * This is used to load content into slides that is not visible too\r\n * @param {Number} index - index of the slide.\r\n * @param {Boolean} rec - if true call loadcontent() function again.\r\n */\r\n LightGallery.prototype.loadContent = function (index, rec) {\r\n var _this = this;\r\n var currentGalleryItem = this.galleryItems[index];\r\n var $currentSlide = $LG(this.getSlideItemId(index));\r\n var poster = currentGalleryItem.poster, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources;\r\n var src = currentGalleryItem.src;\r\n var video = currentGalleryItem.video;\r\n var _html5Video = video && typeof video === 'string' ? JSON.parse(video) : video;\r\n if (currentGalleryItem.responsive) {\r\n var srcDyItms = currentGalleryItem.responsive.split(',');\r\n src = utils.getResponsiveSrc(srcDyItms) || src;\r\n }\r\n var videoInfo = currentGalleryItem.__slideVideoInfo;\r\n var lgVideoStyle = '';\r\n var iframe = !!currentGalleryItem.iframe;\r\n var isFirstSlide = !this.lGalleryOn;\r\n // delay for adding complete class. it is 0 except first time.\r\n var delay = 0;\r\n if (isFirstSlide) {\r\n if (this.zoomFromOrigin && this.currentImageSize) {\r\n delay = this.settings.startAnimationDuration + 10;\r\n }\r\n else {\r\n delay = this.settings.backdropDuration + 10;\r\n }\r\n }\r\n if (!$currentSlide.hasClass('lg-loaded')) {\r\n if (videoInfo) {\r\n var _a = this.mediaContainerPosition, top_2 = _a.top, bottom = _a.bottom;\r\n var videoSize = utils.getSize(this.items[index], this.outer, top_2 + bottom, videoInfo && this.settings.videoMaxSize);\r\n lgVideoStyle = this.getVideoContStyle(videoSize);\r\n }\r\n if (iframe) {\r\n var markup = utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle);\r\n $currentSlide.prepend(markup);\r\n }\r\n else if (poster) {\r\n var dummyImg = '';\r\n var hasStartAnimation = isFirstSlide &&\r\n this.zoomFromOrigin &&\r\n this.currentImageSize;\r\n if (hasStartAnimation) {\r\n dummyImg = this.getDummyImageContent($currentSlide, index, '');\r\n }\r\n var markup = utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo);\r\n $currentSlide.prepend(markup);\r\n }\r\n else if (videoInfo) {\r\n var markup = \"
\";\r\n $currentSlide.prepend(markup);\r\n }\r\n else {\r\n this.setImgMarkup(src, $currentSlide, index);\r\n if (srcset || sources) {\r\n var $img = $currentSlide.find('.lg-object');\r\n this.initPictureFill($img);\r\n }\r\n }\r\n if (poster || videoInfo) {\r\n this.LGel.trigger(lGEvents.hasVideo, {\r\n index: index,\r\n src: src,\r\n html5Video: _html5Video,\r\n hasPoster: !!poster,\r\n });\r\n }\r\n this.LGel.trigger(lGEvents.afterAppendSlide, { index: index });\r\n if (this.lGalleryOn &&\r\n this.settings.appendSubHtmlTo === '.lg-item') {\r\n this.addHtml(index);\r\n }\r\n }\r\n // For first time add some delay for displaying the start animation.\r\n var _speed = 0;\r\n // Do not change the delay value because it is required for zoom plugin.\r\n // If gallery opened from direct url (hash) speed value should be 0\r\n if (delay && !$LG(document.body).hasClass('lg-from-hash')) {\r\n _speed = delay;\r\n }\r\n // Only for first slide and zoomFromOrigin is enabled\r\n if (this.isFirstSlideWithZoomAnimation()) {\r\n setTimeout(function () {\r\n $currentSlide\r\n .removeClass('lg-start-end-progress lg-start-progress')\r\n .removeAttr('style');\r\n }, this.settings.startAnimationDuration + 100);\r\n if (!$currentSlide.hasClass('lg-loaded')) {\r\n setTimeout(function () {\r\n if (_this.getSlideType(currentGalleryItem) === 'image') {\r\n var alt = currentGalleryItem.alt;\r\n var altAttr = alt ? 'alt=\"' + alt + '\"' : '';\r\n $currentSlide\r\n .find('.lg-img-wrap')\r\n .append(utils.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources));\r\n if (srcset || sources) {\r\n var $img = $currentSlide.find('.lg-object');\r\n _this.initPictureFill($img);\r\n }\r\n }\r\n if (_this.getSlideType(currentGalleryItem) === 'image' ||\r\n (_this.getSlideType(currentGalleryItem) === 'video' &&\r\n poster)) {\r\n _this.onLgObjectLoad($currentSlide, index, delay, _speed, true, false);\r\n // load remaining slides once the slide is completely loaded\r\n _this.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () {\r\n _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);\r\n }, function () {\r\n _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);\r\n });\r\n }\r\n }, this.settings.startAnimationDuration + 100);\r\n }\r\n }\r\n // SLide content has been added to dom\r\n $currentSlide.addClass('lg-loaded');\r\n if (!this.isFirstSlideWithZoomAnimation() ||\r\n (this.getSlideType(currentGalleryItem) === 'video' && !poster)) {\r\n this.onLgObjectLoad($currentSlide, index, delay, _speed, isFirstSlide, !!(videoInfo && videoInfo.html5 && !poster));\r\n }\r\n // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling\r\n if ((!this.zoomFromOrigin || !this.currentImageSize) &&\r\n $currentSlide.hasClass('lg-complete_') &&\r\n !this.lGalleryOn) {\r\n setTimeout(function () {\r\n $currentSlide.addClass('lg-complete');\r\n }, this.settings.backdropDuration);\r\n }\r\n // Content loaded\r\n // Need to set lGalleryOn before calling preload function\r\n this.lGalleryOn = true;\r\n if (rec === true) {\r\n if (!$currentSlide.hasClass('lg-complete_')) {\r\n $currentSlide\r\n .find('.lg-object')\r\n .first()\r\n .on('load.lg error.lg', function () {\r\n _this.preload(index);\r\n });\r\n }\r\n else {\r\n this.preload(index);\r\n }\r\n }\r\n };\r\n /**\r\n * @desc Remove dummy image content and load next slides\r\n * Called only for the first time if zoomFromOrigin animation is enabled\r\n * @param index\r\n * @param $currentSlide\r\n * @param speed\r\n */\r\n LightGallery.prototype.loadContentOnFirstSlideLoad = function (index, $currentSlide, speed) {\r\n var _this = this;\r\n setTimeout(function () {\r\n $currentSlide.find('.lg-dummy-img').remove();\r\n $currentSlide.removeClass('lg-first-slide');\r\n _this.outer.removeClass('lg-first-slide-loading');\r\n _this.isDummyImageRemoved = true;\r\n _this.preload(index);\r\n }, speed + 300);\r\n };\r\n LightGallery.prototype.getItemsToBeInsertedToDom = function (index, prevIndex, numberOfItems) {\r\n var _this = this;\r\n if (numberOfItems === void 0) { numberOfItems = 0; }\r\n var itemsToBeInsertedToDom = [];\r\n // Minimum 2 items should be there\r\n var possibleNumberOfItems = Math.max(numberOfItems, 3);\r\n possibleNumberOfItems = Math.min(possibleNumberOfItems, this.galleryItems.length);\r\n var prevIndexItem = \"lg-item-\" + this.lgId + \"-\" + prevIndex;\r\n if (this.galleryItems.length <= 3) {\r\n this.galleryItems.forEach(function (_element, index) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + _this.lgId + \"-\" + index);\r\n });\r\n return itemsToBeInsertedToDom;\r\n }\r\n if (index < (this.galleryItems.length - 1) / 2) {\r\n for (var idx = index; idx > index - possibleNumberOfItems / 2 && idx >= 0; idx--) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + idx);\r\n }\r\n var numberOfExistingItems = itemsToBeInsertedToDom.length;\r\n for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + (index + idx + 1));\r\n }\r\n }\r\n else {\r\n for (var idx = index; idx <= this.galleryItems.length - 1 &&\r\n idx < index + possibleNumberOfItems / 2; idx++) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + idx);\r\n }\r\n var numberOfExistingItems = itemsToBeInsertedToDom.length;\r\n for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + (index - idx - 1));\r\n }\r\n }\r\n if (this.settings.loop) {\r\n if (index === this.galleryItems.length - 1) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + 0);\r\n }\r\n else if (index === 0) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + (this.galleryItems.length - 1));\r\n }\r\n }\r\n if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) {\r\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + prevIndex);\r\n }\r\n return itemsToBeInsertedToDom;\r\n };\r\n LightGallery.prototype.organizeSlideItems = function (index, prevIndex) {\r\n var _this = this;\r\n var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom);\r\n itemsToBeInsertedToDom.forEach(function (item) {\r\n if (_this.currentItemsInDom.indexOf(item) === -1) {\r\n _this.$inner.append(\"
\");\r\n }\r\n });\r\n this.currentItemsInDom.forEach(function (item) {\r\n if (itemsToBeInsertedToDom.indexOf(item) === -1) {\r\n $LG(\"#\" + item).remove();\r\n }\r\n });\r\n return itemsToBeInsertedToDom;\r\n };\r\n /**\r\n * Get previous index of the slide\r\n */\r\n LightGallery.prototype.getPreviousSlideIndex = function () {\r\n var prevIndex = 0;\r\n try {\r\n var currentItemId = this.outer\r\n .find('.lg-current')\r\n .first()\r\n .attr('id');\r\n prevIndex = parseInt(currentItemId.split('-')[3]) || 0;\r\n }\r\n catch (error) {\r\n prevIndex = 0;\r\n }\r\n return prevIndex;\r\n };\r\n LightGallery.prototype.setDownloadValue = function (index) {\r\n if (this.settings.download) {\r\n var currentGalleryItem = this.galleryItems[index];\r\n var hideDownloadBtn = currentGalleryItem.downloadUrl === false ||\r\n currentGalleryItem.downloadUrl === 'false';\r\n if (hideDownloadBtn) {\r\n this.outer.addClass('lg-hide-download');\r\n }\r\n else {\r\n var $download = this.getElementById('lg-download');\r\n this.outer.removeClass('lg-hide-download');\r\n $download.attr('href', currentGalleryItem.downloadUrl ||\r\n currentGalleryItem.src);\r\n if (currentGalleryItem.download) {\r\n $download.attr('download', currentGalleryItem.download);\r\n }\r\n }\r\n }\r\n };\r\n LightGallery.prototype.makeSlideAnimation = function (direction, currentSlideItem, previousSlideItem) {\r\n var _this = this;\r\n if (this.lGalleryOn) {\r\n previousSlideItem.addClass('lg-slide-progress');\r\n }\r\n setTimeout(function () {\r\n // remove all transitions\r\n _this.outer.addClass('lg-no-trans');\r\n _this.outer\r\n .find('.lg-item')\r\n .removeClass('lg-prev-slide lg-next-slide');\r\n if (direction === 'prev') {\r\n //prevslide\r\n currentSlideItem.addClass('lg-prev-slide');\r\n previousSlideItem.addClass('lg-next-slide');\r\n }\r\n else {\r\n // next slide\r\n currentSlideItem.addClass('lg-next-slide');\r\n previousSlideItem.addClass('lg-prev-slide');\r\n }\r\n // give 50 ms for browser to add/remove class\r\n setTimeout(function () {\r\n _this.outer.find('.lg-item').removeClass('lg-current');\r\n currentSlideItem.addClass('lg-current');\r\n // reset all transitions\r\n _this.outer.removeClass('lg-no-trans');\r\n }, 50);\r\n }, this.lGalleryOn ? this.settings.slideDelay : 0);\r\n };\r\n /**\r\n * Goto a specific slide.\r\n * @param {Number} index - index of the slide\r\n * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag\r\n * @param {Boolean} fromThumb - true if slide function called via thumbnail click\r\n * @param {String} direction - Direction of the slide(next/prev)\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery();\r\n * // to go to 3rd slide\r\n * plugin.slide(2);\r\n *\r\n */\r\n LightGallery.prototype.slide = function (index, fromTouch, fromThumb, direction) {\r\n var _this = this;\r\n var prevIndex = this.getPreviousSlideIndex();\r\n this.currentItemsInDom = this.organizeSlideItems(index, prevIndex);\r\n // Prevent multiple call, Required for hsh plugin\r\n if (this.lGalleryOn && prevIndex === index) {\r\n return;\r\n }\r\n var numberOfGalleryItems = this.galleryItems.length;\r\n if (!this.lgBusy) {\r\n if (this.settings.counter) {\r\n this.updateCurrentCounter(index);\r\n }\r\n var currentSlideItem = this.getSlideItem(index);\r\n var previousSlideItem_1 = this.getSlideItem(prevIndex);\r\n var currentGalleryItem = this.galleryItems[index];\r\n var videoInfo = currentGalleryItem.__slideVideoInfo;\r\n this.outer.attr('data-lg-slide-type', this.getSlideType(currentGalleryItem));\r\n this.setDownloadValue(index);\r\n if (videoInfo) {\r\n var _a = this.mediaContainerPosition, top_3 = _a.top, bottom = _a.bottom;\r\n var videoSize = utils.getSize(this.items[index], this.outer, top_3 + bottom, videoInfo && this.settings.videoMaxSize);\r\n this.resizeVideoSlide(index, videoSize);\r\n }\r\n this.LGel.trigger(lGEvents.beforeSlide, {\r\n prevIndex: prevIndex,\r\n index: index,\r\n fromTouch: !!fromTouch,\r\n fromThumb: !!fromThumb,\r\n });\r\n this.lgBusy = true;\r\n clearTimeout(this.hideBarTimeout);\r\n this.arrowDisable(index);\r\n if (!direction) {\r\n if (index < prevIndex) {\r\n direction = 'prev';\r\n }\r\n else if (index > prevIndex) {\r\n direction = 'next';\r\n }\r\n }\r\n if (!fromTouch) {\r\n this.makeSlideAnimation(direction, currentSlideItem, previousSlideItem_1);\r\n }\r\n else {\r\n this.outer\r\n .find('.lg-item')\r\n .removeClass('lg-prev-slide lg-current lg-next-slide');\r\n var touchPrev = void 0;\r\n var touchNext = void 0;\r\n if (numberOfGalleryItems > 2) {\r\n touchPrev = index - 1;\r\n touchNext = index + 1;\r\n if (index === 0 && prevIndex === numberOfGalleryItems - 1) {\r\n // next slide\r\n touchNext = 0;\r\n touchPrev = numberOfGalleryItems - 1;\r\n }\r\n else if (index === numberOfGalleryItems - 1 &&\r\n prevIndex === 0) {\r\n // prev slide\r\n touchNext = 0;\r\n touchPrev = numberOfGalleryItems - 1;\r\n }\r\n }\r\n else {\r\n touchPrev = 0;\r\n touchNext = 1;\r\n }\r\n if (direction === 'prev') {\r\n this.getSlideItem(touchNext).addClass('lg-next-slide');\r\n }\r\n else {\r\n this.getSlideItem(touchPrev).addClass('lg-prev-slide');\r\n }\r\n currentSlideItem.addClass('lg-current');\r\n }\r\n // Do not put load content in set timeout as it needs to load immediately when the gallery is opened\r\n if (!this.lGalleryOn) {\r\n this.loadContent(index, true);\r\n }\r\n else {\r\n setTimeout(function () {\r\n _this.loadContent(index, true);\r\n // Add title if this.settings.appendSubHtmlTo === lg-sub-html\r\n if (_this.settings.appendSubHtmlTo !== '.lg-item') {\r\n _this.addHtml(index);\r\n }\r\n }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));\r\n }\r\n setTimeout(function () {\r\n _this.lgBusy = false;\r\n previousSlideItem_1.removeClass('lg-slide-progress');\r\n _this.LGel.trigger(lGEvents.afterSlide, {\r\n prevIndex: prevIndex,\r\n index: index,\r\n fromTouch: fromTouch,\r\n fromThumb: fromThumb,\r\n });\r\n }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay));\r\n }\r\n this.index = index;\r\n };\r\n LightGallery.prototype.updateCurrentCounter = function (index) {\r\n this.getElementById('lg-counter-current').html(index + 1 + '');\r\n };\r\n LightGallery.prototype.updateCounterTotal = function () {\r\n this.getElementById('lg-counter-all').html(this.galleryItems.length + '');\r\n };\r\n LightGallery.prototype.getSlideType = function (item) {\r\n if (item.__slideVideoInfo) {\r\n return 'video';\r\n }\r\n else if (item.iframe) {\r\n return 'iframe';\r\n }\r\n else {\r\n return 'image';\r\n }\r\n };\r\n LightGallery.prototype.touchMove = function (startCoords, endCoords, e) {\r\n var distanceX = endCoords.pageX - startCoords.pageX;\r\n var distanceY = endCoords.pageY - startCoords.pageY;\r\n var allowSwipe = false;\r\n if (this.swipeDirection) {\r\n allowSwipe = true;\r\n }\r\n else {\r\n if (Math.abs(distanceX) > 15) {\r\n this.swipeDirection = 'horizontal';\r\n allowSwipe = true;\r\n }\r\n else if (Math.abs(distanceY) > 15) {\r\n this.swipeDirection = 'vertical';\r\n allowSwipe = true;\r\n }\r\n }\r\n if (!allowSwipe) {\r\n return;\r\n }\r\n var $currentSlide = this.getSlideItem(this.index);\r\n if (this.swipeDirection === 'horizontal') {\r\n e === null || e === void 0 ? void 0 : e.preventDefault();\r\n // reset opacity and transition duration\r\n this.outer.addClass('lg-dragging');\r\n // move current slide\r\n this.setTranslate($currentSlide, distanceX, 0);\r\n // move next and prev slide with current slide\r\n var width = $currentSlide.get().offsetWidth;\r\n var slideWidthAmount = (width * 15) / 100;\r\n var gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100);\r\n this.setTranslate(this.outer.find('.lg-prev-slide').first(), -width + distanceX - gutter, 0);\r\n this.setTranslate(this.outer.find('.lg-next-slide').first(), width + distanceX + gutter, 0);\r\n }\r\n else if (this.swipeDirection === 'vertical') {\r\n if (this.settings.swipeToClose) {\r\n e === null || e === void 0 ? void 0 : e.preventDefault();\r\n this.$container.addClass('lg-dragging-vertical');\r\n var opacity = 1 - Math.abs(distanceY) / window.innerHeight;\r\n this.$backdrop.css('opacity', opacity);\r\n var scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2);\r\n this.setTranslate($currentSlide, 0, distanceY, scale, scale);\r\n if (Math.abs(distanceY) > 100) {\r\n this.outer\r\n .addClass('lg-hide-items')\r\n .removeClass('lg-components-open');\r\n }\r\n }\r\n }\r\n };\r\n LightGallery.prototype.touchEnd = function (endCoords, startCoords, event) {\r\n var _this = this;\r\n var distance;\r\n // keep slide animation for any mode while dragg/swipe\r\n if (this.settings.mode !== 'lg-slide') {\r\n this.outer.addClass('lg-slide');\r\n }\r\n // set transition duration\r\n setTimeout(function () {\r\n _this.$container.removeClass('lg-dragging-vertical');\r\n _this.outer\r\n .removeClass('lg-dragging lg-hide-items')\r\n .addClass('lg-components-open');\r\n var triggerClick = true;\r\n if (_this.swipeDirection === 'horizontal') {\r\n distance = endCoords.pageX - startCoords.pageX;\r\n var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX);\r\n if (distance < 0 &&\r\n distanceAbs > _this.settings.swipeThreshold) {\r\n _this.goToNextSlide(true);\r\n triggerClick = false;\r\n }\r\n else if (distance > 0 &&\r\n distanceAbs > _this.settings.swipeThreshold) {\r\n _this.goToPrevSlide(true);\r\n triggerClick = false;\r\n }\r\n }\r\n else if (_this.swipeDirection === 'vertical') {\r\n distance = Math.abs(endCoords.pageY - startCoords.pageY);\r\n if (_this.settings.closable &&\r\n _this.settings.swipeToClose &&\r\n distance > 100) {\r\n _this.closeGallery();\r\n return;\r\n }\r\n else {\r\n _this.$backdrop.css('opacity', 1);\r\n }\r\n }\r\n _this.outer.find('.lg-item').removeAttr('style');\r\n if (triggerClick &&\r\n Math.abs(endCoords.pageX - startCoords.pageX) < 5) {\r\n // Trigger click if distance is less than 5 pix\r\n var target = $LG(event.target);\r\n if (_this.isPosterElement(target)) {\r\n _this.LGel.trigger(lGEvents.posterClick);\r\n }\r\n }\r\n _this.swipeDirection = undefined;\r\n });\r\n // remove slide class once drag/swipe is completed if mode is not slide\r\n setTimeout(function () {\r\n if (!_this.outer.hasClass('lg-dragging') &&\r\n _this.settings.mode !== 'lg-slide') {\r\n _this.outer.removeClass('lg-slide');\r\n }\r\n }, this.settings.speed + 100);\r\n };\r\n LightGallery.prototype.enableSwipe = function () {\r\n var _this = this;\r\n var startCoords = {};\r\n var endCoords = {};\r\n var isMoved = false;\r\n var isSwiping = false;\r\n if (this.settings.enableSwipe) {\r\n this.$inner.on('touchstart.lg', function (e) {\r\n _this.dragOrSwipeEnabled = true;\r\n var $item = _this.getSlideItem(_this.index);\r\n if (($LG(e.target).hasClass('lg-item') ||\r\n $item.get().contains(e.target)) &&\r\n !_this.outer.hasClass('lg-zoomed') &&\r\n !_this.lgBusy &&\r\n e.touches.length === 1) {\r\n isSwiping = true;\r\n _this.touchAction = 'swipe';\r\n _this.manageSwipeClass();\r\n startCoords = {\r\n pageX: e.touches[0].pageX,\r\n pageY: e.touches[0].pageY,\r\n };\r\n }\r\n });\r\n this.$inner.on('touchmove.lg', function (e) {\r\n if (isSwiping &&\r\n _this.touchAction === 'swipe' &&\r\n e.touches.length === 1) {\r\n endCoords = {\r\n pageX: e.touches[0].pageX,\r\n pageY: e.touches[0].pageY,\r\n };\r\n _this.touchMove(startCoords, endCoords, e);\r\n isMoved = true;\r\n }\r\n });\r\n this.$inner.on('touchend.lg', function (event) {\r\n if (_this.touchAction === 'swipe') {\r\n if (isMoved) {\r\n isMoved = false;\r\n _this.touchEnd(endCoords, startCoords, event);\r\n }\r\n else if (isSwiping) {\r\n var target = $LG(event.target);\r\n if (_this.isPosterElement(target)) {\r\n _this.LGel.trigger(lGEvents.posterClick);\r\n }\r\n }\r\n _this.touchAction = undefined;\r\n isSwiping = false;\r\n }\r\n });\r\n }\r\n };\r\n LightGallery.prototype.enableDrag = function () {\r\n var _this = this;\r\n var startCoords = {};\r\n var endCoords = {};\r\n var isDraging = false;\r\n var isMoved = false;\r\n if (this.settings.enableDrag) {\r\n this.outer.on('mousedown.lg', function (e) {\r\n _this.dragOrSwipeEnabled = true;\r\n var $item = _this.getSlideItem(_this.index);\r\n if ($LG(e.target).hasClass('lg-item') ||\r\n $item.get().contains(e.target)) {\r\n if (!_this.outer.hasClass('lg-zoomed') && !_this.lgBusy) {\r\n e.preventDefault();\r\n if (!_this.lgBusy) {\r\n _this.manageSwipeClass();\r\n startCoords = {\r\n pageX: e.pageX,\r\n pageY: e.pageY,\r\n };\r\n isDraging = true;\r\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\r\n _this.outer.get().scrollLeft += 1;\r\n _this.outer.get().scrollLeft -= 1;\r\n // *\r\n _this.outer\r\n .removeClass('lg-grab')\r\n .addClass('lg-grabbing');\r\n _this.LGel.trigger(lGEvents.dragStart);\r\n }\r\n }\r\n }\r\n });\r\n $LG(window).on(\"mousemove.lg.global\" + this.lgId, function (e) {\r\n if (isDraging && _this.lgOpened) {\r\n isMoved = true;\r\n endCoords = {\r\n pageX: e.pageX,\r\n pageY: e.pageY,\r\n };\r\n _this.touchMove(startCoords, endCoords);\r\n _this.LGel.trigger(lGEvents.dragMove);\r\n }\r\n });\r\n $LG(window).on(\"mouseup.lg.global\" + this.lgId, function (event) {\r\n if (!_this.lgOpened) {\r\n return;\r\n }\r\n var target = $LG(event.target);\r\n if (isMoved) {\r\n isMoved = false;\r\n _this.touchEnd(endCoords, startCoords, event);\r\n _this.LGel.trigger(lGEvents.dragEnd);\r\n }\r\n else if (_this.isPosterElement(target)) {\r\n _this.LGel.trigger(lGEvents.posterClick);\r\n }\r\n // Prevent execution on click\r\n if (isDraging) {\r\n isDraging = false;\r\n _this.outer.removeClass('lg-grabbing').addClass('lg-grab');\r\n }\r\n });\r\n }\r\n };\r\n LightGallery.prototype.triggerPosterClick = function () {\r\n var _this = this;\r\n this.$inner.on('click.lg', function (event) {\r\n if (!_this.dragOrSwipeEnabled &&\r\n _this.isPosterElement($LG(event.target))) {\r\n _this.LGel.trigger(lGEvents.posterClick);\r\n }\r\n });\r\n };\r\n LightGallery.prototype.manageSwipeClass = function () {\r\n var _touchNext = this.index + 1;\r\n var _touchPrev = this.index - 1;\r\n if (this.settings.loop && this.galleryItems.length > 2) {\r\n if (this.index === 0) {\r\n _touchPrev = this.galleryItems.length - 1;\r\n }\r\n else if (this.index === this.galleryItems.length - 1) {\r\n _touchNext = 0;\r\n }\r\n }\r\n this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide');\r\n if (_touchPrev > -1) {\r\n this.getSlideItem(_touchPrev).addClass('lg-prev-slide');\r\n }\r\n this.getSlideItem(_touchNext).addClass('lg-next-slide');\r\n };\r\n /**\r\n * Go to next slide\r\n * @param {Boolean} fromTouch - true if slide function called via touch event\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery();\r\n * plugin.goToNextSlide();\r\n * @see Demo\r\n */\r\n LightGallery.prototype.goToNextSlide = function (fromTouch) {\r\n var _this = this;\r\n var _loop = this.settings.loop;\r\n if (fromTouch && this.galleryItems.length < 3) {\r\n _loop = false;\r\n }\r\n if (!this.lgBusy) {\r\n if (this.index + 1 < this.galleryItems.length) {\r\n this.index++;\r\n this.LGel.trigger(lGEvents.beforeNextSlide, {\r\n index: this.index,\r\n });\r\n this.slide(this.index, !!fromTouch, false, 'next');\r\n }\r\n else {\r\n if (_loop) {\r\n this.index = 0;\r\n this.LGel.trigger(lGEvents.beforeNextSlide, {\r\n index: this.index,\r\n });\r\n this.slide(this.index, !!fromTouch, false, 'next');\r\n }\r\n else if (this.settings.slideEndAnimation && !fromTouch) {\r\n this.outer.addClass('lg-right-end');\r\n setTimeout(function () {\r\n _this.outer.removeClass('lg-right-end');\r\n }, 400);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Go to previous slides\r\n * @param {Boolean} fromTouch - true if slide function called via touch event\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery({});\r\n * plugin.goToPrevSlide();\r\n * @see Demo\r\n *\r\n */\r\n LightGallery.prototype.goToPrevSlide = function (fromTouch) {\r\n var _this = this;\r\n var _loop = this.settings.loop;\r\n if (fromTouch && this.galleryItems.length < 3) {\r\n _loop = false;\r\n }\r\n if (!this.lgBusy) {\r\n if (this.index > 0) {\r\n this.index--;\r\n this.LGel.trigger(lGEvents.beforePrevSlide, {\r\n index: this.index,\r\n fromTouch: fromTouch,\r\n });\r\n this.slide(this.index, !!fromTouch, false, 'prev');\r\n }\r\n else {\r\n if (_loop) {\r\n this.index = this.galleryItems.length - 1;\r\n this.LGel.trigger(lGEvents.beforePrevSlide, {\r\n index: this.index,\r\n fromTouch: fromTouch,\r\n });\r\n this.slide(this.index, !!fromTouch, false, 'prev');\r\n }\r\n else if (this.settings.slideEndAnimation && !fromTouch) {\r\n this.outer.addClass('lg-left-end');\r\n setTimeout(function () {\r\n _this.outer.removeClass('lg-left-end');\r\n }, 400);\r\n }\r\n }\r\n }\r\n };\r\n LightGallery.prototype.keyPress = function () {\r\n var _this = this;\r\n $LG(window).on(\"keydown.lg.global\" + this.lgId, function (e) {\r\n if (_this.lgOpened &&\r\n _this.settings.escKey === true &&\r\n e.keyCode === 27) {\r\n e.preventDefault();\r\n if (_this.settings.allowMediaOverlap &&\r\n _this.outer.hasClass('lg-can-toggle') &&\r\n _this.outer.hasClass('lg-components-open')) {\r\n _this.outer.removeClass('lg-components-open');\r\n }\r\n else {\r\n _this.closeGallery();\r\n }\r\n }\r\n if (_this.lgOpened && _this.galleryItems.length > 1) {\r\n if (e.keyCode === 37) {\r\n e.preventDefault();\r\n _this.goToPrevSlide();\r\n }\r\n if (e.keyCode === 39) {\r\n e.preventDefault();\r\n _this.goToNextSlide();\r\n }\r\n }\r\n });\r\n };\r\n LightGallery.prototype.arrow = function () {\r\n var _this = this;\r\n this.getElementById('lg-prev').on('click.lg', function () {\r\n _this.goToPrevSlide();\r\n });\r\n this.getElementById('lg-next').on('click.lg', function () {\r\n _this.goToNextSlide();\r\n });\r\n };\r\n LightGallery.prototype.arrowDisable = function (index) {\r\n // Disable arrows if settings.hideControlOnEnd is true\r\n if (!this.settings.loop && this.settings.hideControlOnEnd) {\r\n var $prev = this.getElementById('lg-prev');\r\n var $next = this.getElementById('lg-next');\r\n if (index + 1 === this.galleryItems.length) {\r\n $next.attr('disabled', 'disabled').addClass('disabled');\r\n }\r\n else {\r\n $next.removeAttr('disabled').removeClass('disabled');\r\n }\r\n if (index === 0) {\r\n $prev.attr('disabled', 'disabled').addClass('disabled');\r\n }\r\n else {\r\n $prev.removeAttr('disabled').removeClass('disabled');\r\n }\r\n }\r\n };\r\n LightGallery.prototype.setTranslate = function ($el, xValue, yValue, scaleX, scaleY) {\r\n if (scaleX === void 0) { scaleX = 1; }\r\n if (scaleY === void 0) { scaleY = 1; }\r\n $el.css('transform', 'translate3d(' +\r\n xValue +\r\n 'px, ' +\r\n yValue +\r\n 'px, 0px) scale3d(' +\r\n scaleX +\r\n ', ' +\r\n scaleY +\r\n ', 1)');\r\n };\r\n LightGallery.prototype.mousewheel = function () {\r\n var _this = this;\r\n var lastCall = 0;\r\n this.outer.on('wheel.lg', function (e) {\r\n if (!e.deltaY || _this.galleryItems.length < 2) {\r\n return;\r\n }\r\n e.preventDefault();\r\n var now = new Date().getTime();\r\n if (now - lastCall < 1000) {\r\n return;\r\n }\r\n lastCall = now;\r\n if (e.deltaY > 0) {\r\n _this.goToNextSlide();\r\n }\r\n else if (e.deltaY < 0) {\r\n _this.goToPrevSlide();\r\n }\r\n });\r\n };\r\n LightGallery.prototype.isSlideElement = function (target) {\r\n return (target.hasClass('lg-outer') ||\r\n target.hasClass('lg-item') ||\r\n target.hasClass('lg-img-wrap'));\r\n };\r\n LightGallery.prototype.isPosterElement = function (target) {\r\n var playButton = this.getSlideItem(this.index)\r\n .find('.lg-video-play-button')\r\n .get();\r\n return (target.hasClass('lg-video-poster') ||\r\n target.hasClass('lg-video-play-button') ||\r\n (playButton && playButton.contains(target.get())));\r\n };\r\n /**\r\n * Maximize minimize inline gallery.\r\n * @category lGPublicMethods\r\n */\r\n LightGallery.prototype.toggleMaximize = function () {\r\n var _this = this;\r\n this.getElementById('lg-maximize').on('click.lg', function () {\r\n _this.$container.toggleClass('lg-inline');\r\n _this.refreshOnResize();\r\n });\r\n };\r\n LightGallery.prototype.invalidateItems = function () {\r\n for (var index = 0; index < this.items.length; index++) {\r\n var element = this.items[index];\r\n var $element = $LG(element);\r\n $element.off(\"click.lgcustom-item-\" + $element.attr('data-lg-id'));\r\n }\r\n };\r\n LightGallery.prototype.trapFocus = function () {\r\n var _this = this;\r\n this.$container.get().focus({\r\n preventScroll: true,\r\n });\r\n $LG(window).on(\"keydown.lg.global\" + this.lgId, function (e) {\r\n if (!_this.lgOpened) {\r\n return;\r\n }\r\n var isTabPressed = e.key === 'Tab' || e.keyCode === 9;\r\n if (!isTabPressed) {\r\n return;\r\n }\r\n var focusableEls = utils.getFocusableElements(_this.$container.get());\r\n var firstFocusableEl = focusableEls[0];\r\n var lastFocusableEl = focusableEls[focusableEls.length - 1];\r\n if (e.shiftKey) {\r\n if (document.activeElement === firstFocusableEl) {\r\n lastFocusableEl.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n else {\r\n if (document.activeElement === lastFocusableEl) {\r\n firstFocusableEl.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n });\r\n };\r\n LightGallery.prototype.manageCloseGallery = function () {\r\n var _this = this;\r\n if (!this.settings.closable)\r\n return;\r\n var mousedown = false;\r\n this.getElementById('lg-close').on('click.lg', function () {\r\n _this.closeGallery();\r\n });\r\n if (this.settings.closeOnTap) {\r\n // If you drag the slide and release outside gallery gets close on chrome\r\n // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer\r\n this.outer.on('mousedown.lg', function (e) {\r\n var target = $LG(e.target);\r\n if (_this.isSlideElement(target)) {\r\n mousedown = true;\r\n }\r\n else {\r\n mousedown = false;\r\n }\r\n });\r\n this.outer.on('mousemove.lg', function () {\r\n mousedown = false;\r\n });\r\n this.outer.on('mouseup.lg', function (e) {\r\n var target = $LG(e.target);\r\n if (_this.isSlideElement(target) && mousedown) {\r\n if (!_this.outer.hasClass('lg-dragging')) {\r\n _this.closeGallery();\r\n }\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * Close lightGallery if it is opened.\r\n *\r\n * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery\r\n * @return returns the estimated time to close gallery completely including the close animation duration\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery();\r\n * plugin.closeGallery();\r\n *\r\n */\r\n LightGallery.prototype.closeGallery = function (force) {\r\n var _this = this;\r\n if (!this.lgOpened || (!this.settings.closable && !force)) {\r\n return 0;\r\n }\r\n this.LGel.trigger(lGEvents.beforeClose);\r\n if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) {\r\n $LG(window).scrollTop(this.prevScrollTop);\r\n }\r\n var currentItem = this.items[this.index];\r\n var transform;\r\n if (this.zoomFromOrigin && currentItem) {\r\n var _a = this.mediaContainerPosition, top_4 = _a.top, bottom = _a.bottom;\r\n var _b = this.galleryItems[this.index], __slideVideoInfo = _b.__slideVideoInfo, poster = _b.poster;\r\n var imageSize = utils.getSize(currentItem, this.outer, top_4 + bottom, __slideVideoInfo && poster && this.settings.videoMaxSize);\r\n transform = utils.getTransform(currentItem, this.outer, top_4, bottom, imageSize);\r\n }\r\n if (this.zoomFromOrigin && transform) {\r\n this.outer.addClass('lg-closing lg-zoom-from-image');\r\n this.getSlideItem(this.index)\r\n .addClass('lg-start-end-progress')\r\n .css('transition-duration', this.settings.startAnimationDuration + 'ms')\r\n .css('transform', transform);\r\n }\r\n else {\r\n this.outer.addClass('lg-hide-items');\r\n // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true\r\n // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts\r\n this.outer.removeClass('lg-zoom-from-image');\r\n }\r\n // Unbind all events added by lightGallery\r\n // @todo\r\n //this.$el.off('.lg.tm');\r\n this.destroyModules();\r\n this.lGalleryOn = false;\r\n this.isDummyImageRemoved = false;\r\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\r\n clearTimeout(this.hideBarTimeout);\r\n this.hideBarTimeout = false;\r\n $LG('html').removeClass('lg-on');\r\n this.outer.removeClass('lg-visible lg-components-open');\r\n // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity.\r\n this.$backdrop.removeClass('in').css('opacity', 0);\r\n var removeTimeout = this.zoomFromOrigin && transform\r\n ? Math.max(this.settings.startAnimationDuration, this.settings.backdropDuration)\r\n : this.settings.backdropDuration;\r\n this.$container.removeClass('lg-show-in');\r\n // Once the closign animation is completed and gallery is invisible\r\n setTimeout(function () {\r\n if (_this.zoomFromOrigin && transform) {\r\n _this.outer.removeClass('lg-zoom-from-image');\r\n }\r\n _this.$container.removeClass('lg-show');\r\n // Reset scrollbar\r\n _this.resetScrollBar();\r\n // Need to remove inline opacity as it is used in the stylesheet as well\r\n _this.$backdrop\r\n .removeAttr('style')\r\n .css('transition-duration', _this.settings.backdropDuration + 'ms');\r\n _this.outer.removeClass(\"lg-closing \" + _this.settings.startClass);\r\n _this.getSlideItem(_this.index).removeClass('lg-start-end-progress');\r\n _this.$inner.empty();\r\n if (_this.lgOpened) {\r\n _this.LGel.trigger(lGEvents.afterClose, {\r\n instance: _this,\r\n });\r\n }\r\n if (_this.$container.get()) {\r\n _this.$container.get().blur();\r\n }\r\n _this.lgOpened = false;\r\n }, removeTimeout + 100);\r\n return removeTimeout + 100;\r\n };\r\n LightGallery.prototype.initModules = function () {\r\n this.plugins.forEach(function (module) {\r\n try {\r\n module.init();\r\n }\r\n catch (err) {\r\n console.warn(\"lightGallery:- make sure lightGallery module is properly initiated\");\r\n }\r\n });\r\n };\r\n LightGallery.prototype.destroyModules = function (destroy) {\r\n this.plugins.forEach(function (module) {\r\n try {\r\n if (destroy) {\r\n module.destroy();\r\n }\r\n else {\r\n module.closeGallery && module.closeGallery();\r\n }\r\n }\r\n catch (err) {\r\n console.warn(\"lightGallery:- make sure lightGallery module is properly destroyed\");\r\n }\r\n });\r\n };\r\n /**\r\n * Refresh lightGallery with new set of children.\r\n *\r\n * @description This is useful to update the gallery when the child elements are changed without calling destroy method.\r\n *\r\n * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery\r\n * @see Demo\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery();\r\n * // Delete or add children, then call\r\n * plugin.refresh();\r\n *\r\n */\r\n LightGallery.prototype.refresh = function (galleryItems) {\r\n if (!this.settings.dynamic) {\r\n this.invalidateItems();\r\n }\r\n if (galleryItems) {\r\n this.galleryItems = galleryItems;\r\n }\r\n else {\r\n this.galleryItems = this.getItems();\r\n }\r\n this.updateControls();\r\n this.openGalleryOnItemClick();\r\n this.LGel.trigger(lGEvents.updateSlides);\r\n };\r\n LightGallery.prototype.updateControls = function () {\r\n this.addSlideVideoInfo(this.galleryItems);\r\n this.updateCounterTotal();\r\n this.manageSingleSlideClassName();\r\n };\r\n LightGallery.prototype.destroyGallery = function () {\r\n this.destroyModules(true);\r\n if (!this.settings.dynamic) {\r\n this.invalidateItems();\r\n }\r\n $LG(window).off(\".lg.global\" + this.lgId);\r\n this.LGel.off('.lg');\r\n this.$container.remove();\r\n };\r\n /**\r\n * Destroy lightGallery.\r\n * Destroy lightGallery and its plugin instances completely\r\n *\r\n * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance.\r\n * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed.\r\n * You can use refresh method most of the times.\r\n * @category lGPublicMethods\r\n * @example\r\n * const plugin = lightGallery();\r\n * plugin.destroy();\r\n *\r\n */\r\n LightGallery.prototype.destroy = function () {\r\n var closeTimeout = this.closeGallery(true);\r\n if (closeTimeout) {\r\n setTimeout(this.destroyGallery.bind(this), closeTimeout);\r\n }\r\n else {\r\n this.destroyGallery();\r\n }\r\n return closeTimeout;\r\n };\r\n return LightGallery;\r\n}());\n\nfunction lightGallery(el, options) {\r\n return new LightGallery(el, options);\r\n}\n\nexport default lightGallery;\n//# sourceMappingURL=lightgallery.es5.js.map\n","/*!\n * lightgallery | 2.7.2 | September 20th 2023\n * http://www.lightgalleryjs.com/\n * Copyright (c) 2020 Sachin Neravath;\n * @license GPLv3\n */\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __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};\n\nvar thumbnailsSettings = {\r\n thumbnail: true,\r\n animateThumb: true,\r\n currentPagerPosition: 'middle',\r\n alignThumbnails: 'middle',\r\n thumbWidth: 100,\r\n thumbHeight: '80px',\r\n thumbMargin: 5,\r\n appendThumbnailsTo: '.lg-components',\r\n toggleThumb: false,\r\n enableThumbDrag: true,\r\n enableThumbSwipe: true,\r\n thumbnailSwipeThreshold: 10,\r\n loadYouTubeThumbnail: true,\r\n youTubeThumbSize: 1,\r\n thumbnailPluginStrings: {\r\n toggleThumbnails: 'Toggle thumbnails',\r\n },\r\n};\n\n/**\r\n * List of lightGallery events\r\n * All events should be documented here\r\n * Below interfaces are used to build the website documentations\r\n * */\r\nvar lGEvents = {\r\n afterAppendSlide: 'lgAfterAppendSlide',\r\n init: 'lgInit',\r\n hasVideo: 'lgHasVideo',\r\n containerResize: 'lgContainerResize',\r\n updateSlides: 'lgUpdateSlides',\r\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\r\n beforeOpen: 'lgBeforeOpen',\r\n afterOpen: 'lgAfterOpen',\r\n slideItemLoad: 'lgSlideItemLoad',\r\n beforeSlide: 'lgBeforeSlide',\r\n afterSlide: 'lgAfterSlide',\r\n posterClick: 'lgPosterClick',\r\n dragStart: 'lgDragStart',\r\n dragMove: 'lgDragMove',\r\n dragEnd: 'lgDragEnd',\r\n beforeNextSlide: 'lgBeforeNextSlide',\r\n beforePrevSlide: 'lgBeforePrevSlide',\r\n beforeClose: 'lgBeforeClose',\r\n afterClose: 'lgAfterClose',\r\n rotateLeft: 'lgRotateLeft',\r\n rotateRight: 'lgRotateRight',\r\n flipHorizontal: 'lgFlipHorizontal',\r\n flipVertical: 'lgFlipVertical',\r\n autoplay: 'lgAutoplay',\r\n autoplayStart: 'lgAutoplayStart',\r\n autoplayStop: 'lgAutoplayStop',\r\n};\n\nvar Thumbnail = /** @class */ (function () {\r\n function Thumbnail(instance, $LG) {\r\n this.thumbOuterWidth = 0;\r\n this.thumbTotalWidth = 0;\r\n this.translateX = 0;\r\n this.thumbClickable = false;\r\n // get lightGallery core plugin instance\r\n this.core = instance;\r\n this.$LG = $LG;\r\n return this;\r\n }\r\n Thumbnail.prototype.init = function () {\r\n // extend module default settings with lightGallery core settings\r\n this.settings = __assign(__assign({}, thumbnailsSettings), this.core.settings);\r\n this.thumbOuterWidth = 0;\r\n this.thumbTotalWidth =\r\n this.core.galleryItems.length *\r\n (this.settings.thumbWidth + this.settings.thumbMargin);\r\n // Thumbnail animation value\r\n this.translateX = 0;\r\n this.setAnimateThumbStyles();\r\n if (!this.core.settings.allowMediaOverlap) {\r\n this.settings.toggleThumb = false;\r\n }\r\n if (this.settings.thumbnail) {\r\n this.build();\r\n if (this.settings.animateThumb) {\r\n if (this.settings.enableThumbDrag) {\r\n this.enableThumbDrag();\r\n }\r\n if (this.settings.enableThumbSwipe) {\r\n this.enableThumbSwipe();\r\n }\r\n this.thumbClickable = false;\r\n }\r\n else {\r\n this.thumbClickable = true;\r\n }\r\n this.toggleThumbBar();\r\n this.thumbKeyPress();\r\n }\r\n };\r\n Thumbnail.prototype.build = function () {\r\n var _this = this;\r\n this.setThumbMarkup();\r\n this.manageActiveClassOnSlideChange();\r\n this.$lgThumb.first().on('click.lg touchend.lg', function (e) {\r\n var $target = _this.$LG(e.target);\r\n if (!$target.hasAttribute('data-lg-item-id')) {\r\n return;\r\n }\r\n setTimeout(function () {\r\n // In IE9 and bellow touch does not support\r\n // Go to slide if browser does not support css transitions\r\n if (_this.thumbClickable && !_this.core.lgBusy) {\r\n var index = parseInt($target.attr('data-lg-item-id'));\r\n _this.core.slide(index, false, true, false);\r\n }\r\n }, 50);\r\n });\r\n this.core.LGel.on(lGEvents.beforeSlide + \".thumb\", function (event) {\r\n var index = event.detail.index;\r\n _this.animateThumb(index);\r\n });\r\n this.core.LGel.on(lGEvents.beforeOpen + \".thumb\", function () {\r\n _this.thumbOuterWidth = _this.core.outer.get().offsetWidth;\r\n });\r\n this.core.LGel.on(lGEvents.updateSlides + \".thumb\", function () {\r\n _this.rebuildThumbnails();\r\n });\r\n this.core.LGel.on(lGEvents.containerResize + \".thumb\", function () {\r\n if (!_this.core.lgOpened)\r\n return;\r\n setTimeout(function () {\r\n _this.thumbOuterWidth = _this.core.outer.get().offsetWidth;\r\n _this.animateThumb(_this.core.index);\r\n _this.thumbOuterWidth = _this.core.outer.get().offsetWidth;\r\n }, 50);\r\n });\r\n };\r\n Thumbnail.prototype.setThumbMarkup = function () {\r\n var thumbOuterClassNames = 'lg-thumb-outer ';\r\n if (this.settings.alignThumbnails) {\r\n thumbOuterClassNames += \"lg-thumb-align-\" + this.settings.alignThumbnails;\r\n }\r\n var html = \"
\\n
\\n
\\n
\";\r\n this.core.outer.addClass('lg-has-thumb');\r\n if (this.settings.appendThumbnailsTo === '.lg-components') {\r\n this.core.$lgComponents.append(html);\r\n }\r\n else {\r\n this.core.outer.append(html);\r\n }\r\n this.$thumbOuter = this.core.outer.find('.lg-thumb-outer').first();\r\n this.$lgThumb = this.core.outer.find('.lg-thumb').first();\r\n if (this.settings.animateThumb) {\r\n this.core.outer\r\n .find('.lg-thumb')\r\n .css('transition-duration', this.core.settings.speed + 'ms')\r\n .css('width', this.thumbTotalWidth + 'px')\r\n .css('position', 'relative');\r\n }\r\n this.setThumbItemHtml(this.core.galleryItems);\r\n };\r\n Thumbnail.prototype.enableThumbDrag = function () {\r\n var _this = this;\r\n var thumbDragUtils = {\r\n cords: {\r\n startX: 0,\r\n endX: 0,\r\n },\r\n isMoved: false,\r\n newTranslateX: 0,\r\n startTime: new Date(),\r\n endTime: new Date(),\r\n touchMoveTime: 0,\r\n };\r\n var isDragging = false;\r\n this.$thumbOuter.addClass('lg-grab');\r\n this.core.outer\r\n .find('.lg-thumb')\r\n .first()\r\n .on('mousedown.lg.thumb', function (e) {\r\n if (_this.thumbTotalWidth > _this.thumbOuterWidth) {\r\n // execute only on .lg-object\r\n e.preventDefault();\r\n thumbDragUtils.cords.startX = e.pageX;\r\n thumbDragUtils.startTime = new Date();\r\n _this.thumbClickable = false;\r\n isDragging = true;\r\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\r\n _this.core.outer.get().scrollLeft += 1;\r\n _this.core.outer.get().scrollLeft -= 1;\r\n // *\r\n _this.$thumbOuter\r\n .removeClass('lg-grab')\r\n .addClass('lg-grabbing');\r\n }\r\n });\r\n this.$LG(window).on(\"mousemove.lg.thumb.global\" + this.core.lgId, function (e) {\r\n if (!_this.core.lgOpened)\r\n return;\r\n if (isDragging) {\r\n thumbDragUtils.cords.endX = e.pageX;\r\n thumbDragUtils = _this.onThumbTouchMove(thumbDragUtils);\r\n }\r\n });\r\n this.$LG(window).on(\"mouseup.lg.thumb.global\" + this.core.lgId, function () {\r\n if (!_this.core.lgOpened)\r\n return;\r\n if (thumbDragUtils.isMoved) {\r\n thumbDragUtils = _this.onThumbTouchEnd(thumbDragUtils);\r\n }\r\n else {\r\n _this.thumbClickable = true;\r\n }\r\n if (isDragging) {\r\n isDragging = false;\r\n _this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');\r\n }\r\n });\r\n };\r\n Thumbnail.prototype.enableThumbSwipe = function () {\r\n var _this = this;\r\n var thumbDragUtils = {\r\n cords: {\r\n startX: 0,\r\n endX: 0,\r\n },\r\n isMoved: false,\r\n newTranslateX: 0,\r\n startTime: new Date(),\r\n endTime: new Date(),\r\n touchMoveTime: 0,\r\n };\r\n this.$lgThumb.on('touchstart.lg', function (e) {\r\n if (_this.thumbTotalWidth > _this.thumbOuterWidth) {\r\n e.preventDefault();\r\n thumbDragUtils.cords.startX = e.targetTouches[0].pageX;\r\n _this.thumbClickable = false;\r\n thumbDragUtils.startTime = new Date();\r\n }\r\n });\r\n this.$lgThumb.on('touchmove.lg', function (e) {\r\n if (_this.thumbTotalWidth > _this.thumbOuterWidth) {\r\n e.preventDefault();\r\n thumbDragUtils.cords.endX = e.targetTouches[0].pageX;\r\n thumbDragUtils = _this.onThumbTouchMove(thumbDragUtils);\r\n }\r\n });\r\n this.$lgThumb.on('touchend.lg', function () {\r\n if (thumbDragUtils.isMoved) {\r\n thumbDragUtils = _this.onThumbTouchEnd(thumbDragUtils);\r\n }\r\n else {\r\n _this.thumbClickable = true;\r\n }\r\n });\r\n };\r\n // Rebuild thumbnails\r\n Thumbnail.prototype.rebuildThumbnails = function () {\r\n var _this = this;\r\n // Remove transitions\r\n this.$thumbOuter.addClass('lg-rebuilding-thumbnails');\r\n setTimeout(function () {\r\n _this.thumbTotalWidth =\r\n _this.core.galleryItems.length *\r\n (_this.settings.thumbWidth + _this.settings.thumbMargin);\r\n _this.$lgThumb.css('width', _this.thumbTotalWidth + 'px');\r\n _this.$lgThumb.empty();\r\n _this.setThumbItemHtml(_this.core.galleryItems);\r\n _this.animateThumb(_this.core.index);\r\n }, 50);\r\n setTimeout(function () {\r\n _this.$thumbOuter.removeClass('lg-rebuilding-thumbnails');\r\n }, 200);\r\n };\r\n // @ts-check\r\n Thumbnail.prototype.setTranslate = function (value) {\r\n this.$lgThumb.css('transform', 'translate3d(-' + value + 'px, 0px, 0px)');\r\n };\r\n Thumbnail.prototype.getPossibleTransformX = function (left) {\r\n if (left > this.thumbTotalWidth - this.thumbOuterWidth) {\r\n left = this.thumbTotalWidth - this.thumbOuterWidth;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n };\r\n Thumbnail.prototype.animateThumb = function (index) {\r\n this.$lgThumb.css('transition-duration', this.core.settings.speed + 'ms');\r\n if (this.settings.animateThumb) {\r\n var position = 0;\r\n switch (this.settings.currentPagerPosition) {\r\n case 'left':\r\n position = 0;\r\n break;\r\n case 'middle':\r\n position =\r\n this.thumbOuterWidth / 2 - this.settings.thumbWidth / 2;\r\n break;\r\n case 'right':\r\n position = this.thumbOuterWidth - this.settings.thumbWidth;\r\n }\r\n this.translateX =\r\n (this.settings.thumbWidth + this.settings.thumbMargin) * index -\r\n 1 -\r\n position;\r\n if (this.translateX > this.thumbTotalWidth - this.thumbOuterWidth) {\r\n this.translateX = this.thumbTotalWidth - this.thumbOuterWidth;\r\n }\r\n if (this.translateX < 0) {\r\n this.translateX = 0;\r\n }\r\n this.setTranslate(this.translateX);\r\n }\r\n };\r\n Thumbnail.prototype.onThumbTouchMove = function (thumbDragUtils) {\r\n thumbDragUtils.newTranslateX = this.translateX;\r\n thumbDragUtils.isMoved = true;\r\n thumbDragUtils.touchMoveTime = new Date().valueOf();\r\n thumbDragUtils.newTranslateX -=\r\n thumbDragUtils.cords.endX - thumbDragUtils.cords.startX;\r\n thumbDragUtils.newTranslateX = this.getPossibleTransformX(thumbDragUtils.newTranslateX);\r\n // move current slide\r\n this.setTranslate(thumbDragUtils.newTranslateX);\r\n this.$thumbOuter.addClass('lg-dragging');\r\n return thumbDragUtils;\r\n };\r\n Thumbnail.prototype.onThumbTouchEnd = function (thumbDragUtils) {\r\n thumbDragUtils.isMoved = false;\r\n thumbDragUtils.endTime = new Date();\r\n this.$thumbOuter.removeClass('lg-dragging');\r\n var touchDuration = thumbDragUtils.endTime.valueOf() -\r\n thumbDragUtils.startTime.valueOf();\r\n var distanceXnew = thumbDragUtils.cords.endX - thumbDragUtils.cords.startX;\r\n var speedX = Math.abs(distanceXnew) / touchDuration;\r\n // Some magical numbers\r\n // Can be improved\r\n if (speedX > 0.15 &&\r\n thumbDragUtils.endTime.valueOf() - thumbDragUtils.touchMoveTime < 30) {\r\n speedX += 1;\r\n if (speedX > 2) {\r\n speedX += 1;\r\n }\r\n speedX =\r\n speedX +\r\n speedX * (Math.abs(distanceXnew) / this.thumbOuterWidth);\r\n this.$lgThumb.css('transition-duration', Math.min(speedX - 1, 2) + 'settings');\r\n distanceXnew = distanceXnew * speedX;\r\n this.translateX = this.getPossibleTransformX(this.translateX - distanceXnew);\r\n this.setTranslate(this.translateX);\r\n }\r\n else {\r\n this.translateX = thumbDragUtils.newTranslateX;\r\n }\r\n if (Math.abs(thumbDragUtils.cords.endX - thumbDragUtils.cords.startX) <\r\n this.settings.thumbnailSwipeThreshold) {\r\n this.thumbClickable = true;\r\n }\r\n return thumbDragUtils;\r\n };\r\n Thumbnail.prototype.getThumbHtml = function (thumb, index, alt) {\r\n var slideVideoInfo = this.core.galleryItems[index].__slideVideoInfo || {};\r\n var thumbImg;\r\n if (slideVideoInfo.youtube) {\r\n if (this.settings.loadYouTubeThumbnail) {\r\n thumbImg =\r\n '//img.youtube.com/vi/' +\r\n slideVideoInfo.youtube[1] +\r\n '/' +\r\n this.settings.youTubeThumbSize +\r\n '.jpg';\r\n }\r\n else {\r\n thumbImg = thumb;\r\n }\r\n }\r\n else {\r\n thumbImg = thumb;\r\n }\r\n var altAttr = alt ? 'alt=\"' + alt + '\"' : '';\r\n return \"
\\n \\n
\";\r\n };\r\n Thumbnail.prototype.getThumbItemHtml = function (items) {\r\n var thumbList = '';\r\n for (var i = 0; i < items.length; i++) {\r\n thumbList += this.getThumbHtml(items[i].thumb, i, items[i].alt);\r\n }\r\n return thumbList;\r\n };\r\n Thumbnail.prototype.setThumbItemHtml = function (items) {\r\n var thumbList = this.getThumbItemHtml(items);\r\n this.$lgThumb.html(thumbList);\r\n };\r\n Thumbnail.prototype.setAnimateThumbStyles = function () {\r\n if (this.settings.animateThumb) {\r\n this.core.outer.addClass('lg-animate-thumb');\r\n }\r\n };\r\n // Manage thumbnail active calss\r\n Thumbnail.prototype.manageActiveClassOnSlideChange = function () {\r\n var _this = this;\r\n // manage active class for thumbnail\r\n this.core.LGel.on(lGEvents.beforeSlide + \".thumb\", function (event) {\r\n var $thumb = _this.core.outer.find('.lg-thumb-item');\r\n var index = event.detail.index;\r\n $thumb.removeClass('active');\r\n $thumb.eq(index).addClass('active');\r\n });\r\n };\r\n // Toggle thumbnail bar\r\n Thumbnail.prototype.toggleThumbBar = function () {\r\n var _this = this;\r\n if (this.settings.toggleThumb) {\r\n this.core.outer.addClass('lg-can-toggle');\r\n this.core.$toolbar.append('');\r\n this.core.outer\r\n .find('.lg-toggle-thumb')\r\n .first()\r\n .on('click.lg', function () {\r\n _this.core.outer.toggleClass('lg-components-open');\r\n });\r\n }\r\n };\r\n Thumbnail.prototype.thumbKeyPress = function () {\r\n var _this = this;\r\n this.$LG(window).on(\"keydown.lg.thumb.global\" + this.core.lgId, function (e) {\r\n if (!_this.core.lgOpened || !_this.settings.toggleThumb)\r\n return;\r\n if (e.keyCode === 38) {\r\n e.preventDefault();\r\n _this.core.outer.addClass('lg-components-open');\r\n }\r\n else if (e.keyCode === 40) {\r\n e.preventDefault();\r\n _this.core.outer.removeClass('lg-components-open');\r\n }\r\n });\r\n };\r\n Thumbnail.prototype.destroy = function () {\r\n if (this.settings.thumbnail) {\r\n this.$LG(window).off(\".lg.thumb.global\" + this.core.lgId);\r\n this.core.LGel.off('.lg.thumb');\r\n this.core.LGel.off('.thumb');\r\n this.$thumbOuter.remove();\r\n this.core.outer.removeClass('lg-has-thumb');\r\n }\r\n };\r\n return Thumbnail;\r\n}());\n\nexport default Thumbnail;\n//# sourceMappingURL=lg-thumbnail.es5.js.map\n","/*!\n * lightgallery | 2.7.2 | September 20th 2023\n * http://www.lightgalleryjs.com/\n * Copyright (c) 2020 Sachin Neravath;\n * @license GPLv3\n */\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __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};\n\nvar videoSettings = {\r\n autoplayFirstVideo: true,\r\n youTubePlayerParams: false,\r\n vimeoPlayerParams: false,\r\n wistiaPlayerParams: false,\r\n gotoNextSlideOnVideoEnd: true,\r\n autoplayVideoOnSlide: false,\r\n videojs: false,\r\n videojsTheme: '',\r\n videojsOptions: {},\r\n};\n\n/**\r\n * List of lightGallery events\r\n * All events should be documented here\r\n * Below interfaces are used to build the website documentations\r\n * */\r\nvar lGEvents = {\r\n afterAppendSlide: 'lgAfterAppendSlide',\r\n init: 'lgInit',\r\n hasVideo: 'lgHasVideo',\r\n containerResize: 'lgContainerResize',\r\n updateSlides: 'lgUpdateSlides',\r\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\r\n beforeOpen: 'lgBeforeOpen',\r\n afterOpen: 'lgAfterOpen',\r\n slideItemLoad: 'lgSlideItemLoad',\r\n beforeSlide: 'lgBeforeSlide',\r\n afterSlide: 'lgAfterSlide',\r\n posterClick: 'lgPosterClick',\r\n dragStart: 'lgDragStart',\r\n dragMove: 'lgDragMove',\r\n dragEnd: 'lgDragEnd',\r\n beforeNextSlide: 'lgBeforeNextSlide',\r\n beforePrevSlide: 'lgBeforePrevSlide',\r\n beforeClose: 'lgBeforeClose',\r\n afterClose: 'lgAfterClose',\r\n rotateLeft: 'lgRotateLeft',\r\n rotateRight: 'lgRotateRight',\r\n flipHorizontal: 'lgFlipHorizontal',\r\n flipVertical: 'lgFlipVertical',\r\n autoplay: 'lgAutoplay',\r\n autoplayStart: 'lgAutoplayStart',\r\n autoplayStop: 'lgAutoplayStop',\r\n};\n\nvar param = function (obj) {\r\n return Object.keys(obj)\r\n .map(function (k) {\r\n return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);\r\n })\r\n .join('&');\r\n};\r\nvar paramsToObject = function (url) {\r\n var paramas = url\r\n .slice(1)\r\n .split('&')\r\n .map(function (p) { return p.split('='); })\r\n .reduce(function (obj, pair) {\r\n var _a = pair.map(decodeURIComponent), key = _a[0], value = _a[1];\r\n obj[key] = value;\r\n return obj;\r\n }, {});\r\n return paramas;\r\n};\r\nvar getYouTubeParams = function (videoInfo, youTubePlayerParamsSettings) {\r\n if (!videoInfo.youtube)\r\n return '';\r\n var slideUrlParams = videoInfo.youtube[2]\r\n ? paramsToObject(videoInfo.youtube[2])\r\n : '';\r\n // For youtube first params gets priority if duplicates found\r\n var defaultYouTubePlayerParams = {\r\n wmode: 'opaque',\r\n autoplay: 0,\r\n mute: 1,\r\n enablejsapi: 1,\r\n };\r\n var playerParamsSettings = youTubePlayerParamsSettings || {};\r\n var youTubePlayerParams = __assign(__assign(__assign({}, defaultYouTubePlayerParams), playerParamsSettings), slideUrlParams);\r\n var youTubeParams = \"?\" + param(youTubePlayerParams);\r\n return youTubeParams;\r\n};\r\nvar isYouTubeNoCookie = function (url) {\r\n return url.includes('youtube-nocookie.com');\r\n};\r\nvar getVimeoURLParams = function (defaultParams, videoInfo) {\r\n if (!videoInfo || !videoInfo.vimeo)\r\n return '';\r\n var urlParams = videoInfo.vimeo[2] || '';\r\n var defaultPlayerParams = defaultParams && Object.keys(defaultParams).length !== 0\r\n ? '&' + param(defaultParams)\r\n : '';\r\n // Support private video\r\n var urlWithHash = videoInfo.vimeo[0].split('/').pop() || '';\r\n var urlWithHashWithParams = urlWithHash.split('?')[0] || '';\r\n var hash = urlWithHashWithParams.split('#')[0];\r\n var isPrivate = videoInfo.vimeo[1] !== hash;\r\n if (isPrivate) {\r\n urlParams = urlParams.replace(\"/\" + hash, '');\r\n }\r\n urlParams =\r\n urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';\r\n // For vimeo last params gets priority if duplicates found\r\n var vimeoPlayerParams = \"?autoplay=0&muted=1\" + (isPrivate ? \"&h=\" + hash : '') + defaultPlayerParams + urlParams;\r\n return vimeoPlayerParams;\r\n};\n\n/**\r\n * Video module for lightGallery\r\n * Supports HTML5, YouTube, Vimeo, wistia videos\r\n *\r\n *\r\n * @ref Wistia\r\n * https://wistia.com/support/integrations/wordpress(How to get url)\r\n * https://wistia.com/support/developers/embed-options#using-embed-options\r\n * https://wistia.com/support/developers/player-api\r\n * https://wistia.com/support/developers/construct-an-embed-code\r\n * http://jsfiddle.net/xvnm7xLm/\r\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\r\n * https://wistia.com/support/embed-and-share/sharing-videos\r\n * https://private-sharing.wistia.com/medias/mwhrulrucj\r\n *\r\n * @ref Youtube\r\n * https://developers.google.com/youtube/player_parameters#enablejsapi\r\n * https://developers.google.com/youtube/iframe_api_reference\r\n * https://developer.chrome.com/blog/autoplay/#iframe-delegation\r\n *\r\n * @ref Vimeo\r\n * https://stackoverflow.com/questions/10488943/easy-way-to-get-vimeo-id-from-a-vimeo-url\r\n * https://vimeo.zendesk.com/hc/en-us/articles/360000121668-Starting-playback-at-a-specific-timecode\r\n * https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters\r\n */\r\nvar Video = /** @class */ (function () {\r\n function Video(instance) {\r\n // get lightGallery core plugin instance\r\n this.core = instance;\r\n this.settings = __assign(__assign({}, videoSettings), this.core.settings);\r\n return this;\r\n }\r\n Video.prototype.init = function () {\r\n var _this = this;\r\n /**\r\n * Event triggered when video url found without poster\r\n * Append video HTML\r\n * Play if autoplayFirstVideo is true\r\n */\r\n this.core.LGel.on(lGEvents.hasVideo + \".video\", this.onHasVideo.bind(this));\r\n this.core.LGel.on(lGEvents.posterClick + \".video\", function () {\r\n var $el = _this.core.getSlideItem(_this.core.index);\r\n _this.loadVideoOnPosterClick($el);\r\n });\r\n this.core.LGel.on(lGEvents.slideItemLoad + \".video\", this.onSlideItemLoad.bind(this));\r\n // @desc fired immediately before each slide transition.\r\n this.core.LGel.on(lGEvents.beforeSlide + \".video\", this.onBeforeSlide.bind(this));\r\n // @desc fired immediately after each slide transition.\r\n this.core.LGel.on(lGEvents.afterSlide + \".video\", this.onAfterSlide.bind(this));\r\n };\r\n /**\r\n * @desc Event triggered when a slide is completely loaded\r\n *\r\n * @param {Event} event - lightGalley custom event\r\n */\r\n Video.prototype.onSlideItemLoad = function (event) {\r\n var _this = this;\r\n var _a = event.detail, isFirstSlide = _a.isFirstSlide, index = _a.index;\r\n // Should check the active slide as well as user may have moved to different slide before the first slide is loaded\r\n if (this.settings.autoplayFirstVideo &&\r\n isFirstSlide &&\r\n index === this.core.index) {\r\n // Delay is just for the transition effect on video load\r\n setTimeout(function () {\r\n _this.loadAndPlayVideo(index);\r\n }, 200);\r\n }\r\n // Should not call on first slide. should check only if the slide is active\r\n if (!isFirstSlide &&\r\n this.settings.autoplayVideoOnSlide &&\r\n index === this.core.index) {\r\n this.loadAndPlayVideo(index);\r\n }\r\n };\r\n /**\r\n * @desc Event triggered when video url or poster found\r\n * Append video HTML is poster is not given\r\n * Play if autoplayFirstVideo is true\r\n *\r\n * @param {Event} event - Javascript Event object.\r\n */\r\n Video.prototype.onHasVideo = function (event) {\r\n var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;\r\n if (!hasPoster) {\r\n // All functions are called separately if poster exist in loadVideoOnPosterClick function\r\n this.appendVideos(this.core.getSlideItem(index), {\r\n src: src,\r\n addClass: 'lg-object',\r\n index: index,\r\n html5Video: html5Video,\r\n });\r\n // Automatically navigate to next slide once video reaches the end.\r\n this.gotoNextSlideOnVideoEnd(src, index);\r\n }\r\n };\r\n /**\r\n * @desc fired immediately before each slide transition.\r\n * Pause the previous video\r\n * Hide the download button if the slide contains YouTube, Vimeo, or Wistia videos.\r\n *\r\n * @param {Event} event - Javascript Event object.\r\n * @param {number} prevIndex - Previous index of the slide.\r\n * @param {number} index - Current index of the slide\r\n */\r\n Video.prototype.onBeforeSlide = function (event) {\r\n if (this.core.lGalleryOn) {\r\n var prevIndex = event.detail.prevIndex;\r\n this.pauseVideo(prevIndex);\r\n }\r\n };\r\n /**\r\n * @desc fired immediately after each slide transition.\r\n * Play video if autoplayVideoOnSlide option is enabled.\r\n *\r\n * @param {Event} event - Javascript Event object.\r\n * @param {number} prevIndex - Previous index of the slide.\r\n * @param {number} index - Current index of the slide\r\n * @todo should check on onSlideLoad as well if video is not loaded on after slide\r\n */\r\n Video.prototype.onAfterSlide = function (event) {\r\n var _this = this;\r\n var _a = event.detail, index = _a.index, prevIndex = _a.prevIndex;\r\n // Do not call on first slide\r\n var $slide = this.core.getSlideItem(index);\r\n if (this.settings.autoplayVideoOnSlide && index !== prevIndex) {\r\n if ($slide.hasClass('lg-complete')) {\r\n setTimeout(function () {\r\n _this.loadAndPlayVideo(index);\r\n }, 100);\r\n }\r\n }\r\n };\r\n Video.prototype.loadAndPlayVideo = function (index) {\r\n var $slide = this.core.getSlideItem(index);\r\n var currentGalleryItem = this.core.galleryItems[index];\r\n if (currentGalleryItem.poster) {\r\n this.loadVideoOnPosterClick($slide, true);\r\n }\r\n else {\r\n this.playVideo(index);\r\n }\r\n };\r\n /**\r\n * Play HTML5, Youtube, Vimeo or Wistia videos in a particular slide.\r\n * @param {number} index - Index of the slide\r\n */\r\n Video.prototype.playVideo = function (index) {\r\n this.controlVideo(index, 'play');\r\n };\r\n /**\r\n * Pause HTML5, Youtube, Vimeo or Wistia videos in a particular slide.\r\n * @param {number} index - Index of the slide\r\n */\r\n Video.prototype.pauseVideo = function (index) {\r\n this.controlVideo(index, 'pause');\r\n };\r\n Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {\r\n var video = '';\r\n var videoInfo = this.core.galleryItems[index]\r\n .__slideVideoInfo || {};\r\n var currentGalleryItem = this.core.galleryItems[index];\r\n var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;\r\n videoTitle = videoTitle ? 'title=\"' + videoTitle + '\"' : '';\r\n var commonIframeProps = \"allowtransparency=\\\"true\\\"\\n frameborder=\\\"0\\\"\\n scrolling=\\\"no\\\"\\n allowfullscreen\\n mozallowfullscreen\\n webkitallowfullscreen\\n oallowfullscreen\\n msallowfullscreen\";\r\n if (videoInfo.youtube) {\r\n var videoId = 'lg-youtube' + index;\r\n var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);\r\n var isYouTubeNoCookieURL = isYouTubeNoCookie(src);\r\n var youtubeURL = isYouTubeNoCookieURL\r\n ? '//www.youtube-nocookie.com/'\r\n : '//www.youtube.com/';\r\n video = \"\";\r\n }\r\n else if (videoInfo.vimeo) {\r\n var videoId = 'lg-vimeo' + index;\r\n var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);\r\n video = \"\";\r\n }\r\n else if (videoInfo.wistia) {\r\n var wistiaId = 'lg-wistia' + index;\r\n var playerParams = param(this.settings.wistiaPlayerParams);\r\n playerParams = playerParams ? '?' + playerParams : '';\r\n video = \"\";\r\n }\r\n else if (videoInfo.html5) {\r\n var html5VideoMarkup = '';\r\n for (var i = 0; i < html5Video.source.length; i++) {\r\n html5VideoMarkup += \"\";\r\n }\r\n if (html5Video.tracks) {\r\n var _loop_1 = function (i) {\r\n var trackAttributes = '';\r\n var track = html5Video.tracks[i];\r\n Object.keys(track || {}).forEach(function (key) {\r\n trackAttributes += key + \"=\\\"\" + track[key] + \"\\\" \";\r\n });\r\n html5VideoMarkup += \"\";\r\n };\r\n for (var i = 0; i < html5Video.tracks.length; i++) {\r\n _loop_1(i);\r\n }\r\n }\r\n var html5VideoAttrs_1 = '';\r\n var videoAttributes_1 = html5Video.attributes || {};\r\n Object.keys(videoAttributes_1 || {}).forEach(function (key) {\r\n html5VideoAttrs_1 += key + \"=\\\"\" + videoAttributes_1[key] + \"\\\" \";\r\n });\r\n video = \"\";\r\n }\r\n return video;\r\n };\r\n /**\r\n * @desc - Append videos to the slide\r\n *\r\n * @param {HTMLElement} el - slide element\r\n * @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo\r\n */\r\n Video.prototype.appendVideos = function (el, videoParams) {\r\n var _a;\r\n var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);\r\n el.find('.lg-video-cont').append(videoHtml);\r\n var $videoElement = el.find('.lg-video-object').first();\r\n if (videoParams.html5Video) {\r\n $videoElement.on('mousedown.lg.video', function (e) {\r\n e.stopPropagation();\r\n });\r\n }\r\n if (this.settings.videojs && ((_a = this.core.galleryItems[videoParams.index].__slideVideoInfo) === null || _a === void 0 ? void 0 : _a.html5)) {\r\n try {\r\n return videojs($videoElement.get(), this.settings.videojsOptions);\r\n }\r\n catch (e) {\r\n console.error('lightGallery:- Make sure you have included videojs');\r\n }\r\n }\r\n };\r\n Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {\r\n var _this = this;\r\n var $videoElement = this.core\r\n .getSlideItem(index)\r\n .find('.lg-video-object')\r\n .first();\r\n var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};\r\n if (this.settings.gotoNextSlideOnVideoEnd) {\r\n if (videoInfo.html5) {\r\n $videoElement.on('ended', function () {\r\n _this.core.goToNextSlide();\r\n });\r\n }\r\n else if (videoInfo.vimeo) {\r\n try {\r\n // https://github.com/vimeo/player.js/#ended\r\n new Vimeo.Player($videoElement.get()).on('ended', function () {\r\n _this.core.goToNextSlide();\r\n });\r\n }\r\n catch (e) {\r\n console.error('lightGallery:- Make sure you have included //github.com/vimeo/player.js');\r\n }\r\n }\r\n else if (videoInfo.wistia) {\r\n try {\r\n window._wq = window._wq || [];\r\n // @todo Event is gettign triggered multiple times\r\n window._wq.push({\r\n id: $videoElement.attr('id'),\r\n onReady: function (video) {\r\n video.bind('end', function () {\r\n _this.core.goToNextSlide();\r\n });\r\n },\r\n });\r\n }\r\n catch (e) {\r\n console.error('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');\r\n }\r\n }\r\n }\r\n };\r\n Video.prototype.controlVideo = function (index, action) {\r\n var $videoElement = this.core\r\n .getSlideItem(index)\r\n .find('.lg-video-object')\r\n .first();\r\n var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};\r\n if (!$videoElement.get())\r\n return;\r\n if (videoInfo.youtube) {\r\n try {\r\n $videoElement.get().contentWindow.postMessage(\"{\\\"event\\\":\\\"command\\\",\\\"func\\\":\\\"\" + action + \"Video\\\",\\\"args\\\":\\\"\\\"}\", '*');\r\n }\r\n catch (e) {\r\n console.error(\"lightGallery:- \" + e);\r\n }\r\n }\r\n else if (videoInfo.vimeo) {\r\n try {\r\n new Vimeo.Player($videoElement.get())[action]();\r\n }\r\n catch (e) {\r\n console.error('lightGallery:- Make sure you have included //github.com/vimeo/player.js');\r\n }\r\n }\r\n else if (videoInfo.html5) {\r\n if (this.settings.videojs) {\r\n try {\r\n videojs($videoElement.get())[action]();\r\n }\r\n catch (e) {\r\n console.error('lightGallery:- Make sure you have included videojs');\r\n }\r\n }\r\n else {\r\n $videoElement.get()[action]();\r\n }\r\n }\r\n else if (videoInfo.wistia) {\r\n try {\r\n window._wq = window._wq || [];\r\n // @todo Find a way to destroy wistia player instance\r\n window._wq.push({\r\n id: $videoElement.attr('id'),\r\n onReady: function (video) {\r\n video[action]();\r\n },\r\n });\r\n }\r\n catch (e) {\r\n console.error('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');\r\n }\r\n }\r\n };\r\n Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {\r\n var _this = this;\r\n // check slide has poster\r\n if (!$el.hasClass('lg-video-loaded')) {\r\n // check already video element present\r\n if (!$el.hasClass('lg-has-video')) {\r\n $el.addClass('lg-has-video');\r\n var _html = void 0;\r\n var _src = this.core.galleryItems[this.core.index].src;\r\n var video = this.core.galleryItems[this.core.index].video;\r\n if (video) {\r\n _html =\r\n typeof video === 'string' ? JSON.parse(video) : video;\r\n }\r\n var videoJsPlayer_1 = this.appendVideos($el, {\r\n src: _src,\r\n addClass: '',\r\n index: this.core.index,\r\n html5Video: _html,\r\n });\r\n this.gotoNextSlideOnVideoEnd(_src, this.core.index);\r\n var $tempImg = $el.find('.lg-object').first().get();\r\n // @todo make sure it is working\r\n $el.find('.lg-video-cont').first().append($tempImg);\r\n $el.addClass('lg-video-loading');\r\n videoJsPlayer_1 &&\r\n videoJsPlayer_1.ready(function () {\r\n videoJsPlayer_1.on('loadedmetadata', function () {\r\n _this.onVideoLoadAfterPosterClick($el, _this.core.index);\r\n });\r\n });\r\n $el.find('.lg-video-object')\r\n .first()\r\n .on('load.lg error.lg loadedmetadata.lg', function () {\r\n setTimeout(function () {\r\n _this.onVideoLoadAfterPosterClick($el, _this.core.index);\r\n }, 50);\r\n });\r\n }\r\n else {\r\n this.playVideo(this.core.index);\r\n }\r\n }\r\n else if (forcePlay) {\r\n this.playVideo(this.core.index);\r\n }\r\n };\r\n Video.prototype.onVideoLoadAfterPosterClick = function ($el, index) {\r\n $el.addClass('lg-video-loaded');\r\n this.playVideo(index);\r\n };\r\n Video.prototype.destroy = function () {\r\n this.core.LGel.off('.lg.video');\r\n this.core.LGel.off('.video');\r\n };\r\n return Video;\r\n}());\n\nexport default Video;\n//# sourceMappingURL=lg-video.es5.js.map\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */\n(function () {\n 'use strict';\n\n // polyfill\n function polyfill() {\n // aliases\n var w = window;\n var d = document;\n\n // return if scroll behavior is supported and polyfill is not forced\n if (\n 'scrollBehavior' in d.documentElement.style &&\n w.__forceSmoothScrollPolyfill__ !== true\n ) {\n return;\n }\n\n // globals\n var Element = w.HTMLElement || w.Element;\n var SCROLL_TIME = 468;\n\n // object gathering original scroll methods\n var original = {\n scroll: w.scroll || w.scrollTo,\n scrollBy: w.scrollBy,\n elementScroll: Element.prototype.scroll || scrollElement,\n scrollIntoView: Element.prototype.scrollIntoView\n };\n\n // define timing method\n var now =\n w.performance && w.performance.now\n ? w.performance.now.bind(w.performance)\n : Date.now;\n\n /**\n * indicates if a the current browser is made by Microsoft\n * @method isMicrosoftBrowser\n * @param {String} userAgent\n * @returns {Boolean}\n */\n function isMicrosoftBrowser(userAgent) {\n var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];\n\n return new RegExp(userAgentPatterns.join('|')).test(userAgent);\n }\n\n /*\n * IE has rounding bug rounding down clientHeight and clientWidth and\n * rounding up scrollHeight and scrollWidth causing false positives\n * on hasScrollableSpace\n */\n var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n\n /**\n * changes scroll position inside an element\n * @method scrollElement\n * @param {Number} x\n * @param {Number} y\n * @returns {undefined}\n */\n function scrollElement(x, y) {\n this.scrollLeft = x;\n this.scrollTop = y;\n }\n\n /**\n * returns result of applying ease math function to a number\n * @method ease\n * @param {Number} k\n * @returns {Number}\n */\n function ease(k) {\n return 0.5 * (1 - Math.cos(Math.PI * k));\n }\n\n /**\n * indicates if a smooth behavior should be applied\n * @method shouldBailOut\n * @param {Number|Object} firstArg\n * @returns {Boolean}\n */\n function shouldBailOut(firstArg) {\n if (\n firstArg === null ||\n typeof firstArg !== 'object' ||\n firstArg.behavior === undefined ||\n firstArg.behavior === 'auto' ||\n firstArg.behavior === 'instant'\n ) {\n // first argument is not an object/null\n // or behavior is auto, instant or undefined\n return true;\n }\n\n if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {\n // first argument is an object and behavior is smooth\n return false;\n }\n\n // throw error when behavior is not supported\n throw new TypeError(\n 'behavior member of ScrollOptions ' +\n firstArg.behavior +\n ' is not a valid value for enumeration ScrollBehavior.'\n );\n }\n\n /**\n * indicates if an element has scrollable space in the provided axis\n * @method hasScrollableSpace\n * @param {Node} el\n * @param {String} axis\n * @returns {Boolean}\n */\n function hasScrollableSpace(el, axis) {\n if (axis === 'Y') {\n return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n }\n\n if (axis === 'X') {\n return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n }\n }\n\n /**\n * indicates if an element has a scrollable overflow property in the axis\n * @method canOverflow\n * @param {Node} el\n * @param {String} axis\n * @returns {Boolean}\n */\n function canOverflow(el, axis) {\n var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];\n\n return overflowValue === 'auto' || overflowValue === 'scroll';\n }\n\n /**\n * indicates if an element can be scrolled in either axis\n * @method isScrollable\n * @param {Node} el\n * @param {String} axis\n * @returns {Boolean}\n */\n function isScrollable(el) {\n var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');\n var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');\n\n return isScrollableY || isScrollableX;\n }\n\n /**\n * finds scrollable parent of an element\n * @method findScrollableParent\n * @param {Node} el\n * @returns {Node} el\n */\n function findScrollableParent(el) {\n while (el !== d.body && isScrollable(el) === false) {\n el = el.parentNode || el.host;\n }\n\n return el;\n }\n\n /**\n * self invoked function that, given a context, steps through scrolling\n * @method step\n * @param {Object} context\n * @returns {undefined}\n */\n function step(context) {\n var time = now();\n var value;\n var currentX;\n var currentY;\n var elapsed = (time - context.startTime) / SCROLL_TIME;\n\n // avoid elapsed times higher than one\n elapsed = elapsed > 1 ? 1 : elapsed;\n\n // apply easing to elapsed time\n value = ease(elapsed);\n\n currentX = context.startX + (context.x - context.startX) * value;\n currentY = context.startY + (context.y - context.startY) * value;\n\n context.method.call(context.scrollable, currentX, currentY);\n\n // scroll more if we have not reached our destination\n if (currentX !== context.x || currentY !== context.y) {\n w.requestAnimationFrame(step.bind(w, context));\n }\n }\n\n /**\n * scrolls window or element with a smooth behavior\n * @method smoothScroll\n * @param {Object|Node} el\n * @param {Number} x\n * @param {Number} y\n * @returns {undefined}\n */\n function smoothScroll(el, x, y) {\n var scrollable;\n var startX;\n var startY;\n var method;\n var startTime = now();\n\n // define scroll context\n if (el === d.body) {\n scrollable = w;\n startX = w.scrollX || w.pageXOffset;\n startY = w.scrollY || w.pageYOffset;\n method = original.scroll;\n } else {\n scrollable = el;\n startX = el.scrollLeft;\n startY = el.scrollTop;\n method = scrollElement;\n }\n\n // scroll looping over a frame\n step({\n scrollable: scrollable,\n method: method,\n startTime: startTime,\n startX: startX,\n startY: startY,\n x: x,\n y: y\n });\n }\n\n // ORIGINAL METHODS OVERRIDES\n // w.scroll and w.scrollTo\n w.scroll = w.scrollTo = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n original.scroll.call(\n w,\n arguments[0].left !== undefined\n ? arguments[0].left\n : typeof arguments[0] !== 'object'\n ? arguments[0]\n : w.scrollX || w.pageXOffset,\n // use top prop, second argument if present or fallback to scrollY\n arguments[0].top !== undefined\n ? arguments[0].top\n : arguments[1] !== undefined\n ? arguments[1]\n : w.scrollY || w.pageYOffset\n );\n\n return;\n }\n\n // LET THE SMOOTHNESS BEGIN!\n smoothScroll.call(\n w,\n d.body,\n arguments[0].left !== undefined\n ? ~~arguments[0].left\n : w.scrollX || w.pageXOffset,\n arguments[0].top !== undefined\n ? ~~arguments[0].top\n : w.scrollY || w.pageYOffset\n );\n };\n\n // w.scrollBy\n w.scrollBy = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0])) {\n original.scrollBy.call(\n w,\n arguments[0].left !== undefined\n ? arguments[0].left\n : typeof arguments[0] !== 'object' ? arguments[0] : 0,\n arguments[0].top !== undefined\n ? arguments[0].top\n : arguments[1] !== undefined ? arguments[1] : 0\n );\n\n return;\n }\n\n // LET THE SMOOTHNESS BEGIN!\n smoothScroll.call(\n w,\n d.body,\n ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n );\n };\n\n // Element.prototype.scroll and Element.prototype.scrollTo\n Element.prototype.scroll = Element.prototype.scrollTo = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n // if one number is passed, throw error to match Firefox implementation\n if (typeof arguments[0] === 'number' && arguments[1] === undefined) {\n throw new SyntaxError('Value could not be converted');\n }\n\n original.elementScroll.call(\n this,\n // use left prop, first number argument or fallback to scrollLeft\n arguments[0].left !== undefined\n ? ~~arguments[0].left\n : typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,\n // use top prop, second argument or fallback to scrollTop\n arguments[0].top !== undefined\n ? ~~arguments[0].top\n : arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop\n );\n\n return;\n }\n\n var left = arguments[0].left;\n var top = arguments[0].top;\n\n // LET THE SMOOTHNESS BEGIN!\n smoothScroll.call(\n this,\n this,\n typeof left === 'undefined' ? this.scrollLeft : ~~left,\n typeof top === 'undefined' ? this.scrollTop : ~~top\n );\n };\n\n // Element.prototype.scrollBy\n Element.prototype.scrollBy = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n original.elementScroll.call(\n this,\n arguments[0].left !== undefined\n ? ~~arguments[0].left + this.scrollLeft\n : ~~arguments[0] + this.scrollLeft,\n arguments[0].top !== undefined\n ? ~~arguments[0].top + this.scrollTop\n : ~~arguments[1] + this.scrollTop\n );\n\n return;\n }\n\n this.scroll({\n left: ~~arguments[0].left + this.scrollLeft,\n top: ~~arguments[0].top + this.scrollTop,\n behavior: arguments[0].behavior\n });\n };\n\n // Element.prototype.scrollIntoView\n Element.prototype.scrollIntoView = function() {\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n original.scrollIntoView.call(\n this,\n arguments[0] === undefined ? true : arguments[0]\n );\n\n return;\n }\n\n // LET THE SMOOTHNESS BEGIN!\n var scrollableParent = findScrollableParent(this);\n var parentRects = scrollableParent.getBoundingClientRect();\n var clientRects = this.getBoundingClientRect();\n\n if (scrollableParent !== d.body) {\n // reveal element inside parent\n smoothScroll.call(\n this,\n scrollableParent,\n scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n scrollableParent.scrollTop + clientRects.top - parentRects.top\n );\n\n // reveal parent in viewport unless is fixed\n if (w.getComputedStyle(scrollableParent).position !== 'fixed') {\n w.scrollBy({\n left: parentRects.left,\n top: parentRects.top,\n behavior: 'smooth'\n });\n }\n } else {\n // reveal element in viewport\n w.scrollBy({\n left: clientRects.left,\n top: clientRects.top,\n behavior: 'smooth'\n });\n }\n };\n }\n\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n // commonjs\n module.exports = { polyfill: polyfill };\n } else {\n // global\n polyfill();\n }\n\n}());\n","import Component from '../component/component';\n\nexport default class AlertExample extends Component {\n static initSelector: string = '.sg-js-alert-example';\n\n private alert: HTMLElement;\n private addButton: HTMLElement;\n\n constructor(element: HTMLElement) {\n super(element);\n\n this.alert = this.element.querySelector('.sg-js-alert-example-alert');\n this.addButton = this.element.querySelector('.sg-js-alert-example-button');\n\n this.addButton.addEventListener('click', (event: Event) => {\n event.preventDefault();\n\n this.alert.classList.remove('h-hidden');\n });\n }\n}\n","import './alert.scss';\n","import './breadcrumbs.scss';\n","import './button.scss';\n\nimport Icon from '../../icon/icon';\n\nexport interface IButton {\n text: string;\n icon?: string;\n link?: string;\n iconPosition?: string;\n attributes?: string;\n}\n\nexport interface IButtonProps {\n data: IButton;\n className?: string;\n iconClassName?: string;\n}\n\nexport default class Button {\n static render(props: IButtonProps): string {\n const { data, className, iconClassName }: IButtonProps = props;\n\n const element: string = data.link ? 'a' : 'button';\n const icon: string = data.icon ? Icon.render(data.icon, `button__icon${iconClassName ? ` ${iconClassName}` : ''}`) : '';\n const classArray: string[] = ['button'];\n\n if (className) {\n classArray.push(className);\n }\n\n if (data.icon && !data.iconPosition) {\n classArray.push('button--icon');\n }\n\n if (data.icon && data.iconPosition === 'right') {\n classArray.push('button--icon-right');\n }\n\n if (data.icon && data.iconPosition === 'left') {\n classArray.push('button--icon-left');\n }\n\n return `<${element} class=\"${classArray.join(' ')}\" ${data.link ? `href=\"${data.link}\"` : 'type=\"button\"'}${data.attributes ? ` ${data.attributes}` : ''}>${icon}${data.text}`;\n }\n}\n","export {\n default as Button,\n IButton,\n IButtonProps,\n} from './button/button';\n","import './campaign-card.scss';\n","import './card.scss';\n","import './cart-summary.scss';\n","import './checkout-card.scss';\n","import './checkout-gift-card.scss';\n","export default class Component {\n\n public static initSelector: string;\n\n public element: HTMLElement;\n\n constructor(element: HTMLElement) {\n this.element = element;\n\n document.addEventListener('destroy', this.handleDestroy);\n }\n\n public static is(value: unknown): value is typeof Component {\n return Object.getPrototypeOf(value) === Component;\n }\n\n public static create(element: HTMLElement): InstanceType {\n const type: string = Component.getDataName(this.initSelector);\n const dataAttr: string = type + 'Class';\n\n const value: string | null = element.getAttribute('data-' + dataAttr);\n\n if (value === null) {\n const instance: Component = new this(element);\n const newLength: number = window.gotoAndPlay.initializedComponents.push(instance);\n const index: number = newLength - 1;\n\n element.setAttribute('data-' + dataAttr, index + '');\n\n return instance as InstanceType;\n }\n\n return window.gotoAndPlay.initializedComponents[value];\n }\n\n public static enhance(): void {\n if (this.initSelector) {\n const type: string = Component.getDataName(this.initSelector);\n\n document.addEventListener('enhance', (event: CustomEvent): void => {\n if ((event.target instanceof Element || event.target instanceof HTMLDocument) && (!event.detail || event.detail === type)) {\n event.target.querySelectorAll(this.initSelector).forEach((element: HTMLElement): void => {\n this.create(element);\n });\n }\n });\n } else {\n console.warn(`[Warning] ${this.name} is missing static initSelector.`);\n }\n }\n\n public static getDataName(initSelector: string): string {\n return initSelector.replace(/\\./g, '').replace(/^([A-Z])|[\\s-_](\\w)/g, (match: string, p1: string, p2: string): string => {\n if (p2) {\n return p2.toUpperCase();\n } else {\n return p1.toLowerCase();\n }\n });\n }\n\n destroy(): void {\n return;\n }\n\n handleDestroy: (event: CustomEvent) => void = (event: CustomEvent): void => {\n // trigger destroy when event target contains current element\n // and also when element is not in DOM\n\n if (event.detail.contains(this.element[0]) || !document.body.contains(this.element[0])) {\n this.destroy();\n\n document.removeEventListener('destroy', this.handleDestroy);\n }\n };\n}\n","import './coupon.scss';\n","import './discount.scss';\n","import {\n createPopper,\n Instance,\n Modifier,\n} from '@popperjs/core';\n\nimport Component from '../component/component';\nimport Helpers from '../helpers/helpers';\n\nimport './dropdown.scss';\n\nexport default class Dropdown extends Component {\n static initSelector: string = '.dropdown';\n\n trigger: HTMLElement;\n content: HTMLElement;\n inputs: NodeListOf;\n triggerLabel: NodeListOf;\n filterContainer: NodeListOf;\n filterAmount: NodeListOf;\n filterClear: NodeListOf;\n selectedContainer: HTMLElement;\n dropdownGroups: HTMLElement;\n defaultText: string;\n inContent: boolean;\n popperInstance: Instance;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n modifiers: Partial>[];\n boundingElement: HTMLElement;\n outsideClickHandler: () => void;\n screenWidth: number;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.trigger = this.element.querySelector('.dropdown__trigger');\n this.content = this.element.querySelector('.dropdown__content');\n this.boundingElement = document.querySelector('.' + this.element.getAttribute('bounding-element'));\n this.modifiers = [\n {\n name: 'flip',\n options: {\n padding: [0],\n },\n },\n {\n name: 'offset',\n options: {\n offset: [0, 20],\n },\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: this.boundingElement,\n padding: [0],\n },\n },\n ];\n this.inputs = this.element.querySelectorAll('.dropdown__group .choice-group__item input');\n this.triggerLabel = this.element.querySelectorAll('.dropdown__trigger-text');\n this.filterContainer = this.element.querySelectorAll('.dropdown__filter-container');\n this.filterAmount = this.element.querySelectorAll('.dropdown__filter-amount');\n this.filterClear = this.element.querySelectorAll('.dropdown__clear-filters');\n this.selectedContainer = this.element.querySelector('.dropdown__selected-container');\n this.dropdownGroups = this.element.querySelector('.dropdown__groups');\n this.outsideClickHandler = this.onOutsideClick.bind(this);\n this.screenWidth = window.innerWidth;\n\n if (this.triggerLabel.length) {\n this.defaultText = this.triggerLabel[0].textContent;\n }\n\n this.init();\n }\n\n init(): void {\n this.element.addEventListener('dropdown.show', this.show.bind(this));\n this.element.addEventListener('dropdown.hide', this.hide.bind(this));\n this.trigger.addEventListener('click', this.toggle.bind(this));\n\n this.popperInstance = createPopper(this.trigger, this.content, {\n modifiers: this.modifiers,\n placement: 'bottom-start',\n });\n\n this.handleDefaultSelection();\n this.calculateSelectedContainerSize();\n\n this.inputs.forEach((input: HTMLInputElement) => input.addEventListener('change', this.handleInputChange.bind(this)));\n this.inputs.forEach((input: HTMLInputElement) => input.addEventListener('click', this.closeOnRadioClick.bind(this)));\n this.filterClear.forEach((element: HTMLElement) => {\n element.addEventListener('click', this.clearFiltersHandler.bind(this));\n });\n window.removeEventListener('resize', this.handleResize.bind(this));\n window.addEventListener('resize', this.handleResize.bind(this));\n\n window.addEventListener('enhanceReset', this.removeOutsideClickHandler.bind(this));\n }\n\n get isOpen(): boolean {\n return this.content.classList.contains('is-visible');\n }\n\n toggle(event: Event): void {\n if (this.isOpen) {\n this.hide();\n } else {\n this.show(event);\n }\n }\n\n show(event: Event | CustomEvent): void {\n const disableAnimation: boolean = !!(event instanceof CustomEvent ? event?.detail?.disableAnimation : false);\n\n if (disableAnimation) {\n this.element.classList.add('is-animation-disabled');\n }\n\n if (event.type === 'click' && Helpers.isMobileDevice) {\n this.trigger.focus();\n }\n\n this.content.classList.add('is-visible');\n this.element.classList.add('is-open');\n\n window.addEventListener('click', this.outsideClickHandler);\n\n this.content.addEventListener('mouseenter', this.onMouseEnterContent.bind(this));\n this.content.addEventListener('mouseleave', this.onMouseLeaveContent.bind(this));\n\n this.popperInstance.setOptions({\n modifiers: [...this.modifiers, {\n enabled: true,\n name: 'eventListeners',\n }],\n });\n\n this.popperInstance.update();\n\n if (disableAnimation) {\n this.element.classList.remove('is-animation-disabled');\n }\n }\n\n hide(event?: CustomEvent): void {\n const disableAnimation: boolean = !!(event?.detail?.disableAnimation);\n\n if (disableAnimation) {\n this.element.classList.add('is-animation-disabled');\n }\n\n this.content.classList.remove('is-visible');\n this.element.classList.remove('is-open');\n\n this.inContent = false;\n\n this.content.removeEventListener('mouseenter', this.onMouseEnterContent.bind(this));\n this.content.removeEventListener('mouseleave', this.onMouseLeaveContent.bind(this));\n\n this.popperInstance.setOptions({\n modifiers: [...this.modifiers, {\n enabled: false,\n name: 'eventListeners',\n }],\n });\n\n\n window.removeEventListener('click', this.outsideClickHandler);\n\n if (disableAnimation) {\n this.element.classList.remove('is-animation-disabled');\n }\n }\n\n onMouseEnterContent(): void {\n this.inContent = true;\n }\n\n onMouseLeaveContent(): void {\n this.inContent = false;\n }\n\n onOutsideClick(event: MouseEvent): void {\n if (Helpers.outsideClick(event, this.element) && this.isOpen) {\n event.preventDefault();\n\n this.inContent = false;\n this.hide();\n }\n }\n\n removeOutsideClickHandler(): void {\n window.removeEventListener('click', this.outsideClickHandler);\n }\n\n handleDefaultSelection(): void {\n const radioSelection: NodeListOf = this.element.querySelectorAll('.radio__input:checked');\n\n if (radioSelection.length === 2) {\n let text: string = this.defaultText;\n\n radioSelection.forEach((element: HTMLElement) => Helpers.parents(element, '.radio').forEach((radio: HTMLElement) => text = radio.querySelector('.radio__text').textContent));\n this.triggerLabel.forEach((element: HTMLElement) => {\n element.textContent = text;\n });\n }\n }\n\n closeOnRadioClick(event: JQuery.TriggeredEvent): void {\n const target: HTMLInputElement = event.currentTarget as HTMLInputElement;\n\n if (target.classList.contains('radio__input')) {\n document.querySelectorAll('.modal-container.is-visible').forEach((item: HTMLElement) => item.dispatchEvent(new CustomEvent('modal.close')));\n Helpers.enableScroll();\n this.hide();\n this.inContent = false;\n this.calculateSelectedContainerSize();\n }\n }\n\n handleInputChange(event: Event): void {\n const target: HTMLInputElement = event.currentTarget as HTMLInputElement;\n\n this.changeDuplicateInput(target, event);\n const selectedInputs: NodeListOf = this.dropdownGroups.querySelectorAll('input:checked');\n\n if (selectedInputs.length === 0) {\n this.triggerLabel.forEach((element: HTMLElement) => {\n element.textContent = this.defaultText;\n });\n this.hideFilters();\n } else if (selectedInputs.length === 1) {\n const parents: HTMLElement[] = Helpers.parents(selectedInputs[0], '.choice-group__field');\n let text: string = this.defaultText;\n\n parents.forEach((parent: HTMLElement) => {\n parent.querySelectorAll('.check__text, .radio__text').forEach((item: HTMLElement) => text = item.textContent);\n });\n\n this.triggerLabel.forEach((element: HTMLElement) => {\n element.textContent = text;\n });\n\n this.hideFilters();\n } else {\n this.showFilters(target, selectedInputs);\n }\n }\n\n showFilters(target: HTMLElement, selectedInputs: NodeListOf): void {\n this.triggerLabel.forEach((element: HTMLElement) => {\n element.classList.add('h-hidden');\n });\n this.filterContainer.forEach((element: HTMLElement) => {\n element.classList.remove('h-hidden');\n });\n this.filterAmount.forEach((element: HTMLElement) => {\n element.innerText = `${selectedInputs.length}`;\n });\n }\n\n hideFilters(): void {\n this.triggerLabel.forEach((element: HTMLElement) => {\n element.classList.remove('h-hidden');\n });\n this.filterContainer.forEach((element: HTMLElement) => {\n element.classList.add('h-hidden');\n });\n }\n\n changeDuplicateInput(target: HTMLInputElement, event?: Event): void {\n const id: string = target.getAttribute('id');\n let duplicateId: string;\n\n if (id.includes('dropdown-modal')) {\n duplicateId = id.replace('dropdown-modal-', '');\n } else {\n duplicateId = 'dropdown-modal-' + id;\n }\n\n if (duplicateId) {\n const element: HTMLElement = document.getElementById(duplicateId);\n\n if (element) {\n if (element instanceof HTMLInputElement) {\n element.checked = target.checked;\n }\n\n if (!event || event.isTrusted) {\n element.dispatchEvent(new Event('dropdown.duplicateChange'));\n }\n }\n }\n }\n\n clearFiltersHandler(): void {\n const selectedInputs: NodeListOf = this.element.querySelectorAll('input:checked');\n\n selectedInputs.forEach((element: HTMLInputElement) => {\n element.checked = false;\n element.dispatchEvent(new Event('change'));\n this.changeDuplicateInput(element);\n });\n\n this.triggerLabel.forEach((element: HTMLElement) => {\n element.textContent = this.defaultText;\n });\n\n this.hideFilters();\n }\n\n handleResize(): void {\n const newScreenWidth: number = window.innerWidth;\n\n if (newScreenWidth !== this.screenWidth) {\n document.querySelectorAll('.modal-container.is-visible').forEach((item: HTMLElement) => item.dispatchEvent(new CustomEvent('modal.close')));\n Helpers.enableScroll();\n this.hide();\n this.inContent = false;\n this.calculateSelectedContainerSize();\n }\n }\n\n calculateSelectedContainerSize(): void {\n const labelSize: number = this.element.querySelector('.dropdown__label').clientWidth;\n const selectedWidth: number = this.element.offsetWidth - 180 - labelSize;\n\n this.selectedContainer.style.maxWidth = `${selectedWidth}px`;\n }\n}\n","import './editor.scss';\n","import './filter-radio.scss';\n","import Component from '../component/component';\n\nimport './footer.scss';\n\nexport default class Footer extends Component {\n static initSelector: string = '.footer';\n\n topButton: HTMLElement;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.topButton = this.element.querySelector('.footer__to-top');\n\n this.init();\n }\n\n init(): void {\n this.topButton.addEventListener('click', this.scrollToTop.bind(this));\n }\n\n scrollToTop(): void {\n window.scroll({\n behavior: 'smooth',\n left: 0,\n top: 0,\n });\n }\n}\n","import './check.scss';\n","import './choice-group.scss';\n","import './day-picker.scss';\n","import '../textfield/textfield';\n\nimport './filefield.scss';\n","import Component from '../../component/component';\n\nimport './number.scss';\n\nexport default class Number extends Component {\n static initSelector: string = '.number';\n\n input: HTMLInputElement;\n add: HTMLButtonElement;\n substract: HTMLButtonElement;\n min: string;\n max: string;\n quantitymultiplier: string;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.input = this.element.querySelector('.number__input');\n this.add = this.element.querySelector('.number__button--add');\n this.min = this.input.getAttribute('min');\n this.max = this.input.getAttribute('max');\n this.quantitymultiplier = this.input.getAttribute('data-quantity');\n this.substract = this.element.querySelector('.number__button--subtract');\n\n this.init();\n }\n\n init(): void {\n this.add.addEventListener('click', this.onAddClick.bind(this));\n this.substract.addEventListener('click', this.onSubstractClick.bind(this));\n\n this.checkButtons();\n }\n\n get value(): number {\n if (typeof this.input.value === 'number') {\n return this.input.value;\n } else if (typeof this.input.value === 'string') {\n return parseInt(this.input.value);\n } else {\n return 0;\n }\n }\n\n onAddClick(): void {\n const quantity: number = this.getQuantity();\n\n if ((parseInt(this.max) * quantity) !== this.value) {\n this.input.value = `${(this.value + (1 * quantity))}`;\n this.input.dispatchEvent(new Event('change'));\n }\n\n this.checkButtons();\n }\n\n onSubstractClick(): void {\n const quantity: number = this.getQuantity();\n\n if ((parseInt(this.min) * quantity) !== this.value) {\n this.input.value = `${(this.value - (1 * quantity))}`;\n this.input.dispatchEvent(new Event('change'));\n }\n\n this.checkButtons();\n }\n\n checkButtons(): void {\n const quantity: number = this.getQuantity();\n\n if (this.value === (parseInt(this.min) * quantity)) {\n this.substract.disabled = true;\n } else {\n this.substract.removeAttribute('disabled');\n }\n\n if (this.value === (parseInt(this.max) * quantity)) {\n this.add.disabled = true;\n } else {\n this.add.removeAttribute('disabled');\n }\n }\n\n getQuantity(): number {\n let quantity: number = 1;\n\n if (parseInt(this.quantitymultiplier) > 1) {\n quantity = parseInt(this.quantitymultiplier);\n }\n\n return quantity;\n }\n}\n\n","import './radio-card.scss';\n","import './radio.scss';\n","import Component from '../../component/component';\n\nexport default class SelectExample extends Component {\n static initSelector: string = '.sg-js-select-example';\n\n private enableButton: HTMLElement;\n private select: HTMLElement;\n\n constructor(element: HTMLElement) {\n super(element);\n\n this.enableButton = this.element.querySelector('.sg-js-select-example-button');\n this.select = this.element.querySelector('.sg-select');\n\n this.enableButton.addEventListener('click', () => {\n this.select.dispatchEvent(new CustomEvent('enableSelect'));\n });\n }\n}\n","import Choices, {Choices as ChoicesLib} from 'choices.js';\n\nimport Component from '../../component/component';\nimport Icon from '../../icon/icon';\n\nimport '../textfield/textfield';\n\nimport './select.scss';\n\nexport interface ISelectSettings {\n multiselect: false,\n noResultsText: string;\n search: boolean;\n removeItemText: string;\n}\n\nexport default class Select extends Component {\n static initSelector: string = '.select';\n\n public settings: ISelectSettings;\n public input: HTMLInputElement;\n public choices: Choices;\n public multiple: boolean;\n public isOpen: boolean;\n public isDisabled: boolean;\n public descriptions: {[key: string]: string};\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.input = this.element.querySelector('.select__input');\n this.descriptions = {};\n\n this.settings = {\n multiselect: false,\n noResultsText: (this.input.getAttribute('data-no-results-text') || 'No results found'),\n removeItemText: (this.input.getAttribute('data-remove-item-text') || 'Remove item'),\n search: !!this.input.getAttribute('data-search'),\n };\n\n this.element.querySelectorAll('option').forEach((element: HTMLOptionElement) => {\n if (typeof element.getAttribute('data-description') !== undefined) {\n this.descriptions[element.value] = element.getAttribute('data-description');\n }\n });\n\n this.isOpen = false;\n this.isDisabled = false;\n this.multiple = !!this.input.getAttribute('multiple');\n\n if (!this.element.classList.contains('select--simple')) {\n this.init();\n }\n }\n\n init(): void {\n if (this.input.hasAttribute('disabled')) {\n this.input.removeAttribute('disabled');\n this.isDisabled = true;\n }\n\n this.choices = new Choices(this.input, {\n callbackOnCreateTemplates: (template: ChoicesLib.Types.strToEl): Partial => ({\n choice: (classNames: ChoicesLib.ClassNames, data: ChoicesLib.Choice): HTMLElement => template(`\n
0 ? 'role=\"treeitem\"' : 'role=\"option\"'}\n >\n ${data.label}${this.descriptions[data.value] ? ' ' + this.descriptions[data.value] + '' : ''}${Icon.render('check', '', 'select__check-icon')}\n
`) as HTMLElement,\n dropdown: (classNames: ChoicesLib.ClassNames): HTMLElement => template(`\n
\n ${Icon.render('search', '', 'select__search-icon')}\n
\n `) as HTMLElement,\n item: (classNames: ChoicesLib.ClassNames, data: ChoicesLib.Choice): HTMLElement => template(`\n
\n ${data.label}\n ${this.descriptions[data.value] ? ' ' + this.descriptions[data.value] + '' : ''}\n \n
\n `) as HTMLElement,\n }),\n classNames: {\n activeState: 'is-active',\n button: 'select__remove',\n containerInner: 'textfield__input select__inner',\n containerOuter: 'select__container',\n disabledState: 'is-disabled',\n flippedState: 'is-flipped',\n focusState: 'is-focused',\n group: 'select__group',\n groupHeading: 'select__group-heading',\n highlightedState: 'select__item--highlighted',\n input: 'select__choices-input',\n inputCloned: 'select__choices-input--cloned',\n item: 'select__item',\n itemChoice: 'select__item--choice',\n itemDisabled: 'select__item--disabled',\n itemSelectable: 'select__item--selectable',\n list: 'select__list',\n listDropdown: 'select__dropdown',\n listItems: 'select__list--multiple',\n listSingle: 'select__list--single',\n loadingState: 'is-loading',\n noChoices: 'has-no-choices',\n noResults: 'has-no-results',\n openState: 'is-open',\n placeholder: 'select__placeholder',\n selectedState: 'is-selected',\n },\n editItems: false,\n itemSelectText: '',\n noResultsText: this.settings.noResultsText,\n removeItemButton: true,\n removeItems: true,\n renderSelectedChoices: 'always',\n searchChoices: this.settings.search,\n searchEnabled: this.settings.search,\n shouldSort: false,\n });\n\n if (this.isDisabled) {\n this.choices.disable();\n this.input.disabled = true;\n }\n\n this.addEventListeners();\n }\n\n addEventListeners(): void {\n // Multiselect context\n if (this.multiple) {\n // Deselect a selected item when clicking on it.\n this.input.addEventListener('choice', (event: CustomEvent) => {\n const values: string[] | string = this.choices.getValue(true);\n const value: string = event.detail.choice.value;\n\n if (values?.includes(value)) {\n setTimeout((): Choices => this.choices.removeActiveItemsByValue(value));\n }\n });\n\n // Close dropdown when clicking on empty space between currently selected items in select list.\n this.element.querySelector('.select__inner > .select__list').addEventListener('click', (): void => {\n if (this.isOpen) {\n this.choices.hideDropdown();\n }\n });\n }\n\n this.input.addEventListener('hideDropdown', (): void => {\n this.isOpen = false;\n\n // Clear search input when closing dropdown\n if (this.settings.search) {\n this.choices.clearInput();\n }\n });\n\n this.input.addEventListener('showDropdown', (): void => {\n // Focus search input when opening dropdown if search enabled.\n if (this.settings.search) {\n const dropdown: HTMLElement = this.element.querySelector('.select__dropdown .select__choices-input--cloned');\n\n if (dropdown) {\n dropdown.focus();\n }\n }\n\n this.isOpen = true;\n });\n\n this.element.addEventListener('enableSelect', (): void => {\n this.enableSelect();\n });\n }\n\n enableSelect(): void {\n this.choices.enable();\n this.element.classList.remove('is-disabled');\n this.input.removeAttribute('disabled');\n }\n}\n","import '../textfield/textfield';\n\nimport './textarea.scss';\n","import Component from '../../component/component';\n\nimport './textfield.scss';\n\nexport default class Textfield extends Component {\n static initSelector: string = '.textfield';\n\n input: HTMLInputElement;\n button: HTMLElement;\n dirtyClass: string;\n focusClass: string;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.input = this.element.querySelector('.textfield__input');\n this.button = this.element.querySelector('.textfield__password-button');\n this.focusClass = 'is-focused';\n this.dirtyClass = 'is-dirty';\n\n this.init();\n }\n\n init(): void {\n if (this.button) {\n this.button.addEventListener('click', this.toggle.bind(this));\n }\n if (this.input) {\n this.input.addEventListener('focus', this.onFocus.bind(this));\n this.input.addEventListener('blur', this.onBlur.bind(this));\n this.input.addEventListener('input', this.onChange.bind(this));\n this.element.addEventListener('onautocomplete', () => {\n this.element.classList.add('is-dirty');\n });\n this.checkValue();\n }\n }\n\n toggle(): void {\n if (this.element.classList.contains('is-visible')) {\n this.element.classList.remove('is-visible');\n } else {\n this.element.classList.add('is-visible');\n }\n\n this.changeType();\n }\n\n changeType(): void {\n if (this.input.type === 'password') {\n this.input.type = 'text';\n } else {\n this.input.type = 'password';\n }\n }\n\n onFocus(): void {\n this.element.classList.add(this.focusClass);\n }\n\n onBlur(): void {\n this.checkValue();\n setTimeout((): void => {\n this.element.classList.remove(this.focusClass);\n }, 100);\n }\n\n onChange(): void {\n this.checkValue();\n }\n\n checkValue(): void {\n if (this.input.value === '') {\n this.element.classList.remove(this.dirtyClass);\n } else {\n this.element.classList.add(this.dirtyClass);\n }\n }\n}\n","import './gallery.scss';\n","import './genre-card.scss';\n","import './gift.scss';\n","import './graph.scss';\n\nimport Component from '../component/component';\n\nexport default class Graph extends Component {\n\n static initSelector: string = '.js-graph';\n\n public value: number;\n\n constructor(target: HTMLElement) {\n super(target);\n this.value = (Number(this.element.getAttribute('data-value')) / 100);\n this.onLoad();\n }\n\n public onLoad(): void {\n const transformStyles: string[] = ['-webkit-transform', '-ms-transform', 'transform'];\n const rotation: number = Math.floor(this.value * 180);\n const fillRotation: number = rotation;\n const fixRotation: number = rotation * 2;\n\n transformStyles.forEach((name: string, i: number) => {\n this.element.querySelectorAll('.graph__circle .graph__fill, .graph__circle .graph__mask.graph__mask--full')\n .forEach((item: HTMLElement) => item.style[transformStyles[i]] = 'rotate(' + fillRotation + 'deg)');\n this.element.querySelectorAll('.graph__circle .graph__fill.graph__fill--fix')\n .forEach((item: HTMLElement) => item.style[transformStyles[i]] = 'rotate(' + fixRotation + 'deg)');\n });\n }\n\n}\n","import './grid.scss';\n","import Component from '../component/component';\nimport Helpers from '../helpers/helpers';\nimport Navigation from '../navigation/navigation/navigation';\n\nimport './header.scss';\n\nconst OPEN_CLASS: string = 'is-open';\nconst OPEN_SEARCH_CLASS: string = 'is-search-open';\n\nexport default class Header extends Component {\n static initSelector: string = '.header';\n\n inner: HTMLElement;\n headerClose: NodeListOf;\n navigationElement: HTMLElement;\n navigation: Navigation;\n toggleButton: HTMLElement;\n scrollPosition: number;\n searchToggle: HTMLElement;\n searchContainer: HTMLElement;\n searchClose: NodeListOf;\n rightCol: HTMLElement;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.inner = this.element.querySelector('.header__inner');\n this.navigationElement = this.element.querySelector('.header__navigation');\n this.toggleButton = this.element.querySelector('.header__toggle');\n this.headerClose = this.element.querySelectorAll('.navigation-header__button--close, .navigation-alternative-header__button--close');\n this.searchContainer = this.element.querySelector('.header__search-container');\n if (this.searchContainer) {\n this.searchClose = this.searchContainer.querySelectorAll('.navigation-header__button--close, .navigation-alternative-header__button--close');\n }\n this.searchToggle = this.element.querySelector('.header__search-toggle');\n\n this.rightCol = this.element.querySelector('.header__right-col');\n\n this.handleScroll = this.handleScroll.bind(this);\n this.handleResize = this.handleResize.bind(this);\n\n this.init();\n }\n\n init(): void {\n this.navigation = Navigation.create(this.navigationElement);\n this.toggleButton.addEventListener('click', this.handleToggleButtonClick.bind(this));\n if (this.searchToggle) {\n this.searchToggle.addEventListener('click', this.handleSearchToggleClick.bind(this));\n }\n if (this.headerClose) {\n this.headerClose.forEach((button: HTMLButtonElement) => button.addEventListener('click', this.close.bind(this)));\n }\n if (this.searchClose) {\n this.searchClose.forEach((button: HTMLButtonElement) => button.addEventListener('click', this.closeSearch.bind(this)));\n }\n this.inner.addEventListener('transitionend', this.handleInnerTransitionEnd.bind(this));\n this.inner.addEventListener('keyup', this.handleInnerKeyup.bind(this));\n\n window.addEventListener('scroll', this.handleScroll);\n window.addEventListener('resize', this.handleResize);\n\n window.addEventListener('openNavigationItem', this.onNavigationItemOpen.bind(this));\n window.addEventListener('closeNavigationItem', this.onNavigationItemClose.bind(this));\n\n this.headerHandler();\n\n if (this.rightCol) {\n this.handleRightColSize();\n }\n }\n\n get isOpen(): boolean {\n return this.element.classList.contains(OPEN_CLASS);\n }\n\n get isSearchOpen(): boolean {\n return this.element.classList.contains(OPEN_SEARCH_CLASS);\n }\n\n handleRightColSize(): void {\n const query: MediaQueryList = window.matchMedia('only screen and (min-width: 1089px)');\n const colLength: number = this.rightCol.clientWidth;\n\n if (query.matches) {\n this.rightCol.style.width = `${colLength}px`;\n this.rightCol.classList.add('is-absolute');\n } else {\n this.rightCol.style.width = ``;\n this.rightCol.classList.remove('is-absolute');\n }\n }\n\n open(): void {\n Helpers.disableScroll();\n\n this.element.classList.add(OPEN_CLASS);\n this.toggleButton.setAttribute('aria-expanded', 'true');\n\n window.addEventListener('click', this.handleOutsideClick.bind(this), true);\n }\n\n close(): void {\n this.element.classList.remove(OPEN_CLASS);\n this.toggleButton.setAttribute('aria-expanded', 'false');\n this.toggleButton.focus();\n\n window.removeEventListener('click', this.handleOutsideClick.bind(this), true);\n\n Helpers.enableScroll();\n }\n\n toggle(): void {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n handleOutsideClick(event : MouseEvent): void {\n const innerTarget: HTMLElement = document.querySelector('.header__inner');\n const isClickInside: boolean = innerTarget.contains(event.target as Node);\n\n if (!isClickInside) {\n this.close();\n }\n }\n\n handleToggleButtonClick(event: MouseEvent): void {\n event.preventDefault();\n\n this.toggle();\n }\n\n handleSearchToggleClick(event: MouseEvent): void {\n event.preventDefault();\n\n if (this.isSearchOpen) {\n this.closeSearch();\n } else {\n this.openSearch();\n }\n }\n\n closeSearch(): void {\n this.element.classList.remove(OPEN_SEARCH_CLASS);\n }\n\n openSearch(): void {\n this.element.classList.add(OPEN_SEARCH_CLASS);\n }\n\n handleInnerTransitionEnd(event: TransitionEvent): void {\n if (event.target === event.currentTarget && event.propertyName === 'visibility') {\n if (Helpers.visible(this.inner)) {\n this.inner.focus();\n }\n }\n }\n\n handleInnerKeyup(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.close();\n }\n }\n\n handleScroll(): void {\n if (!Helpers.isScrollDisabled()) {\n const currentPosition: number = window.scrollY;\n\n // Check whether scroll position is at top or not.\n // Can be less than zero when scrolling past top in Mac OS Safari.\n if (currentPosition <= 0) {\n this.element.classList.remove(...['has-scrolled', 'is-scrolling-up']);\n } else {\n this.element.classList.add('has-scrolled');\n }\n\n // Check scroll direction.\n // 7 is a magic number so scroll direction would not toggle when scroll jitters.\n if (currentPosition < (this.scrollPosition - 7)) {\n this.element.classList.add('is-scrolling-up');\n this.element.classList.remove('is-scrolling-down');\n } else if (currentPosition > (this.scrollPosition + 7)) {\n this.element.classList.add('is-scrolling-down');\n this.element.classList.remove('is-scrolling-up');\n }\n\n // Save scroll position for next comparison.\n this.scrollPosition = currentPosition;\n }\n }\n\n handleResize(): void {\n const query: MediaQueryList = window.matchMedia('only screen and (min-width: 1000px)');\n\n // Close burger menu after resize to reset it and enable scroll.\n // This is necessary on tablets, for example,\n // where in portrait mobile menu is used\n // and in landscape desktop menu is used.\n if (query.matches && this.isOpen) {\n this.close();\n this.navigation.closeItems();\n }\n\n if (this.rightCol) {\n this.handleRightColSize();\n }\n\n this.headerHandler();\n }\n\n headerHandler(): void {\n document.documentElement.style.setProperty('--header-height', `${this.element.clientHeight}px`);\n }\n\n onNavigationItemOpen(): void {\n this.element.classList.add('navigation-item-open');\n }\n\n onNavigationItemClose(): void {\n this.element.classList.remove('navigation-item-open');\n }\n\n destroy(): void {\n window.removeEventListener('scroll', this.handleScroll);\n window.removeEventListener('resize', this.handleScroll);\n window.removeEventListener('openNavigationItem', this.onNavigationItemOpen.bind(this));\n window.removeEventListener('closeNavigationItem', this.onNavigationItemClose.bind(this));\n }\n}\n","export {debounce} from 'debounce';\n\nimport Component from '../component/component';\n\nimport './helpers.scss';\n\nexport type DebouncedFunction = F & { clear(): void } & { flush(): void };\n\nexport interface IGaEventParams {\n category: string;\n action: string;\n label?: string;\n value?: number;\n}\n\nexport default class Helpers {\n\n static defaults: IGotoAndPlay = {\n ajax: {\n isEnabled: false,\n keptBodyClasses: [],\n templateName: '',\n },\n ajaxPath: '',\n assetsPath: '',\n components: {},\n cookieDomain: '',\n cookiePath: '',\n googleMapsApiKey: null,\n headerOffset: 0,\n initializedComponents: [],\n lightboxApiKey: 'W5ZTE-CNJCG-6ARFR-HNSBU',\n lightboxLoaded: false,\n loggedIn: false,\n nonce: '',\n notifications: [],\n sitePath: '',\n svgPath: '',\n templatePath: '',\n version: '',\n vimeoApiLoaded: false,\n };\n\n /* eslint-disable */ // this lets the breakpoints stay in numerical order, not alphabetical\n static bp: {[key: string]: number} = {\n xs: 360,\n sm: 479,\n md: 768,\n lg: 1089,\n xl: 1301,\n };\n /* eslint-enable */\n\n static visible(element: HTMLElement): boolean {\n return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n }\n\n static hasClass(target: HTMLElement, classNames: string): boolean {\n const classList: string[] = classNames.split('.').filter((name: string) => !!name);\n\n return classList\n .filter((className: string): boolean => target.classList.contains(className))\n .length > 0;\n }\n\n static scrollToTarget(target: HTMLElement, offsetTop: number = 0): void {\n const header: HTMLElement = document.querySelector('.header');\n let headerHeight: number = 0;\n\n if (header !== undefined && header !== null) {\n headerHeight = header.offsetHeight;\n }\n\n const scrollTop: number = target.offsetTop - offsetTop - headerHeight;\n\n scroll({\n behavior: 'smooth',\n top: scrollTop,\n });\n }\n\n static parents(target: HTMLElement, querySelector?: string): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let current: Node = target;\n\n if (current !== null) {\n while (current.parentNode !== null && current.parentNode !== document.documentElement) {\n if (current.parentNode instanceof HTMLElement && (!querySelector || Helpers.hasClass(current.parentNode, querySelector))) {\n parents.push(current.parentNode);\n }\n\n current = current.parentNode;\n }\n }\n\n return parents;\n }\n\n static isOnScreen(target: HTMLElement, partial: boolean = true): boolean {\n const viewTop: number = window.scrollY;\n const viewBottom: number = viewTop + window.innerHeight;\n const top: number = target.offsetTop;\n const bottom: number = top + target.offsetHeight;\n const compareTop: number = partial === true ? bottom : top;\n const compareBottom: number = partial === true ? top : bottom;\n\n return ((compareBottom <= viewBottom) && (compareTop >= viewTop));\n }\n\n static disableScroll(): void {\n if (!Helpers.isScrollDisabled()) {\n const curScroll: number = window.scrollY;\n const page: HTMLElement = document.getElementById('page');\n\n document.body.classList.add('is-scroll-disabled');\n if (page) {\n page.style.top = -curScroll + 'px';\n }\n\n window.scrollTo(0, 0);\n }\n }\n\n static enableScroll(): void {\n const page: HTMLElement = document.getElementById('page');\n const bodyScroll: number = page ? parseInt((page.style.top || '0'), 10) : 0;\n\n document.body.classList.remove('is-scroll-disabled');\n if (bodyScroll) {\n window.scrollTo(0, -bodyScroll);\n\n if (page) {\n page.style.top = '0px';\n }\n }\n }\n\n static isScrollDisabled(): boolean {\n return document.body.classList.contains('is-scroll-disabled');\n }\n\n static isURL(str: string): boolean {\n const regexp: RegExp = /^https?:\\/\\//i;\n\n return regexp.test(str);\n }\n\n static toFixed(n: number, prec: number): number {\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n const k: number = Math.pow(10, prec);\n\n return Math.round(n * k) / k;\n }\n\n static formatNumber(num: number, decimals: number = 2, decPoint: string = '.', thousandsSep: string = ''): string {\n const n: number = !isFinite(+num) ? 0 : +num;\n const prec: number = !isFinite(+decimals) ? 0 : Math.abs(decimals);\n const sep: string = thousandsSep === null ? ' ' : thousandsSep;\n const dec: string = decPoint === null ? ',' : decPoint;\n const s: string[] = (prec ? Helpers.toFixed(n, prec) : Math.round(n)).toString().split('.');\n\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n\n return s.join(dec);\n }\n\n static parseFloat(val: string): number {\n const num: number = parseFloat(val);\n\n if (typeof num === 'number' && !isNaN(num)) {\n return num;\n } else {\n return 0;\n }\n }\n\n static get isIE(): boolean | number {\n\n const ua: string = window.navigator.userAgent;\n const msie: number = ua.indexOf('MSIE ');\n\n if (msie > 0) {\n // IE 10 or older => return version number\n\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n const trident: number = ua.indexOf('Trident/');\n\n if (trident > 0) {\n // IE 11 => return version number\n const rv: number = ua.indexOf('rv:');\n\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n const edge: number = ua.indexOf('Edge/');\n\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n\n return false;\n }\n\n static get isMobileDevice(): boolean {\n\n return ((/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)\n || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(navigator.userAgent.substr(0, 4))) ? true : false);\n }\n\n static trackEvent(params: IGaEventParams): void {\n if (typeof ga !== 'undefined') {\n ga('send', {\n eventAction: params.action,\n eventCategory: params.category,\n eventLabel: params.label,\n eventValue: params.value,\n hitType: 'event',\n });\n }\n\n if (typeof gtag !== 'undefined') {\n gtag('event', params.action, {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n event_category: params.category,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n event_label: params.label,\n value: params.value,\n });\n }\n }\n\n static trackPageChange(path: string): void {\n if (typeof ga !== 'undefined') {\n ga('set', 'page', path);\n ga('send', 'pageview');\n }\n\n if (typeof gtag !== 'undefined') {\n gtag('event', 'screen_view', {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n screen_name: path,\n });\n }\n }\n\n static convertToInt(value: string | number | undefined): number {\n const numeric: number = parseInt('' + value, 10);\n\n return isNaN(numeric) ? 0 : numeric;\n }\n\n static outsideClick(event: MouseEvent, htmlElement: HTMLElement): boolean {\n if (event.target === htmlElement || htmlElement.contains(event.target as Element)) {\n return false;\n }\n\n return true;\n }\n\n static init(): void {\n // setup defaults variables\n Object.keys(Helpers.defaults).forEach((key: string): void => {\n if (window.gotoAndPlay[key] === undefined) {\n window.gotoAndPlay[key] = Helpers.defaults[key];\n }\n });\n // run after document ready\n document.addEventListener('DOMContentLoaded', (): void => {\n // init components\n if (window.gotoAndPlay && Object.prototype.hasOwnProperty.call(window.gotoAndPlay, 'components')) {\n Object.keys(window.gotoAndPlay.components).forEach((name: string): void => {\n const component: unknown = window.gotoAndPlay.components[name];\n\n if (Component.is(component)) {\n component.enhance();\n }\n });\n document.dispatchEvent(new CustomEvent('enhance'));\n }\n });\n\n document.addEventListener('click', (event: Event) => {\n const target: HTMLElement = event.target as HTMLElement;\n\n if (target.classList.contains('js-scroll-to')) {\n const currentPage: Location = window.location || window.document.location;\n const currentPath: string = currentPage.href.split('#')[0];\n const targetPath: string = target.getAttribute('href').split('#')[0];\n const targetSelector: string = target.getAttribute('href').split('#')[1];\n\n if (currentPath === targetPath || targetPath === '') {\n event.preventDefault();\n const targetSection: HTMLElement = document.querySelector('#' + targetSelector);\n\n Helpers.scrollToTarget(targetSection);\n }\n }\n });\n\n // Calc app height\n document.documentElement.style.setProperty('--app-height', `${window.innerHeight}px`);\n document.documentElement.style.setProperty('--app-width', `${document.body.clientWidth}px`);\n\n window.addEventListener('resize', () => {\n document.documentElement.style.setProperty('--app-height', `${window.innerHeight}px`);\n document.documentElement.style.setProperty('--app-width', `${document.body.clientWidth}px`);\n });\n\n }\n}\n\nHelpers.init();\n","import 'svgxuse';\n\nimport './icon.scss';\n\ninterface IIconMap {\n [filename: string]: __WebpackModuleApi.RequireContext;\n}\n\nconst req: __WebpackModuleApi.RequireContext = require.context('./import/svg/', false, /^\\.\\/.*\\.svg$/);\n\n(req.keys()).reduce((glyphs: IIconMap, key: string): IIconMap => {\n const filename: string = key.match(new RegExp(/[^/]+(?=\\.svg$)/))[0];\n\n return {\n ...glyphs,\n [filename]: req(key),\n };\n}, {});\n\nexport default class Icon {\n static render(name: string, modifier?: string, className?: string): string {\n const use: string = '';\n const classArray: string[] = ['icon'];\n\n if (modifier) {\n classArray.push(modifier);\n }\n\n if (className) {\n classArray.push(className);\n }\n\n return '' + use + '';\n }\n}\n","import 'lazysizes';\nimport 'lazysizes/plugins/native-loading/ls.native-loading';\nimport 'picturefill';\n\nimport './image.scss';\n","import './invoice.scss';\n","import Component from '../component/component';\n\nimport './languages.scss';\n\ninterface ILanguageSettings {\n activeClass: string;\n topClass: string;\n}\n\nexport default class Languages extends Component {\n static initSelector: string = '.languages';\n\n public trigger: HTMLElement;\n\n settings: ILanguageSettings;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.trigger = this.element.querySelector('.languages__trigger');\n\n this.documentClickHandler = this.documentClickHandler.bind(this);\n\n this.settings = {\n activeClass: 'is-active',\n topClass: 'to-top',\n };\n\n this.init();\n }\n\n init(): void {\n this.trigger.addEventListener('click', this.toggleHandler.bind(this));\n this.element.addEventListener('keyup', this.keyboardHandler.bind(this));\n }\n\n addEventListeners(): void {\n document.addEventListener('click', this.documentClickHandler);\n }\n\n documentClickHandler(event: MouseEvent): void {\n if (event.target instanceof Element && !event.target.closest('.' + this.element.className.replace(/ /g, '.'))) {\n this.close();\n }\n }\n\n toggleHandler(event: Event): void {\n event.preventDefault();\n\n if (this.element.classList.contains(this.settings.activeClass)) {\n this.close();\n } else {\n this.open();\n }\n }\n\n keyboardHandler(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.close();\n this.trigger.focus();\n }\n }\n\n open(): void {\n if (this.getListDirection() === 'top') {\n this.element.classList.add(this.settings.topClass);\n } else {\n this.element.classList.remove(this.settings.topClass);\n }\n\n this.element.classList.add(this.settings.activeClass);\n this.trigger.setAttribute('aria-expanded', 'true');\n\n this.addEventListeners();\n }\n\n close(): void {\n this.element.classList.remove(this.settings.activeClass);\n this.trigger.setAttribute('aria-expanded', 'false');\n\n this.destroy();\n }\n\n getListDirection(): 'top' | 'bottom' {\n const elemTop: number = this.element.offsetTop;\n const windowTop: number = window.scrollY;\n const windowHeight: number = window.innerHeight;\n const elemHeight: number = this.element.clientHeight;\n const ddHeight: number = this.element.querySelector('.languages__list').clientHeight;\n\n if ((elemTop - windowTop + elemHeight + ddHeight) > windowHeight) {\n return 'top';\n } else {\n return 'bottom';\n }\n }\n\n destroy(): void {\n document.removeEventListener('click', this.documentClickHandler);\n }\n}\n","import lightGallery from 'lightgallery';\nimport { LightGallery } from 'lightgallery/lib';\nimport lgThumbnail from 'lightgallery/plugins/thumbnail';\nimport lgVideo from 'lightgallery/plugins/video';\n\nimport Component from '../component/component';\nimport Icon from '../icon/icon';\n\nimport 'lightgallery/scss/lightgallery-core.scss';\nimport './lightbox.scss';\n\nexport default class Lightbox extends Component {\n static initSelector: string = '.lightbox';\n\n public button: HTMLElement;\n hasInitialized: boolean;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.button = this.element.querySelector('.lightbox__button');\n this.hasInitialized = false;\n\n this.init();\n }\n\n init(): void {\n if (this.button && !this.element.classList.contains('lightbox-gallery')) {\n this.button.addEventListener('click', this.buttonClickHandler.bind(this));\n } else {\n if (!window.gotoAndPlay.vimeoApiLoaded) {\n this.loadVimeoAPI(() => {\n this.initLightGallery(false);\n });\n } else {\n this.initLightGallery(false);\n }\n }\n }\n\n buttonClickHandler(): void {\n if (!this.hasInitialized) {\n if (!window.gotoAndPlay.vimeoApiLoaded) {\n this.loadVimeoAPI(() => {\n this.initLightGallery(true);\n });\n } else {\n this.initLightGallery(true);\n }\n\n this.hasInitialized = true;\n }\n }\n\n loadVimeoAPI(callback: () => void): void {\n const script: HTMLScriptElement = document.createElement('script');\n\n script.src = 'https://player.vimeo.com/api/player.js';\n script.type = 'text/javascript';\n script.addEventListener('load', callback);\n document.body.appendChild(script);\n window.gotoAndPlay.vimeoApiLoaded = true;\n }\n\n initLightGallery(openOnInit?: boolean): void {\n const selectorData: string = '.lightbox__item .image__link, .lightbox__item .lightbox__button';\n const thumbnailData: boolean = this.element.dataset.simple ? false : true;\n\n const gallery: LightGallery = lightGallery(this.element, {\n addClass: 'lightbox__container',\n download: false,\n exThumbImage: 'data-external-thumb-image',\n licenseKey: window.gotoAndPlay.lightboxApiKey,\n mobileSettings: {\n showCloseIcon: true,\n },\n plugins: [lgThumbnail, lgVideo],\n selector: selectorData,\n thumbnail: thumbnailData,\n });\n\n if (openOnInit) {\n gallery.openGallery();\n }\n\n Array.prototype.forEach.call(document.getElementsByClassName('lg-prev'), (element: HTMLElement) => {\n const prevIcon: string = Icon.render('arrow-left', '', 'lightbox__icon lightbox__icon--left');\n\n element.innerHTML = prevIcon;\n });\n\n Array.prototype.forEach.call(document.getElementsByClassName('lg-next'), (element: HTMLElement) => {\n const nextIcon: string = Icon.render('arrow-right', '', 'lightbox__icon lightbox__icon--right');\n\n element.innerHTML = nextIcon;\n });\n\n Array.prototype.forEach.call(document.getElementsByClassName('lg-close'), (element: HTMLElement) => {\n const closeIcon: string = Icon.render('close', '', 'lightbox__icon lightbox__icon--close');\n\n element.innerHTML = closeIcon;\n });\n }\n}\n","import './logo.scss';\n","import './main.scss';\n","import { Loader } from '@googlemaps/js-api-loader';\n\nimport Component from '../component/component';\n\nimport './map.scss';\n\nexport interface IMapSettings {\n lat: string;\n lng: string;\n}\n\nexport default class Map extends Component {\n static initSelector: string = '.map';\n\n public settings: IMapSettings;\n public googleMap: google.maps.Map;\n public latLng: google.maps.LatLng;\n public marker: google.maps.Marker;\n public lat: string;\n public lng: string;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.lat = this.element.getAttribute('data-lat');\n this.lng = this.element.getAttribute('data-lng');\n\n if (window.gotoAndPlay.googleMapsApiKey) {\n const loader: Loader = new Loader({\n apiKey: window.gotoAndPlay.googleMapsApiKey,\n });\n\n loader.load().then((): void => {\n this.latLng = new google.maps.LatLng(parseFloat(this.lat), parseFloat(this.lng));\n this.init();\n });\n } else {\n console.error('No Google Maps API key defined in gotoAndPlay');\n }\n }\n\n init(): void {\n this.googleMap = new google.maps.Map(this.element, {\n center: this.latLng,\n zoom: 14,\n });\n\n this.marker = new google.maps.Marker({\n map: this.googleMap,\n position: this.latLng,\n });\n }\n}\n","import Component from '../component/component';\nimport Helpers from '../helpers/helpers';\nimport Icon from '../icon/icon';\nimport QrScanner from '../qr-scanner/qr-scanner';\n\nimport './modal.scss';\n\nexport default class Modal extends Component {\n static initSelector: string = '.modal';\n\n openButton: NodeList;\n parent: HTMLElement;\n closeButton: HTMLElement;\n applyButton: HTMLElement;\n cancelButton: HTMLElement;\n container: HTMLElement;\n header: HTMLElement;\n hasContainer: boolean;\n inner: HTMLElement;\n keyboardHandler: () => void;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.hasContainer = false;\n this.parent = this.element.parentElement;\n this.header = this.element.querySelector('.modal__header');\n this.openButton = document.querySelectorAll('a[href=\"#' + this.element.id + '\"][data-js=\"open-modal\"');\n this.container = document.createElement('div');\n this.container.classList.add('modal-container');\n this.inner = document.createElement('div');\n this.inner.classList.add('modal-container__inner');\n this.closeButton = document.createElement('button');\n this.closeButton.classList.add('modal__close');\n this.closeButton.innerHTML = Icon.render('close', 'modal__close-icon');\n this.applyButton = this.element.querySelector('.modal__apply');\n this.cancelButton = this.element.querySelector('.modal__button--cancel');\n\n this.keyboardHandler = this.keyboard.bind(this);\n\n this.openButton.forEach((link: HTMLLinkElement): void => {\n link.addEventListener('click', (event: MouseEvent): void => {\n event.preventDefault();\n this.open();\n });\n });\n\n if (this.element.classList.contains('modal--demo')) {\n this.open();\n }\n }\n\n bindEventHandlers(): void {\n this.container.addEventListener('modal.close', this.close.bind(this));\n this.container.addEventListener('click', (event: MouseEvent): void => {\n if (event.target === event.currentTarget || event.target === this.inner[0]) {\n event.preventDefault();\n\n this.close();\n }\n });\n\n this.closeButton.addEventListener('click', (event: MouseEvent): void => {\n event.preventDefault();\n\n this.element.dispatchEvent(new Event('modalClosed'));\n\n this.close();\n });\n\n if (this.applyButton) {\n this.applyButton.addEventListener('click', (event: MouseEvent): void => {\n // TODO maybe some apply logic as well?\n event.preventDefault();\n\n this.element.dispatchEvent(new Event('modalClosed'));\n\n this.close();\n });\n }\n\n if (this.cancelButton) {\n this.cancelButton.addEventListener('click', (event: MouseEvent): void => {\n event.preventDefault();\n\n this.close();\n });\n }\n }\n\n open(): void {\n this.closeAll();\n\n if (!this.hasContainer) {\n this.inner.append(this.element);\n\n if (this.element.id) {\n const existingModal: HTMLElement = document.getElementById(this.element.id);\n const modalContainer: HTMLElement | null = (existingModal ? existingModal.closest('.modal-container') : null);\n\n if (modalContainer?.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n\n this.container.append(this.inner);\n if (this.header) {\n this.header.prepend(this.closeButton);\n }\n\n document.body.append(this.container);\n\n this.bindEventHandlers();\n this.hasContainer = true;\n }\n\n this.container.classList.add('is-visible');\n\n Helpers.disableScroll();\n\n if (this.element.classList.contains('modal--qr')) {\n const qrScanner: HTMLElement = this.element.querySelector('.qr-scanner');\n\n if (qrScanner) {\n new QrScanner(qrScanner);\n }\n }\n\n document.addEventListener('keyup', this.keyboardHandler);\n }\n\n close(): void {\n this.container.classList.remove('is-visible');\n\n if (this.element.classList.contains('modal--qr')) {\n const stopEvent: CustomEvent = new CustomEvent('stopScanner');\n\n document.dispatchEvent(stopEvent);\n }\n\n Helpers.enableScroll();\n\n document.removeEventListener('keyup', this.keyboardHandler);\n }\n\n closeAll(): void {\n document.querySelectorAll('.modal-container').forEach((element: HTMLElement) => {\n const modalElement: HTMLElement = element.querySelector('.modal');\n\n element.classList.remove('is-visible');\n\n if (modalElement.classList.contains('modal--qr')) {\n const stopEvent: CustomEvent = new CustomEvent('stopScanner');\n\n document.dispatchEvent(stopEvent);\n }\n });\n }\n\n keyboard(event: KeyboardEvent): void {\n if (event.key === 'Esc' || event.key === 'Escape') {\n this.close();\n }\n }\n}\n","import './movie-card.scss';\n","import './navigation-alternative-header.scss';\n","import '../img/app-store.png';\nimport '../img/play-store.png';\n\nimport Component from '../../component/component';\nimport Helpers from '../../helpers/helpers';\n\nimport './navigation-alternative.scss';\n\nconst animationSpeed: number = 0;\nconst isSmallScreen: () => boolean = () =>\n window.matchMedia('(max-width: 1089px)').matches;\n\nexport default class NavigationAlternative extends Component {\n static initSelector: string = '.js-navigation-alternative';\n\n backButtons: NodeListOf;\n items: NavigationItem[];\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.backButtons = this.element.querySelectorAll(\n '.navigation-alternative-header__button',\n );\n\n this.items = [];\n this.element\n .querySelectorAll('.navigation-alternative__item.has-children')\n .forEach((item: HTMLElement) => {\n this.items.push(\n NavigationItem.create(item),\n );\n });\n\n this.backButtons.forEach((button: HTMLElement): void => {\n button.addEventListener('click', this.closeItems.bind(this));\n });\n }\n\n public closeItems(): void {\n for (const item of this.items) {\n item.close(true);\n }\n }\n}\n\nclass NavigationItem extends Component {\n static initSelector: string = '.js-navigation-alternative-item';\n\n public isOpen: boolean = false;\n public list: HTMLElement;\n public navigation: HTMLElement[];\n public openEvent: Event;\n public closeEvent: Event;\n public animation: Animation;\n public screenWidth: number;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.list = this.element.querySelector('.navigation-alternative__list');\n this.navigation = Helpers.parents(\n this.element,\n '.navigation-alternative',\n );\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n this.handleResize = this.handleResize.bind(this);\n this.openEvent = new CustomEvent('openNavigationItem');\n this.closeEvent = new CustomEvent('closeNavigationItem');\n this.screenWidth = window.innerWidth;\n\n this.element.addEventListener('keyup', this.handleKeyup.bind(this));\n\n this.element\n .querySelectorAll('.navigation-alternative__link--with-children')\n .forEach((link: HTMLElement) => {\n link.addEventListener('click', this.toggle.bind(this));\n });\n\n window.addEventListener('resize', this.handleResize);\n\n this.checkPositioning();\n }\n\n open(): void {\n this.isOpen = true;\n this.navigation.forEach((item: HTMLElement) =>\n item.classList.add('is-initialized'),\n );\n this.checkPositioning();\n this.finishOpen();\n\n window.dispatchEvent(this.openEvent);\n\n document.addEventListener('click', this.handleOutsideClick);\n }\n\n finishOpen(): void {\n this.element.classList.add('is-open');\n this.element\n .querySelectorAll('.navigation-alternative__link')\n .forEach((link: HTMLElement) =>\n link.setAttribute('aria-expanded', 'true'),\n );\n }\n\n checkPositioning(): void {\n const child: HTMLElement = this.element.querySelector(\n '.navigation-alternative__list--with-grandchildren',\n );\n\n const list: HTMLElement = this.element.closest(\n '.navigation-alternative__list',\n );\n\n const anyIcon: HTMLElement = list.querySelector(\n '.navigation-alternative__icon, .navigation-alternative__lang-icon',\n );\n\n if (anyIcon) {\n // Ensure that an occurrence of even a single icon in one of the root menu elements will indent all elements by 56px\n const listElements: NodeListOf = list.querySelectorAll(\n '.navigation-alternative__item--root > .navigation-alternative__link',\n );\n\n listElements.forEach((i: HTMLElement) => {\n const icon: HTMLElement = i.querySelector('.navigation-alternative__icon');\n\n if (!icon) {\n i.style.paddingLeft = '56px';\n }\n });\n }\n\n if (child && window) {\n const parentLeft: number = this.element.getBoundingClientRect()\n .left;\n const style: CSSStyleDeclaration = window.getComputedStyle(child);\n const childWidth: number =\n child.getBoundingClientRect().width +\n parseFloat(style.marginLeft) +\n parseFloat(style.marginRight);\n const containerWidth: number = document.body.clientWidth;\n\n if (parentLeft + childWidth >= containerWidth) {\n child.style.right = 'auto';\n child.style.left =\n containerWidth - (childWidth + parentLeft) + 'px';\n child.style.marginRight = '32px';\n }\n }\n }\n\n openWithAnimation(): void {\n const dropdownHeight: number = this.list.scrollHeight;\n\n if (this.animation) {\n this.animation.cancel();\n }\n\n this.animation = this.list.animate(\n [\n {\n clientHeight: 0,\n },\n {\n clientHeight: dropdownHeight,\n },\n ],\n {\n duration: 0,\n },\n );\n\n this.animation.onfinish = (): void => {\n this.animation = null;\n this.list.removeAttribute('style');\n this.list.style.height = dropdownHeight + 'px';\n this.finishOpen();\n };\n }\n\n close(shouldFocusAfterClose: boolean): void {\n this.isOpen = false;\n\n // on small screens, close with slide animation\n if (isSmallScreen()) {\n Helpers.parents(\n this.list,\n '.navigation-alternative__list',\n ).forEach((item: HTMLElement) => item.removeAttribute('style'));\n Helpers.parents(\n this.list,\n '.navigation-alternative',\n ).forEach((item: HTMLElement) => item.removeAttribute('style'));\n if (Helpers.parents(this.list, '.header').length) {\n this.closeWithAnimation(shouldFocusAfterClose);\n } else {\n if (this.list){\n this.list.removeAttribute('style');\n }\n this.finishClose(shouldFocusAfterClose);\n }\n } else {\n this.finishClose(shouldFocusAfterClose);\n }\n\n window.dispatchEvent(this.closeEvent);\n\n document.removeEventListener('click', this.handleOutsideClick);\n }\n\n finishClose(shouldFocus: boolean): void {\n this.element.classList.remove('is-open');\n this.element\n .querySelectorAll('.navigation-alternative__link')\n .forEach((item: HTMLElement) =>\n item.setAttribute('aria-expanded', 'false'),\n );\n if (shouldFocus) {\n const firstLink: HTMLElement = this.element.querySelector(\n '.navigation-alternative__link',\n );\n\n if (firstLink) {\n firstLink.focus();\n }\n }\n }\n\n closeWithAnimation(shouldFocusAfterClose: boolean): void {\n if (this.animation) {\n this.animation.cancel();\n }\n\n setTimeout(() => {\n this.list.removeAttribute('style');\n this.finishClose(shouldFocusAfterClose);\n }, animationSpeed);\n }\n\n toggle(event: MouseEvent): void {\n event.preventDefault();\n\n if (this.element.classList.contains('is-open')) {\n this.close(false);\n } else {\n this.closeAll();\n this.open();\n }\n }\n\n closeAll(): void {\n const parentList: HTMLElement = Helpers.parents(\n this.element,\n '.navigation-alternative__list',\n )[0];\n\n if (parentList?.hasChildNodes()) {\n parentList.childNodes.forEach((item: HTMLElement) =>\n item.hasChildNodes() ? item.classList.remove('is-open') : '',\n );\n }\n }\n\n handleOutsideClick(event: MouseEvent): void {\n if (!isSmallScreen()) {\n if (\n event.target instanceof Element &&\n !event.target.closest(\n '.' + this.element.className.replace(/ /g, '.'),\n )\n ) {\n this.close(false);\n }\n }\n }\n\n handleKeyup(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.close(true);\n }\n }\n\n handleResize(): void {\n const newScreenWidth: number = window.innerWidth;\n\n if (isSmallScreen()) {\n if (newScreenWidth !== this.screenWidth) {\n this.close(false);\n this.screenWidth = newScreenWidth;\n }\n } else {\n this.checkPositioning();\n }\n }\n\n destroy(): void {\n window.removeEventListener('resize', this.handleResize);\n document.removeEventListener('click', this.handleOutsideClick);\n }\n}\n","import './navigation-header.scss';\n","import '../img/app-store.png';\nimport '../img/play-store.png';\n\nimport Component from '../../component/component';\nimport Helpers from '../../helpers/helpers';\n\nimport './navigation.scss';\n\nconst animationSpeed: number = 300;\nconst isSmallScreen: () => boolean = () => window.matchMedia('(max-width: 1089px)').matches;\n\nexport default class Navigation extends Component {\n static initSelector: string = '.js-navigation';\n\n backButtons: NodeListOf;\n items: NavigationItem[];\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.backButtons = this.element.querySelectorAll('.navigation-header__button--back, .navigation-header__button--close');\n\n this.items = [];\n this.element.querySelectorAll('.navigation__item.has-children').forEach((item: HTMLElement) => {\n this.items.push(NavigationItem.create(item));\n });\n\n this.backButtons.forEach((button: HTMLElement): void => {\n button.addEventListener('click', this.closeItems.bind(this));\n });\n }\n\n public closeItems(): void {\n for (const item of this.items) {\n item.close(false);\n }\n }\n}\n\nclass NavigationItem extends Component {\n static initSelector: string = '.js-navigation-item';\n\n public isOpen: boolean = false;\n public list: HTMLElement;\n public navigation: HTMLElement[];\n public openEvent: Event;\n public closeEvent: Event;\n public animation: Animation;\n public screenWidth: number;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.list = this.element.querySelector('.navigation__list');\n this.navigation = Helpers.parents(this.element, '.navigation');\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n this.handleResize = this.handleResize.bind(this);\n this.openEvent = new CustomEvent('openNavigationItem');\n this.closeEvent = new CustomEvent('closeNavigationItem');\n this.screenWidth = window.innerWidth;\n\n this.element.addEventListener('keyup', this.handleKeyup.bind(this));\n\n this.element.querySelectorAll('.navigation__link--with-children').forEach((link: HTMLElement) => {\n link.addEventListener('click', this.toggle.bind(this));\n });\n\n window.addEventListener('resize', this.handleResize);\n\n this.checkPositioning();\n }\n\n open(): void {\n this.isOpen = true;\n // on small screens, open with slide animation\n if (isSmallScreen()) {\n this.openWithAnimation();\n } else {\n this.navigation.forEach((item: HTMLElement) => item.classList.add('is-initialized'));\n this.checkPositioning();\n this.finishOpen();\n }\n\n window.dispatchEvent(this.openEvent);\n\n document.addEventListener('click', this.handleOutsideClick);\n }\n\n finishOpen(): void {\n this.element.classList.add('is-open');\n this.element.querySelectorAll('.navigation__link').forEach((link: HTMLElement) => link.setAttribute('aria-expanded', 'true'));\n }\n\n checkPositioning(): void {\n const child: HTMLElement = this.element.querySelector('.navigation__list--with-grandchildren');\n\n if (child && window) {\n const parentLeft: number = this.element.getBoundingClientRect().left;\n const style: CSSStyleDeclaration = window.getComputedStyle(child);\n const childWidth: number = child.getBoundingClientRect().width + parseFloat(style.marginLeft) + parseFloat(style.marginRight);\n const containerWidth: number = document.body.clientWidth;\n\n if (parentLeft + childWidth >= containerWidth) {\n child.style.right = 'auto';\n child.style.left = containerWidth - (childWidth + parentLeft) + 'px';\n child.style.marginRight = '32px';\n }\n }\n }\n\n openWithAnimation(): void {\n const dropdownHeight: number = this.list.scrollHeight;\n\n Helpers.parents(this.list, '.navigation__list').forEach((item: HTMLElement) => item.style.transform = 'translateX(-100%)');\n Helpers.parents(this.list, '.navigation').forEach((item: HTMLElement) => item.style.height = this.list.scrollHeight + 'px');\n\n if (this.animation) {\n this.animation.cancel();\n }\n\n this.animation = this.list.animate(\n [\n {\n clientHeight: 0,\n },\n {\n clientHeight: dropdownHeight,\n },\n ],\n {\n duration: 0,\n },\n );\n\n this.animation.onfinish = (): void => {\n this.animation = null;\n this.list.removeAttribute('style');\n this.list.style.height = dropdownHeight + 'px';\n this.finishOpen();\n };\n }\n\n close(shouldFocusAfterClose: boolean): void {\n this.isOpen = false;\n\n // on small screens, close with slide animation\n if (isSmallScreen()) {\n Helpers.parents(this.list, '.navigation__list').forEach((item: HTMLElement) => item.removeAttribute('style'));\n Helpers.parents(this.list, '.navigation').forEach((item: HTMLElement) => item.removeAttribute('style'));\n if (Helpers.parents(this.list, '.header').length) {\n this.closeWithAnimation(shouldFocusAfterClose);\n } else {\n if (this.list){\n this.list.removeAttribute('style');\n }\n this.finishClose(shouldFocusAfterClose);\n }\n } else {\n this.finishClose(shouldFocusAfterClose);\n }\n\n window.dispatchEvent(this.closeEvent);\n\n document.removeEventListener('click', this.handleOutsideClick);\n }\n\n finishClose(shouldFocus: boolean): void {\n this.element.classList.remove('is-open');\n this.element.querySelectorAll('.navigation__link').forEach((item: HTMLElement) => item.setAttribute('aria-expanded', 'false'));\n if (shouldFocus) {\n const firstLink: HTMLElement = this.element.querySelector('.navigation__link');\n\n if (firstLink) {\n firstLink.focus();\n }\n }\n }\n\n closeWithAnimation(shouldFocusAfterClose: boolean): void {\n if (this.animation) {\n this.animation.cancel();\n }\n\n setTimeout(() => {\n this.list.removeAttribute('style');\n this.finishClose(shouldFocusAfterClose);\n }, animationSpeed);\n }\n\n toggle(event: MouseEvent): void {\n event.preventDefault();\n\n if (this.element.classList.contains('is-open')) {\n this.close(false);\n } else {\n this.closeAll();\n this.open();\n }\n }\n\n closeAll(): void {\n const parentList: HTMLElement = Helpers.parents(this.element, '.navigation__list')[0];\n\n if (parentList?.hasChildNodes()) {\n parentList.childNodes.forEach((item: HTMLElement) => item.hasChildNodes() ? item.classList.remove('is-open') : '');\n }\n }\n\n handleOutsideClick(event: MouseEvent): void {\n if (!isSmallScreen()) {\n if (event.target instanceof Element && !event.target.closest('.' + this.element.className.replace(/ /g, '.'))) {\n this.close(false);\n }\n }\n }\n\n handleKeyup(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.close(true);\n }\n }\n\n handleResize(): void {\n const newScreenWidth: number = window.innerWidth;\n\n if (isSmallScreen()) {\n if (newScreenWidth !== this.screenWidth) {\n this.close(false);\n this.screenWidth = newScreenWidth;\n }\n } else {\n this.checkPositioning();\n }\n }\n\n destroy(): void {\n window.removeEventListener('resize', this.handleResize);\n document.removeEventListener('click', this.handleOutsideClick);\n }\n}\n","import './news-card.scss';\n","import Helpers from '../../helpers/helpers';\nimport Notification, { INotification } from '../notification/notification';\n\nexport default class BrowserNotification extends Notification {\n static initSelector: string = '.browser-notification';\n\n public static get shouldShow(): boolean {\n const ieVer: number | boolean = Helpers.isIE;\n\n return window.sessionStorage.getItem('gotoandplay_old_browser') !== 'accepted' && ieVer && ieVer <= 11;\n }\n\n public static render(data: INotification, className: string = ''): HTMLElement {\n return super.render(data, ['browser-notification', className].join(' '));\n }\n\n remove(): void {\n window.sessionStorage.setItem('gotoandplay_old_browser', 'accepted');\n\n super.remove();\n }\n}\n","import Cookie from '../../../utilities/cookie/cookie';\nimport Notification, { INotification } from '../notification/notification';\n\nexport default class CookieNotification extends Notification {\n static initSelector: string = '.cookie-notification';\n\n public static get shouldShow(): boolean {\n return Cookie.get('gotoandplay_cookie_agreement') !== 'accepted';\n }\n\n public static render(data: INotification, className: string = ''): HTMLElement {\n return super.render(data, ['cookie-notification', className].join(' '));\n }\n\n remove(): void {\n Cookie.set('gotoandplay_cookie_agreement', 'accepted', 365 * 24);\n\n super.remove();\n }\n}\n","import Component from '../../component/component';\nimport BrowserNotification from '../browser-notification/browser-notification';\nimport CookieNotification from '../cookie-notification/cookie-notification';\nimport Notification, { INotification } from '../notification/notification';\n\nimport './notification-list.scss';\n\nexport default class NotificationList extends Component {\n static initSelector: string = '.notification-list';\n\n public notifications: IGotoAndPlayNotificationComponent[];\n\n constructor(element: HTMLElement) {\n super(element);\n\n this.notifications = window.gotoAndPlay.notifications;\n\n this.init();\n }\n\n getNotificationClassByName(name: string): typeof Notification {\n switch (name) {\n case 'CookieNotification':\n return CookieNotification;\n case 'BrowserNotification':\n return BrowserNotification;\n case 'Notification':\n default:\n return Notification;\n }\n }\n\n init(): void {\n if (this.notifications.length) {\n for (const item of this.notifications) {\n const classInstance: typeof Notification = this.getNotificationClassByName(item.component);\n\n if (classInstance.shouldShow) {\n this.add(classInstance, item.data);\n }\n }\n }\n }\n\n add(component: T, notification: INotification): InstanceType {\n const notif: HTMLElement = component.render(notification, [notification.modifier, 'notification-list__item'].join(' '));\n const instance: InstanceType = component.create(notif);\n\n this.element.append(notif);\n notif.dispatchEvent(new CustomEvent('enhance'));\n instance.show();\n\n return instance;\n }\n}\n","import { Button, IButton } from '../../button';\nimport Component from '../../component/component';\n\nimport './notification.scss';\n\nexport interface INotification {\n content: string;\n button: IButton;\n actions?: IButton[];\n modifier?: string;\n}\n\nexport default class Notification extends Component {\n static initSelector: string = '.notification';\n\n closeButton: HTMLElement;\n\n constructor(element: HTMLElement) {\n super(element);\n\n this.closeButton = this.element.querySelector('.js-notification-close');\n\n this.init();\n }\n\n public static get shouldShow(): boolean {\n return false;\n }\n\n public static render(data: INotification, className: string = ''): HTMLElement {\n const block: HTMLDivElement = document.createElement('div');\n const contentElement: HTMLDivElement = document.createElement('div');\n const actionsElement: HTMLDivElement = document.createElement('div');\n\n block.setAttribute('role', 'status');\n block.setAttribute('aria-live', 'polite');\n block.classList.add('notification');\n\n if (className) {\n block.classList.add(...className.split(' ').filter((name: string) => !!name));\n }\n\n contentElement.classList.add(...['notification__content', 'text']);\n actionsElement.classList.add('notification__action-list');\n\n const closeButton: string = Button.render({\n className: 'button--tiny notification__action js-notification-close',\n data: data.button,\n });\n\n if (data.actions) {\n for (const action of data.actions) {\n actionsElement.append(Button.render({\n className: 'button--tiny notification__action',\n data: action,\n }));\n }\n }\n\n actionsElement.innerHTML += closeButton;\n contentElement.innerHTML += data.content;\n block.append(contentElement);\n block.append(actionsElement);\n\n return block;\n }\n\n init(): void {\n if (this.closeButton) {\n this.closeButton.addEventListener('click', this.handleCloseClick);\n }\n }\n\n handleCloseClick: (event: MouseEvent) => void = (event: MouseEvent) => {\n event.preventDefault();\n\n this.hide();\n\n this.element.addEventListener('transitionend', (e: TransitionEvent) => {\n if (e.target === e.currentTarget && e.propertyName === 'transform') {\n this.remove();\n }\n });\n };\n\n show(): void {\n window.setTimeout(() => {\n this.element.classList.add('is-visible');\n });\n }\n\n hide(): void {\n this.element.classList.remove('is-visible');\n }\n\n remove(): void {\n this.element.remove();\n }\n}\n","import './pagination.scss';\n","import './pass.scss';\n","import './payment.scss';\n","import Component from '../component/component';\n\nimport './product-card.scss';\nexport default class ProductCard extends Component {\n static initSelector: string = '.product-card';\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.init();\n }\n\n init(): void {\n const ro: ResizeObserver = new ResizeObserver(\n (entries: ResizeObserverEntry[]) => {\n const entry: ResizeObserverEntry = entries[0];\n const cr: DOMRectReadOnly = entry.contentRect;\n\n if (cr.width < 250) {\n if (\n !entry.target.classList.contains('product-card--narrow')\n ) {\n entry.target.classList.add('product-card--narrow');\n }\n } else {\n if (\n entry.target.classList.contains('product-card--narrow')\n ) {\n entry.target.classList.remove('product-card--narrow');\n }\n }\n },\n );\n\n ro.observe(this.element);\n }\n}\n","import Component from '../component/component';\n\nimport './profile-menu.scss';\n\nexport default class ProfileMenu extends Component {\n static initSelector: string = '.profile-menu';\n\n public trigger: HTMLElement;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.trigger = this.element.querySelector('.profile-menu__header');\n\n this.init();\n }\n\n init(): void {\n this.trigger.addEventListener('click', this.toggle.bind(this));\n }\n\n toggle(): void {\n if (this.element.classList.contains('is-open')) {\n this.element.classList.remove('is-open');\n } else {\n this.element.classList.add('is-open');\n }\n }\n}\n","import './progress.scss';\n\nimport Component from '../component/component';\n\nexport default class Progress extends Component {\n static initSelector: string = '.js-progress';\n\n public bar: HTMLElement;\n public valueSelector: HTMLElement;\n public reward: NodeListOf;\n public rewardsBar: HTMLElement;\n public rewardCount: number;\n\n public value: number = 0;\n public min: number = 0;\n public max: number = 100;\n public position: number = 50;\n public color: string = '#f58220';\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.bar = this.element.querySelector('.progress__complete');\n this.valueSelector = this.element.querySelector('.progress__complete-value');\n this.reward = this.element.querySelectorAll('.progress__reward-dot');\n this.rewardsBar = this.element.querySelector('.progress__bar-rewards');\n\n const value: string = this.bar.dataset.completeValue;\n\n if (value.indexOf(',') > 0) {\n value.replace(',', '.');\n }\n\n this.value = parseFloat(value);\n this.color = window.getComputedStyle(this.bar).backgroundColor;\n this.min = parseInt(this.bar.dataset.completeMin);\n this.max = parseInt(this.bar.dataset.completeMax);\n this.position = ((this.value - 1) / (this.max - 1) * 100);\n this.rewardCount = this.reward.length;\n\n this.init();\n }\n\n public static getPositionAtCenter(element: HTMLElement): ICoordinates {\n const position: IBoundingBox = element.getBoundingClientRect();\n\n return {\n x: position.left + position.width / 2,\n y: position.top + position.height / 2,\n };\n }\n\n public static getPositionAtLeft(element: HTMLElement): ICoordinates {\n const position: IBoundingBox = element.getBoundingClientRect();\n\n return {\n x: position.left,\n y: position.top + position.height / 2,\n };\n }\n\n public static getDistanceBetweenElements(a: HTMLElement, b: HTMLElement): number {\n const aPosition: ICoordinates = Progress.getPositionAtLeft(a);\n const bPosition: ICoordinates = Progress.getPositionAtCenter(b);\n\n Math.hypot = (x: number, y: number): number => Math.sqrt(x * x + y * y);\n\n return Math.hypot(aPosition.x - bPosition.x, aPosition.y - bPosition.y);\n }\n\n calculateRewardsWidth(): void {\n const parentWidth: number = this.element.clientWidth;\n const sectionWidth: number = (parentWidth - 72) / (this.max);\n\n if (!this.element.classList.contains('progress--default')) {\n (this.element.querySelector('.progress__inner') as HTMLElement).style.maxWidth = `${parentWidth - 72 - sectionWidth + 11}px`;\n }\n }\n\n init(): void {\n const a: HTMLElement = this.element.querySelector('.progress__inner');\n const b: HTMLElement = this.reward[this.value - 1];\n\n if (a && b) {\n const width: number = parseFloat(getComputedStyle(this.rewardsBar, null).width.replace('px', ''));\n\n this.position = (Progress.getDistanceBetweenElements(a, b) / width) * 100;\n }\n\n this.bar.style.maxWidth = this.position + '%';\n\n if (this.valueSelector) {\n this.valueSelector.style.left = this.position + '%';\n }\n\n if (this.value === this.max) {\n if (this.valueSelector) {\n this.valueSelector.style.display = 'none';\n }\n this.bar.style.display = 'none';\n this.reward.forEach((element: HTMLElement) => {\n element.style.backgroundColor = this.color;\n });\n this.element.style.backgroundColor = this.color;\n } else if (this.value === this.min) {\n if (this.valueSelector) {\n this.valueSelector.style.display = 'none';\n }\n } else {\n window.setTimeout(() => {\n if (this.valueSelector) {\n this.valueSelector.classList.remove('h-hidden');\n }\n }, 900);\n\n this.reward.forEach((element: HTMLElement, index: number) => {\n if (index < this.value) {\n window.setTimeout(() => {\n element.style.backgroundColor = this.color;\n }, (900 / this.value) * index);\n }\n });\n }\n\n this.calculateRewardsWidth();\n window.addEventListener('resize', this.calculateRewardsWidth.bind(this));\n }\n}\n\ninterface ICoordinates {\n x?: number;\n y?: number;\n}\n\ninterface IBoundingBox {\n width: number;\n height: number;\n top: number;\n left: number;\n}\n","import './qr-scanner.scss';\n\n// import { Html5QrcodeScanner } from 'html5-qrcode';\nimport { CameraDevice, Html5Qrcode, Html5QrcodeCameraScanConfig } from 'html5-qrcode';\n\nimport Component from '../component/component';\nimport Select from '../forms/select/select';\n\n// interface IQrConfig {\n// fps: number;\n// qrbox: {\n// width: number;\n// height: number;\n// };\n// aspectRatio: number;\n// }\n\n/* eslint-disable */\nenum Html5QrcodeSupportedFormats {\n QR_CODE = 0,\n AZTEC,\n CODABAR,\n CODE_39,\n CODE_93,\n CODE_128,\n DATA_MATRIX,\n MAXICODE,\n ITF,\n EAN_13,\n EAN_8,\n PDF_417,\n RSS_14,\n RSS_EXPANDED,\n UPC_A,\n UPC_E,\n UPC_EAN_EXTENSION,\n}\n/* eslint-enable */\n\nclass QrcodeResultFormat {\n public readonly format: Html5QrcodeSupportedFormats;\n public readonly formatName: string;\n}\n\ninterface IQrcodeResult {\n /** Decoded text. */\n text: string;\n\n /** Format that was successfully scanned. */\n format?: QrcodeResultFormat,\n}\n\ninterface IHtml5QrcodeResult {\n decodedText: string;\n result: IQrcodeResult;\n}\n\nexport default class QrScanner extends Component {\n static initSelector: string = '.js-qr-scanner';\n\n html5QrCode: Html5Qrcode;\n\n public scannerContainer: HTMLElement;\n public cameraSelector: HTMLElement;\n public cameraSelectorComponent: Select;\n public descriptionContainer: HTMLElement;\n private cameraZoomOn: boolean = false;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private cameraSelectorComponentChangeEvent: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private scannerContainerClickEvent: any;\n\n constructor(element: HTMLElement) {\n super(element);\n\n this.scannerContainer = this.element.querySelector('.qr-scanner__scanner');\n this.cameraSelector = this.element.querySelector('.qr-scanner__camera-select');\n this.descriptionContainer = this.element.querySelector('.qr-scanner__description');\n\n this.cameraSelectorComponent = window.gotoAndPlay.initializedComponents.find((component: Component) => component instanceof Select && component.element === this.cameraSelector) as Select;\n\n if (this.cameraSelectorComponent) {\n this.cameraSelectorComponentChangeEvent = this.cameraSelectorComponentChangeHandler.bind(this);\n this.cameraSelectorComponent.element.addEventListener('change', this.cameraSelectorComponentChangeEvent);\n }\n\n // register event for element click\n this.scannerContainerClickEvent = this.scannerContainerClickHandler.bind(this);\n this.scannerContainer.addEventListener('click', this.scannerContainerClickEvent);\n\n this.init();\n }\n\n init(): void {\n const scannerId: string = this.element.querySelector('.qr-scanner__scanner').getAttribute('id');\n\n this.html5QrCode = new Html5Qrcode(scannerId);\n\n\n Html5Qrcode.getCameras().then((devices: CameraDevice[]) => {\n let idOrConfig: string | MediaTrackConstraints = { facingMode: 'environment' };\n\n // facingMode: 'environment' will select fisheye camera if available\n // acording to this info: https://www.reddit.com/r/javascript/comments/8eg8w5/choosing_cameras_in_javascript_with_the/\n // \"normal\" environment camera is usually the last camera in the list\n\n\n let defaultCamera: CameraDevice = null;\n\n if (devices) {\n const lastUsedCameraID: string = localStorage.getItem('lastUsedCameraID');\n\n if (lastUsedCameraID && devices.find((device: CameraDevice) => device.id === lastUsedCameraID)) {\n defaultCamera = devices.find((device: CameraDevice) => device.id === lastUsedCameraID);\n }\n // for newer devices, the last camera selection is not correct anymore\n // else if (devices.length > 2) { // if there are more than 2 cameras, then expect to have more than 1 environment camera, take the last one\n // defaultCamera = devices[devices.length - 1];\n\n // // if the last camera is a fisheye camera, then take the second to last camera\n // if (defaultCamera.label.toLowerCase().includes('telephoto')\n // || defaultCamera.label.toLowerCase().includes('zoom')\n // || defaultCamera.label.toLowerCase().includes('wide')) {\n // defaultCamera = devices[devices.length - 2];\n // }\n // }\n\n // set camera selector if there are more than 1 camera\n if (devices.length > 1 && this.cameraSelectorComponent) {\n this.cameraSelector.style.display = 'block';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const choices: any[] = devices.map((device: CameraDevice) => ({\n value: device.id,\n label: device.label,\n }));\n\n\n this.cameraSelectorComponent.choices.setChoices(choices);\n }\n }\n\n // if the default camera is not the front camera, then use it\n if (defaultCamera) {\n if (!defaultCamera.label.toLowerCase().includes('front')) {\n idOrConfig = defaultCamera.id;\n }\n } else {\n localStorage.removeItem('lastUsedCameraID');\n }\n\n\n this.startScanner(idOrConfig);\n\n document.addEventListener('stopScanner', this.stopScanner.bind(this));\n }).catch(() => {\n this.element.classList.add('not-allowed');\n });\n\n\n }\n\n // eslint-disable-next-line\n qrCodeSuccessCallback(decodedText: string, decodedResult: IHtml5QrcodeResult): void {\n const customEvent: CustomEvent = new CustomEvent('scanSuccess', {\n detail: {\n decodedText,\n decodedResult,\n },\n });\n\n this.element.dispatchEvent(customEvent);\n }\n\n // eslint-disable-next-line\n qrCodeErrorCallback(decodedText: string, decodedResult: any): void {\n /* handle error */\n // Note that this is not really an error,\n // rather just the QR code not currently being in camera viewport\n }\n\n stopScanner(): void {\n try {\n this.html5QrCode.stop();\n } catch (e) {\n // catch errors when multiple scanners are on the page (but only 1 active)\n }\n\n // remove camera selector if it's visible\n if (this.cameraSelectorComponent && this.cameraSelector.style.display === 'block') {\n this.cameraSelectorComponent.choices.clearStore();\n this.cameraSelector.style.display = 'none';\n }\n\n // remove event listeners\n if (this.cameraSelectorComponentChangeEvent) {\n this.cameraSelectorComponent.element.removeEventListener('change', this.cameraSelectorComponentChangeEvent);\n }\n\n if (this.scannerContainerClickEvent) {\n this.scannerContainer.removeEventListener('click', this.scannerContainerClickEvent);\n }\n }\n\n private stopScannerInner(): Promise {\n return this.html5QrCode.stop().then(() => {\n // console.log('QR Code scanning stopped.');\n }).catch(() => {\n console.error('Error stopping the QR code scanner');\n });\n }\n\n private startScanner(idOrConfig: string | MediaTrackConstraints): void {\n\n if (this.html5QrCode.isScanning) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const config: Html5QrcodeCameraScanConfig | any = {\n fps: 10,\n qrbox: {\n width: window.screen.width < 600 ? 180 : 300,\n height: window.screen.width < 600 ? 180 : 300,\n },\n aspectRatio: 1,\n };\n\n this.html5QrCode.start(\n idOrConfig,\n config, this.qrCodeSuccessCallback.bind(this),\n this.qrCodeErrorCallback.bind(this))\n .then(() => {\n const trackSettings: MediaTrackSettings = this.html5QrCode.getRunningTrackSettings();\n\n this.setCameraSelectorChoice(trackSettings.deviceId); // set the camera selector to the currently active camera\n\n setTimeout(() => {\n this.toggleCameraZoom(true); // force zoom after starting the scanner\n }, 1000);\n })\n .catch(() => {\n this.element.classList.add('not-allowed');\n });\n\n\n }\n\n private setCameraSelectorChoice(value: string): void {\n // set value of the camera selector if it's visible\n if (this.cameraSelectorComponent && this.cameraSelector.style.display === 'block') {\n this.cameraSelectorComponent.choices.setChoiceByValue(value);\n // save the last used camera\n localStorage.setItem('lastUsedCameraID', value);\n }\n }\n\n private toggleCameraZoom(forceZoom: boolean): void {\n\n if (!this.html5QrCode.isScanning) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // const scannerCapabilities: any = this.html5QrCode.getRunningTrackCapabilities() as any;\n\n // if (!scannerCapabilities.zoom) {\n // return;\n // }\n\n // no zoom toggle needed if continuous focus mode is available\n // if (scannerCapabilities.focusMode?.includes('continuous')) {\n // return;\n // }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const settings: any = this.html5QrCode.getRunningTrackSettings() as any;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let newZoom: any = settings.zoom || 1.0;\n\n if (!this.cameraZoomOn || forceZoom) {\n newZoom = 4.0;\n this.cameraZoomOn = true;\n } else {\n newZoom = 1.0;\n this.cameraZoomOn = false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const advanced: any = {\n zoom: newZoom,\n };\n\n // if (scannerCapabilities.focusDistance) {\n // advanced.focusMode = 'manual';\n // advanced.focusDistance = 0.03; // in meters\n // }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const constraints: any = {\n focusMode: 'continuous',\n width: { ideal: 1000 },\n height: { ideal: 1000 },\n advanced: [advanced],\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.html5QrCode.applyVideoConstraints(constraints as any);\n\n }\n\n private cameraSelectorComponentChangeHandler(event: Event): void {\n const target: HTMLSelectElement = event.target as HTMLSelectElement;\n\n if (this.html5QrCode.isScanning) {\n this.stopScannerInner().then(() => {\n this.startScanner(target.value);\n });\n } else {\n this.startScanner(target.value);\n }\n }\n\n private scannerContainerClickHandler(): void {\n this.toggleCameraZoom(false);\n }\n}\n","import './rating.scss';\n","import 'what-input';\n\nimport './reset.scss';\n","import './scananother.scss';\n","import './schedule-card.scss';\n","import './schedule-filter.scss';\n\nimport Component from '../component/component';\n\nexport default class ScheduleFilter extends Component {\n static initSelector: string = '.schedule-filter';\n\n public nextButton: HTMLElement;\n public prevButton: HTMLElement;\n public choicesContainer: HTMLElement;\n public choicesInnerContainer: HTMLElement;\n public dayPicker: HTMLElement;\n public choices: NodeListOf;\n public selectedChoice: HTMLElement;\n public scrollAmount: number = 0;\n public radioChoices: NodeListOf;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.nextButton = this.element.querySelector('.schedule-filter__day-picker-next');\n this.prevButton = this.element.querySelector('.schedule-filter__day-picker-prev');\n this.choicesContainer = this.element.querySelector('.schedule-filter__day-picker-container');\n this.choicesInnerContainer = this.element.querySelector('.schedule-filter__day-picker-outer');\n this.choices = this.element.querySelectorAll('.day-picker__choice');\n this.selectedChoice = this.element.querySelector('.day-picker__input:checked');\n this.dayPicker = this.element.querySelector('.schedule-filter__day-picker');\n this.radioChoices = this.element.querySelectorAll('.filter-radio__choice');\n\n if (this.dayPicker) {\n this.init();\n }\n\n if (this.radioChoices) {\n this.handleFilterRadios();\n this.radioChoices.forEach((element: HTMLElement) => element.addEventListener('click', this.handleFilterRadios.bind(this)));\n }\n }\n\n init(): void {\n setTimeout(() => {\n this.scrollToSelectedDate();\n }, 100);\n this.handleArrows();\n this.handleClicks();\n }\n\n hasOverflow(): boolean {\n return this.choicesContainer.offsetWidth < this.dayPicker.offsetWidth;\n }\n\n handleArrows(): void {\n if (this.hasOverflow()) {\n this.nextButton.classList.remove('h-hidden');\n this.prevButton.classList.remove('h-hidden');\n }\n }\n\n scrollToSelectedDate(): void {\n const selectedChoiceOffset: number = this.selectedChoice.getBoundingClientRect().left;\n const choiceContainerOffset: number = this.choicesContainer.getBoundingClientRect().left;\n // calculate selected choice's distance from the choices' container\n const offsetDifference: number = selectedChoiceOffset - choiceContainerOffset;\n const scrollMax: number = this.dayPicker.offsetWidth + 112;\n const containerWidth: number = this.choicesContainer.offsetWidth;\n const choiceWidth: number = this.choices[0].offsetWidth;\n\n // add choice's width to offset difference to make sure choice will be fully visible\n if ((offsetDifference + choiceWidth) > containerWidth) {\n this.choicesContainer.scrollTo({\n behavior: 'auto',\n left: Math.min(offsetDifference, scrollMax),\n top: 0,\n });\n\n this.scrollAmount = Math.min(offsetDifference, scrollMax);\n }\n }\n\n handleClicks(): void {\n const scrollMin: number = 0;\n const scrollMax: number = this.dayPicker.offsetWidth + 112;\n const containerWidth: number = this.choicesContainer.offsetWidth;\n\n this.nextButton.onclick = (): void => {\n // prevent scroll amount overcharging that would lead to multiple clicks to activate scroll\n if (this.scrollAmount < scrollMin) {\n this.scrollAmount = scrollMin;\n }\n\n this.choicesContainer.scrollTo({\n behavior: 'smooth',\n left: Math.min(this.scrollAmount += containerWidth, scrollMax),\n top: 0,\n });\n };\n\n this.prevButton.onclick = (): void => {\n // prevent scroll amount overcharging that would lead to multiple clicks to activate scroll\n if (this.scrollAmount > scrollMax) {\n this.scrollAmount = scrollMax;\n }\n this.choicesContainer.scrollTo({\n behavior: 'smooth',\n left: Math.max(this.scrollAmount -= containerWidth, scrollMin),\n top: 0,\n });\n };\n }\n\n handleFilterRadios(): void {\n this.radioChoices.forEach((element: HTMLElement) => {\n if (element.hasAttribute('data-fields')) {\n const fieldIDs: string[] = element.getAttribute('data-fields').split(',');\n const isChecked: boolean = element.querySelector('input').checked;\n\n fieldIDs.forEach((id: string) => {\n const dropdown: HTMLElement = this.element.querySelector(`#dropdown-parent-${id}`);\n\n if (isChecked) {\n dropdown.classList.remove('h-hidden');\n } else {\n dropdown.classList.add('h-hidden');\n }\n });\n }\n });\n }\n}\n","import './screening-card.scss';\n","import './section.scss';\n","import Gumshoe from 'gumshoejs';\n\nimport Component from '../component/component';\n\nimport './sidenav.scss';\n\nexport default class Sidenav extends Component {\n static initSelector: string = '.sidenav';\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.init();\n }\n\n init(): void {\n const header: HTMLElement = document.querySelector('.header');\n\n new Gumshoe('.sidenav__link', {\n offset: header ? header.clientHeight : 0,\n });\n\n this.scrollHandler();\n window.addEventListener('scroll', this.scrollHandler.bind(this));\n }\n\n scrollHandler(): void {\n const activeItem: HTMLElement = this.element.querySelector('.sidenav__item.active');\n\n if (activeItem === null) {\n this.element.querySelectorAll('.sidenav__item')[0].classList.add('is-current');\n } else {\n this.element.querySelectorAll('.sidenav__item')[0].classList.remove('is-current');\n }\n }\n}\n","import './spinner.scss';\n\nexport interface ISpinner {\n label?: string;\n}\n\nexport interface ISpinnerProps {\n data?: ISpinner;\n className?: string;\n}\n\nexport default class Spinner {\n static render(props?: ISpinnerProps): string {\n const { data = {}, className }: ISpinnerProps = props;\n const { label = 'Loading' }: ISpinner = data;\n const classArray: string[] = ['spinner'];\n\n if (className) {\n classArray.push(className);\n }\n\n return '
';\n }\n}\n","import './steps.scss';\n","import './sticky-button.scss';\n","import './summary-card.scss';\n","import './table-list.scss';\n","import './table-status-list.scss';\n","import './tag.scss';\n","import './ticket-card.scss';\n","import './ticket-delivery.scss';\n","import './ticket-list.scss';\n","import './ticket.scss';\n","import Component from '../component/component';\n\nimport './timer.scss';\n\nexport default class Timer extends Component {\n static initSelector: string = '.js-timer';\n\n duration: number;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.duration = parseInt(this.element.getAttribute('data-duration'));\n\n this.init();\n }\n\n init(): void {\n this.calculateRemainingTime();\n }\n\n calculateRemainingTime(): void {\n const timerInterval: number = window.setInterval(() => {\n this.duration -= 1;\n this.changeTime(this.duration);\n\n if (this.duration === 0) {\n clearInterval(timerInterval);\n }\n }, 1000);\n }\n\n changeTime(value: number): void {\n const minutes: number = Math.floor(value / 60);\n const seconds: number = value - minutes * 60;\n\n const minutesString: string = ('0' + minutes.toString()).slice(-2);\n const secondsString: string = ('0' + seconds.toString()).slice(-2);\n\n this.element.innerText = (minutesString + ':' + secondsString);\n }\n}\n","import './title.scss';\n","import './typography.scss';\n","import Component from '../component/component';\nimport Helpers from '../helpers/helpers';\n\nimport './user.scss';\n\nimport './img/fb.svg';\nimport './img/smart.svg';\n\nexport default class User extends Component {\n static initSelector: string = '.user';\n\n public toggle: HTMLElement;\n public linkContainer: HTMLElement;\n\n constructor(target: HTMLElement) {\n super(target);\n\n this.toggle = this.element.querySelector('.js-user-button');\n this.linkContainer = this.element.querySelector('.user__account-links');\n\n if (this.toggle && this.linkContainer) {\n this.init();\n }\n }\n\n init(): void {\n this.toggle.addEventListener('click', this.toggleHandler.bind(this));\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n toggleHandler(event: MouseEvent): void {\n event.preventDefault();\n\n this.linkContainer.classList.toggle('is-open');\n }\n\n handleOutsideClick(event: MouseEvent): void {\n if (event.target instanceof HTMLElement) {\n if (!event.target.classList.contains('user') && !Helpers.parents(event.target, '.user').length) {\n this.linkContainer.classList.remove('is-open');\n }\n }\n }\n\n destroy(): void {\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n}\n","import './video.scss';\n","import 'iframe-resizer/js/iframeResizer.contentWindow';\nimport './styles.fractal.scss';\n\nimport { default as AlertExample } from './components/alert/alert--example';\nimport { default as SelectExample } from './components/forms/select/select--disabled-example';\n\n// eslint-disable-next-line\nimport * as components from '.';\n\nmodule.exports = {\n ...components,\n AlertExample,\n SelectExample,\n};\n","import './public-path';\n\n/**\n * Polyfills\n */\nimport 'core-js/features/function/name';\nimport 'core-js/features/object/assign';\nimport 'core-js/features/promise';\nimport * as smoothscroll from 'smoothscroll-polyfill';\n\nsmoothscroll.polyfill();\n\n/**\n * Globals.\n */\nimport './components/reset/reset';\nimport './components/typography/typography';\n\n// require all .ts files in utilities directory\nconst utilities: __WebpackModuleApi.RequireContext = require.context('./utilities/', true, /^\\.\\/.*(?